diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 341fbefcb..d491c2801 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v655 \ No newline at end of file +v669 \ No newline at end of file diff --git a/stripe/api_resources/account.py b/stripe/api_resources/account.py index 639c0995c..0a4d7897b 100644 --- a/stripe/api_resources/account.py +++ b/stripe/api_resources/account.py @@ -831,7 +831,11 @@ class Settings(StripeObject): class BacsDebitPayments(StripeObject): display_name: Optional[str] """ - The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this will appear on the mandate, and as the statement descriptor. + The Bacs Direct Debit display name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. The fee appears 5 business days after requesting Bacs. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + """ + service_user_number: Optional[str] + """ + The Bacs Direct Debit Service user number for this account. For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners. """ class Branding(StripeObject): @@ -1021,2389 +1025,2369 @@ class TosAcceptance(StripeObject): The user agent of the browser from which the account representative accepted their service agreement """ - if TYPE_CHECKING: + class CreateParams(RequestOptions): + account_token: NotRequired["str"] + """ + An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. + """ + business_profile: NotRequired["Account.CreateParamsBusinessProfile"] + """ + Business information about the account. + """ + business_type: NotRequired[ + "Literal['company', 'government_entity', 'individual', 'non_profit']" + ] + """ + The business type. + """ + capabilities: NotRequired["Account.CreateParamsCapabilities"] + """ + Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. + """ + company: NotRequired["Account.CreateParamsCompany"] + """ + Information about the company or business. This field is available for any `business_type`. + """ + country: NotRequired["str"] + """ + The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. + """ + default_currency: NotRequired["str"] + """ + Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). + """ + documents: NotRequired["Account.CreateParamsDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired["str"] + """ + The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + external_account: NotRequired["str"] + """ + A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation. - class CreateParams(RequestOptions): - account_token: NotRequired["str"] - """ - An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. - """ - business_profile: NotRequired[ - "Account.CreateParamsBusinessProfile" - ] - """ - Business information about the account. - """ - business_type: NotRequired[ - "Literal['company', 'government_entity', 'individual', 'non_profit']" - ] - """ - The business type. - """ - capabilities: NotRequired["Account.CreateParamsCapabilities"] - """ - Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. - """ - company: NotRequired["Account.CreateParamsCompany"] - """ - Information about the company or business. This field is available for any `business_type`. - """ - country: NotRequired["str"] - """ - The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. - """ - default_currency: NotRequired["str"] - """ - Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). - """ - documents: NotRequired["Account.CreateParamsDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired["str"] - """ - The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - external_account: NotRequired["str"] - """ - A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation. + 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/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. + """ + individual: NotRequired["Account.CreateParamsIndividual"] + """ + Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. + """ + metadata: NotRequired["Literal['']|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`. + """ + settings: NotRequired["Account.CreateParamsSettings"] + """ + Options for customizing how the account functions within Stripe. + """ + tos_acceptance: NotRequired["Account.CreateParamsTosAcceptance"] + """ + Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). + """ + type: NotRequired["Literal['custom', 'express', 'standard']"] + """ + The type of Stripe account to create. May be one of `custom`, `express` or `standard`. + """ - 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/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. - """ - individual: NotRequired["Account.CreateParamsIndividual"] - """ - Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. - """ - metadata: NotRequired["Literal['']|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`. - """ - settings: NotRequired["Account.CreateParamsSettings"] - """ - Options for customizing how the account functions within Stripe. - """ - tos_acceptance: NotRequired["Account.CreateParamsTosAcceptance"] - """ - Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). - """ - type: NotRequired["Literal['custom', 'express', 'standard']"] - """ - The type of Stripe account to create. May be one of `custom`, `express` or `standard`. - """ + class CreateParamsTosAcceptance(TypedDict): + date: NotRequired["int"] + """ + The Unix timestamp marking when the account representative accepted their service agreement. + """ + ip: NotRequired["str"] + """ + The IP address from which the account representative accepted their service agreement. + """ + service_agreement: NotRequired["str"] + """ + The user's service agreement type. + """ + user_agent: NotRequired["str"] + """ + The user agent of the browser from which the account representative accepted their service agreement. + """ - class CreateParamsTosAcceptance(TypedDict): - date: NotRequired["int"] - """ - The Unix timestamp marking when the account representative accepted their service agreement. - """ - ip: NotRequired["str"] - """ - The IP address from which the account representative accepted their service agreement. - """ - service_agreement: NotRequired["str"] - """ - The user's service agreement type. - """ - user_agent: NotRequired["str"] - """ - The user agent of the browser from which the account representative accepted their service agreement. - """ + class CreateParamsSettings(TypedDict): + bacs_debit_payments: NotRequired[ + "Account.CreateParamsSettingsBacsDebitPayments" + ] + """ + Settings specific to Bacs Direct Debit. + """ + branding: NotRequired["Account.CreateParamsSettingsBranding"] + """ + Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. + """ + card_issuing: NotRequired["Account.CreateParamsSettingsCardIssuing"] + """ + Settings specific to the account's use of the Card Issuing product. + """ + card_payments: NotRequired["Account.CreateParamsSettingsCardPayments"] + """ + Settings specific to card charging on the account. + """ + payments: NotRequired["Account.CreateParamsSettingsPayments"] + """ + Settings that apply across payment methods for charging on the account. + """ + payouts: NotRequired["Account.CreateParamsSettingsPayouts"] + """ + Settings specific to the account's payouts. + """ + treasury: NotRequired["Account.CreateParamsSettingsTreasury"] + """ + Settings specific to the account's Treasury FinancialAccounts. + """ - class CreateParamsSettings(TypedDict): - branding: NotRequired["Account.CreateParamsSettingsBranding"] - """ - Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. - """ - card_issuing: NotRequired[ - "Account.CreateParamsSettingsCardIssuing" - ] - """ - Settings specific to the account's use of the Card Issuing product. - """ - card_payments: NotRequired[ - "Account.CreateParamsSettingsCardPayments" - ] - """ - Settings specific to card charging on the account. - """ - payments: NotRequired["Account.CreateParamsSettingsPayments"] - """ - Settings that apply across payment methods for charging on the account. - """ - payouts: NotRequired["Account.CreateParamsSettingsPayouts"] - """ - Settings specific to the account's payouts. - """ - treasury: NotRequired["Account.CreateParamsSettingsTreasury"] - """ - Settings specific to the account's Treasury FinancialAccounts. - """ + class CreateParamsSettingsTreasury(TypedDict): + tos_acceptance: NotRequired[ + "Account.CreateParamsSettingsTreasuryTosAcceptance" + ] + """ + Details on the account's acceptance of the Stripe Treasury Services Agreement. + """ - class CreateParamsSettingsTreasury(TypedDict): - tos_acceptance: NotRequired[ - "Account.CreateParamsSettingsTreasuryTosAcceptance" - ] - """ - Details on the account's acceptance of the Stripe Treasury Services Agreement. - """ + class CreateParamsSettingsTreasuryTosAcceptance(TypedDict): + date: NotRequired["int"] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ + ip: NotRequired["str"] + """ + The IP address from which the account representative accepted the service agreement. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ - class CreateParamsSettingsTreasuryTosAcceptance(TypedDict): - date: NotRequired["int"] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired["str"] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ + class CreateParamsSettingsPayouts(TypedDict): + debit_negative_balances: NotRequired["bool"] + """ + A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances). + """ + schedule: NotRequired["Account.CreateParamsSettingsPayoutsSchedule"] + """ + Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://stripe.com/docs/connect/bank-transfers#payout-information) documentation. + """ + statement_descriptor: NotRequired["str"] + """ + The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + """ - class CreateParamsSettingsPayouts(TypedDict): - debit_negative_balances: NotRequired["bool"] - """ - A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances). - """ - schedule: NotRequired[ - "Account.CreateParamsSettingsPayoutsSchedule" - ] - """ - Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://stripe.com/docs/connect/bank-transfers#payout-information) documentation. - """ - statement_descriptor: NotRequired["str"] - """ - The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. - """ + class CreateParamsSettingsPayoutsSchedule(TypedDict): + delay_days: NotRequired["Literal['minimum']|int"] + """ + The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://stripe.com/docs/connect/manage-payout-schedule). + """ + interval: NotRequired[ + "Literal['daily', 'manual', 'monthly', 'weekly']" + ] + """ + How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. + """ + monthly_anchor: NotRequired["int"] + """ + The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. + """ + weekly_anchor: NotRequired[ + "Literal['friday', 'monday', 'saturday', 'sunday', 'thursday', 'tuesday', 'wednesday']" + ] + """ + The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) + """ - class CreateParamsSettingsPayoutsSchedule(TypedDict): - delay_days: NotRequired["Literal['minimum']|int"] - """ - The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://stripe.com/docs/connect/manage-payout-schedule). - """ - interval: NotRequired[ - "Literal['daily', 'manual', 'monthly', 'weekly']" - ] - """ - How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. - """ - monthly_anchor: NotRequired["int"] - """ - The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. - """ - weekly_anchor: NotRequired[ - "Literal['friday', 'monday', 'saturday', 'sunday', 'thursday', 'tuesday', 'wednesday']" - ] - """ - The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) - """ + 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. + """ + 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). + """ + 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). + """ - 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. - """ - 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). - """ - 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). - """ + class CreateParamsSettingsCardPayments(TypedDict): + decline_on: NotRequired[ + "Account.CreateParamsSettingsCardPaymentsDeclineOn" + ] + """ + Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. + """ + statement_descriptor_prefix: 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. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + """ + statement_descriptor_prefix_kana: NotRequired["Literal['']|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. + """ + statement_descriptor_prefix_kanji: NotRequired["Literal['']|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. + """ - class CreateParamsSettingsCardPayments(TypedDict): - decline_on: NotRequired[ - "Account.CreateParamsSettingsCardPaymentsDeclineOn" - ] - """ - Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. - """ - statement_descriptor_prefix: 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. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. - """ - statement_descriptor_prefix_kana: NotRequired["Literal['']|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. - """ - statement_descriptor_prefix_kanji: NotRequired["Literal['']|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. - """ + class CreateParamsSettingsCardPaymentsDeclineOn(TypedDict): + avs_failure: NotRequired["bool"] + """ + Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + """ + cvc_failure: NotRequired["bool"] + """ + Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + """ - class CreateParamsSettingsCardPaymentsDeclineOn(TypedDict): - avs_failure: NotRequired["bool"] - """ - Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. - """ - cvc_failure: NotRequired["bool"] - """ - Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. - """ + class CreateParamsSettingsCardIssuing(TypedDict): + tos_acceptance: NotRequired[ + "Account.CreateParamsSettingsCardIssuingTosAcceptance" + ] + """ + Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/docs/issuing/connect/tos_acceptance). + """ - class CreateParamsSettingsCardIssuing(TypedDict): - tos_acceptance: NotRequired[ - "Account.CreateParamsSettingsCardIssuingTosAcceptance" - ] - """ - Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/docs/issuing/connect/tos_acceptance). - """ + class CreateParamsSettingsCardIssuingTosAcceptance(TypedDict): + date: NotRequired["int"] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ + ip: NotRequired["str"] + """ + The IP address from which the account representative accepted the service agreement. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ - class CreateParamsSettingsCardIssuingTosAcceptance(TypedDict): - date: NotRequired["int"] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired["str"] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ + class CreateParamsSettingsBranding(TypedDict): + icon: NotRequired["str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + """ + logo: NotRequired["str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + """ + primary_color: NotRequired["str"] + """ + A CSS hex color value representing the primary branding color for this account. + """ + secondary_color: NotRequired["str"] + """ + A CSS hex color value representing the secondary branding color for this account. + """ - class CreateParamsSettingsBranding(TypedDict): - icon: NotRequired["str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. - """ - logo: NotRequired["str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. - """ - primary_color: NotRequired["str"] - """ - A CSS hex color value representing the primary branding color for this account. - """ - secondary_color: NotRequired["str"] - """ - A CSS hex color value representing the secondary branding color for this account. - """ + class CreateParamsSettingsBacsDebitPayments(TypedDict): + display_name: NotRequired["str"] + """ + The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + """ - class CreateParamsIndividual(TypedDict): - address: NotRequired["Account.CreateParamsIndividualAddress"] - """ - The individual's primary address. - """ - address_kana: NotRequired[ - "Account.CreateParamsIndividualAddressKana" - ] - """ - The Kana variation of the the individual's primary address (Japan only). - """ - address_kanji: NotRequired[ - "Account.CreateParamsIndividualAddressKanji" - ] - """ - The Kanji variation of the the individual's primary address (Japan only). - """ - dob: NotRequired["Literal['']|Account.CreateParamsIndividualDob"] - """ - The individual's date of birth. - """ - email: NotRequired["str"] - """ - The individual's email address. - """ - first_name: NotRequired["str"] - """ - The individual's first name. - """ - first_name_kana: NotRequired["str"] - """ - The Kana variation of the the individual's first name (Japan only). - """ - first_name_kanji: NotRequired["str"] - """ - The Kanji variation of the individual's first name (Japan only). - """ - full_name_aliases: NotRequired["Literal['']|List[str]"] - """ - A list of alternate names or aliases that the individual is known by. - """ - gender: NotRequired["str"] - """ - The individual's gender (International regulations require either "male" or "female"). - """ - id_number: NotRequired["str"] - """ - The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). - """ - id_number_secondary: NotRequired["str"] - """ - The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). - """ - last_name: NotRequired["str"] - """ - The individual's last name. - """ - last_name_kana: NotRequired["str"] - """ - The Kana variation of the individual's last name (Japan only). - """ - last_name_kanji: NotRequired["str"] - """ - The Kanji variation of the individual's last name (Japan only). - """ - maiden_name: NotRequired["str"] - """ - The individual's maiden name. - """ - metadata: NotRequired["Literal['']|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`. - """ - phone: NotRequired["str"] - """ - The individual's phone number. - """ - political_exposure: NotRequired["Literal['existing', 'none']"] - """ - Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - """ - registered_address: NotRequired[ - "Account.CreateParamsIndividualRegisteredAddress" - ] - """ - The individual's registered address. - """ - ssn_last_4: NotRequired["str"] - """ - The last four digits of the individual's Social Security Number (U.S. only). - """ - verification: NotRequired[ - "Account.CreateParamsIndividualVerification" - ] - """ - The individual's verification document information. - """ + class CreateParamsIndividual(TypedDict): + address: NotRequired["Account.CreateParamsIndividualAddress"] + """ + The individual's primary address. + """ + address_kana: NotRequired["Account.CreateParamsIndividualAddressKana"] + """ + The Kana variation of the the individual's primary address (Japan only). + """ + address_kanji: NotRequired[ + "Account.CreateParamsIndividualAddressKanji" + ] + """ + The Kanji variation of the the individual's primary address (Japan only). + """ + dob: NotRequired["Literal['']|Account.CreateParamsIndividualDob"] + """ + The individual's date of birth. + """ + email: NotRequired["str"] + """ + The individual's email address. + """ + first_name: NotRequired["str"] + """ + The individual's first name. + """ + first_name_kana: NotRequired["str"] + """ + The Kana variation of the the individual's first name (Japan only). + """ + first_name_kanji: NotRequired["str"] + """ + The Kanji variation of the individual's first name (Japan only). + """ + full_name_aliases: NotRequired["Literal['']|List[str]"] + """ + A list of alternate names or aliases that the individual is known by. + """ + gender: NotRequired["str"] + """ + The individual's gender (International regulations require either "male" or "female"). + """ + id_number: NotRequired["str"] + """ + The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). + """ + id_number_secondary: NotRequired["str"] + """ + The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). + """ + last_name: NotRequired["str"] + """ + The individual's last name. + """ + last_name_kana: NotRequired["str"] + """ + The Kana variation of the individual's last name (Japan only). + """ + last_name_kanji: NotRequired["str"] + """ + The Kanji variation of the individual's last name (Japan only). + """ + maiden_name: NotRequired["str"] + """ + The individual's maiden name. + """ + metadata: NotRequired["Literal['']|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`. + """ + phone: NotRequired["str"] + """ + The individual's phone number. + """ + political_exposure: NotRequired["Literal['existing', 'none']"] + """ + Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + """ + registered_address: NotRequired[ + "Account.CreateParamsIndividualRegisteredAddress" + ] + """ + The individual's registered address. + """ + ssn_last_4: NotRequired["str"] + """ + The last four digits of the individual's Social Security Number (U.S. only). + """ + verification: NotRequired["Account.CreateParamsIndividualVerification"] + """ + The individual's verification document information. + """ - class CreateParamsIndividualVerification(TypedDict): - additional_document: NotRequired[ - "Account.CreateParamsIndividualVerificationAdditionalDocument" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - document: NotRequired[ - "Account.CreateParamsIndividualVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ + class CreateParamsIndividualVerification(TypedDict): + additional_document: NotRequired[ + "Account.CreateParamsIndividualVerificationAdditionalDocument" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + document: NotRequired[ + "Account.CreateParamsIndividualVerificationDocument" + ] + """ + An identifying document, either a passport or local ID card. + """ - class CreateParamsIndividualVerificationDocument(TypedDict): - back: NotRequired["str"] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired["str"] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ + class CreateParamsIndividualVerificationDocument(TypedDict): + back: NotRequired["str"] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired["str"] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ - class CreateParamsIndividualVerificationAdditionalDocument(TypedDict): - back: NotRequired["str"] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired["str"] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ + class CreateParamsIndividualVerificationAdditionalDocument(TypedDict): + back: NotRequired["str"] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired["str"] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ - class CreateParamsIndividualRegisteredAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsIndividualRegisteredAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreateParamsIndividualDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ + class CreateParamsIndividualDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ - class CreateParamsIndividualAddressKanji(TypedDict): - city: NotRequired["str"] - """ - City or ward. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Block or building number. - """ - line2: NotRequired["str"] - """ - Building details. - """ - postal_code: NotRequired["str"] - """ - Postal code. - """ - state: NotRequired["str"] - """ - Prefecture. - """ - town: NotRequired["str"] - """ - Town or cho-me. - """ + class CreateParamsIndividualAddressKanji(TypedDict): + city: NotRequired["str"] + """ + City or ward. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Block or building number. + """ + line2: NotRequired["str"] + """ + Building details. + """ + postal_code: NotRequired["str"] + """ + Postal code. + """ + state: NotRequired["str"] + """ + Prefecture. + """ + town: NotRequired["str"] + """ + Town or cho-me. + """ - class CreateParamsIndividualAddressKana(TypedDict): - city: NotRequired["str"] - """ - City or ward. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Block or building number. - """ - line2: NotRequired["str"] - """ - Building details. - """ - postal_code: NotRequired["str"] - """ - Postal code. - """ - state: NotRequired["str"] - """ - Prefecture. - """ - town: NotRequired["str"] - """ - Town or cho-me. - """ + class CreateParamsIndividualAddressKana(TypedDict): + city: NotRequired["str"] + """ + City or ward. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Block or building number. + """ + line2: NotRequired["str"] + """ + Building details. + """ + postal_code: NotRequired["str"] + """ + Postal code. + """ + state: NotRequired["str"] + """ + Prefecture. + """ + town: NotRequired["str"] + """ + Town or cho-me. + """ - class CreateParamsIndividualAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsIndividualAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreateParamsDocuments(TypedDict): - bank_account_ownership_verification: NotRequired[ - "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. - """ - company_license: NotRequired[ - "Account.CreateParamsDocumentsCompanyLicense" - ] - """ - One or more documents that demonstrate proof of a company's license to operate. - """ - company_memorandum_of_association: NotRequired[ - "Account.CreateParamsDocumentsCompanyMemorandumOfAssociation" - ] - """ - One or more documents showing the company's Memorandum of Association. - """ - company_ministerial_decree: NotRequired[ - "Account.CreateParamsDocumentsCompanyMinisterialDecree" - ] - """ - (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. - """ - company_registration_verification: NotRequired[ - "Account.CreateParamsDocumentsCompanyRegistrationVerification" - ] - """ - One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. - """ - company_tax_id_verification: NotRequired[ - "Account.CreateParamsDocumentsCompanyTaxIdVerification" - ] - """ - One or more documents that demonstrate proof of a company's tax ID. - """ - proof_of_registration: NotRequired[ - "Account.CreateParamsDocumentsProofOfRegistration" - ] - """ - One or more documents showing the company's proof of registration with the national business registry. - """ - - class CreateParamsDocumentsProofOfRegistration(TypedDict): - files: NotRequired["List[str]"] - """ - 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 CreateParamsDocumentsCompanyTaxIdVerification(TypedDict): - files: NotRequired["List[str]"] - """ - 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 CreateParamsDocumentsCompanyRegistrationVerification(TypedDict): - files: NotRequired["List[str]"] - """ - 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 CreateParamsDocuments(TypedDict): + bank_account_ownership_verification: NotRequired[ + "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. + """ + company_license: NotRequired[ + "Account.CreateParamsDocumentsCompanyLicense" + ] + """ + One or more documents that demonstrate proof of a company's license to operate. + """ + company_memorandum_of_association: NotRequired[ + "Account.CreateParamsDocumentsCompanyMemorandumOfAssociation" + ] + """ + One or more documents showing the company's Memorandum of Association. + """ + company_ministerial_decree: NotRequired[ + "Account.CreateParamsDocumentsCompanyMinisterialDecree" + ] + """ + (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. + """ + company_registration_verification: NotRequired[ + "Account.CreateParamsDocumentsCompanyRegistrationVerification" + ] + """ + One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. + """ + company_tax_id_verification: NotRequired[ + "Account.CreateParamsDocumentsCompanyTaxIdVerification" + ] + """ + One or more documents that demonstrate proof of a company's tax ID. + """ + proof_of_registration: NotRequired[ + "Account.CreateParamsDocumentsProofOfRegistration" + ] + """ + One or more documents showing the company's proof of registration with the national business registry. + """ - class CreateParamsDocumentsCompanyMinisterialDecree(TypedDict): - files: NotRequired["List[str]"] - """ - 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 CreateParamsDocumentsProofOfRegistration(TypedDict): + files: NotRequired["List[str]"] + """ + 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 CreateParamsDocumentsCompanyMemorandumOfAssociation(TypedDict): - files: NotRequired["List[str]"] - """ - 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 CreateParamsDocumentsCompanyTaxIdVerification(TypedDict): + files: NotRequired["List[str]"] + """ + 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 CreateParamsDocumentsCompanyLicense(TypedDict): - files: NotRequired["List[str]"] - """ - 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 CreateParamsDocumentsCompanyRegistrationVerification(TypedDict): + files: NotRequired["List[str]"] + """ + 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 CreateParamsDocumentsBankAccountOwnershipVerification(TypedDict): - files: NotRequired["List[str]"] - """ - 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 CreateParamsDocumentsCompanyMinisterialDecree(TypedDict): + files: NotRequired["List[str]"] + """ + 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 CreateParamsCompany(TypedDict): - address: NotRequired["Account.CreateParamsCompanyAddress"] - """ - The company's primary address. - """ - address_kana: NotRequired["Account.CreateParamsCompanyAddressKana"] - """ - The Kana variation of the company's primary address (Japan only). - """ - address_kanji: NotRequired[ - "Account.CreateParamsCompanyAddressKanji" - ] - """ - The Kanji variation of the company's primary address (Japan only). - """ - directors_provided: NotRequired["bool"] - """ - Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. - """ - executives_provided: NotRequired["bool"] - """ - Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.executive` requirement. - """ - export_license_id: NotRequired["str"] - """ - The export license ID number of the company, also referred as Import Export Code (India only). - """ - export_purpose_code: NotRequired["str"] - """ - The purpose code to use for export transactions (India only). - """ - name: NotRequired["str"] - """ - The company's legal name. - """ - name_kana: NotRequired["str"] - """ - The Kana variation of the company's legal name (Japan only). - """ - name_kanji: NotRequired["str"] - """ - The Kanji variation of the company's legal name (Japan only). - """ - owners_provided: NotRequired["bool"] - """ - Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.owner` requirement. - """ - ownership_declaration: NotRequired[ - "Account.CreateParamsCompanyOwnershipDeclaration" - ] - """ - This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. - """ - phone: NotRequired["str"] - """ - The company's phone number (used for verification). - """ - registration_number: NotRequired["str"] - """ - The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). - """ - structure: NotRequired[ - "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" - ] - """ - The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. - """ - tax_id: NotRequired["str"] - """ - The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) - """ - tax_id_registrar: NotRequired["str"] - """ - The jurisdiction in which the `tax_id` is registered (Germany-based companies only). - """ - vat_id: NotRequired["str"] - """ - The VAT number of the company. - """ - verification: NotRequired[ - "Account.CreateParamsCompanyVerification" - ] - """ - Information on the verification state of the company. - """ + class CreateParamsDocumentsCompanyMemorandumOfAssociation(TypedDict): + files: NotRequired["List[str]"] + """ + 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 CreateParamsCompanyVerification(TypedDict): - document: NotRequired[ - "Account.CreateParamsCompanyVerificationDocument" - ] - """ - A document verifying the business. - """ + class CreateParamsDocumentsCompanyLicense(TypedDict): + files: NotRequired["List[str]"] + """ + 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 CreateParamsCompanyVerificationDocument(TypedDict): - back: NotRequired["str"] - """ - The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired["str"] - """ - The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ + class CreateParamsDocumentsBankAccountOwnershipVerification(TypedDict): + files: NotRequired["List[str]"] + """ + 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 CreateParamsCompanyOwnershipDeclaration(TypedDict): - date: NotRequired["int"] - """ - The Unix timestamp marking when the beneficial owner attestation was made. - """ - ip: NotRequired["str"] - """ - The IP address from which the beneficial owner attestation was made. - """ - user_agent: NotRequired["str"] - """ - The user agent of the browser from which the beneficial owner attestation was made. - """ + class CreateParamsCompany(TypedDict): + address: NotRequired["Account.CreateParamsCompanyAddress"] + """ + The company's primary address. + """ + address_kana: NotRequired["Account.CreateParamsCompanyAddressKana"] + """ + The Kana variation of the company's primary address (Japan only). + """ + address_kanji: NotRequired["Account.CreateParamsCompanyAddressKanji"] + """ + The Kanji variation of the company's primary address (Japan only). + """ + directors_provided: NotRequired["bool"] + """ + Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + """ + executives_provided: NotRequired["bool"] + """ + Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.executive` requirement. + """ + export_license_id: NotRequired["str"] + """ + The export license ID number of the company, also referred as Import Export Code (India only). + """ + export_purpose_code: NotRequired["str"] + """ + The purpose code to use for export transactions (India only). + """ + name: NotRequired["str"] + """ + The company's legal name. + """ + name_kana: NotRequired["str"] + """ + The Kana variation of the company's legal name (Japan only). + """ + name_kanji: NotRequired["str"] + """ + The Kanji variation of the company's legal name (Japan only). + """ + owners_provided: NotRequired["bool"] + """ + Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.owner` requirement. + """ + ownership_declaration: NotRequired[ + "Account.CreateParamsCompanyOwnershipDeclaration" + ] + """ + This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + """ + phone: NotRequired["str"] + """ + The company's phone number (used for verification). + """ + registration_number: NotRequired["str"] + """ + The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + """ + structure: NotRequired[ + "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" + ] + """ + The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. + """ + tax_id: NotRequired["str"] + """ + The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + """ + tax_id_registrar: NotRequired["str"] + """ + The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + """ + vat_id: NotRequired["str"] + """ + The VAT number of the company. + """ + verification: NotRequired["Account.CreateParamsCompanyVerification"] + """ + Information on the verification state of the company. + """ - class CreateParamsCompanyAddressKanji(TypedDict): - city: NotRequired["str"] - """ - City or ward. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Block or building number. - """ - line2: NotRequired["str"] - """ - Building details. - """ - postal_code: NotRequired["str"] - """ - Postal code. - """ - state: NotRequired["str"] - """ - Prefecture. - """ - town: NotRequired["str"] - """ - Town or cho-me. - """ + class CreateParamsCompanyVerification(TypedDict): + document: NotRequired[ + "Account.CreateParamsCompanyVerificationDocument" + ] + """ + A document verifying the business. + """ - class CreateParamsCompanyAddressKana(TypedDict): - city: NotRequired["str"] - """ - City or ward. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Block or building number. - """ - line2: NotRequired["str"] - """ - Building details. - """ - postal_code: NotRequired["str"] - """ - Postal code. - """ - state: NotRequired["str"] - """ - Prefecture. - """ - town: NotRequired["str"] - """ - Town or cho-me. - """ + class CreateParamsCompanyVerificationDocument(TypedDict): + back: NotRequired["str"] + """ + The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired["str"] + """ + The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ - class CreateParamsCompanyAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsCompanyOwnershipDeclaration(TypedDict): + date: NotRequired["int"] + """ + The Unix timestamp marking when the beneficial owner attestation was made. + """ + ip: NotRequired["str"] + """ + The IP address from which the beneficial owner attestation was made. + """ + user_agent: NotRequired["str"] + """ + The user agent of the browser from which the beneficial owner attestation was made. + """ - class CreateParamsCapabilities(TypedDict): - acss_debit_payments: NotRequired[ - "Account.CreateParamsCapabilitiesAcssDebitPayments" - ] - """ - The acss_debit_payments capability. - """ - affirm_payments: NotRequired[ - "Account.CreateParamsCapabilitiesAffirmPayments" - ] - """ - The affirm_payments capability. - """ - afterpay_clearpay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesAfterpayClearpayPayments" - ] - """ - The afterpay_clearpay_payments capability. - """ - au_becs_debit_payments: NotRequired[ - "Account.CreateParamsCapabilitiesAuBecsDebitPayments" - ] - """ - The au_becs_debit_payments capability. - """ - bacs_debit_payments: NotRequired[ - "Account.CreateParamsCapabilitiesBacsDebitPayments" - ] - """ - The bacs_debit_payments capability. - """ - bancontact_payments: NotRequired[ - "Account.CreateParamsCapabilitiesBancontactPayments" - ] - """ - The bancontact_payments capability. - """ - bank_transfer_payments: NotRequired[ - "Account.CreateParamsCapabilitiesBankTransferPayments" - ] - """ - The bank_transfer_payments capability. - """ - blik_payments: NotRequired[ - "Account.CreateParamsCapabilitiesBlikPayments" - ] - """ - The blik_payments capability. - """ - boleto_payments: NotRequired[ - "Account.CreateParamsCapabilitiesBoletoPayments" - ] - """ - The boleto_payments capability. - """ - card_issuing: NotRequired[ - "Account.CreateParamsCapabilitiesCardIssuing" - ] - """ - The card_issuing capability. - """ - card_payments: NotRequired[ - "Account.CreateParamsCapabilitiesCardPayments" - ] - """ - The card_payments capability. - """ - cartes_bancaires_payments: NotRequired[ - "Account.CreateParamsCapabilitiesCartesBancairesPayments" - ] - """ - The cartes_bancaires_payments capability. - """ - cashapp_payments: NotRequired[ - "Account.CreateParamsCapabilitiesCashappPayments" - ] - """ - The cashapp_payments capability. - """ - eps_payments: NotRequired[ - "Account.CreateParamsCapabilitiesEpsPayments" - ] - """ - The eps_payments capability. - """ - fpx_payments: NotRequired[ - "Account.CreateParamsCapabilitiesFpxPayments" - ] - """ - The fpx_payments capability. - """ - giropay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesGiropayPayments" - ] - """ - The giropay_payments capability. - """ - grabpay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesGrabpayPayments" - ] - """ - The grabpay_payments capability. - """ - ideal_payments: NotRequired[ - "Account.CreateParamsCapabilitiesIdealPayments" - ] - """ - The ideal_payments capability. - """ - india_international_payments: NotRequired[ - "Account.CreateParamsCapabilitiesIndiaInternationalPayments" - ] - """ - The india_international_payments capability. - """ - jcb_payments: NotRequired[ - "Account.CreateParamsCapabilitiesJcbPayments" - ] - """ - The jcb_payments capability. - """ - klarna_payments: NotRequired[ - "Account.CreateParamsCapabilitiesKlarnaPayments" - ] - """ - The klarna_payments capability. - """ - konbini_payments: NotRequired[ - "Account.CreateParamsCapabilitiesKonbiniPayments" - ] - """ - The konbini_payments capability. - """ - legacy_payments: NotRequired[ - "Account.CreateParamsCapabilitiesLegacyPayments" - ] - """ - The legacy_payments capability. - """ - link_payments: NotRequired[ - "Account.CreateParamsCapabilitiesLinkPayments" - ] - """ - The link_payments capability. - """ - oxxo_payments: NotRequired[ - "Account.CreateParamsCapabilitiesOxxoPayments" - ] - """ - The oxxo_payments capability. - """ - p24_payments: NotRequired[ - "Account.CreateParamsCapabilitiesP24Payments" - ] - """ - The p24_payments capability. - """ - paynow_payments: NotRequired[ - "Account.CreateParamsCapabilitiesPaynowPayments" - ] - """ - The paynow_payments capability. - """ - promptpay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesPromptpayPayments" - ] - """ - The promptpay_payments capability. - """ - revolut_pay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesRevolutPayPayments" - ] - """ - The revolut_pay_payments capability. - """ - sepa_debit_payments: NotRequired[ - "Account.CreateParamsCapabilitiesSepaDebitPayments" - ] - """ - The sepa_debit_payments capability. - """ - sofort_payments: NotRequired[ - "Account.CreateParamsCapabilitiesSofortPayments" - ] - """ - The sofort_payments capability. - """ - tax_reporting_us_1099_k: NotRequired[ - "Account.CreateParamsCapabilitiesTaxReportingUs1099K" - ] - """ - The tax_reporting_us_1099_k capability. - """ - tax_reporting_us_1099_misc: NotRequired[ - "Account.CreateParamsCapabilitiesTaxReportingUs1099Misc" - ] - """ - The tax_reporting_us_1099_misc capability. - """ - transfers: NotRequired["Account.CreateParamsCapabilitiesTransfers"] - """ - The transfers capability. - """ - treasury: NotRequired["Account.CreateParamsCapabilitiesTreasury"] - """ - The treasury capability. - """ - us_bank_account_ach_payments: NotRequired[ - "Account.CreateParamsCapabilitiesUsBankAccountAchPayments" - ] - """ - The us_bank_account_ach_payments capability. - """ - zip_payments: NotRequired[ - "Account.CreateParamsCapabilitiesZipPayments" - ] - """ - The zip_payments capability. - """ + class CreateParamsCompanyAddressKanji(TypedDict): + city: NotRequired["str"] + """ + City or ward. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Block or building number. + """ + line2: NotRequired["str"] + """ + Building details. + """ + postal_code: NotRequired["str"] + """ + Postal code. + """ + state: NotRequired["str"] + """ + Prefecture. + """ + town: NotRequired["str"] + """ + Town or cho-me. + """ - class CreateParamsCapabilitiesZipPayments(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 CreateParamsCompanyAddressKana(TypedDict): + city: NotRequired["str"] + """ + City or ward. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Block or building number. + """ + line2: NotRequired["str"] + """ + Building details. + """ + postal_code: NotRequired["str"] + """ + Postal code. + """ + state: NotRequired["str"] + """ + Prefecture. + """ + town: NotRequired["str"] + """ + Town or cho-me. + """ - class CreateParamsCapabilitiesUsBankAccountAchPayments(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 CreateParamsCompanyAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreateParamsCapabilitiesTreasury(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 CreateParamsCapabilities(TypedDict): + acss_debit_payments: NotRequired[ + "Account.CreateParamsCapabilitiesAcssDebitPayments" + ] + """ + The acss_debit_payments capability. + """ + affirm_payments: NotRequired[ + "Account.CreateParamsCapabilitiesAffirmPayments" + ] + """ + The affirm_payments capability. + """ + afterpay_clearpay_payments: NotRequired[ + "Account.CreateParamsCapabilitiesAfterpayClearpayPayments" + ] + """ + The afterpay_clearpay_payments capability. + """ + au_becs_debit_payments: NotRequired[ + "Account.CreateParamsCapabilitiesAuBecsDebitPayments" + ] + """ + The au_becs_debit_payments capability. + """ + bacs_debit_payments: NotRequired[ + "Account.CreateParamsCapabilitiesBacsDebitPayments" + ] + """ + The bacs_debit_payments capability. + """ + bancontact_payments: NotRequired[ + "Account.CreateParamsCapabilitiesBancontactPayments" + ] + """ + The bancontact_payments capability. + """ + bank_transfer_payments: NotRequired[ + "Account.CreateParamsCapabilitiesBankTransferPayments" + ] + """ + The bank_transfer_payments capability. + """ + blik_payments: NotRequired[ + "Account.CreateParamsCapabilitiesBlikPayments" + ] + """ + The blik_payments capability. + """ + boleto_payments: NotRequired[ + "Account.CreateParamsCapabilitiesBoletoPayments" + ] + """ + The boleto_payments capability. + """ + card_issuing: NotRequired[ + "Account.CreateParamsCapabilitiesCardIssuing" + ] + """ + The card_issuing capability. + """ + card_payments: NotRequired[ + "Account.CreateParamsCapabilitiesCardPayments" + ] + """ + The card_payments capability. + """ + cartes_bancaires_payments: NotRequired[ + "Account.CreateParamsCapabilitiesCartesBancairesPayments" + ] + """ + The cartes_bancaires_payments capability. + """ + cashapp_payments: NotRequired[ + "Account.CreateParamsCapabilitiesCashappPayments" + ] + """ + The cashapp_payments capability. + """ + eps_payments: NotRequired[ + "Account.CreateParamsCapabilitiesEpsPayments" + ] + """ + The eps_payments capability. + """ + fpx_payments: NotRequired[ + "Account.CreateParamsCapabilitiesFpxPayments" + ] + """ + The fpx_payments capability. + """ + giropay_payments: NotRequired[ + "Account.CreateParamsCapabilitiesGiropayPayments" + ] + """ + The giropay_payments capability. + """ + grabpay_payments: NotRequired[ + "Account.CreateParamsCapabilitiesGrabpayPayments" + ] + """ + The grabpay_payments capability. + """ + ideal_payments: NotRequired[ + "Account.CreateParamsCapabilitiesIdealPayments" + ] + """ + The ideal_payments capability. + """ + india_international_payments: NotRequired[ + "Account.CreateParamsCapabilitiesIndiaInternationalPayments" + ] + """ + The india_international_payments capability. + """ + jcb_payments: NotRequired[ + "Account.CreateParamsCapabilitiesJcbPayments" + ] + """ + The jcb_payments capability. + """ + klarna_payments: NotRequired[ + "Account.CreateParamsCapabilitiesKlarnaPayments" + ] + """ + The klarna_payments capability. + """ + konbini_payments: NotRequired[ + "Account.CreateParamsCapabilitiesKonbiniPayments" + ] + """ + The konbini_payments capability. + """ + legacy_payments: NotRequired[ + "Account.CreateParamsCapabilitiesLegacyPayments" + ] + """ + The legacy_payments capability. + """ + link_payments: NotRequired[ + "Account.CreateParamsCapabilitiesLinkPayments" + ] + """ + The link_payments capability. + """ + oxxo_payments: NotRequired[ + "Account.CreateParamsCapabilitiesOxxoPayments" + ] + """ + The oxxo_payments capability. + """ + p24_payments: NotRequired[ + "Account.CreateParamsCapabilitiesP24Payments" + ] + """ + The p24_payments capability. + """ + paynow_payments: NotRequired[ + "Account.CreateParamsCapabilitiesPaynowPayments" + ] + """ + The paynow_payments capability. + """ + promptpay_payments: NotRequired[ + "Account.CreateParamsCapabilitiesPromptpayPayments" + ] + """ + The promptpay_payments capability. + """ + revolut_pay_payments: NotRequired[ + "Account.CreateParamsCapabilitiesRevolutPayPayments" + ] + """ + The revolut_pay_payments capability. + """ + sepa_debit_payments: NotRequired[ + "Account.CreateParamsCapabilitiesSepaDebitPayments" + ] + """ + The sepa_debit_payments capability. + """ + sofort_payments: NotRequired[ + "Account.CreateParamsCapabilitiesSofortPayments" + ] + """ + The sofort_payments capability. + """ + tax_reporting_us_1099_k: NotRequired[ + "Account.CreateParamsCapabilitiesTaxReportingUs1099K" + ] + """ + The tax_reporting_us_1099_k capability. + """ + tax_reporting_us_1099_misc: NotRequired[ + "Account.CreateParamsCapabilitiesTaxReportingUs1099Misc" + ] + """ + The tax_reporting_us_1099_misc capability. + """ + transfers: NotRequired["Account.CreateParamsCapabilitiesTransfers"] + """ + The transfers capability. + """ + treasury: NotRequired["Account.CreateParamsCapabilitiesTreasury"] + """ + The treasury capability. + """ + us_bank_account_ach_payments: NotRequired[ + "Account.CreateParamsCapabilitiesUsBankAccountAchPayments" + ] + """ + The us_bank_account_ach_payments capability. + """ + zip_payments: NotRequired[ + "Account.CreateParamsCapabilitiesZipPayments" + ] + """ + The zip_payments capability. + """ - class CreateParamsCapabilitiesTransfers(TypedDict): - requested: NotRequired["bool"] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ + class CreateParamsCapabilitiesZipPayments(TypedDict): + requested: NotRequired["bool"] + """ + 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 CreateParamsCapabilitiesTaxReportingUs1099Misc(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 CreateParamsCapabilitiesUsBankAccountAchPayments(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 CreateParamsCapabilitiesTaxReportingUs1099K(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 CreateParamsCapabilitiesTreasury(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 CreateParamsCapabilitiesSofortPayments(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 CreateParamsCapabilitiesTransfers(TypedDict): + requested: NotRequired["bool"] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ - class CreateParamsCapabilitiesSepaDebitPayments(TypedDict): - requested: NotRequired["bool"] - """ - 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 CreateParamsCapabilitiesTaxReportingUs1099Misc(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 CreateParamsCapabilitiesRevolutPayPayments(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 CreateParamsCapabilitiesTaxReportingUs1099K(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 CreateParamsCapabilitiesPromptpayPayments(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 CreateParamsCapabilitiesSofortPayments(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"] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ + class CreateParamsCapabilitiesSepaDebitPayments(TypedDict): + requested: NotRequired["bool"] + """ + 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 CreateParamsCapabilitiesP24Payments(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 CreateParamsCapabilitiesRevolutPayPayments(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"] - """ - 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 CreateParamsCapabilitiesPromptpayPayments(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 CreateParamsCapabilitiesLinkPayments(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"] + """ + 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"] - """ - 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 CreateParamsCapabilitiesP24Payments(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 CreateParamsCapabilitiesKonbiniPayments(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"] + """ + 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"] - """ - 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 CreateParamsCapabilitiesLinkPayments(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 CreateParamsCapabilitiesJcbPayments(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"] + """ + 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 CreateParamsCapabilitiesIndiaInternationalPayments(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 CreateParamsCapabilitiesKonbiniPayments(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 CreateParamsCapabilitiesIdealPayments(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"] + """ + 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 CreateParamsCapabilitiesGrabpayPayments(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 CreateParamsCapabilitiesJcbPayments(TypedDict): + requested: NotRequired["bool"] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ - class CreateParamsCapabilitiesGiropayPayments(TypedDict): - requested: NotRequired["bool"] - """ - 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 CreateParamsCapabilitiesIndiaInternationalPayments(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 CreateParamsCapabilitiesFpxPayments(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 CreateParamsCapabilitiesIdealPayments(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 CreateParamsCapabilitiesEpsPayments(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 CreateParamsCapabilitiesGrabpayPayments(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 CreateParamsCapabilitiesCashappPayments(TypedDict): - requested: NotRequired["bool"] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ + class CreateParamsCapabilitiesGiropayPayments(TypedDict): + requested: NotRequired["bool"] + """ + 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 CreateParamsCapabilitiesCartesBancairesPayments(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 CreateParamsCapabilitiesFpxPayments(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 CreateParamsCapabilitiesCardPayments(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 CreateParamsCapabilitiesEpsPayments(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 CreateParamsCapabilitiesCardIssuing(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 CreateParamsCapabilitiesCashappPayments(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 CreateParamsCapabilitiesBoletoPayments(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 CreateParamsCapabilitiesCartesBancairesPayments(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 CreateParamsCapabilitiesBlikPayments(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 CreateParamsCapabilitiesCardPayments(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 CreateParamsCapabilitiesBankTransferPayments(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 CreateParamsCapabilitiesCardIssuing(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 CreateParamsCapabilitiesBancontactPayments(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 CreateParamsCapabilitiesBoletoPayments(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 CreateParamsCapabilitiesBacsDebitPayments(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 CreateParamsCapabilitiesBlikPayments(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 CreateParamsCapabilitiesAuBecsDebitPayments(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 CreateParamsCapabilitiesBankTransferPayments(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 CreateParamsCapabilitiesAfterpayClearpayPayments(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 CreateParamsCapabilitiesBancontactPayments(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 CreateParamsCapabilitiesAffirmPayments(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 CreateParamsCapabilitiesBacsDebitPayments(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 CreateParamsCapabilitiesAcssDebitPayments(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 CreateParamsCapabilitiesAuBecsDebitPayments(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 CreateParamsBusinessProfile(TypedDict): - mcc: NotRequired["str"] - """ - [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. - """ - monthly_estimated_revenue: NotRequired[ - "Account.CreateParamsBusinessProfileMonthlyEstimatedRevenue" - ] - """ - An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. - """ - name: NotRequired["str"] - """ - The customer-facing business name. - """ - product_description: NotRequired["str"] - """ - Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. - """ - support_address: NotRequired[ - "Account.CreateParamsBusinessProfileSupportAddress" - ] - """ - A publicly available mailing address for sending support issues to. - """ - support_email: NotRequired["str"] - """ - A publicly available email address for sending support issues to. - """ - support_phone: NotRequired["str"] - """ - A publicly available phone number to call with support issues. - """ - support_url: NotRequired["Literal['']|str"] - """ - A publicly available website for handling support issues. - """ - url: NotRequired["str"] - """ - The business's publicly available website. - """ + class CreateParamsCapabilitiesAfterpayClearpayPayments(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 CreateParamsBusinessProfileSupportAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsCapabilitiesAffirmPayments(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 CreateParamsBusinessProfileMonthlyEstimatedRevenue(TypedDict): - amount: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - 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). - """ + class CreateParamsCapabilitiesAcssDebitPayments(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 DeleteParams(RequestOptions): - pass + class CreateParamsBusinessProfile(TypedDict): + mcc: NotRequired["str"] + """ + [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + """ + monthly_estimated_revenue: NotRequired[ + "Account.CreateParamsBusinessProfileMonthlyEstimatedRevenue" + ] + """ + An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. + """ + name: NotRequired["str"] + """ + The customer-facing business name. + """ + product_description: NotRequired["str"] + """ + Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. + """ + support_address: NotRequired[ + "Account.CreateParamsBusinessProfileSupportAddress" + ] + """ + A publicly available mailing address for sending support issues to. + """ + support_email: NotRequired["str"] + """ + A publicly available email address for sending support issues to. + """ + support_phone: NotRequired["str"] + """ + A publicly available phone number to call with support issues. + """ + support_url: NotRequired["Literal['']|str"] + """ + A publicly available website for handling support issues. + """ + url: NotRequired["str"] + """ + The business's publicly available website. + """ - class ListParams(RequestOptions): - created: NotRequired["Account.ListParamsCreated|int"] - 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 CreateParamsBusinessProfileSupportAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class CreateParamsBusinessProfileMonthlyEstimatedRevenue(TypedDict): + amount: int + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + 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). + """ - class PersonsParams(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. - """ - relationship: NotRequired["Account.PersonsParamsRelationship"] - """ - Filters on the list of people returned based on the person's relationship to the account's company. - """ - 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 DeleteParams(RequestOptions): + pass - class PersonsParamsRelationship(TypedDict): - director: NotRequired["bool"] - """ - A filter on the list of people returned based on whether these people are directors of the account's company. - """ - executive: NotRequired["bool"] - """ - A filter on the list of people returned based on whether these people are executives of the account's company. - """ - legal_guardian: NotRequired["bool"] - """ - A filter on the list of people returned based on whether these people are legal guardians of the account's representative. - """ - owner: NotRequired["bool"] - """ - A filter on the list of people returned based on whether these people are owners of the account's company. - """ - representative: NotRequired["bool"] - """ - A filter on the list of people returned based on whether these people are the representative of the account's company. - """ + class ListParams(RequestOptions): + created: NotRequired["Account.ListParamsCreated|int"] + 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 RejectParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - reason: str - """ - The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class RetrieveCapabilityParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class PersonsParams(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. + """ + relationship: NotRequired["Account.PersonsParamsRelationship"] + """ + Filters on the list of people returned based on the person's relationship to the account's company. + """ + 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 ModifyCapabilityParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - requested: NotRequired["bool"] - """ - To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays. + class PersonsParamsRelationship(TypedDict): + director: NotRequired["bool"] + """ + A filter on the list of people returned based on whether these people are directors of the account's company. + """ + executive: NotRequired["bool"] + """ + A filter on the list of people returned based on whether these people are executives of the account's company. + """ + legal_guardian: NotRequired["bool"] + """ + A filter on the list of people returned based on whether these people are legal guardians of the account's representative. + """ + owner: NotRequired["bool"] + """ + A filter on the list of people returned based on whether these people are owners of the account's company. + """ + representative: NotRequired["bool"] + """ + A filter on the list of people returned based on whether these people are the representative of the account's company. + """ - If a capability isn't permanent, you can remove it from the account by passing false. Most capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error. - """ + class RejectParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + reason: str + """ + The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. + """ - class ListCapabilitiesParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveCapabilityParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CreateExternalAccountParams(RequestOptions): - default_for_currency: NotRequired["bool"] - """ - When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - external_account: str - """ - Please refer to full [documentation](https://stripe.com/docs/api) instead. - """ - 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`. - """ + class ModifyCapabilityParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + requested: NotRequired["bool"] + """ + To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays. - class RetrieveExternalAccountParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + If a capability isn't permanent, you can remove it from the account by passing false. Most capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error. + """ - class ModifyExternalAccountParams(RequestOptions): - account_holder_name: NotRequired["str"] - """ - The name of the person or business that owns the bank account. - """ - account_holder_type: NotRequired[ - "Literal['']|Literal['company', 'individual']" - ] - """ - The type of entity that holds the account. This can be either `individual` or `company`. - """ - account_type: NotRequired[ - "Literal['checking', 'futsu', 'savings', 'toza']" - ] - """ - The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. - """ - address_city: NotRequired["str"] - """ - City/District/Suburb/Town/Village. - """ - address_country: NotRequired["str"] - """ - Billing address country, if provided when creating card. - """ - address_line1: NotRequired["str"] - """ - Address line 1 (Street address/PO Box/Company name). - """ - address_line2: NotRequired["str"] - """ - Address line 2 (Apartment/Suite/Unit/Building). - """ - address_state: NotRequired["str"] - """ - State/County/Province/Region. - """ - address_zip: NotRequired["str"] - """ - ZIP or postal code. - """ - default_for_currency: NotRequired["bool"] - """ - When set to true, this becomes the default external account for its currency. - """ - documents: NotRequired[ - "Account.ModifyExternalAccountParamsDocuments" - ] - """ - Documents that may be submitted to satisfy various informational requests. - """ - exp_month: NotRequired["str"] - """ - Two digit number representing the card's expiration month. - """ - exp_year: NotRequired["str"] - """ - Four digit number representing the card's expiration year. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - name: NotRequired["str"] - """ - Cardholder name. - """ + class ListCapabilitiesParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ModifyExternalAccountParamsDocuments(TypedDict): - bank_account_ownership_verification: NotRequired[ - "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. - """ + class CreateExternalAccountParams(RequestOptions): + default_for_currency: NotRequired["bool"] + """ + When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + external_account: str + """ + Please refer to full [documentation](https://stripe.com/docs/api) instead. + """ + 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`. + """ - class ModifyExternalAccountParamsDocumentsBankAccountOwnershipVerification( - TypedDict, - ): - files: NotRequired["List[str]"] - """ - 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 RetrieveExternalAccountParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class DeleteExternalAccountParams(RequestOptions): - pass + class ModifyExternalAccountParams(RequestOptions): + account_holder_name: NotRequired["str"] + """ + The name of the person or business that owns the bank account. + """ + account_holder_type: NotRequired[ + "Literal['']|Literal['company', 'individual']" + ] + """ + The type of entity that holds the account. This can be either `individual` or `company`. + """ + account_type: NotRequired[ + "Literal['checking', 'futsu', 'savings', 'toza']" + ] + """ + The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + """ + address_city: NotRequired["str"] + """ + City/District/Suburb/Town/Village. + """ + address_country: NotRequired["str"] + """ + Billing address country, if provided when creating card. + """ + address_line1: NotRequired["str"] + """ + Address line 1 (Street address/PO Box/Company name). + """ + address_line2: NotRequired["str"] + """ + Address line 2 (Apartment/Suite/Unit/Building). + """ + address_state: NotRequired["str"] + """ + State/County/Province/Region. + """ + address_zip: NotRequired["str"] + """ + ZIP or postal code. + """ + default_for_currency: NotRequired["bool"] + """ + When set to true, this becomes the default external account for its currency. + """ + documents: NotRequired["Account.ModifyExternalAccountParamsDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + exp_month: NotRequired["str"] + """ + Two digit number representing the card's expiration month. + """ + exp_year: NotRequired["str"] + """ + Four digit number representing the card's expiration year. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + name: NotRequired["str"] + """ + Cardholder name. + """ - class ListExternalAccountsParams(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. - """ - object: NotRequired["Literal['bank_account', 'card']"] - """ - Filter external accounts according to a particular object type. - """ - 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 ModifyExternalAccountParamsDocuments(TypedDict): + bank_account_ownership_verification: NotRequired[ + "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. + """ - class CreateLoginLinkParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ModifyExternalAccountParamsDocumentsBankAccountOwnershipVerification( + TypedDict, + ): + files: NotRequired["List[str]"] + """ + 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 CreatePersonParams(RequestOptions): - additional_tos_acceptances: NotRequired[ - "Account.CreatePersonParamsAdditionalTosAcceptances" - ] - """ - Details on the legal guardian's acceptance of the required Stripe agreements. - """ - address: NotRequired["Account.CreatePersonParamsAddress"] - """ - The person's address. - """ - address_kana: NotRequired["Account.CreatePersonParamsAddressKana"] - """ - The Kana variation of the person's address (Japan only). - """ - address_kanji: NotRequired[ - "Account.CreatePersonParamsAddressKanji" - ] - """ - The Kanji variation of the person's address (Japan only). - """ - dob: NotRequired["Literal['']|Account.CreatePersonParamsDob"] - """ - The person's date of birth. - """ - documents: NotRequired["Account.CreatePersonParamsDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired["str"] - """ - The person's email address. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - first_name: NotRequired["str"] - """ - The person's first name. - """ - first_name_kana: NotRequired["str"] - """ - The Kana variation of the person's first name (Japan only). - """ - first_name_kanji: NotRequired["str"] - """ - The Kanji variation of the person's first name (Japan only). - """ - full_name_aliases: NotRequired["Literal['']|List[str]"] - """ - A list of alternate names or aliases that the person is known by. - """ - gender: NotRequired["str"] - """ - The person's gender (International regulations require either "male" or "female"). - """ - id_number: NotRequired["str"] - """ - The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). - """ - id_number_secondary: NotRequired["str"] - """ - The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). - """ - last_name: NotRequired["str"] - """ - The person's last name. - """ - last_name_kana: NotRequired["str"] - """ - The Kana variation of the person's last name (Japan only). - """ - last_name_kanji: NotRequired["str"] - """ - The Kanji variation of the person's last name (Japan only). - """ - maiden_name: NotRequired["str"] - """ - The person's maiden name. - """ - metadata: NotRequired["Literal['']|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`. - """ - nationality: NotRequired["str"] - """ - The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. - """ - person_token: NotRequired["str"] - """ - A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. - """ - phone: NotRequired["str"] - """ - The person's phone number. - """ - political_exposure: NotRequired["str"] - """ - Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - """ - registered_address: NotRequired[ - "Account.CreatePersonParamsRegisteredAddress" - ] - """ - The person's registered address. - """ - relationship: NotRequired["Account.CreatePersonParamsRelationship"] - """ - The relationship that this person has with the account's legal entity. - """ - ssn_last_4: NotRequired["str"] - """ - The last four digits of the person's Social Security number (U.S. only). - """ - verification: NotRequired["Account.CreatePersonParamsVerification"] - """ - The person's verification status. - """ + class DeleteExternalAccountParams(RequestOptions): + pass - class CreatePersonParamsVerification(TypedDict): - additional_document: NotRequired[ - "Account.CreatePersonParamsVerificationAdditionalDocument" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - document: NotRequired[ - "Account.CreatePersonParamsVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ + class ListExternalAccountsParams(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. + """ + object: NotRequired["Literal['bank_account', 'card']"] + """ + Filter external accounts according to a particular object type. + """ + 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 CreatePersonParamsVerificationDocument(TypedDict): - back: NotRequired["str"] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired["str"] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ + class CreateLoginLinkParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CreatePersonParamsVerificationAdditionalDocument(TypedDict): - back: NotRequired["str"] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired["str"] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ + class CreatePersonParams(RequestOptions): + additional_tos_acceptances: NotRequired[ + "Account.CreatePersonParamsAdditionalTosAcceptances" + ] + """ + Details on the legal guardian's acceptance of the required Stripe agreements. + """ + address: NotRequired["Account.CreatePersonParamsAddress"] + """ + The person's address. + """ + address_kana: NotRequired["Account.CreatePersonParamsAddressKana"] + """ + The Kana variation of the person's address (Japan only). + """ + address_kanji: NotRequired["Account.CreatePersonParamsAddressKanji"] + """ + The Kanji variation of the person's address (Japan only). + """ + dob: NotRequired["Literal['']|Account.CreatePersonParamsDob"] + """ + The person's date of birth. + """ + documents: NotRequired["Account.CreatePersonParamsDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired["str"] + """ + The person's email address. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + first_name: NotRequired["str"] + """ + The person's first name. + """ + first_name_kana: NotRequired["str"] + """ + The Kana variation of the person's first name (Japan only). + """ + first_name_kanji: NotRequired["str"] + """ + The Kanji variation of the person's first name (Japan only). + """ + full_name_aliases: NotRequired["Literal['']|List[str]"] + """ + A list of alternate names or aliases that the person is known by. + """ + gender: NotRequired["str"] + """ + The person's gender (International regulations require either "male" or "female"). + """ + id_number: NotRequired["str"] + """ + The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). + """ + id_number_secondary: NotRequired["str"] + """ + The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). + """ + last_name: NotRequired["str"] + """ + The person's last name. + """ + last_name_kana: NotRequired["str"] + """ + The Kana variation of the person's last name (Japan only). + """ + last_name_kanji: NotRequired["str"] + """ + The Kanji variation of the person's last name (Japan only). + """ + maiden_name: NotRequired["str"] + """ + The person's maiden name. + """ + metadata: NotRequired["Literal['']|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`. + """ + nationality: NotRequired["str"] + """ + The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. + """ + person_token: NotRequired["str"] + """ + A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. + """ + phone: NotRequired["str"] + """ + The person's phone number. + """ + political_exposure: NotRequired["str"] + """ + Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + """ + registered_address: NotRequired[ + "Account.CreatePersonParamsRegisteredAddress" + ] + """ + The person's registered address. + """ + relationship: NotRequired["Account.CreatePersonParamsRelationship"] + """ + The relationship that this person has with the account's legal entity. + """ + ssn_last_4: NotRequired["str"] + """ + The last four digits of the person's Social Security number (U.S. only). + """ + verification: NotRequired["Account.CreatePersonParamsVerification"] + """ + The person's verification status. + """ - class CreatePersonParamsRelationship(TypedDict): - 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. - """ - executive: NotRequired["bool"] - """ - Whether the person has significant responsibility to control, manage, or direct the organization. - """ - legal_guardian: NotRequired["bool"] - """ - Whether the person is the legal guardian of the account's representative. - """ - owner: NotRequired["bool"] - """ - Whether the person is an owner of the account's legal entity. - """ - percent_ownership: NotRequired["Literal['']|float"] - """ - The percent owned by the person of the account's legal entity. - """ - representative: NotRequired["bool"] - """ - Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. - """ - title: NotRequired["str"] - """ - The person's title (e.g., CEO, Support Engineer). - """ + class CreatePersonParamsVerification(TypedDict): + additional_document: NotRequired[ + "Account.CreatePersonParamsVerificationAdditionalDocument" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + document: NotRequired["Account.CreatePersonParamsVerificationDocument"] + """ + An identifying document, either a passport or local ID card. + """ - class CreatePersonParamsRegisteredAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreatePersonParamsVerificationDocument(TypedDict): + back: NotRequired["str"] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired["str"] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ - class CreatePersonParamsDocuments(TypedDict): - company_authorization: NotRequired[ - "Account.CreatePersonParamsDocumentsCompanyAuthorization" - ] - """ - One or more documents that demonstrate proof that this person is authorized to represent the company. - """ - passport: NotRequired[ - "Account.CreatePersonParamsDocumentsPassport" - ] - """ - One or more documents showing the person's passport page with photo and personal data. - """ - visa: NotRequired["Account.CreatePersonParamsDocumentsVisa"] - """ - One or more documents showing the person's visa required for living in the country where they are residing. - """ + class CreatePersonParamsVerificationAdditionalDocument(TypedDict): + back: NotRequired["str"] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired["str"] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ - class CreatePersonParamsDocumentsVisa(TypedDict): - files: NotRequired["List[str]"] - """ - 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 CreatePersonParamsRelationship(TypedDict): + 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. + """ + executive: NotRequired["bool"] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ + legal_guardian: NotRequired["bool"] + """ + Whether the person is the legal guardian of the account's representative. + """ + owner: NotRequired["bool"] + """ + Whether the person is an owner of the account's legal entity. + """ + percent_ownership: NotRequired["Literal['']|float"] + """ + The percent owned by the person of the account's legal entity. + """ + representative: NotRequired["bool"] + """ + Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + """ + title: NotRequired["str"] + """ + The person's title (e.g., CEO, Support Engineer). + """ - class CreatePersonParamsDocumentsPassport(TypedDict): - files: NotRequired["List[str]"] - """ - 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 CreatePersonParamsRegisteredAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreatePersonParamsDocumentsCompanyAuthorization(TypedDict): - files: NotRequired["List[str]"] - """ - 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 CreatePersonParamsDocuments(TypedDict): + company_authorization: NotRequired[ + "Account.CreatePersonParamsDocumentsCompanyAuthorization" + ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ + passport: NotRequired["Account.CreatePersonParamsDocumentsPassport"] + """ + One or more documents showing the person's passport page with photo and personal data. + """ + visa: NotRequired["Account.CreatePersonParamsDocumentsVisa"] + """ + One or more documents showing the person's visa required for living in the country where they are residing. + """ - class CreatePersonParamsDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ + class CreatePersonParamsDocumentsVisa(TypedDict): + files: NotRequired["List[str]"] + """ + 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 CreatePersonParamsDocumentsPassport(TypedDict): + files: NotRequired["List[str]"] + """ + 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 CreatePersonParamsDocumentsCompanyAuthorization(TypedDict): + files: NotRequired["List[str]"] + """ + 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 CreatePersonParamsAddressKanji(TypedDict): - city: NotRequired["str"] - """ - City or ward. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Block or building number. - """ - line2: NotRequired["str"] - """ - Building details. - """ - postal_code: NotRequired["str"] - """ - Postal code. - """ - state: NotRequired["str"] - """ - Prefecture. - """ - town: NotRequired["str"] - """ - Town or cho-me. - """ + class CreatePersonParamsDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ - class CreatePersonParamsAddressKana(TypedDict): - city: NotRequired["str"] - """ - City or ward. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Block or building number. - """ - line2: NotRequired["str"] - """ - Building details. - """ - postal_code: NotRequired["str"] - """ - Postal code. - """ - state: NotRequired["str"] - """ - Prefecture. - """ - town: NotRequired["str"] - """ - Town or cho-me. - """ + class CreatePersonParamsAddressKanji(TypedDict): + city: NotRequired["str"] + """ + City or ward. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Block or building number. + """ + line2: NotRequired["str"] + """ + Building details. + """ + postal_code: NotRequired["str"] + """ + Postal code. + """ + state: NotRequired["str"] + """ + Prefecture. + """ + town: NotRequired["str"] + """ + Town or cho-me. + """ - class CreatePersonParamsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreatePersonParamsAddressKana(TypedDict): + city: NotRequired["str"] + """ + City or ward. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Block or building number. + """ + line2: NotRequired["str"] + """ + Building details. + """ + postal_code: NotRequired["str"] + """ + Postal code. + """ + state: NotRequired["str"] + """ + Prefecture. + """ + town: NotRequired["str"] + """ + Town or cho-me. + """ - class CreatePersonParamsAdditionalTosAcceptances(TypedDict): - account: NotRequired[ - "Account.CreatePersonParamsAdditionalTosAcceptancesAccount" - ] - """ - Details on the legal guardian's acceptance of the main Stripe service agreement. - """ + class CreatePersonParamsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreatePersonParamsAdditionalTosAcceptancesAccount(TypedDict): - date: NotRequired["int"] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired["str"] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ + class CreatePersonParamsAdditionalTosAcceptances(TypedDict): + account: NotRequired[ + "Account.CreatePersonParamsAdditionalTosAcceptancesAccount" + ] + """ + Details on the legal guardian's acceptance of the main Stripe service agreement. + """ - class RetrievePersonParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class CreatePersonParamsAdditionalTosAcceptancesAccount(TypedDict): + date: NotRequired["int"] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ + ip: NotRequired["str"] + """ + The IP address from which the account representative accepted the service agreement. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ - class ModifyPersonParams(RequestOptions): - additional_tos_acceptances: NotRequired[ - "Account.ModifyPersonParamsAdditionalTosAcceptances" - ] - """ - Details on the legal guardian's acceptance of the required Stripe agreements. - """ - address: NotRequired["Account.ModifyPersonParamsAddress"] - """ - The person's address. - """ - address_kana: NotRequired["Account.ModifyPersonParamsAddressKana"] - """ - The Kana variation of the person's address (Japan only). - """ - address_kanji: NotRequired[ - "Account.ModifyPersonParamsAddressKanji" - ] - """ - The Kanji variation of the person's address (Japan only). - """ - dob: NotRequired["Literal['']|Account.ModifyPersonParamsDob"] - """ - The person's date of birth. - """ - documents: NotRequired["Account.ModifyPersonParamsDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired["str"] - """ - The person's email address. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - first_name: NotRequired["str"] - """ - The person's first name. - """ - first_name_kana: NotRequired["str"] - """ - The Kana variation of the person's first name (Japan only). - """ - first_name_kanji: NotRequired["str"] - """ - The Kanji variation of the person's first name (Japan only). - """ - full_name_aliases: NotRequired["Literal['']|List[str]"] - """ - A list of alternate names or aliases that the person is known by. - """ - gender: NotRequired["str"] - """ - The person's gender (International regulations require either "male" or "female"). - """ - id_number: NotRequired["str"] - """ - The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). - """ - id_number_secondary: NotRequired["str"] - """ - The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). - """ - last_name: NotRequired["str"] - """ - The person's last name. - """ - last_name_kana: NotRequired["str"] - """ - The Kana variation of the person's last name (Japan only). - """ - last_name_kanji: NotRequired["str"] - """ - The Kanji variation of the person's last name (Japan only). - """ - maiden_name: NotRequired["str"] - """ - The person's maiden name. - """ - metadata: NotRequired["Literal['']|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`. - """ - nationality: NotRequired["str"] - """ - The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. - """ - person_token: NotRequired["str"] - """ - A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. - """ - phone: NotRequired["str"] - """ - The person's phone number. - """ - political_exposure: NotRequired["str"] - """ - Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - """ - registered_address: NotRequired[ - "Account.ModifyPersonParamsRegisteredAddress" - ] - """ - The person's registered address. - """ - relationship: NotRequired["Account.ModifyPersonParamsRelationship"] - """ - The relationship that this person has with the account's legal entity. - """ - ssn_last_4: NotRequired["str"] - """ - The last four digits of the person's Social Security number (U.S. only). - """ - verification: NotRequired["Account.ModifyPersonParamsVerification"] - """ - The person's verification status. - """ + class RetrievePersonParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ModifyPersonParamsVerification(TypedDict): - additional_document: NotRequired[ - "Account.ModifyPersonParamsVerificationAdditionalDocument" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - document: NotRequired[ - "Account.ModifyPersonParamsVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ + class ModifyPersonParams(RequestOptions): + additional_tos_acceptances: NotRequired[ + "Account.ModifyPersonParamsAdditionalTosAcceptances" + ] + """ + Details on the legal guardian's acceptance of the required Stripe agreements. + """ + address: NotRequired["Account.ModifyPersonParamsAddress"] + """ + The person's address. + """ + address_kana: NotRequired["Account.ModifyPersonParamsAddressKana"] + """ + The Kana variation of the person's address (Japan only). + """ + address_kanji: NotRequired["Account.ModifyPersonParamsAddressKanji"] + """ + The Kanji variation of the person's address (Japan only). + """ + dob: NotRequired["Literal['']|Account.ModifyPersonParamsDob"] + """ + The person's date of birth. + """ + documents: NotRequired["Account.ModifyPersonParamsDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired["str"] + """ + The person's email address. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + first_name: NotRequired["str"] + """ + The person's first name. + """ + first_name_kana: NotRequired["str"] + """ + The Kana variation of the person's first name (Japan only). + """ + first_name_kanji: NotRequired["str"] + """ + The Kanji variation of the person's first name (Japan only). + """ + full_name_aliases: NotRequired["Literal['']|List[str]"] + """ + A list of alternate names or aliases that the person is known by. + """ + gender: NotRequired["str"] + """ + The person's gender (International regulations require either "male" or "female"). + """ + id_number: NotRequired["str"] + """ + The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). + """ + id_number_secondary: NotRequired["str"] + """ + The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). + """ + last_name: NotRequired["str"] + """ + The person's last name. + """ + last_name_kana: NotRequired["str"] + """ + The Kana variation of the person's last name (Japan only). + """ + last_name_kanji: NotRequired["str"] + """ + The Kanji variation of the person's last name (Japan only). + """ + maiden_name: NotRequired["str"] + """ + The person's maiden name. + """ + metadata: NotRequired["Literal['']|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`. + """ + nationality: NotRequired["str"] + """ + The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. + """ + person_token: NotRequired["str"] + """ + A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. + """ + phone: NotRequired["str"] + """ + The person's phone number. + """ + political_exposure: NotRequired["str"] + """ + Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + """ + registered_address: NotRequired[ + "Account.ModifyPersonParamsRegisteredAddress" + ] + """ + The person's registered address. + """ + relationship: NotRequired["Account.ModifyPersonParamsRelationship"] + """ + The relationship that this person has with the account's legal entity. + """ + ssn_last_4: NotRequired["str"] + """ + The last four digits of the person's Social Security number (U.S. only). + """ + verification: NotRequired["Account.ModifyPersonParamsVerification"] + """ + The person's verification status. + """ - class ModifyPersonParamsVerificationDocument(TypedDict): - back: NotRequired["str"] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired["str"] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ + class ModifyPersonParamsVerification(TypedDict): + additional_document: NotRequired[ + "Account.ModifyPersonParamsVerificationAdditionalDocument" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + document: NotRequired["Account.ModifyPersonParamsVerificationDocument"] + """ + An identifying document, either a passport or local ID card. + """ + + class ModifyPersonParamsVerificationDocument(TypedDict): + back: NotRequired["str"] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired["str"] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ - class ModifyPersonParamsVerificationAdditionalDocument(TypedDict): - back: NotRequired["str"] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired["str"] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ + class ModifyPersonParamsVerificationAdditionalDocument(TypedDict): + back: NotRequired["str"] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired["str"] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ - class ModifyPersonParamsRelationship(TypedDict): - 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. - """ - executive: NotRequired["bool"] - """ - Whether the person has significant responsibility to control, manage, or direct the organization. - """ - legal_guardian: NotRequired["bool"] - """ - Whether the person is the legal guardian of the account's representative. - """ - owner: NotRequired["bool"] - """ - Whether the person is an owner of the account's legal entity. - """ - percent_ownership: NotRequired["Literal['']|float"] - """ - The percent owned by the person of the account's legal entity. - """ - representative: NotRequired["bool"] - """ - Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. - """ - title: NotRequired["str"] - """ - The person's title (e.g., CEO, Support Engineer). - """ + class ModifyPersonParamsRelationship(TypedDict): + 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. + """ + executive: NotRequired["bool"] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ + legal_guardian: NotRequired["bool"] + """ + Whether the person is the legal guardian of the account's representative. + """ + owner: NotRequired["bool"] + """ + Whether the person is an owner of the account's legal entity. + """ + percent_ownership: NotRequired["Literal['']|float"] + """ + The percent owned by the person of the account's legal entity. + """ + representative: NotRequired["bool"] + """ + Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + """ + title: NotRequired["str"] + """ + The person's title (e.g., CEO, Support Engineer). + """ - class ModifyPersonParamsRegisteredAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class ModifyPersonParamsRegisteredAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ModifyPersonParamsDocuments(TypedDict): - company_authorization: NotRequired[ - "Account.ModifyPersonParamsDocumentsCompanyAuthorization" - ] - """ - One or more documents that demonstrate proof that this person is authorized to represent the company. - """ - passport: NotRequired[ - "Account.ModifyPersonParamsDocumentsPassport" - ] - """ - One or more documents showing the person's passport page with photo and personal data. - """ - visa: NotRequired["Account.ModifyPersonParamsDocumentsVisa"] - """ - One or more documents showing the person's visa required for living in the country where they are residing. - """ + class ModifyPersonParamsDocuments(TypedDict): + company_authorization: NotRequired[ + "Account.ModifyPersonParamsDocumentsCompanyAuthorization" + ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ + passport: NotRequired["Account.ModifyPersonParamsDocumentsPassport"] + """ + One or more documents showing the person's passport page with photo and personal data. + """ + visa: NotRequired["Account.ModifyPersonParamsDocumentsVisa"] + """ + One or more documents showing the person's visa required for living in the country where they are residing. + """ - class ModifyPersonParamsDocumentsVisa(TypedDict): - files: NotRequired["List[str]"] - """ - 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 ModifyPersonParamsDocumentsVisa(TypedDict): + files: NotRequired["List[str]"] + """ + 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 ModifyPersonParamsDocumentsPassport(TypedDict): - files: NotRequired["List[str]"] - """ - 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 ModifyPersonParamsDocumentsPassport(TypedDict): + files: NotRequired["List[str]"] + """ + 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 ModifyPersonParamsDocumentsCompanyAuthorization(TypedDict): - files: NotRequired["List[str]"] - """ - 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 ModifyPersonParamsDocumentsCompanyAuthorization(TypedDict): + files: NotRequired["List[str]"] + """ + 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 ModifyPersonParamsDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ + class ModifyPersonParamsDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ - class ModifyPersonParamsAddressKanji(TypedDict): - city: NotRequired["str"] - """ - City or ward. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Block or building number. - """ - line2: NotRequired["str"] - """ - Building details. - """ - postal_code: NotRequired["str"] - """ - Postal code. - """ - state: NotRequired["str"] - """ - Prefecture. - """ - town: NotRequired["str"] - """ - Town or cho-me. - """ + class ModifyPersonParamsAddressKanji(TypedDict): + city: NotRequired["str"] + """ + City or ward. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Block or building number. + """ + line2: NotRequired["str"] + """ + Building details. + """ + postal_code: NotRequired["str"] + """ + Postal code. + """ + state: NotRequired["str"] + """ + Prefecture. + """ + town: NotRequired["str"] + """ + Town or cho-me. + """ - class ModifyPersonParamsAddressKana(TypedDict): - city: NotRequired["str"] - """ - City or ward. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Block or building number. - """ - line2: NotRequired["str"] - """ - Building details. - """ - postal_code: NotRequired["str"] - """ - Postal code. - """ - state: NotRequired["str"] - """ - Prefecture. - """ - town: NotRequired["str"] - """ - Town or cho-me. - """ + class ModifyPersonParamsAddressKana(TypedDict): + city: NotRequired["str"] + """ + City or ward. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Block or building number. + """ + line2: NotRequired["str"] + """ + Building details. + """ + postal_code: NotRequired["str"] + """ + Postal code. + """ + state: NotRequired["str"] + """ + Prefecture. + """ + town: NotRequired["str"] + """ + Town or cho-me. + """ - class ModifyPersonParamsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class ModifyPersonParamsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ModifyPersonParamsAdditionalTosAcceptances(TypedDict): - account: NotRequired[ - "Account.ModifyPersonParamsAdditionalTosAcceptancesAccount" - ] - """ - Details on the legal guardian's acceptance of the main Stripe service agreement. - """ + class ModifyPersonParamsAdditionalTosAcceptances(TypedDict): + account: NotRequired[ + "Account.ModifyPersonParamsAdditionalTosAcceptancesAccount" + ] + """ + Details on the legal guardian's acceptance of the main Stripe service agreement. + """ - class ModifyPersonParamsAdditionalTosAcceptancesAccount(TypedDict): - date: NotRequired["int"] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired["str"] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ + class ModifyPersonParamsAdditionalTosAcceptancesAccount(TypedDict): + date: NotRequired["int"] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ + ip: NotRequired["str"] + """ + The IP address from which the account representative accepted the service agreement. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ - class DeletePersonParams(RequestOptions): - pass + class DeletePersonParams(RequestOptions): + pass - class ListPersonsParams(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. - """ - relationship: NotRequired["Account.ListPersonsParamsRelationship"] - """ - Filters on the list of people returned based on the person's relationship to the account's company. - """ - 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 ListPersonsParams(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. + """ + relationship: NotRequired["Account.ListPersonsParamsRelationship"] + """ + Filters on the list of people returned based on the person's relationship to the account's company. + """ + 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 ListPersonsParamsRelationship(TypedDict): - director: NotRequired["bool"] - """ - A filter on the list of people returned based on whether these people are directors of the account's company. - """ - executive: NotRequired["bool"] - """ - A filter on the list of people returned based on whether these people are executives of the account's company. - """ - legal_guardian: NotRequired["bool"] - """ - A filter on the list of people returned based on whether these people are legal guardians of the account's representative. - """ - owner: NotRequired["bool"] - """ - A filter on the list of people returned based on whether these people are owners of the account's company. - """ - representative: NotRequired["bool"] - """ - A filter on the list of people returned based on whether these people are the representative of the account's company. - """ + class ListPersonsParamsRelationship(TypedDict): + director: NotRequired["bool"] + """ + A filter on the list of people returned based on whether these people are directors of the account's company. + """ + executive: NotRequired["bool"] + """ + A filter on the list of people returned based on whether these people are executives of the account's company. + """ + legal_guardian: NotRequired["bool"] + """ + A filter on the list of people returned based on whether these people are legal guardians of the account's representative. + """ + owner: NotRequired["bool"] + """ + A filter on the list of people returned based on whether these people are owners of the account's company. + """ + representative: NotRequired["bool"] + """ + A filter on the list of people returned based on whether these people are the representative of the account's company. + """ business_profile: Optional[BusinessProfile] """ @@ -3779,15 +3763,15 @@ def reject( # pyright: ignore[reportGeneralTypeIssues] # capabilities property which is a hash and not the sub-list of capabilities. @classmethod - def retrieve(cls, id=None, api_key=None, **params): + def retrieve(cls, id=None, api_key=None, **params) -> "Account": instance = cls(id, api_key, **params) instance.refresh() return instance @classmethod - def modify(cls, id=None, **params): + def modify(cls, id=None, **params) -> "Account": url = cls._build_instance_url(id) - return cls._static_request("post", url, params=params) + return cast("Account", cls._static_request("post", url, params=params)) @classmethod def _build_instance_url(cls, sid): diff --git a/stripe/api_resources/account_link.py b/stripe/api_resources/account_link.py index 6ff012f7b..d5d539981 100644 --- a/stripe/api_resources/account_link.py +++ b/stripe/api_resources/account_link.py @@ -3,7 +3,7 @@ from stripe.api_resources.abstract import CreateableAPIResource from stripe.request_options import RequestOptions from typing import ClassVar, List, Optional, cast -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing_extensions import Literal, NotRequired, Unpack class AccountLink(CreateableAPIResource["AccountLink"]): @@ -15,33 +15,32 @@ class AccountLink(CreateableAPIResource["AccountLink"]): """ OBJECT_NAME: ClassVar[Literal["account_link"]] = "account_link" - if TYPE_CHECKING: - class CreateParams(RequestOptions): - account: str - """ - The identifier of the account to create an account link for. - """ - collect: NotRequired["Literal['currently_due', 'eventually_due']"] - """ - Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - refresh_url: NotRequired["str"] - """ - The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user. - """ - return_url: NotRequired["str"] - """ - The URL that the user will be redirected to upon leaving or completing the linked flow. - """ - type: Literal["account_onboarding", "account_update"] - """ - The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`. - """ + class CreateParams(RequestOptions): + account: str + """ + The identifier of the account to create an account link for. + """ + collect: NotRequired["Literal['currently_due', 'eventually_due']"] + """ + Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + refresh_url: NotRequired["str"] + """ + The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user. + """ + return_url: NotRequired["str"] + """ + The URL that the user will be redirected to upon leaving or completing the linked flow. + """ + type: Literal["account_onboarding", "account_update"] + """ + The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`. + """ created: int """ diff --git a/stripe/api_resources/account_session.py b/stripe/api_resources/account_session.py index 3aec1dc8b..c30477101 100644 --- a/stripe/api_resources/account_session.py +++ b/stripe/api_resources/account_session.py @@ -4,13 +4,7 @@ from stripe.request_options import RequestOptions from stripe.stripe_object import StripeObject from typing import ClassVar, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, NotRequired, TypedDict, Unpack class AccountSession(CreateableAPIResource["AccountSession"]): @@ -36,35 +30,33 @@ class AccountOnboarding(StripeObject): account_onboarding: AccountOnboarding _inner_class_types = {"account_onboarding": AccountOnboarding} - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - account: str - """ - The identifier of the account to create an Account Session for. - """ - components: "AccountSession.CreateParamsComponents" - """ - Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class CreateParams(RequestOptions): + account: str + """ + The identifier of the account to create an Account Session for. + """ + components: "AccountSession.CreateParamsComponents" + """ + Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CreateParamsComponents(TypedDict): - account_onboarding: NotRequired[ - "AccountSession.CreateParamsComponentsAccountOnboarding" - ] - """ - Configuration for the account onboarding embedded component. - """ + class CreateParamsComponents(TypedDict): + account_onboarding: NotRequired[ + "AccountSession.CreateParamsComponentsAccountOnboarding" + ] + """ + Configuration for the account onboarding embedded component. + """ - class CreateParamsComponentsAccountOnboarding(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ + class CreateParamsComponentsAccountOnboarding(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ account: str """ diff --git a/stripe/api_resources/apple_pay_domain.py b/stripe/api_resources/apple_pay_domain.py index 881a1c134..74fea33b7 100644 --- a/stripe/api_resources/apple_pay_domain.py +++ b/stripe/api_resources/apple_pay_domain.py @@ -9,7 +9,7 @@ from stripe.request_options import RequestOptions from stripe.util import class_method_variant from typing import ClassVar, List, Optional, cast, overload -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing_extensions import Literal, NotRequired, Unpack from urllib.parse import quote_plus @@ -19,42 +19,41 @@ class ApplePayDomain( ListableAPIResource["ApplePayDomain"], ): OBJECT_NAME: ClassVar[Literal["apple_pay_domain"]] = "apple_pay_domain" - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - domain_name: str - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - - class DeleteParams(RequestOptions): - pass - - class ListParams(RequestOptions): - domain_name: NotRequired["str"] - 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. - """ + + class CreateParams(RequestOptions): + domain_name: str + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + + class DeleteParams(RequestOptions): + pass + + class ListParams(RequestOptions): + domain_name: NotRequired["str"] + 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 """ diff --git a/stripe/api_resources/application_fee.py b/stripe/api_resources/application_fee.py index 342c21926..a8341f73b 100644 --- a/stripe/api_resources/application_fee.py +++ b/stripe/api_resources/application_fee.py @@ -31,116 +31,115 @@ @nested_resource_class_methods("refund") class ApplicationFee(ListableAPIResource["ApplicationFee"]): OBJECT_NAME: ClassVar[Literal["application_fee"]] = "application_fee" - if TYPE_CHECKING: - - class ListParams(RequestOptions): - charge: NotRequired["str"] - """ - Only return application fees for the charge specified by this charge ID. - """ - created: NotRequired["ApplicationFee.ListParamsCreated|int"] - 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 ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ - - class RefundParams(RequestOptions): - amount: NotRequired["int"] - """ - A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. - """ - expand: NotRequired["List[str]"] - """ - 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`. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateRefundParams(RequestOptions): - amount: NotRequired["int"] - """ - A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. - """ - expand: NotRequired["List[str]"] - """ - 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`. - """ - - class RetrieveRefundParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - - class ModifyRefundParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - - class ListRefundsParams(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. - """ + + class ListParams(RequestOptions): + charge: NotRequired["str"] + """ + Only return application fees for the charge specified by this charge ID. + """ + created: NotRequired["ApplicationFee.ListParamsCreated|int"] + 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 ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ + + class RefundParams(RequestOptions): + amount: NotRequired["int"] + """ + A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. + """ + expand: NotRequired["List[str]"] + """ + 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`. + """ + + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + + class CreateRefundParams(RequestOptions): + amount: NotRequired["int"] + """ + A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. + """ + expand: NotRequired["List[str]"] + """ + 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`. + """ + + class RetrieveRefundParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + + class ModifyRefundParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + + class ListRefundsParams(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. + """ account: ExpandableField["Account"] """ diff --git a/stripe/api_resources/application_fee_refund.py b/stripe/api_resources/application_fee_refund.py index 75c90ce1a..2210d6636 100644 --- a/stripe/api_resources/application_fee_refund.py +++ b/stripe/api_resources/application_fee_refund.py @@ -3,7 +3,7 @@ from stripe.api_resources.abstract import UpdateableAPIResource from stripe.api_resources.application_fee import ApplicationFee from stripe.api_resources.expandable_field import ExpandableField -from typing import ClassVar, Dict, Optional +from typing import ClassVar, Dict, Optional, cast from typing_extensions import Literal, TYPE_CHECKING from urllib.parse import quote_plus @@ -62,15 +62,18 @@ def _build_instance_url(cls, fee, sid): return "%s/%s/refunds/%s" % (base, cust_extn, extn) @classmethod - def modify(cls, fee, sid, **params): + def modify(cls, fee, sid, **params) -> "ApplicationFeeRefund": url = cls._build_instance_url(fee, sid) - return cls._static_request("post", url, params=params) + return cast( + "ApplicationFeeRefund", + cls._static_request("post", url, params=params), + ) def instance_url(self): return self._build_instance_url(self.fee, self.id) @classmethod - def retrieve(cls, id, api_key=None, **params): + def retrieve(cls, id, api_key=None, **params) -> "ApplicationFeeRefund": raise NotImplementedError( "Can't retrieve a refund without an application fee ID. " "Use application_fee.refunds.retrieve('refund_id') instead." diff --git a/stripe/api_resources/apps/secret.py b/stripe/api_resources/apps/secret.py index d3ada0668..71c13cc4e 100644 --- a/stripe/api_resources/apps/secret.py +++ b/stripe/api_resources/apps/secret.py @@ -8,13 +8,7 @@ from stripe.request_options import RequestOptions from stripe.stripe_object import StripeObject from typing import ClassVar, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, NotRequired, TypedDict, Unpack class Secret(CreateableAPIResource["Secret"], ListableAPIResource["Secret"]): @@ -42,119 +36,117 @@ class Scope(StripeObject): The user ID, if type is set to "user" """ - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired["int"] - """ - The Unix timestamp for the expiry time of the secret, after which the secret deletes. - """ - name: str - """ - A name for the secret that's unique within the scope. - """ - payload: str - """ - The plaintext secret value to be stored. - """ - scope: "Secret.CreateParamsScope" - """ - Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. - """ + class CreateParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["int"] + """ + The Unix timestamp for the expiry time of the secret, after which the secret deletes. + """ + name: str + """ + A name for the secret that's unique within the scope. + """ + payload: str + """ + The plaintext secret value to be stored. + """ + scope: "Secret.CreateParamsScope" + """ + Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + """ - class CreateParamsScope(TypedDict): - type: Literal["account", "user"] - """ - The secret scope type. - """ - user: NotRequired["str"] - """ - The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. - """ + class CreateParamsScope(TypedDict): + type: Literal["account", "user"] + """ + The secret scope type. + """ + user: NotRequired["str"] + """ + The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + """ - class DeleteWhereParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - name: str - """ - A name for the secret that's unique within the scope. - """ - scope: "Secret.DeleteWhereParamsScope" - """ - Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. - """ + class DeleteWhereParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + name: str + """ + A name for the secret that's unique within the scope. + """ + scope: "Secret.DeleteWhereParamsScope" + """ + Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + """ - class DeleteWhereParamsScope(TypedDict): - type: Literal["account", "user"] - """ - The secret scope type. - """ - user: NotRequired["str"] - """ - The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. - """ + class DeleteWhereParamsScope(TypedDict): + type: Literal["account", "user"] + """ + The secret scope type. + """ + user: NotRequired["str"] + """ + The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + """ - class FindParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - name: str - """ - A name for the secret that's unique within the scope. - """ - scope: "Secret.FindParamsScope" - """ - Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. - """ + class FindParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + name: str + """ + A name for the secret that's unique within the scope. + """ + scope: "Secret.FindParamsScope" + """ + Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + """ - class FindParamsScope(TypedDict): - type: Literal["account", "user"] - """ - The secret scope type. - """ - user: NotRequired["str"] - """ - The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. - """ + class FindParamsScope(TypedDict): + type: Literal["account", "user"] + """ + The secret scope type. + """ + user: NotRequired["str"] + """ + The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + """ - 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. - """ - scope: "Secret.ListParamsScope" - """ - Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. - """ - 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 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. + """ + scope: "Secret.ListParamsScope" + """ + Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + """ + 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 ListParamsScope(TypedDict): - type: Literal["account", "user"] - """ - The secret scope type. - """ - user: NotRequired["str"] - """ - The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. - """ + class ListParamsScope(TypedDict): + type: Literal["account", "user"] + """ + The secret scope type. + """ + user: NotRequired["str"] + """ + The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + """ created: int """ diff --git a/stripe/api_resources/balance.py b/stripe/api_resources/balance.py index 0d6c217e7..6e398042e 100644 --- a/stripe/api_resources/balance.py +++ b/stripe/api_resources/balance.py @@ -4,7 +4,7 @@ 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 +from typing_extensions import Literal, NotRequired, Unpack class Balance(SingletonAPIResource["Balance"]): @@ -161,13 +161,11 @@ class SourceTypes(StripeObject): source_types: Optional[SourceTypes] _inner_class_types = {"source_types": SourceTypes} - if TYPE_CHECKING: - - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ available: List[Available] """ diff --git a/stripe/api_resources/balance_transaction.py b/stripe/api_resources/balance_transaction.py index a31ab3872..8c141ac96 100644 --- a/stripe/api_resources/balance_transaction.py +++ b/stripe/api_resources/balance_transaction.py @@ -76,66 +76,64 @@ class FeeDetail(StripeObject): Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`. """ - if TYPE_CHECKING: - - class ListParams(RequestOptions): - created: NotRequired["BalanceTransaction.ListParamsCreated|int"] - currency: NotRequired["str"] - """ - Only return transactions in a certain currency. 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). - """ - 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. - """ - payout: NotRequired["str"] - """ - For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. - """ - source: NotRequired["str"] - """ - Only returns the original transaction. - """ - 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. - """ - type: NotRequired["str"] - """ - Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. - """ + class ListParams(RequestOptions): + created: NotRequired["BalanceTransaction.ListParamsCreated|int"] + currency: NotRequired["str"] + """ + Only return transactions in a certain currency. 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). + """ + 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. + """ + payout: NotRequired["str"] + """ + For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. + """ + source: NotRequired["str"] + """ + Only returns the original transaction. + """ + 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. + """ + type: NotRequired["str"] + """ + Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ amount: int """ diff --git a/stripe/api_resources/bank_account.py b/stripe/api_resources/bank_account.py index 20318cdee..8fe8b9df0 100644 --- a/stripe/api_resources/bank_account.py +++ b/stripe/api_resources/bank_account.py @@ -279,10 +279,8 @@ class Error(StripeObject): """ _inner_class_types = {"errors": Error} - if TYPE_CHECKING: - - class DeleteParams(RequestOptions): - pass + class DeleteParams(RequestOptions): + pass account: Optional[ExpandableField["Account"]] """ diff --git a/stripe/api_resources/billing_portal/configuration.py b/stripe/api_resources/billing_portal/configuration.py index e3dab9d8c..a51989e2c 100644 --- a/stripe/api_resources/billing_portal/configuration.py +++ b/stripe/api_resources/billing_portal/configuration.py @@ -182,431 +182,424 @@ class LoginPage(StripeObject): A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. """ - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - business_profile: "Configuration.CreateParamsBusinessProfile" - """ - The business information shown to customers in the portal. - """ - default_return_url: NotRequired["Literal['']|str"] - """ - The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - features: "Configuration.CreateParamsFeatures" - """ - Information about the features available in the portal. - """ - login_page: NotRequired["Configuration.CreateParamsLoginPage"] - """ - The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). - """ - 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`. - """ + class CreateParams(RequestOptions): + business_profile: "Configuration.CreateParamsBusinessProfile" + """ + The business information shown to customers in the portal. + """ + default_return_url: NotRequired["Literal['']|str"] + """ + The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + features: "Configuration.CreateParamsFeatures" + """ + Information about the features available in the portal. + """ + login_page: NotRequired["Configuration.CreateParamsLoginPage"] + """ + The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + """ + 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`. + """ - class CreateParamsLoginPage(TypedDict): - enabled: bool - """ - Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. - """ + class CreateParamsLoginPage(TypedDict): + enabled: bool + """ + Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. + """ - class CreateParamsFeatures(TypedDict): - customer_update: NotRequired[ - "Configuration.CreateParamsFeaturesCustomerUpdate" - ] - """ - Information about updating the customer details in the portal. - """ - invoice_history: NotRequired[ - "Configuration.CreateParamsFeaturesInvoiceHistory" - ] - """ - Information about showing the billing history in the portal. - """ - payment_method_update: NotRequired[ - "Configuration.CreateParamsFeaturesPaymentMethodUpdate" - ] - """ - Information about updating payment methods in the portal. - """ - subscription_cancel: NotRequired[ - "Configuration.CreateParamsFeaturesSubscriptionCancel" - ] - """ - Information about canceling subscriptions in the portal. - """ - subscription_pause: NotRequired[ - "Configuration.CreateParamsFeaturesSubscriptionPause" - ] - """ - Information about pausing subscriptions in the portal. - """ - subscription_update: NotRequired[ - "Configuration.CreateParamsFeaturesSubscriptionUpdate" - ] - """ - Information about updating subscriptions in the portal. - """ + class CreateParamsFeatures(TypedDict): + customer_update: NotRequired[ + "Configuration.CreateParamsFeaturesCustomerUpdate" + ] + """ + Information about updating the customer details in the portal. + """ + invoice_history: NotRequired[ + "Configuration.CreateParamsFeaturesInvoiceHistory" + ] + """ + Information about showing the billing history in the portal. + """ + payment_method_update: NotRequired[ + "Configuration.CreateParamsFeaturesPaymentMethodUpdate" + ] + """ + Information about updating payment methods in the portal. + """ + subscription_cancel: NotRequired[ + "Configuration.CreateParamsFeaturesSubscriptionCancel" + ] + """ + Information about canceling subscriptions in the portal. + """ + subscription_pause: NotRequired[ + "Configuration.CreateParamsFeaturesSubscriptionPause" + ] + """ + Information about pausing subscriptions in the portal. + """ + subscription_update: NotRequired[ + "Configuration.CreateParamsFeaturesSubscriptionUpdate" + ] + """ + Information about updating subscriptions in the portal. + """ - class CreateParamsFeaturesSubscriptionUpdate(TypedDict): - default_allowed_updates: Union[ - Literal[""], - List[Literal["price", "promotion_code", "quantity"]], - ] - """ - The types of subscription updates that are supported. When empty, subscriptions are not updateable. - """ - enabled: bool - """ - Whether the feature is enabled. - """ - products: Union[ - Literal[""], - List[ - "Configuration.CreateParamsFeaturesSubscriptionUpdateProduct" - ], - ] - """ - The list of up to 10 products that support subscription updates. - """ - proration_behavior: NotRequired[ - "Literal['always_invoice', 'create_prorations', 'none']" - ] - """ - Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. - """ + class CreateParamsFeaturesSubscriptionUpdate(TypedDict): + default_allowed_updates: Union[ + Literal[""], List[Literal["price", "promotion_code", "quantity"]] + ] + """ + The types of subscription updates that are supported. When empty, subscriptions are not updateable. + """ + enabled: bool + """ + Whether the feature is enabled. + """ + products: Union[ + Literal[""], + List[ + "Configuration.CreateParamsFeaturesSubscriptionUpdateProduct" + ], + ] + """ + The list of up to 10 products that support subscription updates. + """ + proration_behavior: NotRequired[ + "Literal['always_invoice', 'create_prorations', 'none']" + ] + """ + Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + """ - class CreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): - prices: List[str] - """ - The list of price IDs for the product that a subscription can be updated to. - """ - product: str - """ - The product id. - """ + class CreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): + prices: List[str] + """ + The list of price IDs for the product that a subscription can be updated to. + """ + product: str + """ + The product id. + """ - class CreateParamsFeaturesSubscriptionPause(TypedDict): - enabled: NotRequired["bool"] - """ - Whether the feature is enabled. - """ + class CreateParamsFeaturesSubscriptionPause(TypedDict): + enabled: NotRequired["bool"] + """ + Whether the feature is enabled. + """ - class CreateParamsFeaturesSubscriptionCancel(TypedDict): - cancellation_reason: NotRequired[ - "Configuration.CreateParamsFeaturesSubscriptionCancelCancellationReason" - ] - """ - Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer - """ - enabled: bool - """ - Whether the feature is enabled. - """ - mode: NotRequired["Literal['at_period_end', 'immediately']"] - """ - Whether to cancel subscriptions immediately or at the end of the billing period. - """ - proration_behavior: NotRequired[ - "Literal['always_invoice', 'create_prorations', 'none']" - ] - """ - Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period. - """ + class CreateParamsFeaturesSubscriptionCancel(TypedDict): + cancellation_reason: NotRequired[ + "Configuration.CreateParamsFeaturesSubscriptionCancelCancellationReason" + ] + """ + Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer + """ + enabled: bool + """ + Whether the feature is enabled. + """ + mode: NotRequired["Literal['at_period_end', 'immediately']"] + """ + Whether to cancel subscriptions immediately or at the end of the billing period. + """ + proration_behavior: NotRequired[ + "Literal['always_invoice', 'create_prorations', 'none']" + ] + """ + Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period. + """ - class CreateParamsFeaturesSubscriptionCancelCancellationReason( - TypedDict, - ): - enabled: bool - """ - Whether the feature is enabled. - """ - options: Union[ - Literal[""], - List[ - Literal[ - "customer_service", - "low_quality", - "missing_features", - "other", - "switched_service", - "too_complex", - "too_expensive", - "unused", - ] - ], - ] - """ - Which cancellation reasons will be given as options to the customer. - """ + class CreateParamsFeaturesSubscriptionCancelCancellationReason(TypedDict): + enabled: bool + """ + Whether the feature is enabled. + """ + options: Union[ + Literal[""], + List[ + Literal[ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused", + ] + ], + ] + """ + Which cancellation reasons will be given as options to the customer. + """ - class CreateParamsFeaturesPaymentMethodUpdate(TypedDict): - enabled: bool - """ - Whether the feature is enabled. - """ + class CreateParamsFeaturesPaymentMethodUpdate(TypedDict): + enabled: bool + """ + Whether the feature is enabled. + """ - class CreateParamsFeaturesInvoiceHistory(TypedDict): - enabled: bool - """ - Whether the feature is enabled. - """ + class CreateParamsFeaturesInvoiceHistory(TypedDict): + enabled: bool + """ + Whether the feature is enabled. + """ - class CreateParamsFeaturesCustomerUpdate(TypedDict): - allowed_updates: NotRequired[ - "Literal['']|List[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id']]" - ] - """ - The types of customer updates that are supported. When empty, customers are not updateable. - """ - enabled: bool - """ - Whether the feature is enabled. - """ + class CreateParamsFeaturesCustomerUpdate(TypedDict): + allowed_updates: NotRequired[ + "Literal['']|List[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id']]" + ] + """ + The types of customer updates that are supported. When empty, customers are not updateable. + """ + enabled: bool + """ + Whether the feature is enabled. + """ - class CreateParamsBusinessProfile(TypedDict): - headline: NotRequired["Literal['']|str"] - """ - The messaging shown to customers in the portal. - """ - privacy_policy_url: NotRequired["str"] - """ - A link to the business's publicly available privacy policy. - """ - terms_of_service_url: NotRequired["str"] - """ - A link to the business's publicly available terms of service. - """ + class CreateParamsBusinessProfile(TypedDict): + headline: NotRequired["Literal['']|str"] + """ + The messaging shown to customers in the portal. + """ + privacy_policy_url: NotRequired["str"] + """ + A link to the business's publicly available privacy policy. + """ + terms_of_service_url: NotRequired["str"] + """ + A link to the business's publicly available terms of service. + """ - class ListParams(RequestOptions): - active: NotRequired["bool"] - """ - Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations). - """ - 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. - """ - is_default: NotRequired["bool"] - """ - Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration). - """ - 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 ListParams(RequestOptions): + active: NotRequired["bool"] + """ + Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations). + """ + 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. + """ + is_default: NotRequired["bool"] + """ + Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration). + """ + 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): - active: NotRequired["bool"] - """ - Whether the configuration is active and can be used to create portal sessions. - """ - business_profile: NotRequired[ - "Configuration.ModifyParamsBusinessProfile" - ] - """ - The business information shown to customers in the portal. - """ - default_return_url: NotRequired["Literal['']|str"] - """ - The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - features: NotRequired["Configuration.ModifyParamsFeatures"] - """ - Information about the features available in the portal. - """ - login_page: NotRequired["Configuration.ModifyParamsLoginPage"] - """ - The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). - """ - metadata: NotRequired["Literal['']|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`. - """ + class ModifyParams(RequestOptions): + active: NotRequired["bool"] + """ + Whether the configuration is active and can be used to create portal sessions. + """ + business_profile: NotRequired[ + "Configuration.ModifyParamsBusinessProfile" + ] + """ + The business information shown to customers in the portal. + """ + default_return_url: NotRequired["Literal['']|str"] + """ + The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + features: NotRequired["Configuration.ModifyParamsFeatures"] + """ + Information about the features available in the portal. + """ + login_page: NotRequired["Configuration.ModifyParamsLoginPage"] + """ + The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + """ + metadata: NotRequired["Literal['']|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`. + """ - class ModifyParamsLoginPage(TypedDict): - enabled: bool - """ - Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. + class ModifyParamsLoginPage(TypedDict): + enabled: bool + """ + Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. - Set to `false` to deactivate the `login_page.url`. - """ + Set to `false` to deactivate the `login_page.url`. + """ - class ModifyParamsFeatures(TypedDict): - customer_update: NotRequired[ - "Configuration.ModifyParamsFeaturesCustomerUpdate" - ] - """ - Information about updating the customer details in the portal. - """ - invoice_history: NotRequired[ - "Configuration.ModifyParamsFeaturesInvoiceHistory" - ] - """ - Information about showing the billing history in the portal. - """ - payment_method_update: NotRequired[ - "Configuration.ModifyParamsFeaturesPaymentMethodUpdate" - ] - """ - Information about updating payment methods in the portal. - """ - subscription_cancel: NotRequired[ - "Configuration.ModifyParamsFeaturesSubscriptionCancel" - ] - """ - Information about canceling subscriptions in the portal. - """ - subscription_pause: NotRequired[ - "Configuration.ModifyParamsFeaturesSubscriptionPause" - ] - """ - Information about pausing subscriptions in the portal. - """ - subscription_update: NotRequired[ - "Configuration.ModifyParamsFeaturesSubscriptionUpdate" - ] - """ - Information about updating subscriptions in the portal. - """ + class ModifyParamsFeatures(TypedDict): + customer_update: NotRequired[ + "Configuration.ModifyParamsFeaturesCustomerUpdate" + ] + """ + Information about updating the customer details in the portal. + """ + invoice_history: NotRequired[ + "Configuration.ModifyParamsFeaturesInvoiceHistory" + ] + """ + Information about showing the billing history in the portal. + """ + payment_method_update: NotRequired[ + "Configuration.ModifyParamsFeaturesPaymentMethodUpdate" + ] + """ + Information about updating payment methods in the portal. + """ + subscription_cancel: NotRequired[ + "Configuration.ModifyParamsFeaturesSubscriptionCancel" + ] + """ + Information about canceling subscriptions in the portal. + """ + subscription_pause: NotRequired[ + "Configuration.ModifyParamsFeaturesSubscriptionPause" + ] + """ + Information about pausing subscriptions in the portal. + """ + subscription_update: NotRequired[ + "Configuration.ModifyParamsFeaturesSubscriptionUpdate" + ] + """ + Information about updating subscriptions in the portal. + """ - class ModifyParamsFeaturesSubscriptionUpdate(TypedDict): - 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. - """ - enabled: NotRequired["bool"] - """ - Whether the feature is enabled. - """ - products: NotRequired[ - "Literal['']|List[Configuration.ModifyParamsFeaturesSubscriptionUpdateProduct]" - ] - """ - The list of up to 10 products that support subscription updates. - """ - proration_behavior: NotRequired[ - "Literal['always_invoice', 'create_prorations', 'none']" - ] - """ - Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. - """ + class ModifyParamsFeaturesSubscriptionUpdate(TypedDict): + 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. + """ + enabled: NotRequired["bool"] + """ + Whether the feature is enabled. + """ + products: NotRequired[ + "Literal['']|List[Configuration.ModifyParamsFeaturesSubscriptionUpdateProduct]" + ] + """ + The list of up to 10 products that support subscription updates. + """ + proration_behavior: NotRequired[ + "Literal['always_invoice', 'create_prorations', 'none']" + ] + """ + Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + """ - class ModifyParamsFeaturesSubscriptionUpdateProduct(TypedDict): - prices: List[str] - """ - The list of price IDs for the product that a subscription can be updated to. - """ - product: str - """ - The product id. - """ + class ModifyParamsFeaturesSubscriptionUpdateProduct(TypedDict): + prices: List[str] + """ + The list of price IDs for the product that a subscription can be updated to. + """ + product: str + """ + The product id. + """ - class ModifyParamsFeaturesSubscriptionPause(TypedDict): - enabled: NotRequired["bool"] - """ - Whether the feature is enabled. - """ + class ModifyParamsFeaturesSubscriptionPause(TypedDict): + enabled: NotRequired["bool"] + """ + Whether the feature is enabled. + """ - class ModifyParamsFeaturesSubscriptionCancel(TypedDict): - cancellation_reason: NotRequired[ - "Configuration.ModifyParamsFeaturesSubscriptionCancelCancellationReason" - ] - """ - Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer - """ - enabled: NotRequired["bool"] - """ - Whether the feature is enabled. - """ - mode: NotRequired["Literal['at_period_end', 'immediately']"] - """ - Whether to cancel subscriptions immediately or at the end of the billing period. - """ - proration_behavior: NotRequired[ - "Literal['always_invoice', 'create_prorations', 'none']" - ] - """ - Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period. - """ + class ModifyParamsFeaturesSubscriptionCancel(TypedDict): + cancellation_reason: NotRequired[ + "Configuration.ModifyParamsFeaturesSubscriptionCancelCancellationReason" + ] + """ + Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer + """ + enabled: NotRequired["bool"] + """ + Whether the feature is enabled. + """ + mode: NotRequired["Literal['at_period_end', 'immediately']"] + """ + Whether to cancel subscriptions immediately or at the end of the billing period. + """ + proration_behavior: NotRequired[ + "Literal['always_invoice', 'create_prorations', 'none']" + ] + """ + Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period. + """ - class ModifyParamsFeaturesSubscriptionCancelCancellationReason( - TypedDict, - ): - enabled: bool - """ - Whether the feature is enabled. - """ - options: NotRequired[ - "Literal['']|List[Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']]" - ] - """ - Which cancellation reasons will be given as options to the customer. - """ + class ModifyParamsFeaturesSubscriptionCancelCancellationReason(TypedDict): + enabled: bool + """ + Whether the feature is enabled. + """ + options: NotRequired[ + "Literal['']|List[Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']]" + ] + """ + Which cancellation reasons will be given as options to the customer. + """ - class ModifyParamsFeaturesPaymentMethodUpdate(TypedDict): - enabled: bool - """ - Whether the feature is enabled. - """ + class ModifyParamsFeaturesPaymentMethodUpdate(TypedDict): + enabled: bool + """ + Whether the feature is enabled. + """ - class ModifyParamsFeaturesInvoiceHistory(TypedDict): - enabled: bool - """ - Whether the feature is enabled. - """ + class ModifyParamsFeaturesInvoiceHistory(TypedDict): + enabled: bool + """ + Whether the feature is enabled. + """ - class ModifyParamsFeaturesCustomerUpdate(TypedDict): - allowed_updates: NotRequired[ - "Literal['']|List[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id']]" - ] - """ - The types of customer updates that are supported. When empty, customers are not updateable. - """ - enabled: NotRequired["bool"] - """ - Whether the feature is enabled. - """ + class ModifyParamsFeaturesCustomerUpdate(TypedDict): + allowed_updates: NotRequired[ + "Literal['']|List[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id']]" + ] + """ + The types of customer updates that are supported. When empty, customers are not updateable. + """ + enabled: NotRequired["bool"] + """ + Whether the feature is enabled. + """ - class ModifyParamsBusinessProfile(TypedDict): - headline: NotRequired["Literal['']|str"] - """ - The messaging shown to customers in the portal. - """ - privacy_policy_url: NotRequired["Literal['']|str"] - """ - A link to the business's publicly available privacy policy. - """ - terms_of_service_url: NotRequired["Literal['']|str"] - """ - A link to the business's publicly available terms of service. - """ + class ModifyParamsBusinessProfile(TypedDict): + headline: NotRequired["Literal['']|str"] + """ + The messaging shown to customers in the portal. + """ + privacy_policy_url: NotRequired["Literal['']|str"] + """ + A link to the business's publicly available privacy policy. + """ + terms_of_service_url: NotRequired["Literal['']|str"] + """ + A link to the business's publicly available terms of service. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ active: bool """ diff --git a/stripe/api_resources/billing_portal/session.py b/stripe/api_resources/billing_portal/session.py index 46c6d9942..43b601c61 100644 --- a/stripe/api_resources/billing_portal/session.py +++ b/stripe/api_resources/billing_portal/session.py @@ -172,182 +172,180 @@ class Item(StripeObject): "subscription_update_confirm": SubscriptionUpdateConfirm, } - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - configuration: NotRequired["str"] - """ - The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. - """ - customer: str - """ - The ID of an existing customer. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - flow_data: NotRequired["Session.CreateParamsFlowData"] - """ - Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. - """ - locale: NotRequired[ - "Literal['auto', 'bg', 'cs', 'da', 'de', 'el', 'en', 'en-AU', 'en-CA', 'en-GB', 'en-IE', 'en-IN', 'en-NZ', 'en-SG', 'es', 'es-419', 'et', 'fi', 'fil', 'fr', 'fr-CA', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'lt', 'lv', 'ms', 'mt', 'nb', 'nl', 'pl', 'pt', 'pt-BR', 'ro', 'ru', 'sk', 'sl', 'sv', 'th', 'tr', 'vi', 'zh', 'zh-HK', 'zh-TW']" - ] - """ - The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used. - """ - on_behalf_of: NotRequired["str"] - """ - The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. - """ - return_url: NotRequired["str"] - """ - The default URL to redirect customers to when they click on the portal's link to return to your website. - """ + class CreateParams(RequestOptions): + configuration: NotRequired["str"] + """ + The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. + """ + customer: str + """ + The ID of an existing customer. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + flow_data: NotRequired["Session.CreateParamsFlowData"] + """ + Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. + """ + locale: NotRequired[ + "Literal['auto', 'bg', 'cs', 'da', 'de', 'el', 'en', 'en-AU', 'en-CA', 'en-GB', 'en-IE', 'en-IN', 'en-NZ', 'en-SG', 'es', 'es-419', 'et', 'fi', 'fil', 'fr', 'fr-CA', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'lt', 'lv', 'ms', 'mt', 'nb', 'nl', 'pl', 'pt', 'pt-BR', 'ro', 'ru', 'sk', 'sl', 'sv', 'th', 'tr', 'vi', 'zh', 'zh-HK', 'zh-TW']" + ] + """ + The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used. + """ + on_behalf_of: NotRequired["str"] + """ + The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. + """ + return_url: NotRequired["str"] + """ + The default URL to redirect customers to when they click on the portal's link to return to your website. + """ - class CreateParamsFlowData(TypedDict): - after_completion: NotRequired[ - "Session.CreateParamsFlowDataAfterCompletion" - ] - """ - Behavior after the flow is completed. - """ - subscription_cancel: NotRequired[ - "Session.CreateParamsFlowDataSubscriptionCancel" - ] - """ - Configuration when `flow_data.type=subscription_cancel`. - """ - subscription_update: NotRequired[ - "Session.CreateParamsFlowDataSubscriptionUpdate" - ] - """ - Configuration when `flow_data.type=subscription_update`. - """ - subscription_update_confirm: NotRequired[ - "Session.CreateParamsFlowDataSubscriptionUpdateConfirm" - ] - """ - Configuration when `flow_data.type=subscription_update_confirm`. - """ - type: Literal[ - "payment_method_update", - "subscription_cancel", - "subscription_update", - "subscription_update_confirm", - ] - """ - Type of flow that the customer will go through. - """ + class CreateParamsFlowData(TypedDict): + after_completion: NotRequired[ + "Session.CreateParamsFlowDataAfterCompletion" + ] + """ + Behavior after the flow is completed. + """ + subscription_cancel: NotRequired[ + "Session.CreateParamsFlowDataSubscriptionCancel" + ] + """ + Configuration when `flow_data.type=subscription_cancel`. + """ + subscription_update: NotRequired[ + "Session.CreateParamsFlowDataSubscriptionUpdate" + ] + """ + Configuration when `flow_data.type=subscription_update`. + """ + subscription_update_confirm: NotRequired[ + "Session.CreateParamsFlowDataSubscriptionUpdateConfirm" + ] + """ + Configuration when `flow_data.type=subscription_update_confirm`. + """ + type: Literal[ + "payment_method_update", + "subscription_cancel", + "subscription_update", + "subscription_update_confirm", + ] + """ + Type of flow that the customer will go through. + """ - class CreateParamsFlowDataSubscriptionUpdateConfirm(TypedDict): - discounts: NotRequired[ - "List[Session.CreateParamsFlowDataSubscriptionUpdateConfirmDiscount]" - ] - """ - The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. - """ - items: List[ - "Session.CreateParamsFlowDataSubscriptionUpdateConfirmItem" - ] - """ - The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. - """ - subscription: str - """ - The ID of the subscription to be updated. - """ + class CreateParamsFlowDataSubscriptionUpdateConfirm(TypedDict): + discounts: NotRequired[ + "List[Session.CreateParamsFlowDataSubscriptionUpdateConfirmDiscount]" + ] + """ + The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. + """ + items: List[ + "Session.CreateParamsFlowDataSubscriptionUpdateConfirmItem" + ] + """ + The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. + """ + subscription: str + """ + The ID of the subscription to be updated. + """ - class CreateParamsFlowDataSubscriptionUpdateConfirmItem(TypedDict): - id: str - """ - The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. - """ - price: NotRequired["str"] - """ - The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). - """ - quantity: NotRequired["int"] - """ - [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. - """ + class CreateParamsFlowDataSubscriptionUpdateConfirmItem(TypedDict): + id: str + """ + The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. + """ + price: NotRequired["str"] + """ + The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). + """ + quantity: NotRequired["int"] + """ + [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. + """ - class CreateParamsFlowDataSubscriptionUpdateConfirmDiscount(TypedDict): - coupon: NotRequired["str"] - """ - The ID of the coupon to apply to this subscription update. - """ - promotion_code: NotRequired["str"] - """ - The ID of a promotion code to apply to this subscription update. - """ + class CreateParamsFlowDataSubscriptionUpdateConfirmDiscount(TypedDict): + coupon: NotRequired["str"] + """ + The ID of the coupon to apply to this subscription update. + """ + promotion_code: NotRequired["str"] + """ + The ID of a promotion code to apply to this subscription update. + """ - class CreateParamsFlowDataSubscriptionUpdate(TypedDict): - subscription: str - """ - The ID of the subscription to be updated. - """ + class CreateParamsFlowDataSubscriptionUpdate(TypedDict): + subscription: str + """ + The ID of the subscription to be updated. + """ - class CreateParamsFlowDataSubscriptionCancel(TypedDict): - retention: NotRequired[ - "Session.CreateParamsFlowDataSubscriptionCancelRetention" - ] - """ - Specify a retention strategy to be used in the cancellation flow. - """ - subscription: str - """ - The ID of the subscription to be canceled. - """ + class CreateParamsFlowDataSubscriptionCancel(TypedDict): + retention: NotRequired[ + "Session.CreateParamsFlowDataSubscriptionCancelRetention" + ] + """ + Specify a retention strategy to be used in the cancellation flow. + """ + subscription: str + """ + The ID of the subscription to be canceled. + """ - class CreateParamsFlowDataSubscriptionCancelRetention(TypedDict): - coupon_offer: "Session.CreateParamsFlowDataSubscriptionCancelRetentionCouponOffer" - """ - Configuration when `retention.type=coupon_offer`. - """ - type: Literal["coupon_offer"] - """ - Type of retention strategy to use with the customer. - """ + class CreateParamsFlowDataSubscriptionCancelRetention(TypedDict): + coupon_offer: "Session.CreateParamsFlowDataSubscriptionCancelRetentionCouponOffer" + """ + Configuration when `retention.type=coupon_offer`. + """ + type: Literal["coupon_offer"] + """ + Type of retention strategy to use with the customer. + """ - class CreateParamsFlowDataSubscriptionCancelRetentionCouponOffer( - TypedDict, - ): - coupon: str - """ - The ID of the coupon to be offered. - """ + class CreateParamsFlowDataSubscriptionCancelRetentionCouponOffer( + TypedDict + ): + coupon: str + """ + The ID of the coupon to be offered. + """ - class CreateParamsFlowDataAfterCompletion(TypedDict): - hosted_confirmation: NotRequired[ - "Session.CreateParamsFlowDataAfterCompletionHostedConfirmation" - ] - """ - Configuration when `after_completion.type=hosted_confirmation`. - """ - redirect: NotRequired[ - "Session.CreateParamsFlowDataAfterCompletionRedirect" - ] - """ - Configuration when `after_completion.type=redirect`. - """ - type: Literal["hosted_confirmation", "portal_homepage", "redirect"] - """ - The specified behavior after the flow is completed. - """ + class CreateParamsFlowDataAfterCompletion(TypedDict): + hosted_confirmation: NotRequired[ + "Session.CreateParamsFlowDataAfterCompletionHostedConfirmation" + ] + """ + Configuration when `after_completion.type=hosted_confirmation`. + """ + redirect: NotRequired[ + "Session.CreateParamsFlowDataAfterCompletionRedirect" + ] + """ + Configuration when `after_completion.type=redirect`. + """ + type: Literal["hosted_confirmation", "portal_homepage", "redirect"] + """ + The specified behavior after the flow is completed. + """ - class CreateParamsFlowDataAfterCompletionRedirect(TypedDict): - return_url: str - """ - The URL the customer will be redirected to after the flow is completed. - """ + class CreateParamsFlowDataAfterCompletionRedirect(TypedDict): + return_url: str + """ + The URL the customer will be redirected to after the flow is completed. + """ - class CreateParamsFlowDataAfterCompletionHostedConfirmation(TypedDict): - custom_message: NotRequired["str"] - """ - A custom message to display to the customer after the flow is completed. - """ + class CreateParamsFlowDataAfterCompletionHostedConfirmation(TypedDict): + custom_message: NotRequired["str"] + """ + A custom message to display to the customer after the flow is completed. + """ configuration: ExpandableField["Configuration"] """ diff --git a/stripe/api_resources/card.py b/stripe/api_resources/card.py index dd021958c..98923e644 100644 --- a/stripe/api_resources/card.py +++ b/stripe/api_resources/card.py @@ -28,10 +28,9 @@ class Card(DeletableAPIResource["Card"], UpdateableAPIResource["Card"]): """ OBJECT_NAME: ClassVar[Literal["card"]] = "card" - if TYPE_CHECKING: - class DeleteParams(RequestOptions): - pass + class DeleteParams(RequestOptions): + pass account: Optional[ExpandableField["Account"]] """ diff --git a/stripe/api_resources/charge.py b/stripe/api_resources/charge.py index a0795a066..89aab1953 100644 --- a/stripe/api_resources/charge.py +++ b/stripe/api_resources/charge.py @@ -678,6 +678,10 @@ class ShippingAddress(StripeObject): """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ + capture_before: Optional[int] + """ + When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. + """ checks: Optional[Checks] """ Check results by Card networks on Card address and CVC at time of payment. @@ -1635,358 +1639,356 @@ class TransferData(StripeObject): ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. """ - if TYPE_CHECKING: - - class CaptureParams(RequestOptions): - amount: NotRequired["int"] - """ - The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. - """ - application_fee: NotRequired["int"] - """ - An application fee to add on to this charge. - """ - application_fee_amount: NotRequired["int"] - """ - An application fee amount to add on to this charge, which must be less than or equal to the original amount. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - receipt_email: NotRequired["str"] - """ - The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. - """ - 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. - """ - 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. - """ - transfer_data: NotRequired["Charge.CaptureParamsTransferData"] - """ - An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. - """ - transfer_group: NotRequired["str"] - """ - A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. - """ + class CaptureParams(RequestOptions): + amount: NotRequired["int"] + """ + The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. + """ + application_fee: NotRequired["int"] + """ + An application fee to add on to this charge. + """ + application_fee_amount: NotRequired["int"] + """ + An application fee amount to add on to this charge, which must be less than or equal to the original amount. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + receipt_email: NotRequired["str"] + """ + The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. + """ + 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. + """ + 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. + """ + transfer_data: NotRequired["Charge.CaptureParamsTransferData"] + """ + An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + """ + transfer_group: NotRequired["str"] + """ + A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + """ - class CaptureParamsTransferData(TypedDict): - amount: NotRequired["int"] - """ - The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. - """ + class CaptureParamsTransferData(TypedDict): + amount: NotRequired["int"] + """ + The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + """ - class CreateParams(RequestOptions): - amount: NotRequired["int"] - """ - Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - """ - application_fee: NotRequired["int"] - application_fee_amount: NotRequired["int"] - """ - A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). - """ - capture: NotRequired["bool"] - """ - Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. - """ - currency: NotRequired["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). - """ - customer: NotRequired["str"] - """ - The ID of an existing customer that will be charged in this request. - """ - description: NotRequired["str"] - """ - An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. - """ - destination: NotRequired["Charge.CreateParamsDestination"] - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - on_behalf_of: NotRequired["str"] - """ - The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). - """ - radar_options: NotRequired["Charge.CreateParamsRadarOptions"] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - receipt_email: NotRequired["str"] - """ - The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). - """ - shipping: NotRequired["Charge.CreateParamsShipping"] - """ - Shipping information for the charge. Helps prevent fraud on charges for physical goods. - """ - source: NotRequired["str"] - """ - A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer. - """ - 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. - """ - 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. - """ - transfer_data: NotRequired["Charge.CreateParamsTransferData"] - """ - An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. - """ - transfer_group: NotRequired["str"] - """ - A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options). - """ + class CreateParams(RequestOptions): + amount: NotRequired["int"] + """ + Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + """ + application_fee: NotRequired["int"] + application_fee_amount: NotRequired["int"] + """ + A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). + """ + capture: NotRequired["bool"] + """ + Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. + """ + currency: NotRequired["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). + """ + customer: NotRequired["str"] + """ + The ID of an existing customer that will be charged in this request. + """ + description: NotRequired["str"] + """ + An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. + """ + destination: NotRequired["Charge.CreateParamsDestination"] + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + on_behalf_of: NotRequired["str"] + """ + The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). + """ + radar_options: NotRequired["Charge.CreateParamsRadarOptions"] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + receipt_email: NotRequired["str"] + """ + The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + """ + shipping: NotRequired["Charge.CreateParamsShipping"] + """ + Shipping information for the charge. Helps prevent fraud on charges for physical goods. + """ + source: NotRequired["str"] + """ + A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer. + """ + 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. + """ + 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. + """ + transfer_data: NotRequired["Charge.CreateParamsTransferData"] + """ + An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + """ + transfer_group: NotRequired["str"] + """ + A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options). + """ - class CreateParamsTransferData(TypedDict): - amount: NotRequired["int"] - """ - The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ + class CreateParamsTransferData(TypedDict): + amount: NotRequired["int"] + """ + The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ - class CreateParamsShipping(TypedDict): - address: "Charge.CreateParamsShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired["str"] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired["str"] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired["str"] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ + class CreateParamsShipping(TypedDict): + address: "Charge.CreateParamsShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired["str"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: str + """ + Recipient name. + """ + phone: NotRequired["str"] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired["str"] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ - class CreateParamsShippingAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsShippingAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreateParamsRadarOptions(TypedDict): - session: NotRequired["str"] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ + class CreateParamsRadarOptions(TypedDict): + session: NotRequired["str"] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ - class CreateParamsDestination(TypedDict): - account: str - """ - ID of an existing, connected Stripe account. - """ - amount: NotRequired["int"] - """ - The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount. - """ + class CreateParamsDestination(TypedDict): + account: str + """ + ID of an existing, connected Stripe account. + """ + amount: NotRequired["int"] + """ + The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount. + """ - class ListParams(RequestOptions): - created: NotRequired["Charge.ListParamsCreated|int"] - customer: NotRequired["str"] - """ - Only return charges for the customer specified by this customer ID. - """ - 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. - """ - payment_intent: NotRequired["str"] - """ - Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. - """ - 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. - """ - transfer_group: NotRequired["str"] - """ - Only return charges for this transfer group. - """ + class ListParams(RequestOptions): + created: NotRequired["Charge.ListParamsCreated|int"] + customer: NotRequired["str"] + """ + Only return charges for the customer specified by this customer ID. + """ + 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. + """ + payment_intent: NotRequired["str"] + """ + Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. + """ + 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. + """ + transfer_group: NotRequired["str"] + """ + Only return charges for this transfer group. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - customer: NotRequired["str"] - """ - The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge. - """ - description: NotRequired["str"] - """ - An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - fraud_details: NotRequired["Charge.ModifyParamsFraudDetails"] - """ - A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms. - """ - metadata: NotRequired["Literal['']|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`. - """ - receipt_email: NotRequired["str"] - """ - This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address. - """ - shipping: NotRequired["Charge.ModifyParamsShipping"] - """ - Shipping information for the charge. Helps prevent fraud on charges for physical goods. - """ - transfer_group: NotRequired["str"] - """ - A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. - """ + class ModifyParams(RequestOptions): + customer: NotRequired["str"] + """ + The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge. + """ + description: NotRequired["str"] + """ + An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + fraud_details: NotRequired["Charge.ModifyParamsFraudDetails"] + """ + A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms. + """ + metadata: NotRequired["Literal['']|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`. + """ + receipt_email: NotRequired["str"] + """ + This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address. + """ + shipping: NotRequired["Charge.ModifyParamsShipping"] + """ + Shipping information for the charge. Helps prevent fraud on charges for physical goods. + """ + transfer_group: NotRequired["str"] + """ + A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + """ - class ModifyParamsShipping(TypedDict): - address: "Charge.ModifyParamsShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired["str"] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired["str"] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired["str"] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ + class ModifyParamsShipping(TypedDict): + address: "Charge.ModifyParamsShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired["str"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: str + """ + Recipient name. + """ + phone: NotRequired["str"] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired["str"] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ - class ModifyParamsShippingAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class ModifyParamsShippingAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ModifyParamsFraudDetails(TypedDict): - user_report: Union[Literal[""], Literal["fraudulent", "safe"]] - """ - Either `safe` or `fraudulent`. - """ + class ModifyParamsFraudDetails(TypedDict): + user_report: Union[Literal[""], Literal["fraudulent", "safe"]] + """ + Either `safe` or `fraudulent`. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class SearchParams(RequestOptions): - 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. - """ - page: NotRequired["str"] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). - """ + class SearchParams(RequestOptions): + 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. + """ + page: NotRequired["str"] + """ + A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + """ + query: str + """ + The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). + """ amount: int """ @@ -2373,14 +2375,14 @@ def search_auto_paging_iter( ) -> Iterator["Charge"]: return cls.search(*args, **kwargs).auto_paging_iter() - def mark_as_fraudulent(self, idempotency_key=None): + def mark_as_fraudulent(self, idempotency_key=None) -> "Charge": params = {"fraud_details": {"user_report": "fraudulent"}} url = self.instance_url() headers = util.populate_headers(idempotency_key) self.refresh_from(self.request("post", url, params, headers)) return self - def mark_as_safe(self, idempotency_key=None): + def mark_as_safe(self, idempotency_key=None) -> "Charge": params = {"fraud_details": {"user_report": "safe"}} url = self.instance_url() headers = util.populate_headers(idempotency_key) diff --git a/stripe/api_resources/checkout/session.py b/stripe/api_resources/checkout/session.py index 954bc6b00..3dd71e15a 100644 --- a/stripe/api_resources/checkout/session.py +++ b/stripe/api_resources/checkout/session.py @@ -792,6 +792,28 @@ class Paynow(StripeObject): When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). """ + class Paypal(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + preferred_locale: Optional[str] + """ + Preferred locale of the PayPal checkout page that the customer is redirected to. + """ + reference: Optional[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + setup_future_usage: Optional[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ + class Pix(StripeObject): expires_after_seconds: Optional[int] """ @@ -888,6 +910,7 @@ class FinancialConnections(StripeObject): oxxo: Optional[Oxxo] p24: Optional[P24] paynow: Optional[Paynow] + paypal: Optional[Paypal] pix: Optional[Pix] revolut_pay: Optional[RevolutPay] sepa_debit: Optional[SepaDebit] @@ -916,6 +939,7 @@ class FinancialConnections(StripeObject): "oxxo": Oxxo, "p24": P24, "paynow": Paynow, + "paypal": Paypal, "pix": Pix, "revolut_pay": RevolutPay, "sepa_debit": SepaDebit, @@ -1377,1936 +1401,1882 @@ class Tax(StripeObject): breakdown: Optional[Breakdown] _inner_class_types = {"breakdown": Breakdown} - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - after_expiration: NotRequired[ - "Session.CreateParamsAfterExpiration" - ] - """ - Configure actions after a Checkout Session has expired. - """ - allow_promotion_codes: NotRequired["bool"] - """ - Enables user redeemable promotion codes. - """ - automatic_tax: NotRequired["Session.CreateParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. - """ - billing_address_collection: NotRequired[ - "Literal['auto', 'required']" - ] - """ - Specify whether Checkout should collect the customer's billing address. - """ - 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. - """ - client_reference_id: NotRequired["str"] - """ - A unique string to reference the Checkout Session. This can be a - customer ID, a cart ID, or similar, and can be used to reconcile the - session with your internal systems. - """ - consent_collection: NotRequired[ - "Session.CreateParamsConsentCollection" - ] - """ - Configure fields for the Checkout Session to gather active consent from customers. - """ - currency: NotRequired["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). Required in `setup` mode when `payment_method_types` is not set. - """ - custom_fields: NotRequired["List[Session.CreateParamsCustomField]"] - """ - Collect additional information from your customer using custom fields. Up to 2 fields are supported. - """ - custom_text: NotRequired["Session.CreateParamsCustomText"] - """ - Display additional text for your customers using custom text. - """ - customer: NotRequired["str"] - """ - ID of an existing Customer, if one exists. In `payment` mode, the customer's most recently saved card - payment method will be used to prefill the email, name, card details, and billing address - on the Checkout page. In `subscription` mode, the customer's [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) - will be used if it's a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details. + class CreateParams(RequestOptions): + after_expiration: NotRequired["Session.CreateParamsAfterExpiration"] + """ + Configure actions after a Checkout Session has expired. + """ + allow_promotion_codes: NotRequired["bool"] + """ + Enables user redeemable promotion codes. + """ + automatic_tax: NotRequired["Session.CreateParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. + """ + billing_address_collection: NotRequired["Literal['auto', 'required']"] + """ + Specify whether Checkout should collect the customer's billing address. + """ + 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. + """ + client_reference_id: NotRequired["str"] + """ + A unique string to reference the Checkout Session. This can be a + customer ID, a cart ID, or similar, and can be used to reconcile the + session with your internal systems. + """ + consent_collection: NotRequired[ + "Session.CreateParamsConsentCollection" + ] + """ + Configure fields for the Checkout Session to gather active consent from customers. + """ + currency: NotRequired["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). Required in `setup` mode when `payment_method_types` is not set. + """ + custom_fields: NotRequired["List[Session.CreateParamsCustomField]"] + """ + Collect additional information from your customer using custom fields. Up to 2 fields are supported. + """ + custom_text: NotRequired["Session.CreateParamsCustomText"] + """ + Display additional text for your customers using custom text. + """ + customer: NotRequired["str"] + """ + ID of an existing Customer, if one exists. In `payment` mode, the customer's most recently saved card + payment method will be used to prefill the email, name, card details, and billing address + on the Checkout page. In `subscription` mode, the customer's [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) + will be used if it's a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details. - If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout. - If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer. + If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout. + If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer. - If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow. + If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow. - You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. - """ - customer_creation: NotRequired["Literal['always', 'if_required']"] - """ - Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation. + You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. + """ + customer_creation: NotRequired["Literal['always', 'if_required']"] + """ + Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation. - When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout - with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). + When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout + with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). - Sessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers) - in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. + Sessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers) + in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. - Can only be set in `payment` and `setup` mode. - """ - customer_email: NotRequired["str"] - """ - If provided, this value will be used when the Customer object is created. - If not provided, customers will be asked to enter their email address. - Use this parameter to prefill customer data if you already have an email - on file. To access information about the customer once a session is - complete, use the `customer` field. - """ - customer_update: NotRequired["Session.CreateParamsCustomerUpdate"] - """ - Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided. - """ - discounts: NotRequired["List[Session.CreateParamsDiscount]"] - """ - The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired["int"] - """ - The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. - """ - invoice_creation: NotRequired[ - "Session.CreateParamsInvoiceCreation" - ] - """ - Generate a post-purchase Invoice for one-time payments. - """ - line_items: NotRequired["List[Session.CreateParamsLineItem]"] - """ - A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). + Can only be set in `payment` and `setup` mode. + """ + customer_email: NotRequired["str"] + """ + If provided, this value will be used when the Customer object is created. + If not provided, customers will be asked to enter their email address. + Use this parameter to prefill customer data if you already have an email + on file. To access information about the customer once a session is + complete, use the `customer` field. + """ + customer_update: NotRequired["Session.CreateParamsCustomerUpdate"] + """ + Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided. + """ + discounts: NotRequired["List[Session.CreateParamsDiscount]"] + """ + The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["int"] + """ + The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. + """ + invoice_creation: NotRequired["Session.CreateParamsInvoiceCreation"] + """ + Generate a post-purchase Invoice for one-time payments. + """ + line_items: NotRequired["List[Session.CreateParamsLineItem]"] + """ + A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). - For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. + For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. - For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. - """ - locale: NotRequired[ - "Literal['auto', 'bg', 'cs', 'da', 'de', 'el', 'en', 'en-GB', 'es', 'es-419', 'et', 'fi', 'fil', 'fr', 'fr-CA', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'lt', 'lv', 'ms', 'mt', 'nb', 'nl', 'pl', 'pt', 'pt-BR', 'ro', 'ru', 'sk', 'sl', 'sv', 'th', 'tr', 'vi', 'zh', 'zh-HK', 'zh-TW']" - ] - """ - The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. - """ - 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`. - """ - mode: NotRequired["Literal['payment', 'setup', 'subscription']"] - """ - The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item. - """ - payment_intent_data: NotRequired[ - "Session.CreateParamsPaymentIntentData" - ] - """ - A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. - """ - payment_method_collection: NotRequired[ - "Literal['always', 'if_required']" - ] - """ - Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. - This may occur if the Checkout Session includes a free trial or a discount. + For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. + """ + locale: NotRequired[ + "Literal['auto', 'bg', 'cs', 'da', 'de', 'el', 'en', 'en-GB', 'es', 'es-419', 'et', 'fi', 'fil', 'fr', 'fr-CA', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'lt', 'lv', 'ms', 'mt', 'nb', 'nl', 'pl', 'pt', 'pt-BR', 'ro', 'ru', 'sk', 'sl', 'sv', 'th', 'tr', 'vi', 'zh', 'zh-HK', 'zh-TW']" + ] + """ + The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + """ + 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`. + """ + mode: NotRequired["Literal['payment', 'setup', 'subscription']"] + """ + The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item. + """ + payment_intent_data: NotRequired[ + "Session.CreateParamsPaymentIntentData" + ] + """ + A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + """ + payment_method_collection: NotRequired[ + "Literal['always', 'if_required']" + ] + """ + Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. + This may occur if the Checkout Session includes a free trial or a discount. - Can only be set in `subscription` mode. + Can only be set in `subscription` mode. - 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_configuration: NotRequired["str"] - """ - The ID of the payment method configuration to use with this Checkout session. - """ - payment_method_options: NotRequired[ - "Session.CreateParamsPaymentMethodOptions" - ] - """ - Payment-method-specific configuration. - """ - payment_method_types: NotRequired[ - "List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay', 'zip']]" - ] - """ - A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. + 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_configuration: NotRequired["str"] + """ + The ID of the payment method configuration to use with this Checkout session. + """ + payment_method_options: NotRequired[ + "Session.CreateParamsPaymentMethodOptions" + ] + """ + Payment-method-specific configuration. + """ + payment_method_types: NotRequired[ + "List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay', 'zip']]" + ] + """ + A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. - You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). - See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details. + You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details. - Read more about the supported payment methods and their requirements in our [payment - method details guide](https://stripe.com/docs/payments/checkout/payment-methods). + Read more about the supported payment methods and their requirements in our [payment + method details guide](https://stripe.com/docs/payments/checkout/payment-methods). - If multiple payment methods are passed, Checkout will dynamically reorder them to - prioritize the most relevant payment methods based on the customer's location and - other characteristics. - """ - phone_number_collection: NotRequired[ - "Session.CreateParamsPhoneNumberCollection" - ] - """ - Controls phone number collection settings for the session. + If multiple payment methods are passed, Checkout will dynamically reorder them to + prioritize the most relevant payment methods based on the customer's location and + other characteristics. + """ + phone_number_collection: NotRequired[ + "Session.CreateParamsPhoneNumberCollection" + ] + """ + Controls phone number collection settings for the session. - We recommend that you review your privacy policy and check with your legal contacts - before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers). - """ - redirect_on_completion: NotRequired[ - "Literal['always', 'if_required', 'never']" - ] - """ - This parameter applies to `ui_mode: embedded`. By default, Stripe will always redirect to your return_url after a successful confirmation. If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method. - """ - return_url: NotRequired["str"] - """ - The URL to redirect your customer back to after they authenticate or cancel their payment on the - payment method's app or site. This parameter is required if ui_mode is `embedded` - and redirect-based payment methods are enabled on the session. - """ - setup_intent_data: NotRequired[ - "Session.CreateParamsSetupIntentData" - ] - """ - A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. - """ - shipping_address_collection: NotRequired[ - "Session.CreateParamsShippingAddressCollection" - ] - """ - When set, provides configuration for Checkout to collect a shipping address from a customer. - """ - shipping_options: NotRequired[ - "List[Session.CreateParamsShippingOption]" - ] - """ - The shipping rate options to apply to this Session. Up to a maximum of 5. - """ - submit_type: NotRequired[ - "Literal['auto', 'book', 'donate', 'pay']" - ] - """ - 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 - specified on Checkout Sessions in `payment` mode, but not Checkout Sessions - in `subscription` or `setup` mode. - """ - subscription_data: NotRequired[ - "Session.CreateParamsSubscriptionData" - ] - """ - A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. - """ - success_url: NotRequired["str"] - """ - The URL to which Stripe should send customers when payment or setup - is complete. - This parameter is not allowed if ui_mode is `embedded`. If you'd like to use - information from the successful Checkout Session on your page, read the - guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). - """ - tax_id_collection: NotRequired[ - "Session.CreateParamsTaxIdCollection" - ] - """ - Controls tax ID collection settings for the session. - """ - ui_mode: NotRequired["Literal['embedded', 'hosted']"] - """ - `ui_mode` can be `hosted` or `embedded`. The default is `hosted`. - """ + We recommend that you review your privacy policy and check with your legal contacts + before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers). + """ + redirect_on_completion: NotRequired[ + "Literal['always', 'if_required', 'never']" + ] + """ + This parameter applies to `ui_mode: embedded`. By default, Stripe will always redirect to your return_url after a successful confirmation. If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method. + """ + return_url: NotRequired["str"] + """ + The URL to redirect your customer back to after they authenticate or cancel their payment on the + payment method's app or site. This parameter is required if ui_mode is `embedded` + and redirect-based payment methods are enabled on the session. + """ + setup_intent_data: NotRequired["Session.CreateParamsSetupIntentData"] + """ + A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. + """ + shipping_address_collection: NotRequired[ + "Session.CreateParamsShippingAddressCollection" + ] + """ + When set, provides configuration for Checkout to collect a shipping address from a customer. + """ + shipping_options: NotRequired[ + "List[Session.CreateParamsShippingOption]" + ] + """ + The shipping rate options to apply to this Session. Up to a maximum of 5. + """ + submit_type: NotRequired["Literal['auto', 'book', 'donate', 'pay']"] + """ + 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 + specified on Checkout Sessions in `payment` mode, but not Checkout Sessions + in `subscription` or `setup` mode. + """ + subscription_data: NotRequired["Session.CreateParamsSubscriptionData"] + """ + A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. + """ + success_url: NotRequired["str"] + """ + The URL to which Stripe should send customers when payment or setup + is complete. + This parameter is not allowed if ui_mode is `embedded`. If you'd like to use + information from the successful Checkout Session on your page, read the + guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). + """ + tax_id_collection: NotRequired["Session.CreateParamsTaxIdCollection"] + """ + Controls tax ID collection settings for the session. + """ + ui_mode: NotRequired["Literal['embedded', 'hosted']"] + """ + `ui_mode` can be `hosted` or `embedded`. The default is `hosted`. + """ - class CreateParamsTaxIdCollection(TypedDict): - enabled: bool - """ - Set to true to enable Tax ID collection. - """ + class CreateParamsTaxIdCollection(TypedDict): + enabled: bool + """ + Set to true to enable Tax ID collection. + """ - class CreateParamsSubscriptionData(TypedDict): - application_fee_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - billing_cycle_anchor: NotRequired["int"] - """ - A future timestamp to anchor the subscription's billing cycle for new subscriptions. - """ - default_tax_rates: NotRequired["List[str]"] - """ - The tax rates that will apply to any subscription item that does not have - `tax_rates` set. Invoices created will have their `default_tax_rates` populated - from the subscription. - """ - description: NotRequired["str"] - """ - The subscription's description, meant to be displayable to the customer. - Use this field to optionally store an explanation of the subscription - for rendering in the [customer portal](https://stripe.com/docs/customer-management). - """ - 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`. - """ - on_behalf_of: NotRequired["str"] - """ - The account on behalf of which to charge, for each of the subscription's invoices. - """ - proration_behavior: NotRequired[ - "Literal['create_prorations', 'none']" - ] - """ - Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. - """ - transfer_data: NotRequired[ - "Session.CreateParamsSubscriptionDataTransferData" - ] - """ - If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. - """ - trial_end: NotRequired["int"] - """ - Unix timestamp representing the end of the trial period the customer - will get before being charged for the first time. Has to be at least - 48 hours in the future. - """ - trial_period_days: NotRequired["int"] - """ - Integer representing the number of trial period days before the - customer is charged for the first time. Has to be at least 1. - """ - trial_settings: NotRequired[ - "Session.CreateParamsSubscriptionDataTrialSettings" - ] - """ - Settings related to subscription trials. - """ + class CreateParamsSubscriptionData(TypedDict): + application_fee_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + billing_cycle_anchor: NotRequired["int"] + """ + A future timestamp to anchor the subscription's billing cycle for new subscriptions. + """ + default_tax_rates: NotRequired["List[str]"] + """ + The tax rates that will apply to any subscription item that does not have + `tax_rates` set. Invoices created will have their `default_tax_rates` populated + from the subscription. + """ + description: NotRequired["str"] + """ + The subscription's description, meant to be displayable to the customer. + Use this field to optionally store an explanation of the subscription + for rendering in the [customer portal](https://stripe.com/docs/customer-management). + """ + 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`. + """ + on_behalf_of: NotRequired["str"] + """ + The account on behalf of which to charge, for each of the subscription's invoices. + """ + proration_behavior: NotRequired["Literal['create_prorations', 'none']"] + """ + Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + """ + transfer_data: NotRequired[ + "Session.CreateParamsSubscriptionDataTransferData" + ] + """ + If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + """ + trial_end: NotRequired["int"] + """ + Unix timestamp representing the end of the trial period the customer + will get before being charged for the first time. Has to be at least + 48 hours in the future. + """ + trial_period_days: NotRequired["int"] + """ + Integer representing the number of trial period days before the + customer is charged for the first time. Has to be at least 1. + """ + trial_settings: NotRequired[ + "Session.CreateParamsSubscriptionDataTrialSettings" + ] + """ + Settings related to subscription trials. + """ - class CreateParamsSubscriptionDataTrialSettings(TypedDict): - end_behavior: "Session.CreateParamsSubscriptionDataTrialSettingsEndBehavior" - """ - Defines how the subscription should behave when the user's free trial ends. - """ + class CreateParamsSubscriptionDataTrialSettings(TypedDict): + end_behavior: "Session.CreateParamsSubscriptionDataTrialSettingsEndBehavior" + """ + Defines how the subscription should behave when the user's free trial ends. + """ - class CreateParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Literal[ - "cancel", "create_invoice", "pause" - ] - """ - Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - """ - - class CreateParamsSubscriptionDataTransferData(TypedDict): - amount_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class CreateParamsShippingOption(TypedDict): - shipping_rate: NotRequired["str"] - """ - The ID of the Shipping Rate to use for this shipping option. - """ - shipping_rate_data: NotRequired[ - "Session.CreateParamsShippingOptionShippingRateData" - ] - """ - Parameters to be passed to Shipping Rate creation for this shipping option - """ - - class CreateParamsShippingOptionShippingRateData(TypedDict): - delivery_estimate: NotRequired[ - "Session.CreateParamsShippingOptionShippingRateDataDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - fixed_amount: NotRequired[ - "Session.CreateParamsShippingOptionShippingRateDataFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - 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`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired["str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired["Literal['fixed_amount']"] - """ - The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. - """ + class CreateParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): + missing_payment_method: Literal["cancel", "create_invoice", "pause"] + """ + Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + """ - class CreateParamsShippingOptionShippingRateDataFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - "Dict[str, Session.CreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions]" - ] - """ - Shipping rates 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). - """ + class CreateParamsSubscriptionDataTransferData(TypedDict): + amount_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ - class CreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions( - TypedDict, - ): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ + class CreateParamsShippingOption(TypedDict): + shipping_rate: NotRequired["str"] + """ + The ID of the Shipping Rate to use for this shipping option. + """ + shipping_rate_data: NotRequired[ + "Session.CreateParamsShippingOptionShippingRateData" + ] + """ + Parameters to be passed to Shipping Rate creation for this shipping option + """ - class CreateParamsShippingOptionShippingRateDataDeliveryEstimate( - TypedDict, - ): - maximum: NotRequired[ - "Session.CreateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "Session.CreateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ + class CreateParamsShippingOptionShippingRateData(TypedDict): + delivery_estimate: NotRequired[ + "Session.CreateParamsShippingOptionShippingRateDataDeliveryEstimate" + ] + """ + The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + display_name: str + """ + The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + fixed_amount: NotRequired[ + "Session.CreateParamsShippingOptionShippingRateDataFixedAmount" + ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + 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`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + tax_code: NotRequired["str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ + type: NotRequired["Literal['fixed_amount']"] + """ + The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + """ - class CreateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ + class CreateParamsShippingOptionShippingRateDataFixedAmount(TypedDict): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + 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). + """ + currency_options: NotRequired[ + "Dict[str, Session.CreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions]" + ] + """ + Shipping rates 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). + """ - class CreateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ + class CreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions( + TypedDict, + ): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ - class CreateParamsShippingAddressCollection(TypedDict): - allowed_countries: List[ - Literal[ - "AC", - "AD", - "AE", - "AF", - "AG", - "AI", - "AL", - "AM", - "AO", - "AQ", - "AR", - "AT", - "AU", - "AW", - "AX", - "AZ", - "BA", - "BB", - "BD", - "BE", - "BF", - "BG", - "BH", - "BI", - "BJ", - "BL", - "BM", - "BN", - "BO", - "BQ", - "BR", - "BS", - "BT", - "BV", - "BW", - "BY", - "BZ", - "CA", - "CD", - "CF", - "CG", - "CH", - "CI", - "CK", - "CL", - "CM", - "CN", - "CO", - "CR", - "CV", - "CW", - "CY", - "CZ", - "DE", - "DJ", - "DK", - "DM", - "DO", - "DZ", - "EC", - "EE", - "EG", - "EH", - "ER", - "ES", - "ET", - "FI", - "FJ", - "FK", - "FO", - "FR", - "GA", - "GB", - "GD", - "GE", - "GF", - "GG", - "GH", - "GI", - "GL", - "GM", - "GN", - "GP", - "GQ", - "GR", - "GS", - "GT", - "GU", - "GW", - "GY", - "HK", - "HN", - "HR", - "HT", - "HU", - "ID", - "IE", - "IL", - "IM", - "IN", - "IO", - "IQ", - "IS", - "IT", - "JE", - "JM", - "JO", - "JP", - "KE", - "KG", - "KH", - "KI", - "KM", - "KN", - "KR", - "KW", - "KY", - "KZ", - "LA", - "LB", - "LC", - "LI", - "LK", - "LR", - "LS", - "LT", - "LU", - "LV", - "LY", - "MA", - "MC", - "MD", - "ME", - "MF", - "MG", - "MK", - "ML", - "MM", - "MN", - "MO", - "MQ", - "MR", - "MS", - "MT", - "MU", - "MV", - "MW", - "MX", - "MY", - "MZ", - "NA", - "NC", - "NE", - "NG", - "NI", - "NL", - "NO", - "NP", - "NR", - "NU", - "NZ", - "OM", - "PA", - "PE", - "PF", - "PG", - "PH", - "PK", - "PL", - "PM", - "PN", - "PR", - "PS", - "PT", - "PY", - "QA", - "RE", - "RO", - "RS", - "RU", - "RW", - "SA", - "SB", - "SC", - "SE", - "SG", - "SH", - "SI", - "SJ", - "SK", - "SL", - "SM", - "SN", - "SO", - "SR", - "SS", - "ST", - "SV", - "SX", - "SZ", - "TA", - "TC", - "TD", - "TF", - "TG", - "TH", - "TJ", - "TK", - "TL", - "TM", - "TN", - "TO", - "TR", - "TT", - "TV", - "TW", - "TZ", - "UA", - "UG", - "US", - "UY", - "UZ", - "VA", - "VC", - "VE", - "VG", - "VN", - "VU", - "WF", - "WS", - "XK", - "YE", - "YT", - "ZA", - "ZM", - "ZW", - "ZZ", - ] - ] - """ - 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`. - """ + class CreateParamsShippingOptionShippingRateDataDeliveryEstimate( + TypedDict + ): + maximum: NotRequired[ + "Session.CreateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum" + ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ + minimum: NotRequired[ + "Session.CreateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum" + ] + """ + The lower bound of the estimated range. If empty, represents no lower bound. + """ - class CreateParamsSetupIntentData(TypedDict): - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - 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`. - """ - on_behalf_of: NotRequired["str"] - """ - The Stripe account for which the setup is intended. - """ + class CreateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum( + TypedDict, + ): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ - class CreateParamsPhoneNumberCollection(TypedDict): - enabled: bool - """ - Set to `true` to enable phone number collection. - """ + class CreateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum( + TypedDict, + ): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ - class CreateParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsAcssDebit" - ] - """ - contains details about the ACSS Debit payment method options. - """ - affirm: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsAffirm" - ] - """ - contains details about the Affirm payment method options. - """ - afterpay_clearpay: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsAfterpayClearpay" - ] - """ - contains details about the Afterpay Clearpay payment method options. - """ - alipay: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsAlipay" - ] - """ - contains details about the Alipay payment method options. - """ - au_becs_debit: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsAuBecsDebit" - ] - """ - contains details about the AU Becs Debit payment method options. - """ - bacs_debit: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsBacsDebit" - ] - """ - contains details about the Bacs Debit payment method options. - """ - bancontact: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsBancontact" - ] - """ - contains details about the Bancontact payment method options. - """ - boleto: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsBoleto" - ] - """ - contains details about the Boleto payment method options. - """ - card: NotRequired["Session.CreateParamsPaymentMethodOptionsCard"] - """ - contains details about the Card payment method options. - """ - cashapp: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsCashapp" - ] - """ - contains details about the Cashapp Pay payment method options. - """ - customer_balance: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsCustomerBalance" - ] - """ - contains details about the Customer Balance payment method options. - """ - eps: NotRequired["Session.CreateParamsPaymentMethodOptionsEps"] - """ - contains details about the EPS payment method options. - """ - fpx: NotRequired["Session.CreateParamsPaymentMethodOptionsFpx"] - """ - contains details about the FPX payment method options. - """ - giropay: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsGiropay" - ] - """ - contains details about the Giropay payment method options. - """ - grabpay: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsGrabpay" - ] - """ - contains details about the Grabpay payment method options. - """ - ideal: NotRequired["Session.CreateParamsPaymentMethodOptionsIdeal"] - """ - contains details about the Ideal payment method options. - """ - klarna: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsKlarna" - ] - """ - contains details about the Klarna payment method options. - """ - konbini: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsKonbini" - ] - """ - contains details about the Konbini payment method options. - """ - link: NotRequired["Session.CreateParamsPaymentMethodOptionsLink"] - """ - contains details about the Link payment method options. - """ - oxxo: NotRequired["Session.CreateParamsPaymentMethodOptionsOxxo"] - """ - contains details about the OXXO payment method options. - """ - p24: NotRequired["Session.CreateParamsPaymentMethodOptionsP24"] - """ - contains details about the P24 payment method options. - """ - paynow: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsPaynow" - ] - """ - contains details about the PayNow payment method options. - """ - paypal: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsPaypal" - ] - """ - contains details about the PayPal payment method options. - """ - pix: NotRequired["Session.CreateParamsPaymentMethodOptionsPix"] - """ - contains details about the Pix payment method options. - """ - revolut_pay: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsRevolutPay" - ] - """ - contains details about the RevolutPay payment method options. - """ - sepa_debit: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsSepaDebit" - ] - """ - contains details about the Sepa Debit payment method options. - """ - sofort: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsSofort" - ] - """ - contains details about the Sofort payment method options. - """ - us_bank_account: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsUsBankAccount" - ] - """ - contains details about the Us Bank Account payment method options. - """ - wechat_pay: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsWechatPay" + class CreateParamsShippingAddressCollection(TypedDict): + allowed_countries: List[ + Literal[ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ", ] - """ - contains details about the WeChat Pay payment method options. - """ + ] + """ + 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`. + """ - class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): - app_id: NotRequired["str"] - """ - The app ID registered with WeChat Pay. Only required when client is ios or android. - """ - client: Literal["android", "ios", "web"] - """ - The client type that the end customer will pay from - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsSetupIntentData(TypedDict): + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + 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`. + """ + on_behalf_of: NotRequired["str"] + """ + The Stripe account for which the setup is intended. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class CreateParamsPhoneNumberCollection(TypedDict): + enabled: bool + """ + Set to `true` to enable phone number collection. + """ - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + class CreateParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsAcssDebit" + ] + """ + contains details about the ACSS Debit payment method options. + """ + affirm: NotRequired["Session.CreateParamsPaymentMethodOptionsAffirm"] + """ + contains details about the Affirm payment method options. + """ + afterpay_clearpay: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsAfterpayClearpay" + ] + """ + contains details about the Afterpay Clearpay payment method options. + """ + alipay: NotRequired["Session.CreateParamsPaymentMethodOptionsAlipay"] + """ + contains details about the Alipay payment method options. + """ + au_becs_debit: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsAuBecsDebit" + ] + """ + contains details about the AU Becs Debit payment method options. + """ + bacs_debit: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsBacsDebit" + ] + """ + contains details about the Bacs Debit payment method options. + """ + bancontact: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsBancontact" + ] + """ + contains details about the Bancontact payment method options. + """ + boleto: NotRequired["Session.CreateParamsPaymentMethodOptionsBoleto"] + """ + contains details about the Boleto payment method options. + """ + card: NotRequired["Session.CreateParamsPaymentMethodOptionsCard"] + """ + contains details about the Card payment method options. + """ + cashapp: NotRequired["Session.CreateParamsPaymentMethodOptionsCashapp"] + """ + contains details about the Cashapp Pay payment method options. + """ + customer_balance: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsCustomerBalance" + ] + """ + contains details about the Customer Balance payment method options. + """ + eps: NotRequired["Session.CreateParamsPaymentMethodOptionsEps"] + """ + contains details about the EPS payment method options. + """ + fpx: NotRequired["Session.CreateParamsPaymentMethodOptionsFpx"] + """ + contains details about the FPX payment method options. + """ + giropay: NotRequired["Session.CreateParamsPaymentMethodOptionsGiropay"] + """ + contains details about the Giropay payment method options. + """ + grabpay: NotRequired["Session.CreateParamsPaymentMethodOptionsGrabpay"] + """ + contains details about the Grabpay payment method options. + """ + ideal: NotRequired["Session.CreateParamsPaymentMethodOptionsIdeal"] + """ + contains details about the Ideal payment method options. + """ + klarna: NotRequired["Session.CreateParamsPaymentMethodOptionsKlarna"] + """ + contains details about the Klarna payment method options. + """ + konbini: NotRequired["Session.CreateParamsPaymentMethodOptionsKonbini"] + """ + contains details about the Konbini payment method options. + """ + link: NotRequired["Session.CreateParamsPaymentMethodOptionsLink"] + """ + contains details about the Link payment method options. + """ + oxxo: NotRequired["Session.CreateParamsPaymentMethodOptionsOxxo"] + """ + contains details about the OXXO payment method options. + """ + p24: NotRequired["Session.CreateParamsPaymentMethodOptionsP24"] + """ + contains details about the P24 payment method options. + """ + paynow: NotRequired["Session.CreateParamsPaymentMethodOptionsPaynow"] + """ + contains details about the PayNow payment method options. + """ + paypal: NotRequired["Session.CreateParamsPaymentMethodOptionsPaypal"] + """ + contains details about the PayPal payment method options. + """ + pix: NotRequired["Session.CreateParamsPaymentMethodOptionsPix"] + """ + contains details about the Pix payment method options. + """ + revolut_pay: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsRevolutPay" + ] + """ + contains details about the RevolutPay payment method options. + """ + sepa_debit: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsSepaDebit" + ] + """ + contains details about the Sepa Debit payment method options. + """ + sofort: NotRequired["Session.CreateParamsPaymentMethodOptionsSofort"] + """ + contains details about the Sofort payment method options. + """ + us_bank_account: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsUsBankAccount" + ] + """ + contains details about the Us Bank Account payment method options. + """ + wechat_pay: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsWechatPay" + ] + """ + contains details about the WeChat Pay payment method options. + """ - class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - setup_future_usage: NotRequired[ - "Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): + app_id: NotRequired["str"] + """ + The app ID registered with WeChat Pay. Only required when client is ios or android. + """ + client: Literal["android", "ios", "web"] + """ + The client type that the end customer will pay from + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ - verification_method: NotRequired["Literal['automatic', 'instant']"] - """ - Verification method for the intent - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - permissions: NotRequired[ - "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired["List[Literal['balances']]"] - """ - List of data features that you would like to retrieve upon account creation. - """ + class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): + financial_connections: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + setup_future_usage: NotRequired[ + "Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsSofort(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ + verification_method: NotRequired["Literal['automatic', 'instant']"] + """ + Verification method for the intent + """ - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, + ): + permissions: NotRequired[ + "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired["List[Literal['balances']]"] + """ + List of data features that you would like to retrieve upon account creation. + """ - class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): - setup_future_usage: NotRequired[ - "Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsSofort(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): - setup_future_usage: NotRequired["Literal['none', 'off_session']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): + setup_future_usage: NotRequired[ + "Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsPix(TypedDict): - expires_after_seconds: NotRequired["int"] - """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. - """ + class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): + setup_future_usage: NotRequired["Literal['none', 'off_session']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsPaypal(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. - """ - preferred_locale: NotRequired[ - "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-DE', 'de-LU', 'el-GR', 'en-GB', 'en-US', 'es-ES', 'fi-FI', 'fr-BE', 'fr-FR', 'fr-LU', 'hu-HU', 'it-IT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sk-SK', 'sv-SE']" - ] - """ - [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. - """ - reference: NotRequired["str"] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - risk_correlation_id: NotRequired["str"] - """ - The risk correlation ID for an on-session payment using a saved PayPal payment method. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + class CreateParamsPaymentMethodOptionsPix(TypedDict): + expires_after_seconds: NotRequired["int"] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ + class CreateParamsPaymentMethodOptionsPaypal(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + """ + preferred_locale: NotRequired[ + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-DE', 'de-LU', 'el-GR', 'en-GB', 'en-US', 'es-ES', 'fi-FI', 'fr-BE', 'fr-FR', 'fr-LU', 'hu-HU', 'it-IT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sk-SK', 'sv-SE']" + ] + """ + [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + """ + reference: NotRequired["str"] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + risk_correlation_id: NotRequired["str"] + """ + The risk correlation ID for an on-session payment using a saved PayPal payment method. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsPaynow(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ - class CreateParamsPaymentMethodOptionsP24(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsPaynow(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ - tos_shown_and_accepted: NotRequired["bool"] - """ - Confirm that the payer has accepted the P24 terms and conditions. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ + + class CreateParamsPaymentMethodOptionsP24(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ + tos_shown_and_accepted: NotRequired["bool"] + """ + Confirm that the payer has accepted the P24 terms and conditions. + """ - class CreateParamsPaymentMethodOptionsOxxo(TypedDict): - expires_after_days: NotRequired["int"] - """ - The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsOxxo(TypedDict): + expires_after_days: NotRequired["int"] + """ + The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsLink(TypedDict): - setup_future_usage: NotRequired["Literal['none', 'off_session']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsLink(TypedDict): + setup_future_usage: NotRequired["Literal['none', 'off_session']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsKonbini(TypedDict): - expires_after_days: NotRequired["int"] - """ - The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsKonbini(TypedDict): + expires_after_days: NotRequired["int"] + """ + The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsKlarna(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsKlarna(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsIdeal(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsIdeal(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsGiropay(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsGiropay(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsFpx(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsFpx(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsEps(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsEps(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): - bank_transfer: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired["Literal['bank_transfer']"] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): + bank_transfer: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired["Literal['bank_transfer']"] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - "List[Literal['aba', 'iban', 'sepa', 'sort_code', 'spei', 'swift', 'zengin']]" - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, + ): + eu_bank_transfer: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for eu_bank_transfer funding type. + """ + requested_address_types: NotRequired[ + "List[Literal['aba', 'iban', 'sepa', 'sort_code', 'spei', 'swift', 'zengin']]" + ] + """ + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The list of bank transfer types that this PaymentIntent is allowed to use for funding. - """ + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + """ + type: Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + """ + The list of bank transfer types that this PaymentIntent is allowed to use for funding. + """ - class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ + class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, + ): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ - class CreateParamsPaymentMethodOptionsCashapp(TypedDict): - setup_future_usage: NotRequired[ - "Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsCashapp(TypedDict): + setup_future_usage: NotRequired[ + "Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsCard(TypedDict): - installments: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsCardInstallments" - ] - """ - Installment options for card payments - """ - setup_future_usage: NotRequired[ - "Literal['off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsCard(TypedDict): + installments: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsCardInstallments" + ] + """ + Installment options for card payments + """ + setup_future_usage: NotRequired["Literal['off_session', 'on_session']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ - statement_descriptor_suffix_kana: NotRequired["str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. - """ - statement_descriptor_suffix_kanji: NotRequired["str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. - """ + When processing card payments, Stripe also uses `setup_future_usage` 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"] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + """ + statement_descriptor_suffix_kanji: NotRequired["str"] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + """ - class CreateParamsPaymentMethodOptionsCardInstallments(TypedDict): - enabled: NotRequired["bool"] - """ - Setting to true enables installments for this Checkout Session. - Setting to false will prevent any installment plan from applying to a payment. - """ + class CreateParamsPaymentMethodOptionsCardInstallments(TypedDict): + enabled: NotRequired["bool"] + """ + Setting to true enables installments for this Checkout Session. + Setting to false will prevent any installment plan from applying to a payment. + """ - class CreateParamsPaymentMethodOptionsBoleto(TypedDict): - expires_after_days: NotRequired["int"] - """ - The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. - """ - setup_future_usage: NotRequired[ - "Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsBoleto(TypedDict): + expires_after_days: NotRequired["int"] + """ + The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + """ + setup_future_usage: NotRequired[ + "Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsBancontact(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsBancontact(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): - setup_future_usage: NotRequired[ - "Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): + setup_future_usage: NotRequired[ + "Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsAlipay(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsAffirm(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsAffirm(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired["Literal['cad', 'usd']"] - """ - 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). This is only accepted for Checkout Sessions in `setup` mode. - """ - mandate_options: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): + currency: NotRequired["Literal['cad', 'usd']"] + """ + 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). This is only accepted for Checkout Sessions in `setup` mode. + """ + mandate_options: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + When processing card payments, Stripe also uses `setup_future_usage` 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', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - default_for: NotRequired[ - "List[Literal['invoice', 'subscription']]" - ] - """ - List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode. - """ - interval_description: NotRequired["str"] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - "Literal['combined', 'interval', 'sporadic']" - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired["Literal['business', 'personal']"] - """ - Transaction type of the mandate. - """ + class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + default_for: NotRequired["List[Literal['invoice', 'subscription']]"] + """ + List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode. + """ + interval_description: NotRequired["str"] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']" + ] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired["Literal['business', 'personal']"] + """ + Transaction type of the mandate. + """ - class CreateParamsPaymentIntentData(TypedDict): - application_fee_amount: NotRequired["int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - capture_method: NotRequired[ - "Literal['automatic', 'automatic_async', 'manual']" - ] - """ - Controls when the funds will be captured from the customer's account. - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - metadata: NotRequired["Dict[str, str]"] - """ - 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`. - """ - on_behalf_of: NotRequired["str"] - """ - The Stripe account ID for which these funds are intended. For details, - see the PaymentIntents [use case for connected - accounts](https://stripe.com/docs/payments/connected-accounts). - """ - receipt_email: NotRequired["str"] - """ - Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). - """ - setup_future_usage: NotRequired[ - "Literal['off_session', 'on_session']" - ] - """ - Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment - method collected by this Checkout Session. + class CreateParamsPaymentIntentData(TypedDict): + application_fee_amount: NotRequired["int"] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + capture_method: NotRequired[ + "Literal['automatic', 'automatic_async', 'manual']" + ] + """ + Controls when the funds will be captured from the customer's account. + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + metadata: NotRequired["Dict[str, str]"] + """ + 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`. + """ + on_behalf_of: NotRequired["str"] + """ + The Stripe account ID for which these funds are intended. For details, + see the PaymentIntents [use case for connected + accounts](https://stripe.com/docs/payments/connected-accounts). + """ + receipt_email: NotRequired["str"] + """ + Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + """ + setup_future_usage: NotRequired["Literal['off_session', 'on_session']"] + """ + Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment + method collected by this Checkout Session. - When setting this to `on_session`, Checkout will show a notice to the - customer that their payment details will be saved. + When setting this to `on_session`, Checkout will show a notice to the + customer that their payment details will be saved. - When setting this to `off_session`, Checkout will show a notice to the - customer that their payment details will be saved and used for future - payments. + When setting this to `off_session`, Checkout will show a notice to the + customer that their payment details will be saved and used for future + payments. - If a Customer has been provided or Checkout creates a new Customer, - Checkout will attach the payment method to the Customer. + If a Customer has been provided or Checkout creates a new Customer, + Checkout will attach the payment method to the Customer. - If Checkout does not create a Customer, the payment method is not attached - to a Customer. To reuse the payment method, you can retrieve it from the - Checkout Session's PaymentIntent. + If Checkout does not create a Customer, the payment method is not attached + to a Customer. To reuse the payment method, you can retrieve it from the + Checkout Session's PaymentIntent. - When processing card payments, Checkout also uses `setup_future_usage` - to dynamically optimize your payment flow and comply with regional - legislation and network rules, such as SCA. - """ - shipping: NotRequired[ - "Session.CreateParamsPaymentIntentDataShipping" - ] - """ - Shipping information for this payment. - """ - 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. - """ - 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. - """ - transfer_data: NotRequired[ - "Session.CreateParamsPaymentIntentDataTransferData" - ] - """ - The parameters used to automatically create a Transfer when the payment succeeds. - For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - transfer_group: NotRequired["str"] - """ - A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. - """ + When processing card payments, Checkout also uses `setup_future_usage` + to dynamically optimize your payment flow and comply with regional + legislation and network rules, such as SCA. + """ + shipping: NotRequired["Session.CreateParamsPaymentIntentDataShipping"] + """ + Shipping information for this payment. + """ + 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. + """ + 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. + """ + transfer_data: NotRequired[ + "Session.CreateParamsPaymentIntentDataTransferData" + ] + """ + The parameters used to automatically create a Transfer when the payment succeeds. + For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + transfer_group: NotRequired["str"] + """ + A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + """ - class CreateParamsPaymentIntentDataTransferData(TypedDict): - amount: NotRequired["int"] - """ - The amount that will be transferred automatically when a charge succeeds. - """ - destination: str - """ - If specified, successful charges will be attributed to the destination - account for tax reporting, and the funds from charges will be transferred - to the destination account. The ID of the resulting transfer will be - returned on the successful charge's `transfer` field. - """ + class CreateParamsPaymentIntentDataTransferData(TypedDict): + amount: NotRequired["int"] + """ + The amount that will be transferred automatically when a charge succeeds. + """ + destination: str + """ + If specified, successful charges will be attributed to the destination + account for tax reporting, and the funds from charges will be transferred + to the destination account. The ID of the resulting transfer will be + returned on the successful charge's `transfer` field. + """ - class CreateParamsPaymentIntentDataShipping(TypedDict): - address: "Session.CreateParamsPaymentIntentDataShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired["str"] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired["str"] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired["str"] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ + class CreateParamsPaymentIntentDataShipping(TypedDict): + address: "Session.CreateParamsPaymentIntentDataShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired["str"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: str + """ + Recipient name. + """ + phone: NotRequired["str"] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired["str"] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ - class CreateParamsPaymentIntentDataShippingAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: str - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsPaymentIntentDataShippingAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: str + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreateParamsLineItem(TypedDict): - adjustable_quantity: NotRequired[ - "Session.CreateParamsLineItemAdjustableQuantity" - ] - """ - When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout. - """ - dynamic_tax_rates: NotRequired["List[str]"] - """ - The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU. - """ - price: NotRequired["str"] - """ - The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required. - """ - price_data: NotRequired["Session.CreateParamsLineItemPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired["int"] - """ - The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`. - """ - tax_rates: NotRequired["List[str]"] - """ - The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. - """ + class CreateParamsLineItem(TypedDict): + adjustable_quantity: NotRequired[ + "Session.CreateParamsLineItemAdjustableQuantity" + ] + """ + When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout. + """ + dynamic_tax_rates: NotRequired["List[str]"] + """ + The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU. + """ + price: NotRequired["str"] + """ + The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required. + """ + price_data: NotRequired["Session.CreateParamsLineItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired["int"] + """ + The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`. + """ + tax_rates: NotRequired["List[str]"] + """ + The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. + """ - class CreateParamsLineItemPriceData(TypedDict): - 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). - """ - product: NotRequired["str"] - """ - The ID of the product that this price will belong to. One of `product` or `product_data` is required. - """ - product_data: NotRequired[ - "Session.CreateParamsLineItemPriceDataProductData" - ] - """ - Data used to generate a new product object inline. One of `product` or `product_data` is required. - """ - recurring: NotRequired[ - "Session.CreateParamsLineItemPriceDataRecurring" - ] - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class CreateParamsLineItemPriceData(TypedDict): + 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). + """ + product: NotRequired["str"] + """ + The ID of the product that this price will belong to. One of `product` or `product_data` is required. + """ + product_data: NotRequired[ + "Session.CreateParamsLineItemPriceDataProductData" + ] + """ + Data used to generate a new product object inline. One of `product` or `product_data` is required. + """ + recurring: NotRequired[ + "Session.CreateParamsLineItemPriceDataRecurring" + ] + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class CreateParamsLineItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ + class CreateParamsLineItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ - class CreateParamsLineItemPriceDataProductData(TypedDict): - description: NotRequired["str"] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - images: NotRequired["List[str]"] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - 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`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - tax_code: NotRequired["str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ + class CreateParamsLineItemPriceDataProductData(TypedDict): + description: NotRequired["str"] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + images: NotRequired["List[str]"] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + 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`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + tax_code: NotRequired["str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ - 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. - """ - maximum: NotRequired["int"] - """ - The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. - """ - minimum: NotRequired["int"] - """ - The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. - """ + 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. + """ + maximum: NotRequired["int"] + """ + The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. + """ + minimum: NotRequired["int"] + """ + The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. + """ - class CreateParamsInvoiceCreation(TypedDict): - enabled: bool - """ - Set to `true` to enable invoice creation. - """ - invoice_data: NotRequired[ - "Session.CreateParamsInvoiceCreationInvoiceData" - ] - """ - Parameters passed when creating invoices for payment-mode Checkout Sessions. - """ + class CreateParamsInvoiceCreation(TypedDict): + enabled: bool + """ + Set to `true` to enable invoice creation. + """ + invoice_data: NotRequired[ + "Session.CreateParamsInvoiceCreationInvoiceData" + ] + """ + Parameters passed when creating invoices for payment-mode Checkout Sessions. + """ - class CreateParamsInvoiceCreationInvoiceData(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the invoice. - """ - custom_fields: NotRequired[ - "Literal['']|List[Session.CreateParamsInvoiceCreationInvoiceDataCustomField]" - ] - """ - Default custom fields to be displayed on invoices for this customer. - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - footer: NotRequired["str"] - """ - Default footer to be displayed on invoices for this customer. - """ - 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`. - """ - rendering_options: NotRequired[ - "Literal['']|Session.CreateParamsInvoiceCreationInvoiceDataRenderingOptions" - ] - """ - Default options for invoice PDF rendering for this customer. - """ + class CreateParamsInvoiceCreationInvoiceData(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the invoice. + """ + custom_fields: NotRequired[ + "Literal['']|List[Session.CreateParamsInvoiceCreationInvoiceDataCustomField]" + ] + """ + Default custom fields to be displayed on invoices for this customer. + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired["str"] + """ + Default footer to be displayed on invoices for this customer. + """ + 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`. + """ + rendering_options: NotRequired[ + "Literal['']|Session.CreateParamsInvoiceCreationInvoiceDataRenderingOptions" + ] + """ + Default options for invoice PDF rendering for this customer. + """ - class CreateParamsInvoiceCreationInvoiceDataRenderingOptions( - TypedDict - ): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - 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. - """ + class CreateParamsInvoiceCreationInvoiceDataRenderingOptions(TypedDict): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + 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. + """ - class CreateParamsInvoiceCreationInvoiceDataCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 30 characters. - """ - value: str - """ - The value of the custom field. This may be up to 30 characters. - """ + class CreateParamsInvoiceCreationInvoiceDataCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 30 characters. + """ + value: str + """ + The value of the custom field. This may be up to 30 characters. + """ - class CreateParamsDiscount(TypedDict): - coupon: NotRequired["str"] - """ - The ID of the coupon to apply to this Session. - """ - promotion_code: NotRequired["str"] - """ - The ID of a promotion code to apply to this Session. - """ + class CreateParamsDiscount(TypedDict): + coupon: NotRequired["str"] + """ + The ID of the coupon to apply to this Session. + """ + promotion_code: NotRequired["str"] + """ + The ID of a promotion code to apply to this Session. + """ - class CreateParamsCustomerUpdate(TypedDict): - address: NotRequired["Literal['auto', 'never']"] - """ - Describes whether Checkout saves the billing address onto `customer.address`. - To always collect a full billing address, use `billing_address_collection`. Defaults to `never`. - """ - name: NotRequired["Literal['auto', 'never']"] - """ - Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`. - """ - shipping: NotRequired["Literal['auto', 'never']"] - """ - Describes whether Checkout saves shipping information onto `customer.shipping`. - To collect shipping information, use `shipping_address_collection`. Defaults to `never`. - """ + class CreateParamsCustomerUpdate(TypedDict): + address: NotRequired["Literal['auto', 'never']"] + """ + Describes whether Checkout saves the billing address onto `customer.address`. + To always collect a full billing address, use `billing_address_collection`. Defaults to `never`. + """ + name: NotRequired["Literal['auto', 'never']"] + """ + Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`. + """ + shipping: NotRequired["Literal['auto', 'never']"] + """ + Describes whether Checkout saves shipping information onto `customer.shipping`. + To collect shipping information, use `shipping_address_collection`. Defaults to `never`. + """ - class CreateParamsCustomText(TypedDict): - shipping_address: NotRequired[ - "Literal['']|Session.CreateParamsCustomTextShippingAddress" - ] - """ - Custom text that should be displayed alongside shipping address collection. - """ - submit: NotRequired[ - "Literal['']|Session.CreateParamsCustomTextSubmit" - ] - """ - Custom text that should be displayed alongside the payment confirmation button. - """ - terms_of_service_acceptance: NotRequired[ - "Literal['']|Session.CreateParamsCustomTextTermsOfServiceAcceptance" - ] - """ - Custom text that should be displayed in place of the default terms of service agreement text. - """ + class CreateParamsCustomText(TypedDict): + shipping_address: NotRequired[ + "Literal['']|Session.CreateParamsCustomTextShippingAddress" + ] + """ + Custom text that should be displayed alongside shipping address collection. + """ + submit: NotRequired["Literal['']|Session.CreateParamsCustomTextSubmit"] + """ + Custom text that should be displayed alongside the payment confirmation button. + """ + terms_of_service_acceptance: NotRequired[ + "Literal['']|Session.CreateParamsCustomTextTermsOfServiceAcceptance" + ] + """ + Custom text that should be displayed in place of the default terms of service agreement text. + """ - class CreateParamsCustomTextTermsOfServiceAcceptance(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ + class CreateParamsCustomTextTermsOfServiceAcceptance(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ - class CreateParamsCustomTextSubmit(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ + class CreateParamsCustomTextSubmit(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ - class CreateParamsCustomTextShippingAddress(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ + class CreateParamsCustomTextShippingAddress(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ - class CreateParamsCustomField(TypedDict): - dropdown: NotRequired["Session.CreateParamsCustomFieldDropdown"] - """ - Configuration for `type=dropdown` fields. - """ - key: str - """ - String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. - """ - label: "Session.CreateParamsCustomFieldLabel" - """ - The label for the field, displayed to the customer. - """ - numeric: NotRequired["Session.CreateParamsCustomFieldNumeric"] - """ - Configuration for `type=numeric` fields. - """ - optional: NotRequired["bool"] - """ - Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. - """ - text: NotRequired["Session.CreateParamsCustomFieldText"] - """ - Configuration for `type=text` fields. - """ - type: Literal["dropdown", "numeric", "text"] - """ - The type of the field. - """ + class CreateParamsCustomField(TypedDict): + dropdown: NotRequired["Session.CreateParamsCustomFieldDropdown"] + """ + Configuration for `type=dropdown` fields. + """ + key: str + """ + String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + """ + label: "Session.CreateParamsCustomFieldLabel" + """ + The label for the field, displayed to the customer. + """ + numeric: NotRequired["Session.CreateParamsCustomFieldNumeric"] + """ + Configuration for `type=numeric` fields. + """ + optional: NotRequired["bool"] + """ + Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + """ + text: NotRequired["Session.CreateParamsCustomFieldText"] + """ + Configuration for `type=text` fields. + """ + type: Literal["dropdown", "numeric", "text"] + """ + The type of the field. + """ - class CreateParamsCustomFieldText(TypedDict): - maximum_length: NotRequired["int"] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired["int"] - """ - The minimum character length requirement for the customer's input. - """ + class CreateParamsCustomFieldText(TypedDict): + maximum_length: NotRequired["int"] + """ + The maximum character length constraint for the customer's input. + """ + minimum_length: NotRequired["int"] + """ + The minimum character length requirement for the customer's input. + """ - class CreateParamsCustomFieldNumeric(TypedDict): - maximum_length: NotRequired["int"] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired["int"] - """ - The minimum character length requirement for the customer's input. - """ + class CreateParamsCustomFieldNumeric(TypedDict): + maximum_length: NotRequired["int"] + """ + The maximum character length constraint for the customer's input. + """ + minimum_length: NotRequired["int"] + """ + The minimum character length requirement for the customer's input. + """ - class CreateParamsCustomFieldLabel(TypedDict): - custom: str - """ - Custom text for the label, displayed to the customer. Up to 50 characters. - """ - type: Literal["custom"] - """ - The type of the label. - """ + class CreateParamsCustomFieldLabel(TypedDict): + custom: str + """ + Custom text for the label, displayed to the customer. Up to 50 characters. + """ + type: Literal["custom"] + """ + The type of the label. + """ - class CreateParamsCustomFieldDropdown(TypedDict): - options: List["Session.CreateParamsCustomFieldDropdownOption"] - """ - The options available for the customer to select. Up to 200 options allowed. - """ + class CreateParamsCustomFieldDropdown(TypedDict): + options: List["Session.CreateParamsCustomFieldDropdownOption"] + """ + The options available for the customer to select. Up to 200 options allowed. + """ - class CreateParamsCustomFieldDropdownOption(TypedDict): - label: str - """ - The label for the option, displayed to the customer. Up to 100 characters. - """ - value: str - """ - The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. - """ + class CreateParamsCustomFieldDropdownOption(TypedDict): + label: str + """ + The label for the option, displayed to the customer. Up to 100 characters. + """ + value: str + """ + The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + """ - class CreateParamsConsentCollection(TypedDict): - promotions: NotRequired["Literal['auto', 'none']"] - """ - If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout - Session will determine whether to display an option to opt into promotional communication - from the merchant depending on the customer's locale. Only available to US merchants. - """ - terms_of_service: NotRequired["Literal['none', 'required']"] - """ - If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. - There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). - """ + class CreateParamsConsentCollection(TypedDict): + promotions: NotRequired["Literal['auto', 'none']"] + """ + If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + Session will determine whether to display an option to opt into promotional communication + from the merchant depending on the customer's locale. Only available to US merchants. + """ + terms_of_service: NotRequired["Literal['none', 'required']"] + """ + If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. + There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). + """ - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Set to true to enable automatic taxes. - """ + class CreateParamsAutomaticTax(TypedDict): + enabled: bool + """ + Set to true to enable automatic taxes. + """ - class CreateParamsAfterExpiration(TypedDict): - recovery: NotRequired[ - "Session.CreateParamsAfterExpirationRecovery" - ] - """ - Configure a Checkout Session that can be used to recover an expired session. - """ + class CreateParamsAfterExpiration(TypedDict): + recovery: NotRequired["Session.CreateParamsAfterExpirationRecovery"] + """ + Configure a Checkout Session that can be used to recover an expired session. + """ - class CreateParamsAfterExpirationRecovery(TypedDict): - allow_promotion_codes: NotRequired["bool"] - """ - Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` - """ - enabled: bool - """ - If `true`, a recovery URL will be generated to recover this Checkout Session if it - expires before a successful transaction is completed. It will be attached to the - Checkout Session object upon expiration. - """ + class CreateParamsAfterExpirationRecovery(TypedDict): + allow_promotion_codes: NotRequired["bool"] + """ + Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` + """ + enabled: bool + """ + If `true`, a recovery URL will be generated to recover this Checkout Session if it + expires before a successful transaction is completed. It will be attached to the + Checkout Session object upon expiration. + """ - class ExpireParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ExpireParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ListParams(RequestOptions): - customer: NotRequired["str"] - """ - Only return the Checkout Sessions for the Customer specified. - """ - customer_details: NotRequired["Session.ListParamsCustomerDetails"] - """ - Only return the Checkout Sessions for the Customer details specified. - """ - 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. - """ - payment_intent: NotRequired["str"] - """ - Only return the Checkout Session for the PaymentIntent specified. - """ - payment_link: NotRequired["str"] - """ - Only return the Checkout Sessions for the Payment Link specified. - """ - 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. - """ - subscription: NotRequired["str"] - """ - Only return the Checkout Session for the subscription specified. - """ + class ListParams(RequestOptions): + customer: NotRequired["str"] + """ + Only return the Checkout Sessions for the Customer specified. + """ + customer_details: NotRequired["Session.ListParamsCustomerDetails"] + """ + Only return the Checkout Sessions for the Customer details specified. + """ + 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. + """ + payment_intent: NotRequired["str"] + """ + Only return the Checkout Session for the PaymentIntent specified. + """ + payment_link: NotRequired["str"] + """ + Only return the Checkout Sessions for the Payment Link specified. + """ + 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['complete', 'expired', 'open']"] + """ + Only return the Checkout Sessions matching the given status. + """ + subscription: NotRequired["str"] + """ + Only return the Checkout Session for the subscription specified. + """ - class ListParamsCustomerDetails(TypedDict): - email: str - """ - Customer's email address. - """ + class ListParamsCustomerDetails(TypedDict): + email: str + """ + Customer's email address. + """ - class ListLineItemsParams(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. - """ + class ListLineItemsParams(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. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ after_expiration: Optional[AfterExpiration] """ diff --git a/stripe/api_resources/country_spec.py b/stripe/api_resources/country_spec.py index b98e13f73..33f82029d 100644 --- a/stripe/api_resources/country_spec.py +++ b/stripe/api_resources/country_spec.py @@ -5,7 +5,7 @@ from stripe.request_options import RequestOptions from stripe.stripe_object import StripeObject from typing import ClassVar, Dict, List, Optional -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing_extensions import Literal, NotRequired, Unpack class CountrySpec(ListableAPIResource["CountrySpec"]): @@ -45,31 +45,29 @@ class Individual(StripeObject): individual: Individual _inner_class_types = {"company": Company, "individual": Individual} - if TYPE_CHECKING: - - 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. - """ + 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. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ default_currency: str """ diff --git a/stripe/api_resources/coupon.py b/stripe/api_resources/coupon.py index 97b45b05c..ff1fd9e4a 100644 --- a/stripe/api_resources/coupon.py +++ b/stripe/api_resources/coupon.py @@ -11,13 +11,7 @@ from stripe.stripe_object import StripeObject from stripe.util import class_method_variant from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, NotRequired, TypedDict, Unpack from urllib.parse import quote_plus @@ -47,150 +41,148 @@ class CurrencyOptions(StripeObject): Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. """ - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - amount_off: NotRequired["int"] - """ - A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). - """ - applies_to: NotRequired["Coupon.CreateParamsAppliesTo"] - """ - A hash containing directions for what this Coupon will apply discounts to. - """ - currency: NotRequired["str"] - """ - Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). - """ - currency_options: NotRequired[ - "Dict[str, Coupon.CreateParamsCurrencyOptions]" - ] - """ - Coupons defined in each available currency option (only supported if `amount_off` is passed). 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). - """ - duration: NotRequired["Literal['forever', 'once', 'repeating']"] - """ - Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. - """ - duration_in_months: NotRequired["int"] - """ - Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - id: NotRequired["str"] - """ - Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. - """ - max_redemptions: NotRequired["int"] - """ - A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. - """ - metadata: NotRequired["Literal['']|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`. - """ - name: NotRequired["str"] - """ - Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. - """ - percent_off: NotRequired["float"] - """ - A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). - """ - redeem_by: NotRequired["int"] - """ - Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. - """ + class CreateParams(RequestOptions): + amount_off: NotRequired["int"] + """ + A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). + """ + applies_to: NotRequired["Coupon.CreateParamsAppliesTo"] + """ + A hash containing directions for what this Coupon will apply discounts to. + """ + currency: NotRequired["str"] + """ + Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). + """ + currency_options: NotRequired[ + "Dict[str, Coupon.CreateParamsCurrencyOptions]" + ] + """ + Coupons defined in each available currency option (only supported if `amount_off` is passed). 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). + """ + duration: NotRequired["Literal['forever', 'once', 'repeating']"] + """ + Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. + """ + duration_in_months: NotRequired["int"] + """ + Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + id: NotRequired["str"] + """ + Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. + """ + max_redemptions: NotRequired["int"] + """ + A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. + """ + metadata: NotRequired["Literal['']|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`. + """ + name: NotRequired["str"] + """ + Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. + """ + percent_off: NotRequired["float"] + """ + A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). + """ + redeem_by: NotRequired["int"] + """ + Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. + """ - class CreateParamsCurrencyOptions(TypedDict): - amount_off: int - """ - A positive integer representing the amount to subtract from an invoice total. - """ + class CreateParamsCurrencyOptions(TypedDict): + amount_off: int + """ + A positive integer representing the amount to subtract from an invoice total. + """ - class CreateParamsAppliesTo(TypedDict): - products: NotRequired["List[str]"] - """ - An array of Product IDs that this Coupon will apply to. - """ + class CreateParamsAppliesTo(TypedDict): + products: NotRequired["List[str]"] + """ + An array of Product IDs that this Coupon will apply to. + """ - class DeleteParams(RequestOptions): - pass + class DeleteParams(RequestOptions): + pass - class ListParams(RequestOptions): - created: NotRequired["Coupon.ListParamsCreated|int"] - """ - A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. - """ - 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 ListParams(RequestOptions): + created: NotRequired["Coupon.ListParamsCreated|int"] + """ + A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + """ + 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 ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - currency_options: NotRequired[ - "Dict[str, Coupon.ModifyParamsCurrencyOptions]" - ] - """ - Coupons defined in each available currency option (only supported if the coupon is amount-based). 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). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - name: NotRequired["str"] - """ - Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. - """ + class ModifyParams(RequestOptions): + currency_options: NotRequired[ + "Dict[str, Coupon.ModifyParamsCurrencyOptions]" + ] + """ + Coupons defined in each available currency option (only supported if the coupon is amount-based). 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). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + name: NotRequired["str"] + """ + Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. + """ - class ModifyParamsCurrencyOptions(TypedDict): - amount_off: int - """ - A positive integer representing the amount to subtract from an invoice total. - """ + class ModifyParamsCurrencyOptions(TypedDict): + amount_off: int + """ + A positive integer representing the amount to subtract from an invoice total. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ amount_off: Optional[int] """ diff --git a/stripe/api_resources/credit_note.py b/stripe/api_resources/credit_note.py index c91056b2d..1730eb955 100644 --- a/stripe/api_resources/credit_note.py +++ b/stripe/api_resources/credit_note.py @@ -160,379 +160,435 @@ class TaxAmount(StripeObject): The amount on which tax is calculated, in cents (or local equivalent). """ - if TYPE_CHECKING: + class CreateParams(RequestOptions): + amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) representing the total amount of the credit note. + """ + credit_amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + """ + effective_at: NotRequired["int"] + """ + The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + invoice: str + """ + ID of the invoice. + """ + lines: NotRequired["List[CreditNote.CreateParamsLine]"] + """ + Line items that make up the credit note. + """ + memo: NotRequired["str"] + """ + The credit note's memo appears on the credit note PDF. + """ + 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`. + """ + out_of_band_amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + """ + reason: NotRequired[ + "Literal['duplicate', 'fraudulent', 'order_change', 'product_unsatisfactory']" + ] + """ + Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + """ + refund: NotRequired["str"] + """ + ID of an existing refund to link this credit note to. + """ + refund_amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + """ + shipping_cost: NotRequired["CreditNote.CreateParamsShippingCost"] + """ + When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + """ - class CreateParams(RequestOptions): - amount: NotRequired["int"] - """ - The integer amount in cents (or local equivalent) representing the total amount of the credit note. - """ - credit_amount: NotRequired["int"] - """ - The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. - """ - effective_at: NotRequired["int"] - """ - The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - invoice: str - """ - ID of the invoice. - """ - lines: NotRequired["List[CreditNote.CreateParamsLine]"] - """ - Line items that make up the credit note. - """ - memo: NotRequired["str"] - """ - The credit note's memo appears on the credit note PDF. - """ - 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`. - """ - out_of_band_amount: NotRequired["int"] - """ - The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. - """ - reason: NotRequired[ - "Literal['duplicate', 'fraudulent', 'order_change', 'product_unsatisfactory']" - ] - """ - Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` - """ - refund: NotRequired["str"] - """ - ID of an existing refund to link this credit note to. - """ - refund_amount: NotRequired["int"] - """ - The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. - """ - shipping_cost: NotRequired["CreditNote.CreateParamsShippingCost"] - """ - When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. - """ + class CreateParamsShippingCost(TypedDict): + shipping_rate: NotRequired["str"] + """ + The ID of the shipping rate to use for this order. + """ - class CreateParamsShippingCost(TypedDict): - shipping_rate: NotRequired["str"] - """ - The ID of the shipping rate to use for this order. - """ + class CreateParamsLine(TypedDict): + amount: NotRequired["int"] + """ + The line item amount to credit. Only valid when `type` is `invoice_line_item`. + """ + description: NotRequired["str"] + """ + The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + """ + invoice_line_item: NotRequired["str"] + """ + The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + """ + quantity: NotRequired["int"] + """ + The line item quantity to credit. + """ + tax_amounts: NotRequired[ + "Literal['']|List[CreditNote.CreateParamsLineTaxAmount]" + ] + """ + A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + """ + type: Literal["custom_line_item", "invoice_line_item"] + """ + Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + """ + unit_amount: NotRequired["int"] + """ + The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class CreateParamsLine(TypedDict): - amount: NotRequired["int"] - """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. - """ - description: NotRequired["str"] - """ - The description of the credit note line item. Only valid when the `type` is `custom_line_item`. - """ - invoice_line_item: NotRequired["str"] - """ - The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. - """ - quantity: NotRequired["int"] - """ - The line item quantity to credit. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item`. - """ - type: Literal["custom_line_item", "invoice_line_item"] - """ - Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` - """ - unit_amount: NotRequired["int"] - """ - The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class CreateParamsLineTaxAmount(TypedDict): + amount: int + """ + The amount, in cents (or local equivalent), of the tax. + """ + tax_rate: str + """ + The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + """ + taxable_amount: int + """ + The amount on which tax is calculated, in cents (or local equivalent). + """ - class ListParams(RequestOptions): - customer: NotRequired["str"] - """ - Only return credit notes for the customer specified by this customer ID. - """ - 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. - """ - invoice: NotRequired["str"] - """ - Only return credit notes for the invoice specified by this invoice ID. - """ - 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 ListParams(RequestOptions): + customer: NotRequired["str"] + """ + Only return credit notes for the customer specified by this customer ID. + """ + 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. + """ + invoice: NotRequired["str"] + """ + Only return credit notes for the invoice specified by this invoice ID. + """ + 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. - """ - memo: NotRequired["str"] - """ - Credit note memo. - """ - 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`. - """ + class ModifyParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + memo: NotRequired["str"] + """ + Credit note memo. + """ + 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`. + """ - class PreviewParams(RequestOptions): - amount: NotRequired["int"] - """ - The integer amount in cents (or local equivalent) representing the total amount of the credit note. - """ - credit_amount: NotRequired["int"] - """ - The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. - """ - effective_at: NotRequired["int"] - """ - The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - invoice: str - """ - ID of the invoice. - """ - lines: NotRequired["List[CreditNote.PreviewParamsLine]"] - """ - Line items that make up the credit note. - """ - memo: NotRequired["str"] - """ - The credit note's memo appears on the credit note PDF. - """ - 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`. - """ - out_of_band_amount: NotRequired["int"] - """ - The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. - """ - reason: NotRequired[ - "Literal['duplicate', 'fraudulent', 'order_change', 'product_unsatisfactory']" - ] - """ - Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` - """ - refund: NotRequired["str"] - """ - ID of an existing refund to link this credit note to. - """ - refund_amount: NotRequired["int"] - """ - The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. - """ - shipping_cost: NotRequired["CreditNote.PreviewParamsShippingCost"] - """ - When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. - """ + class PreviewParams(RequestOptions): + amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) representing the total amount of the credit note. + """ + credit_amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + """ + effective_at: NotRequired["int"] + """ + The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + invoice: str + """ + ID of the invoice. + """ + lines: NotRequired["List[CreditNote.PreviewParamsLine]"] + """ + Line items that make up the credit note. + """ + memo: NotRequired["str"] + """ + The credit note's memo appears on the credit note PDF. + """ + 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`. + """ + out_of_band_amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + """ + reason: NotRequired[ + "Literal['duplicate', 'fraudulent', 'order_change', 'product_unsatisfactory']" + ] + """ + Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + """ + refund: NotRequired["str"] + """ + ID of an existing refund to link this credit note to. + """ + refund_amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + """ + shipping_cost: NotRequired["CreditNote.PreviewParamsShippingCost"] + """ + When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + """ - class PreviewParamsShippingCost(TypedDict): - shipping_rate: NotRequired["str"] - """ - The ID of the shipping rate to use for this order. - """ + class PreviewParamsShippingCost(TypedDict): + shipping_rate: NotRequired["str"] + """ + The ID of the shipping rate to use for this order. + """ - class PreviewParamsLine(TypedDict): - amount: NotRequired["int"] - """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. - """ - description: NotRequired["str"] - """ - The description of the credit note line item. Only valid when the `type` is `custom_line_item`. - """ - invoice_line_item: NotRequired["str"] - """ - The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. - """ - quantity: NotRequired["int"] - """ - The line item quantity to credit. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item`. - """ - type: Literal["custom_line_item", "invoice_line_item"] - """ - Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` - """ - unit_amount: NotRequired["int"] - """ - The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class PreviewParamsLine(TypedDict): + amount: NotRequired["int"] + """ + The line item amount to credit. Only valid when `type` is `invoice_line_item`. + """ + description: NotRequired["str"] + """ + The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + """ + invoice_line_item: NotRequired["str"] + """ + The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + """ + quantity: NotRequired["int"] + """ + The line item quantity to credit. + """ + tax_amounts: NotRequired[ + "Literal['']|List[CreditNote.PreviewParamsLineTaxAmount]" + ] + """ + A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + """ + type: Literal["custom_line_item", "invoice_line_item"] + """ + Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + """ + unit_amount: NotRequired["int"] + """ + The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class PreviewLinesParams(RequestOptions): - amount: NotRequired["int"] - """ - The integer amount in cents (or local equivalent) representing the total amount of the credit note. - """ - credit_amount: NotRequired["int"] - """ - The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. - """ - effective_at: NotRequired["int"] - """ - The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. - """ - 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. - """ - invoice: str - """ - ID of the invoice. - """ - 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. - """ - lines: NotRequired["List[CreditNote.PreviewLinesParamsLine]"] - """ - Line items that make up the credit note. - """ - memo: NotRequired["str"] - """ - The credit note's memo appears on the credit note PDF. - """ - 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`. - """ - out_of_band_amount: NotRequired["int"] - """ - The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. - """ - reason: NotRequired[ - "Literal['duplicate', 'fraudulent', 'order_change', 'product_unsatisfactory']" - ] - """ - Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` - """ - refund: NotRequired["str"] - """ - ID of an existing refund to link this credit note to. - """ - refund_amount: NotRequired["int"] - """ - The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. - """ - shipping_cost: NotRequired[ - "CreditNote.PreviewLinesParamsShippingCost" - ] - """ - When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. - """ - 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 PreviewParamsLineTaxAmount(TypedDict): + amount: int + """ + The amount, in cents (or local equivalent), of the tax. + """ + tax_rate: str + """ + The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + """ + taxable_amount: int + """ + The amount on which tax is calculated, in cents (or local equivalent). + """ - class PreviewLinesParamsShippingCost(TypedDict): - shipping_rate: NotRequired["str"] - """ - The ID of the shipping rate to use for this order. - """ + class PreviewLinesParams(RequestOptions): + amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) representing the total amount of the credit note. + """ + credit_amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + """ + effective_at: NotRequired["int"] + """ + The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + """ + 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. + """ + invoice: str + """ + ID of the invoice. + """ + 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. + """ + lines: NotRequired["List[CreditNote.PreviewLinesParamsLine]"] + """ + Line items that make up the credit note. + """ + memo: NotRequired["str"] + """ + The credit note's memo appears on the credit note PDF. + """ + 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`. + """ + out_of_band_amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + """ + reason: NotRequired[ + "Literal['duplicate', 'fraudulent', 'order_change', 'product_unsatisfactory']" + ] + """ + Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + """ + refund: NotRequired["str"] + """ + ID of an existing refund to link this credit note to. + """ + refund_amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + """ + shipping_cost: NotRequired["CreditNote.PreviewLinesParamsShippingCost"] + """ + When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + """ + 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 PreviewLinesParamsLine(TypedDict): - amount: NotRequired["int"] - """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. - """ - description: NotRequired["str"] - """ - The description of the credit note line item. Only valid when the `type` is `custom_line_item`. - """ - invoice_line_item: NotRequired["str"] - """ - The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. - """ - quantity: NotRequired["int"] - """ - The line item quantity to credit. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item`. - """ - type: Literal["custom_line_item", "invoice_line_item"] - """ - Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` - """ - unit_amount: NotRequired["int"] - """ - The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class PreviewLinesParamsShippingCost(TypedDict): + shipping_rate: NotRequired["str"] + """ + The ID of the shipping rate to use for this order. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class PreviewLinesParamsLine(TypedDict): + amount: NotRequired["int"] + """ + The line item amount to credit. Only valid when `type` is `invoice_line_item`. + """ + description: NotRequired["str"] + """ + The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + """ + invoice_line_item: NotRequired["str"] + """ + The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + """ + quantity: NotRequired["int"] + """ + The line item quantity to credit. + """ + tax_amounts: NotRequired[ + "Literal['']|List[CreditNote.PreviewLinesParamsLineTaxAmount]" + ] + """ + A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + """ + type: Literal["custom_line_item", "invoice_line_item"] + """ + Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + """ + unit_amount: NotRequired["int"] + """ + The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class VoidCreditNoteParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class PreviewLinesParamsLineTaxAmount(TypedDict): + amount: int + """ + The amount, in cents (or local equivalent), of the tax. + """ + tax_rate: str + """ + The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + """ + taxable_amount: int + """ + The amount on which tax is calculated, in cents (or local equivalent). + """ - class ListLinesParams(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. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + + class VoidCreditNoteParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + + class ListLinesParams(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. + """ amount: int """ diff --git a/stripe/api_resources/credit_note_line_item.py b/stripe/api_resources/credit_note_line_item.py index 85dc7c526..e8449e08a 100644 --- a/stripe/api_resources/credit_note_line_item.py +++ b/stripe/api_resources/credit_note_line_item.py @@ -72,25 +72,23 @@ class TaxAmount(StripeObject): The amount on which tax is calculated, in cents (or local equivalent). """ - if TYPE_CHECKING: - - 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. - """ + 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. + """ amount: int """ diff --git a/stripe/api_resources/customer.py b/stripe/api_resources/customer.py index 7679c19ca..3ec59d83d 100644 --- a/stripe/api_resources/customer.py +++ b/stripe/api_resources/customer.py @@ -221,1050 +221,1040 @@ class Location(StripeObject): """ _inner_class_types = {"location": Location} - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - address: NotRequired["Literal['']|Customer.CreateParamsAddress"] - """ - The customer's address. - """ - balance: NotRequired["int"] - """ - An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. - """ - cash_balance: NotRequired["Customer.CreateParamsCashBalance"] - """ - Balance information and default balance settings for this customer. - """ - coupon: NotRequired["str"] - description: NotRequired["str"] - """ - An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. - """ - email: NotRequired["str"] - """ - Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - invoice_prefix: NotRequired["str"] - """ - The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. - """ - invoice_settings: NotRequired[ - "Customer.CreateParamsInvoiceSettings" - ] - """ - Default invoice settings for this customer. - """ - metadata: NotRequired["Literal['']|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`. - """ - name: NotRequired["str"] - """ - The customer's full name or business name. - """ - next_invoice_sequence: NotRequired["int"] - """ - The sequence to be used on the customer's next invoice. Defaults to 1. - """ - payment_method: NotRequired["str"] - phone: NotRequired["str"] - """ - The customer's phone number. - """ - preferred_locales: NotRequired["List[str]"] - """ - Customer's preferred languages, ordered by preference. - """ - promotion_code: NotRequired["str"] - """ - The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. - """ - shipping: NotRequired["Literal['']|Customer.CreateParamsShipping"] - """ - The customer's shipping information. Appears on invoices emailed to this customer. - """ - source: NotRequired["str"] - tax: NotRequired["Customer.CreateParamsTax"] - """ - Tax details about the customer. - """ - tax_exempt: NotRequired[ - "Literal['']|Literal['exempt', 'none', 'reverse']" - ] - """ - The customer's tax exemption. One of `none`, `exempt`, or `reverse`. - """ - tax_id_data: NotRequired["List[Customer.CreateParamsTaxIdDatum]"] - """ - The customer's tax IDs. - """ - test_clock: NotRequired["str"] - """ - ID of the test clock to attach to the customer. - """ - validate: NotRequired["bool"] - - class CreateParamsTaxIdDatum(TypedDict): - type: Literal[ - "ad_nrt", - "ae_trn", - "ar_cuit", - "au_abn", - "au_arn", - "bg_uic", - "bo_tin", - "br_cnpj", - "br_cpf", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "ch_vat", - "cl_tin", - "cn_tin", - "co_nit", - "cr_tin", - "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", - "li_uid", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "no_vat", - "nz_gst", - "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", - "za_vat", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 - """ - Value of the tax ID. - """ - - class CreateParamsTax(TypedDict): - ip_address: NotRequired["Literal['']|str"] - """ - 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. - """ - - class CreateParamsShipping(TypedDict): - address: "Customer.CreateParamsShippingAddress" - """ - Customer shipping address. - """ - name: str - """ - Customer name. - """ - phone: NotRequired["str"] - """ - Customer phone (including extension). - """ - - class CreateParamsShippingAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ - - class CreateParamsInvoiceSettings(TypedDict): - custom_fields: NotRequired[ - "Literal['']|List[Customer.CreateParamsInvoiceSettingsCustomField]" - ] - """ - Default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. - """ - default_payment_method: NotRequired["str"] - """ - ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. - """ - footer: NotRequired["str"] - """ - Default footer to be displayed on invoices for this customer. - """ - rendering_options: NotRequired[ - "Literal['']|Customer.CreateParamsInvoiceSettingsRenderingOptions" - ] - """ - Default options for invoice PDF rendering for this customer. - """ - - class CreateParamsInvoiceSettingsRenderingOptions(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - 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. - """ - - class CreateParamsInvoiceSettingsCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 30 characters. - """ - value: str - """ - The value of the custom field. This may be up to 30 characters. - """ - - class CreateParamsCashBalance(TypedDict): - settings: NotRequired["Customer.CreateParamsCashBalanceSettings"] - """ - Settings controlling the behavior of the customer's cash balance, - such as reconciliation of funds received. - """ - - class CreateParamsCashBalanceSettings(TypedDict): - reconciliation_mode: NotRequired[ - "Literal['automatic', 'manual', 'merchant_default']" - ] - """ - Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). - """ + class CreateParams(RequestOptions): + address: NotRequired["Literal['']|Customer.CreateParamsAddress"] + """ + The customer's address. + """ + balance: NotRequired["int"] + """ + An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. + """ + cash_balance: NotRequired["Customer.CreateParamsCashBalance"] + """ + Balance information and default balance settings for this customer. + """ + coupon: NotRequired["str"] + description: NotRequired["str"] + """ + An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. + """ + email: NotRequired["str"] + """ + Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + invoice_prefix: NotRequired["str"] + """ + The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + """ + invoice_settings: NotRequired["Customer.CreateParamsInvoiceSettings"] + """ + Default invoice settings for this customer. + """ + metadata: NotRequired["Literal['']|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`. + """ + name: NotRequired["str"] + """ + The customer's full name or business name. + """ + next_invoice_sequence: NotRequired["int"] + """ + The sequence to be used on the customer's next invoice. Defaults to 1. + """ + payment_method: NotRequired["str"] + phone: NotRequired["str"] + """ + The customer's phone number. + """ + preferred_locales: NotRequired["List[str]"] + """ + Customer's preferred languages, ordered by preference. + """ + promotion_code: NotRequired["str"] + """ + The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. + """ + shipping: NotRequired["Literal['']|Customer.CreateParamsShipping"] + """ + The customer's shipping information. Appears on invoices emailed to this customer. + """ + source: NotRequired["str"] + tax: NotRequired["Customer.CreateParamsTax"] + """ + Tax details about the customer. + """ + tax_exempt: NotRequired[ + "Literal['']|Literal['exempt', 'none', 'reverse']" + ] + """ + The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + """ + tax_id_data: NotRequired["List[Customer.CreateParamsTaxIdDatum]"] + """ + The customer's tax IDs. + """ + test_clock: NotRequired["str"] + """ + ID of the test clock to attach to the customer. + """ + validate: NotRequired["bool"] + + class CreateParamsTaxIdDatum(TypedDict): + type: Literal[ + "ad_nrt", + "ae_trn", + "ar_cuit", + "au_abn", + "au_arn", + "bg_uic", + "bo_tin", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "cn_tin", + "co_nit", + "cr_tin", + "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", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "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", + "za_vat", + ] + """ + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 + """ + Value of the tax ID. + """ - class CreateParamsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsTax(TypedDict): + ip_address: NotRequired["Literal['']|str"] + """ + 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. + """ - class CreateFundingInstructionsParams(RequestOptions): - bank_transfer: "Customer.CreateFundingInstructionsParamsBankTransfer" - """ - Additional parameters for `bank_transfer` funding types - """ - 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). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - funding_type: Literal["bank_transfer"] - """ - The `funding_type` to get the instructions for. - """ + class CreateParamsShipping(TypedDict): + address: "Customer.CreateParamsShippingAddress" + """ + Customer shipping address. + """ + name: str + """ + Customer name. + """ + phone: NotRequired["str"] + """ + Customer phone (including extension). + """ - class CreateFundingInstructionsParamsBankTransfer(TypedDict): - eu_bank_transfer: NotRequired[ - "Customer.CreateFundingInstructionsParamsBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - "List[Literal['iban', 'sort_code', 'spei', 'zengin']]" - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + class CreateParamsShippingAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The type of the `bank_transfer` - """ + class CreateParamsInvoiceSettings(TypedDict): + custom_fields: NotRequired[ + "Literal['']|List[Customer.CreateParamsInvoiceSettingsCustomField]" + ] + """ + Default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. + """ + default_payment_method: NotRequired["str"] + """ + ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + """ + footer: NotRequired["str"] + """ + Default footer to be displayed on invoices for this customer. + """ + rendering_options: NotRequired[ + "Literal['']|Customer.CreateParamsInvoiceSettingsRenderingOptions" + ] + """ + Default options for invoice PDF rendering for this customer. + """ - class CreateFundingInstructionsParamsBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ + class CreateParamsInvoiceSettingsRenderingOptions(TypedDict): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + 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. + """ - class DeleteParams(RequestOptions): - pass + class CreateParamsInvoiceSettingsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 30 characters. + """ + value: str + """ + The value of the custom field. This may be up to 30 characters. + """ - class DeleteDiscountParams(RequestOptions): - pass + class CreateParamsCashBalance(TypedDict): + settings: NotRequired["Customer.CreateParamsCashBalanceSettings"] + """ + Settings controlling the behavior of the customer's cash balance, + such as reconciliation of funds received. + """ - class ListParams(RequestOptions): - created: NotRequired["Customer.ListParamsCreated|int"] - email: NotRequired["str"] - """ - A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. - """ - 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. - """ - test_clock: NotRequired["str"] - """ - Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. - """ + class CreateParamsCashBalanceSettings(TypedDict): + reconciliation_mode: NotRequired[ + "Literal['automatic', 'manual', 'merchant_default']" + ] + """ + Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class CreateParamsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ListPaymentMethodsParams(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. - """ - type: NotRequired[ - "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay', 'zip']" - ] - """ - An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. - """ + class CreateFundingInstructionsParams(RequestOptions): + bank_transfer: "Customer.CreateFundingInstructionsParamsBankTransfer" + """ + Additional parameters for `bank_transfer` funding types + """ + 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). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + funding_type: Literal["bank_transfer"] + """ + The `funding_type` to get the instructions for. + """ - class ModifyParams(RequestOptions): - address: NotRequired["Literal['']|Customer.ModifyParamsAddress"] - """ - The customer's address. - """ - balance: NotRequired["int"] - """ - An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. - """ - cash_balance: NotRequired["Customer.ModifyParamsCashBalance"] - """ - Balance information and default balance settings for this customer. - """ - coupon: NotRequired["str"] - default_source: NotRequired["str"] - """ - If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. + class CreateFundingInstructionsParamsBankTransfer(TypedDict): + eu_bank_transfer: NotRequired[ + "Customer.CreateFundingInstructionsParamsBankTransferEuBankTransfer" + ] + """ + Configuration for eu_bank_transfer funding type. + """ + requested_address_types: NotRequired[ + "List[Literal['iban', 'sort_code', 'spei', 'zengin']]" + ] + """ + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + """ + type: Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + """ + The type of the `bank_transfer` + """ - If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. - """ - description: NotRequired["str"] - """ - An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. - """ - email: NotRequired["str"] - """ - Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - invoice_prefix: NotRequired["str"] - """ - The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. - """ - invoice_settings: NotRequired[ - "Customer.ModifyParamsInvoiceSettings" - ] - """ - Default invoice settings for this customer. - """ - metadata: NotRequired["Literal['']|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`. - """ - name: NotRequired["str"] - """ - The customer's full name or business name. - """ - next_invoice_sequence: NotRequired["int"] - """ - The sequence to be used on the customer's next invoice. Defaults to 1. - """ - phone: NotRequired["str"] - """ - The customer's phone number. - """ - preferred_locales: NotRequired["List[str]"] - """ - Customer's preferred languages, ordered by preference. - """ - promotion_code: NotRequired["str"] - """ - The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. - """ - shipping: NotRequired["Literal['']|Customer.ModifyParamsShipping"] - """ - The customer's shipping information. Appears on invoices emailed to this customer. - """ - source: NotRequired["str"] - tax: NotRequired["Customer.ModifyParamsTax"] - """ - Tax details about the customer. - """ - tax_exempt: NotRequired[ - "Literal['']|Literal['exempt', 'none', 'reverse']" - ] - """ - The customer's tax exemption. One of `none`, `exempt`, or `reverse`. - """ - validate: NotRequired["bool"] + class CreateFundingInstructionsParamsBankTransferEuBankTransfer(TypedDict): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ - class ModifyParamsTax(TypedDict): - ip_address: NotRequired["Literal['']|str"] - """ - 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. - """ + class DeleteParams(RequestOptions): + pass - class ModifyParamsShipping(TypedDict): - address: "Customer.ModifyParamsShippingAddress" - """ - Customer shipping address. - """ - name: str - """ - Customer name. - """ - phone: NotRequired["str"] - """ - Customer phone (including extension). - """ + class DeleteDiscountParams(RequestOptions): + pass - class ModifyParamsShippingAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class ListParams(RequestOptions): + created: NotRequired["Customer.ListParamsCreated|int"] + email: NotRequired["str"] + """ + A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. + """ + 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. + """ + test_clock: NotRequired["str"] + """ + Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. + """ - class ModifyParamsInvoiceSettings(TypedDict): - custom_fields: NotRequired[ - "Literal['']|List[Customer.ModifyParamsInvoiceSettingsCustomField]" - ] - """ - Default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. - """ - default_payment_method: NotRequired["str"] - """ - ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. - """ - footer: NotRequired["str"] - """ - Default footer to be displayed on invoices for this customer. - """ - rendering_options: NotRequired[ - "Literal['']|Customer.ModifyParamsInvoiceSettingsRenderingOptions" - ] - """ - Default options for invoice PDF rendering for this customer. - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParamsInvoiceSettingsRenderingOptions(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - 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. - """ + class ListPaymentMethodsParams(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. + """ + type: NotRequired[ + "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay', 'zip']" + ] + """ + An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. + """ - class ModifyParamsInvoiceSettingsCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 30 characters. - """ - value: str - """ - The value of the custom field. This may be up to 30 characters. - """ + class ModifyParams(RequestOptions): + address: NotRequired["Literal['']|Customer.ModifyParamsAddress"] + """ + The customer's address. + """ + balance: NotRequired["int"] + """ + An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. + """ + cash_balance: NotRequired["Customer.ModifyParamsCashBalance"] + """ + Balance information and default balance settings for this customer. + """ + coupon: NotRequired["str"] + default_source: NotRequired["str"] + """ + If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. - class ModifyParamsCashBalance(TypedDict): - settings: NotRequired["Customer.ModifyParamsCashBalanceSettings"] - """ - Settings controlling the behavior of the customer's cash balance, - such as reconciliation of funds received. - """ + Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. - class ModifyParamsCashBalanceSettings(TypedDict): - reconciliation_mode: NotRequired[ - "Literal['automatic', 'manual', 'merchant_default']" - ] - """ - Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). - """ + If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. + """ + description: NotRequired["str"] + """ + An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. + """ + email: NotRequired["str"] + """ + Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + invoice_prefix: NotRequired["str"] + """ + The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + """ + invoice_settings: NotRequired["Customer.ModifyParamsInvoiceSettings"] + """ + Default invoice settings for this customer. + """ + metadata: NotRequired["Literal['']|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`. + """ + name: NotRequired["str"] + """ + The customer's full name or business name. + """ + next_invoice_sequence: NotRequired["int"] + """ + The sequence to be used on the customer's next invoice. Defaults to 1. + """ + phone: NotRequired["str"] + """ + The customer's phone number. + """ + preferred_locales: NotRequired["List[str]"] + """ + Customer's preferred languages, ordered by preference. + """ + promotion_code: NotRequired["str"] + """ + The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. + """ + shipping: NotRequired["Literal['']|Customer.ModifyParamsShipping"] + """ + The customer's shipping information. Appears on invoices emailed to this customer. + """ + source: NotRequired["str"] + tax: NotRequired["Customer.ModifyParamsTax"] + """ + Tax details about the customer. + """ + tax_exempt: NotRequired[ + "Literal['']|Literal['exempt', 'none', 'reverse']" + ] + """ + The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + """ + validate: NotRequired["bool"] - class ModifyParamsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class ModifyParamsTax(TypedDict): + ip_address: NotRequired["Literal['']|str"] + """ + 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. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ModifyParamsShipping(TypedDict): + address: "Customer.ModifyParamsShippingAddress" + """ + Customer shipping address. + """ + name: str + """ + Customer name. + """ + phone: NotRequired["str"] + """ + Customer phone (including extension). + """ - class RetrievePaymentMethodParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ModifyParamsShippingAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class SearchParams(RequestOptions): - 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. - """ - page: NotRequired["str"] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). - """ + class ModifyParamsInvoiceSettings(TypedDict): + custom_fields: NotRequired[ + "Literal['']|List[Customer.ModifyParamsInvoiceSettingsCustomField]" + ] + """ + Default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. + """ + default_payment_method: NotRequired["str"] + """ + ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + """ + footer: NotRequired["str"] + """ + Default footer to be displayed on invoices for this customer. + """ + rendering_options: NotRequired[ + "Literal['']|Customer.ModifyParamsInvoiceSettingsRenderingOptions" + ] + """ + Default options for invoice PDF rendering for this customer. + """ - class ModifyCashBalanceParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - settings: NotRequired["Customer.ModifyCashBalanceParamsSettings"] - """ - A hash of settings for this cash balance. - """ + class ModifyParamsInvoiceSettingsRenderingOptions(TypedDict): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + 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. + """ - class ModifyCashBalanceParamsSettings(TypedDict): - reconciliation_mode: NotRequired[ - "Literal['automatic', 'manual', 'merchant_default']" - ] - """ - Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). - """ + class ModifyParamsInvoiceSettingsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 30 characters. + """ + value: str + """ + The value of the custom field. This may be up to 30 characters. + """ - class RetrieveCashBalanceParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ModifyParamsCashBalance(TypedDict): + settings: NotRequired["Customer.ModifyParamsCashBalanceSettings"] + """ + Settings controlling the behavior of the customer's cash balance, + such as reconciliation of funds received. + """ - class FundCashBalanceParams(RequestOptions): - amount: int - """ - Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). - """ - 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). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - reference: NotRequired["str"] - """ - A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. - """ + class ModifyParamsCashBalanceSettings(TypedDict): + reconciliation_mode: NotRequired[ + "Literal['automatic', 'manual', 'merchant_default']" + ] + """ + Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + """ + + class ModifyParamsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ + + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + + class RetrievePaymentMethodParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + + class SearchParams(RequestOptions): + 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. + """ + page: NotRequired["str"] + """ + A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + """ + query: str + """ + The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). + """ + + class ModifyCashBalanceParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + settings: NotRequired["Customer.ModifyCashBalanceParamsSettings"] + """ + A hash of settings for this cash balance. + """ - class CreateBalanceTransactionParams(RequestOptions): - amount: int - """ - The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. - """ - 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). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value. - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ + class ModifyCashBalanceParamsSettings(TypedDict): + reconciliation_mode: NotRequired[ + "Literal['automatic', 'manual', 'merchant_default']" + ] + """ + Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + """ - class RetrieveBalanceTransactionParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveCashBalanceParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ModifyBalanceTransactionParams(RequestOptions): - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ + class FundCashBalanceParams(RequestOptions): + amount: int + """ + Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). + """ + 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). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + reference: NotRequired["str"] + """ + A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. + """ - class ListBalanceTransactionsParams(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. - """ + class CreateBalanceTransactionParams(RequestOptions): + amount: int + """ + The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. + """ + 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). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value. + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ - class RetrieveCashBalanceTransactionParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveBalanceTransactionParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ListCashBalanceTransactionsParams(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. - """ + class ModifyBalanceTransactionParams(RequestOptions): + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ - class CreateSourceParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - 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`. - """ - source: str - """ - Please refer to full [documentation](https://stripe.com/docs/api) instead. - """ - validate: NotRequired["bool"] + class ListBalanceTransactionsParams(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. + """ - class RetrieveSourceParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveCashBalanceTransactionParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ModifySourceParams(RequestOptions): - account_holder_name: NotRequired["str"] - """ - The name of the person or business that owns the bank account. - """ - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - The type of entity that holds the account. This can be either `individual` or `company`. - """ - address_city: NotRequired["str"] - """ - City/District/Suburb/Town/Village. - """ - address_country: NotRequired["str"] - """ - Billing address country, if provided when creating card. - """ - address_line1: NotRequired["str"] - """ - Address line 1 (Street address/PO Box/Company name). - """ - address_line2: NotRequired["str"] - """ - Address line 2 (Apartment/Suite/Unit/Building). - """ - address_state: NotRequired["str"] - """ - State/County/Province/Region. - """ - address_zip: NotRequired["str"] - """ - ZIP or postal code. - """ - exp_month: NotRequired["str"] - """ - Two digit number representing the card's expiration month. - """ - exp_year: NotRequired["str"] - """ - Four digit number representing the card's expiration year. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - name: NotRequired["str"] - """ - Cardholder name. - """ - owner: NotRequired["Customer.ModifySourceParamsOwner"] + class ListCashBalanceTransactionsParams(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. + """ - class ModifySourceParamsOwner(TypedDict): - address: NotRequired["Customer.ModifySourceParamsOwnerAddress"] - """ - Owner's address. - """ - email: NotRequired["str"] - """ - Owner's email address. - """ - name: NotRequired["str"] - """ - Owner's full name. - """ - phone: NotRequired["str"] - """ - Owner's phone number. - """ + class CreateSourceParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + 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`. + """ + source: str + """ + Please refer to full [documentation](https://stripe.com/docs/api) instead. + """ + validate: NotRequired["bool"] - class ModifySourceParamsOwnerAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class RetrieveSourceParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class DeleteSourceParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ModifySourceParams(RequestOptions): + account_holder_name: NotRequired["str"] + """ + The name of the person or business that owns the bank account. + """ + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + The type of entity that holds the account. This can be either `individual` or `company`. + """ + address_city: NotRequired["str"] + """ + City/District/Suburb/Town/Village. + """ + address_country: NotRequired["str"] + """ + Billing address country, if provided when creating card. + """ + address_line1: NotRequired["str"] + """ + Address line 1 (Street address/PO Box/Company name). + """ + address_line2: NotRequired["str"] + """ + Address line 2 (Apartment/Suite/Unit/Building). + """ + address_state: NotRequired["str"] + """ + State/County/Province/Region. + """ + address_zip: NotRequired["str"] + """ + ZIP or postal code. + """ + exp_month: NotRequired["str"] + """ + Two digit number representing the card's expiration month. + """ + exp_year: NotRequired["str"] + """ + Four digit number representing the card's expiration year. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + name: NotRequired["str"] + """ + Cardholder name. + """ + owner: NotRequired["Customer.ModifySourceParamsOwner"] - class ListSourcesParams(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. - """ - object: NotRequired["str"] - """ - Filter sources according to a particular object type. - """ - 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 ModifySourceParamsOwner(TypedDict): + address: NotRequired["Customer.ModifySourceParamsOwnerAddress"] + """ + Owner's address. + """ + email: NotRequired["str"] + """ + Owner's email address. + """ + name: NotRequired["str"] + """ + Owner's full name. + """ + phone: NotRequired["str"] + """ + Owner's phone number. + """ - class CreateTaxIdParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - type: Literal[ - "ad_nrt", - "ae_trn", - "ar_cuit", - "au_abn", - "au_arn", - "bg_uic", - "bo_tin", - "br_cnpj", - "br_cpf", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "ch_vat", - "cl_tin", - "cn_tin", - "co_nit", - "cr_tin", - "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", - "li_uid", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "no_vat", - "nz_gst", - "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", - "za_vat", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 - """ - Value of the tax ID. - """ + class ModifySourceParamsOwnerAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class RetrieveTaxIdParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class DeleteSourceParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + + class ListSourcesParams(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. + """ + object: NotRequired["str"] + """ + Filter sources according to a particular object type. + """ + 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 CreateTaxIdParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + type: Literal[ + "ad_nrt", + "ae_trn", + "ar_cuit", + "au_abn", + "au_arn", + "bg_uic", + "bo_tin", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "cn_tin", + "co_nit", + "cr_tin", + "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", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "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", + "za_vat", + ] + """ + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 + """ + Value of the tax ID. + """ - class DeleteTaxIdParams(RequestOptions): - pass + class RetrieveTaxIdParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ListTaxIdsParams(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. - """ + class DeleteTaxIdParams(RequestOptions): + pass + + class ListTaxIdsParams(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. + """ address: Optional[Address] """ diff --git a/stripe/api_resources/customer_balance_transaction.py b/stripe/api_resources/customer_balance_transaction.py index 46182a0e0..aa5544413 100644 --- a/stripe/api_resources/customer_balance_transaction.py +++ b/stripe/api_resources/customer_balance_transaction.py @@ -100,7 +100,9 @@ def instance_url(self): return "%s/%s/balance_transactions/%s" % (base, cust_extn, extn) @classmethod - def retrieve(cls, id, api_key=None, **params): + def retrieve( + cls, id, api_key=None, **params + ) -> "CustomerBalanceTransaction": raise NotImplementedError( "Can't retrieve a Customer Balance Transaction without a Customer ID. " "Use Customer.retrieve_customer_balance_transaction('cus_123', 'cbtxn_123')" diff --git a/stripe/api_resources/customer_cash_balance_transaction.py b/stripe/api_resources/customer_cash_balance_transaction.py index 0b8ea55ef..b301962dc 100644 --- a/stripe/api_resources/customer_cash_balance_transaction.py +++ b/stripe/api_resources/customer_cash_balance_transaction.py @@ -139,31 +139,29 @@ class UnappliedFromPayment(StripeObject): The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. """ - if TYPE_CHECKING: - - 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. - """ + 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. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ adjusted_for_overdraft: Optional[AdjustedForOverdraft] applied_to_payment: Optional[AppliedToPayment] diff --git a/stripe/api_resources/dispute.py b/stripe/api_resources/dispute.py index e3bde8751..360178414 100644 --- a/stripe/api_resources/dispute.py +++ b/stripe/api_resources/dispute.py @@ -189,192 +189,190 @@ class Card(StripeObject): """ _inner_class_types = {"card": Card} - if TYPE_CHECKING: - - class CloseParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class CloseParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ListParams(RequestOptions): - charge: NotRequired["str"] - """ - Only return disputes associated to the charge specified by this charge ID. - """ - created: NotRequired["Dispute.ListParamsCreated|int"] - 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. - """ - payment_intent: NotRequired["str"] - """ - Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. - """ - 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 ListParams(RequestOptions): + charge: NotRequired["str"] + """ + Only return disputes associated to the charge specified by this charge ID. + """ + created: NotRequired["Dispute.ListParamsCreated|int"] + 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. + """ + payment_intent: NotRequired["str"] + """ + Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. + """ + 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 ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - evidence: NotRequired["Dispute.ModifyParamsEvidence"] - """ - Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - submit: NotRequired["bool"] - """ - Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). - """ + class ModifyParams(RequestOptions): + evidence: NotRequired["Dispute.ModifyParamsEvidence"] + """ + Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + submit: NotRequired["bool"] + """ + Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). + """ - class ModifyParamsEvidence(TypedDict): - access_activity_log: NotRequired["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. Has a maximum character count of 20,000. - """ - billing_address: NotRequired["str"] - """ - The billing address provided by the customer. - """ - cancellation_policy: NotRequired["str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. - """ - cancellation_policy_disclosure: NotRequired["str"] - """ - An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. - """ - cancellation_rebuttal: NotRequired["str"] - """ - A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000. - """ - customer_communication: NotRequired["str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. - """ - customer_email_address: NotRequired["str"] - """ - The email address of the customer. - """ - customer_name: NotRequired["str"] - """ - The name of the customer. - """ - customer_purchase_ip: NotRequired["str"] - """ - The IP address that the customer used when making the purchase. - """ - customer_signature: NotRequired["str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. - """ - duplicate_charge_documentation: NotRequired["str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. - """ - duplicate_charge_explanation: NotRequired["str"] - """ - An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000. - """ - duplicate_charge_id: NotRequired["str"] - """ - The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. - """ - product_description: NotRequired["str"] - """ - A description of the product or service that was sold. Has a maximum character count of 20,000. - """ - receipt: NotRequired["str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. - """ - refund_policy: NotRequired["str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. - """ - refund_policy_disclosure: NotRequired["str"] - """ - Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. - """ - refund_refusal_explanation: NotRequired["str"] - """ - A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000. - """ - service_date: NotRequired["str"] - """ - The date on which the customer received or began receiving the purchased service, in a clear human-readable format. - """ - service_documentation: NotRequired["str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. - """ - shipping_address: NotRequired["str"] - """ - The address to which a physical product was shipped. You should try to include as complete address information as possible. - """ - shipping_carrier: NotRequired["str"] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. - """ - shipping_date: NotRequired["str"] - """ - The date on which a physical product began its route to the shipping address, in a clear human-readable format. - """ - shipping_documentation: NotRequired["str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. - """ - shipping_tracking_number: NotRequired["str"] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - uncategorized_file: NotRequired["str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. - """ - uncategorized_text: NotRequired["str"] - """ - Any additional evidence or statements. Has a maximum character count of 20,000. - """ + class ModifyParamsEvidence(TypedDict): + access_activity_log: NotRequired["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. Has a maximum character count of 20,000. + """ + billing_address: NotRequired["str"] + """ + The billing address provided by the customer. + """ + cancellation_policy: NotRequired["str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. + """ + cancellation_policy_disclosure: NotRequired["str"] + """ + An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. + """ + cancellation_rebuttal: NotRequired["str"] + """ + A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000. + """ + customer_communication: NotRequired["str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. + """ + customer_email_address: NotRequired["str"] + """ + The email address of the customer. + """ + customer_name: NotRequired["str"] + """ + The name of the customer. + """ + customer_purchase_ip: NotRequired["str"] + """ + The IP address that the customer used when making the purchase. + """ + customer_signature: NotRequired["str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. + """ + duplicate_charge_documentation: NotRequired["str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. + """ + duplicate_charge_explanation: NotRequired["str"] + """ + An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000. + """ + duplicate_charge_id: NotRequired["str"] + """ + The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. + """ + product_description: NotRequired["str"] + """ + A description of the product or service that was sold. Has a maximum character count of 20,000. + """ + receipt: NotRequired["str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. + """ + refund_policy: NotRequired["str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. + """ + refund_policy_disclosure: NotRequired["str"] + """ + Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. + """ + refund_refusal_explanation: NotRequired["str"] + """ + A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000. + """ + service_date: NotRequired["str"] + """ + The date on which the customer received or began receiving the purchased service, in a clear human-readable format. + """ + service_documentation: NotRequired["str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. + """ + shipping_address: NotRequired["str"] + """ + The address to which a physical product was shipped. You should try to include as complete address information as possible. + """ + shipping_carrier: NotRequired["str"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. + """ + shipping_date: NotRequired["str"] + """ + The date on which a physical product began its route to the shipping address, in a clear human-readable format. + """ + shipping_documentation: NotRequired["str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. + """ + shipping_tracking_number: NotRequired["str"] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ + uncategorized_file: NotRequired["str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. + """ + uncategorized_text: NotRequired["str"] + """ + Any additional evidence or statements. Has a maximum character count of 20,000. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ amount: int """ diff --git a/stripe/api_resources/ephemeral_key.py b/stripe/api_resources/ephemeral_key.py index b0f08a8d9..738044f7a 100644 --- a/stripe/api_resources/ephemeral_key.py +++ b/stripe/api_resources/ephemeral_key.py @@ -5,19 +5,18 @@ from stripe.request_options import RequestOptions from stripe.util import class_method_variant from typing import ClassVar, List, Optional, cast, overload -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing_extensions import Literal, NotRequired, Unpack from urllib.parse import quote_plus class EphemeralKey(DeletableAPIResource["EphemeralKey"]): OBJECT_NAME: ClassVar[Literal["ephemeral_key"]] = "ephemeral_key" - if TYPE_CHECKING: - class DeleteParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class DeleteParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ created: int """ diff --git a/stripe/api_resources/event.py b/stripe/api_resources/event.py index 27c09064d..b571ecd87 100644 --- a/stripe/api_resources/event.py +++ b/stripe/api_resources/event.py @@ -5,13 +5,7 @@ from stripe.request_options import RequestOptions from stripe.stripe_object import StripeObject from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, NotRequired, TypedDict, Unpack class Event(ListableAPIResource["Event"]): @@ -70,62 +64,60 @@ class Request(StripeObject): The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. """ - if TYPE_CHECKING: - - class ListParams(RequestOptions): - created: NotRequired["Event.ListParamsCreated|int"] - delivery_success: NotRequired["bool"] - """ - Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. - """ - 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. - """ - type: NotRequired["str"] - """ - A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property. - """ - types: NotRequired["List[str]"] - """ - An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both. - """ + class ListParams(RequestOptions): + created: NotRequired["Event.ListParamsCreated|int"] + delivery_success: NotRequired["bool"] + """ + Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. + """ + 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. + """ + type: NotRequired["str"] + """ + A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property. + """ + types: NotRequired["List[str]"] + """ + An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ account: Optional[str] """ diff --git a/stripe/api_resources/exchange_rate.py b/stripe/api_resources/exchange_rate.py index 68c7c395f..6a53a9b9d 100644 --- a/stripe/api_resources/exchange_rate.py +++ b/stripe/api_resources/exchange_rate.py @@ -4,7 +4,7 @@ from stripe.api_resources.list_object import ListObject from stripe.request_options import RequestOptions from typing import ClassVar, Dict, List, Optional -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing_extensions import Literal, NotRequired, Unpack class ExchangeRate(ListableAPIResource["ExchangeRate"]): @@ -38,31 +38,30 @@ class ExchangeRate(ListableAPIResource["ExchangeRate"]): """ OBJECT_NAME: ClassVar[Literal["exchange_rate"]] = "exchange_rate" - if TYPE_CHECKING: - - class ListParams(RequestOptions): - ending_before: NotRequired["str"] - """ - A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X 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 total number of supported payout currencies, and the default is the max. - """ - starting_after: NotRequired["str"] - """ - A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` 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. - """ + + class ListParams(RequestOptions): + ending_before: NotRequired["str"] + """ + A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X 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 total number of supported payout currencies, and the default is the max. + """ + starting_after: NotRequired["str"] + """ + A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` 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. + """ id: str """ diff --git a/stripe/api_resources/file.py b/stripe/api_resources/file.py index ef8f9881c..da98da642 100644 --- a/stripe/api_resources/file.py +++ b/stripe/api_resources/file.py @@ -5,7 +5,7 @@ from stripe.api_resources.abstract import ListableAPIResource from stripe.api_resources.list_object import ListObject from stripe.request_options import RequestOptions -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, cast from typing_extensions import ( Literal, NotRequired, @@ -30,56 +30,55 @@ class File(ListableAPIResource["File"]): """ OBJECT_NAME: ClassVar[Literal["file"]] = "file" - if TYPE_CHECKING: - - class ListParams(RequestOptions): - created: NotRequired["File.ListParamsCreated|int"] - 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. - """ - purpose: NotRequired[ - "Literal['account_requirement', 'additional_verification', 'business_icon', 'business_logo', 'customer_signature', 'dispute_evidence', 'document_provider_identity_document', 'finance_report_run', 'identity_document', 'identity_document_downloadable', 'pci_document', 'selfie', 'sigma_scheduled_query', 'tax_document_user_upload', 'terminal_reader_splashscreen']" - ] - """ - Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files. - """ - 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 ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + + class ListParams(RequestOptions): + created: NotRequired["File.ListParamsCreated|int"] + 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. + """ + purpose: NotRequired[ + "Literal['account_requirement', 'additional_verification', 'business_icon', 'business_logo', 'customer_signature', 'dispute_evidence', 'document_provider_identity_document', 'finance_report_run', 'identity_document', 'identity_document_downloadable', 'pci_document', 'selfie', 'sigma_scheduled_query', 'tax_document_user_upload', 'terminal_reader_splashscreen']" + ] + """ + Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files. + """ + 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 ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ + + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ created: int """ @@ -201,7 +200,7 @@ def create( stripe_version=None, stripe_account=None, **params - ): + ) -> "File": version = api_version or stripe_version requestor = api_requestor.APIRequestor( api_key, @@ -214,8 +213,11 @@ def create( response, api_key = requestor.request( "post", url, params=params, headers=supplied_headers ) - return util.convert_to_stripe_object( - response, api_key, version, stripe_account + return cast( + "File", + util.convert_to_stripe_object( + response, api_key, version, stripe_account + ), ) diff --git a/stripe/api_resources/file_link.py b/stripe/api_resources/file_link.py index b3e1bb553..d01935296 100644 --- a/stripe/api_resources/file_link.py +++ b/stripe/api_resources/file_link.py @@ -34,90 +34,89 @@ class FileLink( """ OBJECT_NAME: ClassVar[Literal["file_link"]] = "file_link" - if TYPE_CHECKING: - class CreateParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired["int"] - """ - The link isn't usable after this future timestamp. - """ - 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`. - """ - metadata: NotRequired["Literal['']|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`. - """ + class CreateParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["int"] + """ + The link isn't usable after this future timestamp. + """ + 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`. + """ + metadata: NotRequired["Literal['']|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`. + """ - class ListParams(RequestOptions): - created: NotRequired["FileLink.ListParamsCreated|int"] - 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. - """ - expired: NotRequired["bool"] - """ - Filter links by their expiration status. By default, Stripe returns all links. - """ - file: NotRequired["str"] - """ - Only return links for the given file. - """ - 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 ListParams(RequestOptions): + created: NotRequired["FileLink.ListParamsCreated|int"] + 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. + """ + expired: NotRequired["bool"] + """ + Filter links by their expiration status. By default, Stripe returns all links. + """ + file: NotRequired["str"] + """ + Only return links for the given file. + """ + 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 ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired["Literal['']|Literal['now']|int"] - """ - A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. - """ - metadata: NotRequired["Literal['']|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`. - """ + class ModifyParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["Literal['']|Literal['now']|int"] + """ + A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. + """ + metadata: NotRequired["Literal['']|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`. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ created: int """ diff --git a/stripe/api_resources/financial_connections/account.py b/stripe/api_resources/financial_connections/account.py index 17b638603..5b2739a6c 100644 --- a/stripe/api_resources/financial_connections/account.py +++ b/stripe/api_resources/financial_connections/account.py @@ -111,87 +111,85 @@ class OwnershipRefresh(StripeObject): The status of the last refresh attempt. """ - if TYPE_CHECKING: - - class DisconnectParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class DisconnectParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ListParams(RequestOptions): - account_holder: NotRequired["Account.ListParamsAccountHolder"] - """ - If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. - """ - 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. - """ - session: NotRequired["str"] - """ - If present, only return accounts that were collected as part of the given session. - """ - 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 ListParams(RequestOptions): + account_holder: NotRequired["Account.ListParamsAccountHolder"] + """ + If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. + """ + 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. + """ + session: NotRequired["str"] + """ + If present, only return accounts that were collected as part of the given session. + """ + 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 ListParamsAccountHolder(TypedDict): - account: NotRequired["str"] - """ - The ID of the Stripe account whose accounts will be retrieved. - """ - customer: NotRequired["str"] - """ - The ID of the Stripe customer whose accounts will be retrieved. - """ + class ListParamsAccountHolder(TypedDict): + account: NotRequired["str"] + """ + The ID of the Stripe account whose accounts will be retrieved. + """ + customer: NotRequired["str"] + """ + The ID of the Stripe customer whose accounts will be retrieved. + """ - class ListOwnersParams(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. - """ - ownership: str - """ - The ID of the ownership object to fetch owners from. - """ - 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 ListOwnersParams(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. + """ + ownership: str + """ + The ID of the ownership object to fetch owners from. + """ + 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 RefreshAccountParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - features: List[Literal["balance", "ownership"]] - """ - The list of account features that you would like to refresh. - """ + class RefreshAccountParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + features: List[Literal["balance", "ownership"]] + """ + The list of account features that you would like to refresh. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ account_holder: Optional[AccountHolder] """ diff --git a/stripe/api_resources/financial_connections/session.py b/stripe/api_resources/financial_connections/session.py index d28ff1dd0..4f2ebbf74 100644 --- a/stripe/api_resources/financial_connections/session.py +++ b/stripe/api_resources/financial_connections/session.py @@ -51,65 +51,61 @@ class Filters(StripeObject): List of countries from which to filter accounts. """ - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - account_holder: "Session.CreateParamsAccountHolder" - """ - The account holder to link accounts for. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - filters: NotRequired["Session.CreateParamsFilters"] - """ - Filters to restrict the kinds of accounts to collect. - """ - permissions: List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - """ - List of data features that you would like to request access to. + class CreateParams(RequestOptions): + account_holder: "Session.CreateParamsAccountHolder" + """ + The account holder to link accounts for. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + filters: NotRequired["Session.CreateParamsFilters"] + """ + Filters to restrict the kinds of accounts to collect. + """ + permissions: List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + """ + List of data features that you would like to request access to. - Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. - """ - prefetch: NotRequired["List[Literal['balances', 'ownership']]"] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired["str"] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ + Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + """ + prefetch: NotRequired["List[Literal['balances', 'ownership']]"] + """ + List of data features that you would like to retrieve upon account creation. + """ + return_url: NotRequired["str"] + """ + For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + """ - class CreateParamsFilters(TypedDict): - countries: List[str] - """ - List of countries from which to collect accounts. - """ + class CreateParamsFilters(TypedDict): + countries: List[str] + """ + List of countries from which to collect accounts. + """ - class CreateParamsAccountHolder(TypedDict): - account: NotRequired["str"] - """ - The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`. - """ - customer: NotRequired["str"] - """ - The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`. - """ - type: Literal["account", "customer"] - """ - Type of account holder to collect accounts for. - """ + class CreateParamsAccountHolder(TypedDict): + account: NotRequired["str"] + """ + The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`. + """ + customer: NotRequired["str"] + """ + The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`. + """ + type: Literal["account", "customer"] + """ + Type of account holder to collect accounts for. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ account_holder: Optional[AccountHolder] """ diff --git a/stripe/api_resources/identity/verification_report.py b/stripe/api_resources/identity/verification_report.py index 12f665aff..53b2eb0d4 100644 --- a/stripe/api_resources/identity/verification_report.py +++ b/stripe/api_resources/identity/verification_report.py @@ -5,13 +5,7 @@ from stripe.request_options import RequestOptions from stripe.stripe_object import StripeObject from typing import ClassVar, List, Optional -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, NotRequired, TypedDict, Unpack class VerificationReport(ListableAPIResource["VerificationReport"]): @@ -299,58 +293,56 @@ class Error(StripeObject): """ _inner_class_types = {"error": Error} - if TYPE_CHECKING: - - class ListParams(RequestOptions): - created: NotRequired["VerificationReport.ListParamsCreated|int"] - 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. - """ - type: NotRequired["Literal['document', 'id_number']"] - """ - Only return VerificationReports of this type - """ - verification_session: NotRequired["str"] - """ - Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID. - """ + class ListParams(RequestOptions): + created: NotRequired["VerificationReport.ListParamsCreated|int"] + 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. + """ + type: NotRequired["Literal['document', 'id_number']"] + """ + Only return VerificationReports of this type + """ + verification_session: NotRequired["str"] + """ + Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ created: int """ diff --git a/stripe/api_resources/identity/verification_session.py b/stripe/api_resources/identity/verification_session.py index a9d8f7b22..84c25f369 100644 --- a/stripe/api_resources/identity/verification_session.py +++ b/stripe/api_resources/identity/verification_session.py @@ -179,164 +179,162 @@ class Dob(StripeObject): """ _inner_class_types = {"address": Address, "dob": Dob} - if TYPE_CHECKING: - - class CancelParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class CancelParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CreateParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - 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`. - """ - options: NotRequired["VerificationSession.CreateParamsOptions"] - """ - A set of options for the session's verification checks. - """ - return_url: NotRequired["str"] - """ - The URL that the user will be redirected to upon completing the verification flow. - """ - type: Literal["document", "id_number"] - """ - The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. - """ + class CreateParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + 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`. + """ + options: NotRequired["VerificationSession.CreateParamsOptions"] + """ + A set of options for the session's verification checks. + """ + return_url: NotRequired["str"] + """ + The URL that the user will be redirected to upon completing the verification flow. + """ + type: Literal["document", "id_number"] + """ + The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + """ - class CreateParamsOptions(TypedDict): - document: NotRequired[ - "Literal['']|VerificationSession.CreateParamsOptionsDocument" - ] - """ - Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). - """ + class CreateParamsOptions(TypedDict): + document: NotRequired[ + "Literal['']|VerificationSession.CreateParamsOptionsDocument" + ] + """ + Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). + """ - class CreateParamsOptionsDocument(TypedDict): - allowed_types: NotRequired[ - "List[Literal['driving_license', 'id_card', 'passport']]" - ] - """ - Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. - """ - require_id_number: NotRequired["bool"] - """ - Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth. - """ - require_live_capture: NotRequired["bool"] - """ - Disable image uploads, identity document images have to be captured using the device's camera. - """ - require_matching_selfie: NotRequired["bool"] - """ - Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie). - """ + class CreateParamsOptionsDocument(TypedDict): + allowed_types: NotRequired[ + "List[Literal['driving_license', 'id_card', 'passport']]" + ] + """ + Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + """ + require_id_number: NotRequired["bool"] + """ + Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth. + """ + require_live_capture: NotRequired["bool"] + """ + Disable image uploads, identity document images have to be captured using the device's camera. + """ + require_matching_selfie: NotRequired["bool"] + """ + Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie). + """ - class ListParams(RequestOptions): - created: NotRequired["VerificationSession.ListParamsCreated|int"] - 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['canceled', 'processing', 'requires_input', 'verified']" - ] - """ - Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). - """ + class ListParams(RequestOptions): + created: NotRequired["VerificationSession.ListParamsCreated|int"] + 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['canceled', 'processing', 'requires_input', 'verified']" + ] + """ + Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - 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`. - """ - options: NotRequired["VerificationSession.ModifyParamsOptions"] - """ - A set of options for the session's verification checks. - """ - type: NotRequired["Literal['document', 'id_number']"] - """ - The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. - """ + class ModifyParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + 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`. + """ + options: NotRequired["VerificationSession.ModifyParamsOptions"] + """ + A set of options for the session's verification checks. + """ + type: NotRequired["Literal['document', 'id_number']"] + """ + The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + """ - class ModifyParamsOptions(TypedDict): - document: NotRequired[ - "Literal['']|VerificationSession.ModifyParamsOptionsDocument" - ] - """ - Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). - """ + class ModifyParamsOptions(TypedDict): + document: NotRequired[ + "Literal['']|VerificationSession.ModifyParamsOptionsDocument" + ] + """ + Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). + """ - class ModifyParamsOptionsDocument(TypedDict): - allowed_types: NotRequired[ - "List[Literal['driving_license', 'id_card', 'passport']]" - ] - """ - Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. - """ - require_id_number: NotRequired["bool"] - """ - Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth. - """ - require_live_capture: NotRequired["bool"] - """ - Disable image uploads, identity document images have to be captured using the device's camera. - """ - require_matching_selfie: NotRequired["bool"] - """ - Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie). - """ + class ModifyParamsOptionsDocument(TypedDict): + allowed_types: NotRequired[ + "List[Literal['driving_license', 'id_card', 'passport']]" + ] + """ + Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + """ + require_id_number: NotRequired["bool"] + """ + Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth. + """ + require_live_capture: NotRequired["bool"] + """ + Disable image uploads, identity document images have to be captured using the device's camera. + """ + require_matching_selfie: NotRequired["bool"] + """ + Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie). + """ - class RedactParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RedactParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ client_secret: Optional[str] """ diff --git a/stripe/api_resources/invoice.py b/stripe/api_resources/invoice.py index c23275d1c..1c50f9953 100644 --- a/stripe/api_resources/invoice.py +++ b/stripe/api_resources/invoice.py @@ -937,2312 +937,2276 @@ class TransferData(StripeObject): The account where funds from the payment will be transferred to upon payment success. """ - if TYPE_CHECKING: + class CreateParams(RequestOptions): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + """ + application_fee_amount: NotRequired["int"] + """ + A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). + """ + auto_advance: NotRequired["bool"] + """ + 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: NotRequired["Invoice.CreateParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this invoice. + """ + collection_method: NotRequired[ + "Literal['charge_automatically', 'send_invoice']" + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`. + """ + currency: NotRequired["str"] + """ + The currency to create this invoice in. Defaults to that of `customer` if not specified. + """ + custom_fields: NotRequired[ + "Literal['']|List[Invoice.CreateParamsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + customer: NotRequired["str"] + """ + The ID of the customer who will be billed. + """ + days_until_due: NotRequired["int"] + """ + The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. + """ + default_payment_method: NotRequired["str"] + """ + ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + """ + default_source: NotRequired["str"] + """ + ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + """ + default_tax_rates: NotRequired["List[str]"] + """ + The tax rates that will apply to any line item that does not have `tax_rates` set. + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + """ + discounts: NotRequired[ + "Literal['']|List[Invoice.CreateParamsDiscount]" + ] + """ + The coupons to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts. + """ + due_date: NotRequired["int"] + """ + The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. + """ + effective_at: NotRequired["int"] + """ + The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + footer: NotRequired["str"] + """ + Footer to be displayed on the invoice. + """ + from_invoice: NotRequired["Invoice.CreateParamsFromInvoice"] + """ + Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + """ + metadata: NotRequired["Literal['']|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`. + """ + on_behalf_of: NotRequired["str"] + """ + The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + """ + payment_settings: NotRequired["Invoice.CreateParamsPaymentSettings"] + """ + Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + """ + pending_invoice_items_behavior: NotRequired[ + "Literal['exclude', 'include', 'include_and_require']" + ] + """ + How to handle pending invoice items on invoice creation. One of `include` or `exclude`. `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. Defaults to `exclude` if the parameter is omitted. + """ + rendering: NotRequired["Invoice.CreateParamsRendering"] + """ + The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + """ + rendering_options: NotRequired[ + "Literal['']|Invoice.CreateParamsRenderingOptions" + ] + """ + This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering. + """ + shipping_cost: NotRequired["Invoice.CreateParamsShippingCost"] + """ + Settings for the cost of shipping for this invoice. + """ + shipping_details: NotRequired["Invoice.CreateParamsShippingDetails"] + """ + Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + """ + statement_descriptor: NotRequired["str"] + """ + Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. + """ + subscription: NotRequired["str"] + """ + The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected. + """ + transfer_data: NotRequired["Invoice.CreateParamsTransferData"] + """ + If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. + """ - class CreateParams(RequestOptions): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the invoice. Only editable when the invoice is a draft. - """ - application_fee_amount: NotRequired["int"] - """ - A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). - """ - auto_advance: NotRequired["bool"] - """ - 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: NotRequired["Invoice.CreateParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this invoice. - """ - collection_method: NotRequired[ - "Literal['charge_automatically', 'send_invoice']" - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`. - """ - currency: NotRequired["str"] - """ - The currency to create this invoice in. Defaults to that of `customer` if not specified. - """ - custom_fields: NotRequired[ - "Literal['']|List[Invoice.CreateParamsCustomField]" - ] - """ - A list of up to 4 custom fields to be displayed on the invoice. - """ - customer: NotRequired["str"] - """ - The ID of the customer who will be billed. - """ - days_until_due: NotRequired["int"] - """ - The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. - """ - default_payment_method: NotRequired["str"] - """ - ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. - """ - default_source: NotRequired["str"] - """ - ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. - """ - default_tax_rates: NotRequired["List[str]"] - """ - The tax rates that will apply to any line item that does not have `tax_rates` set. - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. - """ - discounts: NotRequired[ - "Literal['']|List[Invoice.CreateParamsDiscount]" - ] - """ - The coupons to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts. - """ - due_date: NotRequired["int"] - """ - The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. - """ - effective_at: NotRequired["int"] - """ - The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - footer: NotRequired["str"] - """ - Footer to be displayed on the invoice. - """ - from_invoice: NotRequired["Invoice.CreateParamsFromInvoice"] - """ - Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. - """ - metadata: NotRequired["Literal['']|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`. - """ - on_behalf_of: NotRequired["str"] - """ - The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. - """ - payment_settings: NotRequired[ - "Invoice.CreateParamsPaymentSettings" - ] - """ - Configuration settings for the PaymentIntent that is generated when the invoice is finalized. - """ - pending_invoice_items_behavior: NotRequired[ - "Literal['exclude', 'include', 'include_and_require']" - ] - """ - How to handle pending invoice items on invoice creation. One of `include` or `exclude`. `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. Defaults to `exclude` if the parameter is omitted. - """ - rendering: NotRequired["Invoice.CreateParamsRendering"] - """ - The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. - """ - rendering_options: NotRequired[ - "Literal['']|Invoice.CreateParamsRenderingOptions" - ] - """ - This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering. - """ - shipping_cost: NotRequired["Invoice.CreateParamsShippingCost"] - """ - Settings for the cost of shipping for this invoice. - """ - shipping_details: NotRequired[ - "Invoice.CreateParamsShippingDetails" - ] - """ - Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. - """ - statement_descriptor: NotRequired["str"] - """ - Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. - """ - subscription: NotRequired["str"] - """ - The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected. - """ - transfer_data: NotRequired["Invoice.CreateParamsTransferData"] - """ - If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. - """ + class CreateParamsTransferData(TypedDict): + amount: NotRequired["int"] + """ + The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ - class CreateParamsTransferData(TypedDict): - amount: NotRequired["int"] - """ - The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ + class CreateParamsShippingDetails(TypedDict): + address: "Invoice.CreateParamsShippingDetailsAddress" + """ + Shipping address + """ + name: str + """ + Recipient name. + """ + phone: NotRequired["Literal['']|str"] + """ + Recipient phone (including extension) + """ - class CreateParamsShippingDetails(TypedDict): - address: "Invoice.CreateParamsShippingDetailsAddress" - """ - Shipping address - """ - name: str - """ - Recipient name. - """ - phone: NotRequired["Literal['']|str"] - """ - Recipient phone (including extension) - """ + class CreateParamsShippingDetailsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreateParamsShippingDetailsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsShippingCost(TypedDict): + shipping_rate: NotRequired["str"] + """ + The ID of the shipping rate to use for this order. + """ + shipping_rate_data: NotRequired[ + "Invoice.CreateParamsShippingCostShippingRateData" + ] + """ + Parameters to create a new ad-hoc shipping rate for this order. + """ - class CreateParamsShippingCost(TypedDict): - shipping_rate: NotRequired["str"] - """ - The ID of the shipping rate to use for this order. - """ - shipping_rate_data: NotRequired[ - "Invoice.CreateParamsShippingCostShippingRateData" - ] - """ - Parameters to create a new ad-hoc shipping rate for this order. - """ + class CreateParamsShippingCostShippingRateData(TypedDict): + delivery_estimate: NotRequired[ + "Invoice.CreateParamsShippingCostShippingRateDataDeliveryEstimate" + ] + """ + The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + display_name: str + """ + The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + fixed_amount: NotRequired[ + "Invoice.CreateParamsShippingCostShippingRateDataFixedAmount" + ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + 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`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + tax_code: NotRequired["str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ + type: NotRequired["Literal['fixed_amount']"] + """ + The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + """ - class CreateParamsShippingCostShippingRateData(TypedDict): - delivery_estimate: NotRequired[ - "Invoice.CreateParamsShippingCostShippingRateDataDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - fixed_amount: NotRequired[ - "Invoice.CreateParamsShippingCostShippingRateDataFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - 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`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired["str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired["Literal['fixed_amount']"] - """ - The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. - """ + class CreateParamsShippingCostShippingRateDataFixedAmount(TypedDict): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + 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). + """ + currency_options: NotRequired[ + "Dict[str, Invoice.CreateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions]" + ] + """ + Shipping rates 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). + """ - class CreateParamsShippingCostShippingRateDataFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - "Dict[str, Invoice.CreateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions]" - ] - """ - Shipping rates 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). - """ + class CreateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( + TypedDict, + ): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ - class CreateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( - TypedDict, - ): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class CreateParamsShippingCostShippingRateDataDeliveryEstimate( - TypedDict, - ): - maximum: NotRequired[ - "Invoice.CreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "Invoice.CreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ + class CreateParamsShippingCostShippingRateDataDeliveryEstimate(TypedDict): + maximum: NotRequired[ + "Invoice.CreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum" + ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ + minimum: NotRequired[ + "Invoice.CreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum" + ] + """ + The lower bound of the estimated range. If empty, represents no lower bound. + """ - class CreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ + class CreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum( + TypedDict, + ): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ - class CreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ + class CreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( + TypedDict, + ): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ - class CreateParamsRenderingOptions(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - 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. - """ + class CreateParamsRenderingOptions(TypedDict): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + 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. + """ - class CreateParamsRendering(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - 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. - """ - pdf: NotRequired["Invoice.CreateParamsRenderingPdf"] - """ - Invoice pdf rendering options - """ + class CreateParamsRendering(TypedDict): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + 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. + """ + pdf: NotRequired["Invoice.CreateParamsRenderingPdf"] + """ + Invoice pdf rendering options + """ - class CreateParamsRenderingPdf(TypedDict): - page_size: NotRequired["Literal['a4', 'auto', 'letter']"] - """ - Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. - If set to `auto`, invoice PDF page size defaults to `a4` for customers with - Japanese locale and `letter` for customers with other locales. - """ + class CreateParamsRenderingPdf(TypedDict): + page_size: NotRequired["Literal['a4', 'auto', 'letter']"] + """ + Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. + If set to `auto`, invoice PDF page size defaults to `a4` for customers with + Japanese locale and `letter` for customers with other locales. + """ - class CreateParamsPaymentSettings(TypedDict): - default_mandate: NotRequired["Literal['']|str"] - """ - ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. - """ - payment_method_options: NotRequired[ - "Invoice.CreateParamsPaymentSettingsPaymentMethodOptions" - ] - """ - 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', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'paynow', 'paypal', 'promptpay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', '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). - """ + class CreateParamsPaymentSettings(TypedDict): + default_mandate: NotRequired["Literal['']|str"] + """ + ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + """ + payment_method_options: NotRequired[ + "Invoice.CreateParamsPaymentSettingsPaymentMethodOptions" + ] + """ + 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', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'paynow', 'paypal', 'promptpay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', '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). + """ - class CreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" - ] - """ - If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. - """ - bancontact: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsBancontact" - ] - """ - If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. - """ - card: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCard" - ] - """ - If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. - """ - customer_balance: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" - ] - """ - If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - konbini: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsKonbini" - ] - """ - If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. - """ - us_bank_account: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" - ] - """ - If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. - """ + class CreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" + ] + """ + If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. + """ + bancontact: NotRequired[ + "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsBancontact" + ] + """ + If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. + """ + card: NotRequired[ + "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCard" + ] + """ + If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. + """ + customer_balance: NotRequired[ + "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" + ] + """ + If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. + """ + konbini: NotRequired[ + "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsKonbini" + ] + """ + If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. + """ + us_bank_account: NotRequired[ + "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" + ] + """ + If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( - TypedDict, - ): - financial_connections: NotRequired[ - "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( + TypedDict, + ): + financial_connections: NotRequired[ + "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - permissions: NotRequired[ - "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired["List[Literal['balances']]"] - """ - List of data features that you would like to retrieve upon account creation. - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, + ): + permissions: NotRequired[ + "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired["List[Literal['balances']]"] + """ + List of data features that you would like to retrieve upon account creation. + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsKonbini( - TypedDict - ): - pass + class CreateParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict): + pass - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( - TypedDict, - ): - bank_transfer: NotRequired[ - "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired["str"] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( + TypedDict, + ): + bank_transfer: NotRequired[ + "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired["str"] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - type: NotRequired["str"] - """ - The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, + ): + eu_bank_transfer: NotRequired[ + "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for eu_bank_transfer funding type. + """ + type: NotRequired["str"] + """ + The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, + ): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): - installments: NotRequired[ - "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments attempted on this invoice (Mexico Only). + class CreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): + installments: NotRequired[ + "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallments" + ] + """ + Installment configuration for payments attempted on this invoice (Mexico Only). - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - """ - request_three_d_secure: NotRequired["Literal['any', 'automatic']"] - """ - 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. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ + For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + """ + request_three_d_secure: NotRequired["Literal['any', 'automatic']"] + """ + 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. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallments( - TypedDict, - ): - enabled: NotRequired["bool"] - """ - Setting to true enables installments for this invoice. - Setting to false will prevent any selected plan from applying to a payment. - """ - plan: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan" - ] - """ - The selected installment plan to use for this invoice. - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallments( + TypedDict, + ): + enabled: NotRequired["bool"] + """ + Setting to true enables installments for this invoice. + Setting to false will prevent any selected plan from applying to a payment. + """ + plan: NotRequired[ + "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan" + ] + """ + The selected installment plan to use for this invoice. + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( - TypedDict, - ): - count: int - """ - For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. - """ - interval: Literal["month"] - """ - For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["fixed_count"] - """ - Type of installment plan, one of `fixed_count`. - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( + TypedDict, + ): + count: int + """ + For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + """ + interval: Literal["month"] + """ + For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + One of `month`. + """ + type: Literal["fixed_count"] + """ + Type of installment plan, one of `fixed_count`. + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsBancontact( - TypedDict, - ): - preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']"] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsBancontact(TypedDict): + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']"] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( - TypedDict, - ): - mandate_options: NotRequired[ - "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - transaction_type: NotRequired["Literal['business', 'personal']"] - """ - Transaction type of the mandate. - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, + ): + transaction_type: NotRequired["Literal['business', 'personal']"] + """ + Transaction type of the mandate. + """ - class CreateParamsFromInvoice(TypedDict): - action: Literal["revision"] - """ - The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted - """ - invoice: str - """ - The `id` of the invoice that will be cloned. - """ + class CreateParamsFromInvoice(TypedDict): + action: Literal["revision"] + """ + The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted + """ + invoice: str + """ + The `id` of the invoice that will be cloned. + """ - class CreateParamsDiscount(TypedDict): - coupon: NotRequired["str"] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired["str"] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ + class CreateParamsDiscount(TypedDict): + coupon: NotRequired["str"] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired["str"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ - class CreateParamsCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 30 characters. - """ - value: str - """ - The value of the custom field. This may be up to 30 characters. - """ + class CreateParamsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 30 characters. + """ + value: str + """ + The value of the custom field. This may be up to 30 characters. + """ - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. - """ + class CreateParamsAutomaticTax(TypedDict): + enabled: bool + """ + Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + """ - class DeleteParams(RequestOptions): - pass + class DeleteParams(RequestOptions): + pass - class FinalizeInvoiceParams(RequestOptions): - auto_advance: NotRequired["bool"] - """ - 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. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class FinalizeInvoiceParams(RequestOptions): + auto_advance: NotRequired["bool"] + """ + 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. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ListParams(RequestOptions): - collection_method: NotRequired[ - "Literal['charge_automatically', 'send_invoice']" - ] - """ - The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. - """ - created: NotRequired["Invoice.ListParamsCreated|int"] - customer: NotRequired["str"] - """ - Only return invoices for the customer specified by this customer ID. - """ - due_date: NotRequired["Invoice.ListParamsDueDate|int"] - 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['draft', 'open', 'paid', 'uncollectible', 'void']" - ] - """ - The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) - """ - subscription: NotRequired["str"] - """ - Only return invoices for the subscription specified by this subscription ID. - """ + class ListParams(RequestOptions): + collection_method: NotRequired[ + "Literal['charge_automatically', 'send_invoice']" + ] + """ + The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. + """ + created: NotRequired["Invoice.ListParamsCreated|int"] + customer: NotRequired["str"] + """ + Only return invoices for the customer specified by this customer ID. + """ + due_date: NotRequired["Invoice.ListParamsDueDate|int"] + 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['draft', 'open', 'paid', 'uncollectible', 'void']" + ] + """ + The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + """ + subscription: NotRequired["str"] + """ + Only return invoices for the subscription specified by this subscription ID. + """ - class ListParamsDueDate(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsDueDate(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class MarkUncollectibleParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class MarkUncollectibleParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ModifyParams(RequestOptions): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the invoice. Only editable when the invoice is a draft. - """ - application_fee_amount: NotRequired["int"] - """ - A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). - """ - auto_advance: NotRequired["bool"] - """ - Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. - """ - automatic_tax: NotRequired["Invoice.ModifyParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this invoice. - """ - collection_method: NotRequired[ - "Literal['charge_automatically', 'send_invoice']" - ] - """ - Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. - """ - custom_fields: NotRequired[ - "Literal['']|List[Invoice.ModifyParamsCustomField]" - ] - """ - A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. - """ - days_until_due: NotRequired["int"] - """ - The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. - """ - default_payment_method: NotRequired["str"] - """ - ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. - """ - default_source: NotRequired["Literal['']|str"] - """ - ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. - """ - discounts: NotRequired[ - "Literal['']|List[Invoice.ModifyParamsDiscount]" - ] - """ - The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts. - """ - due_date: NotRequired["int"] - """ - The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. - """ - effective_at: NotRequired["Literal['']|int"] - """ - The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - footer: NotRequired["str"] - """ - Footer to be displayed on the invoice. - """ - metadata: NotRequired["Literal['']|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`. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. - """ - payment_settings: NotRequired[ - "Invoice.ModifyParamsPaymentSettings" - ] - """ - Configuration settings for the PaymentIntent that is generated when the invoice is finalized. - """ - rendering: NotRequired["Invoice.ModifyParamsRendering"] - """ - The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. - """ - rendering_options: NotRequired[ - "Literal['']|Invoice.ModifyParamsRenderingOptions" - ] - """ - This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering. - """ - shipping_cost: NotRequired[ - "Literal['']|Invoice.ModifyParamsShippingCost" - ] - """ - Settings for the cost of shipping for this invoice. - """ - shipping_details: NotRequired[ - "Literal['']|Invoice.ModifyParamsShippingDetails" - ] - """ - Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. - """ - statement_descriptor: NotRequired["str"] - """ - Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. - """ - transfer_data: NotRequired[ - "Literal['']|Invoice.ModifyParamsTransferData" - ] - """ - If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. - """ + class ModifyParams(RequestOptions): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + """ + application_fee_amount: NotRequired["int"] + """ + A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). + """ + auto_advance: NotRequired["bool"] + """ + Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. + """ + automatic_tax: NotRequired["Invoice.ModifyParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this invoice. + """ + collection_method: NotRequired[ + "Literal['charge_automatically', 'send_invoice']" + ] + """ + Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. + """ + custom_fields: NotRequired[ + "Literal['']|List[Invoice.ModifyParamsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. + """ + days_until_due: NotRequired["int"] + """ + The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. + """ + default_payment_method: NotRequired["str"] + """ + ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + """ + default_source: NotRequired["Literal['']|str"] + """ + ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + """ + discounts: NotRequired[ + "Literal['']|List[Invoice.ModifyParamsDiscount]" + ] + """ + The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts. + """ + due_date: NotRequired["int"] + """ + The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. + """ + effective_at: NotRequired["Literal['']|int"] + """ + The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + footer: NotRequired["str"] + """ + Footer to be displayed on the invoice. + """ + metadata: NotRequired["Literal['']|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`. + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + """ + payment_settings: NotRequired["Invoice.ModifyParamsPaymentSettings"] + """ + Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + """ + rendering: NotRequired["Invoice.ModifyParamsRendering"] + """ + The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + """ + rendering_options: NotRequired[ + "Literal['']|Invoice.ModifyParamsRenderingOptions" + ] + """ + This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering. + """ + shipping_cost: NotRequired[ + "Literal['']|Invoice.ModifyParamsShippingCost" + ] + """ + Settings for the cost of shipping for this invoice. + """ + shipping_details: NotRequired[ + "Literal['']|Invoice.ModifyParamsShippingDetails" + ] + """ + Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + """ + statement_descriptor: NotRequired["str"] + """ + Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. + """ + transfer_data: NotRequired[ + "Literal['']|Invoice.ModifyParamsTransferData" + ] + """ + If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. + """ - class ModifyParamsTransferData(TypedDict): - amount: NotRequired["int"] - """ - The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ + class ModifyParamsTransferData(TypedDict): + amount: NotRequired["int"] + """ + The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ - class ModifyParamsShippingDetails(TypedDict): - address: "Invoice.ModifyParamsShippingDetailsAddress" - """ - Shipping address - """ - name: str - """ - Recipient name. - """ - phone: NotRequired["Literal['']|str"] - """ - Recipient phone (including extension) - """ + class ModifyParamsShippingDetails(TypedDict): + address: "Invoice.ModifyParamsShippingDetailsAddress" + """ + Shipping address + """ + name: str + """ + Recipient name. + """ + phone: NotRequired["Literal['']|str"] + """ + Recipient phone (including extension) + """ - class ModifyParamsShippingDetailsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class ModifyParamsShippingDetailsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ModifyParamsShippingCost(TypedDict): - shipping_rate: NotRequired["str"] - """ - The ID of the shipping rate to use for this order. - """ - shipping_rate_data: NotRequired[ - "Invoice.ModifyParamsShippingCostShippingRateData" - ] - """ - Parameters to create a new ad-hoc shipping rate for this order. - """ + class ModifyParamsShippingCost(TypedDict): + shipping_rate: NotRequired["str"] + """ + The ID of the shipping rate to use for this order. + """ + shipping_rate_data: NotRequired[ + "Invoice.ModifyParamsShippingCostShippingRateData" + ] + """ + Parameters to create a new ad-hoc shipping rate for this order. + """ - class ModifyParamsShippingCostShippingRateData(TypedDict): - delivery_estimate: NotRequired[ - "Invoice.ModifyParamsShippingCostShippingRateDataDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - fixed_amount: NotRequired[ - "Invoice.ModifyParamsShippingCostShippingRateDataFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - 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`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired["str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired["Literal['fixed_amount']"] - """ - The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. - """ + class ModifyParamsShippingCostShippingRateData(TypedDict): + delivery_estimate: NotRequired[ + "Invoice.ModifyParamsShippingCostShippingRateDataDeliveryEstimate" + ] + """ + The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + display_name: str + """ + The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + fixed_amount: NotRequired[ + "Invoice.ModifyParamsShippingCostShippingRateDataFixedAmount" + ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + 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`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + tax_code: NotRequired["str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ + type: NotRequired["Literal['fixed_amount']"] + """ + The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + """ - class ModifyParamsShippingCostShippingRateDataFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - "Dict[str, Invoice.ModifyParamsShippingCostShippingRateDataFixedAmountCurrencyOptions]" - ] - """ - Shipping rates 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). - """ + class ModifyParamsShippingCostShippingRateDataFixedAmount(TypedDict): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + 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). + """ + currency_options: NotRequired[ + "Dict[str, Invoice.ModifyParamsShippingCostShippingRateDataFixedAmountCurrencyOptions]" + ] + """ + Shipping rates 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). + """ - class ModifyParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( - TypedDict, - ): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ + class ModifyParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( + TypedDict, + ): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ - class ModifyParamsShippingCostShippingRateDataDeliveryEstimate( - TypedDict, - ): - maximum: NotRequired[ - "Invoice.ModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "Invoice.ModifyParamsShippingCostShippingRateDataDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ + class ModifyParamsShippingCostShippingRateDataDeliveryEstimate(TypedDict): + maximum: NotRequired[ + "Invoice.ModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum" + ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ + minimum: NotRequired[ + "Invoice.ModifyParamsShippingCostShippingRateDataDeliveryEstimateMinimum" + ] + """ + The lower bound of the estimated range. If empty, represents no lower bound. + """ - class ModifyParamsShippingCostShippingRateDataDeliveryEstimateMinimum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ + class ModifyParamsShippingCostShippingRateDataDeliveryEstimateMinimum( + TypedDict, + ): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ - class ModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ + class ModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum( + TypedDict, + ): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ - class ModifyParamsRenderingOptions(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - 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. - """ + class ModifyParamsRenderingOptions(TypedDict): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + 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. + """ - class ModifyParamsRendering(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - 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. - """ - pdf: NotRequired["Invoice.ModifyParamsRenderingPdf"] - """ - Invoice pdf rendering options - """ + class ModifyParamsRendering(TypedDict): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + 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. + """ + pdf: NotRequired["Invoice.ModifyParamsRenderingPdf"] + """ + Invoice pdf rendering options + """ - class ModifyParamsRenderingPdf(TypedDict): - page_size: NotRequired["Literal['a4', 'auto', 'letter']"] - """ - Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. - If set to `auto`, invoice PDF page size defaults to `a4` for customers with - Japanese locale and `letter` for customers with other locales. - """ + class ModifyParamsRenderingPdf(TypedDict): + page_size: NotRequired["Literal['a4', 'auto', 'letter']"] + """ + Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. + If set to `auto`, invoice PDF page size defaults to `a4` for customers with + Japanese locale and `letter` for customers with other locales. + """ - class ModifyParamsPaymentSettings(TypedDict): - default_mandate: NotRequired["Literal['']|str"] - """ - ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. - """ - payment_method_options: NotRequired[ - "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptions" - ] - """ - 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', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'paynow', 'paypal', 'promptpay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', '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). - """ + class ModifyParamsPaymentSettings(TypedDict): + default_mandate: NotRequired["Literal['']|str"] + """ + ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + """ + payment_method_options: NotRequired[ + "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptions" + ] + """ + 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', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'paynow', 'paypal', 'promptpay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', '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). + """ - class ModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit" - ] - """ - If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. - """ - bancontact: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact" - ] - """ - If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. - """ - card: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCard" - ] - """ - If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. - """ - customer_balance: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" - ] - """ - If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - konbini: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsKonbini" - ] - """ - If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. - """ - us_bank_account: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" - ] - """ - If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. - """ + class ModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit" + ] + """ + If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. + """ + bancontact: NotRequired[ + "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact" + ] + """ + If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. + """ + card: NotRequired[ + "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCard" + ] + """ + If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. + """ + customer_balance: NotRequired[ + "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" + ] + """ + If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. + """ + konbini: NotRequired[ + "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsKonbini" + ] + """ + If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. + """ + us_bank_account: NotRequired[ + "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" + ] + """ + If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( - TypedDict, - ): - financial_connections: NotRequired[ - "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( + TypedDict, + ): + financial_connections: NotRequired[ + "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - permissions: NotRequired[ - "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired["List[Literal['balances']]"] - """ - List of data features that you would like to retrieve upon account creation. - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, + ): + permissions: NotRequired[ + "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired["List[Literal['balances']]"] + """ + List of data features that you would like to retrieve upon account creation. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsKonbini( - TypedDict - ): - pass + class ModifyParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict): + pass - class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( - TypedDict, - ): - bank_transfer: NotRequired[ - "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired["str"] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( + TypedDict, + ): + bank_transfer: NotRequired[ + "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired["str"] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - type: NotRequired["str"] - """ - The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, + ): + eu_bank_transfer: NotRequired[ + "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for eu_bank_transfer funding type. + """ + type: NotRequired["str"] + """ + The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, + ): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): - installments: NotRequired[ - "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments attempted on this invoice (Mexico Only). + class ModifyParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): + installments: NotRequired[ + "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallments" + ] + """ + Installment configuration for payments attempted on this invoice (Mexico Only). - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - """ - request_three_d_secure: NotRequired["Literal['any', 'automatic']"] - """ - 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. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ + For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + """ + request_three_d_secure: NotRequired["Literal['any', 'automatic']"] + """ + 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. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallments( - TypedDict, - ): - enabled: NotRequired["bool"] - """ - Setting to true enables installments for this invoice. - Setting to false will prevent any selected plan from applying to a payment. - """ - plan: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan" - ] - """ - The selected installment plan to use for this invoice. - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallments( + TypedDict, + ): + enabled: NotRequired["bool"] + """ + Setting to true enables installments for this invoice. + Setting to false will prevent any selected plan from applying to a payment. + """ + plan: NotRequired[ + "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan" + ] + """ + The selected installment plan to use for this invoice. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( - TypedDict, - ): - count: int - """ - For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. - """ - interval: Literal["month"] - """ - For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["fixed_count"] - """ - Type of installment plan, one of `fixed_count`. - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( + TypedDict, + ): + count: int + """ + For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + """ + interval: Literal["month"] + """ + For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + One of `month`. + """ + type: Literal["fixed_count"] + """ + Type of installment plan, one of `fixed_count`. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( - TypedDict, - ): - preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']"] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact(TypedDict): + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']"] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit( - TypedDict, - ): - mandate_options: NotRequired[ - "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - transaction_type: NotRequired["Literal['business', 'personal']"] - """ - Transaction type of the mandate. - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, + ): + transaction_type: NotRequired["Literal['business', 'personal']"] + """ + Transaction type of the mandate. + """ - class ModifyParamsDiscount(TypedDict): - coupon: NotRequired["str"] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired["str"] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ + class ModifyParamsDiscount(TypedDict): + coupon: NotRequired["str"] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired["str"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ - class ModifyParamsCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 30 characters. - """ - value: str - """ - The value of the custom field. This may be up to 30 characters. - """ + class ModifyParamsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 30 characters. + """ + value: str + """ + The value of the custom field. This may be up to 30 characters. + """ - class ModifyParamsAutomaticTax(TypedDict): - enabled: bool - """ - Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. - """ + class ModifyParamsAutomaticTax(TypedDict): + enabled: bool + """ + Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + """ - class PayParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - forgive: NotRequired["bool"] - """ - In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. + class PayParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + forgive: NotRequired["bool"] + """ + In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. - Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. - """ - mandate: NotRequired["Literal['']|str"] - """ - ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. - """ - off_session: NotRequired["bool"] - """ - Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). - """ - paid_out_of_band: NotRequired["bool"] - """ - Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. - """ - payment_method: NotRequired["str"] - """ - A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid. - """ - source: NotRequired["str"] - """ - A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid. - """ + Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. + """ + mandate: NotRequired["Literal['']|str"] + """ + ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. + """ + off_session: NotRequired["bool"] + """ + Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). + """ + paid_out_of_band: NotRequired["bool"] + """ + Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. + """ + payment_method: NotRequired["str"] + """ + A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid. + """ + source: NotRequired["str"] + """ + A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class SendInvoiceParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class SendInvoiceParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class UpcomingParams(RequestOptions): - automatic_tax: NotRequired["Invoice.UpcomingParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this invoice preview. - """ - coupon: NotRequired["str"] - """ - The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. - """ - currency: NotRequired["str"] - """ - The currency to preview this invoice in. Defaults to that of `customer` if not specified. - """ - customer: NotRequired["str"] - """ - The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. - """ - customer_details: NotRequired[ - "Invoice.UpcomingParamsCustomerDetails" - ] - """ - Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. - """ - discounts: NotRequired[ - "Literal['']|List[Invoice.UpcomingParamsDiscount]" - ] - """ - The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - invoice_items: NotRequired[ - "List[Invoice.UpcomingParamsInvoiceItem]" - ] - """ - List of invoice items to add or update in the upcoming invoice preview. - """ - schedule: NotRequired["str"] - """ - The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. - """ - subscription: NotRequired["str"] - """ - The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. - """ - subscription_billing_cycle_anchor: NotRequired[ - "Literal['now', 'unchanged']|int" - ] - """ - For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. - """ - subscription_cancel_at: NotRequired["Literal['']|int"] - """ - Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`. - """ - subscription_cancel_at_period_end: NotRequired["bool"] - """ - Boolean indicating whether this subscription should cancel at the end of the current period. - """ - subscription_cancel_now: NotRequired["bool"] - """ - This simulates the subscription being canceled or expired immediately. - """ - subscription_default_tax_rates: NotRequired[ - "Literal['']|List[str]" - ] - """ - If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. - """ - subscription_items: NotRequired[ - "List[Invoice.UpcomingParamsSubscriptionItem]" - ] - """ - A list of up to 20 subscription items, each with an attached price. - """ - subscription_proration_behavior: NotRequired[ - "Literal['always_invoice', 'create_prorations', 'none']" - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - subscription_proration_date: NotRequired["int"] - """ - If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. - """ - subscription_resume_at: NotRequired["Literal['now']"] - """ - For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. - """ - subscription_start_date: NotRequired["int"] - """ - Date a subscription is intended to start (can be future or past) - """ - subscription_trial_end: NotRequired["Literal['now']|int"] - """ - If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. - """ - subscription_trial_from_plan: NotRequired["bool"] - """ - Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. - """ + class UpcomingParams(RequestOptions): + automatic_tax: NotRequired["Invoice.UpcomingParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this invoice preview. + """ + coupon: NotRequired["str"] + """ + The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. + """ + currency: NotRequired["str"] + """ + The currency to preview this invoice in. Defaults to that of `customer` if not specified. + """ + customer: NotRequired["str"] + """ + The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + """ + customer_details: NotRequired["Invoice.UpcomingParamsCustomerDetails"] + """ + Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + """ + discounts: NotRequired[ + "Literal['']|List[Invoice.UpcomingParamsDiscount]" + ] + """ + The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + invoice_items: NotRequired["List[Invoice.UpcomingParamsInvoiceItem]"] + """ + List of invoice items to add or update in the upcoming invoice preview. + """ + schedule: NotRequired["str"] + """ + The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. + """ + subscription: NotRequired["str"] + """ + The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + """ + subscription_billing_cycle_anchor: NotRequired[ + "Literal['now', 'unchanged']|int" + ] + """ + For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. + """ + subscription_cancel_at: NotRequired["Literal['']|int"] + """ + Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`. + """ + subscription_cancel_at_period_end: NotRequired["bool"] + """ + Boolean indicating whether this subscription should cancel at the end of the current period. + """ + subscription_cancel_now: NotRequired["bool"] + """ + This simulates the subscription being canceled or expired immediately. + """ + subscription_default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. + """ + subscription_items: NotRequired[ + "List[Invoice.UpcomingParamsSubscriptionItem]" + ] + """ + A list of up to 20 subscription items, each with an attached price. + """ + subscription_proration_behavior: NotRequired[ + "Literal['always_invoice', 'create_prorations', 'none']" + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + """ + subscription_proration_date: NotRequired["int"] + """ + If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. + """ + subscription_resume_at: NotRequired["Literal['now']"] + """ + For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. + """ + subscription_start_date: NotRequired["int"] + """ + Date a subscription is intended to start (can be future or past) + """ + subscription_trial_end: NotRequired["Literal['now']|int"] + """ + If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. + """ + subscription_trial_from_plan: NotRequired["bool"] + """ + Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + """ - class UpcomingParamsSubscriptionItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|Invoice.UpcomingParamsSubscriptionItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. - """ - clear_usage: NotRequired["bool"] - """ - Delete all usage for a given subscription item. Allowed only when `deleted` is set to `true` and the current plan's `usage_type` is `metered`. - """ - deleted: NotRequired["bool"] - """ - A flag that, if set to `true`, will delete the specified item. - """ - id: NotRequired["str"] - """ - Subscription item to update. - """ - metadata: NotRequired["Literal['']|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`. - """ - plan: NotRequired["str"] - """ - Plan ID for this item, as a string. - """ - price: NotRequired["str"] - """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. - """ - price_data: NotRequired[ - "Invoice.UpcomingParamsSubscriptionItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired["int"] - """ - Quantity for this item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ + class UpcomingParamsSubscriptionItem(TypedDict): + billing_thresholds: NotRequired[ + "Literal['']|Invoice.UpcomingParamsSubscriptionItemBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + """ + clear_usage: NotRequired["bool"] + """ + Delete all usage for a given subscription item. Allowed only when `deleted` is set to `true` and the current plan's `usage_type` is `metered`. + """ + deleted: NotRequired["bool"] + """ + A flag that, if set to `true`, will delete the specified item. + """ + id: NotRequired["str"] + """ + Subscription item to update. + """ + metadata: NotRequired["Literal['']|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`. + """ + plan: NotRequired["str"] + """ + Plan ID for this item, as a string. + """ + price: NotRequired["str"] + """ + The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + """ + price_data: NotRequired[ + "Invoice.UpcomingParamsSubscriptionItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired["int"] + """ + Quantity for this item. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ - class UpcomingParamsSubscriptionItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - recurring: "Invoice.UpcomingParamsSubscriptionItemPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class UpcomingParamsSubscriptionItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + recurring: "Invoice.UpcomingParamsSubscriptionItemPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class UpcomingParamsSubscriptionItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ + class UpcomingParamsSubscriptionItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ - class UpcomingParamsSubscriptionItemBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ + class UpcomingParamsSubscriptionItemBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ - class UpcomingParamsInvoiceItem(TypedDict): - amount: NotRequired["int"] - """ - The integer amount in cents (or local equivalent) of previewed invoice item. - """ - currency: NotRequired["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). Only applicable to new invoice items. - """ - description: NotRequired["str"] - """ - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. - """ - discountable: NotRequired["bool"] - """ - Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. - """ - discounts: NotRequired[ - "Literal['']|List[Invoice.UpcomingParamsInvoiceItemDiscount]" - ] - """ - The coupons to redeem into discounts for the invoice item in the preview. - """ - invoiceitem: NotRequired["str"] - """ - The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. - """ - metadata: NotRequired["Literal['']|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`. - """ - period: NotRequired["Invoice.UpcomingParamsInvoiceItemPeriod"] - """ - The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. - """ - price: NotRequired["str"] - """ - The ID of the price object. - """ - price_data: NotRequired[ - "Invoice.UpcomingParamsInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired["int"] - """ - Non-negative integer. The quantity of units for the invoice item. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. - """ - unit_amount: NotRequired["int"] - """ - The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class UpcomingParamsInvoiceItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class UpcomingParamsInvoiceItem(TypedDict): + amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) of previewed invoice item. + """ + currency: NotRequired["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). Only applicable to new invoice items. + """ + description: NotRequired["str"] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ + discountable: NotRequired["bool"] + """ + Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + """ + discounts: NotRequired[ + "Literal['']|List[Invoice.UpcomingParamsInvoiceItemDiscount]" + ] + """ + The coupons to redeem into discounts for the invoice item in the preview. + """ + invoiceitem: NotRequired["str"] + """ + The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. + """ + metadata: NotRequired["Literal['']|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`. + """ + period: NotRequired["Invoice.UpcomingParamsInvoiceItemPeriod"] + """ + The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + """ + price: NotRequired["str"] + """ + The ID of the price object. + """ + price_data: NotRequired["Invoice.UpcomingParamsInvoiceItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired["int"] + """ + Non-negative integer. The quantity of units for the invoice item. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + """ + unit_amount: NotRequired["int"] + """ + The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class UpcomingParamsInvoiceItemPeriod(TypedDict): - end: int - """ - The end of the period, which must be greater than or equal to the start. This value is inclusive. - """ - start: int - """ - The start of the period. This value is inclusive. - """ + class UpcomingParamsInvoiceItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class UpcomingParamsInvoiceItemDiscount(TypedDict): - coupon: NotRequired["str"] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired["str"] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ + class UpcomingParamsInvoiceItemPeriod(TypedDict): + end: int + """ + The end of the period, which must be greater than or equal to the start. This value is inclusive. + """ + start: int + """ + The start of the period. This value is inclusive. + """ - class UpcomingParamsDiscount(TypedDict): - coupon: NotRequired["str"] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired["str"] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ + class UpcomingParamsInvoiceItemDiscount(TypedDict): + coupon: NotRequired["str"] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired["str"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ - class UpcomingParamsCustomerDetails(TypedDict): - address: NotRequired[ - "Literal['']|Invoice.UpcomingParamsCustomerDetailsAddress" - ] - """ - The customer's address. - """ - shipping: NotRequired[ - "Literal['']|Invoice.UpcomingParamsCustomerDetailsShipping" - ] - """ - The customer's shipping information. Appears on invoices emailed to this customer. - """ - tax: NotRequired["Invoice.UpcomingParamsCustomerDetailsTax"] - """ - Tax details about the customer. - """ - tax_exempt: NotRequired[ - "Literal['']|Literal['exempt', 'none', 'reverse']" - ] - """ - The customer's tax exemption. One of `none`, `exempt`, or `reverse`. - """ - tax_ids: NotRequired[ - "List[Invoice.UpcomingParamsCustomerDetailsTaxId]" - ] - """ - The customer's tax IDs. - """ + class UpcomingParamsDiscount(TypedDict): + coupon: NotRequired["str"] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired["str"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ - class UpcomingParamsCustomerDetailsTaxId(TypedDict): - type: Literal[ - "ad_nrt", - "ae_trn", - "ar_cuit", - "au_abn", - "au_arn", - "bg_uic", - "bo_tin", - "br_cnpj", - "br_cpf", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "ch_vat", - "cl_tin", - "cn_tin", - "co_nit", - "cr_tin", - "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", - "li_uid", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "no_vat", - "nz_gst", - "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", - "za_vat", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 - """ - Value of the tax ID. - """ + class UpcomingParamsCustomerDetails(TypedDict): + address: NotRequired[ + "Literal['']|Invoice.UpcomingParamsCustomerDetailsAddress" + ] + """ + The customer's address. + """ + shipping: NotRequired[ + "Literal['']|Invoice.UpcomingParamsCustomerDetailsShipping" + ] + """ + The customer's shipping information. Appears on invoices emailed to this customer. + """ + tax: NotRequired["Invoice.UpcomingParamsCustomerDetailsTax"] + """ + Tax details about the customer. + """ + tax_exempt: NotRequired[ + "Literal['']|Literal['exempt', 'none', 'reverse']" + ] + """ + The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + """ + tax_ids: NotRequired[ + "List[Invoice.UpcomingParamsCustomerDetailsTaxId]" + ] + """ + The customer's tax IDs. + """ - class UpcomingParamsCustomerDetailsTax(TypedDict): - ip_address: NotRequired["Literal['']|str"] - """ - 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. - """ + class UpcomingParamsCustomerDetailsTaxId(TypedDict): + type: Literal[ + "ad_nrt", + "ae_trn", + "ar_cuit", + "au_abn", + "au_arn", + "bg_uic", + "bo_tin", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "cn_tin", + "co_nit", + "cr_tin", + "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", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "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", + "za_vat", + ] + """ + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 + """ + Value of the tax ID. + """ - class UpcomingParamsCustomerDetailsShipping(TypedDict): - address: "Invoice.UpcomingParamsCustomerDetailsShippingAddress" - """ - Customer shipping address. - """ - name: str - """ - Customer name. - """ - phone: NotRequired["str"] - """ - Customer phone (including extension). - """ + class UpcomingParamsCustomerDetailsTax(TypedDict): + ip_address: NotRequired["Literal['']|str"] + """ + 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. + """ - class UpcomingParamsCustomerDetailsShippingAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class UpcomingParamsCustomerDetailsShipping(TypedDict): + address: "Invoice.UpcomingParamsCustomerDetailsShippingAddress" + """ + Customer shipping address. + """ + name: str + """ + Customer name. + """ + phone: NotRequired["str"] + """ + Customer phone (including extension). + """ - class UpcomingParamsCustomerDetailsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class UpcomingParamsCustomerDetailsShippingAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class UpcomingParamsAutomaticTax(TypedDict): - enabled: bool - """ - Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. - """ + class UpcomingParamsCustomerDetailsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class UpcomingLinesParams(RequestOptions): - automatic_tax: NotRequired[ - "Invoice.UpcomingLinesParamsAutomaticTax" - ] - """ - Settings for automatic tax lookup for this invoice preview. - """ - coupon: NotRequired["str"] - """ - The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. - """ - currency: NotRequired["str"] - """ - The currency to preview this invoice in. Defaults to that of `customer` if not specified. - """ - customer: NotRequired["str"] - """ - The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. - """ - customer_details: NotRequired[ - "Invoice.UpcomingLinesParamsCustomerDetails" - ] - """ - Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. - """ - discounts: NotRequired[ - "Literal['']|List[Invoice.UpcomingLinesParamsDiscount]" - ] - """ - The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead. - """ - 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. - """ - invoice_items: NotRequired[ - "List[Invoice.UpcomingLinesParamsInvoiceItem]" - ] - """ - List of invoice items to add or update in the upcoming invoice preview. - """ - 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. - """ - schedule: NotRequired["str"] - """ - The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. - """ - 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. - """ - subscription: NotRequired["str"] - """ - The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. - """ - subscription_billing_cycle_anchor: NotRequired[ - "Literal['now', 'unchanged']|int" - ] - """ - For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. - """ - subscription_cancel_at: NotRequired["Literal['']|int"] - """ - Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`. - """ - subscription_cancel_at_period_end: NotRequired["bool"] - """ - Boolean indicating whether this subscription should cancel at the end of the current period. - """ - subscription_cancel_now: NotRequired["bool"] - """ - This simulates the subscription being canceled or expired immediately. - """ - subscription_default_tax_rates: NotRequired[ - "Literal['']|List[str]" - ] - """ - If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. - """ - subscription_items: NotRequired[ - "List[Invoice.UpcomingLinesParamsSubscriptionItem]" - ] - """ - A list of up to 20 subscription items, each with an attached price. - """ - subscription_proration_behavior: NotRequired[ - "Literal['always_invoice', 'create_prorations', 'none']" - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - subscription_proration_date: NotRequired["int"] - """ - If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. - """ - subscription_resume_at: NotRequired["Literal['now']"] - """ - For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. - """ - subscription_start_date: NotRequired["int"] - """ - Date a subscription is intended to start (can be future or past) - """ - subscription_trial_end: NotRequired["Literal['now']|int"] - """ - If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. - """ - subscription_trial_from_plan: NotRequired["bool"] - """ - Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. - """ + class UpcomingParamsAutomaticTax(TypedDict): + enabled: bool + """ + Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + """ - class UpcomingLinesParamsSubscriptionItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|Invoice.UpcomingLinesParamsSubscriptionItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. - """ - clear_usage: NotRequired["bool"] - """ - Delete all usage for a given subscription item. Allowed only when `deleted` is set to `true` and the current plan's `usage_type` is `metered`. - """ - deleted: NotRequired["bool"] - """ - A flag that, if set to `true`, will delete the specified item. - """ - id: NotRequired["str"] - """ - Subscription item to update. - """ - metadata: NotRequired["Literal['']|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`. - """ - plan: NotRequired["str"] - """ - Plan ID for this item, as a string. - """ - price: NotRequired["str"] - """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. - """ - price_data: NotRequired[ - "Invoice.UpcomingLinesParamsSubscriptionItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired["int"] - """ - Quantity for this item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ + class UpcomingLinesParams(RequestOptions): + automatic_tax: NotRequired["Invoice.UpcomingLinesParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this invoice preview. + """ + coupon: NotRequired["str"] + """ + The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. + """ + currency: NotRequired["str"] + """ + The currency to preview this invoice in. Defaults to that of `customer` if not specified. + """ + customer: NotRequired["str"] + """ + The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + """ + customer_details: NotRequired[ + "Invoice.UpcomingLinesParamsCustomerDetails" + ] + """ + Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + """ + discounts: NotRequired[ + "Literal['']|List[Invoice.UpcomingLinesParamsDiscount]" + ] + """ + The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead. + """ + 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. + """ + invoice_items: NotRequired[ + "List[Invoice.UpcomingLinesParamsInvoiceItem]" + ] + """ + List of invoice items to add or update in the upcoming invoice preview. + """ + 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. + """ + schedule: NotRequired["str"] + """ + The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. + """ + 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. + """ + subscription: NotRequired["str"] + """ + The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + """ + subscription_billing_cycle_anchor: NotRequired[ + "Literal['now', 'unchanged']|int" + ] + """ + For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. + """ + subscription_cancel_at: NotRequired["Literal['']|int"] + """ + Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`. + """ + subscription_cancel_at_period_end: NotRequired["bool"] + """ + Boolean indicating whether this subscription should cancel at the end of the current period. + """ + subscription_cancel_now: NotRequired["bool"] + """ + This simulates the subscription being canceled or expired immediately. + """ + subscription_default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. + """ + subscription_items: NotRequired[ + "List[Invoice.UpcomingLinesParamsSubscriptionItem]" + ] + """ + A list of up to 20 subscription items, each with an attached price. + """ + subscription_proration_behavior: NotRequired[ + "Literal['always_invoice', 'create_prorations', 'none']" + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + """ + subscription_proration_date: NotRequired["int"] + """ + If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. + """ + subscription_resume_at: NotRequired["Literal['now']"] + """ + For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. + """ + subscription_start_date: NotRequired["int"] + """ + Date a subscription is intended to start (can be future or past) + """ + subscription_trial_end: NotRequired["Literal['now']|int"] + """ + If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. + """ + subscription_trial_from_plan: NotRequired["bool"] + """ + Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + """ - class UpcomingLinesParamsSubscriptionItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - recurring: "Invoice.UpcomingLinesParamsSubscriptionItemPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class UpcomingLinesParamsSubscriptionItem(TypedDict): + billing_thresholds: NotRequired[ + "Literal['']|Invoice.UpcomingLinesParamsSubscriptionItemBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + """ + clear_usage: NotRequired["bool"] + """ + Delete all usage for a given subscription item. Allowed only when `deleted` is set to `true` and the current plan's `usage_type` is `metered`. + """ + deleted: NotRequired["bool"] + """ + A flag that, if set to `true`, will delete the specified item. + """ + id: NotRequired["str"] + """ + Subscription item to update. + """ + metadata: NotRequired["Literal['']|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`. + """ + plan: NotRequired["str"] + """ + Plan ID for this item, as a string. + """ + price: NotRequired["str"] + """ + The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + """ + price_data: NotRequired[ + "Invoice.UpcomingLinesParamsSubscriptionItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired["int"] + """ + Quantity for this item. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ - class UpcomingLinesParamsSubscriptionItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ + class UpcomingLinesParamsSubscriptionItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + recurring: "Invoice.UpcomingLinesParamsSubscriptionItemPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class UpcomingLinesParamsSubscriptionItemBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ + class UpcomingLinesParamsSubscriptionItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ - class UpcomingLinesParamsInvoiceItem(TypedDict): - amount: NotRequired["int"] - """ - The integer amount in cents (or local equivalent) of previewed invoice item. - """ - currency: NotRequired["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). Only applicable to new invoice items. - """ - description: NotRequired["str"] - """ - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. - """ - discountable: NotRequired["bool"] - """ - Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. - """ - discounts: NotRequired[ - "Literal['']|List[Invoice.UpcomingLinesParamsInvoiceItemDiscount]" - ] - """ - The coupons to redeem into discounts for the invoice item in the preview. - """ - invoiceitem: NotRequired["str"] - """ - The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. - """ - metadata: NotRequired["Literal['']|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`. - """ - period: NotRequired["Invoice.UpcomingLinesParamsInvoiceItemPeriod"] - """ - The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. - """ - price: NotRequired["str"] - """ - The ID of the price object. - """ - price_data: NotRequired[ - "Invoice.UpcomingLinesParamsInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired["int"] - """ - Non-negative integer. The quantity of units for the invoice item. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. - """ - unit_amount: NotRequired["int"] - """ - The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class UpcomingLinesParamsSubscriptionItemBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ - class UpcomingLinesParamsInvoiceItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class UpcomingLinesParamsInvoiceItem(TypedDict): + amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) of previewed invoice item. + """ + currency: NotRequired["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). Only applicable to new invoice items. + """ + description: NotRequired["str"] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ + discountable: NotRequired["bool"] + """ + Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + """ + discounts: NotRequired[ + "Literal['']|List[Invoice.UpcomingLinesParamsInvoiceItemDiscount]" + ] + """ + The coupons to redeem into discounts for the invoice item in the preview. + """ + invoiceitem: NotRequired["str"] + """ + The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. + """ + metadata: NotRequired["Literal['']|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`. + """ + period: NotRequired["Invoice.UpcomingLinesParamsInvoiceItemPeriod"] + """ + The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + """ + price: NotRequired["str"] + """ + The ID of the price object. + """ + price_data: NotRequired[ + "Invoice.UpcomingLinesParamsInvoiceItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired["int"] + """ + Non-negative integer. The quantity of units for the invoice item. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + """ + unit_amount: NotRequired["int"] + """ + The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + class UpcomingLinesParamsInvoiceItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class UpcomingLinesParamsInvoiceItemPeriod(TypedDict): - end: int - """ - The end of the period, which must be greater than or equal to the start. This value is inclusive. - """ - start: int - """ - The start of the period. This value is inclusive. - """ + class UpcomingLinesParamsInvoiceItemPeriod(TypedDict): + end: int + """ + The end of the period, which must be greater than or equal to the start. This value is inclusive. + """ + start: int + """ + The start of the period. This value is inclusive. + """ - class UpcomingLinesParamsInvoiceItemDiscount(TypedDict): - coupon: NotRequired["str"] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired["str"] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ + class UpcomingLinesParamsInvoiceItemDiscount(TypedDict): + coupon: NotRequired["str"] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired["str"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ - class UpcomingLinesParamsDiscount(TypedDict): - coupon: NotRequired["str"] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired["str"] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ + class UpcomingLinesParamsDiscount(TypedDict): + coupon: NotRequired["str"] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired["str"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ - class UpcomingLinesParamsCustomerDetails(TypedDict): - address: NotRequired[ - "Literal['']|Invoice.UpcomingLinesParamsCustomerDetailsAddress" - ] - """ - The customer's address. - """ - shipping: NotRequired[ - "Literal['']|Invoice.UpcomingLinesParamsCustomerDetailsShipping" - ] - """ - The customer's shipping information. Appears on invoices emailed to this customer. - """ - tax: NotRequired["Invoice.UpcomingLinesParamsCustomerDetailsTax"] - """ - Tax details about the customer. - """ - tax_exempt: NotRequired[ - "Literal['']|Literal['exempt', 'none', 'reverse']" - ] - """ - The customer's tax exemption. One of `none`, `exempt`, or `reverse`. - """ - tax_ids: NotRequired[ - "List[Invoice.UpcomingLinesParamsCustomerDetailsTaxId]" - ] - """ - The customer's tax IDs. - """ + class UpcomingLinesParamsCustomerDetails(TypedDict): + address: NotRequired[ + "Literal['']|Invoice.UpcomingLinesParamsCustomerDetailsAddress" + ] + """ + The customer's address. + """ + shipping: NotRequired[ + "Literal['']|Invoice.UpcomingLinesParamsCustomerDetailsShipping" + ] + """ + The customer's shipping information. Appears on invoices emailed to this customer. + """ + tax: NotRequired["Invoice.UpcomingLinesParamsCustomerDetailsTax"] + """ + Tax details about the customer. + """ + tax_exempt: NotRequired[ + "Literal['']|Literal['exempt', 'none', 'reverse']" + ] + """ + The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + """ + tax_ids: NotRequired[ + "List[Invoice.UpcomingLinesParamsCustomerDetailsTaxId]" + ] + """ + The customer's tax IDs. + """ - class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): - type: Literal[ - "ad_nrt", - "ae_trn", - "ar_cuit", - "au_abn", - "au_arn", - "bg_uic", - "bo_tin", - "br_cnpj", - "br_cpf", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "ch_vat", - "cl_tin", - "cn_tin", - "co_nit", - "cr_tin", - "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", - "li_uid", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "no_vat", - "nz_gst", - "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", - "za_vat", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 - """ - Value of the tax ID. - """ + class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): + type: Literal[ + "ad_nrt", + "ae_trn", + "ar_cuit", + "au_abn", + "au_arn", + "bg_uic", + "bo_tin", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "cn_tin", + "co_nit", + "cr_tin", + "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", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "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", + "za_vat", + ] + """ + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 + """ + Value of the tax ID. + """ - class UpcomingLinesParamsCustomerDetailsTax(TypedDict): - ip_address: NotRequired["Literal['']|str"] - """ - 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. - """ + class UpcomingLinesParamsCustomerDetailsTax(TypedDict): + ip_address: NotRequired["Literal['']|str"] + """ + 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. + """ - class UpcomingLinesParamsCustomerDetailsShipping(TypedDict): - address: "Invoice.UpcomingLinesParamsCustomerDetailsShippingAddress" - """ - Customer shipping address. - """ - name: str - """ - Customer name. - """ - phone: NotRequired["str"] - """ - Customer phone (including extension). - """ + class UpcomingLinesParamsCustomerDetailsShipping(TypedDict): + address: "Invoice.UpcomingLinesParamsCustomerDetailsShippingAddress" + """ + Customer shipping address. + """ + name: str + """ + Customer name. + """ + phone: NotRequired["str"] + """ + Customer phone (including extension). + """ - class UpcomingLinesParamsCustomerDetailsShippingAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class UpcomingLinesParamsCustomerDetailsShippingAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class UpcomingLinesParamsCustomerDetailsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class UpcomingLinesParamsCustomerDetailsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class UpcomingLinesParamsAutomaticTax(TypedDict): - enabled: bool - """ - Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. - """ + class UpcomingLinesParamsAutomaticTax(TypedDict): + enabled: bool + """ + Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + """ - class VoidInvoiceParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class VoidInvoiceParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class SearchParams(RequestOptions): - 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. - """ - page: NotRequired["str"] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). - """ + class SearchParams(RequestOptions): + 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. + """ + page: NotRequired["str"] + """ + A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + """ + query: str + """ + The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). + """ account_country: Optional[str] """ diff --git a/stripe/api_resources/invoice_item.py b/stripe/api_resources/invoice_item.py index d245a7e07..2e649cf02 100644 --- a/stripe/api_resources/invoice_item.py +++ b/stripe/api_resources/invoice_item.py @@ -64,301 +64,299 @@ class Period(StripeObject): The start of the period. This value is inclusive. """ - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - amount: NotRequired["int"] - """ - The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. - """ - currency: NotRequired["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). - """ - customer: str - """ - The ID of the customer who will be billed when this invoice item is billed. - """ - description: NotRequired["str"] - """ - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. - """ - discountable: NotRequired["bool"] - """ - Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceItem.CreateParamsDiscount]" - ] - """ - The coupons to redeem into discounts for the invoice item or invoice line item. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - invoice: NotRequired["str"] - """ - The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. - """ - metadata: NotRequired["Literal['']|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`. - """ - period: NotRequired["InvoiceItem.CreateParamsPeriod"] - """ - The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. - """ - price: NotRequired["str"] - """ - The ID of the price object. - """ - price_data: NotRequired["InvoiceItem.CreateParamsPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired["int"] - """ - Non-negative integer. The quantity of units for the invoice item. - """ - subscription: NotRequired["str"] - """ - The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - tax_rates: NotRequired["List[str]"] - """ - The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. - """ - unit_amount: NotRequired["int"] - """ - The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class CreateParams(RequestOptions): + amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. + """ + currency: NotRequired["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). + """ + customer: str + """ + The ID of the customer who will be billed when this invoice item is billed. + """ + description: NotRequired["str"] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ + discountable: NotRequired["bool"] + """ + Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. + """ + discounts: NotRequired[ + "Literal['']|List[InvoiceItem.CreateParamsDiscount]" + ] + """ + The coupons to redeem into discounts for the invoice item or invoice line item. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + invoice: NotRequired["str"] + """ + The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. + """ + metadata: NotRequired["Literal['']|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`. + """ + period: NotRequired["InvoiceItem.CreateParamsPeriod"] + """ + The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + """ + price: NotRequired["str"] + """ + The ID of the price object. + """ + price_data: NotRequired["InvoiceItem.CreateParamsPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired["int"] + """ + Non-negative integer. The quantity of units for the invoice item. + """ + subscription: NotRequired["str"] + """ + The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + tax_rates: NotRequired["List[str]"] + """ + The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. + """ + unit_amount: NotRequired["int"] + """ + The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class CreateParamsPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class CreateParamsPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class CreateParamsPeriod(TypedDict): - end: int - """ - The end of the period, which must be greater than or equal to the start. This value is inclusive. - """ - start: int - """ - The start of the period. This value is inclusive. - """ + class CreateParamsPeriod(TypedDict): + end: int + """ + The end of the period, which must be greater than or equal to the start. This value is inclusive. + """ + start: int + """ + The start of the period. This value is inclusive. + """ - class CreateParamsDiscount(TypedDict): - coupon: NotRequired["str"] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired["str"] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ + class CreateParamsDiscount(TypedDict): + coupon: NotRequired["str"] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired["str"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ - class DeleteParams(RequestOptions): - pass + class DeleteParams(RequestOptions): + pass - class ListParams(RequestOptions): - created: NotRequired["InvoiceItem.ListParamsCreated|int"] - customer: NotRequired["str"] - """ - The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. - """ - 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. - """ - invoice: NotRequired["str"] - """ - Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. - """ - 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. - """ - pending: NotRequired["bool"] - """ - Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied. - """ - 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 ListParams(RequestOptions): + created: NotRequired["InvoiceItem.ListParamsCreated|int"] + customer: NotRequired["str"] + """ + The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. + """ + 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. + """ + invoice: NotRequired["str"] + """ + Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. + """ + 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. + """ + pending: NotRequired["bool"] + """ + Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied. + """ + 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 ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - amount: NotRequired["int"] - """ - The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. - """ - description: NotRequired["str"] - """ - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. - """ - discountable: NotRequired["bool"] - """ - Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceItem.ModifyParamsDiscount]" - ] - """ - The coupons & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - period: NotRequired["InvoiceItem.ModifyParamsPeriod"] - """ - The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. - """ - price: NotRequired["str"] - """ - The ID of the price object. - """ - price_data: NotRequired["InvoiceItem.ModifyParamsPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired["int"] - """ - Non-negative integer. The quantity of units for the invoice item. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. - """ - unit_amount: NotRequired["int"] - """ - The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class ModifyParams(RequestOptions): + amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + """ + description: NotRequired["str"] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ + discountable: NotRequired["bool"] + """ + Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. + """ + discounts: NotRequired[ + "Literal['']|List[InvoiceItem.ModifyParamsDiscount]" + ] + """ + The coupons & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + period: NotRequired["InvoiceItem.ModifyParamsPeriod"] + """ + The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + """ + price: NotRequired["str"] + """ + The ID of the price object. + """ + price_data: NotRequired["InvoiceItem.ModifyParamsPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired["int"] + """ + Non-negative integer. The quantity of units for the invoice item. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. + """ + unit_amount: NotRequired["int"] + """ + The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class ModifyParamsPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class ModifyParamsPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class ModifyParamsPeriod(TypedDict): - end: int - """ - The end of the period, which must be greater than or equal to the start. This value is inclusive. - """ - start: int - """ - The start of the period. This value is inclusive. - """ + class ModifyParamsPeriod(TypedDict): + end: int + """ + The end of the period, which must be greater than or equal to the start. This value is inclusive. + """ + start: int + """ + The start of the period. This value is inclusive. + """ - class ModifyParamsDiscount(TypedDict): - coupon: NotRequired["str"] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired["str"] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ + class ModifyParamsDiscount(TypedDict): + coupon: NotRequired["str"] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired["str"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ amount: int """ diff --git a/stripe/api_resources/issuing/authorization.py b/stripe/api_resources/issuing/authorization.py index 14045de7c..0d007ec8f 100644 --- a/stripe/api_resources/issuing/authorization.py +++ b/stripe/api_resources/issuing/authorization.py @@ -275,431 +275,421 @@ class ThreeDSecure(StripeObject): "three_d_secure": ThreeDSecure, } - if TYPE_CHECKING: - - class ApproveParams(RequestOptions): - amount: NotRequired["int"] - """ - If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ + class ApproveParams(RequestOptions): + amount: NotRequired["int"] + """ + If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ - class DeclineParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ + class DeclineParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ - class ListParams(RequestOptions): - card: NotRequired["str"] - """ - Only return authorizations that belong to the given card. - """ - cardholder: NotRequired["str"] - """ - Only return authorizations that belong to the given cardholder. - """ - created: NotRequired["Authorization.ListParamsCreated|int"] - """ - Only return authorizations that were created during the given date interval. - """ - 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['closed', 'pending', 'reversed']"] - """ - Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. - """ + class ListParams(RequestOptions): + card: NotRequired["str"] + """ + Only return authorizations that belong to the given card. + """ + cardholder: NotRequired["str"] + """ + Only return authorizations that belong to the given cardholder. + """ + created: NotRequired["Authorization.ListParamsCreated|int"] + """ + Only return authorizations that were created during the given date interval. + """ + 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['closed', 'pending', 'reversed']"] + """ + Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ + class ModifyParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CaptureParams(RequestOptions): - capture_amount: NotRequired["int"] - """ - The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - close_authorization: NotRequired["bool"] - """ - Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - purchase_details: NotRequired[ - "Authorization.CaptureParamsPurchaseDetails" - ] - """ - Additional purchase information that is optionally provided by the merchant. - """ + class CaptureParams(RequestOptions): + capture_amount: NotRequired["int"] + """ + The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + close_authorization: NotRequired["bool"] + """ + Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + purchase_details: NotRequired[ + "Authorization.CaptureParamsPurchaseDetails" + ] + """ + Additional purchase information that is optionally provided by the merchant. + """ - class CaptureParamsPurchaseDetails(TypedDict): - flight: NotRequired[ - "Authorization.CaptureParamsPurchaseDetailsFlight" - ] - """ - Information about the flight that was purchased with this transaction. - """ - fuel: NotRequired["Authorization.CaptureParamsPurchaseDetailsFuel"] - """ - Information about fuel that was purchased with this transaction. - """ - lodging: NotRequired[ - "Authorization.CaptureParamsPurchaseDetailsLodging" - ] - """ - Information about lodging that was purchased with this transaction. - """ - receipt: NotRequired[ - "List[Authorization.CaptureParamsPurchaseDetailsReceipt]" - ] - """ - The line items in the purchase. - """ - reference: NotRequired["str"] - """ - A merchant-specific order number. - """ + class CaptureParamsPurchaseDetails(TypedDict): + flight: NotRequired["Authorization.CaptureParamsPurchaseDetailsFlight"] + """ + Information about the flight that was purchased with this transaction. + """ + fuel: NotRequired["Authorization.CaptureParamsPurchaseDetailsFuel"] + """ + Information about fuel that was purchased with this transaction. + """ + lodging: NotRequired[ + "Authorization.CaptureParamsPurchaseDetailsLodging" + ] + """ + Information about lodging that was purchased with this transaction. + """ + receipt: NotRequired[ + "List[Authorization.CaptureParamsPurchaseDetailsReceipt]" + ] + """ + The line items in the purchase. + """ + reference: NotRequired["str"] + """ + A merchant-specific order number. + """ - class CaptureParamsPurchaseDetailsReceipt(TypedDict): - description: NotRequired["str"] - quantity: NotRequired["str"] - total: NotRequired["int"] - unit_cost: NotRequired["int"] + class CaptureParamsPurchaseDetailsReceipt(TypedDict): + description: NotRequired["str"] + quantity: NotRequired["str"] + total: NotRequired["int"] + unit_cost: NotRequired["int"] - class CaptureParamsPurchaseDetailsLodging(TypedDict): - check_in_at: NotRequired["int"] - """ - The time of checking into the lodging. - """ - nights: NotRequired["int"] - """ - The number of nights stayed at the lodging. - """ + class CaptureParamsPurchaseDetailsLodging(TypedDict): + check_in_at: NotRequired["int"] + """ + The time of checking into the lodging. + """ + nights: NotRequired["int"] + """ + The number of nights stayed at the lodging. + """ - class CaptureParamsPurchaseDetailsFuel(TypedDict): - type: NotRequired[ - "Literal['diesel', 'other', 'unleaded_plus', 'unleaded_regular', 'unleaded_super']" - ] - """ - The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. - """ - unit: NotRequired["Literal['liter', 'us_gallon']"] - """ - The units for `volume_decimal`. One of `us_gallon` or `liter`. - """ - unit_cost_decimal: NotRequired["str"] - """ - The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - """ - volume_decimal: NotRequired["str"] - """ - The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. - """ + class CaptureParamsPurchaseDetailsFuel(TypedDict): + type: NotRequired[ + "Literal['diesel', 'other', 'unleaded_plus', 'unleaded_regular', 'unleaded_super']" + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired["Literal['liter', 'us_gallon']"] + """ + The units for `volume_decimal`. One of `us_gallon` or `liter`. + """ + unit_cost_decimal: NotRequired["str"] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + volume_decimal: NotRequired["str"] + """ + The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. + """ - class CaptureParamsPurchaseDetailsFlight(TypedDict): - departure_at: NotRequired["int"] - """ - The time that the flight departed. - """ - passenger_name: NotRequired["str"] - """ - The name of the passenger. - """ - refundable: NotRequired["bool"] - """ - Whether the ticket is refundable. - """ - segments: NotRequired[ - "List[Authorization.CaptureParamsPurchaseDetailsFlightSegment]" - ] - """ - The legs of the trip. - """ - travel_agency: NotRequired["str"] - """ - The travel agency that issued the ticket. - """ + class CaptureParamsPurchaseDetailsFlight(TypedDict): + departure_at: NotRequired["int"] + """ + The time that the flight departed. + """ + passenger_name: NotRequired["str"] + """ + The name of the passenger. + """ + refundable: NotRequired["bool"] + """ + Whether the ticket is refundable. + """ + segments: NotRequired[ + "List[Authorization.CaptureParamsPurchaseDetailsFlightSegment]" + ] + """ + The legs of the trip. + """ + travel_agency: NotRequired["str"] + """ + The travel agency that issued the ticket. + """ - class CaptureParamsPurchaseDetailsFlightSegment(TypedDict): - arrival_airport_code: NotRequired["str"] - """ - The three-letter IATA airport code of the flight's destination. - """ - carrier: NotRequired["str"] - """ - The airline carrier code. - """ - departure_airport_code: NotRequired["str"] - """ - The three-letter IATA airport code that the flight departed from. - """ - flight_number: NotRequired["str"] - """ - The flight number. - """ - service_class: NotRequired["str"] - """ - The flight's service class. - """ - stopover_allowed: NotRequired["bool"] - """ - Whether a stopover is allowed on this flight. - """ + class CaptureParamsPurchaseDetailsFlightSegment(TypedDict): + arrival_airport_code: NotRequired["str"] + """ + The three-letter IATA airport code of the flight's destination. + """ + carrier: NotRequired["str"] + """ + The airline carrier code. + """ + departure_airport_code: NotRequired["str"] + """ + The three-letter IATA airport code that the flight departed from. + """ + flight_number: NotRequired["str"] + """ + The flight number. + """ + service_class: NotRequired["str"] + """ + The flight's service class. + """ + stopover_allowed: NotRequired["bool"] + """ + Whether a stopover is allowed on this flight. + """ - class CreateParams(RequestOptions): - amount: int - """ - The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - amount_details: NotRequired[ - "Authorization.CreateParamsAmountDetails" - ] - """ - Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - authorization_method: NotRequired[ - "Literal['chip', 'contactless', 'keyed_in', 'online', 'swipe']" - ] - """ - How the card details were provided. Defaults to online. - """ - card: str - """ - Card associated with this authorization. - """ - 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). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - is_amount_controllable: NotRequired["bool"] - """ - 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_data: NotRequired[ - "Authorization.CreateParamsMerchantData" - ] - """ - Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. - """ - network_data: NotRequired["Authorization.CreateParamsNetworkData"] - """ - Details about the authorization, such as identifiers, set by the card network. - """ - verification_data: NotRequired[ - "Authorization.CreateParamsVerificationData" - ] - """ - Verifications that Stripe performed on information that the cardholder provided to the merchant. - """ - wallet: NotRequired[ - "Literal['apple_pay', 'google_pay', 'samsung_pay']" - ] - """ - 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. - """ + class CreateParams(RequestOptions): + amount: int + """ + The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + amount_details: NotRequired["Authorization.CreateParamsAmountDetails"] + """ + Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + authorization_method: NotRequired[ + "Literal['chip', 'contactless', 'keyed_in', 'online', 'swipe']" + ] + """ + How the card details were provided. Defaults to online. + """ + card: str + """ + Card associated with this authorization. + """ + 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). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + is_amount_controllable: NotRequired["bool"] + """ + 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_data: NotRequired["Authorization.CreateParamsMerchantData"] + """ + Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + """ + network_data: NotRequired["Authorization.CreateParamsNetworkData"] + """ + Details about the authorization, such as identifiers, set by the card network. + """ + verification_data: NotRequired[ + "Authorization.CreateParamsVerificationData" + ] + """ + Verifications that Stripe performed on information that the cardholder provided to the merchant. + """ + wallet: NotRequired[ + "Literal['apple_pay', 'google_pay', 'samsung_pay']" + ] + """ + 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. + """ - class CreateParamsVerificationData(TypedDict): - address_line1_check: NotRequired[ - "Literal['match', 'mismatch', 'not_provided']" - ] - """ - Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`. - """ - address_postal_code_check: NotRequired[ - "Literal['match', 'mismatch', 'not_provided']" - ] - """ - Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`. - """ - authentication_exemption: NotRequired[ - "Authorization.CreateParamsVerificationDataAuthenticationExemption" - ] - """ - The exemption applied to this authorization. - """ - cvc_check: NotRequired[ - "Literal['match', 'mismatch', 'not_provided']" - ] - """ - Whether the cardholder provided a CVC and if it matched Stripe's record. - """ - expiry_check: NotRequired[ - "Literal['match', 'mismatch', 'not_provided']" - ] - """ - Whether the cardholder provided an expiry date and if it matched Stripe's record. - """ - three_d_secure: NotRequired[ - "Authorization.CreateParamsVerificationDataThreeDSecure" - ] - """ - 3D Secure details. - """ + class CreateParamsVerificationData(TypedDict): + address_line1_check: NotRequired[ + "Literal['match', 'mismatch', 'not_provided']" + ] + """ + Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`. + """ + address_postal_code_check: NotRequired[ + "Literal['match', 'mismatch', 'not_provided']" + ] + """ + Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`. + """ + authentication_exemption: NotRequired[ + "Authorization.CreateParamsVerificationDataAuthenticationExemption" + ] + """ + The exemption applied to this authorization. + """ + cvc_check: NotRequired["Literal['match', 'mismatch', 'not_provided']"] + """ + Whether the cardholder provided a CVC and if it matched Stripe's record. + """ + expiry_check: NotRequired[ + "Literal['match', 'mismatch', 'not_provided']" + ] + """ + Whether the cardholder provided an expiry date and if it matched Stripe's record. + """ + three_d_secure: NotRequired[ + "Authorization.CreateParamsVerificationDataThreeDSecure" + ] + """ + 3D Secure details. + """ - class CreateParamsVerificationDataThreeDSecure(TypedDict): - result: Literal[ - "attempt_acknowledged", "authenticated", "failed", "required" - ] - """ - The outcome of the 3D Secure authentication request. - """ + class CreateParamsVerificationDataThreeDSecure(TypedDict): + result: Literal[ + "attempt_acknowledged", "authenticated", "failed", "required" + ] + """ + The outcome of the 3D Secure authentication request. + """ - class CreateParamsVerificationDataAuthenticationExemption(TypedDict): - claimed_by: Literal["acquirer", "issuer"] - """ - The entity that requested the exemption, either the acquiring merchant or the Issuing user. - """ - type: Literal["low_value_transaction", "transaction_risk_analysis"] - """ - The specific exemption claimed for this authorization. - """ + class CreateParamsVerificationDataAuthenticationExemption(TypedDict): + claimed_by: Literal["acquirer", "issuer"] + """ + The entity that requested the exemption, either the acquiring merchant or the Issuing user. + """ + type: Literal["low_value_transaction", "transaction_risk_analysis"] + """ + The specific exemption claimed for this authorization. + """ - class CreateParamsNetworkData(TypedDict): - acquiring_institution_id: NotRequired["str"] - """ - Identifier assigned to the acquirer by the card network. - """ + class CreateParamsNetworkData(TypedDict): + acquiring_institution_id: NotRequired["str"] + """ + Identifier assigned to the acquirer by the card network. + """ - class CreateParamsMerchantData(TypedDict): - category: NotRequired[ - "Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']" - ] - """ - A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. - """ - city: NotRequired["str"] - """ - City where the seller is located - """ - country: NotRequired["str"] - """ - Country where the seller is located - """ - name: NotRequired["str"] - """ - Name of the seller - """ - network_id: NotRequired["str"] - """ - Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. - """ - postal_code: NotRequired["str"] - """ - Postal code where the seller is located - """ - state: NotRequired["str"] - """ - State where the seller is located - """ - terminal_id: NotRequired["str"] - """ - An ID assigned by the seller to the location of the sale. - """ - url: NotRequired["str"] - """ - URL provided by the merchant on a 3DS request - """ + class CreateParamsMerchantData(TypedDict): + category: NotRequired[ + "Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']" + ] + """ + A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + """ + city: NotRequired["str"] + """ + City where the seller is located + """ + country: NotRequired["str"] + """ + Country where the seller is located + """ + name: NotRequired["str"] + """ + Name of the seller + """ + network_id: NotRequired["str"] + """ + Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + """ + postal_code: NotRequired["str"] + """ + Postal code where the seller is located + """ + state: NotRequired["str"] + """ + State where the seller is located + """ + terminal_id: NotRequired["str"] + """ + An ID assigned by the seller to the location of the sale. + """ + url: NotRequired["str"] + """ + URL provided by the merchant on a 3DS request + """ - class CreateParamsAmountDetails(TypedDict): - atm_fee: NotRequired["int"] - """ - The ATM withdrawal fee. - """ - cashback_amount: NotRequired["int"] - """ - The amount of cash requested by the cardholder. - """ + class CreateParamsAmountDetails(TypedDict): + atm_fee: NotRequired["int"] + """ + The ATM withdrawal fee. + """ + cashback_amount: NotRequired["int"] + """ + The amount of cash requested by the cardholder. + """ - class ExpireParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ExpireParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class IncrementParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - increment_amount: int - """ - The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - is_amount_controllable: NotRequired["bool"] - """ - 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 IncrementParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + increment_amount: int + """ + The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + is_amount_controllable: NotRequired["bool"] + """ + 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 ReverseParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - reverse_amount: NotRequired["int"] - """ - The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ + class ReverseParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + reverse_amount: NotRequired["int"] + """ + The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ amount: int """ diff --git a/stripe/api_resources/issuing/card.py b/stripe/api_resources/issuing/card.py index a29821c93..7c3f403f2 100644 --- a/stripe/api_resources/issuing/card.py +++ b/stripe/api_resources/issuing/card.py @@ -1108,326 +1108,324 @@ class GooglePay(StripeObject): """ _inner_class_types = {"apple_pay": ApplePay, "google_pay": GooglePay} - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - cardholder: NotRequired["str"] - """ - The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. - """ - currency: str - """ - The currency for the card. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: NotRequired["str"] - 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`. - """ - replacement_for: NotRequired["str"] - """ - The card this is meant to be a replacement for (if any). - """ - replacement_reason: NotRequired[ - "Literal['damaged', 'expired', 'lost', 'stolen']" - ] - """ - If `replacement_for` is specified, this should indicate why that card is being replaced. - """ - shipping: NotRequired["Card.CreateParamsShipping"] - """ - The address where the card will be shipped. - """ - spending_controls: NotRequired["Card.CreateParamsSpendingControls"] - """ - Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - """ - status: NotRequired["Literal['active', 'inactive']"] - """ - Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. - """ - type: Literal["physical", "virtual"] - """ - The type of card to issue. Possible values are `physical` or `virtual`. - """ + class CreateParams(RequestOptions): + cardholder: NotRequired["str"] + """ + The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. + """ + currency: str + """ + The currency for the card. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + financial_account: NotRequired["str"] + 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`. + """ + replacement_for: NotRequired["str"] + """ + The card this is meant to be a replacement for (if any). + """ + replacement_reason: NotRequired[ + "Literal['damaged', 'expired', 'lost', 'stolen']" + ] + """ + If `replacement_for` is specified, this should indicate why that card is being replaced. + """ + shipping: NotRequired["Card.CreateParamsShipping"] + """ + The address where the card will be shipped. + """ + spending_controls: NotRequired["Card.CreateParamsSpendingControls"] + """ + Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + """ + status: NotRequired["Literal['active', 'inactive']"] + """ + Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. + """ + type: Literal["physical", "virtual"] + """ + The type of card to issue. Possible values are `physical` or `virtual`. + """ - class CreateParamsSpendingControls(TypedDict): - allowed_categories: NotRequired[ - "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. - """ - blocked_categories: NotRequired[ - "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. - """ - spending_limits: NotRequired[ - "List[Card.CreateParamsSpendingControlsSpendingLimit]" - ] - """ - Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). - """ + class CreateParamsSpendingControls(TypedDict): + allowed_categories: NotRequired[ + "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + """ + blocked_categories: NotRequired[ + "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + """ + spending_limits: NotRequired[ + "List[Card.CreateParamsSpendingControlsSpendingLimit]" + ] + """ + Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + """ - class CreateParamsSpendingControlsSpendingLimit(TypedDict): - amount: int - """ - Maximum amount allowed to spend per interval. - """ - categories: NotRequired[ - "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. - """ - interval: Literal[ - "all_time", - "daily", - "monthly", - "per_authorization", - "weekly", - "yearly", - ] - """ - Interval (or event) to which the amount applies. - """ + class CreateParamsSpendingControlsSpendingLimit(TypedDict): + amount: int + """ + Maximum amount allowed to spend per interval. + """ + categories: NotRequired[ + "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + """ + interval: Literal[ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly", + ] + """ + Interval (or event) to which the amount applies. + """ - class CreateParamsShipping(TypedDict): - address: "Card.CreateParamsShippingAddress" - """ - The address that the card is shipped to. - """ - customs: NotRequired["Card.CreateParamsShippingCustoms"] - """ - Customs information for the shipment. - """ - name: str - """ - The name printed on the shipping label when shipping the card. - """ - phone_number: NotRequired["str"] - """ - Phone number of the recipient of the shipment. - """ - require_signature: NotRequired["bool"] - """ - Whether a signature is required for card delivery. - """ - service: NotRequired["Literal['express', 'priority', 'standard']"] - """ - Shipment service. - """ - type: NotRequired["Literal['bulk', 'individual']"] - """ - Packaging options. - """ + class CreateParamsShipping(TypedDict): + address: "Card.CreateParamsShippingAddress" + """ + The address that the card is shipped to. + """ + customs: NotRequired["Card.CreateParamsShippingCustoms"] + """ + Customs information for the shipment. + """ + name: str + """ + The name printed on the shipping label when shipping the card. + """ + phone_number: NotRequired["str"] + """ + Phone number of the recipient of the shipment. + """ + require_signature: NotRequired["bool"] + """ + Whether a signature is required for card delivery. + """ + service: NotRequired["Literal['express', 'priority', 'standard']"] + """ + Shipment service. + """ + type: NotRequired["Literal['bulk', 'individual']"] + """ + Packaging options. + """ - class CreateParamsShippingCustoms(TypedDict): - eori_number: NotRequired["str"] - """ - The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. - """ + class CreateParamsShippingCustoms(TypedDict): + eori_number: NotRequired["str"] + """ + The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. + """ - class CreateParamsShippingAddress(TypedDict): - city: str - """ - City, district, suburb, town, or village. - """ - country: str - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: str - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: str - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsShippingAddress(TypedDict): + city: str + """ + City, district, suburb, town, or village. + """ + country: str + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: str + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: str + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ListParams(RequestOptions): - cardholder: NotRequired["str"] - """ - Only return cards belonging to the Cardholder with the provided ID. - """ - created: NotRequired["Card.ListParamsCreated|int"] - """ - Only return cards that were issued during the given date interval. - """ - 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. - """ - exp_month: NotRequired["int"] - """ - Only return cards that have the given expiration month. - """ - exp_year: NotRequired["int"] - """ - Only return cards that have the given expiration year. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - last4: NotRequired["str"] - """ - Only return cards that have the given last four digits. - """ - 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', 'canceled', 'inactive']"] - """ - Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. - """ - type: NotRequired["Literal['physical', 'virtual']"] - """ - Only return cards that have the given type. One of `virtual` or `physical`. - """ + class ListParams(RequestOptions): + cardholder: NotRequired["str"] + """ + Only return cards belonging to the Cardholder with the provided ID. + """ + created: NotRequired["Card.ListParamsCreated|int"] + """ + Only return cards that were issued during the given date interval. + """ + 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. + """ + exp_month: NotRequired["int"] + """ + Only return cards that have the given expiration month. + """ + exp_year: NotRequired["int"] + """ + Only return cards that have the given expiration year. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + last4: NotRequired["str"] + """ + Only return cards that have the given last four digits. + """ + 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', 'canceled', 'inactive']"] + """ + Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. + """ + type: NotRequired["Literal['physical', 'virtual']"] + """ + Only return cards that have the given type. One of `virtual` or `physical`. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - cancellation_reason: NotRequired["Literal['lost', 'stolen']"] - """ - Reason why the `status` of this card is `canceled`. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - pin: NotRequired["Card.ModifyParamsPin"] - """ - The desired new PIN for this card. - """ - spending_controls: NotRequired["Card.ModifyParamsSpendingControls"] - """ - Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - """ - status: NotRequired["Literal['active', 'canceled', 'inactive']"] - """ - Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. - """ + class ModifyParams(RequestOptions): + cancellation_reason: NotRequired["Literal['lost', 'stolen']"] + """ + Reason why the `status` of this card is `canceled`. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + pin: NotRequired["Card.ModifyParamsPin"] + """ + The desired new PIN for this card. + """ + spending_controls: NotRequired["Card.ModifyParamsSpendingControls"] + """ + Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + """ + status: NotRequired["Literal['active', 'canceled', 'inactive']"] + """ + Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. + """ - class ModifyParamsSpendingControls(TypedDict): - allowed_categories: NotRequired[ - "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. - """ - blocked_categories: NotRequired[ - "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. - """ - spending_limits: NotRequired[ - "List[Card.ModifyParamsSpendingControlsSpendingLimit]" - ] - """ - Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). - """ + class ModifyParamsSpendingControls(TypedDict): + allowed_categories: NotRequired[ + "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + """ + blocked_categories: NotRequired[ + "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + """ + spending_limits: NotRequired[ + "List[Card.ModifyParamsSpendingControlsSpendingLimit]" + ] + """ + Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + """ - class ModifyParamsSpendingControlsSpendingLimit(TypedDict): - amount: int - """ - Maximum amount allowed to spend per interval. - """ - categories: NotRequired[ - "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. - """ - interval: Literal[ - "all_time", - "daily", - "monthly", - "per_authorization", - "weekly", - "yearly", - ] - """ - Interval (or event) to which the amount applies. - """ + class ModifyParamsSpendingControlsSpendingLimit(TypedDict): + amount: int + """ + Maximum amount allowed to spend per interval. + """ + categories: NotRequired[ + "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + """ + interval: Literal[ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly", + ] + """ + Interval (or event) to which the amount applies. + """ - class ModifyParamsPin(TypedDict): - encrypted_number: NotRequired["str"] - """ - The card's desired new PIN, encrypted under Stripe's public key. - """ + class ModifyParamsPin(TypedDict): + encrypted_number: NotRequired["str"] + """ + The card's desired new PIN, encrypted under Stripe's public key. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class DeliverCardParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class DeliverCardParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class FailCardParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class FailCardParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ReturnCardParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ReturnCardParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ShipCardParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ShipCardParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ brand: str """ diff --git a/stripe/api_resources/issuing/cardholder.py b/stripe/api_resources/issuing/cardholder.py index 5a2d8b53d..bbae72b7d 100644 --- a/stripe/api_resources/issuing/cardholder.py +++ b/stripe/api_resources/issuing/cardholder.py @@ -1122,501 +1122,499 @@ class SpendingLimit(StripeObject): """ _inner_class_types = {"spending_limits": SpendingLimit} - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - billing: "Cardholder.CreateParamsBilling" - """ - The cardholder's billing address. - """ - company: NotRequired["Cardholder.CreateParamsCompany"] - """ - Additional information about a `company` cardholder. - """ - email: NotRequired["str"] - """ - The cardholder's email address. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - individual: NotRequired["Cardholder.CreateParamsIndividual"] - """ - Additional information about an `individual` cardholder. - """ - 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`. - """ - name: str - """ - The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. - """ - phone_number: NotRequired["str"] - """ - The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. - """ - preferred_locales: NotRequired[ - "List[Literal['de', 'en', 'es', 'fr', 'it']]" - ] - """ - The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. - This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. - """ - spending_controls: NotRequired[ - "Cardholder.CreateParamsSpendingControls" - ] - """ - Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - """ - status: NotRequired["Literal['active', 'inactive']"] - """ - Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. - """ - type: NotRequired["Literal['company', 'individual']"] - """ - One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. - """ + class CreateParams(RequestOptions): + billing: "Cardholder.CreateParamsBilling" + """ + The cardholder's billing address. + """ + company: NotRequired["Cardholder.CreateParamsCompany"] + """ + Additional information about a `company` cardholder. + """ + email: NotRequired["str"] + """ + The cardholder's email address. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + individual: NotRequired["Cardholder.CreateParamsIndividual"] + """ + Additional information about an `individual` cardholder. + """ + 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`. + """ + name: str + """ + The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. + """ + phone_number: NotRequired["str"] + """ + The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. + """ + preferred_locales: NotRequired[ + "List[Literal['de', 'en', 'es', 'fr', 'it']]" + ] + """ + The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + """ + spending_controls: NotRequired[ + "Cardholder.CreateParamsSpendingControls" + ] + """ + Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + """ + status: NotRequired["Literal['active', 'inactive']"] + """ + Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. + """ + type: NotRequired["Literal['company', 'individual']"] + """ + One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. + """ - class CreateParamsSpendingControls(TypedDict): - allowed_categories: NotRequired[ - "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. - """ - blocked_categories: NotRequired[ - "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. - """ - spending_limits: NotRequired[ - "List[Cardholder.CreateParamsSpendingControlsSpendingLimit]" - ] - """ - Limit spending with amount-based rules that apply across this cardholder's cards. - """ - spending_limits_currency: NotRequired["str"] - """ - Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. - """ + class CreateParamsSpendingControls(TypedDict): + allowed_categories: NotRequired[ + "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + """ + blocked_categories: NotRequired[ + "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + """ + spending_limits: NotRequired[ + "List[Cardholder.CreateParamsSpendingControlsSpendingLimit]" + ] + """ + Limit spending with amount-based rules that apply across this cardholder's cards. + """ + spending_limits_currency: NotRequired["str"] + """ + Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. + """ - class CreateParamsSpendingControlsSpendingLimit(TypedDict): - amount: int - """ - Maximum amount allowed to spend per interval. - """ - categories: NotRequired[ - "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. - """ - interval: Literal[ - "all_time", - "daily", - "monthly", - "per_authorization", - "weekly", - "yearly", - ] - """ - Interval (or event) to which the amount applies. - """ + class CreateParamsSpendingControlsSpendingLimit(TypedDict): + amount: int + """ + Maximum amount allowed to spend per interval. + """ + categories: NotRequired[ + "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + """ + interval: Literal[ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly", + ] + """ + Interval (or event) to which the amount applies. + """ - class CreateParamsIndividual(TypedDict): - card_issuing: NotRequired[ - "Cardholder.CreateParamsIndividualCardIssuing" - ] - """ - Information related to the card_issuing program for this cardholder. - """ - dob: NotRequired["Cardholder.CreateParamsIndividualDob"] - """ - The date of birth of this cardholder. Cardholders must be older than 13 years old. - """ - first_name: NotRequired["str"] - """ - The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. - """ - last_name: NotRequired["str"] - """ - The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. - """ - verification: NotRequired[ - "Cardholder.CreateParamsIndividualVerification" - ] - """ - Government-issued ID document for this cardholder. - """ + class CreateParamsIndividual(TypedDict): + card_issuing: NotRequired[ + "Cardholder.CreateParamsIndividualCardIssuing" + ] + """ + Information related to the card_issuing program for this cardholder. + """ + dob: NotRequired["Cardholder.CreateParamsIndividualDob"] + """ + The date of birth of this cardholder. Cardholders must be older than 13 years old. + """ + first_name: NotRequired["str"] + """ + The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + """ + last_name: NotRequired["str"] + """ + The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + """ + verification: NotRequired[ + "Cardholder.CreateParamsIndividualVerification" + ] + """ + Government-issued ID document for this cardholder. + """ - class CreateParamsIndividualVerification(TypedDict): - document: NotRequired[ - "Cardholder.CreateParamsIndividualVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ + class CreateParamsIndividualVerification(TypedDict): + document: NotRequired[ + "Cardholder.CreateParamsIndividualVerificationDocument" + ] + """ + An identifying document, either a passport or local ID card. + """ - class CreateParamsIndividualVerificationDocument(TypedDict): - back: NotRequired["str"] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - """ - front: NotRequired["str"] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - """ + class CreateParamsIndividualVerificationDocument(TypedDict): + back: NotRequired["str"] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + """ + front: NotRequired["str"] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + """ - class CreateParamsIndividualDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ + class CreateParamsIndividualDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ - class CreateParamsIndividualCardIssuing(TypedDict): - user_terms_acceptance: NotRequired[ - "Cardholder.CreateParamsIndividualCardIssuingUserTermsAcceptance" - ] - """ - Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards). - """ + class CreateParamsIndividualCardIssuing(TypedDict): + user_terms_acceptance: NotRequired[ + "Cardholder.CreateParamsIndividualCardIssuingUserTermsAcceptance" + ] + """ + Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards). + """ - class CreateParamsIndividualCardIssuingUserTermsAcceptance(TypedDict): - date: NotRequired["int"] - """ - The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. - """ - ip: NotRequired["str"] - """ - The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the cardholder accepted the Authorized User Terms. - """ + class CreateParamsIndividualCardIssuingUserTermsAcceptance(TypedDict): + date: NotRequired["int"] + """ + The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + """ + ip: NotRequired["str"] + """ + The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the cardholder accepted the Authorized User Terms. + """ - class CreateParamsCompany(TypedDict): - tax_id: NotRequired["str"] - """ - The entity's business ID number. - """ + class CreateParamsCompany(TypedDict): + tax_id: NotRequired["str"] + """ + The entity's business ID number. + """ - class CreateParamsBilling(TypedDict): - address: "Cardholder.CreateParamsBillingAddress" - """ - The cardholder's billing address. - """ + class CreateParamsBilling(TypedDict): + address: "Cardholder.CreateParamsBillingAddress" + """ + The cardholder's billing address. + """ - class CreateParamsBillingAddress(TypedDict): - city: str - """ - City, district, suburb, town, or village. - """ - country: str - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: str - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: str - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsBillingAddress(TypedDict): + city: str + """ + City, district, suburb, town, or village. + """ + country: str + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: str + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: str + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ListParams(RequestOptions): - created: NotRequired["Cardholder.ListParamsCreated|int"] - """ - Only return cardholders that were created during the given date interval. - """ - email: NotRequired["str"] - """ - Only return cardholders that have the given email address. - """ - 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. - """ - phone_number: NotRequired["str"] - """ - Only return cardholders that have the given phone number. - """ - 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', 'blocked', 'inactive']"] - """ - Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. - """ - type: NotRequired["Literal['company', 'individual']"] - """ - Only return cardholders that have the given type. One of `individual` or `company`. - """ + class ListParams(RequestOptions): + created: NotRequired["Cardholder.ListParamsCreated|int"] + """ + Only return cardholders that were created during the given date interval. + """ + email: NotRequired["str"] + """ + Only return cardholders that have the given email address. + """ + 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. + """ + phone_number: NotRequired["str"] + """ + Only return cardholders that have the given phone number. + """ + 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', 'blocked', 'inactive']"] + """ + Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. + """ + type: NotRequired["Literal['company', 'individual']"] + """ + Only return cardholders that have the given type. One of `individual` or `company`. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - billing: NotRequired["Cardholder.ModifyParamsBilling"] - """ - The cardholder's billing address. - """ - company: NotRequired["Cardholder.ModifyParamsCompany"] - """ - Additional information about a `company` cardholder. - """ - email: NotRequired["str"] - """ - The cardholder's email address. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - individual: NotRequired["Cardholder.ModifyParamsIndividual"] - """ - Additional information about an `individual` cardholder. - """ - 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`. - """ - phone_number: NotRequired["str"] - """ - The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details. - """ - preferred_locales: NotRequired[ - "List[Literal['de', 'en', 'es', 'fr', 'it']]" - ] - """ - The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. - This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. - """ - spending_controls: NotRequired[ - "Cardholder.ModifyParamsSpendingControls" - ] - """ - Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - """ - status: NotRequired["Literal['active', 'inactive']"] - """ - Specifies whether to permit authorizations on this cardholder's cards. - """ + class ModifyParams(RequestOptions): + billing: NotRequired["Cardholder.ModifyParamsBilling"] + """ + The cardholder's billing address. + """ + company: NotRequired["Cardholder.ModifyParamsCompany"] + """ + Additional information about a `company` cardholder. + """ + email: NotRequired["str"] + """ + The cardholder's email address. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + individual: NotRequired["Cardholder.ModifyParamsIndividual"] + """ + Additional information about an `individual` cardholder. + """ + 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`. + """ + phone_number: NotRequired["str"] + """ + The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details. + """ + preferred_locales: NotRequired[ + "List[Literal['de', 'en', 'es', 'fr', 'it']]" + ] + """ + The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + """ + spending_controls: NotRequired[ + "Cardholder.ModifyParamsSpendingControls" + ] + """ + Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + """ + status: NotRequired["Literal['active', 'inactive']"] + """ + Specifies whether to permit authorizations on this cardholder's cards. + """ - class ModifyParamsSpendingControls(TypedDict): - allowed_categories: NotRequired[ - "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. - """ - blocked_categories: NotRequired[ - "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. - """ - spending_limits: NotRequired[ - "List[Cardholder.ModifyParamsSpendingControlsSpendingLimit]" - ] - """ - Limit spending with amount-based rules that apply across this cardholder's cards. - """ - spending_limits_currency: NotRequired["str"] - """ - Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. - """ + class ModifyParamsSpendingControls(TypedDict): + allowed_categories: NotRequired[ + "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + """ + blocked_categories: NotRequired[ + "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + """ + spending_limits: NotRequired[ + "List[Cardholder.ModifyParamsSpendingControlsSpendingLimit]" + ] + """ + Limit spending with amount-based rules that apply across this cardholder's cards. + """ + spending_limits_currency: NotRequired["str"] + """ + Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. + """ - class ModifyParamsSpendingControlsSpendingLimit(TypedDict): - amount: int - """ - Maximum amount allowed to spend per interval. - """ - categories: NotRequired[ - "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. - """ - interval: Literal[ - "all_time", - "daily", - "monthly", - "per_authorization", - "weekly", - "yearly", - ] - """ - Interval (or event) to which the amount applies. - """ + class ModifyParamsSpendingControlsSpendingLimit(TypedDict): + amount: int + """ + Maximum amount allowed to spend per interval. + """ + categories: NotRequired[ + "List[Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']]" + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + """ + interval: Literal[ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly", + ] + """ + Interval (or event) to which the amount applies. + """ - class ModifyParamsIndividual(TypedDict): - card_issuing: NotRequired[ - "Cardholder.ModifyParamsIndividualCardIssuing" - ] - """ - Information related to the card_issuing program for this cardholder. - """ - dob: NotRequired["Cardholder.ModifyParamsIndividualDob"] - """ - The date of birth of this cardholder. Cardholders must be older than 13 years old. - """ - first_name: NotRequired["str"] - """ - The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. - """ - last_name: NotRequired["str"] - """ - The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. - """ - verification: NotRequired[ - "Cardholder.ModifyParamsIndividualVerification" - ] - """ - Government-issued ID document for this cardholder. - """ + class ModifyParamsIndividual(TypedDict): + card_issuing: NotRequired[ + "Cardholder.ModifyParamsIndividualCardIssuing" + ] + """ + Information related to the card_issuing program for this cardholder. + """ + dob: NotRequired["Cardholder.ModifyParamsIndividualDob"] + """ + The date of birth of this cardholder. Cardholders must be older than 13 years old. + """ + first_name: NotRequired["str"] + """ + The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + """ + last_name: NotRequired["str"] + """ + The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + """ + verification: NotRequired[ + "Cardholder.ModifyParamsIndividualVerification" + ] + """ + Government-issued ID document for this cardholder. + """ - class ModifyParamsIndividualVerification(TypedDict): - document: NotRequired[ - "Cardholder.ModifyParamsIndividualVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ + class ModifyParamsIndividualVerification(TypedDict): + document: NotRequired[ + "Cardholder.ModifyParamsIndividualVerificationDocument" + ] + """ + An identifying document, either a passport or local ID card. + """ - class ModifyParamsIndividualVerificationDocument(TypedDict): - back: NotRequired["str"] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - """ - front: NotRequired["str"] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - """ + class ModifyParamsIndividualVerificationDocument(TypedDict): + back: NotRequired["str"] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + """ + front: NotRequired["str"] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + """ - class ModifyParamsIndividualDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ + class ModifyParamsIndividualDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ - class ModifyParamsIndividualCardIssuing(TypedDict): - user_terms_acceptance: NotRequired[ - "Cardholder.ModifyParamsIndividualCardIssuingUserTermsAcceptance" - ] - """ - Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards). - """ + class ModifyParamsIndividualCardIssuing(TypedDict): + user_terms_acceptance: NotRequired[ + "Cardholder.ModifyParamsIndividualCardIssuingUserTermsAcceptance" + ] + """ + Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards). + """ - class ModifyParamsIndividualCardIssuingUserTermsAcceptance(TypedDict): - date: NotRequired["int"] - """ - The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. - """ - ip: NotRequired["str"] - """ - The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the cardholder accepted the Authorized User Terms. - """ + class ModifyParamsIndividualCardIssuingUserTermsAcceptance(TypedDict): + date: NotRequired["int"] + """ + The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + """ + ip: NotRequired["str"] + """ + The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the cardholder accepted the Authorized User Terms. + """ - class ModifyParamsCompany(TypedDict): - tax_id: NotRequired["str"] - """ - The entity's business ID number. - """ + class ModifyParamsCompany(TypedDict): + tax_id: NotRequired["str"] + """ + The entity's business ID number. + """ - class ModifyParamsBilling(TypedDict): - address: "Cardholder.ModifyParamsBillingAddress" - """ - The cardholder's billing address. - """ + class ModifyParamsBilling(TypedDict): + address: "Cardholder.ModifyParamsBillingAddress" + """ + The cardholder's billing address. + """ - class ModifyParamsBillingAddress(TypedDict): - city: str - """ - City, district, suburb, town, or village. - """ - country: str - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: str - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: str - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class ModifyParamsBillingAddress(TypedDict): + city: str + """ + City, district, suburb, town, or village. + """ + country: str + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: str + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: str + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ billing: Billing company: Optional[Company] diff --git a/stripe/api_resources/issuing/dispute.py b/stripe/api_resources/issuing/dispute.py index d59d9eacd..14eabe3ff 100644 --- a/stripe/api_resources/issuing/dispute.py +++ b/stripe/api_resources/issuing/dispute.py @@ -246,571 +246,569 @@ class Treasury(StripeObject): The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. """ - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - amount: NotRequired["int"] - """ - The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. - """ - evidence: NotRequired["Dispute.CreateParamsEvidence"] - """ - Evidence provided for the dispute. - """ - expand: NotRequired["List[str]"] - """ - 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`. - """ - transaction: NotRequired["str"] - """ - The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. - """ - treasury: NotRequired["Dispute.CreateParamsTreasury"] - """ - Params for disputes related to Treasury FinancialAccounts - """ - - class CreateParamsTreasury(TypedDict): - received_debit: str - """ - The ID of the ReceivedDebit to initiate an Issuings dispute for. - """ + class CreateParams(RequestOptions): + amount: NotRequired["int"] + """ + The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. + """ + evidence: NotRequired["Dispute.CreateParamsEvidence"] + """ + Evidence provided for the dispute. + """ + expand: NotRequired["List[str]"] + """ + 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`. + """ + transaction: NotRequired["str"] + """ + The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. + """ + treasury: NotRequired["Dispute.CreateParamsTreasury"] + """ + Params for disputes related to Treasury FinancialAccounts + """ - class CreateParamsEvidence(TypedDict): - canceled: NotRequired[ - "Literal['']|Dispute.CreateParamsEvidenceCanceled" - ] - """ - Evidence provided when `reason` is 'canceled'. - """ - duplicate: NotRequired[ - "Literal['']|Dispute.CreateParamsEvidenceDuplicate" - ] - """ - Evidence provided when `reason` is 'duplicate'. - """ - fraudulent: NotRequired[ - "Literal['']|Dispute.CreateParamsEvidenceFraudulent" - ] - """ - Evidence provided when `reason` is 'fraudulent'. - """ - merchandise_not_as_described: NotRequired[ - "Literal['']|Dispute.CreateParamsEvidenceMerchandiseNotAsDescribed" - ] - """ - Evidence provided when `reason` is 'merchandise_not_as_described'. - """ - not_received: NotRequired[ - "Literal['']|Dispute.CreateParamsEvidenceNotReceived" - ] - """ - Evidence provided when `reason` is 'not_received'. - """ - other: NotRequired["Literal['']|Dispute.CreateParamsEvidenceOther"] - """ - Evidence provided when `reason` is 'other'. - """ - reason: NotRequired[ - "Literal['canceled', 'duplicate', 'fraudulent', 'merchandise_not_as_described', 'not_received', 'other', 'service_not_as_described']" - ] - """ - The reason for filing the dispute. The evidence should be submitted in the field of the same name. - """ - service_not_as_described: NotRequired[ - "Literal['']|Dispute.CreateParamsEvidenceServiceNotAsDescribed" - ] - """ - Evidence provided when `reason` is 'service_not_as_described'. - """ + class CreateParamsTreasury(TypedDict): + received_debit: str + """ + The ID of the ReceivedDebit to initiate an Issuings dispute for. + """ - class CreateParamsEvidenceServiceNotAsDescribed(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - canceled_at: NotRequired["Literal['']|int"] - """ - Date when order was canceled. - """ - cancellation_reason: NotRequired["Literal['']|str"] - """ - Reason for canceling the order. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - received_at: NotRequired["Literal['']|int"] - """ - Date when the product was received. - """ + class CreateParamsEvidence(TypedDict): + canceled: NotRequired[ + "Literal['']|Dispute.CreateParamsEvidenceCanceled" + ] + """ + Evidence provided when `reason` is 'canceled'. + """ + duplicate: NotRequired[ + "Literal['']|Dispute.CreateParamsEvidenceDuplicate" + ] + """ + Evidence provided when `reason` is 'duplicate'. + """ + fraudulent: NotRequired[ + "Literal['']|Dispute.CreateParamsEvidenceFraudulent" + ] + """ + Evidence provided when `reason` is 'fraudulent'. + """ + merchandise_not_as_described: NotRequired[ + "Literal['']|Dispute.CreateParamsEvidenceMerchandiseNotAsDescribed" + ] + """ + Evidence provided when `reason` is 'merchandise_not_as_described'. + """ + not_received: NotRequired[ + "Literal['']|Dispute.CreateParamsEvidenceNotReceived" + ] + """ + Evidence provided when `reason` is 'not_received'. + """ + other: NotRequired["Literal['']|Dispute.CreateParamsEvidenceOther"] + """ + Evidence provided when `reason` is 'other'. + """ + reason: NotRequired[ + "Literal['canceled', 'duplicate', 'fraudulent', 'merchandise_not_as_described', 'not_received', 'other', 'service_not_as_described']" + ] + """ + The reason for filing the dispute. The evidence should be submitted in the field of the same name. + """ + service_not_as_described: NotRequired[ + "Literal['']|Dispute.CreateParamsEvidenceServiceNotAsDescribed" + ] + """ + Evidence provided when `reason` is 'service_not_as_described'. + """ - class CreateParamsEvidenceOther(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ + class CreateParamsEvidenceServiceNotAsDescribed(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + canceled_at: NotRequired["Literal['']|int"] + """ + Date when order was canceled. + """ + cancellation_reason: NotRequired["Literal['']|str"] + """ + Reason for canceling the order. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + received_at: NotRequired["Literal['']|int"] + """ + Date when the product was received. + """ - class CreateParamsEvidenceNotReceived(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - expected_at: NotRequired["Literal['']|int"] - """ - Date when the cardholder expected to receive the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ + class CreateParamsEvidenceOther(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + product_description: NotRequired["Literal['']|str"] + """ + Description of the merchandise or service that was purchased. + """ + product_type: NotRequired[ + "Literal['']|Literal['merchandise', 'service']" + ] + """ + Whether the product was a merchandise or service. + """ - class CreateParamsEvidenceMerchandiseNotAsDescribed(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - received_at: NotRequired["Literal['']|int"] - """ - Date when the product was received. - """ - return_description: NotRequired["Literal['']|str"] - """ - Description of the cardholder's attempt to return the product. - """ - return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" - ] - """ - Result of cardholder's attempt to return the product. - """ - returned_at: NotRequired["Literal['']|int"] - """ - Date when the product was returned or attempted to be returned. - """ + class CreateParamsEvidenceNotReceived(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + expected_at: NotRequired["Literal['']|int"] + """ + Date when the cardholder expected to receive the product. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + product_description: NotRequired["Literal['']|str"] + """ + Description of the merchandise or service that was purchased. + """ + product_type: NotRequired[ + "Literal['']|Literal['merchandise', 'service']" + ] + """ + Whether the product was a merchandise or service. + """ - class CreateParamsEvidenceFraudulent(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ + class CreateParamsEvidenceMerchandiseNotAsDescribed(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + received_at: NotRequired["Literal['']|int"] + """ + Date when the product was received. + """ + return_description: NotRequired["Literal['']|str"] + """ + Description of the cardholder's attempt to return the product. + """ + return_status: NotRequired[ + "Literal['']|Literal['merchant_rejected', 'successful']" + ] + """ + Result of cardholder's attempt to return the product. + """ + returned_at: NotRequired["Literal['']|int"] + """ + Date when the product was returned or attempted to be returned. + """ - class CreateParamsEvidenceDuplicate(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - card_statement: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. - """ - cash_receipt: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. - """ - check_image: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - original_transaction: NotRequired["str"] - """ - Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. - """ + class CreateParamsEvidenceFraudulent(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ - class CreateParamsEvidenceCanceled(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - canceled_at: NotRequired["Literal['']|int"] - """ - Date when order was canceled. - """ - cancellation_policy_provided: NotRequired["Literal['']|bool"] - """ - Whether the cardholder was provided with a cancellation policy. - """ - cancellation_reason: NotRequired["Literal['']|str"] - """ - Reason for canceling the order. - """ - expected_at: NotRequired["Literal['']|int"] - """ - Date when the cardholder expected to receive the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ - return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" - ] - """ - Result of cardholder's attempt to return the product. - """ - returned_at: NotRequired["Literal['']|int"] - """ - Date when the product was returned or attempted to be returned. - """ + class CreateParamsEvidenceDuplicate(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + card_statement: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + """ + cash_receipt: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + """ + check_image: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + original_transaction: NotRequired["str"] + """ + Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + """ - class ListParams(RequestOptions): - created: NotRequired["Dispute.ListParamsCreated|int"] - """ - Select Issuing disputes that were created during the given date interval. - """ - 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['expired', 'lost', 'submitted', 'unsubmitted', 'won']" - ] - """ - Select Issuing disputes with the given status. - """ - transaction: NotRequired["str"] - """ - Select the Issuing dispute for the given transaction. - """ + class CreateParamsEvidenceCanceled(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + canceled_at: NotRequired["Literal['']|int"] + """ + Date when order was canceled. + """ + cancellation_policy_provided: NotRequired["Literal['']|bool"] + """ + Whether the cardholder was provided with a cancellation policy. + """ + cancellation_reason: NotRequired["Literal['']|str"] + """ + Reason for canceling the order. + """ + expected_at: NotRequired["Literal['']|int"] + """ + Date when the cardholder expected to receive the product. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + product_description: NotRequired["Literal['']|str"] + """ + Description of the merchandise or service that was purchased. + """ + product_type: NotRequired[ + "Literal['']|Literal['merchandise', 'service']" + ] + """ + Whether the product was a merchandise or service. + """ + return_status: NotRequired[ + "Literal['']|Literal['merchant_rejected', 'successful']" + ] + """ + Result of cardholder's attempt to return the product. + """ + returned_at: NotRequired["Literal['']|int"] + """ + Date when the product was returned or attempted to be returned. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParams(RequestOptions): + created: NotRequired["Dispute.ListParamsCreated|int"] + """ + Select Issuing disputes that were created during the given date interval. + """ + 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['expired', 'lost', 'submitted', 'unsubmitted', 'won']" + ] + """ + Select Issuing disputes with the given status. + """ + transaction: NotRequired["str"] + """ + Select the Issuing dispute for the given transaction. + """ - class ModifyParams(RequestOptions): - amount: NotRequired["int"] - """ - The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - evidence: NotRequired["Dispute.ModifyParamsEvidence"] - """ - Evidence provided for the dispute. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParamsEvidence(TypedDict): - canceled: NotRequired[ - "Literal['']|Dispute.ModifyParamsEvidenceCanceled" - ] - """ - Evidence provided when `reason` is 'canceled'. - """ - duplicate: NotRequired[ - "Literal['']|Dispute.ModifyParamsEvidenceDuplicate" - ] - """ - Evidence provided when `reason` is 'duplicate'. - """ - fraudulent: NotRequired[ - "Literal['']|Dispute.ModifyParamsEvidenceFraudulent" - ] - """ - Evidence provided when `reason` is 'fraudulent'. - """ - merchandise_not_as_described: NotRequired[ - "Literal['']|Dispute.ModifyParamsEvidenceMerchandiseNotAsDescribed" - ] - """ - Evidence provided when `reason` is 'merchandise_not_as_described'. - """ - not_received: NotRequired[ - "Literal['']|Dispute.ModifyParamsEvidenceNotReceived" - ] - """ - Evidence provided when `reason` is 'not_received'. - """ - other: NotRequired["Literal['']|Dispute.ModifyParamsEvidenceOther"] - """ - Evidence provided when `reason` is 'other'. - """ - reason: NotRequired[ - "Literal['canceled', 'duplicate', 'fraudulent', 'merchandise_not_as_described', 'not_received', 'other', 'service_not_as_described']" - ] - """ - The reason for filing the dispute. The evidence should be submitted in the field of the same name. - """ - service_not_as_described: NotRequired[ - "Literal['']|Dispute.ModifyParamsEvidenceServiceNotAsDescribed" - ] - """ - Evidence provided when `reason` is 'service_not_as_described'. - """ + class ModifyParams(RequestOptions): + amount: NotRequired["int"] + """ + The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + evidence: NotRequired["Dispute.ModifyParamsEvidence"] + """ + Evidence provided for the dispute. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ - class ModifyParamsEvidenceServiceNotAsDescribed(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - canceled_at: NotRequired["Literal['']|int"] - """ - Date when order was canceled. - """ - cancellation_reason: NotRequired["Literal['']|str"] - """ - Reason for canceling the order. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - received_at: NotRequired["Literal['']|int"] - """ - Date when the product was received. - """ + class ModifyParamsEvidence(TypedDict): + canceled: NotRequired[ + "Literal['']|Dispute.ModifyParamsEvidenceCanceled" + ] + """ + Evidence provided when `reason` is 'canceled'. + """ + duplicate: NotRequired[ + "Literal['']|Dispute.ModifyParamsEvidenceDuplicate" + ] + """ + Evidence provided when `reason` is 'duplicate'. + """ + fraudulent: NotRequired[ + "Literal['']|Dispute.ModifyParamsEvidenceFraudulent" + ] + """ + Evidence provided when `reason` is 'fraudulent'. + """ + merchandise_not_as_described: NotRequired[ + "Literal['']|Dispute.ModifyParamsEvidenceMerchandiseNotAsDescribed" + ] + """ + Evidence provided when `reason` is 'merchandise_not_as_described'. + """ + not_received: NotRequired[ + "Literal['']|Dispute.ModifyParamsEvidenceNotReceived" + ] + """ + Evidence provided when `reason` is 'not_received'. + """ + other: NotRequired["Literal['']|Dispute.ModifyParamsEvidenceOther"] + """ + Evidence provided when `reason` is 'other'. + """ + reason: NotRequired[ + "Literal['canceled', 'duplicate', 'fraudulent', 'merchandise_not_as_described', 'not_received', 'other', 'service_not_as_described']" + ] + """ + The reason for filing the dispute. The evidence should be submitted in the field of the same name. + """ + service_not_as_described: NotRequired[ + "Literal['']|Dispute.ModifyParamsEvidenceServiceNotAsDescribed" + ] + """ + Evidence provided when `reason` is 'service_not_as_described'. + """ - class ModifyParamsEvidenceOther(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ + class ModifyParamsEvidenceServiceNotAsDescribed(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + canceled_at: NotRequired["Literal['']|int"] + """ + Date when order was canceled. + """ + cancellation_reason: NotRequired["Literal['']|str"] + """ + Reason for canceling the order. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + received_at: NotRequired["Literal['']|int"] + """ + Date when the product was received. + """ - class ModifyParamsEvidenceNotReceived(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - expected_at: NotRequired["Literal['']|int"] - """ - Date when the cardholder expected to receive the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ + class ModifyParamsEvidenceOther(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + product_description: NotRequired["Literal['']|str"] + """ + Description of the merchandise or service that was purchased. + """ + product_type: NotRequired[ + "Literal['']|Literal['merchandise', 'service']" + ] + """ + Whether the product was a merchandise or service. + """ - class ModifyParamsEvidenceMerchandiseNotAsDescribed(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - received_at: NotRequired["Literal['']|int"] - """ - Date when the product was received. - """ - return_description: NotRequired["Literal['']|str"] - """ - Description of the cardholder's attempt to return the product. - """ - return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" - ] - """ - Result of cardholder's attempt to return the product. - """ - returned_at: NotRequired["Literal['']|int"] - """ - Date when the product was returned or attempted to be returned. - """ + class ModifyParamsEvidenceNotReceived(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + expected_at: NotRequired["Literal['']|int"] + """ + Date when the cardholder expected to receive the product. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + product_description: NotRequired["Literal['']|str"] + """ + Description of the merchandise or service that was purchased. + """ + product_type: NotRequired[ + "Literal['']|Literal['merchandise', 'service']" + ] + """ + Whether the product was a merchandise or service. + """ - class ModifyParamsEvidenceFraudulent(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ + class ModifyParamsEvidenceMerchandiseNotAsDescribed(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + received_at: NotRequired["Literal['']|int"] + """ + Date when the product was received. + """ + return_description: NotRequired["Literal['']|str"] + """ + Description of the cardholder's attempt to return the product. + """ + return_status: NotRequired[ + "Literal['']|Literal['merchant_rejected', 'successful']" + ] + """ + Result of cardholder's attempt to return the product. + """ + returned_at: NotRequired["Literal['']|int"] + """ + Date when the product was returned or attempted to be returned. + """ - class ModifyParamsEvidenceDuplicate(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - card_statement: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. - """ - cash_receipt: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. - """ - check_image: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - original_transaction: NotRequired["str"] - """ - Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. - """ + class ModifyParamsEvidenceFraudulent(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ - class ModifyParamsEvidenceCanceled(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - canceled_at: NotRequired["Literal['']|int"] - """ - Date when order was canceled. - """ - cancellation_policy_provided: NotRequired["Literal['']|bool"] - """ - Whether the cardholder was provided with a cancellation policy. - """ - cancellation_reason: NotRequired["Literal['']|str"] - """ - Reason for canceling the order. - """ - expected_at: NotRequired["Literal['']|int"] - """ - Date when the cardholder expected to receive the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ - return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" - ] - """ - Result of cardholder's attempt to return the product. - """ - returned_at: NotRequired["Literal['']|int"] - """ - Date when the product was returned or attempted to be returned. - """ + class ModifyParamsEvidenceDuplicate(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + card_statement: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + """ + cash_receipt: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + """ + check_image: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + original_transaction: NotRequired["str"] + """ + Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ModifyParamsEvidenceCanceled(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + canceled_at: NotRequired["Literal['']|int"] + """ + Date when order was canceled. + """ + cancellation_policy_provided: NotRequired["Literal['']|bool"] + """ + Whether the cardholder was provided with a cancellation policy. + """ + cancellation_reason: NotRequired["Literal['']|str"] + """ + Reason for canceling the order. + """ + expected_at: NotRequired["Literal['']|int"] + """ + Date when the cardholder expected to receive the product. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + product_description: NotRequired["Literal['']|str"] + """ + Description of the merchandise or service that was purchased. + """ + product_type: NotRequired[ + "Literal['']|Literal['merchandise', 'service']" + ] + """ + Whether the product was a merchandise or service. + """ + return_status: NotRequired[ + "Literal['']|Literal['merchant_rejected', 'successful']" + ] + """ + Result of cardholder's attempt to return the product. + """ + returned_at: NotRequired["Literal['']|int"] + """ + Date when the product was returned or attempted to be returned. + """ - class SubmitParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + + class SubmitParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ amount: int """ diff --git a/stripe/api_resources/issuing/token.py b/stripe/api_resources/issuing/token.py index 40f9903ca..a8f2599a1 100644 --- a/stripe/api_resources/issuing/token.py +++ b/stripe/api_resources/issuing/token.py @@ -194,73 +194,71 @@ class CardholderAddress(StripeObject): "wallet_provider": WalletProvider, } - if TYPE_CHECKING: - - class ListParams(RequestOptions): - card: str - """ - The Issuing card identifier to list tokens for. - """ - created: NotRequired["Token.ListParamsCreated|int"] - """ - Select Issuing tokens that were created during the given date interval. - """ - 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', 'deleted', 'requested', 'suspended']" - ] - """ - Select Issuing tokens with the given status. - """ + class ListParams(RequestOptions): + card: str + """ + The Issuing card identifier to list tokens for. + """ + created: NotRequired["Token.ListParamsCreated|int"] + """ + Select Issuing tokens that were created during the given date interval. + """ + 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', 'deleted', 'requested', 'suspended']" + ] + """ + Select Issuing tokens with the given status. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - status: Literal["active", "deleted", "suspended"] - """ - Specifies which status the token should be updated to. - """ + class ModifyParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + status: Literal["active", "deleted", "suspended"] + """ + Specifies which status the token should be updated to. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ card: ExpandableField["Card"] """ diff --git a/stripe/api_resources/issuing/transaction.py b/stripe/api_resources/issuing/transaction.py index 4288a7def..c900e9cf8 100644 --- a/stripe/api_resources/issuing/transaction.py +++ b/stripe/api_resources/issuing/transaction.py @@ -99,6 +99,12 @@ class MerchantData(StripeObject): URL provided by the merchant on a 3DS request """ + class NetworkData(StripeObject): + processing_date: Optional[str] + """ + The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network. + """ + class PurchaseDetails(StripeObject): class Flight(StripeObject): class Segment(StripeObject): @@ -232,459 +238,455 @@ class Treasury(StripeObject): The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture """ - if TYPE_CHECKING: - - class ListParams(RequestOptions): - card: NotRequired["str"] - """ - Only return transactions that belong to the given card. - """ - cardholder: NotRequired["str"] - """ - Only return transactions that belong to the given cardholder. - """ - created: NotRequired["Transaction.ListParamsCreated|int"] - """ - Only return transactions that were created during the given date interval. - """ - 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. - """ - type: NotRequired["Literal['capture', 'refund']"] - """ - Only return transactions that have the given type. One of `capture` or `refund`. - """ + class ListParams(RequestOptions): + card: NotRequired["str"] + """ + Only return transactions that belong to the given card. + """ + cardholder: NotRequired["str"] + """ + Only return transactions that belong to the given cardholder. + """ + created: NotRequired["Transaction.ListParamsCreated|int"] + """ + Only return transactions that were created during the given date interval. + """ + 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. + """ + type: NotRequired["Literal['capture', 'refund']"] + """ + Only return transactions that have the given type. One of `capture` or `refund`. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ + class ModifyParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CreateForceCaptureParams(RequestOptions): - amount: int - """ - The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - card: str - """ - Card associated with this transaction. - """ - currency: NotRequired["str"] - """ - The currency of the capture. 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). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - merchant_data: NotRequired[ - "Transaction.CreateForceCaptureParamsMerchantData" - ] - """ - Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. - """ - purchase_details: NotRequired[ - "Transaction.CreateForceCaptureParamsPurchaseDetails" - ] - """ - Additional purchase information that is optionally provided by the merchant. - """ + class CreateForceCaptureParams(RequestOptions): + amount: int + """ + The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + card: str + """ + Card associated with this transaction. + """ + currency: NotRequired["str"] + """ + The currency of the capture. 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). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + merchant_data: NotRequired[ + "Transaction.CreateForceCaptureParamsMerchantData" + ] + """ + Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + """ + purchase_details: NotRequired[ + "Transaction.CreateForceCaptureParamsPurchaseDetails" + ] + """ + Additional purchase information that is optionally provided by the merchant. + """ - class CreateForceCaptureParamsPurchaseDetails(TypedDict): - flight: NotRequired[ - "Transaction.CreateForceCaptureParamsPurchaseDetailsFlight" - ] - """ - Information about the flight that was purchased with this transaction. - """ - fuel: NotRequired[ - "Transaction.CreateForceCaptureParamsPurchaseDetailsFuel" - ] - """ - Information about fuel that was purchased with this transaction. - """ - lodging: NotRequired[ - "Transaction.CreateForceCaptureParamsPurchaseDetailsLodging" - ] - """ - Information about lodging that was purchased with this transaction. - """ - receipt: NotRequired[ - "List[Transaction.CreateForceCaptureParamsPurchaseDetailsReceipt]" - ] - """ - The line items in the purchase. - """ - reference: NotRequired["str"] - """ - A merchant-specific order number. - """ + class CreateForceCaptureParamsPurchaseDetails(TypedDict): + flight: NotRequired[ + "Transaction.CreateForceCaptureParamsPurchaseDetailsFlight" + ] + """ + Information about the flight that was purchased with this transaction. + """ + fuel: NotRequired[ + "Transaction.CreateForceCaptureParamsPurchaseDetailsFuel" + ] + """ + Information about fuel that was purchased with this transaction. + """ + lodging: NotRequired[ + "Transaction.CreateForceCaptureParamsPurchaseDetailsLodging" + ] + """ + Information about lodging that was purchased with this transaction. + """ + receipt: NotRequired[ + "List[Transaction.CreateForceCaptureParamsPurchaseDetailsReceipt]" + ] + """ + The line items in the purchase. + """ + reference: NotRequired["str"] + """ + A merchant-specific order number. + """ - class CreateForceCaptureParamsPurchaseDetailsReceipt(TypedDict): - description: NotRequired["str"] - quantity: NotRequired["str"] - total: NotRequired["int"] - unit_cost: NotRequired["int"] + class CreateForceCaptureParamsPurchaseDetailsReceipt(TypedDict): + description: NotRequired["str"] + quantity: NotRequired["str"] + total: NotRequired["int"] + unit_cost: NotRequired["int"] - class CreateForceCaptureParamsPurchaseDetailsLodging(TypedDict): - check_in_at: NotRequired["int"] - """ - The time of checking into the lodging. - """ - nights: NotRequired["int"] - """ - The number of nights stayed at the lodging. - """ + class CreateForceCaptureParamsPurchaseDetailsLodging(TypedDict): + check_in_at: NotRequired["int"] + """ + The time of checking into the lodging. + """ + nights: NotRequired["int"] + """ + The number of nights stayed at the lodging. + """ - class CreateForceCaptureParamsPurchaseDetailsFuel(TypedDict): - type: NotRequired[ - "Literal['diesel', 'other', 'unleaded_plus', 'unleaded_regular', 'unleaded_super']" - ] - """ - The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. - """ - unit: NotRequired["Literal['liter', 'us_gallon']"] - """ - The units for `volume_decimal`. One of `us_gallon` or `liter`. - """ - unit_cost_decimal: NotRequired["str"] - """ - The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - """ - volume_decimal: NotRequired["str"] - """ - The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. - """ + class CreateForceCaptureParamsPurchaseDetailsFuel(TypedDict): + type: NotRequired[ + "Literal['diesel', 'other', 'unleaded_plus', 'unleaded_regular', 'unleaded_super']" + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired["Literal['liter', 'us_gallon']"] + """ + The units for `volume_decimal`. One of `us_gallon` or `liter`. + """ + unit_cost_decimal: NotRequired["str"] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + volume_decimal: NotRequired["str"] + """ + The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. + """ - class CreateForceCaptureParamsPurchaseDetailsFlight(TypedDict): - departure_at: NotRequired["int"] - """ - The time that the flight departed. - """ - passenger_name: NotRequired["str"] - """ - The name of the passenger. - """ - refundable: NotRequired["bool"] - """ - Whether the ticket is refundable. - """ - segments: NotRequired[ - "List[Transaction.CreateForceCaptureParamsPurchaseDetailsFlightSegment]" - ] - """ - The legs of the trip. - """ - travel_agency: NotRequired["str"] - """ - The travel agency that issued the ticket. - """ + class CreateForceCaptureParamsPurchaseDetailsFlight(TypedDict): + departure_at: NotRequired["int"] + """ + The time that the flight departed. + """ + passenger_name: NotRequired["str"] + """ + The name of the passenger. + """ + refundable: NotRequired["bool"] + """ + Whether the ticket is refundable. + """ + segments: NotRequired[ + "List[Transaction.CreateForceCaptureParamsPurchaseDetailsFlightSegment]" + ] + """ + The legs of the trip. + """ + travel_agency: NotRequired["str"] + """ + The travel agency that issued the ticket. + """ - class CreateForceCaptureParamsPurchaseDetailsFlightSegment(TypedDict): - arrival_airport_code: NotRequired["str"] - """ - The three-letter IATA airport code of the flight's destination. - """ - carrier: NotRequired["str"] - """ - The airline carrier code. - """ - departure_airport_code: NotRequired["str"] - """ - The three-letter IATA airport code that the flight departed from. - """ - flight_number: NotRequired["str"] - """ - The flight number. - """ - service_class: NotRequired["str"] - """ - The flight's service class. - """ - stopover_allowed: NotRequired["bool"] - """ - Whether a stopover is allowed on this flight. - """ + class CreateForceCaptureParamsPurchaseDetailsFlightSegment(TypedDict): + arrival_airport_code: NotRequired["str"] + """ + The three-letter IATA airport code of the flight's destination. + """ + carrier: NotRequired["str"] + """ + The airline carrier code. + """ + departure_airport_code: NotRequired["str"] + """ + The three-letter IATA airport code that the flight departed from. + """ + flight_number: NotRequired["str"] + """ + The flight number. + """ + service_class: NotRequired["str"] + """ + The flight's service class. + """ + stopover_allowed: NotRequired["bool"] + """ + Whether a stopover is allowed on this flight. + """ - class CreateForceCaptureParamsMerchantData(TypedDict): - category: NotRequired[ - "Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']" - ] - """ - A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. - """ - city: NotRequired["str"] - """ - City where the seller is located - """ - country: NotRequired["str"] - """ - Country where the seller is located - """ - name: NotRequired["str"] - """ - Name of the seller - """ - network_id: NotRequired["str"] - """ - Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. - """ - postal_code: NotRequired["str"] - """ - Postal code where the seller is located - """ - state: NotRequired["str"] - """ - State where the seller is located - """ - terminal_id: NotRequired["str"] - """ - An ID assigned by the seller to the location of the sale. - """ - url: NotRequired["str"] - """ - URL provided by the merchant on a 3DS request - """ + class CreateForceCaptureParamsMerchantData(TypedDict): + category: NotRequired[ + "Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']" + ] + """ + A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + """ + city: NotRequired["str"] + """ + City where the seller is located + """ + country: NotRequired["str"] + """ + Country where the seller is located + """ + name: NotRequired["str"] + """ + Name of the seller + """ + network_id: NotRequired["str"] + """ + Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + """ + postal_code: NotRequired["str"] + """ + Postal code where the seller is located + """ + state: NotRequired["str"] + """ + State where the seller is located + """ + terminal_id: NotRequired["str"] + """ + An ID assigned by the seller to the location of the sale. + """ + url: NotRequired["str"] + """ + URL provided by the merchant on a 3DS request + """ - class CreateUnlinkedRefundParams(RequestOptions): - amount: int - """ - The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - card: str - """ - Card associated with this unlinked refund transaction. - """ - currency: NotRequired["str"] - """ - The currency of the unlinked refund. 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). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - merchant_data: NotRequired[ - "Transaction.CreateUnlinkedRefundParamsMerchantData" - ] - """ - Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. - """ - purchase_details: NotRequired[ - "Transaction.CreateUnlinkedRefundParamsPurchaseDetails" - ] - """ - Additional purchase information that is optionally provided by the merchant. - """ + class CreateUnlinkedRefundParams(RequestOptions): + amount: int + """ + The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + card: str + """ + Card associated with this unlinked refund transaction. + """ + currency: NotRequired["str"] + """ + The currency of the unlinked refund. 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). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + merchant_data: NotRequired[ + "Transaction.CreateUnlinkedRefundParamsMerchantData" + ] + """ + Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + """ + purchase_details: NotRequired[ + "Transaction.CreateUnlinkedRefundParamsPurchaseDetails" + ] + """ + Additional purchase information that is optionally provided by the merchant. + """ - class CreateUnlinkedRefundParamsPurchaseDetails(TypedDict): - flight: NotRequired[ - "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFlight" - ] - """ - Information about the flight that was purchased with this transaction. - """ - fuel: NotRequired[ - "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFuel" - ] - """ - Information about fuel that was purchased with this transaction. - """ - lodging: NotRequired[ - "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsLodging" - ] - """ - Information about lodging that was purchased with this transaction. - """ - receipt: NotRequired[ - "List[Transaction.CreateUnlinkedRefundParamsPurchaseDetailsReceipt]" - ] - """ - The line items in the purchase. - """ - reference: NotRequired["str"] - """ - A merchant-specific order number. - """ + class CreateUnlinkedRefundParamsPurchaseDetails(TypedDict): + flight: NotRequired[ + "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFlight" + ] + """ + Information about the flight that was purchased with this transaction. + """ + fuel: NotRequired[ + "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFuel" + ] + """ + Information about fuel that was purchased with this transaction. + """ + lodging: NotRequired[ + "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsLodging" + ] + """ + Information about lodging that was purchased with this transaction. + """ + receipt: NotRequired[ + "List[Transaction.CreateUnlinkedRefundParamsPurchaseDetailsReceipt]" + ] + """ + The line items in the purchase. + """ + reference: NotRequired["str"] + """ + A merchant-specific order number. + """ - class CreateUnlinkedRefundParamsPurchaseDetailsReceipt(TypedDict): - description: NotRequired["str"] - quantity: NotRequired["str"] - total: NotRequired["int"] - unit_cost: NotRequired["int"] + class CreateUnlinkedRefundParamsPurchaseDetailsReceipt(TypedDict): + description: NotRequired["str"] + quantity: NotRequired["str"] + total: NotRequired["int"] + unit_cost: NotRequired["int"] - class CreateUnlinkedRefundParamsPurchaseDetailsLodging(TypedDict): - check_in_at: NotRequired["int"] - """ - The time of checking into the lodging. - """ - nights: NotRequired["int"] - """ - The number of nights stayed at the lodging. - """ + class CreateUnlinkedRefundParamsPurchaseDetailsLodging(TypedDict): + check_in_at: NotRequired["int"] + """ + The time of checking into the lodging. + """ + nights: NotRequired["int"] + """ + The number of nights stayed at the lodging. + """ - class CreateUnlinkedRefundParamsPurchaseDetailsFuel(TypedDict): - type: NotRequired[ - "Literal['diesel', 'other', 'unleaded_plus', 'unleaded_regular', 'unleaded_super']" - ] - """ - The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. - """ - unit: NotRequired["Literal['liter', 'us_gallon']"] - """ - The units for `volume_decimal`. One of `us_gallon` or `liter`. - """ - unit_cost_decimal: NotRequired["str"] - """ - The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - """ - volume_decimal: NotRequired["str"] - """ - The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. - """ + class CreateUnlinkedRefundParamsPurchaseDetailsFuel(TypedDict): + type: NotRequired[ + "Literal['diesel', 'other', 'unleaded_plus', 'unleaded_regular', 'unleaded_super']" + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired["Literal['liter', 'us_gallon']"] + """ + The units for `volume_decimal`. One of `us_gallon` or `liter`. + """ + unit_cost_decimal: NotRequired["str"] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + volume_decimal: NotRequired["str"] + """ + The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places. + """ - class CreateUnlinkedRefundParamsPurchaseDetailsFlight(TypedDict): - departure_at: NotRequired["int"] - """ - The time that the flight departed. - """ - passenger_name: NotRequired["str"] - """ - The name of the passenger. - """ - refundable: NotRequired["bool"] - """ - Whether the ticket is refundable. - """ - segments: NotRequired[ - "List[Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFlightSegment]" - ] - """ - The legs of the trip. - """ - travel_agency: NotRequired["str"] - """ - The travel agency that issued the ticket. - """ + class CreateUnlinkedRefundParamsPurchaseDetailsFlight(TypedDict): + departure_at: NotRequired["int"] + """ + The time that the flight departed. + """ + passenger_name: NotRequired["str"] + """ + The name of the passenger. + """ + refundable: NotRequired["bool"] + """ + Whether the ticket is refundable. + """ + segments: NotRequired[ + "List[Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFlightSegment]" + ] + """ + The legs of the trip. + """ + travel_agency: NotRequired["str"] + """ + The travel agency that issued the ticket. + """ - class CreateUnlinkedRefundParamsPurchaseDetailsFlightSegment( - TypedDict - ): - arrival_airport_code: NotRequired["str"] - """ - The three-letter IATA airport code of the flight's destination. - """ - carrier: NotRequired["str"] - """ - The airline carrier code. - """ - departure_airport_code: NotRequired["str"] - """ - The three-letter IATA airport code that the flight departed from. - """ - flight_number: NotRequired["str"] - """ - The flight number. - """ - service_class: NotRequired["str"] - """ - The flight's service class. - """ - stopover_allowed: NotRequired["bool"] - """ - Whether a stopover is allowed on this flight. - """ + class CreateUnlinkedRefundParamsPurchaseDetailsFlightSegment(TypedDict): + arrival_airport_code: NotRequired["str"] + """ + The three-letter IATA airport code of the flight's destination. + """ + carrier: NotRequired["str"] + """ + The airline carrier code. + """ + departure_airport_code: NotRequired["str"] + """ + The three-letter IATA airport code that the flight departed from. + """ + flight_number: NotRequired["str"] + """ + The flight number. + """ + service_class: NotRequired["str"] + """ + The flight's service class. + """ + stopover_allowed: NotRequired["bool"] + """ + Whether a stopover is allowed on this flight. + """ - class CreateUnlinkedRefundParamsMerchantData(TypedDict): - category: NotRequired[ - "Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']" - ] - """ - A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. - """ - city: NotRequired["str"] - """ - City where the seller is located - """ - country: NotRequired["str"] - """ - Country where the seller is located - """ - name: NotRequired["str"] - """ - Name of the seller - """ - network_id: NotRequired["str"] - """ - Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. - """ - postal_code: NotRequired["str"] - """ - Postal code where the seller is located - """ - state: NotRequired["str"] - """ - State where the seller is located - """ - terminal_id: NotRequired["str"] - """ - An ID assigned by the seller to the location of the sale. - """ - url: NotRequired["str"] - """ - URL provided by the merchant on a 3DS request - """ + class CreateUnlinkedRefundParamsMerchantData(TypedDict): + category: NotRequired[ + "Literal['ac_refrigeration_repair', 'accounting_bookkeeping_services', 'advertising_services', 'agricultural_cooperative', 'airlines_air_carriers', 'airports_flying_fields', 'ambulance_services', 'amusement_parks_carnivals', 'antique_reproductions', 'antique_shops', 'aquariums', 'architectural_surveying_services', 'art_dealers_and_galleries', 'artists_supply_and_craft_shops', 'auto_and_home_supply_stores', 'auto_body_repair_shops', 'auto_paint_shops', 'auto_service_shops', 'automated_cash_disburse', 'automated_fuel_dispensers', 'automobile_associations', 'automotive_parts_and_accessories_stores', 'automotive_tire_stores', 'bail_and_bond_payments', 'bakeries', 'bands_orchestras', 'barber_and_beauty_shops', 'betting_casino_gambling', 'bicycle_shops', 'billiard_pool_establishments', 'boat_dealers', 'boat_rentals_and_leases', 'book_stores', 'books_periodicals_and_newspapers', 'bowling_alleys', 'bus_lines', 'business_secretarial_schools', 'buying_shopping_services', 'cable_satellite_and_other_pay_television_and_radio', 'camera_and_photographic_supply_stores', 'candy_nut_and_confectionery_stores', 'car_and_truck_dealers_new_used', 'car_and_truck_dealers_used_only', 'car_rental_agencies', 'car_washes', 'carpentry_services', 'carpet_upholstery_cleaning', 'caterers', 'charitable_and_social_service_organizations_fundraising', 'chemicals_and_allied_products', 'child_care_services', 'childrens_and_infants_wear_stores', 'chiropodists_podiatrists', 'chiropractors', 'cigar_stores_and_stands', 'civic_social_fraternal_associations', 'cleaning_and_maintenance', 'clothing_rental', 'colleges_universities', 'commercial_equipment', 'commercial_footwear', 'commercial_photography_art_and_graphics', 'commuter_transport_and_ferries', 'computer_network_services', 'computer_programming', 'computer_repair', 'computer_software_stores', 'computers_peripherals_and_software', 'concrete_work_services', 'construction_materials', 'consulting_public_relations', 'correspondence_schools', 'cosmetic_stores', 'counseling_services', 'country_clubs', 'courier_services', 'court_costs', 'credit_reporting_agencies', 'cruise_lines', 'dairy_products_stores', 'dance_hall_studios_schools', 'dating_escort_services', 'dentists_orthodontists', 'department_stores', 'detective_agencies', 'digital_goods_applications', 'digital_goods_games', 'digital_goods_large_volume', 'digital_goods_media', 'direct_marketing_catalog_merchant', 'direct_marketing_combination_catalog_and_retail_merchant', 'direct_marketing_inbound_telemarketing', 'direct_marketing_insurance_services', 'direct_marketing_other', 'direct_marketing_outbound_telemarketing', 'direct_marketing_subscription', 'direct_marketing_travel', 'discount_stores', 'doctors', 'door_to_door_sales', 'drapery_window_covering_and_upholstery_stores', 'drinking_places', 'drug_stores_and_pharmacies', 'drugs_drug_proprietaries_and_druggist_sundries', 'dry_cleaners', 'durable_goods', 'duty_free_stores', 'eating_places_restaurants', 'educational_services', 'electric_razor_stores', 'electric_vehicle_charging', 'electrical_parts_and_equipment', 'electrical_services', 'electronics_repair_shops', 'electronics_stores', 'elementary_secondary_schools', 'emergency_services_gcas_visa_use_only', 'employment_temp_agencies', 'equipment_rental', 'exterminating_services', 'family_clothing_stores', 'fast_food_restaurants', 'financial_institutions', 'fines_government_administrative_entities', 'fireplace_fireplace_screens_and_accessories_stores', 'floor_covering_stores', 'florists', 'florists_supplies_nursery_stock_and_flowers', 'freezer_and_locker_meat_provisioners', 'fuel_dealers_non_automotive', 'funeral_services_crematories', 'furniture_home_furnishings_and_equipment_stores_except_appliances', 'furniture_repair_refinishing', 'furriers_and_fur_shops', 'general_services', 'gift_card_novelty_and_souvenir_shops', 'glass_paint_and_wallpaper_stores', 'glassware_crystal_stores', 'golf_courses_public', 'government_licensed_horse_dog_racing_us_region_only', 'government_licensed_online_casions_online_gambling_us_region_only', 'government_owned_lotteries_non_us_region', 'government_owned_lotteries_us_region_only', 'government_services', 'grocery_stores_supermarkets', 'hardware_equipment_and_supplies', 'hardware_stores', 'health_and_beauty_spas', 'hearing_aids_sales_and_supplies', 'heating_plumbing_a_c', 'hobby_toy_and_game_shops', 'home_supply_warehouse_stores', 'hospitals', 'hotels_motels_and_resorts', 'household_appliance_stores', 'industrial_supplies', 'information_retrieval_services', 'insurance_default', 'insurance_underwriting_premiums', 'intra_company_purchases', 'jewelry_stores_watches_clocks_and_silverware_stores', 'landscaping_services', 'laundries', 'laundry_cleaning_services', 'legal_services_attorneys', 'luggage_and_leather_goods_stores', 'lumber_building_materials_stores', 'manual_cash_disburse', 'marinas_service_and_supplies', 'marketplaces', 'masonry_stonework_and_plaster', 'massage_parlors', 'medical_and_dental_labs', 'medical_dental_ophthalmic_and_hospital_equipment_and_supplies', 'medical_services', 'membership_organizations', 'mens_and_boys_clothing_and_accessories_stores', 'mens_womens_clothing_stores', 'metal_service_centers', 'miscellaneous_apparel_and_accessory_shops', 'miscellaneous_auto_dealers', 'miscellaneous_business_services', 'miscellaneous_food_stores', 'miscellaneous_general_merchandise', 'miscellaneous_general_services', 'miscellaneous_home_furnishing_specialty_stores', 'miscellaneous_publishing_and_printing', 'miscellaneous_recreation_services', 'miscellaneous_repair_shops', 'miscellaneous_specialty_retail', 'mobile_home_dealers', 'motion_picture_theaters', 'motor_freight_carriers_and_trucking', 'motor_homes_dealers', 'motor_vehicle_supplies_and_new_parts', 'motorcycle_shops_and_dealers', 'motorcycle_shops_dealers', 'music_stores_musical_instruments_pianos_and_sheet_music', 'news_dealers_and_newsstands', 'non_fi_money_orders', 'non_fi_stored_value_card_purchase_load', 'nondurable_goods', 'nurseries_lawn_and_garden_supply_stores', 'nursing_personal_care', 'office_and_commercial_furniture', 'opticians_eyeglasses', 'optometrists_ophthalmologist', 'orthopedic_goods_prosthetic_devices', 'osteopaths', 'package_stores_beer_wine_and_liquor', 'paints_varnishes_and_supplies', 'parking_lots_garages', 'passenger_railways', 'pawn_shops', 'pet_shops_pet_food_and_supplies', 'petroleum_and_petroleum_products', 'photo_developing', 'photographic_photocopy_microfilm_equipment_and_supplies', 'photographic_studios', 'picture_video_production', 'piece_goods_notions_and_other_dry_goods', 'plumbing_heating_equipment_and_supplies', 'political_organizations', 'postal_services_government_only', 'precious_stones_and_metals_watches_and_jewelry', 'professional_services', 'public_warehousing_and_storage', 'quick_copy_repro_and_blueprint', 'railroads', 'real_estate_agents_and_managers_rentals', 'record_stores', 'recreational_vehicle_rentals', 'religious_goods_stores', 'religious_organizations', 'roofing_siding_sheet_metal', 'secretarial_support_services', 'security_brokers_dealers', 'service_stations', 'sewing_needlework_fabric_and_piece_goods_stores', 'shoe_repair_hat_cleaning', 'shoe_stores', 'small_appliance_repair', 'snowmobile_dealers', 'special_trade_services', 'specialty_cleaning', 'sporting_goods_stores', 'sporting_recreation_camps', 'sports_and_riding_apparel_stores', 'sports_clubs_fields', 'stamp_and_coin_stores', 'stationary_office_supplies_printing_and_writing_paper', 'stationery_stores_office_and_school_supply_stores', 'swimming_pools_sales', 't_ui_travel_germany', 'tailors_alterations', 'tax_payments_government_agencies', 'tax_preparation_services', 'taxicabs_limousines', 'telecommunication_equipment_and_telephone_sales', 'telecommunication_services', 'telegraph_services', 'tent_and_awning_shops', 'testing_laboratories', 'theatrical_ticket_agencies', 'timeshares', 'tire_retreading_and_repair', 'tolls_bridge_fees', 'tourist_attractions_and_exhibits', 'towing_services', 'trailer_parks_campgrounds', 'transportation_services', 'travel_agencies_tour_operators', 'truck_stop_iteration', 'truck_utility_trailer_rentals', 'typesetting_plate_making_and_related_services', 'typewriter_stores', 'u_s_federal_government_agencies_or_departments', 'uniforms_commercial_clothing', 'used_merchandise_and_secondhand_stores', 'utilities', 'variety_stores', 'veterinary_services', 'video_amusement_game_supplies', 'video_game_arcades', 'video_tape_rental_stores', 'vocational_trade_schools', 'watch_jewelry_repair', 'welding_repair', 'wholesale_clubs', 'wig_and_toupee_stores', 'wires_money_orders', 'womens_accessory_and_specialty_shops', 'womens_ready_to_wear_stores', 'wrecking_and_salvage_yards']" + ] + """ + A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + """ + city: NotRequired["str"] + """ + City where the seller is located + """ + country: NotRequired["str"] + """ + Country where the seller is located + """ + name: NotRequired["str"] + """ + Name of the seller + """ + network_id: NotRequired["str"] + """ + Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + """ + postal_code: NotRequired["str"] + """ + Postal code where the seller is located + """ + state: NotRequired["str"] + """ + State where the seller is located + """ + terminal_id: NotRequired["str"] + """ + An ID assigned by the seller to the location of the sale. + """ + url: NotRequired["str"] + """ + URL provided by the merchant on a 3DS request + """ - class RefundParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - refund_amount: NotRequired["int"] - """ - The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ + class RefundParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + refund_amount: NotRequired["int"] + """ + The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ amount: int """ @@ -743,6 +745,10 @@ class RefundParams(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. """ + network_data: Optional[NetworkData] + """ + Details about the transaction, such as processing dates, set by the card network. + """ object: Literal["issuing.transaction"] """ String representing the object's type. Objects of the same type share the same value. @@ -961,6 +967,7 @@ def test_helpers(self): _inner_class_types = { "amount_details": AmountDetails, "merchant_data": MerchantData, + "network_data": NetworkData, "purchase_details": PurchaseDetails, "treasury": Treasury, } diff --git a/stripe/api_resources/mandate.py b/stripe/api_resources/mandate.py index 9a52fc285..2036af6fd 100644 --- a/stripe/api_resources/mandate.py +++ b/stripe/api_resources/mandate.py @@ -155,13 +155,11 @@ class SingleUse(StripeObject): The currency of the payment on a single use mandate. """ - if TYPE_CHECKING: - - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ customer_acceptance: CustomerAcceptance id: str diff --git a/stripe/api_resources/payment_intent.py b/stripe/api_resources/payment_intent.py index 67a250bf6..05ea58556 100644 --- a/stripe/api_resources/payment_intent.py +++ b/stripe/api_resources/payment_intent.py @@ -1762,5501 +1762,5423 @@ class TransferData(StripeObject): payment success. """ - if TYPE_CHECKING: - - class ApplyCustomerBalanceParams(RequestOptions): - amount: NotRequired["int"] - """ - Amount that you intend to apply to this PaymentIntent from the customer's cash balance. + 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). + 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. + The maximum amount is the amount of the PaymentIntent. - When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent. - """ - currency: NotRequired["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). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent. + """ + currency: NotRequired["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). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CancelParams(RequestOptions): - cancellation_reason: NotRequired[ - "Literal['abandoned', 'duplicate', 'fraudulent', 'requested_by_customer']" - ] - """ - Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class CancelParams(RequestOptions): + cancellation_reason: NotRequired[ + "Literal['abandoned', 'duplicate', 'fraudulent', 'requested_by_customer']" + ] + """ + Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CaptureParams(RequestOptions): - amount_to_capture: NotRequired["int"] - """ - The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount is automatically refunded. Defaults to the full `amount_capturable` if it's not provided. - """ - application_fee_amount: NotRequired["int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - final_capture: NotRequired["bool"] - """ - Defaults to `true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they're captured in future requests. You can only use this setting when [multicapture](https://stripe.com/docs/payments/multicapture) is available for PaymentIntents. - """ - metadata: NotRequired["Literal['']|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`. - """ - statement_descriptor: NotRequired["str"] - """ - For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. - """ - 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. - """ - transfer_data: NotRequired[ - "PaymentIntent.CaptureParamsTransferData" - ] - """ - The parameters that you can use to automatically create a transfer after the payment - is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ + class CaptureParams(RequestOptions): + amount_to_capture: NotRequired["int"] + """ + The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount is automatically refunded. Defaults to the full `amount_capturable` if it's not provided. + """ + application_fee_amount: NotRequired["int"] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + final_capture: NotRequired["bool"] + """ + Defaults to `true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they're captured in future requests. You can only use this setting when [multicapture](https://stripe.com/docs/payments/multicapture) is available for PaymentIntents. + """ + metadata: NotRequired["Literal['']|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`. + """ + statement_descriptor: NotRequired["str"] + """ + For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + """ + 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. + """ + transfer_data: NotRequired["PaymentIntent.CaptureParamsTransferData"] + """ + The parameters that you can use to automatically create a transfer after the payment + is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ - class CaptureParamsTransferData(TypedDict): - amount: NotRequired["int"] - """ - The amount that will be transferred automatically when a charge succeeds. - """ + class CaptureParamsTransferData(TypedDict): + amount: NotRequired["int"] + """ + The amount that will be transferred automatically when a charge succeeds. + """ - class ConfirmParams(RequestOptions): - capture_method: NotRequired[ - "Literal['automatic', 'automatic_async', 'manual']" - ] - """ - Controls when the funds will be captured from the customer's account. - """ - error_on_requires_action: NotRequired["bool"] - """ - Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - mandate: NotRequired["str"] - """ - ID of the mandate that's used for this payment. - """ - mandate_data: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsMandateData|PaymentIntent.ConfirmParamsMandateData2" - ] - off_session: NotRequired["bool|Literal['one_off', 'recurring']"] - """ - Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). - """ - 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. - """ - payment_method_data: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodData" - ] - """ - If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - property on the PaymentIntent. - """ - payment_method_options: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this PaymentIntent. - """ - radar_options: NotRequired[ - "PaymentIntent.ConfirmParamsRadarOptions" - ] - """ - Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). - """ - receipt_email: NotRequired["Literal['']|str"] - """ - Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). - """ - return_url: NotRequired["str"] - """ - The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. - If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - This parameter is only used for cards and other redirect-based payment methods. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ConfirmParams(RequestOptions): + capture_method: NotRequired[ + "Literal['automatic', 'automatic_async', 'manual']" + ] + """ + Controls when the funds will be captured from the customer's account. + """ + error_on_requires_action: NotRequired["bool"] + """ + Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + mandate: NotRequired["str"] + """ + ID of the mandate that's used for this payment. + """ + mandate_data: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsMandateData|PaymentIntent.ConfirmParamsMandateData2" + ] + off_session: NotRequired["bool|Literal['one_off', 'recurring']"] + """ + Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). + """ + 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. + """ + payment_method_data: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodData" + ] + """ + If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + property on the PaymentIntent. + """ + payment_method_options: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this PaymentIntent. + """ + radar_options: NotRequired["PaymentIntent.ConfirmParamsRadarOptions"] + """ + Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). + """ + receipt_email: NotRequired["Literal['']|str"] + """ + Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + """ + return_url: NotRequired["str"] + """ + The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + This parameter is only used for cards and other redirect-based payment methods. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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`. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsShipping" - ] - """ - Shipping information for this PaymentIntent. - """ - use_stripe_sdk: NotRequired["bool"] - """ - Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. - """ + 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`. + """ + shipping: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsShipping" + ] + """ + Shipping information for this PaymentIntent. + """ + use_stripe_sdk: NotRequired["bool"] + """ + Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + """ - class ConfirmParamsShipping(TypedDict): - address: "PaymentIntent.ConfirmParamsShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired["str"] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired["str"] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired["str"] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ + class ConfirmParamsShipping(TypedDict): + address: "PaymentIntent.ConfirmParamsShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired["str"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: str + """ + Recipient name. + """ + phone: NotRequired["str"] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired["str"] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ - class ConfirmParamsShippingAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class ConfirmParamsShippingAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ConfirmParamsRadarOptions(TypedDict): - session: NotRequired["str"] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ + class ConfirmParamsRadarOptions(TypedDict): + session: NotRequired["str"] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ - class ConfirmParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. - """ - affirm: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. - """ - afterpay_clearpay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAfterpayClearpay" - ] - """ - If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. - """ - alipay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAlipay" - ] - """ - If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. - """ - au_becs_debit: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAuBecsDebit" - ] - """ - If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. - """ - bacs_debit: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. - """ - bancontact: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. - """ - blik: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsBlik" - ] - """ - If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. - """ - boleto: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. - """ - card: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card payments attempted on this PaymentIntent. - """ - card_present: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCardPresent" - ] - """ - If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - cashapp: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. - """ - customer_balance: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCustomerBalance" - ] - """ - If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. - """ - eps: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsEps" - ] - """ - If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. - """ - fpx: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsFpx" - ] - """ - If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. - """ - giropay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. - """ - grabpay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. - """ - ideal: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsIdeal" - ] - """ - If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. - """ - interac_present: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsInteracPresent" - ] - """ - If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - klarna: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. - """ - konbini: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. - """ - link: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsLink" - ] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - oxxo: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsOxxo" - ] - """ - If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. - """ - p24: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsP24" - ] - """ - If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. - """ - paynow: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. - """ - paypal: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - pix: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPix" - ] - """ - If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. - """ - promptpay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. - """ - revolut_pay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Demo Pay payment method options. - """ - sepa_debit: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - sofort: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsSofort" - ] - """ - If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. - """ - us_bank_account: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. - """ - wechat_pay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsWechatPay" - ] - """ - If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. - """ - zip: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsZip" - ] - """ - If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. - """ + class ConfirmParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAcssDebit" + ] + """ + If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + """ + affirm: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAffirm" + ] + """ + If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + """ + afterpay_clearpay: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAfterpayClearpay" + ] + """ + If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + """ + alipay: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAlipay" + ] + """ + If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + """ + au_becs_debit: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAuBecsDebit" + ] + """ + If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + """ + bacs_debit: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + """ + bancontact: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + """ + blik: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsBlik" + ] + """ + If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + """ + boleto: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsBoleto" + ] + """ + If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + """ + card: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCard" + ] + """ + Configuration for any card payments attempted on this PaymentIntent. + """ + card_present: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCardPresent" + ] + """ + If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ + cashapp: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCashapp" + ] + """ + If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + """ + customer_balance: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCustomerBalance" + ] + """ + If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + """ + eps: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsEps" + ] + """ + If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + """ + fpx: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsFpx" + ] + """ + If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + """ + giropay: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsGiropay" + ] + """ + If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + """ + grabpay: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsGrabpay" + ] + """ + If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + """ + ideal: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsIdeal" + ] + """ + If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + """ + interac_present: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsInteracPresent" + ] + """ + If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ + klarna: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsKlarna" + ] + """ + If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + """ + konbini: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsKonbini" + ] + """ + If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + """ + link: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsLink" + ] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ + oxxo: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsOxxo" + ] + """ + If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + """ + p24: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsP24" + ] + """ + If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + """ + paynow: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPaynow" + ] + """ + If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + """ + paypal: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPaypal" + ] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ + pix: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPix" + ] + """ + If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + """ + promptpay: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + """ + revolut_pay: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Demo Pay payment method options. + """ + sepa_debit: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ + sofort: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsSofort" + ] + """ + If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + """ + us_bank_account: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccount" + ] + """ + If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + """ + wechat_pay: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsWechatPay" + ] + """ + If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + """ + zip: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsZip" + ] + """ + If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + """ - class ConfirmParamsPaymentMethodOptionsZip(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ConfirmParamsPaymentMethodOptionsZip(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ConfirmParamsPaymentMethodOptionsWechatPay(TypedDict): - app_id: NotRequired["str"] - """ - The app ID registered with WeChat Pay. Only required when client is ios or android. - """ - client: Literal["android", "ios", "web"] - """ - The client type that the end customer will pay from - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ConfirmParamsPaymentMethodOptionsWechatPay(TypedDict): + app_id: NotRequired["str"] + """ + The app ID registered with WeChat Pay. Only required when client is ios or android. + """ + client: Literal["android", "ios", "web"] + """ + The client type that the end customer will pay from + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - networks: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - preferred_settlement_speed: NotRequired[ - "Literal['']|Literal['fastest', 'standard']" - ] - """ - Preferred transaction settlement speed - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): + financial_connections: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + networks: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks" + ] + """ + Additional fields for network related functions + """ + preferred_settlement_speed: NotRequired[ + "Literal['']|Literal['fastest', 'standard']" + ] + """ + Preferred transaction settlement speed + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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`. - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + 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`. + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks( - TypedDict - ): - requested: NotRequired["List[Literal['ach', 'us_domestic_wire']]"] - """ - Triggers validations to run across the selected networks - """ + class ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): + requested: NotRequired["List[Literal['ach', 'us_domestic_wire']]"] + """ + Triggers validations to run across the selected networks + """ - class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - permissions: NotRequired[ - "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired["List[Literal['balances']]"] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired["str"] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ + class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, + ): + permissions: NotRequired[ + "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired["List[Literal['balances']]"] + """ + List of data features that you would like to retrieve upon account creation. + """ + return_url: NotRequired["str"] + """ + For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + """ - class ConfirmParamsPaymentMethodOptionsSofort(TypedDict): - preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" - ] - """ - Language shown to the payer on redirect. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ConfirmParamsPaymentMethodOptionsSofort(TypedDict): + preferred_language: NotRequired[ + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + ] + """ + Language shown to the payer on redirect. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions( - TypedDict, - ): - pass + class ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): + pass - class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class ConfirmParamsPaymentMethodOptionsPromptpay(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsPromptpay(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsPix(TypedDict): - expires_after_seconds: NotRequired["int"] - """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. - """ - expires_at: NotRequired["int"] - """ - The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsPix(TypedDict): + expires_after_seconds: NotRequired["int"] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ + expires_at: NotRequired["int"] + """ + The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. - """ - preferred_locale: NotRequired[ - "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-DE', 'de-LU', 'el-GR', 'en-GB', 'en-US', 'es-ES', 'fi-FI', 'fr-BE', 'fr-FR', 'fr-LU', 'hu-HU', 'it-IT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sk-SK', 'sv-SE']" - ] - """ - [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. - """ - reference: NotRequired["str"] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - risk_correlation_id: NotRequired["str"] - """ - The risk correlation ID for an on-session payment using a saved PayPal payment method. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + """ + preferred_locale: NotRequired[ + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-DE', 'de-LU', 'el-GR', 'en-GB', 'en-US', 'es-ES', 'fi-FI', 'fr-BE', 'fr-FR', 'fr-LU', 'hu-HU', 'it-IT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sk-SK', 'sv-SE']" + ] + """ + [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + """ + reference: NotRequired["str"] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + risk_correlation_id: NotRequired["str"] + """ + The risk correlation ID for an on-session payment using a saved PayPal payment method. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsPaynow(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsPaynow(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsP24(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ - tos_shown_and_accepted: NotRequired["bool"] - """ - Confirm that the payer has accepted the P24 terms and conditions. - """ + class ConfirmParamsPaymentMethodOptionsP24(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): - expires_after_days: NotRequired["int"] - """ - The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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`. + """ + tos_shown_and_accepted: NotRequired["bool"] + """ + Confirm that the payer has accepted the P24 terms and conditions. + """ - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): + expires_after_days: NotRequired["int"] + """ + The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsLink(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + When processing card payments, Stripe also uses `setup_future_usage` 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. - """ - persistent_token: NotRequired["str"] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + 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`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class ConfirmParamsPaymentMethodOptionsLink(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - When processing card payments, Stripe also uses `setup_future_usage` 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 provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. - 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + persistent_token: NotRequired["str"] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): - confirmation_number: NotRequired["Literal['']|str"] - """ - An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. - """ - expires_after_days: NotRequired["Literal['']|int"] - """ - The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. - """ - expires_at: NotRequired["Literal['']|int"] - """ - The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. - """ - product_description: NotRequired["Literal['']|str"] - """ - A product descriptor of up to 22 characters, which will appear to customers at the convenience store. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): + confirmation_number: NotRequired["Literal['']|str"] + """ + An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + """ + expires_after_days: NotRequired["Literal['']|int"] + """ + The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + """ + expires_at: NotRequired["Literal['']|int"] + """ + The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + """ + product_description: NotRequired["Literal['']|str"] + """ + A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + When processing card payments, Stripe also uses `setup_future_usage` 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. - """ - preferred_locale: NotRequired[ - "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sv-FI', 'sv-SE']" - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + 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`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - When processing card payments, Stripe also uses `setup_future_usage` 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 provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. - 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + preferred_locale: NotRequired[ + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sv-FI', 'sv-SE']" + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsInteracPresent(TypedDict): - pass + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + 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`. + """ - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + class ConfirmParamsPaymentMethodOptionsInteracPresent(TypedDict): + pass - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsGrabpay(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsGrabpay(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsGiropay(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsGiropay(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsFpx(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsFpx(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsEps(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsEps(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsCustomerBalance(TypedDict): - bank_transfer: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired["Literal['bank_transfer']"] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsCustomerBalance(TypedDict): + bank_transfer: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired["Literal['bank_transfer']"] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for the eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - "List[Literal['aba', 'iban', 'sepa', 'sort_code', 'spei', 'swift', 'zengin']]" - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ - class ConfirmParamsPaymentMethodOptionsCashapp(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + class ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, + ): + eu_bank_transfer: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for the eu_bank_transfer funding type. + """ + requested_address_types: NotRequired[ + "List[Literal['aba', 'iban', 'sepa', 'sort_code', 'spei', 'swift', 'zengin']]" + ] + """ + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + """ + type: Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + """ + The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, + ): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class ConfirmParamsPaymentMethodOptionsCashapp(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - When processing card payments, Stripe also uses `setup_future_usage` 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 provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. - 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): - request_extended_authorization: NotRequired["bool"] - """ - Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) - """ - request_incremental_authorization_support: NotRequired["bool"] - """ - Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. - """ - request_incremental_authorization: NotRequired[ - "Literal['if_available', 'never']" - ] - """ - This field was released by mistake and will be removed in the next major version - """ + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - class ConfirmParamsPaymentMethodOptionsCard(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + When processing card payments, Stripe also uses `setup_future_usage` 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 provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. - """ - cvc_token: NotRequired["str"] - """ - A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. - """ - installments: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments attempted on this PaymentIntent (Mexico Only). + class ConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): + request_extended_authorization: NotRequired["bool"] + """ + Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + """ + request_incremental_authorization_support: NotRequired["bool"] + """ + Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + """ + request_incremental_authorization: NotRequired[ + "Literal['if_available', 'never']" + ] + """ + This field was released by mistake and will be removed in the next major version + """ - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - """ - mandate_options: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired["bool"] - """ - When specified, this parameter indicates that a transaction will be marked - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - "Literal['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'mastercard', 'unionpay', 'unknown', 'visa']" - ] - """ - Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. - """ - request_extended_authorization: NotRequired[ - "Literal['if_available', 'never']" - ] - """ - Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. - """ - request_incremental_authorization: NotRequired[ - "Literal['if_available', 'never']" - ] - """ - Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. - """ - request_multicapture: NotRequired[ - "Literal['if_available', 'never']" - ] - """ - Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. - """ - request_overcapture: NotRequired[ - "Literal['if_available', 'never']" - ] - """ - Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. - """ - request_three_d_secure: NotRequired["Literal['any', 'automatic']"] - """ - 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. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ConfirmParamsPaymentMethodOptionsCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. - When processing card payments, Stripe also uses `setup_future_usage` 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + cvc_token: NotRequired["str"] + """ + A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + """ + installments: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodOptionsCardInstallments" + ] + """ + Installment configuration for payments attempted on this PaymentIntent (Mexico Only). - 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`. - """ - statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. - """ - statement_descriptor_suffix_kanji: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. - """ + For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + """ + mandate_options: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + moto: NotRequired["bool"] + """ + When specified, this parameter indicates that a transaction will be marked + as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + parameter can only be provided during confirmation. + """ + network: NotRequired[ + "Literal['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'mastercard', 'unionpay', 'unknown', 'visa']" + ] + """ + Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + """ + request_extended_authorization: NotRequired[ + "Literal['if_available', 'never']" + ] + """ + Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + """ + request_incremental_authorization: NotRequired[ + "Literal['if_available', 'never']" + ] + """ + Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + """ + request_multicapture: NotRequired["Literal['if_available', 'never']"] + """ + Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + """ + request_overcapture: NotRequired["Literal['if_available', 'never']"] + """ + Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + """ + request_three_d_secure: NotRequired["Literal['any', 'automatic']"] + """ + 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. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired["str"] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired["int"] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired["List[Literal['india']]"] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - class ConfirmParamsPaymentMethodOptionsCardInstallments(TypedDict): - enabled: NotRequired["bool"] - """ - Setting to true enables installments for this PaymentIntent. - This will cause the response to contain a list of available installment plans. - Setting to false will prevent any selected plan from applying to a charge. - """ - plan: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCardInstallmentsPlan" - ] - """ - The selected installment plan to use for this payment attempt. - This parameter can only be provided during confirmation. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class ConfirmParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: int - """ - For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. - """ - interval: Literal["month"] - """ - For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["fixed_count"] - """ - Type of installment plan, one of `fixed_count`. - """ + 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`. + """ + statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + """ + statement_descriptor_suffix_kanji: NotRequired["Literal['']|str"] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + """ - class ConfirmParamsPaymentMethodOptionsBoleto(TypedDict): - expires_after_days: NotRequired["int"] - """ - The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ConfirmParamsPaymentMethodOptionsCardMandateOptions(TypedDict): + amount: int + """ + Amount to be charged for future payments. + """ + amount_type: Literal["fixed", "maximum"] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired["str"] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired["int"] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + interval: Literal["day", "month", "sporadic", "week", "year"] + """ + Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + """ + reference: str + """ + Unique identifier for the mandate or subscription. + """ + start_date: int + """ + Start date of the mandate or subscription. Start date should not be lesser than yesterday. + """ + supported_types: NotRequired["List[Literal['india']]"] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class ConfirmParamsPaymentMethodOptionsCardInstallments(TypedDict): + enabled: NotRequired["bool"] + """ + Setting to true enables installments for this PaymentIntent. + This will cause the response to contain a list of available installment plans. + Setting to false will prevent any selected plan from applying to a charge. + """ + plan: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCardInstallmentsPlan" + ] + """ + The selected installment plan to use for this payment attempt. + This parameter can only be provided during confirmation. + """ - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + class ConfirmParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): + count: int + """ + For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + """ + interval: Literal["month"] + """ + For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + One of `month`. + """ + type: Literal["fixed_count"] + """ + Type of installment plan, one of `fixed_count`. + """ - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsBoleto(TypedDict): + expires_after_days: NotRequired["int"] + """ + The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsBlik(TypedDict): - code: NotRequired["str"] - """ - The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. - """ + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']"] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + 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`. + """ - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + class ConfirmParamsPaymentMethodOptionsBlik(TypedDict): + code: NotRequired["str"] + """ + The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + """ - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']"] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + When processing card payments, Stripe also uses `setup_future_usage` 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. - """ - reference: NotRequired["str"] - """ - An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. - This field differs from the statement descriptor and item name. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + 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`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class ConfirmParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - When processing card payments, Stripe also uses `setup_future_usage` 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 provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. - 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + reference: NotRequired["str"] + """ + An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + This field differs from the statement descriptor and item name. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsAffirm(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + When processing card payments, Stripe also uses `setup_future_usage` 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. - """ - preferred_locale: NotRequired["str"] - """ - Preferred language of the Affirm authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + 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`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class ConfirmParamsPaymentMethodOptionsAffirm(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - When processing card payments, Stripe also uses `setup_future_usage` 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 provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. - 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + preferred_locale: NotRequired["str"] + """ + Preferred language of the Affirm authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + class ConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - interval_description: NotRequired["str"] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - "Literal['combined', 'interval', 'sporadic']" - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired["Literal['business', 'personal']"] - """ - Transaction type of the mandate. - """ + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - class ConfirmParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - au_becs_debit: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billing_details: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataBlik" - ] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - customer_balance: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - grabpay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - ideal: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataIdeal" - ] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - klarna: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - link: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataLink" - ] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - 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`. - """ - oxxo: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataOxxo" - ] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - paynow: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - pix: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - radar_options: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - revolut_pay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - sepa_debit: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - sofort: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "blik", - "boleto", - "cashapp", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "klarna", - "konbini", - "link", - "oxxo", - "p24", - "paynow", - "paypal", - "pix", - "promptpay", - "revolut_pay", - "sepa_debit", - "sofort", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class ConfirmParamsPaymentMethodDataZip(TypedDict): - pass + 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`. + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class ConfirmParamsPaymentMethodDataWechatPay(TypedDict): - pass + class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + interval_description: NotRequired["str"] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']" + ] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired["Literal['business', 'personal']"] + """ + Transaction type of the mandate. + """ - class ConfirmParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - Account holder type: individual or company. - """ - account_number: NotRequired["str"] - """ - Account number of the bank account. - """ - account_type: NotRequired["Literal['checking', 'savings']"] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired["str"] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired["str"] - """ - Routing number of the bank account. - """ + class ConfirmParamsPaymentMethodData(TypedDict): + acss_debit: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataAcssDebit" + ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataAffirm" + ] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataAlipay" + ] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + au_becs_debit: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataAuBecsDebit" + ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billing_details: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataBoleto" + ] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + cashapp: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataCashapp" + ] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + customer_balance: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + fpx: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataGiropay" + ] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + grabpay: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataGrabpay" + ] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + ideal: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + klarna: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataKlarna" + ] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataKonbini" + ] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + link: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + 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`. + """ + oxxo: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + paynow: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataPaynow" + ] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataPaypal" + ] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + pix: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + radar_options: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataRadarOptions" + ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + revolut_pay: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataRevolutPay" + ] + """ + If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + sepa_debit: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + sofort: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataSofort" + ] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + type: Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay", + "zip", + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataUsBankAccount" + ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataWechatPay" + ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ - class ConfirmParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ + class ConfirmParamsPaymentMethodDataZip(TypedDict): + pass - class ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ + class ConfirmParamsPaymentMethodDataWechatPay(TypedDict): + pass - class ConfirmParamsPaymentMethodDataRevolutPay(TypedDict): - pass + class ConfirmParamsPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + Account holder type: individual or company. + """ + account_number: NotRequired["str"] + """ + Account number of the bank account. + """ + account_type: NotRequired["Literal['checking', 'savings']"] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired["str"] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired["str"] + """ + Routing number of the bank account. + """ - class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired["str"] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ + class ConfirmParamsPaymentMethodDataSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ - class ConfirmParamsPaymentMethodDataPromptpay(TypedDict): - pass + class ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ - class ConfirmParamsPaymentMethodDataPix(TypedDict): - pass + class ConfirmParamsPaymentMethodDataRevolutPay(TypedDict): + pass - class ConfirmParamsPaymentMethodDataPaypal(TypedDict): - pass + class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): + session: NotRequired["str"] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ - class ConfirmParamsPaymentMethodDataPaynow(TypedDict): - pass + class ConfirmParamsPaymentMethodDataPromptpay(TypedDict): + pass - class ConfirmParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']" - ] - """ - The customer's bank. - """ + class ConfirmParamsPaymentMethodDataPix(TypedDict): + pass - class ConfirmParamsPaymentMethodDataOxxo(TypedDict): - pass + class ConfirmParamsPaymentMethodDataPaypal(TypedDict): + pass - class ConfirmParamsPaymentMethodDataLink(TypedDict): - pass + class ConfirmParamsPaymentMethodDataPaynow(TypedDict): + pass - class ConfirmParamsPaymentMethodDataKonbini(TypedDict): - pass + class ConfirmParamsPaymentMethodDataP24(TypedDict): + bank: NotRequired[ + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']" + ] + """ + The customer's bank. + """ - class ConfirmParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ + class ConfirmParamsPaymentMethodDataOxxo(TypedDict): + pass - class ConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ + class ConfirmParamsPaymentMethodDataLink(TypedDict): + pass - class ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): - pass + class ConfirmParamsPaymentMethodDataKonbini(TypedDict): + pass - class ConfirmParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - "Literal['abn_amro', 'asn_bank', 'bunq', 'handelsbanken', 'ing', 'knab', 'moneyou', 'n26', 'rabobank', 'regiobank', 'revolut', 'sns_bank', 'triodos_bank', 'van_lanschot', 'yoursafe']" - ] - """ - The customer's bank. - """ + class ConfirmParamsPaymentMethodDataKlarna(TypedDict): + dob: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataKlarnaDob" + ] + """ + Customer's date of birth + """ - class ConfirmParamsPaymentMethodDataGrabpay(TypedDict): - pass + class ConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ - class ConfirmParamsPaymentMethodDataGiropay(TypedDict): - pass + class ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): + pass - class ConfirmParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ + class ConfirmParamsPaymentMethodDataIdeal(TypedDict): + bank: NotRequired[ + "Literal['abn_amro', 'asn_bank', 'bunq', 'handelsbanken', 'ing', 'knab', 'moneyou', 'n26', 'rabobank', 'regiobank', 'revolut', 'sns_bank', 'triodos_bank', 'van_lanschot', 'yoursafe']" + ] + """ + The customer's bank. + """ - class ConfirmParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - "Literal['arzte_und_apotheker_bank', 'austrian_anadi_bank_ag', 'bank_austria', 'bankhaus_carl_spangler', 'bankhaus_schelhammer_und_schattera_ag', 'bawag_psk_ag', 'bks_bank_ag', 'brull_kallmus_bank_ag', 'btv_vier_lander_bank', 'capital_bank_grawe_gruppe_ag', 'deutsche_bank_ag', 'dolomitenbank', 'easybank_ag', 'erste_bank_und_sparkassen', 'hypo_alpeadriabank_international_ag', 'hypo_bank_burgenland_aktiengesellschaft', 'hypo_noe_lb_fur_niederosterreich_u_wien', 'hypo_oberosterreich_salzburg_steiermark', 'hypo_tirol_bank_ag', 'hypo_vorarlberg_bank_ag', 'marchfelder_bank', 'oberbank_ag', 'raiffeisen_bankengruppe_osterreich', 'schoellerbank_ag', 'sparda_bank_wien', 'volksbank_gruppe', 'volkskreditbank_ag', 'vr_bank_braunau']" - ] - """ - The customer's bank. - """ + class ConfirmParamsPaymentMethodDataGrabpay(TypedDict): + pass - class ConfirmParamsPaymentMethodDataCustomerBalance(TypedDict): - pass + class ConfirmParamsPaymentMethodDataGiropay(TypedDict): + pass - class ConfirmParamsPaymentMethodDataCashapp(TypedDict): - pass + class ConfirmParamsPaymentMethodDataFpx(TypedDict): + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ - class ConfirmParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ + class ConfirmParamsPaymentMethodDataEps(TypedDict): + bank: NotRequired[ + "Literal['arzte_und_apotheker_bank', 'austrian_anadi_bank_ag', 'bank_austria', 'bankhaus_carl_spangler', 'bankhaus_schelhammer_und_schattera_ag', 'bawag_psk_ag', 'bks_bank_ag', 'brull_kallmus_bank_ag', 'btv_vier_lander_bank', 'capital_bank_grawe_gruppe_ag', 'deutsche_bank_ag', 'dolomitenbank', 'easybank_ag', 'erste_bank_und_sparkassen', 'hypo_alpeadriabank_international_ag', 'hypo_bank_burgenland_aktiengesellschaft', 'hypo_noe_lb_fur_niederosterreich_u_wien', 'hypo_oberosterreich_salzburg_steiermark', 'hypo_tirol_bank_ag', 'hypo_vorarlberg_bank_ag', 'marchfelder_bank', 'oberbank_ag', 'raiffeisen_bankengruppe_osterreich', 'schoellerbank_ag', 'sparda_bank_wien', 'volksbank_gruppe', 'volkskreditbank_ag', 'vr_bank_braunau']" + ] + """ + The customer's bank. + """ - class ConfirmParamsPaymentMethodDataBlik(TypedDict): - pass + class ConfirmParamsPaymentMethodDataCustomerBalance(TypedDict): + pass - class ConfirmParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ + class ConfirmParamsPaymentMethodDataCashapp(TypedDict): + pass - class ConfirmParamsPaymentMethodDataBillingDetailsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class ConfirmParamsPaymentMethodDataBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ - class ConfirmParamsPaymentMethodDataBancontact(TypedDict): - pass + class ConfirmParamsPaymentMethodDataBlik(TypedDict): + pass - class ConfirmParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired["str"] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired["str"] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ + class ConfirmParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ - class ConfirmParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ + class ConfirmParamsPaymentMethodDataBillingDetailsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ConfirmParamsPaymentMethodDataAlipay(TypedDict): - pass + class ConfirmParamsPaymentMethodDataBancontact(TypedDict): + pass - class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass + class ConfirmParamsPaymentMethodDataBacsDebit(TypedDict): + account_number: NotRequired["str"] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired["str"] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ - class ConfirmParamsPaymentMethodDataAffirm(TypedDict): - pass + class ConfirmParamsPaymentMethodDataAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ - class ConfirmParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ + class ConfirmParamsPaymentMethodDataAlipay(TypedDict): + pass - class ConfirmParamsMandateData2(TypedDict): - customer_acceptance: "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptance2" - """ - This hash contains details about the customer acceptance of the Mandate. - """ + class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): + pass - class ConfirmParamsMandateDataCustomerAcceptance2(TypedDict): - online: "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptanceOnline2" - """ - If this is a Mandate accepted online, this hash contains details about the online acceptance. - """ - type: Literal["online"] - """ - The type of customer acceptance information included with the Mandate. - """ + class ConfirmParamsPaymentMethodDataAffirm(TypedDict): + pass - class ConfirmParamsMandateDataCustomerAcceptanceOnline2(TypedDict): - ip_address: NotRequired["str"] - """ - The IP address from which the Mandate was accepted by the customer. - """ - user_agent: NotRequired["str"] - """ - The user agent of the browser from which the Mandate was accepted by the customer. - """ + class ConfirmParamsPaymentMethodDataAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ - class ConfirmParamsMandateData(TypedDict): - customer_acceptance: "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptance" - """ - This hash contains details about the customer acceptance of the Mandate. - """ + class ConfirmParamsMandateData2(TypedDict): + customer_acceptance: "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptance2" + """ + This hash contains details about the customer acceptance of the Mandate. + """ - class ConfirmParamsMandateDataCustomerAcceptance(TypedDict): - accepted_at: NotRequired["int"] - """ - The time at which the customer accepted the Mandate. - """ - offline: NotRequired[ - "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptanceOffline" - ] - """ - If this is a Mandate accepted offline, this hash contains details about the offline acceptance. - """ - online: NotRequired[ - "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptanceOnline" - ] - """ - If this is a Mandate accepted online, this hash contains details about the online acceptance. - """ - type: Literal["offline", "online"] - """ - The type of customer acceptance information included with the Mandate. One of `online` or `offline`. - """ + class ConfirmParamsMandateDataCustomerAcceptance2(TypedDict): + online: "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptanceOnline2" + """ + If this is a Mandate accepted online, this hash contains details about the online acceptance. + """ + type: Literal["online"] + """ + The type of customer acceptance information included with the Mandate. + """ - class ConfirmParamsMandateDataCustomerAcceptanceOnline(TypedDict): - ip_address: str - """ - The IP address from which the Mandate was accepted by the customer. - """ - user_agent: str - """ - The user agent of the browser from which the Mandate was accepted by the customer. - """ + class ConfirmParamsMandateDataCustomerAcceptanceOnline2(TypedDict): + ip_address: NotRequired["str"] + """ + The IP address from which the Mandate was accepted by the customer. + """ + user_agent: NotRequired["str"] + """ + The user agent of the browser from which the Mandate was accepted by the customer. + """ - class ConfirmParamsMandateDataCustomerAcceptanceOffline(TypedDict): - pass + class ConfirmParamsMandateData(TypedDict): + customer_acceptance: "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptance" + """ + This hash contains details about the customer acceptance of the Mandate. + """ - class CreateParams(RequestOptions): - amount: int - """ - Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - """ - application_fee_amount: NotRequired["int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - automatic_payment_methods: NotRequired[ - "PaymentIntent.CreateParamsAutomaticPaymentMethods" - ] - """ - When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters. - """ - capture_method: NotRequired[ - "Literal['automatic', 'automatic_async', 'manual']" - ] - """ - Controls when the funds will be captured from the customer's account. - """ - confirm: NotRequired["bool"] - """ - Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm). - """ - confirmation_method: NotRequired["Literal['automatic', 'manual']"] - 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). - """ - customer: NotRequired["str"] - """ - ID of the Customer this PaymentIntent belongs to, if one exists. + class ConfirmParamsMandateDataCustomerAcceptance(TypedDict): + accepted_at: NotRequired["int"] + """ + The time at which the customer accepted the Mandate. + """ + offline: NotRequired[ + "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptanceOffline" + ] + """ + If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + """ + online: NotRequired[ + "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptanceOnline" + ] + """ + If this is a Mandate accepted online, this hash contains details about the online acceptance. + """ + type: Literal["offline", "online"] + """ + The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + """ - Payment methods attached to other Customers cannot be used with this PaymentIntent. + class ConfirmParamsMandateDataCustomerAcceptanceOnline(TypedDict): + ip_address: str + """ + The IP address from which the Mandate was accepted by the customer. + """ + user_agent: str + """ + The user agent of the browser from which the Mandate was accepted by the customer. + """ - 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. - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - error_on_requires_action: NotRequired["bool"] - """ - Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - mandate: NotRequired["str"] - """ - ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - """ - mandate_data: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsMandateData" - ] - """ - This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - """ - 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`. - """ - off_session: NotRequired["bool|Literal['one_off', 'recurring']"] - """ - Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - """ - on_behalf_of: NotRequired["str"] - """ - The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - payment_method: NotRequired["str"] - """ - ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. + class ConfirmParamsMandateDataCustomerAcceptanceOffline(TypedDict): + pass - If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward. - """ - payment_method_configuration: NotRequired["str"] - """ - The ID of the payment method configuration to use with this PaymentIntent. - """ - payment_method_data: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodData" - ] - """ - If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - property on the PaymentIntent. - """ - payment_method_options: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this PaymentIntent. - """ - 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). - """ - radar_options: NotRequired[ - "PaymentIntent.CreateParamsRadarOptions" - ] - """ - Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). - """ - receipt_email: NotRequired["str"] - """ - Email address to send the receipt to. If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails). - """ - return_url: NotRequired["str"] - """ - The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - """ - setup_future_usage: NotRequired[ - "Literal['off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class CreateParams(RequestOptions): + amount: int + """ + Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + """ + application_fee_amount: NotRequired["int"] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + automatic_payment_methods: NotRequired[ + "PaymentIntent.CreateParamsAutomaticPaymentMethods" + ] + """ + When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters. + """ + capture_method: NotRequired[ + "Literal['automatic', 'automatic_async', 'manual']" + ] + """ + Controls when the funds will be captured from the customer's account. + """ + confirm: NotRequired["bool"] + """ + Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm). + """ + confirmation_method: NotRequired["Literal['automatic', 'manual']"] + 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). + """ + customer: NotRequired["str"] + """ + ID of the Customer this PaymentIntent belongs to, if one exists. - When processing card payments, Stripe also uses `setup_future_usage` 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"] - """ - Shipping information for this PaymentIntent. - """ - statement_descriptor: NotRequired["str"] - """ - For non-card charges, you can use this value as the complete description that appears on your customers' statements. It must contain at least one letter and be 1–22 characters long. - """ - 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. - """ - transfer_data: NotRequired[ - "PaymentIntent.CreateParamsTransferData" - ] - """ - The parameters that you can use to automatically create a Transfer. - Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - transfer_group: NotRequired["str"] - """ - A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). - """ - use_stripe_sdk: NotRequired["bool"] - """ - Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. - """ + Payment methods attached to other Customers cannot be used with this PaymentIntent. - class CreateParamsTransferData(TypedDict): - amount: NotRequired["int"] - """ - The amount that will be transferred automatically when a charge succeeds. - The amount is capped at the total transaction amount and if no amount is set, - the full amount is transferred. + 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. + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + error_on_requires_action: NotRequired["bool"] + """ + Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + mandate: NotRequired["str"] + """ + ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + """ + mandate_data: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsMandateData" + ] + """ + This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + """ + 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`. + """ + off_session: NotRequired["bool|Literal['one_off', 'recurring']"] + """ + Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + """ + on_behalf_of: NotRequired["str"] + """ + The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + payment_method: NotRequired["str"] + """ + ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. - If you intend to collect a fee and you need a more robust reporting experience, using - [application_fee_amount](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount) - might be a better fit for your integration. - """ - destination: str - """ - If specified, successful charges will be attributed to the destination - account for tax reporting, and the funds from charges will be transferred - to the destination account. The ID of the resulting transfer will be - returned on the successful charge's `transfer` field. - """ + If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward. + """ + payment_method_configuration: NotRequired["str"] + """ + The ID of the payment method configuration to use with this PaymentIntent. + """ + payment_method_data: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodData" + ] + """ + If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + property on the PaymentIntent. + """ + payment_method_options: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this PaymentIntent. + """ + 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). + """ + radar_options: NotRequired["PaymentIntent.CreateParamsRadarOptions"] + """ + Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). + """ + receipt_email: NotRequired["str"] + """ + Email address to send the receipt to. If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails). + """ + return_url: NotRequired["str"] + """ + The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + """ + setup_future_usage: NotRequired["Literal['off_session', 'on_session']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsShipping(TypedDict): - address: "PaymentIntent.CreateParamsShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired["str"] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired["str"] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired["str"] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - class CreateParamsShippingAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ - - class CreateParamsRadarOptions(TypedDict): - session: NotRequired["str"] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ + When processing card payments, Stripe also uses `setup_future_usage` 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"] + """ + Shipping information for this PaymentIntent. + """ + statement_descriptor: NotRequired["str"] + """ + For non-card charges, you can use this value as the complete description that appears on your customers' statements. It must contain at least one letter and be 1–22 characters long. + """ + 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. + """ + transfer_data: NotRequired["PaymentIntent.CreateParamsTransferData"] + """ + The parameters that you can use to automatically create a Transfer. + Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + transfer_group: NotRequired["str"] + """ + A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). + """ + use_stripe_sdk: NotRequired["bool"] + """ + Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + """ - class CreateParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. - """ - affirm: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. - """ - afterpay_clearpay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAfterpayClearpay" - ] - """ - If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. - """ - alipay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAlipay" - ] - """ - If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. - """ - au_becs_debit: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAuBecsDebit" - ] - """ - If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. - """ - bacs_debit: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. - """ - bancontact: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. - """ - blik: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsBlik" - ] - """ - If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. - """ - boleto: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. - """ - card: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card payments attempted on this PaymentIntent. - """ - card_present: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCardPresent" - ] - """ - If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - cashapp: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. - """ - customer_balance: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCustomerBalance" - ] - """ - If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. - """ - eps: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsEps" - ] - """ - If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. - """ - fpx: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsFpx" - ] - """ - If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. - """ - giropay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. - """ - grabpay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. - """ - ideal: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsIdeal" - ] - """ - If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. - """ - interac_present: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsInteracPresent" - ] - """ - If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - klarna: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. - """ - konbini: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. - """ - link: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsLink" - ] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - oxxo: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsOxxo" - ] - """ - If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. - """ - p24: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsP24" - ] - """ - If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. - """ - paynow: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. - """ - paypal: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - pix: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPix" - ] - """ - If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. - """ - promptpay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. - """ - revolut_pay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Demo Pay payment method options. - """ - sepa_debit: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - sofort: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsSofort" - ] - """ - If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. - """ - us_bank_account: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. - """ - wechat_pay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsWechatPay" - ] - """ - If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. - """ - zip: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsZip" - ] - """ - If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. - """ + class CreateParamsTransferData(TypedDict): + amount: NotRequired["int"] + """ + The amount that will be transferred automatically when a charge succeeds. + The amount is capped at the total transaction amount and if no amount is set, + the full amount is transferred. - class CreateParamsPaymentMethodOptionsZip(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + If you intend to collect a fee and you need a more robust reporting experience, using + [application_fee_amount](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount) + might be a better fit for your integration. + """ + destination: str + """ + If specified, successful charges will be attributed to the destination + account for tax reporting, and the funds from charges will be transferred + to the destination account. The ID of the resulting transfer will be + returned on the successful charge's `transfer` field. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class CreateParamsShipping(TypedDict): + address: "PaymentIntent.CreateParamsShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired["str"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: str + """ + Recipient name. + """ + phone: NotRequired["str"] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired["str"] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + class CreateParamsShippingAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ + class CreateParamsRadarOptions(TypedDict): + session: NotRequired["str"] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ - class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): - app_id: NotRequired["str"] - """ - The app ID registered with WeChat Pay. Only required when client is ios or android. - """ - client: Literal["android", "ios", "web"] - """ - The client type that the end customer will pay from - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAcssDebit" + ] + """ + If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + """ + affirm: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAffirm" + ] + """ + If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + """ + afterpay_clearpay: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAfterpayClearpay" + ] + """ + If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + """ + alipay: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAlipay" + ] + """ + If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + """ + au_becs_debit: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAuBecsDebit" + ] + """ + If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + """ + bacs_debit: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + """ + bancontact: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + """ + blik: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsBlik" + ] + """ + If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + """ + boleto: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsBoleto" + ] + """ + If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + """ + card: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCard" + ] + """ + Configuration for any card payments attempted on this PaymentIntent. + """ + card_present: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCardPresent" + ] + """ + If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ + cashapp: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCashapp" + ] + """ + If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + """ + customer_balance: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCustomerBalance" + ] + """ + If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + """ + eps: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsEps" + ] + """ + If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + """ + fpx: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsFpx" + ] + """ + If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + """ + giropay: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsGiropay" + ] + """ + If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + """ + grabpay: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsGrabpay" + ] + """ + If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + """ + ideal: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsIdeal" + ] + """ + If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + """ + interac_present: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsInteracPresent" + ] + """ + If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ + klarna: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsKlarna" + ] + """ + If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + """ + konbini: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsKonbini" + ] + """ + If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + """ + link: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsLink" + ] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ + oxxo: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsOxxo" + ] + """ + If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + """ + p24: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsP24" + ] + """ + If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + """ + paynow: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPaynow" + ] + """ + If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + """ + paypal: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPaypal" + ] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ + pix: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPix" + ] + """ + If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + """ + promptpay: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + """ + revolut_pay: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Demo Pay payment method options. + """ + sepa_debit: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ + sofort: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsSofort" + ] + """ + If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + """ + us_bank_account: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccount" + ] + """ + If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + """ + wechat_pay: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsWechatPay" + ] + """ + If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + """ + zip: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsZip" + ] + """ + If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class CreateParamsPaymentMethodOptionsZip(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - 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`. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - networks: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - preferred_settlement_speed: NotRequired[ - "Literal['']|Literal['fastest', 'standard']" - ] - """ - Preferred transaction settlement speed - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + 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`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): + app_id: NotRequired["str"] + """ + The app ID registered with WeChat Pay. Only required when client is ios or android. + """ + client: Literal["android", "ios", "web"] + """ + The client type that the end customer will pay from + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - 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`. - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class CreateParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): - requested: NotRequired["List[Literal['ach', 'us_domestic_wire']]"] - """ - Triggers validations to run across the selected networks - """ + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - permissions: NotRequired[ - "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired["List[Literal['balances']]"] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired["str"] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ + class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): + financial_connections: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + networks: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountNetworks" + ] + """ + Additional fields for network related functions + """ + preferred_settlement_speed: NotRequired[ + "Literal['']|Literal['fastest', 'standard']" + ] + """ + Preferred transaction settlement speed + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsSofort(TypedDict): - preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" - ] - """ - Language shown to the payer on redirect. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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`. + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ + class CreateParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): + requested: NotRequired["List[Literal['ach', 'us_domestic_wire']]"] + """ + Triggers validations to run across the selected networks + """ - class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, + ): + permissions: NotRequired[ + "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired["List[Literal['balances']]"] + """ + List of data features that you would like to retrieve upon account creation. + """ + return_url: NotRequired["str"] + """ + For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class CreateParamsPaymentMethodOptionsSofort(TypedDict): + preferred_language: NotRequired[ + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + ] + """ + Language shown to the payer on redirect. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - 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`. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions( - TypedDict, - ): - pass + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ - class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class CreateParamsPaymentMethodOptionsPromptpay(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + 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`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): + pass - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - 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`. - """ + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - class CreateParamsPaymentMethodOptionsPix(TypedDict): - expires_after_seconds: NotRequired["int"] - """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. - """ - expires_at: NotRequired["int"] - """ - The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class CreateParamsPaymentMethodOptionsPromptpay(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - 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`. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class CreateParamsPaymentMethodOptionsPaypal(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. - """ - preferred_locale: NotRequired[ - "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-DE', 'de-LU', 'el-GR', 'en-GB', 'en-US', 'es-ES', 'fi-FI', 'fr-BE', 'fr-FR', 'fr-LU', 'hu-HU', 'it-IT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sk-SK', 'sv-SE']" - ] - """ - [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. - """ - reference: NotRequired["str"] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - risk_correlation_id: NotRequired["str"] - """ - The risk correlation ID for an on-session payment using a saved PayPal payment method. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + 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`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class CreateParamsPaymentMethodOptionsPix(TypedDict): + expires_after_seconds: NotRequired["int"] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ + expires_at: NotRequired["int"] + """ + The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - 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`. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class CreateParamsPaymentMethodOptionsPaynow(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + 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`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class CreateParamsPaymentMethodOptionsPaypal(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + """ + preferred_locale: NotRequired[ + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-DE', 'de-LU', 'el-GR', 'en-GB', 'en-US', 'es-ES', 'fi-FI', 'fr-BE', 'fr-FR', 'fr-LU', 'hu-HU', 'it-IT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sk-SK', 'sv-SE']" + ] + """ + [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + """ + reference: NotRequired["str"] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + risk_correlation_id: NotRequired["str"] + """ + The risk correlation ID for an on-session payment using a saved PayPal payment method. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - 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`. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class CreateParamsPaymentMethodOptionsP24(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + 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`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class CreateParamsPaymentMethodOptionsPaynow(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - 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`. - """ - tos_shown_and_accepted: NotRequired["bool"] - """ - Confirm that the payer has accepted the P24 terms and conditions. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class CreateParamsPaymentMethodOptionsOxxo(TypedDict): - expires_after_days: NotRequired["int"] - """ - The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + 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`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class CreateParamsPaymentMethodOptionsP24(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - 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`. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class CreateParamsPaymentMethodOptionsLink(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + 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`. + """ + tos_shown_and_accepted: NotRequired["bool"] + """ + Confirm that the payer has accepted the P24 terms and conditions. + """ - If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + class CreateParamsPaymentMethodOptionsOxxo(TypedDict): + expires_after_days: NotRequired["int"] + """ + The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. - """ - persistent_token: NotRequired["str"] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class CreateParamsPaymentMethodOptionsLink(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - class CreateParamsPaymentMethodOptionsKonbini(TypedDict): - confirmation_number: NotRequired["Literal['']|str"] - """ - An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. - """ - expires_after_days: NotRequired["Literal['']|int"] - """ - The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. - """ - expires_at: NotRequired["Literal['']|int"] - """ - The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. - """ - product_description: NotRequired["Literal['']|str"] - """ - A product descriptor of up to 22 characters, which will appear to customers at the convenience store. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + persistent_token: NotRequired["str"] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - 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`. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class CreateParamsPaymentMethodOptionsKlarna(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ + + class CreateParamsPaymentMethodOptionsKonbini(TypedDict): + confirmation_number: NotRequired["Literal['']|str"] + """ + An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + """ + expires_after_days: NotRequired["Literal['']|int"] + """ + The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + """ + expires_at: NotRequired["Literal['']|int"] + """ + The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + """ + product_description: NotRequired["Literal['']|str"] + """ + A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. - """ - preferred_locale: NotRequired[ - "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sv-FI', 'sv-SE']" - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + 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`. + """ - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + class CreateParamsPaymentMethodOptionsKlarna(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - 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 provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. - class CreateParamsPaymentMethodOptionsInteracPresent(TypedDict): - pass + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + preferred_locale: NotRequired[ + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sv-FI', 'sv-SE']" + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsIdeal(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class CreateParamsPaymentMethodOptionsInteracPresent(TypedDict): + pass + + class CreateParamsPaymentMethodOptionsIdeal(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsGiropay(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class CreateParamsPaymentMethodOptionsGiropay(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsFpx(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class CreateParamsPaymentMethodOptionsFpx(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsEps(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class CreateParamsPaymentMethodOptionsEps(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): - bank_transfer: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired["Literal['bank_transfer']"] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): + bank_transfer: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired["Literal['bank_transfer']"] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for the eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - "List[Literal['aba', 'iban', 'sepa', 'sort_code', 'spei', 'swift', 'zengin']]" - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ - class CreateParamsPaymentMethodOptionsCashapp(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, + ): + eu_bank_transfer: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for the eu_bank_transfer funding type. + """ + requested_address_types: NotRequired[ + "List[Literal['aba', 'iban', 'sepa', 'sort_code', 'spei', 'swift', 'zengin']]" + ] + """ + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + """ + type: Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + """ + The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, + ): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class CreateParamsPaymentMethodOptionsCashapp(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - When processing card payments, Stripe also uses `setup_future_usage` 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 provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. - 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsCardPresent(TypedDict): - request_extended_authorization: NotRequired["bool"] - """ - Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) - """ - request_incremental_authorization_support: NotRequired["bool"] - """ - Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. - """ - request_incremental_authorization: NotRequired[ - "Literal['if_available', 'never']" - ] - """ - This field was released by mistake and will be removed in the next major version - """ + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - class CreateParamsPaymentMethodOptionsCard(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + When processing card payments, Stripe also uses `setup_future_usage` 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 provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. - """ - cvc_token: NotRequired["str"] - """ - A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. - """ - installments: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments attempted on this PaymentIntent (Mexico Only). + class CreateParamsPaymentMethodOptionsCardPresent(TypedDict): + request_extended_authorization: NotRequired["bool"] + """ + Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + """ + request_incremental_authorization_support: NotRequired["bool"] + """ + Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + """ + request_incremental_authorization: NotRequired[ + "Literal['if_available', 'never']" + ] + """ + This field was released by mistake and will be removed in the next major version + """ - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - """ - mandate_options: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired["bool"] - """ - When specified, this parameter indicates that a transaction will be marked - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - "Literal['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'mastercard', 'unionpay', 'unknown', 'visa']" - ] - """ - Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. - """ - request_extended_authorization: NotRequired[ - "Literal['if_available', 'never']" - ] - """ - Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. - """ - request_incremental_authorization: NotRequired[ - "Literal['if_available', 'never']" - ] - """ - Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. - """ - request_multicapture: NotRequired[ - "Literal['if_available', 'never']" - ] - """ - Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. - """ - request_overcapture: NotRequired[ - "Literal['if_available', 'never']" - ] - """ - Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. - """ - request_three_d_secure: NotRequired["Literal['any', 'automatic']"] - """ - 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. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. - When processing card payments, Stripe also uses `setup_future_usage` 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + cvc_token: NotRequired["str"] + """ + A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + """ + installments: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodOptionsCardInstallments" + ] + """ + Installment configuration for payments attempted on this PaymentIntent (Mexico Only). - 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`. - """ - statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. - """ - statement_descriptor_suffix_kanji: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. - """ + For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + """ + mandate_options: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + moto: NotRequired["bool"] + """ + When specified, this parameter indicates that a transaction will be marked + as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + parameter can only be provided during confirmation. + """ + network: NotRequired[ + "Literal['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'mastercard', 'unionpay', 'unknown', 'visa']" + ] + """ + Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + """ + request_extended_authorization: NotRequired[ + "Literal['if_available', 'never']" + ] + """ + Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + """ + request_incremental_authorization: NotRequired[ + "Literal['if_available', 'never']" + ] + """ + Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + """ + request_multicapture: NotRequired["Literal['if_available', 'never']"] + """ + Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + """ + request_overcapture: NotRequired["Literal['if_available', 'never']"] + """ + Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + """ + request_three_d_secure: NotRequired["Literal['any', 'automatic']"] + """ + 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. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired["str"] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired["int"] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired["List[Literal['india']]"] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - class CreateParamsPaymentMethodOptionsCardInstallments(TypedDict): - enabled: NotRequired["bool"] - """ - Setting to true enables installments for this PaymentIntent. - This will cause the response to contain a list of available installment plans. - Setting to false will prevent any selected plan from applying to a charge. - """ - plan: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCardInstallmentsPlan" - ] - """ - The selected installment plan to use for this payment attempt. - This parameter can only be provided during confirmation. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class CreateParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: int - """ - For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. - """ - interval: Literal["month"] - """ - For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["fixed_count"] - """ - Type of installment plan, one of `fixed_count`. - """ + 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`. + """ + statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + """ + statement_descriptor_suffix_kanji: NotRequired["Literal['']|str"] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + """ - class CreateParamsPaymentMethodOptionsBoleto(TypedDict): - expires_after_days: NotRequired["int"] - """ - The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class CreateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): + amount: int + """ + Amount to be charged for future payments. + """ + amount_type: Literal["fixed", "maximum"] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired["str"] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired["int"] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + interval: Literal["day", "month", "sporadic", "week", "year"] + """ + Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + """ + reference: str + """ + Unique identifier for the mandate or subscription. + """ + start_date: int + """ + Start date of the mandate or subscription. Start date should not be lesser than yesterday. + """ + supported_types: NotRequired["List[Literal['india']]"] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class CreateParamsPaymentMethodOptionsCardInstallments(TypedDict): + enabled: NotRequired["bool"] + """ + Setting to true enables installments for this PaymentIntent. + This will cause the response to contain a list of available installment plans. + Setting to false will prevent any selected plan from applying to a charge. + """ + plan: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCardInstallmentsPlan" + ] + """ + The selected installment plan to use for this payment attempt. + This parameter can only be provided during confirmation. + """ - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + class CreateParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): + count: int + """ + For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + """ + interval: Literal["month"] + """ + For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + One of `month`. + """ + type: Literal["fixed_count"] + """ + Type of installment plan, one of `fixed_count`. + """ - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ + class CreateParamsPaymentMethodOptionsBoleto(TypedDict): + expires_after_days: NotRequired["int"] + """ + The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsBlik(TypedDict): - code: NotRequired["str"] - """ - The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. - """ + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - class CreateParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']"] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + 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`. + """ - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + class CreateParamsPaymentMethodOptionsBlik(TypedDict): + code: NotRequired["str"] + """ + The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + """ - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ + class CreateParamsPaymentMethodOptionsBancontact(TypedDict): + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']"] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ + class CreateParamsPaymentMethodOptionsAlipay(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + When processing card payments, Stripe also uses `setup_future_usage` 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. - """ - reference: NotRequired["str"] - """ - An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. - This field differs from the statement descriptor and item name. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + 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`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - When processing card payments, Stripe also uses `setup_future_usage` 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 provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. - 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + reference: NotRequired["str"] + """ + An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + This field differs from the statement descriptor and item name. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsAffirm(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + When processing card payments, Stripe also uses `setup_future_usage` 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. - """ - preferred_locale: NotRequired["str"] - """ - Preferred language of the Affirm authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + 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`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class CreateParamsPaymentMethodOptionsAffirm(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - When processing card payments, Stripe also uses `setup_future_usage` 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 provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. - 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 `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + preferred_locale: NotRequired["str"] + """ + Preferred language of the Affirm authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - interval_description: NotRequired["str"] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - "Literal['combined', 'interval', 'sporadic']" - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired["Literal['business', 'personal']"] - """ - Transaction type of the mandate. - """ + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - class CreateParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - au_becs_debit: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billing_details: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataBlik" - ] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - customer_balance: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - grabpay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - ideal: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataIdeal" - ] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - klarna: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - link: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataLink" - ] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - 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`. - """ - oxxo: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataOxxo" - ] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - paynow: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - pix: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - radar_options: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - revolut_pay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - sepa_debit: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - sofort: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "blik", - "boleto", - "cashapp", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "klarna", - "konbini", - "link", - "oxxo", - "p24", - "paynow", - "paypal", - "pix", - "promptpay", - "revolut_pay", - "sepa_debit", - "sofort", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class CreateParamsPaymentMethodDataZip(TypedDict): - pass + 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`. + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class CreateParamsPaymentMethodDataWechatPay(TypedDict): - pass + class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + interval_description: NotRequired["str"] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']" + ] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired["Literal['business', 'personal']"] + """ + Transaction type of the mandate. + """ - class CreateParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - Account holder type: individual or company. - """ - account_number: NotRequired["str"] - """ - Account number of the bank account. - """ - account_type: NotRequired["Literal['checking', 'savings']"] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired["str"] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired["str"] - """ - Routing number of the bank account. - """ + class CreateParamsPaymentMethodData(TypedDict): + acss_debit: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataAcssDebit" + ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataAffirm" + ] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataAlipay" + ] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + au_becs_debit: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataAuBecsDebit" + ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billing_details: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataBoleto" + ] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + cashapp: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataCashapp" + ] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + customer_balance: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + fpx: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataGiropay" + ] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + grabpay: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataGrabpay" + ] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + ideal: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + klarna: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataKlarna" + ] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataKonbini" + ] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + link: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + 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`. + """ + oxxo: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + paynow: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataPaynow" + ] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataPaypal" + ] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + pix: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + radar_options: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataRadarOptions" + ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + revolut_pay: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataRevolutPay" + ] + """ + If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + sepa_debit: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + sofort: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataSofort" + ] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + type: Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay", + "zip", + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataUsBankAccount" + ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataWechatPay" + ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ - class CreateParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ + class CreateParamsPaymentMethodDataZip(TypedDict): + pass - class CreateParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ + class CreateParamsPaymentMethodDataWechatPay(TypedDict): + pass - class CreateParamsPaymentMethodDataRevolutPay(TypedDict): - pass + class CreateParamsPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + Account holder type: individual or company. + """ + account_number: NotRequired["str"] + """ + Account number of the bank account. + """ + account_type: NotRequired["Literal['checking', 'savings']"] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired["str"] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired["str"] + """ + Routing number of the bank account. + """ - class CreateParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired["str"] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ + class CreateParamsPaymentMethodDataSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ - class CreateParamsPaymentMethodDataPromptpay(TypedDict): - pass + class CreateParamsPaymentMethodDataSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ - class CreateParamsPaymentMethodDataPix(TypedDict): - pass + class CreateParamsPaymentMethodDataRevolutPay(TypedDict): + pass - class CreateParamsPaymentMethodDataPaypal(TypedDict): - pass + class CreateParamsPaymentMethodDataRadarOptions(TypedDict): + session: NotRequired["str"] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ - class CreateParamsPaymentMethodDataPaynow(TypedDict): - pass + class CreateParamsPaymentMethodDataPromptpay(TypedDict): + pass - class CreateParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']" - ] - """ - The customer's bank. - """ + class CreateParamsPaymentMethodDataPix(TypedDict): + pass - class CreateParamsPaymentMethodDataOxxo(TypedDict): - pass + class CreateParamsPaymentMethodDataPaypal(TypedDict): + pass - class CreateParamsPaymentMethodDataLink(TypedDict): - pass + class CreateParamsPaymentMethodDataPaynow(TypedDict): + pass - class CreateParamsPaymentMethodDataKonbini(TypedDict): - pass + class CreateParamsPaymentMethodDataP24(TypedDict): + bank: NotRequired[ + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']" + ] + """ + The customer's bank. + """ - class CreateParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ + class CreateParamsPaymentMethodDataOxxo(TypedDict): + pass - class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ + class CreateParamsPaymentMethodDataLink(TypedDict): + pass - class CreateParamsPaymentMethodDataInteracPresent(TypedDict): - pass + class CreateParamsPaymentMethodDataKonbini(TypedDict): + pass - class CreateParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - "Literal['abn_amro', 'asn_bank', 'bunq', 'handelsbanken', 'ing', 'knab', 'moneyou', 'n26', 'rabobank', 'regiobank', 'revolut', 'sns_bank', 'triodos_bank', 'van_lanschot', 'yoursafe']" - ] - """ - The customer's bank. - """ + class CreateParamsPaymentMethodDataKlarna(TypedDict): + dob: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataKlarnaDob" + ] + """ + Customer's date of birth + """ - class CreateParamsPaymentMethodDataGrabpay(TypedDict): - pass + class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ - class CreateParamsPaymentMethodDataGiropay(TypedDict): - pass + class CreateParamsPaymentMethodDataInteracPresent(TypedDict): + pass - class CreateParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ + class CreateParamsPaymentMethodDataIdeal(TypedDict): + bank: NotRequired[ + "Literal['abn_amro', 'asn_bank', 'bunq', 'handelsbanken', 'ing', 'knab', 'moneyou', 'n26', 'rabobank', 'regiobank', 'revolut', 'sns_bank', 'triodos_bank', 'van_lanschot', 'yoursafe']" + ] + """ + The customer's bank. + """ - class CreateParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - "Literal['arzte_und_apotheker_bank', 'austrian_anadi_bank_ag', 'bank_austria', 'bankhaus_carl_spangler', 'bankhaus_schelhammer_und_schattera_ag', 'bawag_psk_ag', 'bks_bank_ag', 'brull_kallmus_bank_ag', 'btv_vier_lander_bank', 'capital_bank_grawe_gruppe_ag', 'deutsche_bank_ag', 'dolomitenbank', 'easybank_ag', 'erste_bank_und_sparkassen', 'hypo_alpeadriabank_international_ag', 'hypo_bank_burgenland_aktiengesellschaft', 'hypo_noe_lb_fur_niederosterreich_u_wien', 'hypo_oberosterreich_salzburg_steiermark', 'hypo_tirol_bank_ag', 'hypo_vorarlberg_bank_ag', 'marchfelder_bank', 'oberbank_ag', 'raiffeisen_bankengruppe_osterreich', 'schoellerbank_ag', 'sparda_bank_wien', 'volksbank_gruppe', 'volkskreditbank_ag', 'vr_bank_braunau']" - ] - """ - The customer's bank. - """ + class CreateParamsPaymentMethodDataGrabpay(TypedDict): + pass - class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): - pass + class CreateParamsPaymentMethodDataGiropay(TypedDict): + pass - class CreateParamsPaymentMethodDataCashapp(TypedDict): - pass + class CreateParamsPaymentMethodDataFpx(TypedDict): + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ - class CreateParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ + class CreateParamsPaymentMethodDataEps(TypedDict): + bank: NotRequired[ + "Literal['arzte_und_apotheker_bank', 'austrian_anadi_bank_ag', 'bank_austria', 'bankhaus_carl_spangler', 'bankhaus_schelhammer_und_schattera_ag', 'bawag_psk_ag', 'bks_bank_ag', 'brull_kallmus_bank_ag', 'btv_vier_lander_bank', 'capital_bank_grawe_gruppe_ag', 'deutsche_bank_ag', 'dolomitenbank', 'easybank_ag', 'erste_bank_und_sparkassen', 'hypo_alpeadriabank_international_ag', 'hypo_bank_burgenland_aktiengesellschaft', 'hypo_noe_lb_fur_niederosterreich_u_wien', 'hypo_oberosterreich_salzburg_steiermark', 'hypo_tirol_bank_ag', 'hypo_vorarlberg_bank_ag', 'marchfelder_bank', 'oberbank_ag', 'raiffeisen_bankengruppe_osterreich', 'schoellerbank_ag', 'sparda_bank_wien', 'volksbank_gruppe', 'volkskreditbank_ag', 'vr_bank_braunau']" + ] + """ + The customer's bank. + """ - class CreateParamsPaymentMethodDataBlik(TypedDict): - pass + class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): + pass - class CreateParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ + class CreateParamsPaymentMethodDataCashapp(TypedDict): + pass - class CreateParamsPaymentMethodDataBillingDetailsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsPaymentMethodDataBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ - class CreateParamsPaymentMethodDataBancontact(TypedDict): - pass + class CreateParamsPaymentMethodDataBlik(TypedDict): + pass - class CreateParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired["str"] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired["str"] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ + class CreateParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ - class CreateParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ + class CreateParamsPaymentMethodDataBillingDetailsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreateParamsPaymentMethodDataAlipay(TypedDict): - pass + class CreateParamsPaymentMethodDataBancontact(TypedDict): + pass - class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass + class CreateParamsPaymentMethodDataBacsDebit(TypedDict): + account_number: NotRequired["str"] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired["str"] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ - class CreateParamsPaymentMethodDataAffirm(TypedDict): - pass + class CreateParamsPaymentMethodDataAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ - class CreateParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ + class CreateParamsPaymentMethodDataAlipay(TypedDict): + pass - class CreateParamsMandateData(TypedDict): - customer_acceptance: "PaymentIntent.CreateParamsMandateDataCustomerAcceptance" - """ - This hash contains details about the customer acceptance of the Mandate. - """ + class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): + pass - class CreateParamsMandateDataCustomerAcceptance(TypedDict): - accepted_at: NotRequired["int"] - """ - The time at which the customer accepted the Mandate. - """ - offline: NotRequired[ - "PaymentIntent.CreateParamsMandateDataCustomerAcceptanceOffline" - ] - """ - If this is a Mandate accepted offline, this hash contains details about the offline acceptance. - """ - online: NotRequired[ - "PaymentIntent.CreateParamsMandateDataCustomerAcceptanceOnline" - ] - """ - If this is a Mandate accepted online, this hash contains details about the online acceptance. - """ - type: Literal["offline", "online"] - """ - The type of customer acceptance information included with the Mandate. One of `online` or `offline`. - """ + class CreateParamsPaymentMethodDataAffirm(TypedDict): + pass - class CreateParamsMandateDataCustomerAcceptanceOnline(TypedDict): - ip_address: str - """ - The IP address from which the Mandate was accepted by the customer. - """ - user_agent: str - """ - The user agent of the browser from which the Mandate was accepted by the customer. - """ + class CreateParamsPaymentMethodDataAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ - class CreateParamsMandateDataCustomerAcceptanceOffline(TypedDict): - pass + class CreateParamsMandateData(TypedDict): + customer_acceptance: "PaymentIntent.CreateParamsMandateDataCustomerAcceptance" + """ + This hash contains details about the customer acceptance of the Mandate. + """ - class CreateParamsAutomaticPaymentMethods(TypedDict): - allow_redirects: NotRequired["Literal['always', 'never']"] - """ - Controls whether this PaymentIntent will accept redirect-based payment methods. + class CreateParamsMandateDataCustomerAcceptance(TypedDict): + accepted_at: NotRequired["int"] + """ + The time at which the customer accepted the Mandate. + """ + offline: NotRequired[ + "PaymentIntent.CreateParamsMandateDataCustomerAcceptanceOffline" + ] + """ + If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + """ + online: NotRequired[ + "PaymentIntent.CreateParamsMandateDataCustomerAcceptanceOnline" + ] + """ + If this is a Mandate accepted online, this hash contains details about the online acceptance. + """ + type: Literal["offline", "online"] + """ + The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + """ - Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. - """ - enabled: bool - """ - Whether this feature is enabled. - """ + class CreateParamsMandateDataCustomerAcceptanceOnline(TypedDict): + ip_address: str + """ + The IP address from which the Mandate was accepted by the customer. + """ + user_agent: str + """ + The user agent of the browser from which the Mandate was accepted by the customer. + """ - class IncrementAuthorizationParams(RequestOptions): - amount: int - """ - The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. - """ - application_fee_amount: NotRequired["int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired["List[str]"] - """ - 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`. - """ - statement_descriptor: NotRequired["str"] - """ - For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. - """ - transfer_data: NotRequired[ - "PaymentIntent.IncrementAuthorizationParamsTransferData" - ] - """ - The parameters used to automatically create a transfer after the payment is captured. - Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ + class CreateParamsMandateDataCustomerAcceptanceOffline(TypedDict): + pass - class IncrementAuthorizationParamsTransferData(TypedDict): - amount: NotRequired["int"] - """ - The amount that will be transferred automatically when a charge succeeds. - """ + class CreateParamsAutomaticPaymentMethods(TypedDict): + allow_redirects: NotRequired["Literal['always', 'never']"] + """ + Controls whether this PaymentIntent will accept redirect-based payment methods. - class ListParams(RequestOptions): - created: NotRequired["PaymentIntent.ListParamsCreated|int"] - """ - A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. - """ - customer: NotRequired["str"] - """ - Only return PaymentIntents for the customer that this customer ID specifies. - """ - 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. - """ + Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. + """ + enabled: bool + """ + Whether this feature is enabled. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class IncrementAuthorizationParams(RequestOptions): + amount: int + """ + The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. + """ + application_fee_amount: NotRequired["int"] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired["List[str]"] + """ + 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`. + """ + statement_descriptor: NotRequired["str"] + """ + For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + """ + transfer_data: NotRequired[ + "PaymentIntent.IncrementAuthorizationParamsTransferData" + ] + """ + The parameters used to automatically create a transfer after the payment is captured. + Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ - class ModifyParams(RequestOptions): - amount: NotRequired["int"] - """ - Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - """ - application_fee_amount: NotRequired["Literal['']|int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - capture_method: NotRequired[ - "Literal['automatic', 'automatic_async', 'manual']" - ] - """ - Controls when the funds will be captured from the customer's account. - """ - currency: NotRequired["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). - """ - customer: NotRequired["str"] - """ - ID of the Customer this PaymentIntent belongs to, if one exists. + class IncrementAuthorizationParamsTransferData(TypedDict): + amount: NotRequired["int"] + """ + The amount that will be transferred automatically when a charge succeeds. + """ - Payment methods attached to other Customers cannot be used with this PaymentIntent. + class ListParams(RequestOptions): + created: NotRequired["PaymentIntent.ListParamsCreated|int"] + """ + A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. + """ + customer: NotRequired["str"] + """ + Only return PaymentIntents for the customer that this customer ID specifies. + """ + 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. + """ - 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. - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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: 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. - """ - payment_method_configuration: NotRequired["str"] - """ - The ID of the payment method configuration to use with this PaymentIntent. - """ - payment_method_data: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodData" - ] - """ - If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - property on the PaymentIntent. - """ - payment_method_options: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptions" - ] - """ - Payment-method-specific configuration for this PaymentIntent. - """ - payment_method_types: NotRequired["List[str]"] - """ - The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). - """ - receipt_email: NotRequired["Literal['']|str"] - """ - Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class ModifyParams(RequestOptions): + amount: NotRequired["int"] + """ + Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + """ + application_fee_amount: NotRequired["Literal['']|int"] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + capture_method: NotRequired[ + "Literal['automatic', 'automatic_async', 'manual']" + ] + """ + Controls when the funds will be captured from the customer's account. + """ + currency: NotRequired["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). + """ + customer: NotRequired["str"] + """ + ID of the Customer this PaymentIntent belongs to, if one exists. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + Payment methods attached to other Customers cannot be used with this PaymentIntent. - 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`. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsShipping" - ] - """ - Shipping information for this PaymentIntent. - """ - statement_descriptor: NotRequired["str"] - """ - For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. - """ - 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. - """ - transfer_data: NotRequired[ - "PaymentIntent.ModifyParamsTransferData" - ] - """ - Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - transfer_group: NotRequired["str"] - """ - A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ + 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. + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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: 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. + """ + payment_method_configuration: NotRequired["str"] + """ + The ID of the payment method configuration to use with this PaymentIntent. + """ + payment_method_data: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodData" + ] + """ + If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + property on the PaymentIntent. + """ + payment_method_options: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodOptions" + ] + """ + Payment-method-specific configuration for this PaymentIntent. + """ + payment_method_types: NotRequired["List[str]"] + """ + The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + """ + receipt_email: NotRequired["Literal['']|str"] + """ + Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - class ModifyParamsTransferData(TypedDict): - amount: NotRequired["int"] - """ - The amount that will be transferred automatically when a charge succeeds. - """ + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - class ModifyParamsShipping(TypedDict): - address: "PaymentIntent.ModifyParamsShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired["str"] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired["str"] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired["str"] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class ModifyParamsShippingAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + 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`. + """ + shipping: NotRequired["Literal['']|PaymentIntent.ModifyParamsShipping"] + """ + Shipping information for this PaymentIntent. + """ + statement_descriptor: NotRequired["str"] + """ + For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + """ + 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. + """ + transfer_data: NotRequired["PaymentIntent.ModifyParamsTransferData"] + """ + Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + transfer_group: NotRequired["str"] + """ + A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + + class ModifyParamsTransferData(TypedDict): + amount: NotRequired["int"] + """ + The amount that will be transferred automatically when a charge succeeds. + """ + + class ModifyParamsShipping(TypedDict): + address: "PaymentIntent.ModifyParamsShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired["str"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: str + """ + Recipient name. + """ + phone: NotRequired["str"] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired["str"] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ - class ModifyParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. - """ - affirm: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. - """ - afterpay_clearpay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAfterpayClearpay" - ] - """ - If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. - """ - alipay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAlipay" - ] - """ - If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. - """ - au_becs_debit: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAuBecsDebit" - ] - """ - If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. - """ - bacs_debit: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. - """ - bancontact: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. - """ - blik: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsBlik" - ] - """ - If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. - """ - boleto: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. - """ - card: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card payments attempted on this PaymentIntent. - """ - card_present: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCardPresent" - ] - """ - If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - cashapp: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. - """ - customer_balance: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCustomerBalance" - ] - """ - If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. - """ - eps: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsEps" - ] - """ - If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. - """ - fpx: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsFpx" - ] - """ - If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. - """ - giropay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. - """ - grabpay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. - """ - ideal: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsIdeal" - ] - """ - If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. - """ - interac_present: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsInteracPresent" - ] - """ - If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - klarna: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. - """ - konbini: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. - """ - link: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsLink" - ] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - oxxo: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsOxxo" - ] - """ - If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. - """ - p24: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsP24" - ] - """ - If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. - """ - paynow: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. - """ - paypal: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - pix: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPix" - ] - """ - If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. - """ - promptpay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. - """ - revolut_pay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Demo Pay payment method options. - """ - sepa_debit: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - sofort: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsSofort" - ] - """ - If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. - """ - us_bank_account: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. - """ - wechat_pay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsWechatPay" - ] - """ - If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. - """ - zip: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsZip" - ] - """ - If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. - """ + class ModifyParamsShippingAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ModifyParamsPaymentMethodOptionsZip(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAcssDebit" + ] + """ + If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + """ + affirm: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAffirm" + ] + """ + If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + """ + afterpay_clearpay: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAfterpayClearpay" + ] + """ + If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + """ + alipay: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAlipay" + ] + """ + If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + """ + au_becs_debit: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAuBecsDebit" + ] + """ + If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + """ + bacs_debit: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + """ + bancontact: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + """ + blik: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsBlik" + ] + """ + If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + """ + boleto: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsBoleto" + ] + """ + If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + """ + card: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCard" + ] + """ + Configuration for any card payments attempted on this PaymentIntent. + """ + card_present: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCardPresent" + ] + """ + If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ + cashapp: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCashapp" + ] + """ + If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + """ + customer_balance: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCustomerBalance" + ] + """ + If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + """ + eps: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsEps" + ] + """ + If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + """ + fpx: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsFpx" + ] + """ + If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + """ + giropay: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsGiropay" + ] + """ + If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + """ + grabpay: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsGrabpay" + ] + """ + If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + """ + ideal: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsIdeal" + ] + """ + If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + """ + interac_present: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsInteracPresent" + ] + """ + If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ + klarna: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsKlarna" + ] + """ + If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + """ + konbini: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsKonbini" + ] + """ + If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + """ + link: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsLink" + ] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ + oxxo: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsOxxo" + ] + """ + If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + """ + p24: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsP24" + ] + """ + If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + """ + paynow: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPaynow" + ] + """ + If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + """ + paypal: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPaypal" + ] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ + pix: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPix" + ] + """ + If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + """ + promptpay: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + """ + revolut_pay: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Demo Pay payment method options. + """ + sepa_debit: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ + sofort: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsSofort" + ] + """ + If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + """ + us_bank_account: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccount" + ] + """ + If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + """ + wechat_pay: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsWechatPay" + ] + """ + If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + """ + zip: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsZip" + ] + """ + If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class ModifyParamsPaymentMethodOptionsZip(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - 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`. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class ModifyParamsPaymentMethodOptionsWechatPay(TypedDict): - app_id: NotRequired["str"] - """ - The app ID registered with WeChat Pay. Only required when client is ios or android. - """ - client: Literal["android", "ios", "web"] - """ - The client type that the end customer will pay from - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + 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`. + """ - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + class ModifyParamsPaymentMethodOptionsWechatPay(TypedDict): + app_id: NotRequired["str"] + """ + The app ID registered with WeChat Pay. Only required when client is ios or android. + """ + client: Literal["android", "ios", "web"] + """ + The client type that the end customer will pay from + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - 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`. - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - class ModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - networks: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - preferred_settlement_speed: NotRequired[ - "Literal['']|Literal['fastest', 'standard']" - ] - """ - Preferred transaction settlement speed - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ + + class ModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): + financial_connections: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + networks: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountNetworks" + ] + """ + Additional fields for network related functions + """ + preferred_settlement_speed: NotRequired[ + "Literal['']|Literal['fastest', 'standard']" + ] + """ + Preferred transaction settlement speed + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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`. - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + 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`. + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class ModifyParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): - requested: NotRequired["List[Literal['ach', 'us_domestic_wire']]"] - """ - Triggers validations to run across the selected networks - """ + class ModifyParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): + requested: NotRequired["List[Literal['ach', 'us_domestic_wire']]"] + """ + Triggers validations to run across the selected networks + """ - class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - permissions: NotRequired[ - "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired["List[Literal['balances']]"] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired["str"] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ + class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, + ): + permissions: NotRequired[ + "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired["List[Literal['balances']]"] + """ + List of data features that you would like to retrieve upon account creation. + """ + return_url: NotRequired["str"] + """ + For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + """ - class ModifyParamsPaymentMethodOptionsSofort(TypedDict): - preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" - ] - """ - Language shown to the payer on redirect. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsSofort(TypedDict): + preferred_language: NotRequired[ + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + ] + """ + Language shown to the payer on redirect. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions( - TypedDict, - ): - pass + class ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): + pass - class ModifyParamsPaymentMethodOptionsRevolutPay(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsRevolutPay(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - """ + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ - class ModifyParamsPaymentMethodOptionsPromptpay(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsPromptpay(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsPix(TypedDict): - expires_after_seconds: NotRequired["int"] - """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. - """ - expires_at: NotRequired["int"] - """ - The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsPix(TypedDict): + expires_after_seconds: NotRequired["int"] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ + expires_at: NotRequired["int"] + """ + The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsPaypal(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. - """ - preferred_locale: NotRequired[ - "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-DE', 'de-LU', 'el-GR', 'en-GB', 'en-US', 'es-ES', 'fi-FI', 'fr-BE', 'fr-FR', 'fr-LU', 'hu-HU', 'it-IT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sk-SK', 'sv-SE']" - ] - """ - [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. - """ - reference: NotRequired["str"] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - risk_correlation_id: NotRequired["str"] - """ - The risk correlation ID for an on-session payment using a saved PayPal payment method. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsPaypal(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + """ + preferred_locale: NotRequired[ + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-DE', 'de-LU', 'el-GR', 'en-GB', 'en-US', 'es-ES', 'fi-FI', 'fr-BE', 'fr-FR', 'fr-LU', 'hu-HU', 'it-IT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sk-SK', 'sv-SE']" + ] + """ + [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + """ + reference: NotRequired["str"] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + risk_correlation_id: NotRequired["str"] + """ + The risk correlation ID for an on-session payment using a saved PayPal payment method. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsPaynow(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsPaynow(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsP24(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsP24(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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`. - """ - tos_shown_and_accepted: NotRequired["bool"] - """ - Confirm that the payer has accepted the P24 terms and conditions. - """ + 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`. + """ + tos_shown_and_accepted: NotRequired["bool"] + """ + Confirm that the payer has accepted the P24 terms and conditions. + """ - class ModifyParamsPaymentMethodOptionsOxxo(TypedDict): - expires_after_days: NotRequired["int"] - """ - The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsOxxo(TypedDict): + expires_after_days: NotRequired["int"] + """ + The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsLink(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + class ModifyParamsPaymentMethodOptionsLink(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter will override the top-level `capture_method` 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 will unset the stored value for this payment method type. - """ - persistent_token: NotRequired["str"] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + persistent_token: NotRequired["str"] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsKonbini(TypedDict): - confirmation_number: NotRequired["Literal['']|str"] - """ - An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. - """ - expires_after_days: NotRequired["Literal['']|int"] - """ - The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. - """ - expires_at: NotRequired["Literal['']|int"] - """ - The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. - """ - product_description: NotRequired["Literal['']|str"] - """ - A product descriptor of up to 22 characters, which will appear to customers at the convenience store. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsKonbini(TypedDict): + confirmation_number: NotRequired["Literal['']|str"] + """ + An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + """ + expires_after_days: NotRequired["Literal['']|int"] + """ + The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + """ + expires_at: NotRequired["Literal['']|int"] + """ + The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + """ + product_description: NotRequired["Literal['']|str"] + """ + A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsKlarna(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + class ModifyParamsPaymentMethodOptionsKlarna(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter will override the top-level `capture_method` 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 will unset the stored value for this payment method type. - """ - preferred_locale: NotRequired[ - "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sv-FI', 'sv-SE']" - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + preferred_locale: NotRequired[ + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sv-FI', 'sv-SE']" + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsInteracPresent(TypedDict): - pass + class ModifyParamsPaymentMethodOptionsInteracPresent(TypedDict): + pass - class ModifyParamsPaymentMethodOptionsIdeal(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsIdeal(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsGrabpay(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsGrabpay(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsGiropay(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsGiropay(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsFpx(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsFpx(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsEps(TypedDict): - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsEps(TypedDict): + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsCustomerBalance(TypedDict): - bank_transfer: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired["Literal['bank_transfer']"] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsCustomerBalance(TypedDict): + bank_transfer: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired["Literal['bank_transfer']"] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for the eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - "List[Literal['aba', 'iban', 'sepa', 'sort_code', 'spei', 'swift', 'zengin']]" - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + class ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, + ): + eu_bank_transfer: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for the eu_bank_transfer funding type. + """ + requested_address_types: NotRequired[ + "List[Literal['aba', 'iban', 'sepa', 'sort_code', 'spei', 'swift', 'zengin']]" + ] + """ + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + """ + type: Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + """ + The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ - class ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ + class ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, + ): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ - class ModifyParamsPaymentMethodOptionsCashapp(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + class ModifyParamsPaymentMethodOptionsCashapp(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter will override the top-level `capture_method` 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 will unset the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsCardPresent(TypedDict): - request_extended_authorization: NotRequired["bool"] - """ - Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) - """ - request_incremental_authorization_support: NotRequired["bool"] - """ - Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. - """ - request_incremental_authorization: NotRequired[ - "Literal['if_available', 'never']" - ] - """ - This field was released by mistake and will be removed in the next major version - """ + class ModifyParamsPaymentMethodOptionsCardPresent(TypedDict): + request_extended_authorization: NotRequired["bool"] + """ + Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + """ + request_incremental_authorization_support: NotRequired["bool"] + """ + Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + """ + request_incremental_authorization: NotRequired[ + "Literal['if_available', 'never']" + ] + """ + This field was released by mistake and will be removed in the next major version + """ - class ModifyParamsPaymentMethodOptionsCard(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + class ModifyParamsPaymentMethodOptionsCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter will override the top-level `capture_method` 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 will unset the stored value for this payment method type. - """ - cvc_token: NotRequired["str"] - """ - A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. - """ - installments: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments attempted on this PaymentIntent (Mexico Only). + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + cvc_token: NotRequired["str"] + """ + A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + """ + installments: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodOptionsCardInstallments" + ] + """ + Installment configuration for payments attempted on this PaymentIntent (Mexico Only). - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - """ - mandate_options: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired["bool"] - """ - When specified, this parameter indicates that a transaction will be marked - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - "Literal['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'mastercard', 'unionpay', 'unknown', 'visa']" - ] - """ - Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. - """ - request_extended_authorization: NotRequired[ - "Literal['if_available', 'never']" - ] - """ - Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. - """ - request_incremental_authorization: NotRequired[ - "Literal['if_available', 'never']" - ] - """ - Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. - """ - request_multicapture: NotRequired[ - "Literal['if_available', 'never']" - ] - """ - Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. - """ - request_overcapture: NotRequired[ - "Literal['if_available', 'never']" - ] - """ - Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. - """ - request_three_d_secure: NotRequired["Literal['any', 'automatic']"] - """ - 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. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + """ + mandate_options: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + moto: NotRequired["bool"] + """ + When specified, this parameter indicates that a transaction will be marked + as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + parameter can only be provided during confirmation. + """ + network: NotRequired[ + "Literal['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'mastercard', 'unionpay', 'unknown', 'visa']" + ] + """ + Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + """ + request_extended_authorization: NotRequired[ + "Literal['if_available', 'never']" + ] + """ + Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + """ + request_incremental_authorization: NotRequired[ + "Literal['if_available', 'never']" + ] + """ + Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + """ + request_multicapture: NotRequired["Literal['if_available', 'never']"] + """ + Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + """ + request_overcapture: NotRequired["Literal['if_available', 'never']"] + """ + Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + """ + request_three_d_secure: NotRequired["Literal['any', 'automatic']"] + """ + 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. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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`. - """ - statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. - """ - statement_descriptor_suffix_kanji: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. - """ + 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`. + """ + statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + """ + statement_descriptor_suffix_kanji: NotRequired["Literal['']|str"] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + """ - class ModifyParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired["str"] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired["int"] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired["List[Literal['india']]"] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ + class ModifyParamsPaymentMethodOptionsCardMandateOptions(TypedDict): + amount: int + """ + Amount to be charged for future payments. + """ + amount_type: Literal["fixed", "maximum"] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired["str"] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired["int"] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + interval: Literal["day", "month", "sporadic", "week", "year"] + """ + Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + """ + reference: str + """ + Unique identifier for the mandate or subscription. + """ + start_date: int + """ + Start date of the mandate or subscription. Start date should not be lesser than yesterday. + """ + supported_types: NotRequired["List[Literal['india']]"] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ - class ModifyParamsPaymentMethodOptionsCardInstallments(TypedDict): - enabled: NotRequired["bool"] - """ - Setting to true enables installments for this PaymentIntent. - This will cause the response to contain a list of available installment plans. - Setting to false will prevent any selected plan from applying to a charge. - """ - plan: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCardInstallmentsPlan" - ] - """ - The selected installment plan to use for this payment attempt. - This parameter can only be provided during confirmation. - """ + class ModifyParamsPaymentMethodOptionsCardInstallments(TypedDict): + enabled: NotRequired["bool"] + """ + Setting to true enables installments for this PaymentIntent. + This will cause the response to contain a list of available installment plans. + Setting to false will prevent any selected plan from applying to a charge. + """ + plan: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCardInstallmentsPlan" + ] + """ + The selected installment plan to use for this payment attempt. + This parameter can only be provided during confirmation. + """ - class ModifyParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: int - """ - For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. - """ - interval: Literal["month"] - """ - For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["fixed_count"] - """ - Type of installment plan, one of `fixed_count`. - """ + class ModifyParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): + count: int + """ + For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + """ + interval: Literal["month"] + """ + For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + One of `month`. + """ + type: Literal["fixed_count"] + """ + Type of installment plan, one of `fixed_count`. + """ - class ModifyParamsPaymentMethodOptionsBoleto(TypedDict): - expires_after_days: NotRequired["int"] - """ - The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsBoleto(TypedDict): + expires_after_days: NotRequired["int"] + """ + The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsBlik(TypedDict): - code: NotRequired["str"] - """ - The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. - """ + class ModifyParamsPaymentMethodOptionsBlik(TypedDict): + code: NotRequired["str"] + """ + The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + """ - class ModifyParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']"] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsBancontact(TypedDict): + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']"] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsAuBecsDebit(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsAuBecsDebit(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsAlipay(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + class ModifyParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter will override the top-level `capture_method` 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 will unset the stored value for this payment method type. - """ - reference: NotRequired["str"] - """ - An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. - This field differs from the statement descriptor and item name. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + reference: NotRequired["str"] + """ + An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + This field differs from the statement descriptor and item name. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsAffirm(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. + class ModifyParamsPaymentMethodOptionsAffirm(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. - If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter will override the top-level `capture_method` 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 will unset the stored value for this payment method type. - """ - preferred_locale: NotRequired["str"] - """ - Preferred language of the Affirm authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired["Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + preferred_locale: NotRequired["str"] + """ + Preferred language of the Affirm authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired["Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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 may only update the value from `on_session` to `off_session`. + """ - class ModifyParamsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. + class ModifyParamsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + When processing card payments, Stripe also uses `setup_future_usage` 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`. - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + 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`. + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - interval_description: NotRequired["str"] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - "Literal['combined', 'interval', 'sporadic']" - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired["Literal['business', 'personal']"] - """ - Transaction type of the mandate. - """ + class ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + interval_description: NotRequired["str"] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']" + ] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired["Literal['business', 'personal']"] + """ + Transaction type of the mandate. + """ - class ModifyParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - au_becs_debit: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billing_details: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataBlik" - ] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - customer_balance: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - grabpay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - ideal: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataIdeal" - ] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - klarna: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - link: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataLink" - ] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - 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`. - """ - oxxo: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataOxxo" - ] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - paynow: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - pix: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - radar_options: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - revolut_pay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - sepa_debit: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - sofort: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "blik", - "boleto", - "cashapp", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "klarna", - "konbini", - "link", - "oxxo", - "p24", - "paynow", - "paypal", - "pix", - "promptpay", - "revolut_pay", - "sepa_debit", - "sofort", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ + class ModifyParamsPaymentMethodData(TypedDict): + acss_debit: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataAcssDebit" + ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataAffirm" + ] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataAlipay" + ] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + au_becs_debit: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataAuBecsDebit" + ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billing_details: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataBoleto" + ] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + cashapp: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataCashapp" + ] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + customer_balance: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + fpx: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataGiropay" + ] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + grabpay: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataGrabpay" + ] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + ideal: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + klarna: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataKlarna" + ] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataKonbini" + ] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + link: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + 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`. + """ + oxxo: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + paynow: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataPaynow" + ] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataPaypal" + ] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + pix: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + radar_options: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataRadarOptions" + ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + revolut_pay: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataRevolutPay" + ] + """ + If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + sepa_debit: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + sofort: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataSofort" + ] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + type: Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay", + "zip", + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataUsBankAccount" + ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataWechatPay" + ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ - class ModifyParamsPaymentMethodDataZip(TypedDict): - pass + class ModifyParamsPaymentMethodDataZip(TypedDict): + pass - class ModifyParamsPaymentMethodDataWechatPay(TypedDict): - pass + class ModifyParamsPaymentMethodDataWechatPay(TypedDict): + pass - class ModifyParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - Account holder type: individual or company. - """ - account_number: NotRequired["str"] - """ - Account number of the bank account. - """ - account_type: NotRequired["Literal['checking', 'savings']"] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired["str"] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired["str"] - """ - Routing number of the bank account. - """ + class ModifyParamsPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + Account holder type: individual or company. + """ + account_number: NotRequired["str"] + """ + Account number of the bank account. + """ + account_type: NotRequired["Literal['checking', 'savings']"] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired["str"] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired["str"] + """ + Routing number of the bank account. + """ - class ModifyParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ + class ModifyParamsPaymentMethodDataSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ - class ModifyParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ + class ModifyParamsPaymentMethodDataSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ - class ModifyParamsPaymentMethodDataRevolutPay(TypedDict): - pass + class ModifyParamsPaymentMethodDataRevolutPay(TypedDict): + pass - class ModifyParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired["str"] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ + class ModifyParamsPaymentMethodDataRadarOptions(TypedDict): + session: NotRequired["str"] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ - class ModifyParamsPaymentMethodDataPromptpay(TypedDict): - pass + class ModifyParamsPaymentMethodDataPromptpay(TypedDict): + pass - class ModifyParamsPaymentMethodDataPix(TypedDict): - pass + class ModifyParamsPaymentMethodDataPix(TypedDict): + pass - class ModifyParamsPaymentMethodDataPaypal(TypedDict): - pass + class ModifyParamsPaymentMethodDataPaypal(TypedDict): + pass - class ModifyParamsPaymentMethodDataPaynow(TypedDict): - pass + class ModifyParamsPaymentMethodDataPaynow(TypedDict): + pass - class ModifyParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']" - ] - """ - The customer's bank. - """ + class ModifyParamsPaymentMethodDataP24(TypedDict): + bank: NotRequired[ + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']" + ] + """ + The customer's bank. + """ - class ModifyParamsPaymentMethodDataOxxo(TypedDict): - pass + class ModifyParamsPaymentMethodDataOxxo(TypedDict): + pass - class ModifyParamsPaymentMethodDataLink(TypedDict): - pass + class ModifyParamsPaymentMethodDataLink(TypedDict): + pass - class ModifyParamsPaymentMethodDataKonbini(TypedDict): - pass + class ModifyParamsPaymentMethodDataKonbini(TypedDict): + pass - class ModifyParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ + class ModifyParamsPaymentMethodDataKlarna(TypedDict): + dob: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataKlarnaDob" + ] + """ + Customer's date of birth + """ - class ModifyParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ + class ModifyParamsPaymentMethodDataKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ - class ModifyParamsPaymentMethodDataInteracPresent(TypedDict): - pass + class ModifyParamsPaymentMethodDataInteracPresent(TypedDict): + pass - class ModifyParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - "Literal['abn_amro', 'asn_bank', 'bunq', 'handelsbanken', 'ing', 'knab', 'moneyou', 'n26', 'rabobank', 'regiobank', 'revolut', 'sns_bank', 'triodos_bank', 'van_lanschot', 'yoursafe']" - ] - """ - The customer's bank. - """ + class ModifyParamsPaymentMethodDataIdeal(TypedDict): + bank: NotRequired[ + "Literal['abn_amro', 'asn_bank', 'bunq', 'handelsbanken', 'ing', 'knab', 'moneyou', 'n26', 'rabobank', 'regiobank', 'revolut', 'sns_bank', 'triodos_bank', 'van_lanschot', 'yoursafe']" + ] + """ + The customer's bank. + """ - class ModifyParamsPaymentMethodDataGrabpay(TypedDict): - pass + class ModifyParamsPaymentMethodDataGrabpay(TypedDict): + pass - class ModifyParamsPaymentMethodDataGiropay(TypedDict): - pass + class ModifyParamsPaymentMethodDataGiropay(TypedDict): + pass - class ModifyParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ + class ModifyParamsPaymentMethodDataFpx(TypedDict): + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ - class ModifyParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - "Literal['arzte_und_apotheker_bank', 'austrian_anadi_bank_ag', 'bank_austria', 'bankhaus_carl_spangler', 'bankhaus_schelhammer_und_schattera_ag', 'bawag_psk_ag', 'bks_bank_ag', 'brull_kallmus_bank_ag', 'btv_vier_lander_bank', 'capital_bank_grawe_gruppe_ag', 'deutsche_bank_ag', 'dolomitenbank', 'easybank_ag', 'erste_bank_und_sparkassen', 'hypo_alpeadriabank_international_ag', 'hypo_bank_burgenland_aktiengesellschaft', 'hypo_noe_lb_fur_niederosterreich_u_wien', 'hypo_oberosterreich_salzburg_steiermark', 'hypo_tirol_bank_ag', 'hypo_vorarlberg_bank_ag', 'marchfelder_bank', 'oberbank_ag', 'raiffeisen_bankengruppe_osterreich', 'schoellerbank_ag', 'sparda_bank_wien', 'volksbank_gruppe', 'volkskreditbank_ag', 'vr_bank_braunau']" - ] - """ - The customer's bank. - """ + class ModifyParamsPaymentMethodDataEps(TypedDict): + bank: NotRequired[ + "Literal['arzte_und_apotheker_bank', 'austrian_anadi_bank_ag', 'bank_austria', 'bankhaus_carl_spangler', 'bankhaus_schelhammer_und_schattera_ag', 'bawag_psk_ag', 'bks_bank_ag', 'brull_kallmus_bank_ag', 'btv_vier_lander_bank', 'capital_bank_grawe_gruppe_ag', 'deutsche_bank_ag', 'dolomitenbank', 'easybank_ag', 'erste_bank_und_sparkassen', 'hypo_alpeadriabank_international_ag', 'hypo_bank_burgenland_aktiengesellschaft', 'hypo_noe_lb_fur_niederosterreich_u_wien', 'hypo_oberosterreich_salzburg_steiermark', 'hypo_tirol_bank_ag', 'hypo_vorarlberg_bank_ag', 'marchfelder_bank', 'oberbank_ag', 'raiffeisen_bankengruppe_osterreich', 'schoellerbank_ag', 'sparda_bank_wien', 'volksbank_gruppe', 'volkskreditbank_ag', 'vr_bank_braunau']" + ] + """ + The customer's bank. + """ - class ModifyParamsPaymentMethodDataCustomerBalance(TypedDict): - pass + class ModifyParamsPaymentMethodDataCustomerBalance(TypedDict): + pass - class ModifyParamsPaymentMethodDataCashapp(TypedDict): - pass + class ModifyParamsPaymentMethodDataCashapp(TypedDict): + pass - class ModifyParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ + class ModifyParamsPaymentMethodDataBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ - class ModifyParamsPaymentMethodDataBlik(TypedDict): - pass + class ModifyParamsPaymentMethodDataBlik(TypedDict): + pass - class ModifyParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ + class ModifyParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ - class ModifyParamsPaymentMethodDataBillingDetailsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class ModifyParamsPaymentMethodDataBillingDetailsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ModifyParamsPaymentMethodDataBancontact(TypedDict): - pass + class ModifyParamsPaymentMethodDataBancontact(TypedDict): + pass - class ModifyParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired["str"] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired["str"] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ + class ModifyParamsPaymentMethodDataBacsDebit(TypedDict): + account_number: NotRequired["str"] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired["str"] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ - class ModifyParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ + class ModifyParamsPaymentMethodDataAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ - class ModifyParamsPaymentMethodDataAlipay(TypedDict): - pass + class ModifyParamsPaymentMethodDataAlipay(TypedDict): + pass - class ModifyParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass + class ModifyParamsPaymentMethodDataAfterpayClearpay(TypedDict): + pass - class ModifyParamsPaymentMethodDataAffirm(TypedDict): - pass + class ModifyParamsPaymentMethodDataAffirm(TypedDict): + pass - class ModifyParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ + class ModifyParamsPaymentMethodDataAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ - class RetrieveParams(RequestOptions): - client_secret: NotRequired["str"] - """ - The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + client_secret: NotRequired["str"] + """ + The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class VerifyMicrodepositsParams(RequestOptions): - amounts: NotRequired["List[int]"] - """ - Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. - """ - descriptor_code: NotRequired["str"] - """ - A six-character code starting with SM present in the microdeposit sent to the bank account. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class VerifyMicrodepositsParams(RequestOptions): + amounts: NotRequired["List[int]"] + """ + Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + """ + descriptor_code: NotRequired["str"] + """ + A six-character code starting with SM present in the microdeposit sent to the bank account. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class SearchParams(RequestOptions): - 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. - """ - page: NotRequired["str"] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). - """ + class SearchParams(RequestOptions): + 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. + """ + page: NotRequired["str"] + """ + A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + """ + query: str + """ + The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). + """ amount: int """ diff --git a/stripe/api_resources/payment_link.py b/stripe/api_resources/payment_link.py index 9c8807967..a62428c75 100644 --- a/stripe/api_resources/payment_link.py +++ b/stripe/api_resources/payment_link.py @@ -569,1389 +569,1369 @@ class TransferData(StripeObject): The connected account receiving the transfer. """ - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - after_completion: NotRequired[ - "PaymentLink.CreateParamsAfterCompletion" - ] - """ - Behavior after the purchase is complete. - """ - allow_promotion_codes: NotRequired["bool"] - """ - Enables user redeemable promotion codes. - """ - application_fee_amount: NotRequired["int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. - """ - application_fee_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. - """ - automatic_tax: NotRequired["PaymentLink.CreateParamsAutomaticTax"] - """ - Configuration for automatic tax collection. - """ - billing_address_collection: NotRequired[ - "Literal['auto', 'required']" - ] - """ - Configuration for collecting the customer's billing address. - """ - consent_collection: NotRequired[ - "PaymentLink.CreateParamsConsentCollection" - ] - """ - Configure fields to gather active consent from customers. - """ - currency: NotRequired["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) and supported by each line item's price. - """ - custom_fields: NotRequired[ - "List[PaymentLink.CreateParamsCustomField]" - ] - """ - Collect additional information from your customer using custom fields. Up to 2 fields are supported. - """ - custom_text: NotRequired["PaymentLink.CreateParamsCustomText"] - """ - Display additional text for your customers using custom text. - """ - customer_creation: NotRequired["Literal['always', 'if_required']"] - """ - Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - invoice_creation: NotRequired[ - "PaymentLink.CreateParamsInvoiceCreation" - ] - """ - Generate a post-purchase Invoice for one-time payments. - """ - line_items: List["PaymentLink.CreateParamsLineItem"] - """ - The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. - """ - 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`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. - """ - on_behalf_of: NotRequired["str"] - """ - The account on behalf of which to charge. - """ - payment_intent_data: NotRequired[ - "PaymentLink.CreateParamsPaymentIntentData" - ] - """ - A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. - """ - payment_method_collection: NotRequired[ - "Literal['always', 'if_required']" - ] - """ - Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. - - Can only be set in `subscription` mode. - - 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[ - "List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]" - ] - """ - The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). - """ - phone_number_collection: NotRequired[ - "PaymentLink.CreateParamsPhoneNumberCollection" - ] - """ - Controls phone number collection settings during checkout. - - We recommend that you review your privacy policy and check with your legal contacts. - """ - shipping_address_collection: NotRequired[ - "PaymentLink.CreateParamsShippingAddressCollection" - ] - """ - Configuration for collecting the customer's shipping address. - """ - shipping_options: NotRequired[ - "List[PaymentLink.CreateParamsShippingOption]" - ] - """ - 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']" - ] - """ - 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.CreateParamsSubscriptionData" - ] - """ - When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. - """ - tax_id_collection: NotRequired[ - "PaymentLink.CreateParamsTaxIdCollection" - ] - """ - Controls tax ID collection during checkout. - """ - transfer_data: NotRequired["PaymentLink.CreateParamsTransferData"] - """ - The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. - """ - - class CreateParamsTransferData(TypedDict): - amount: NotRequired["int"] - """ - The amount that will be transferred automatically when a charge succeeds. - """ - destination: str - """ - If specified, successful charges will be attributed to the destination - account for tax reporting, and the funds from charges will be transferred - to the destination account. The ID of the resulting transfer will be - returned on the successful charge's `transfer` field. - """ - - class CreateParamsTaxIdCollection(TypedDict): - enabled: bool - """ - Set to `true` to enable tax ID collection. - """ - - class CreateParamsSubscriptionData(TypedDict): - description: NotRequired["str"] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - metadata: NotRequired["Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - trial_period_days: NotRequired["int"] - """ - Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. - """ - - class CreateParamsShippingOption(TypedDict): - shipping_rate: NotRequired["str"] - """ - The ID of the Shipping Rate to use for this shipping option. - """ - - class CreateParamsShippingAddressCollection(TypedDict): - allowed_countries: List[ - Literal[ - "AC", - "AD", - "AE", - "AF", - "AG", - "AI", - "AL", - "AM", - "AO", - "AQ", - "AR", - "AT", - "AU", - "AW", - "AX", - "AZ", - "BA", - "BB", - "BD", - "BE", - "BF", - "BG", - "BH", - "BI", - "BJ", - "BL", - "BM", - "BN", - "BO", - "BQ", - "BR", - "BS", - "BT", - "BV", - "BW", - "BY", - "BZ", - "CA", - "CD", - "CF", - "CG", - "CH", - "CI", - "CK", - "CL", - "CM", - "CN", - "CO", - "CR", - "CV", - "CW", - "CY", - "CZ", - "DE", - "DJ", - "DK", - "DM", - "DO", - "DZ", - "EC", - "EE", - "EG", - "EH", - "ER", - "ES", - "ET", - "FI", - "FJ", - "FK", - "FO", - "FR", - "GA", - "GB", - "GD", - "GE", - "GF", - "GG", - "GH", - "GI", - "GL", - "GM", - "GN", - "GP", - "GQ", - "GR", - "GS", - "GT", - "GU", - "GW", - "GY", - "HK", - "HN", - "HR", - "HT", - "HU", - "ID", - "IE", - "IL", - "IM", - "IN", - "IO", - "IQ", - "IS", - "IT", - "JE", - "JM", - "JO", - "JP", - "KE", - "KG", - "KH", - "KI", - "KM", - "KN", - "KR", - "KW", - "KY", - "KZ", - "LA", - "LB", - "LC", - "LI", - "LK", - "LR", - "LS", - "LT", - "LU", - "LV", - "LY", - "MA", - "MC", - "MD", - "ME", - "MF", - "MG", - "MK", - "ML", - "MM", - "MN", - "MO", - "MQ", - "MR", - "MS", - "MT", - "MU", - "MV", - "MW", - "MX", - "MY", - "MZ", - "NA", - "NC", - "NE", - "NG", - "NI", - "NL", - "NO", - "NP", - "NR", - "NU", - "NZ", - "OM", - "PA", - "PE", - "PF", - "PG", - "PH", - "PK", - "PL", - "PM", - "PN", - "PR", - "PS", - "PT", - "PY", - "QA", - "RE", - "RO", - "RS", - "RU", - "RW", - "SA", - "SB", - "SC", - "SE", - "SG", - "SH", - "SI", - "SJ", - "SK", - "SL", - "SM", - "SN", - "SO", - "SR", - "SS", - "ST", - "SV", - "SX", - "SZ", - "TA", - "TC", - "TD", - "TF", - "TG", - "TH", - "TJ", - "TK", - "TL", - "TM", - "TN", - "TO", - "TR", - "TT", - "TV", - "TW", - "TZ", - "UA", - "UG", - "US", - "UY", - "UZ", - "VA", - "VC", - "VE", - "VG", - "VN", - "VU", - "WF", - "WS", - "XK", - "YE", - "YT", - "ZA", - "ZM", - "ZW", - "ZZ", - ] - ] - """ - 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`. - """ - - class CreateParamsPhoneNumberCollection(TypedDict): - enabled: bool - """ - Set to `true` to enable phone number collection. - """ - - class CreateParamsPaymentIntentData(TypedDict): - capture_method: NotRequired[ - "Literal['automatic', 'automatic_async', 'manual']" - ] - """ - Controls when the funds will be captured from the customer's account. - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - metadata: NotRequired["Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - setup_future_usage: NotRequired[ - "Literal['off_session', 'on_session']" - ] - """ - Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. - - When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved. - - When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments. - - If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer. - - If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. - - When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. - """ - statement_descriptor: NotRequired["str"] - """ - Extra information about the payment. This will appear on your customer's statement when this payment succeeds in creating a charge. - """ - 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. - """ - - class CreateParamsLineItem(TypedDict): - adjustable_quantity: NotRequired[ - "PaymentLink.CreateParamsLineItemAdjustableQuantity" - ] - """ - When set, provides configuration for this item's quantity to be adjusted by the customer during checkout. - """ - price: str - """ - The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. - """ - quantity: int - """ - The quantity of the line item being purchased. - """ - - class CreateParamsLineItemAdjustableQuantity(TypedDict): - enabled: bool - """ - Set to true if the quantity can be adjusted to any non-negative Integer. - """ - maximum: NotRequired["int"] - """ - The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999. - """ - minimum: NotRequired["int"] - """ - The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. - """ + class CreateParams(RequestOptions): + after_completion: NotRequired[ + "PaymentLink.CreateParamsAfterCompletion" + ] + """ + Behavior after the purchase is complete. + """ + allow_promotion_codes: NotRequired["bool"] + """ + Enables user redeemable promotion codes. + """ + application_fee_amount: NotRequired["int"] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. + """ + application_fee_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + """ + automatic_tax: NotRequired["PaymentLink.CreateParamsAutomaticTax"] + """ + Configuration for automatic tax collection. + """ + billing_address_collection: NotRequired["Literal['auto', 'required']"] + """ + Configuration for collecting the customer's billing address. + """ + consent_collection: NotRequired[ + "PaymentLink.CreateParamsConsentCollection" + ] + """ + Configure fields to gather active consent from customers. + """ + currency: NotRequired["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) and supported by each line item's price. + """ + custom_fields: NotRequired["List[PaymentLink.CreateParamsCustomField]"] + """ + Collect additional information from your customer using custom fields. Up to 2 fields are supported. + """ + custom_text: NotRequired["PaymentLink.CreateParamsCustomText"] + """ + Display additional text for your customers using custom text. + """ + customer_creation: NotRequired["Literal['always', 'if_required']"] + """ + Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + invoice_creation: NotRequired[ + "PaymentLink.CreateParamsInvoiceCreation" + ] + """ + Generate a post-purchase Invoice for one-time payments. + """ + line_items: List["PaymentLink.CreateParamsLineItem"] + """ + The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. + """ + 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`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + """ + on_behalf_of: NotRequired["str"] + """ + The account on behalf of which to charge. + """ + payment_intent_data: NotRequired[ + "PaymentLink.CreateParamsPaymentIntentData" + ] + """ + A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + """ + payment_method_collection: NotRequired[ + "Literal['always', 'if_required']" + ] + """ + Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. - class CreateParamsInvoiceCreation(TypedDict): - enabled: bool - """ - Whether the feature is enabled - """ - invoice_data: NotRequired[ - "PaymentLink.CreateParamsInvoiceCreationInvoiceData" - ] - """ - Invoice PDF configuration. - """ + Can only be set in `subscription` mode. - class CreateParamsInvoiceCreationInvoiceData(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the invoice. - """ - custom_fields: NotRequired[ - "Literal['']|List[PaymentLink.CreateParamsInvoiceCreationInvoiceDataCustomField]" - ] - """ - Default custom fields to be displayed on invoices for this customer. - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - footer: NotRequired["str"] - """ - Default footer to be displayed on invoices for this customer. - """ - metadata: NotRequired["Literal['']|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`. - """ - rendering_options: NotRequired[ - "Literal['']|PaymentLink.CreateParamsInvoiceCreationInvoiceDataRenderingOptions" - ] - """ - Default options for invoice PDF rendering for this customer. - """ + 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[ + "List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]" + ] + """ + The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). + """ + phone_number_collection: NotRequired[ + "PaymentLink.CreateParamsPhoneNumberCollection" + ] + """ + Controls phone number collection settings during checkout. - class CreateParamsInvoiceCreationInvoiceDataRenderingOptions( - TypedDict - ): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - 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. - """ + We recommend that you review your privacy policy and check with your legal contacts. + """ + shipping_address_collection: NotRequired[ + "PaymentLink.CreateParamsShippingAddressCollection" + ] + """ + Configuration for collecting the customer's shipping address. + """ + shipping_options: NotRequired[ + "List[PaymentLink.CreateParamsShippingOption]" + ] + """ + 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']"] + """ + 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.CreateParamsSubscriptionData" + ] + """ + When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + """ + tax_id_collection: NotRequired[ + "PaymentLink.CreateParamsTaxIdCollection" + ] + """ + Controls tax ID collection during checkout. + """ + transfer_data: NotRequired["PaymentLink.CreateParamsTransferData"] + """ + The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + """ - class CreateParamsInvoiceCreationInvoiceDataCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 30 characters. - """ - value: str - """ - The value of the custom field. This may be up to 30 characters. - """ + class CreateParamsTransferData(TypedDict): + amount: NotRequired["int"] + """ + The amount that will be transferred automatically when a charge succeeds. + """ + destination: str + """ + If specified, successful charges will be attributed to the destination + account for tax reporting, and the funds from charges will be transferred + to the destination account. The ID of the resulting transfer will be + returned on the successful charge's `transfer` field. + """ - class CreateParamsCustomText(TypedDict): - shipping_address: NotRequired[ - "Literal['']|PaymentLink.CreateParamsCustomTextShippingAddress" - ] - """ - Custom text that should be displayed alongside shipping address collection. - """ - submit: NotRequired[ - "Literal['']|PaymentLink.CreateParamsCustomTextSubmit" - ] - """ - Custom text that should be displayed alongside the payment confirmation button. - """ - terms_of_service_acceptance: NotRequired[ - "Literal['']|PaymentLink.CreateParamsCustomTextTermsOfServiceAcceptance" - ] - """ - Custom text that should be displayed in place of the default terms of service agreement text. - """ + class CreateParamsTaxIdCollection(TypedDict): + enabled: bool + """ + Set to `true` to enable tax ID collection. + """ - class CreateParamsCustomTextTermsOfServiceAcceptance(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ + class CreateParamsSubscriptionData(TypedDict): + description: NotRequired["str"] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + metadata: NotRequired["Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + """ + trial_period_days: NotRequired["int"] + """ + Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. + """ - class CreateParamsCustomTextSubmit(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ + class CreateParamsShippingOption(TypedDict): + shipping_rate: NotRequired["str"] + """ + The ID of the Shipping Rate to use for this shipping option. + """ - class CreateParamsCustomTextShippingAddress(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ + class CreateParamsShippingAddressCollection(TypedDict): + allowed_countries: List[ + Literal[ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ", + ] + ] + """ + 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`. + """ + + class CreateParamsPhoneNumberCollection(TypedDict): + enabled: bool + """ + Set to `true` to enable phone number collection. + """ + + class CreateParamsPaymentIntentData(TypedDict): + capture_method: NotRequired[ + "Literal['automatic', 'automatic_async', 'manual']" + ] + """ + Controls when the funds will be captured from the customer's account. + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + metadata: NotRequired["Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + """ + setup_future_usage: NotRequired["Literal['off_session', 'on_session']"] + """ + Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. + + When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved. + + When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments. + + If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer. + + If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. + + When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. + """ + statement_descriptor: NotRequired["str"] + """ + Extra information about the payment. This will appear on your customer's statement when this payment succeeds in creating a charge. + """ + 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. + """ + + class CreateParamsLineItem(TypedDict): + adjustable_quantity: NotRequired[ + "PaymentLink.CreateParamsLineItemAdjustableQuantity" + ] + """ + When set, provides configuration for this item's quantity to be adjusted by the customer during checkout. + """ + price: str + """ + The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. + """ + quantity: int + """ + The quantity of the line item being purchased. + """ + + class CreateParamsLineItemAdjustableQuantity(TypedDict): + enabled: bool + """ + Set to true if the quantity can be adjusted to any non-negative Integer. + """ + maximum: NotRequired["int"] + """ + The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999. + """ + minimum: NotRequired["int"] + """ + The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. + """ + + class CreateParamsInvoiceCreation(TypedDict): + enabled: bool + """ + Whether the feature is enabled + """ + invoice_data: NotRequired[ + "PaymentLink.CreateParamsInvoiceCreationInvoiceData" + ] + """ + Invoice PDF configuration. + """ + + class CreateParamsInvoiceCreationInvoiceData(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the invoice. + """ + custom_fields: NotRequired[ + "Literal['']|List[PaymentLink.CreateParamsInvoiceCreationInvoiceDataCustomField]" + ] + """ + Default custom fields to be displayed on invoices for this customer. + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired["str"] + """ + Default footer to be displayed on invoices for this customer. + """ + metadata: NotRequired["Literal['']|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`. + """ + rendering_options: NotRequired[ + "Literal['']|PaymentLink.CreateParamsInvoiceCreationInvoiceDataRenderingOptions" + ] + """ + Default options for invoice PDF rendering for this customer. + """ + + class CreateParamsInvoiceCreationInvoiceDataRenderingOptions(TypedDict): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + 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. + """ + + class CreateParamsInvoiceCreationInvoiceDataCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 30 characters. + """ + value: str + """ + The value of the custom field. This may be up to 30 characters. + """ - class CreateParamsCustomField(TypedDict): - dropdown: NotRequired[ - "PaymentLink.CreateParamsCustomFieldDropdown" - ] - """ - Configuration for `type=dropdown` fields. - """ - key: str - """ - String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. - """ - label: "PaymentLink.CreateParamsCustomFieldLabel" - """ - The label for the field, displayed to the customer. - """ - numeric: NotRequired["PaymentLink.CreateParamsCustomFieldNumeric"] - """ - Configuration for `type=numeric` fields. - """ - optional: NotRequired["bool"] - """ - Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. - """ - text: NotRequired["PaymentLink.CreateParamsCustomFieldText"] - """ - Configuration for `type=text` fields. - """ - type: Literal["dropdown", "numeric", "text"] - """ - The type of the field. - """ + class CreateParamsCustomText(TypedDict): + shipping_address: NotRequired[ + "Literal['']|PaymentLink.CreateParamsCustomTextShippingAddress" + ] + """ + Custom text that should be displayed alongside shipping address collection. + """ + submit: NotRequired[ + "Literal['']|PaymentLink.CreateParamsCustomTextSubmit" + ] + """ + Custom text that should be displayed alongside the payment confirmation button. + """ + terms_of_service_acceptance: NotRequired[ + "Literal['']|PaymentLink.CreateParamsCustomTextTermsOfServiceAcceptance" + ] + """ + Custom text that should be displayed in place of the default terms of service agreement text. + """ - class CreateParamsCustomFieldText(TypedDict): - maximum_length: NotRequired["int"] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired["int"] - """ - The minimum character length requirement for the customer's input. - """ + class CreateParamsCustomTextTermsOfServiceAcceptance(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ - class CreateParamsCustomFieldNumeric(TypedDict): - maximum_length: NotRequired["int"] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired["int"] - """ - The minimum character length requirement for the customer's input. - """ + class CreateParamsCustomTextSubmit(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ - class CreateParamsCustomFieldLabel(TypedDict): - custom: str - """ - Custom text for the label, displayed to the customer. Up to 50 characters. - """ - type: Literal["custom"] - """ - The type of the label. - """ + class CreateParamsCustomTextShippingAddress(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ - class CreateParamsCustomFieldDropdown(TypedDict): - options: List["PaymentLink.CreateParamsCustomFieldDropdownOption"] - """ - The options available for the customer to select. Up to 200 options allowed. - """ + class CreateParamsCustomField(TypedDict): + dropdown: NotRequired["PaymentLink.CreateParamsCustomFieldDropdown"] + """ + Configuration for `type=dropdown` fields. + """ + key: str + """ + String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + """ + label: "PaymentLink.CreateParamsCustomFieldLabel" + """ + The label for the field, displayed to the customer. + """ + numeric: NotRequired["PaymentLink.CreateParamsCustomFieldNumeric"] + """ + Configuration for `type=numeric` fields. + """ + optional: NotRequired["bool"] + """ + Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + """ + text: NotRequired["PaymentLink.CreateParamsCustomFieldText"] + """ + Configuration for `type=text` fields. + """ + type: Literal["dropdown", "numeric", "text"] + """ + The type of the field. + """ - class CreateParamsCustomFieldDropdownOption(TypedDict): - label: str - """ - The label for the option, displayed to the customer. Up to 100 characters. - """ - value: str - """ - The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. - """ + class CreateParamsCustomFieldText(TypedDict): + maximum_length: NotRequired["int"] + """ + The maximum character length constraint for the customer's input. + """ + minimum_length: NotRequired["int"] + """ + The minimum character length requirement for the customer's input. + """ - class CreateParamsConsentCollection(TypedDict): - promotions: NotRequired["Literal['auto', 'none']"] - """ - If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout - Session will determine whether to display an option to opt into promotional communication - from the merchant depending on the customer's locale. Only available to US merchants. - """ - terms_of_service: NotRequired["Literal['none', 'required']"] - """ - If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. - There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). - """ + class CreateParamsCustomFieldNumeric(TypedDict): + maximum_length: NotRequired["int"] + """ + The maximum character length constraint for the customer's input. + """ + minimum_length: NotRequired["int"] + """ + The minimum character length requirement for the customer's input. + """ - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - If `true`, tax will be calculated automatically using the customer's location. - """ + class CreateParamsCustomFieldLabel(TypedDict): + custom: str + """ + Custom text for the label, displayed to the customer. Up to 50 characters. + """ + type: Literal["custom"] + """ + The type of the label. + """ - class CreateParamsAfterCompletion(TypedDict): - hosted_confirmation: NotRequired[ - "PaymentLink.CreateParamsAfterCompletionHostedConfirmation" - ] - """ - Configuration when `type=hosted_confirmation`. - """ - redirect: NotRequired[ - "PaymentLink.CreateParamsAfterCompletionRedirect" - ] - """ - Configuration when `type=redirect`. - """ - type: Literal["hosted_confirmation", "redirect"] - """ - The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. - """ + class CreateParamsCustomFieldDropdown(TypedDict): + options: List["PaymentLink.CreateParamsCustomFieldDropdownOption"] + """ + The options available for the customer to select. Up to 200 options allowed. + """ - class CreateParamsAfterCompletionRedirect(TypedDict): - url: str - """ - The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. - """ + class CreateParamsCustomFieldDropdownOption(TypedDict): + label: str + """ + The label for the option, displayed to the customer. Up to 100 characters. + """ + value: str + """ + The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + """ - class CreateParamsAfterCompletionHostedConfirmation(TypedDict): - custom_message: NotRequired["str"] - """ - A custom message to display to the customer after the purchase is complete. - """ + class CreateParamsConsentCollection(TypedDict): + promotions: NotRequired["Literal['auto', 'none']"] + """ + If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + Session will determine whether to display an option to opt into promotional communication + from the merchant depending on the customer's locale. Only available to US merchants. + """ + terms_of_service: NotRequired["Literal['none', 'required']"] + """ + If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. + There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). + """ - class ListParams(RequestOptions): - active: NotRequired["bool"] - """ - Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). - """ - 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 CreateParamsAutomaticTax(TypedDict): + enabled: bool + """ + If `true`, tax will be calculated automatically using the customer's location. + """ - class ListLineItemsParams(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. - """ + class CreateParamsAfterCompletion(TypedDict): + hosted_confirmation: NotRequired[ + "PaymentLink.CreateParamsAfterCompletionHostedConfirmation" + ] + """ + Configuration when `type=hosted_confirmation`. + """ + redirect: NotRequired[ + "PaymentLink.CreateParamsAfterCompletionRedirect" + ] + """ + Configuration when `type=redirect`. + """ + type: Literal["hosted_confirmation", "redirect"] + """ + The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. + """ - class ModifyParams(RequestOptions): - active: NotRequired["bool"] - """ - Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. - """ - after_completion: NotRequired[ - "PaymentLink.ModifyParamsAfterCompletion" - ] - """ - Behavior after the purchase is complete. - """ - allow_promotion_codes: NotRequired["bool"] - """ - Enables user redeemable promotion codes. - """ - automatic_tax: NotRequired["PaymentLink.ModifyParamsAutomaticTax"] - """ - Configuration for automatic tax collection. - """ - billing_address_collection: NotRequired[ - "Literal['auto', 'required']" - ] - """ - Configuration for collecting the customer's billing address. - """ - custom_fields: NotRequired[ - "Literal['']|List[PaymentLink.ModifyParamsCustomField]" - ] - """ - Collect additional information from your customer using custom fields. Up to 2 fields are supported. - """ - custom_text: NotRequired["PaymentLink.ModifyParamsCustomText"] - """ - Display additional text for your customers using custom text. - """ - customer_creation: NotRequired["Literal['always', 'if_required']"] - """ - Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - invoice_creation: NotRequired[ - "PaymentLink.ModifyParamsInvoiceCreation" - ] - """ - Generate a post-purchase Invoice for one-time payments. - """ - line_items: NotRequired["List[PaymentLink.ModifyParamsLineItem]"] - """ - The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. - """ - 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`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. - """ - payment_intent_data: NotRequired[ - "PaymentLink.ModifyParamsPaymentIntentData" - ] - """ - A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. - """ - payment_method_collection: NotRequired[ - "Literal['always', 'if_required']" - ] - """ - Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + class CreateParamsAfterCompletionRedirect(TypedDict): + url: str + """ + The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. + """ - Can only be set in `subscription` mode. + class CreateParamsAfterCompletionHostedConfirmation(TypedDict): + custom_message: NotRequired["str"] + """ + A custom message to display to the customer after the purchase is complete. + """ - 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', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]" - ] - """ - 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). - """ - shipping_address_collection: NotRequired[ - "Literal['']|PaymentLink.ModifyParamsShippingAddressCollection" - ] - """ - Configuration for collecting the customer's shipping address. - """ - subscription_data: NotRequired[ - "PaymentLink.ModifyParamsSubscriptionData" - ] - """ - When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. - """ + class ListParams(RequestOptions): + active: NotRequired["bool"] + """ + Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). + """ + 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 ListLineItemsParams(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. + """ + + class ModifyParams(RequestOptions): + active: NotRequired["bool"] + """ + Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. + """ + after_completion: NotRequired[ + "PaymentLink.ModifyParamsAfterCompletion" + ] + """ + Behavior after the purchase is complete. + """ + allow_promotion_codes: NotRequired["bool"] + """ + Enables user redeemable promotion codes. + """ + automatic_tax: NotRequired["PaymentLink.ModifyParamsAutomaticTax"] + """ + Configuration for automatic tax collection. + """ + billing_address_collection: NotRequired["Literal['auto', 'required']"] + """ + Configuration for collecting the customer's billing address. + """ + custom_fields: NotRequired[ + "Literal['']|List[PaymentLink.ModifyParamsCustomField]" + ] + """ + Collect additional information from your customer using custom fields. Up to 2 fields are supported. + """ + custom_text: NotRequired["PaymentLink.ModifyParamsCustomText"] + """ + Display additional text for your customers using custom text. + """ + customer_creation: NotRequired["Literal['always', 'if_required']"] + """ + Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + invoice_creation: NotRequired[ + "PaymentLink.ModifyParamsInvoiceCreation" + ] + """ + Generate a post-purchase Invoice for one-time payments. + """ + line_items: NotRequired["List[PaymentLink.ModifyParamsLineItem]"] + """ + The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. + """ + 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`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + """ + payment_intent_data: NotRequired[ + "PaymentLink.ModifyParamsPaymentIntentData" + ] + """ + A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + """ + payment_method_collection: NotRequired[ + "Literal['always', 'if_required']" + ] + """ + Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + + Can only be set in `subscription` mode. + + 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', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]" + ] + """ + 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). + """ + shipping_address_collection: NotRequired[ + "Literal['']|PaymentLink.ModifyParamsShippingAddressCollection" + ] + """ + Configuration for collecting the customer's shipping address. + """ + subscription_data: NotRequired[ + "PaymentLink.ModifyParamsSubscriptionData" + ] + """ + When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + """ - class ModifyParamsSubscriptionData(TypedDict): - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ + class ModifyParamsSubscriptionData(TypedDict): + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + """ - class ModifyParamsShippingAddressCollection(TypedDict): - allowed_countries: List[ - Literal[ - "AC", - "AD", - "AE", - "AF", - "AG", - "AI", - "AL", - "AM", - "AO", - "AQ", - "AR", - "AT", - "AU", - "AW", - "AX", - "AZ", - "BA", - "BB", - "BD", - "BE", - "BF", - "BG", - "BH", - "BI", - "BJ", - "BL", - "BM", - "BN", - "BO", - "BQ", - "BR", - "BS", - "BT", - "BV", - "BW", - "BY", - "BZ", - "CA", - "CD", - "CF", - "CG", - "CH", - "CI", - "CK", - "CL", - "CM", - "CN", - "CO", - "CR", - "CV", - "CW", - "CY", - "CZ", - "DE", - "DJ", - "DK", - "DM", - "DO", - "DZ", - "EC", - "EE", - "EG", - "EH", - "ER", - "ES", - "ET", - "FI", - "FJ", - "FK", - "FO", - "FR", - "GA", - "GB", - "GD", - "GE", - "GF", - "GG", - "GH", - "GI", - "GL", - "GM", - "GN", - "GP", - "GQ", - "GR", - "GS", - "GT", - "GU", - "GW", - "GY", - "HK", - "HN", - "HR", - "HT", - "HU", - "ID", - "IE", - "IL", - "IM", - "IN", - "IO", - "IQ", - "IS", - "IT", - "JE", - "JM", - "JO", - "JP", - "KE", - "KG", - "KH", - "KI", - "KM", - "KN", - "KR", - "KW", - "KY", - "KZ", - "LA", - "LB", - "LC", - "LI", - "LK", - "LR", - "LS", - "LT", - "LU", - "LV", - "LY", - "MA", - "MC", - "MD", - "ME", - "MF", - "MG", - "MK", - "ML", - "MM", - "MN", - "MO", - "MQ", - "MR", - "MS", - "MT", - "MU", - "MV", - "MW", - "MX", - "MY", - "MZ", - "NA", - "NC", - "NE", - "NG", - "NI", - "NL", - "NO", - "NP", - "NR", - "NU", - "NZ", - "OM", - "PA", - "PE", - "PF", - "PG", - "PH", - "PK", - "PL", - "PM", - "PN", - "PR", - "PS", - "PT", - "PY", - "QA", - "RE", - "RO", - "RS", - "RU", - "RW", - "SA", - "SB", - "SC", - "SE", - "SG", - "SH", - "SI", - "SJ", - "SK", - "SL", - "SM", - "SN", - "SO", - "SR", - "SS", - "ST", - "SV", - "SX", - "SZ", - "TA", - "TC", - "TD", - "TF", - "TG", - "TH", - "TJ", - "TK", - "TL", - "TM", - "TN", - "TO", - "TR", - "TT", - "TV", - "TW", - "TZ", - "UA", - "UG", - "US", - "UY", - "UZ", - "VA", - "VC", - "VE", - "VG", - "VN", - "VU", - "WF", - "WS", - "XK", - "YE", - "YT", - "ZA", - "ZM", - "ZW", - "ZZ", - ] + class ModifyParamsShippingAddressCollection(TypedDict): + allowed_countries: List[ + Literal[ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ", ] - """ - 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`. - """ + ] + """ + 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`. + """ - class ModifyParamsPaymentIntentData(TypedDict): - description: NotRequired["Literal['']|str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - 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. - """ - 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. - """ + class ModifyParamsPaymentIntentData(TypedDict): + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + """ + 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. + """ + 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. + """ - class ModifyParamsLineItem(TypedDict): - adjustable_quantity: NotRequired[ - "PaymentLink.ModifyParamsLineItemAdjustableQuantity" - ] - """ - When set, provides configuration for this item's quantity to be adjusted by the customer during checkout. - """ - id: str - """ - The ID of an existing line item on the payment link. - """ - quantity: NotRequired["int"] - """ - The quantity of the line item being purchased. - """ + class ModifyParamsLineItem(TypedDict): + adjustable_quantity: NotRequired[ + "PaymentLink.ModifyParamsLineItemAdjustableQuantity" + ] + """ + When set, provides configuration for this item's quantity to be adjusted by the customer during checkout. + """ + id: str + """ + The ID of an existing line item on the payment link. + """ + quantity: NotRequired["int"] + """ + The quantity of the line item being purchased. + """ - class ModifyParamsLineItemAdjustableQuantity(TypedDict): - enabled: bool - """ - Set to true if the quantity can be adjusted to any non-negative Integer. - """ - maximum: NotRequired["int"] - """ - The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999. - """ - minimum: NotRequired["int"] - """ - The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. - """ + class ModifyParamsLineItemAdjustableQuantity(TypedDict): + enabled: bool + """ + Set to true if the quantity can be adjusted to any non-negative Integer. + """ + maximum: NotRequired["int"] + """ + The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999. + """ + minimum: NotRequired["int"] + """ + The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. + """ - class ModifyParamsInvoiceCreation(TypedDict): - enabled: bool - """ - Whether the feature is enabled - """ - invoice_data: NotRequired[ - "PaymentLink.ModifyParamsInvoiceCreationInvoiceData" - ] - """ - Invoice PDF configuration. - """ + class ModifyParamsInvoiceCreation(TypedDict): + enabled: bool + """ + Whether the feature is enabled + """ + invoice_data: NotRequired[ + "PaymentLink.ModifyParamsInvoiceCreationInvoiceData" + ] + """ + Invoice PDF configuration. + """ - class ModifyParamsInvoiceCreationInvoiceData(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the invoice. - """ - custom_fields: NotRequired[ - "Literal['']|List[PaymentLink.ModifyParamsInvoiceCreationInvoiceDataCustomField]" - ] - """ - Default custom fields to be displayed on invoices for this customer. - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - footer: NotRequired["str"] - """ - Default footer to be displayed on invoices for this customer. - """ - metadata: NotRequired["Literal['']|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`. - """ - rendering_options: NotRequired[ - "Literal['']|PaymentLink.ModifyParamsInvoiceCreationInvoiceDataRenderingOptions" - ] - """ - Default options for invoice PDF rendering for this customer. - """ + class ModifyParamsInvoiceCreationInvoiceData(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the invoice. + """ + custom_fields: NotRequired[ + "Literal['']|List[PaymentLink.ModifyParamsInvoiceCreationInvoiceDataCustomField]" + ] + """ + Default custom fields to be displayed on invoices for this customer. + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired["str"] + """ + Default footer to be displayed on invoices for this customer. + """ + metadata: NotRequired["Literal['']|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`. + """ + rendering_options: NotRequired[ + "Literal['']|PaymentLink.ModifyParamsInvoiceCreationInvoiceDataRenderingOptions" + ] + """ + Default options for invoice PDF rendering for this customer. + """ - class ModifyParamsInvoiceCreationInvoiceDataRenderingOptions( - TypedDict - ): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - 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. - """ + class ModifyParamsInvoiceCreationInvoiceDataRenderingOptions(TypedDict): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + 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. + """ - class ModifyParamsInvoiceCreationInvoiceDataCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 30 characters. - """ - value: str - """ - The value of the custom field. This may be up to 30 characters. - """ + class ModifyParamsInvoiceCreationInvoiceDataCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 30 characters. + """ + value: str + """ + The value of the custom field. This may be up to 30 characters. + """ - class ModifyParamsCustomText(TypedDict): - shipping_address: NotRequired[ - "Literal['']|PaymentLink.ModifyParamsCustomTextShippingAddress" - ] - """ - Custom text that should be displayed alongside shipping address collection. - """ - submit: NotRequired[ - "Literal['']|PaymentLink.ModifyParamsCustomTextSubmit" - ] - """ - Custom text that should be displayed alongside the payment confirmation button. - """ - terms_of_service_acceptance: NotRequired[ - "Literal['']|PaymentLink.ModifyParamsCustomTextTermsOfServiceAcceptance" - ] - """ - Custom text that should be displayed in place of the default terms of service agreement text. - """ + class ModifyParamsCustomText(TypedDict): + shipping_address: NotRequired[ + "Literal['']|PaymentLink.ModifyParamsCustomTextShippingAddress" + ] + """ + Custom text that should be displayed alongside shipping address collection. + """ + submit: NotRequired[ + "Literal['']|PaymentLink.ModifyParamsCustomTextSubmit" + ] + """ + Custom text that should be displayed alongside the payment confirmation button. + """ + terms_of_service_acceptance: NotRequired[ + "Literal['']|PaymentLink.ModifyParamsCustomTextTermsOfServiceAcceptance" + ] + """ + Custom text that should be displayed in place of the default terms of service agreement text. + """ - class ModifyParamsCustomTextTermsOfServiceAcceptance(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ + class ModifyParamsCustomTextTermsOfServiceAcceptance(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ - class ModifyParamsCustomTextSubmit(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ + class ModifyParamsCustomTextSubmit(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ - class ModifyParamsCustomTextShippingAddress(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ + class ModifyParamsCustomTextShippingAddress(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ - class ModifyParamsCustomField(TypedDict): - dropdown: NotRequired[ - "PaymentLink.ModifyParamsCustomFieldDropdown" - ] - """ - Configuration for `type=dropdown` fields. - """ - key: str - """ - String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. - """ - label: "PaymentLink.ModifyParamsCustomFieldLabel" - """ - The label for the field, displayed to the customer. - """ - numeric: NotRequired["PaymentLink.ModifyParamsCustomFieldNumeric"] - """ - Configuration for `type=numeric` fields. - """ - optional: NotRequired["bool"] - """ - Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. - """ - text: NotRequired["PaymentLink.ModifyParamsCustomFieldText"] - """ - Configuration for `type=text` fields. - """ - type: Literal["dropdown", "numeric", "text"] - """ - The type of the field. - """ + class ModifyParamsCustomField(TypedDict): + dropdown: NotRequired["PaymentLink.ModifyParamsCustomFieldDropdown"] + """ + Configuration for `type=dropdown` fields. + """ + key: str + """ + String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + """ + label: "PaymentLink.ModifyParamsCustomFieldLabel" + """ + The label for the field, displayed to the customer. + """ + numeric: NotRequired["PaymentLink.ModifyParamsCustomFieldNumeric"] + """ + Configuration for `type=numeric` fields. + """ + optional: NotRequired["bool"] + """ + Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + """ + text: NotRequired["PaymentLink.ModifyParamsCustomFieldText"] + """ + Configuration for `type=text` fields. + """ + type: Literal["dropdown", "numeric", "text"] + """ + The type of the field. + """ - class ModifyParamsCustomFieldText(TypedDict): - maximum_length: NotRequired["int"] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired["int"] - """ - The minimum character length requirement for the customer's input. - """ + class ModifyParamsCustomFieldText(TypedDict): + maximum_length: NotRequired["int"] + """ + The maximum character length constraint for the customer's input. + """ + minimum_length: NotRequired["int"] + """ + The minimum character length requirement for the customer's input. + """ - class ModifyParamsCustomFieldNumeric(TypedDict): - maximum_length: NotRequired["int"] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired["int"] - """ - The minimum character length requirement for the customer's input. - """ + class ModifyParamsCustomFieldNumeric(TypedDict): + maximum_length: NotRequired["int"] + """ + The maximum character length constraint for the customer's input. + """ + minimum_length: NotRequired["int"] + """ + The minimum character length requirement for the customer's input. + """ - class ModifyParamsCustomFieldLabel(TypedDict): - custom: str - """ - Custom text for the label, displayed to the customer. Up to 50 characters. - """ - type: Literal["custom"] - """ - The type of the label. - """ + class ModifyParamsCustomFieldLabel(TypedDict): + custom: str + """ + Custom text for the label, displayed to the customer. Up to 50 characters. + """ + type: Literal["custom"] + """ + The type of the label. + """ - class ModifyParamsCustomFieldDropdown(TypedDict): - options: List["PaymentLink.ModifyParamsCustomFieldDropdownOption"] - """ - The options available for the customer to select. Up to 200 options allowed. - """ + class ModifyParamsCustomFieldDropdown(TypedDict): + options: List["PaymentLink.ModifyParamsCustomFieldDropdownOption"] + """ + The options available for the customer to select. Up to 200 options allowed. + """ - class ModifyParamsCustomFieldDropdownOption(TypedDict): - label: str - """ - The label for the option, displayed to the customer. Up to 100 characters. - """ - value: str - """ - The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. - """ + class ModifyParamsCustomFieldDropdownOption(TypedDict): + label: str + """ + The label for the option, displayed to the customer. Up to 100 characters. + """ + value: str + """ + The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + """ - class ModifyParamsAutomaticTax(TypedDict): - enabled: bool - """ - If `true`, tax will be calculated automatically using the customer's location. - """ + class ModifyParamsAutomaticTax(TypedDict): + enabled: bool + """ + If `true`, tax will be calculated automatically using the customer's location. + """ - class ModifyParamsAfterCompletion(TypedDict): - hosted_confirmation: NotRequired[ - "PaymentLink.ModifyParamsAfterCompletionHostedConfirmation" - ] - """ - Configuration when `type=hosted_confirmation`. - """ - redirect: NotRequired[ - "PaymentLink.ModifyParamsAfterCompletionRedirect" - ] - """ - Configuration when `type=redirect`. - """ - type: Literal["hosted_confirmation", "redirect"] - """ - The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. - """ + class ModifyParamsAfterCompletion(TypedDict): + hosted_confirmation: NotRequired[ + "PaymentLink.ModifyParamsAfterCompletionHostedConfirmation" + ] + """ + Configuration when `type=hosted_confirmation`. + """ + redirect: NotRequired[ + "PaymentLink.ModifyParamsAfterCompletionRedirect" + ] + """ + Configuration when `type=redirect`. + """ + type: Literal["hosted_confirmation", "redirect"] + """ + The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. + """ - class ModifyParamsAfterCompletionRedirect(TypedDict): - url: str - """ - The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. - """ + class ModifyParamsAfterCompletionRedirect(TypedDict): + url: str + """ + The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. + """ - class ModifyParamsAfterCompletionHostedConfirmation(TypedDict): - custom_message: NotRequired["str"] - """ - A custom message to display to the customer after the purchase is complete. - """ + class ModifyParamsAfterCompletionHostedConfirmation(TypedDict): + custom_message: NotRequired["str"] + """ + A custom message to display to the customer after the purchase is complete. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ active: bool """ diff --git a/stripe/api_resources/payment_method.py b/stripe/api_resources/payment_method.py index 1ee32c19d..620b7832e 100644 --- a/stripe/api_resources/payment_method.py +++ b/stripe/api_resources/payment_method.py @@ -980,623 +980,609 @@ class WechatPay(StripeObject): class Zip(StripeObject): pass - if TYPE_CHECKING: - - class AttachParams(RequestOptions): - customer: str - """ - The ID of the customer to which to attach the PaymentMethod. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class AttachParams(RequestOptions): + customer: str + """ + The ID of the customer to which to attach the PaymentMethod. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CreateParams(RequestOptions): - acss_debit: NotRequired["PaymentMethod.CreateParamsAcssDebit"] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired["PaymentMethod.CreateParamsAffirm"] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "PaymentMethod.CreateParamsAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired["PaymentMethod.CreateParamsAlipay"] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - au_becs_debit: NotRequired["PaymentMethod.CreateParamsAuBecsDebit"] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired["PaymentMethod.CreateParamsBacsDebit"] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired["PaymentMethod.CreateParamsBancontact"] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billing_details: NotRequired[ - "PaymentMethod.CreateParamsBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired["PaymentMethod.CreateParamsBlik"] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired["PaymentMethod.CreateParamsBoleto"] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - card: NotRequired[ - "PaymentMethod.CreateParamsCard|PaymentMethod.CreateParamsCard2" - ] - """ - If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. - """ - cashapp: NotRequired["PaymentMethod.CreateParamsCashapp"] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - customer: NotRequired["str"] - """ - The `Customer` to whom the original PaymentMethod is attached. - """ - customer_balance: NotRequired[ - "PaymentMethod.CreateParamsCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["PaymentMethod.CreateParamsEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - fpx: NotRequired["PaymentMethod.CreateParamsFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired["PaymentMethod.CreateParamsGiropay"] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - grabpay: NotRequired["PaymentMethod.CreateParamsGrabpay"] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - ideal: NotRequired["PaymentMethod.CreateParamsIdeal"] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "PaymentMethod.CreateParamsInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - klarna: NotRequired["PaymentMethod.CreateParamsKlarna"] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired["PaymentMethod.CreateParamsKonbini"] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - link: NotRequired["PaymentMethod.CreateParamsLink"] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - 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`. - """ - oxxo: NotRequired["PaymentMethod.CreateParamsOxxo"] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["PaymentMethod.CreateParamsP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - payment_method: NotRequired["str"] - """ - The PaymentMethod to share. - """ - paynow: NotRequired["PaymentMethod.CreateParamsPaynow"] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired["PaymentMethod.CreateParamsPaypal"] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - pix: NotRequired["PaymentMethod.CreateParamsPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired["PaymentMethod.CreateParamsPromptpay"] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - radar_options: NotRequired[ - "PaymentMethod.CreateParamsRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - revolut_pay: NotRequired["PaymentMethod.CreateParamsRevolutPay"] - """ - If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - sepa_debit: NotRequired["PaymentMethod.CreateParamsSepaDebit"] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - sofort: NotRequired["PaymentMethod.CreateParamsSofort"] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - type: NotRequired[ - "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay', 'zip']" - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "PaymentMethod.CreateParamsUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired["PaymentMethod.CreateParamsWechatPay"] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["PaymentMethod.CreateParamsZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ + class CreateParams(RequestOptions): + acss_debit: NotRequired["PaymentMethod.CreateParamsAcssDebit"] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired["PaymentMethod.CreateParamsAffirm"] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "PaymentMethod.CreateParamsAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired["PaymentMethod.CreateParamsAlipay"] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + au_becs_debit: NotRequired["PaymentMethod.CreateParamsAuBecsDebit"] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired["PaymentMethod.CreateParamsBacsDebit"] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired["PaymentMethod.CreateParamsBancontact"] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billing_details: NotRequired[ + "PaymentMethod.CreateParamsBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["PaymentMethod.CreateParamsBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired["PaymentMethod.CreateParamsBoleto"] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + card: NotRequired[ + "PaymentMethod.CreateParamsCard|PaymentMethod.CreateParamsCard2" + ] + """ + If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. + """ + cashapp: NotRequired["PaymentMethod.CreateParamsCashapp"] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + customer: NotRequired["str"] + """ + The `Customer` to whom the original PaymentMethod is attached. + """ + customer_balance: NotRequired[ + "PaymentMethod.CreateParamsCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["PaymentMethod.CreateParamsEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + fpx: NotRequired["PaymentMethod.CreateParamsFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired["PaymentMethod.CreateParamsGiropay"] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + grabpay: NotRequired["PaymentMethod.CreateParamsGrabpay"] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + ideal: NotRequired["PaymentMethod.CreateParamsIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "PaymentMethod.CreateParamsInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + klarna: NotRequired["PaymentMethod.CreateParamsKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired["PaymentMethod.CreateParamsKonbini"] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + link: NotRequired["PaymentMethod.CreateParamsLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + 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`. + """ + oxxo: NotRequired["PaymentMethod.CreateParamsOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["PaymentMethod.CreateParamsP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + payment_method: NotRequired["str"] + """ + The PaymentMethod to share. + """ + paynow: NotRequired["PaymentMethod.CreateParamsPaynow"] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired["PaymentMethod.CreateParamsPaypal"] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + pix: NotRequired["PaymentMethod.CreateParamsPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired["PaymentMethod.CreateParamsPromptpay"] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + radar_options: NotRequired["PaymentMethod.CreateParamsRadarOptions"] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + revolut_pay: NotRequired["PaymentMethod.CreateParamsRevolutPay"] + """ + If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + sepa_debit: NotRequired["PaymentMethod.CreateParamsSepaDebit"] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + sofort: NotRequired["PaymentMethod.CreateParamsSofort"] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + type: NotRequired[ + "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay', 'zip']" + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired["PaymentMethod.CreateParamsUsBankAccount"] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired["PaymentMethod.CreateParamsWechatPay"] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["PaymentMethod.CreateParamsZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ - class CreateParamsZip(TypedDict): - pass + class CreateParamsZip(TypedDict): + pass - class CreateParamsWechatPay(TypedDict): - pass + class CreateParamsWechatPay(TypedDict): + pass - class CreateParamsUsBankAccount(TypedDict): - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - Account holder type: individual or company. - """ - account_number: NotRequired["str"] - """ - Account number of the bank account. - """ - account_type: NotRequired["Literal['checking', 'savings']"] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired["str"] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired["str"] - """ - Routing number of the bank account. - """ + class CreateParamsUsBankAccount(TypedDict): + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + Account holder type: individual or company. + """ + account_number: NotRequired["str"] + """ + Account number of the bank account. + """ + account_type: NotRequired["Literal['checking', 'savings']"] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired["str"] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired["str"] + """ + Routing number of the bank account. + """ - class CreateParamsSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ + class CreateParamsSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ - class CreateParamsSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ + class CreateParamsSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ - class CreateParamsRevolutPay(TypedDict): - pass + class CreateParamsRevolutPay(TypedDict): + pass - class CreateParamsRadarOptions(TypedDict): - session: NotRequired["str"] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ + class CreateParamsRadarOptions(TypedDict): + session: NotRequired["str"] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ - class CreateParamsPromptpay(TypedDict): - pass + class CreateParamsPromptpay(TypedDict): + pass - class CreateParamsPix(TypedDict): - pass + class CreateParamsPix(TypedDict): + pass - class CreateParamsPaypal(TypedDict): - pass + class CreateParamsPaypal(TypedDict): + pass - class CreateParamsPaynow(TypedDict): - pass + class CreateParamsPaynow(TypedDict): + pass - class CreateParamsP24(TypedDict): - bank: NotRequired[ - "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']" - ] - """ - The customer's bank. - """ + class CreateParamsP24(TypedDict): + bank: NotRequired[ + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']" + ] + """ + The customer's bank. + """ - class CreateParamsOxxo(TypedDict): - pass + class CreateParamsOxxo(TypedDict): + pass - class CreateParamsLink(TypedDict): - pass + class CreateParamsLink(TypedDict): + pass - class CreateParamsKonbini(TypedDict): - pass + class CreateParamsKonbini(TypedDict): + pass - class CreateParamsKlarna(TypedDict): - dob: NotRequired["PaymentMethod.CreateParamsKlarnaDob"] - """ - Customer's date of birth - """ + class CreateParamsKlarna(TypedDict): + dob: NotRequired["PaymentMethod.CreateParamsKlarnaDob"] + """ + Customer's date of birth + """ - class CreateParamsKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ + class CreateParamsKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ - class CreateParamsInteracPresent(TypedDict): - pass + class CreateParamsInteracPresent(TypedDict): + pass - class CreateParamsIdeal(TypedDict): - bank: NotRequired[ - "Literal['abn_amro', 'asn_bank', 'bunq', 'handelsbanken', 'ing', 'knab', 'moneyou', 'n26', 'rabobank', 'regiobank', 'revolut', 'sns_bank', 'triodos_bank', 'van_lanschot', 'yoursafe']" - ] - """ - The customer's bank. - """ + class CreateParamsIdeal(TypedDict): + bank: NotRequired[ + "Literal['abn_amro', 'asn_bank', 'bunq', 'handelsbanken', 'ing', 'knab', 'moneyou', 'n26', 'rabobank', 'regiobank', 'revolut', 'sns_bank', 'triodos_bank', 'van_lanschot', 'yoursafe']" + ] + """ + The customer's bank. + """ - class CreateParamsGrabpay(TypedDict): - pass + class CreateParamsGrabpay(TypedDict): + pass - class CreateParamsGiropay(TypedDict): - pass + class CreateParamsGiropay(TypedDict): + pass - class CreateParamsFpx(TypedDict): - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ + class CreateParamsFpx(TypedDict): + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ - class CreateParamsEps(TypedDict): - bank: NotRequired[ - "Literal['arzte_und_apotheker_bank', 'austrian_anadi_bank_ag', 'bank_austria', 'bankhaus_carl_spangler', 'bankhaus_schelhammer_und_schattera_ag', 'bawag_psk_ag', 'bks_bank_ag', 'brull_kallmus_bank_ag', 'btv_vier_lander_bank', 'capital_bank_grawe_gruppe_ag', 'deutsche_bank_ag', 'dolomitenbank', 'easybank_ag', 'erste_bank_und_sparkassen', 'hypo_alpeadriabank_international_ag', 'hypo_bank_burgenland_aktiengesellschaft', 'hypo_noe_lb_fur_niederosterreich_u_wien', 'hypo_oberosterreich_salzburg_steiermark', 'hypo_tirol_bank_ag', 'hypo_vorarlberg_bank_ag', 'marchfelder_bank', 'oberbank_ag', 'raiffeisen_bankengruppe_osterreich', 'schoellerbank_ag', 'sparda_bank_wien', 'volksbank_gruppe', 'volkskreditbank_ag', 'vr_bank_braunau']" - ] - """ - The customer's bank. - """ + class CreateParamsEps(TypedDict): + bank: NotRequired[ + "Literal['arzte_und_apotheker_bank', 'austrian_anadi_bank_ag', 'bank_austria', 'bankhaus_carl_spangler', 'bankhaus_schelhammer_und_schattera_ag', 'bawag_psk_ag', 'bks_bank_ag', 'brull_kallmus_bank_ag', 'btv_vier_lander_bank', 'capital_bank_grawe_gruppe_ag', 'deutsche_bank_ag', 'dolomitenbank', 'easybank_ag', 'erste_bank_und_sparkassen', 'hypo_alpeadriabank_international_ag', 'hypo_bank_burgenland_aktiengesellschaft', 'hypo_noe_lb_fur_niederosterreich_u_wien', 'hypo_oberosterreich_salzburg_steiermark', 'hypo_tirol_bank_ag', 'hypo_vorarlberg_bank_ag', 'marchfelder_bank', 'oberbank_ag', 'raiffeisen_bankengruppe_osterreich', 'schoellerbank_ag', 'sparda_bank_wien', 'volksbank_gruppe', 'volkskreditbank_ag', 'vr_bank_braunau']" + ] + """ + The customer's bank. + """ - class CreateParamsCustomerBalance(TypedDict): - pass + class CreateParamsCustomerBalance(TypedDict): + pass - class CreateParamsCashapp(TypedDict): - pass + class CreateParamsCashapp(TypedDict): + pass - class CreateParamsCard2(TypedDict): - token: str - """ - For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}. - """ + class CreateParamsCard2(TypedDict): + token: str + """ + For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}. + """ - class CreateParamsCard(TypedDict): - cvc: NotRequired["str"] - """ - The card's CVC. It is highly recommended to always include this value. - """ - exp_month: int - """ - Two-digit number representing the card's expiration month. - """ - exp_year: int - """ - Four-digit number representing the card's expiration year. - """ - number: str - """ - The card number, as a string without any separators. - """ + class CreateParamsCard(TypedDict): + cvc: NotRequired["str"] + """ + The card's CVC. It is highly recommended to always include this value. + """ + exp_month: int + """ + Two-digit number representing the card's expiration month. + """ + exp_year: int + """ + Four-digit number representing the card's expiration year. + """ + number: str + """ + The card number, as a string without any separators. + """ - class CreateParamsBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ + class CreateParamsBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ - class CreateParamsBlik(TypedDict): - pass + class CreateParamsBlik(TypedDict): + pass - class CreateParamsBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|PaymentMethod.CreateParamsBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ + class CreateParamsBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|PaymentMethod.CreateParamsBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ - class CreateParamsBillingDetailsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsBillingDetailsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreateParamsBancontact(TypedDict): - pass + class CreateParamsBancontact(TypedDict): + pass - class CreateParamsBacsDebit(TypedDict): - account_number: NotRequired["str"] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired["str"] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ + class CreateParamsBacsDebit(TypedDict): + account_number: NotRequired["str"] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired["str"] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ - class CreateParamsAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ + class CreateParamsAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ - class CreateParamsAlipay(TypedDict): - pass + class CreateParamsAlipay(TypedDict): + pass - class CreateParamsAfterpayClearpay(TypedDict): - pass + class CreateParamsAfterpayClearpay(TypedDict): + pass - class CreateParamsAffirm(TypedDict): - pass + class CreateParamsAffirm(TypedDict): + pass - class CreateParamsAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ + class CreateParamsAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ - class DetachParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class DetachParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ListParams(RequestOptions): - customer: NotRequired["str"] - """ - The ID of the customer whose PaymentMethods will be retrieved. - """ - 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. - """ - type: NotRequired[ - "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay', 'zip']" - ] - """ - An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. - """ + class ListParams(RequestOptions): + customer: NotRequired["str"] + """ + The ID of the customer whose PaymentMethods will be retrieved. + """ + 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. + """ + type: NotRequired[ + "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay', 'zip']" + ] + """ + An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. + """ - class ModifyParams(RequestOptions): - billing_details: NotRequired[ - "PaymentMethod.ModifyParamsBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - card: NotRequired["PaymentMethod.ModifyParamsCard"] - """ - If this is a `card` PaymentMethod, this hash contains the user's card details. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - link: NotRequired["PaymentMethod.ModifyParamsLink"] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - metadata: NotRequired["Literal['']|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`. - """ - 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. - """ + class ModifyParams(RequestOptions): + billing_details: NotRequired[ + "PaymentMethod.ModifyParamsBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + card: NotRequired["PaymentMethod.ModifyParamsCard"] + """ + If this is a `card` PaymentMethod, this hash contains the user's card details. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + link: NotRequired["PaymentMethod.ModifyParamsLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + metadata: NotRequired["Literal['']|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`. + """ + 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. + """ - class ModifyParamsUsBankAccount(TypedDict): - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - Bank account type. - """ + class ModifyParamsUsBankAccount(TypedDict): + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + Bank account type. + """ - class ModifyParamsLink(TypedDict): - pass + class ModifyParamsLink(TypedDict): + pass - class ModifyParamsCard(TypedDict): - exp_month: NotRequired["int"] - """ - Two-digit number representing the card's expiration month. - """ - exp_year: NotRequired["int"] - """ - Four-digit number representing the card's expiration year. - """ + class ModifyParamsCard(TypedDict): + exp_month: NotRequired["int"] + """ + Two-digit number representing the card's expiration month. + """ + exp_year: NotRequired["int"] + """ + Four-digit number representing the card's expiration year. + """ - class ModifyParamsBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|PaymentMethod.ModifyParamsBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ + class ModifyParamsBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|PaymentMethod.ModifyParamsBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ - class ModifyParamsBillingDetailsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class ModifyParamsBillingDetailsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ acss_debit: Optional[AcssDebit] affirm: Optional[Affirm] diff --git a/stripe/api_resources/payment_method_configuration.py b/stripe/api_resources/payment_method_configuration.py index 227d26f41..287aac02d 100644 --- a/stripe/api_resources/payment_method_configuration.py +++ b/stripe/api_resources/payment_method_configuration.py @@ -9,13 +9,7 @@ from stripe.request_options import RequestOptions from stripe.stripe_object import StripeObject from typing import ClassVar, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, NotRequired, TypedDict, Unpack from urllib.parse import quote_plus @@ -859,1335 +853,1289 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} - if TYPE_CHECKING: + class CreateParams(RequestOptions): + acss_debit: NotRequired[ + "PaymentMethodConfiguration.CreateParamsAcssDebit" + ] + """ + Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. + """ + affirm: NotRequired["PaymentMethodConfiguration.CreateParamsAffirm"] + """ + [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. + """ + afterpay_clearpay: NotRequired[ + "PaymentMethodConfiguration.CreateParamsAfterpayClearpay" + ] + """ + Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. + """ + alipay: NotRequired["PaymentMethodConfiguration.CreateParamsAlipay"] + """ + 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. + """ + apple_pay: NotRequired[ + "PaymentMethodConfiguration.CreateParamsApplePay" + ] + """ + Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. + """ + apple_pay_later: NotRequired[ + "PaymentMethodConfiguration.CreateParamsApplePayLater" + ] + """ + Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. + """ + au_becs_debit: NotRequired[ + "PaymentMethodConfiguration.CreateParamsAuBecsDebit" + ] + """ + Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. + """ + bacs_debit: NotRequired[ + "PaymentMethodConfiguration.CreateParamsBacsDebit" + ] + """ + Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. + """ + bancontact: NotRequired[ + "PaymentMethodConfiguration.CreateParamsBancontact" + ] + """ + Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. + """ + blik: NotRequired["PaymentMethodConfiguration.CreateParamsBlik"] + """ + BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. + """ + boleto: NotRequired["PaymentMethodConfiguration.CreateParamsBoleto"] + """ + Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. + """ + card: NotRequired["PaymentMethodConfiguration.CreateParamsCard"] + """ + Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. + """ + cartes_bancaires: NotRequired[ + "PaymentMethodConfiguration.CreateParamsCartesBancaires" + ] + """ + Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. + """ + cashapp: NotRequired["PaymentMethodConfiguration.CreateParamsCashapp"] + """ + Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. + """ + eps: NotRequired["PaymentMethodConfiguration.CreateParamsEps"] + """ + EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + fpx: NotRequired["PaymentMethodConfiguration.CreateParamsFpx"] + """ + Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. + """ + giropay: NotRequired["PaymentMethodConfiguration.CreateParamsGiropay"] + """ + giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. + """ + google_pay: NotRequired[ + "PaymentMethodConfiguration.CreateParamsGooglePay" + ] + """ + Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. + """ + grabpay: NotRequired["PaymentMethodConfiguration.CreateParamsGrabpay"] + """ + GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. + """ + ideal: NotRequired["PaymentMethodConfiguration.CreateParamsIdeal"] + """ + iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. + """ + jcb: NotRequired["PaymentMethodConfiguration.CreateParamsJcb"] + """ + JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. + """ + klarna: NotRequired["PaymentMethodConfiguration.CreateParamsKlarna"] + """ + Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. + """ + konbini: NotRequired["PaymentMethodConfiguration.CreateParamsKonbini"] + """ + Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. + """ + link: NotRequired["PaymentMethodConfiguration.CreateParamsLink"] + """ + [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. + """ + name: NotRequired["str"] + """ + Configuration name. + """ + oxxo: NotRequired["PaymentMethodConfiguration.CreateParamsOxxo"] + """ + OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. + """ + p24: NotRequired["PaymentMethodConfiguration.CreateParamsP24"] + """ + Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. + """ + parent: NotRequired["str"] + """ + Configuration's parent configuration. Specify to create a child configuration. + """ + paynow: NotRequired["PaymentMethodConfiguration.CreateParamsPaynow"] + """ + PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. + """ + paypal: NotRequired["PaymentMethodConfiguration.CreateParamsPaypal"] + """ + PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. + """ + promptpay: NotRequired[ + "PaymentMethodConfiguration.CreateParamsPromptpay" + ] + """ + PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. + """ + sepa_debit: NotRequired[ + "PaymentMethodConfiguration.CreateParamsSepaDebit" + ] + """ + The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. + """ + sofort: NotRequired["PaymentMethodConfiguration.CreateParamsSofort"] + """ + Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. + """ + us_bank_account: NotRequired[ + "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. + """ + wechat_pay: NotRequired[ + "PaymentMethodConfiguration.CreateParamsWechatPay" + ] + """ + WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. + """ - class CreateParams(RequestOptions): - acss_debit: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAcssDebit" - ] - """ - Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. - """ - affirm: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAffirm" - ] - """ - [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. - """ - afterpay_clearpay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAfterpayClearpay" - ] - """ - Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. - """ - alipay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAlipay" - ] - """ - 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. - """ - apple_pay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsApplePay" - ] - """ - Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. - """ - apple_pay_later: NotRequired[ - "PaymentMethodConfiguration.CreateParamsApplePayLater" - ] - """ - Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. - """ - au_becs_debit: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAuBecsDebit" - ] - """ - Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. - """ - bacs_debit: NotRequired[ - "PaymentMethodConfiguration.CreateParamsBacsDebit" - ] - """ - Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. - """ - bancontact: NotRequired[ - "PaymentMethodConfiguration.CreateParamsBancontact" - ] - """ - Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. - """ - blik: NotRequired["PaymentMethodConfiguration.CreateParamsBlik"] - """ - BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. - """ - boleto: NotRequired[ - "PaymentMethodConfiguration.CreateParamsBoleto" - ] - """ - Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. - """ - card: NotRequired["PaymentMethodConfiguration.CreateParamsCard"] - """ - Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. - """ - cartes_bancaires: NotRequired[ - "PaymentMethodConfiguration.CreateParamsCartesBancaires" - ] - """ - Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. - """ - cashapp: NotRequired[ - "PaymentMethodConfiguration.CreateParamsCashapp" - ] - """ - Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. - """ - eps: NotRequired["PaymentMethodConfiguration.CreateParamsEps"] - """ - EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - fpx: NotRequired["PaymentMethodConfiguration.CreateParamsFpx"] - """ - Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. - """ - giropay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsGiropay" - ] - """ - giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. - """ - google_pay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsGooglePay" - ] - """ - Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. - """ - grabpay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsGrabpay" - ] - """ - GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. - """ - ideal: NotRequired["PaymentMethodConfiguration.CreateParamsIdeal"] - """ - iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. - """ - jcb: NotRequired["PaymentMethodConfiguration.CreateParamsJcb"] - """ - JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. - """ - klarna: NotRequired[ - "PaymentMethodConfiguration.CreateParamsKlarna" - ] - """ - Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. - """ - konbini: NotRequired[ - "PaymentMethodConfiguration.CreateParamsKonbini" - ] - """ - Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. - """ - link: NotRequired["PaymentMethodConfiguration.CreateParamsLink"] - """ - [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. - """ - name: NotRequired["str"] - """ - Configuration name. - """ - oxxo: NotRequired["PaymentMethodConfiguration.CreateParamsOxxo"] - """ - OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. - """ - p24: NotRequired["PaymentMethodConfiguration.CreateParamsP24"] - """ - Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. - """ - parent: NotRequired["str"] - """ - Configuration's parent configuration. Specify to create a child configuration. - """ - paynow: NotRequired[ - "PaymentMethodConfiguration.CreateParamsPaynow" - ] - """ - PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. - """ - paypal: NotRequired[ - "PaymentMethodConfiguration.CreateParamsPaypal" - ] - """ - PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. - """ - promptpay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsPromptpay" - ] - """ - PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. - """ - sepa_debit: NotRequired[ - "PaymentMethodConfiguration.CreateParamsSepaDebit" - ] - """ - The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. - """ - sofort: NotRequired[ - "PaymentMethodConfiguration.CreateParamsSofort" - ] - """ - Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. - """ - us_bank_account: NotRequired[ - "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. - """ - wechat_pay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsWechatPay" - ] - """ - WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. - """ + class CreateParamsWechatPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsWechatPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsWechatPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsWechatPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsWechatPayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsWechatPayDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsUsBankAccount(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsUsBankAccountDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsUsBankAccount(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsUsBankAccountDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsUsBankAccountDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsUsBankAccountDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsSofort(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsSofortDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsSofort(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsSofortDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsSofortDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsSofortDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsSepaDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsSepaDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsSepaDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsSepaDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsSepaDebitDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsSepaDebitDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsPromptpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsPromptpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsPromptpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsPromptpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsPromptpayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsPromptpayDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsPaypal(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsPaypalDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsPaypal(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsPaypalDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsPaypalDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsPaypalDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsPaynow(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsPaynowDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsPaynow(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsPaynowDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsPaynowDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsPaynowDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsP24(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsP24DisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsP24(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsP24DisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsP24DisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsP24DisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsOxxo(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsOxxoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsOxxo(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsOxxoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsOxxoDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsOxxoDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsLink(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsLinkDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsLink(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsLinkDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsLinkDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsLinkDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsKonbini(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsKonbiniDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsKonbini(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsKonbiniDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsKonbiniDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsKonbiniDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsKlarna(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsKlarnaDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsKlarna(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsKlarnaDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsKlarnaDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsKlarnaDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsJcb(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsJcbDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsJcb(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsJcbDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsJcbDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsJcbDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsIdeal(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsIdealDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsIdeal(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsIdealDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsIdealDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsIdealDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsGrabpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsGrabpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsGrabpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsGrabpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsGrabpayDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsGrabpayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsGooglePay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsGooglePayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsGooglePay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsGooglePayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsGooglePayDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsGooglePayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsGiropay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsGiropayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsGiropay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsGiropayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsGiropayDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsGiropayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsFpx(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsFpxDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsFpx(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsFpxDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsFpxDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsFpxDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsEps(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsEpsDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsEps(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsEpsDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsEpsDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsEpsDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsCashapp(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsCashappDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsCashapp(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsCashappDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsCashappDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsCashappDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsCartesBancaires(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsCartesBancairesDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsCartesBancaires(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsCartesBancairesDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsCartesBancairesDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsCartesBancairesDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsCard(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsCardDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsCard(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsCardDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsCardDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsCardDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsBoleto(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsBoletoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsBoleto(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsBoletoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsBoletoDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsBoletoDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsBlik(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsBlikDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsBlik(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsBlikDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsBlikDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsBlikDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsBancontact(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsBancontactDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsBancontact(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsBancontactDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsBancontactDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsBancontactDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsBacsDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsBacsDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsBacsDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsBacsDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsBacsDebitDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsBacsDebitDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsAuBecsDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAuBecsDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsAuBecsDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsAuBecsDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsAuBecsDebitDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsAuBecsDebitDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsApplePayLater(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsApplePayLaterDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsApplePayLater(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsApplePayLaterDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsApplePayLaterDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsApplePayLaterDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsApplePay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsApplePayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsApplePay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsApplePayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsApplePayDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsApplePayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsAlipay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAlipayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsAlipay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsAlipayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsAlipayDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsAlipayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsAfterpayClearpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAfterpayClearpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsAfterpayClearpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsAfterpayClearpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsAfterpayClearpayDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsAfterpayClearpayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsAffirm(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAffirmDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsAffirm(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsAffirmDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsAffirmDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsAffirmDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class CreateParamsAcssDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAcssDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class CreateParamsAcssDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsAcssDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class CreateParamsAcssDebitDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class CreateParamsAcssDebitDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ListParams(RequestOptions): - application: NotRequired["Literal['']|str"] - """ - The Connect application to filter by. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ListParams(RequestOptions): + application: NotRequired["Literal['']|str"] + """ + The Connect application to filter by. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ModifyParams(RequestOptions): - acss_debit: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAcssDebit" - ] - """ - Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. - """ - active: NotRequired["bool"] - """ - Whether the configuration can be used for new payments. - """ - affirm: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAffirm" - ] - """ - [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. - """ - afterpay_clearpay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAfterpayClearpay" - ] - """ - Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. - """ - alipay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAlipay" - ] - """ - 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. - """ - apple_pay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsApplePay" - ] - """ - Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. - """ - apple_pay_later: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsApplePayLater" - ] - """ - Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. - """ - au_becs_debit: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAuBecsDebit" - ] - """ - Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. - """ - bacs_debit: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsBacsDebit" - ] - """ - Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. - """ - bancontact: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsBancontact" - ] - """ - Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. - """ - blik: NotRequired["PaymentMethodConfiguration.ModifyParamsBlik"] - """ - BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. - """ - boleto: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsBoleto" - ] - """ - Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. - """ - card: NotRequired["PaymentMethodConfiguration.ModifyParamsCard"] - """ - Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. - """ - cartes_bancaires: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsCartesBancaires" - ] - """ - Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. - """ - cashapp: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsCashapp" - ] - """ - Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. - """ - eps: NotRequired["PaymentMethodConfiguration.ModifyParamsEps"] - """ - EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - fpx: NotRequired["PaymentMethodConfiguration.ModifyParamsFpx"] - """ - Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. - """ - giropay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsGiropay" - ] - """ - giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. - """ - google_pay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsGooglePay" - ] - """ - Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. - """ - grabpay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsGrabpay" - ] - """ - GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. - """ - ideal: NotRequired["PaymentMethodConfiguration.ModifyParamsIdeal"] - """ - iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. - """ - jcb: NotRequired["PaymentMethodConfiguration.ModifyParamsJcb"] - """ - JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. - """ - klarna: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsKlarna" - ] - """ - Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. - """ - konbini: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsKonbini" - ] - """ - Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. - """ - link: NotRequired["PaymentMethodConfiguration.ModifyParamsLink"] - """ - [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. - """ - name: NotRequired["str"] - """ - Configuration name. - """ - oxxo: NotRequired["PaymentMethodConfiguration.ModifyParamsOxxo"] - """ - OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. - """ - p24: NotRequired["PaymentMethodConfiguration.ModifyParamsP24"] - """ - Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. - """ - paynow: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsPaynow" - ] - """ - PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. - """ - paypal: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsPaypal" - ] - """ - PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. - """ - promptpay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsPromptpay" - ] - """ - PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. - """ - sepa_debit: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsSepaDebit" - ] - """ - The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. - """ - sofort: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsSofort" - ] - """ - Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. - """ - us_bank_account: NotRequired[ - "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. - """ - wechat_pay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsWechatPay" - ] - """ - WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. - """ + class ModifyParams(RequestOptions): + acss_debit: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsAcssDebit" + ] + """ + Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. + """ + active: NotRequired["bool"] + """ + Whether the configuration can be used for new payments. + """ + affirm: NotRequired["PaymentMethodConfiguration.ModifyParamsAffirm"] + """ + [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. + """ + afterpay_clearpay: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsAfterpayClearpay" + ] + """ + Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. + """ + alipay: NotRequired["PaymentMethodConfiguration.ModifyParamsAlipay"] + """ + 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. + """ + apple_pay: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsApplePay" + ] + """ + Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. + """ + apple_pay_later: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsApplePayLater" + ] + """ + Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. + """ + au_becs_debit: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsAuBecsDebit" + ] + """ + Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. + """ + bacs_debit: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsBacsDebit" + ] + """ + Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. + """ + bancontact: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsBancontact" + ] + """ + Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. + """ + blik: NotRequired["PaymentMethodConfiguration.ModifyParamsBlik"] + """ + BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. + """ + boleto: NotRequired["PaymentMethodConfiguration.ModifyParamsBoleto"] + """ + Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. + """ + card: NotRequired["PaymentMethodConfiguration.ModifyParamsCard"] + """ + Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. + """ + cartes_bancaires: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsCartesBancaires" + ] + """ + Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. + """ + cashapp: NotRequired["PaymentMethodConfiguration.ModifyParamsCashapp"] + """ + Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. + """ + eps: NotRequired["PaymentMethodConfiguration.ModifyParamsEps"] + """ + EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + fpx: NotRequired["PaymentMethodConfiguration.ModifyParamsFpx"] + """ + Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. + """ + giropay: NotRequired["PaymentMethodConfiguration.ModifyParamsGiropay"] + """ + giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. + """ + google_pay: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsGooglePay" + ] + """ + Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. + """ + grabpay: NotRequired["PaymentMethodConfiguration.ModifyParamsGrabpay"] + """ + GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. + """ + ideal: NotRequired["PaymentMethodConfiguration.ModifyParamsIdeal"] + """ + iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. + """ + jcb: NotRequired["PaymentMethodConfiguration.ModifyParamsJcb"] + """ + JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. + """ + klarna: NotRequired["PaymentMethodConfiguration.ModifyParamsKlarna"] + """ + Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. + """ + konbini: NotRequired["PaymentMethodConfiguration.ModifyParamsKonbini"] + """ + Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. + """ + link: NotRequired["PaymentMethodConfiguration.ModifyParamsLink"] + """ + [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. + """ + name: NotRequired["str"] + """ + Configuration name. + """ + oxxo: NotRequired["PaymentMethodConfiguration.ModifyParamsOxxo"] + """ + OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. + """ + p24: NotRequired["PaymentMethodConfiguration.ModifyParamsP24"] + """ + Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. + """ + paynow: NotRequired["PaymentMethodConfiguration.ModifyParamsPaynow"] + """ + PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. + """ + paypal: NotRequired["PaymentMethodConfiguration.ModifyParamsPaypal"] + """ + PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. + """ + promptpay: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsPromptpay" + ] + """ + PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. + """ + sepa_debit: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsSepaDebit" + ] + """ + The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. + """ + sofort: NotRequired["PaymentMethodConfiguration.ModifyParamsSofort"] + """ + Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. + """ + us_bank_account: NotRequired[ + "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. + """ + wechat_pay: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsWechatPay" + ] + """ + WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. + """ - class ModifyParamsWechatPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsWechatPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsWechatPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsWechatPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsWechatPayDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsWechatPayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsUsBankAccount(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsUsBankAccountDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsUsBankAccount(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsUsBankAccountDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsUsBankAccountDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsUsBankAccountDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsSofort(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsSofortDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsSofort(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsSofortDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsSofortDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsSofortDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsSepaDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsSepaDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsSepaDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsSepaDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsSepaDebitDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsSepaDebitDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsPromptpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsPromptpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsPromptpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsPromptpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsPromptpayDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsPromptpayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsPaypal(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsPaypalDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsPaypal(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsPaypalDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsPaypalDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsPaypalDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsPaynow(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsPaynowDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsPaynow(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsPaynowDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsPaynowDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsPaynowDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsP24(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsP24DisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsP24(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsP24DisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsP24DisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsP24DisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsOxxo(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsOxxoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsOxxo(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsOxxoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsOxxoDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsOxxoDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsLink(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsLinkDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsLink(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsLinkDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsLinkDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsLinkDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsKonbini(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsKonbiniDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsKonbini(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsKonbiniDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsKonbiniDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsKonbiniDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsKlarna(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsKlarnaDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsKlarna(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsKlarnaDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsKlarnaDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsKlarnaDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsJcb(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsJcbDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsJcb(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsJcbDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsJcbDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsJcbDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsIdeal(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsIdealDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsIdeal(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsIdealDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsIdealDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsIdealDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsGrabpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsGrabpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsGrabpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsGrabpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsGrabpayDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsGrabpayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsGooglePay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsGooglePayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsGooglePay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsGooglePayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsGooglePayDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsGooglePayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsGiropay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsGiropayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsGiropay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsGiropayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsGiropayDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsGiropayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsFpx(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsFpxDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsFpx(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsFpxDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsFpxDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsFpxDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsEps(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsEpsDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsEps(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsEpsDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsEpsDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsEpsDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsCashapp(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsCashappDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsCashapp(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsCashappDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsCashappDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsCashappDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsCartesBancaires(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsCartesBancairesDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsCartesBancaires(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsCartesBancairesDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsCartesBancairesDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsCartesBancairesDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsCard(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsCardDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsCard(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsCardDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsCardDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsCardDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsBoleto(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsBoletoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsBoleto(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsBoletoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsBoletoDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsBoletoDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsBlik(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsBlikDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsBlik(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsBlikDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsBlikDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsBlikDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsBancontact(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsBancontactDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsBancontact(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsBancontactDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsBancontactDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsBancontactDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsBacsDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsBacsDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsBacsDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsBacsDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsBacsDebitDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsBacsDebitDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsAuBecsDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAuBecsDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsAuBecsDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsAuBecsDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsAuBecsDebitDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsAuBecsDebitDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsApplePayLater(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsApplePayLaterDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsApplePayLater(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsApplePayLaterDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsApplePayLaterDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsApplePayLaterDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsApplePay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsApplePayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsApplePay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsApplePayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsApplePayDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsApplePayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsAlipay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAlipayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsAlipay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsAlipayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsAlipayDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsAlipayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsAfterpayClearpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAfterpayClearpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsAfterpayClearpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsAfterpayClearpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsAfterpayClearpayDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsAfterpayClearpayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsAffirm(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAffirmDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsAffirm(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsAffirmDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsAffirmDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsAffirmDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class ModifyParamsAcssDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAcssDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ + class ModifyParamsAcssDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsAcssDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ - class ModifyParamsAcssDebitDisplayPreference(TypedDict): - preference: NotRequired["Literal['none', 'off', 'on']"] - """ - The account's preference for whether or not to display this payment method. - """ + class ModifyParamsAcssDebitDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']"] + """ + The account's preference for whether or not to display this payment method. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ acss_debit: Optional[AcssDebit] active: bool diff --git a/stripe/api_resources/payment_method_domain.py b/stripe/api_resources/payment_method_domain.py index 14ec81192..cf6d51c8b 100644 --- a/stripe/api_resources/payment_method_domain.py +++ b/stripe/api_resources/payment_method_domain.py @@ -11,7 +11,7 @@ from stripe.stripe_object import StripeObject from stripe.util import class_method_variant from typing import ClassVar, List, Optional, cast, overload -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing_extensions import Literal, NotRequired, Unpack from urllib.parse import quote_plus @@ -99,69 +99,67 @@ class StatusDetails(StripeObject): """ _inner_class_types = {"status_details": StatusDetails} - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - domain_name: str - """ - The domain name that this payment method domain object represents. - """ - enabled: NotRequired["bool"] - """ - Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class CreateParams(RequestOptions): + domain_name: str + """ + The domain name that this payment method domain object represents. + """ + enabled: NotRequired["bool"] + """ + Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ListParams(RequestOptions): - domain_name: NotRequired["str"] - """ - The domain name that this payment method domain object represents. - """ - enabled: NotRequired["bool"] - """ - Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements - """ - 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 ListParams(RequestOptions): + domain_name: NotRequired["str"] + """ + The domain name that this payment method domain object represents. + """ + enabled: NotRequired["bool"] + """ + Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements + """ + 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): - enabled: NotRequired["bool"] - """ - Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ModifyParams(RequestOptions): + enabled: NotRequired["bool"] + """ + Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ValidateParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ValidateParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ apple_pay: ApplePay """ diff --git a/stripe/api_resources/payout.py b/stripe/api_resources/payout.py index 3cbd657f0..a48accf80 100644 --- a/stripe/api_resources/payout.py +++ b/stripe/api_resources/payout.py @@ -43,141 +43,140 @@ class Payout( """ OBJECT_NAME: ClassVar[Literal["payout"]] = "payout" - if TYPE_CHECKING: - - class CancelParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - amount: int - """ - A positive integer in cents representing how much to payout. - """ - 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). - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - destination: NotRequired["str"] - """ - The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency. - """ - expand: NotRequired["List[str]"] - """ - 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`. - """ - method: NotRequired["Literal['instant', 'standard']"] - """ - The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). - """ - source_type: NotRequired["Literal['bank_account', 'card', 'fpx']"] - """ - The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`. - """ - statement_descriptor: NotRequired["str"] - """ - A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. - """ - - class ListParams(RequestOptions): - arrival_date: NotRequired["Payout.ListParamsArrivalDate|int"] - created: NotRequired["Payout.ListParamsCreated|int"] - destination: NotRequired["str"] - """ - The ID of an external account - only return payouts sent to this external account. - """ - 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["str"] - """ - Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. - """ - - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ - - class ListParamsArrivalDate(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ - - class ModifyParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - - class ReverseParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - 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`. - """ + + class CancelParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + + class CreateParams(RequestOptions): + amount: int + """ + A positive integer in cents representing how much to payout. + """ + 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). + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + destination: NotRequired["str"] + """ + The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency. + """ + expand: NotRequired["List[str]"] + """ + 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`. + """ + method: NotRequired["Literal['instant', 'standard']"] + """ + The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). + """ + source_type: NotRequired["Literal['bank_account', 'card', 'fpx']"] + """ + The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`. + """ + statement_descriptor: NotRequired["str"] + """ + A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. + """ + + class ListParams(RequestOptions): + arrival_date: NotRequired["Payout.ListParamsArrivalDate|int"] + created: NotRequired["Payout.ListParamsCreated|int"] + destination: NotRequired["str"] + """ + The ID of an external account - only return payouts sent to this external account. + """ + 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["str"] + """ + Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. + """ + + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ + + class ListParamsArrivalDate(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ + + class ModifyParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + + class ReverseParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + 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`. + """ amount: int """ diff --git a/stripe/api_resources/plan.py b/stripe/api_resources/plan.py index 5690ae440..db01f0b74 100644 --- a/stripe/api_resources/plan.py +++ b/stripe/api_resources/plan.py @@ -76,227 +76,225 @@ class TransformUsage(StripeObject): After division, either round the result `up` or `down`. """ - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - active: NotRequired["bool"] - """ - Whether the plan is currently available for new subscriptions. Defaults to `true`. - """ - aggregate_usage: NotRequired[ - "Literal['last_during_period', 'last_ever', 'max', 'sum']" - ] - """ - Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. - """ - amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. - """ - amount_decimal: NotRequired["str"] - """ - Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. - """ - billing_scheme: NotRequired["Literal['per_unit', 'tiered']"] - """ - Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - """ - 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). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - id: NotRequired["str"] - """ - An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. - """ - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ - metadata: NotRequired["Literal['']|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`. - """ - nickname: NotRequired["str"] - """ - A brief description of the plan, hidden from customers. - """ - product: NotRequired["Plan.CreateParamsProduct|str"] - tiers: NotRequired["List[Plan.CreateParamsTier]"] - """ - Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. - """ - tiers_mode: NotRequired["Literal['graduated', 'volume']"] - """ - Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - """ - transform_usage: NotRequired["Plan.CreateParamsTransformUsage"] - """ - Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. - """ - trial_period_days: NotRequired["int"] - """ - Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). - """ - usage_type: NotRequired["Literal['licensed', 'metered']"] - """ - Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - """ + class CreateParams(RequestOptions): + active: NotRequired["bool"] + """ + Whether the plan is currently available for new subscriptions. Defaults to `true`. + """ + aggregate_usage: NotRequired[ + "Literal['last_during_period', 'last_ever', 'max', 'sum']" + ] + """ + Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + """ + amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. + """ + amount_decimal: NotRequired["str"] + """ + Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. + """ + billing_scheme: NotRequired["Literal['per_unit', 'tiered']"] + """ + Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + """ + 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). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + id: NotRequired["str"] + """ + An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. + """ + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ + metadata: NotRequired["Literal['']|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`. + """ + nickname: NotRequired["str"] + """ + A brief description of the plan, hidden from customers. + """ + product: NotRequired["Plan.CreateParamsProduct|str"] + tiers: NotRequired["List[Plan.CreateParamsTier]"] + """ + Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + """ + tiers_mode: NotRequired["Literal['graduated', 'volume']"] + """ + Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + """ + transform_usage: NotRequired["Plan.CreateParamsTransformUsage"] + """ + Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + """ + trial_period_days: NotRequired["int"] + """ + Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + """ + usage_type: NotRequired["Literal['licensed', 'metered']"] + """ + Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + """ - class CreateParamsTransformUsage(TypedDict): - divide_by: int - """ - Divide usage by this number. - """ - round: Literal["down", "up"] - """ - After division, either round the result `up` or `down`. - """ + class CreateParamsTransformUsage(TypedDict): + divide_by: int + """ + Divide usage by this number. + """ + round: Literal["down", "up"] + """ + After division, either round the result `up` or `down`. + """ - class CreateParamsTier(TypedDict): - flat_amount: NotRequired["int"] - """ - The flat billing amount for an entire tier, regardless of the number of units in the tier. - """ - flat_amount_decimal: NotRequired["str"] - """ - Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - """ - unit_amount: NotRequired["int"] - """ - The per unit billing amount for each individual unit for which this tier applies. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - up_to: Union[Literal["inf"], int] - """ - 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 CreateParamsTier(TypedDict): + flat_amount: NotRequired["int"] + """ + The flat billing amount for an entire tier, regardless of the number of units in the tier. + """ + flat_amount_decimal: NotRequired["str"] + """ + Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + """ + unit_amount: NotRequired["int"] + """ + The per unit billing amount for each individual unit for which this tier applies. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + up_to: Union[Literal["inf"], int] + """ + 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 CreateParamsProduct(TypedDict): - active: NotRequired["bool"] - """ - Whether the product is currently available for purchase. Defaults to `true`. - """ - id: NotRequired["str"] - """ - The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. - """ - 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`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - statement_descriptor: NotRequired["str"] - """ - An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + class CreateParamsProduct(TypedDict): + active: NotRequired["bool"] + """ + Whether the product is currently available for purchase. Defaults to `true`. + """ + id: NotRequired["str"] + """ + The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. + """ + 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`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + statement_descriptor: NotRequired["str"] + """ + An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - """ - tax_code: NotRequired["str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired["str"] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ + This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + """ + tax_code: NotRequired["str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + unit_label: NotRequired["str"] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + """ - class DeleteParams(RequestOptions): - pass + class DeleteParams(RequestOptions): + pass - class ListParams(RequestOptions): - active: NotRequired["bool"] - """ - Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). - """ - created: NotRequired["Plan.ListParamsCreated|int"] - """ - A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. - """ - 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. - """ - product: NotRequired["str"] - """ - Only return plans for the given product. - """ - 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 ListParams(RequestOptions): + active: NotRequired["bool"] + """ + Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). + """ + created: NotRequired["Plan.ListParamsCreated|int"] + """ + A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + """ + 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. + """ + product: NotRequired["str"] + """ + Only return plans for the given product. + """ + 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 ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - active: NotRequired["bool"] - """ - Whether the plan is currently available for new subscriptions. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - nickname: NotRequired["str"] - """ - A brief description of the plan, hidden from customers. - """ - product: NotRequired["str"] - """ - The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. - """ - trial_period_days: NotRequired["int"] - """ - Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). - """ + class ModifyParams(RequestOptions): + active: NotRequired["bool"] + """ + Whether the plan is currently available for new subscriptions. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + nickname: NotRequired["str"] + """ + A brief description of the plan, hidden from customers. + """ + product: NotRequired["str"] + """ + The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. + """ + trial_period_days: NotRequired["int"] + """ + Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ active: bool """ diff --git a/stripe/api_resources/price.py b/stripe/api_resources/price.py index 88b278912..4fc0489ca 100644 --- a/stripe/api_resources/price.py +++ b/stripe/api_resources/price.py @@ -176,467 +176,461 @@ class TransformQuantity(StripeObject): After division, either round the result `up` or `down`. """ - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - active: NotRequired["bool"] - """ - Whether the price can be used for new purchases. Defaults to `true`. - """ - billing_scheme: NotRequired["Literal['per_unit', 'tiered']"] - """ - Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - """ - 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). - """ - currency_options: NotRequired[ - "Dict[str, Price.CreateParamsCurrencyOptions]" - ] - """ - 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[ - "Price.CreateParamsCustomUnitAmount" - ] - """ - When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - lookup_key: NotRequired["str"] - """ - A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. - """ - 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`. - """ - nickname: NotRequired["str"] - """ - A brief description of the price, hidden from customers. - """ - product: NotRequired["str"] - """ - The ID of the product that this price will belong to. - """ - product_data: NotRequired["Price.CreateParamsProductData"] - """ - These fields can be used to create a new product that this price will belong to. - """ - recurring: NotRequired["Price.CreateParamsRecurring"] - """ - The recurring components of a price such as `interval` and `usage_type`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tiers: NotRequired["List[Price.CreateParamsTier]"] - """ - Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. - """ - tiers_mode: NotRequired["Literal['graduated', 'volume']"] - """ - Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - """ - transfer_lookup_key: NotRequired["bool"] - """ - If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. - """ - transform_quantity: NotRequired[ - "Price.CreateParamsTransformQuantity" - ] - """ - Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. - """ - 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 `custom_unit_amount` is required, unless `billing_scheme=tiered`. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class CreateParams(RequestOptions): + active: NotRequired["bool"] + """ + Whether the price can be used for new purchases. Defaults to `true`. + """ + billing_scheme: NotRequired["Literal['per_unit', 'tiered']"] + """ + Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + """ + 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). + """ + currency_options: NotRequired[ + "Dict[str, Price.CreateParamsCurrencyOptions]" + ] + """ + 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["Price.CreateParamsCustomUnitAmount"] + """ + When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + lookup_key: NotRequired["str"] + """ + A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + """ + 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`. + """ + nickname: NotRequired["str"] + """ + A brief description of the price, hidden from customers. + """ + product: NotRequired["str"] + """ + The ID of the product that this price will belong to. + """ + product_data: NotRequired["Price.CreateParamsProductData"] + """ + These fields can be used to create a new product that this price will belong to. + """ + recurring: NotRequired["Price.CreateParamsRecurring"] + """ + The recurring components of a price such as `interval` and `usage_type`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tiers: NotRequired["List[Price.CreateParamsTier]"] + """ + Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + """ + tiers_mode: NotRequired["Literal['graduated', 'volume']"] + """ + Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + """ + transfer_lookup_key: NotRequired["bool"] + """ + If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. + """ + transform_quantity: NotRequired["Price.CreateParamsTransformQuantity"] + """ + Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + """ + 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 `custom_unit_amount` is required, unless `billing_scheme=tiered`. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class CreateParamsTransformQuantity(TypedDict): - divide_by: int - """ - Divide usage by this number. - """ - round: Literal["down", "up"] - """ - After division, either round the result `up` or `down`. - """ + class CreateParamsTransformQuantity(TypedDict): + divide_by: int + """ + Divide usage by this number. + """ + round: Literal["down", "up"] + """ + After division, either round the result `up` or `down`. + """ - class CreateParamsTier(TypedDict): - flat_amount: NotRequired["int"] - """ - The flat billing amount for an entire tier, regardless of the number of units in the tier. - """ - flat_amount_decimal: NotRequired["str"] - """ - Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - """ - unit_amount: NotRequired["int"] - """ - The per unit billing amount for each individual unit for which this tier applies. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - up_to: Union[Literal["inf"], int] - """ - 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 CreateParamsTier(TypedDict): + flat_amount: NotRequired["int"] + """ + The flat billing amount for an entire tier, regardless of the number of units in the tier. + """ + flat_amount_decimal: NotRequired["str"] + """ + Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + """ + unit_amount: NotRequired["int"] + """ + The per unit billing amount for each individual unit for which this tier applies. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + up_to: Union[Literal["inf"], int] + """ + 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 CreateParamsRecurring(TypedDict): - aggregate_usage: NotRequired[ - "Literal['last_during_period', 'last_ever', 'max', 'sum']" - ] - """ - Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. - """ - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ - trial_period_days: NotRequired["int"] - """ - Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). - """ - usage_type: NotRequired["Literal['licensed', 'metered']"] - """ - Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - """ + class CreateParamsRecurring(TypedDict): + aggregate_usage: NotRequired[ + "Literal['last_during_period', 'last_ever', 'max', 'sum']" + ] + """ + Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + """ + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ + trial_period_days: NotRequired["int"] + """ + Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + """ + usage_type: NotRequired["Literal['licensed', 'metered']"] + """ + Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + """ - class CreateParamsProductData(TypedDict): - active: NotRequired["bool"] - """ - Whether the product is currently available for purchase. Defaults to `true`. - """ - id: NotRequired["str"] - """ - The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. - """ - 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`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - statement_descriptor: NotRequired["str"] - """ - An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + class CreateParamsProductData(TypedDict): + active: NotRequired["bool"] + """ + Whether the product is currently available for purchase. Defaults to `true`. + """ + id: NotRequired["str"] + """ + The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. + """ + 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`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + statement_descriptor: NotRequired["str"] + """ + An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - """ - tax_code: NotRequired["str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired["str"] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ + This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + """ + tax_code: NotRequired["str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + unit_label: NotRequired["str"] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + """ - class CreateParamsCustomUnitAmount(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 CreateParamsCustomUnitAmount(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 CreateParamsCurrencyOptions(TypedDict): - custom_unit_amount: NotRequired[ - "Price.CreateParamsCurrencyOptionsCustomUnitAmount" - ] - """ - When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tiers: NotRequired["List[Price.CreateParamsCurrencyOptionsTier]"] - """ - Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class CreateParamsCurrencyOptions(TypedDict): + custom_unit_amount: NotRequired[ + "Price.CreateParamsCurrencyOptionsCustomUnitAmount" + ] + """ + When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tiers: NotRequired["List[Price.CreateParamsCurrencyOptionsTier]"] + """ + Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class CreateParamsCurrencyOptionsTier(TypedDict): - flat_amount: NotRequired["int"] - """ - The flat billing amount for an entire tier, regardless of the number of units in the tier. - """ - flat_amount_decimal: NotRequired["str"] - """ - Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - """ - unit_amount: NotRequired["int"] - """ - The per unit billing amount for each individual unit for which this tier applies. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - up_to: Union[Literal["inf"], int] - """ - 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 CreateParamsCurrencyOptionsTier(TypedDict): + flat_amount: NotRequired["int"] + """ + The flat billing amount for an entire tier, regardless of the number of units in the tier. + """ + flat_amount_decimal: NotRequired["str"] + """ + Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + """ + unit_amount: NotRequired["int"] + """ + The per unit billing amount for each individual unit for which this tier applies. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + up_to: Union[Literal["inf"], int] + """ + 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 CreateParamsCurrencyOptionsCustomUnitAmount(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 CreateParamsCurrencyOptionsCustomUnitAmount(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 ListParams(RequestOptions): - active: NotRequired["bool"] - """ - Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). - """ - created: NotRequired["Price.ListParamsCreated|int"] - """ - A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. - """ - currency: NotRequired["str"] - """ - Only return prices for the given currency. - """ - 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. - """ - lookup_keys: NotRequired["List[str]"] - """ - Only return the price with these lookup_keys, if any exist. - """ - product: NotRequired["str"] - """ - Only return prices for the given product. - """ - recurring: NotRequired["Price.ListParamsRecurring"] - """ - Only return prices with these recurring fields. - """ - 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. - """ - type: NotRequired["Literal['one_time', 'recurring']"] - """ - Only return prices of type `recurring` or `one_time`. - """ + class ListParams(RequestOptions): + active: NotRequired["bool"] + """ + Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). + """ + created: NotRequired["Price.ListParamsCreated|int"] + """ + A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + """ + currency: NotRequired["str"] + """ + Only return prices for the given currency. + """ + 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. + """ + lookup_keys: NotRequired["List[str]"] + """ + Only return the price with these lookup_keys, if any exist. + """ + product: NotRequired["str"] + """ + Only return prices for the given product. + """ + recurring: NotRequired["Price.ListParamsRecurring"] + """ + Only return prices with these recurring fields. + """ + 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. + """ + type: NotRequired["Literal['one_time', 'recurring']"] + """ + Only return prices of type `recurring` or `one_time`. + """ - class ListParamsRecurring(TypedDict): - interval: NotRequired["Literal['day', 'month', 'week', 'year']"] - """ - Filter by billing frequency. Either `day`, `week`, `month` or `year`. - """ - usage_type: NotRequired["Literal['licensed', 'metered']"] - """ - Filter by the usage type for this price. Can be either `metered` or `licensed`. - """ + class ListParamsRecurring(TypedDict): + interval: NotRequired["Literal['day', 'month', 'week', 'year']"] + """ + Filter by billing frequency. Either `day`, `week`, `month` or `year`. + """ + usage_type: NotRequired["Literal['licensed', 'metered']"] + """ + Filter by the usage type for this price. Can be either `metered` or `licensed`. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - active: NotRequired["bool"] - """ - Whether the price can be used for new purchases. Defaults to `true`. - """ - currency_options: NotRequired[ - "Literal['']|Dict[str, Price.ModifyParamsCurrencyOptions]" - ] - """ - 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). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - lookup_key: NotRequired["str"] - """ - A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. - """ - metadata: NotRequired["Literal['']|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`. - """ - nickname: NotRequired["str"] - """ - A brief description of the price, hidden from customers. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - transfer_lookup_key: NotRequired["bool"] - """ - If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. - """ + class ModifyParams(RequestOptions): + active: NotRequired["bool"] + """ + Whether the price can be used for new purchases. Defaults to `true`. + """ + currency_options: NotRequired[ + "Literal['']|Dict[str, Price.ModifyParamsCurrencyOptions]" + ] + """ + 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). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + lookup_key: NotRequired["str"] + """ + A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + """ + metadata: NotRequired["Literal['']|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`. + """ + nickname: NotRequired["str"] + """ + A brief description of the price, hidden from customers. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + transfer_lookup_key: NotRequired["bool"] + """ + If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. + """ - class ModifyParamsCurrencyOptions(TypedDict): - custom_unit_amount: NotRequired[ - "Price.ModifyParamsCurrencyOptionsCustomUnitAmount" - ] - """ - When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tiers: NotRequired["List[Price.ModifyParamsCurrencyOptionsTier]"] - """ - Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class ModifyParamsCurrencyOptions(TypedDict): + custom_unit_amount: NotRequired[ + "Price.ModifyParamsCurrencyOptionsCustomUnitAmount" + ] + """ + When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tiers: NotRequired["List[Price.ModifyParamsCurrencyOptionsTier]"] + """ + Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class ModifyParamsCurrencyOptionsTier(TypedDict): - flat_amount: NotRequired["int"] - """ - The flat billing amount for an entire tier, regardless of the number of units in the tier. - """ - flat_amount_decimal: NotRequired["str"] - """ - Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - """ - unit_amount: NotRequired["int"] - """ - The per unit billing amount for each individual unit for which this tier applies. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - up_to: Union[Literal["inf"], int] - """ - 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 ModifyParamsCurrencyOptionsTier(TypedDict): + flat_amount: NotRequired["int"] + """ + The flat billing amount for an entire tier, regardless of the number of units in the tier. + """ + flat_amount_decimal: NotRequired["str"] + """ + Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + """ + unit_amount: NotRequired["int"] + """ + The per unit billing amount for each individual unit for which this tier applies. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + up_to: Union[Literal["inf"], int] + """ + 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 ModifyParamsCurrencyOptionsCustomUnitAmount(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 ModifyParamsCurrencyOptionsCustomUnitAmount(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 RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class SearchParams(RequestOptions): - 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. - """ - page: NotRequired["str"] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). - """ + class SearchParams(RequestOptions): + 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. + """ + page: NotRequired["str"] + """ + A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + """ + query: str + """ + The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). + """ active: bool """ @@ -765,7 +759,7 @@ def list( ] # pyright: ignore[reportGeneralTypeIssues] ) -> ListObject["Price"]: """ - Returns a list of your prices. + Returns a list of your active prices. For the list of inactive prices, set active to false. """ result = cls._static_request( "get", diff --git a/stripe/api_resources/product.py b/stripe/api_resources/product.py index 10a8a1678..93ba6e9c5 100644 --- a/stripe/api_resources/product.py +++ b/stripe/api_resources/product.py @@ -81,392 +81,384 @@ class PackageDimensions(StripeObject): Width, in inches. """ - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - active: NotRequired["bool"] - """ - Whether the product is currently available for purchase. Defaults to `true`. - """ - default_price_data: NotRequired[ - "Product.CreateParamsDefaultPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. - """ - description: NotRequired["str"] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - features: NotRequired["List[Product.CreateParamsFeature]"] - """ - A list of up to 15 features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). - """ - id: NotRequired["str"] - """ - An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. - """ - images: NotRequired["List[str]"] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - 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`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - package_dimensions: NotRequired[ - "Product.CreateParamsPackageDimensions" - ] - """ - The dimensions of this product for shipping purposes. - """ - shippable: NotRequired["bool"] - """ - Whether this product is shipped (i.e., physical goods). - """ - statement_descriptor: NotRequired["str"] - """ - An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - - This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - It must contain at least one letter. - """ - tax_code: NotRequired["str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - type: NotRequired["Literal['good', 'service']"] - """ - The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons. - """ - unit_label: NotRequired["str"] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - url: NotRequired["str"] - """ - A URL of a publicly-accessible webpage for this product. - """ - - class CreateParamsPackageDimensions(TypedDict): - height: float - """ - Height, in inches. Maximum precision is 2 decimal places. - """ - length: float - """ - Length, in inches. Maximum precision is 2 decimal places. - """ - weight: float - """ - Weight, in ounces. Maximum precision is 2 decimal places. - """ - width: float - """ - Width, in inches. Maximum precision is 2 decimal places. - """ - - class CreateParamsFeature(TypedDict): - name: str - """ - The feature's name. Up to 80 characters long. - """ - - class CreateParamsDefaultPriceData(TypedDict): - 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). - """ - currency_options: NotRequired[ - "Dict[str, Product.CreateParamsDefaultPriceDataCurrencyOptions]" - ] - """ - 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). - """ - recurring: NotRequired[ - "Product.CreateParamsDefaultPriceDataRecurring" - ] - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - 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. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsDefaultPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ - - class CreateParamsDefaultPriceDataCurrencyOptions(TypedDict): - custom_unit_amount: NotRequired[ - "Product.CreateParamsDefaultPriceDataCurrencyOptionsCustomUnitAmount" - ] - """ - When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tiers: NotRequired[ - "List[Product.CreateParamsDefaultPriceDataCurrencyOptionsTier]" - ] - """ - Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsDefaultPriceDataCurrencyOptionsTier(TypedDict): - flat_amount: NotRequired["int"] - """ - The flat billing amount for an entire tier, regardless of the number of units in the tier. - """ - flat_amount_decimal: NotRequired["str"] - """ - Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - """ - unit_amount: NotRequired["int"] - """ - The per unit billing amount for each individual unit for which this tier applies. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - up_to: Union[Literal["inf"], int] - """ - 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 CreateParamsDefaultPriceDataCurrencyOptionsCustomUnitAmount( - 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 DeleteParams(RequestOptions): - pass - - class ListParams(RequestOptions): - active: NotRequired["bool"] - """ - Only return products that are active or inactive (e.g., pass `false` to list all inactive products). - """ - created: NotRequired["Product.ListParamsCreated|int"] - """ - Only return products that were created during the given date interval. - """ - 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. - """ - ids: NotRequired["List[str]"] - """ - Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). - """ - 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. - """ - shippable: NotRequired["bool"] - """ - Only return products that can be shipped (i.e., physical, not digital products). - """ - 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. - """ - type: NotRequired["Literal['good', 'service']"] - """ - Only return products of this type. - """ - url: NotRequired["str"] - """ - Only return products with the given url. - """ - - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ - - class ModifyParams(RequestOptions): - active: NotRequired["bool"] - """ - Whether the product is available for purchase. - """ - default_price: NotRequired["str"] - """ - The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. - """ - description: NotRequired["Literal['']|str"] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - features: NotRequired[ - "Literal['']|List[Product.ModifyParamsFeature]" - ] - """ - A list of up to 15 features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). - """ - images: NotRequired["Literal['']|List[str]"] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired["Literal['']|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`. - """ - name: NotRequired["str"] - """ - The product's name, meant to be displayable to the customer. - """ - package_dimensions: NotRequired[ - "Literal['']|Product.ModifyParamsPackageDimensions" - ] - """ - The dimensions of this product for shipping purposes. - """ - shippable: NotRequired["bool"] - """ - Whether this product is shipped (i.e., physical goods). - """ - statement_descriptor: NotRequired["str"] - """ - An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - - This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - It must contain at least one letter. May only be set if `type=service`. - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired["Literal['']|str"] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`. - """ - url: NotRequired["Literal['']|str"] - """ - A URL of a publicly-accessible webpage for this product. - """ - - class ModifyParamsPackageDimensions(TypedDict): - height: float - """ - Height, in inches. Maximum precision is 2 decimal places. - """ - length: float - """ - Length, in inches. Maximum precision is 2 decimal places. - """ - weight: float - """ - Weight, in ounces. Maximum precision is 2 decimal places. - """ - width: float - """ - Width, in inches. Maximum precision is 2 decimal places. - """ - - class ModifyParamsFeature(TypedDict): - name: str - """ - The feature's name. Up to 80 characters long. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - - class SearchParams(RequestOptions): - 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. - """ - page: NotRequired["str"] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). - """ + class CreateParams(RequestOptions): + active: NotRequired["bool"] + """ + Whether the product is currently available for purchase. Defaults to `true`. + """ + default_price_data: NotRequired["Product.CreateParamsDefaultPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. + """ + description: NotRequired["str"] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + features: NotRequired["List[Product.CreateParamsFeature]"] + """ + A list of up to 15 features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + """ + id: NotRequired["str"] + """ + An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. + """ + images: NotRequired["List[str]"] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + 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`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + package_dimensions: NotRequired[ + "Product.CreateParamsPackageDimensions" + ] + """ + The dimensions of this product for shipping purposes. + """ + shippable: NotRequired["bool"] + """ + Whether this product is shipped (i.e., physical goods). + """ + statement_descriptor: NotRequired["str"] + """ + An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + + This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + It must contain at least one letter. + """ + tax_code: NotRequired["str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + type: NotRequired["Literal['good', 'service']"] + """ + The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons. + """ + unit_label: NotRequired["str"] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + """ + url: NotRequired["str"] + """ + A URL of a publicly-accessible webpage for this product. + """ + + class CreateParamsPackageDimensions(TypedDict): + height: float + """ + Height, in inches. Maximum precision is 2 decimal places. + """ + length: float + """ + Length, in inches. Maximum precision is 2 decimal places. + """ + weight: float + """ + Weight, in ounces. Maximum precision is 2 decimal places. + """ + width: float + """ + Width, in inches. Maximum precision is 2 decimal places. + """ + + class CreateParamsFeature(TypedDict): + name: str + """ + The feature's name. Up to 80 characters long. + """ + + class CreateParamsDefaultPriceData(TypedDict): + 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). + """ + currency_options: NotRequired[ + "Dict[str, Product.CreateParamsDefaultPriceDataCurrencyOptions]" + ] + """ + 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). + """ + recurring: NotRequired["Product.CreateParamsDefaultPriceDataRecurring"] + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + 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. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + class CreateParamsDefaultPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ + + class CreateParamsDefaultPriceDataCurrencyOptions(TypedDict): + custom_unit_amount: NotRequired[ + "Product.CreateParamsDefaultPriceDataCurrencyOptionsCustomUnitAmount" + ] + """ + When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tiers: NotRequired[ + "List[Product.CreateParamsDefaultPriceDataCurrencyOptionsTier]" + ] + """ + Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + class CreateParamsDefaultPriceDataCurrencyOptionsTier(TypedDict): + flat_amount: NotRequired["int"] + """ + The flat billing amount for an entire tier, regardless of the number of units in the tier. + """ + flat_amount_decimal: NotRequired["str"] + """ + Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + """ + unit_amount: NotRequired["int"] + """ + The per unit billing amount for each individual unit for which this tier applies. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + up_to: Union[Literal["inf"], int] + """ + 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 CreateParamsDefaultPriceDataCurrencyOptionsCustomUnitAmount( + 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 DeleteParams(RequestOptions): + pass + + class ListParams(RequestOptions): + active: NotRequired["bool"] + """ + Only return products that are active or inactive (e.g., pass `false` to list all inactive products). + """ + created: NotRequired["Product.ListParamsCreated|int"] + """ + Only return products that were created during the given date interval. + """ + 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. + """ + ids: NotRequired["List[str]"] + """ + Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). + """ + 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. + """ + shippable: NotRequired["bool"] + """ + Only return products that can be shipped (i.e., physical, not digital products). + """ + 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. + """ + type: NotRequired["Literal['good', 'service']"] + """ + Only return products of this type. + """ + url: NotRequired["str"] + """ + Only return products with the given url. + """ + + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ + + class ModifyParams(RequestOptions): + active: NotRequired["bool"] + """ + Whether the product is available for purchase. + """ + default_price: NotRequired["str"] + """ + The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + """ + description: NotRequired["Literal['']|str"] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + features: NotRequired["Literal['']|List[Product.ModifyParamsFeature]"] + """ + A list of up to 15 features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + """ + images: NotRequired["Literal['']|List[str]"] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + metadata: NotRequired["Literal['']|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`. + """ + name: NotRequired["str"] + """ + The product's name, meant to be displayable to the customer. + """ + package_dimensions: NotRequired[ + "Literal['']|Product.ModifyParamsPackageDimensions" + ] + """ + The dimensions of this product for shipping purposes. + """ + shippable: NotRequired["bool"] + """ + Whether this product is shipped (i.e., physical goods). + """ + statement_descriptor: NotRequired["str"] + """ + An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + + This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + It must contain at least one letter. May only be set if `type=service`. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + unit_label: NotRequired["Literal['']|str"] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`. + """ + url: NotRequired["Literal['']|str"] + """ + A URL of a publicly-accessible webpage for this product. + """ + + class ModifyParamsPackageDimensions(TypedDict): + height: float + """ + Height, in inches. Maximum precision is 2 decimal places. + """ + length: float + """ + Length, in inches. Maximum precision is 2 decimal places. + """ + weight: float + """ + Weight, in ounces. Maximum precision is 2 decimal places. + """ + width: float + """ + Width, in inches. Maximum precision is 2 decimal places. + """ + + class ModifyParamsFeature(TypedDict): + name: str + """ + The feature's name. Up to 80 characters long. + """ + + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + + class SearchParams(RequestOptions): + 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. + """ + page: NotRequired["str"] + """ + A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + """ + query: str + """ + The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). + """ active: bool """ diff --git a/stripe/api_resources/promotion_code.py b/stripe/api_resources/promotion_code.py index 17d878e50..6945a2c59 100644 --- a/stripe/api_resources/promotion_code.py +++ b/stripe/api_resources/promotion_code.py @@ -62,165 +62,163 @@ class CurrencyOptions(StripeObject): _inner_class_types = {"currency_options": CurrencyOptions} _inner_class_dicts = ["currency_options"] - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - active: NotRequired["bool"] - """ - Whether the promotion code is currently active. - """ - 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. - """ - coupon: str - """ - The coupon for this promotion code. - """ - customer: NotRequired["str"] - """ - The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired["int"] - """ - The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. - """ - max_redemptions: NotRequired["int"] - """ - A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. - """ - 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`. - """ - restrictions: NotRequired["PromotionCode.CreateParamsRestrictions"] - """ - Settings that restrict the redemption of the promotion code. - """ + class CreateParams(RequestOptions): + active: NotRequired["bool"] + """ + Whether the promotion code is currently active. + """ + 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. + """ + coupon: str + """ + The coupon for this promotion code. + """ + customer: NotRequired["str"] + """ + The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["int"] + """ + The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + """ + max_redemptions: NotRequired["int"] + """ + A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. + """ + 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`. + """ + restrictions: NotRequired["PromotionCode.CreateParamsRestrictions"] + """ + Settings that restrict the redemption of the promotion code. + """ - class CreateParamsRestrictions(TypedDict): - currency_options: NotRequired[ - "Dict[str, PromotionCode.CreateParamsRestrictionsCurrencyOptions]" - ] - """ - Promotion codes 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). - """ - first_time_transaction: NotRequired["bool"] - """ - A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices - """ - minimum_amount: NotRequired["int"] - """ - Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). - """ - minimum_amount_currency: NotRequired["str"] - """ - Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount - """ + class CreateParamsRestrictions(TypedDict): + currency_options: NotRequired[ + "Dict[str, PromotionCode.CreateParamsRestrictionsCurrencyOptions]" + ] + """ + Promotion codes 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). + """ + first_time_transaction: NotRequired["bool"] + """ + A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices + """ + minimum_amount: NotRequired["int"] + """ + Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + """ + minimum_amount_currency: NotRequired["str"] + """ + Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount + """ - class CreateParamsRestrictionsCurrencyOptions(TypedDict): - minimum_amount: NotRequired["int"] - """ - Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). - """ + class CreateParamsRestrictionsCurrencyOptions(TypedDict): + minimum_amount: NotRequired["int"] + """ + Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + """ - class ListParams(RequestOptions): - active: NotRequired["bool"] - """ - Filter promotion codes by whether they are active. - """ - code: NotRequired["str"] - """ - Only return promotion codes that have this case-insensitive code. - """ - coupon: NotRequired["str"] - """ - Only return promotion codes for this coupon. - """ - created: NotRequired["PromotionCode.ListParamsCreated|int"] - """ - A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. - """ - customer: NotRequired["str"] - """ - Only return promotion codes that are restricted to 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 ListParams(RequestOptions): + active: NotRequired["bool"] + """ + Filter promotion codes by whether they are active. + """ + code: NotRequired["str"] + """ + Only return promotion codes that have this case-insensitive code. + """ + coupon: NotRequired["str"] + """ + Only return promotion codes for this coupon. + """ + created: NotRequired["PromotionCode.ListParamsCreated|int"] + """ + A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + """ + customer: NotRequired["str"] + """ + Only return promotion codes that are restricted to 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 ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - active: NotRequired["bool"] - """ - Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - restrictions: NotRequired["PromotionCode.ModifyParamsRestrictions"] - """ - Settings that restrict the redemption of the promotion code. - """ + class ModifyParams(RequestOptions): + active: NotRequired["bool"] + """ + Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + restrictions: NotRequired["PromotionCode.ModifyParamsRestrictions"] + """ + Settings that restrict the redemption of the promotion code. + """ - class ModifyParamsRestrictions(TypedDict): - currency_options: NotRequired[ - "Dict[str, PromotionCode.ModifyParamsRestrictionsCurrencyOptions]" - ] - """ - Promotion codes 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). - """ + class ModifyParamsRestrictions(TypedDict): + currency_options: NotRequired[ + "Dict[str, PromotionCode.ModifyParamsRestrictionsCurrencyOptions]" + ] + """ + Promotion codes 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). + """ - class ModifyParamsRestrictionsCurrencyOptions(TypedDict): - minimum_amount: NotRequired["int"] - """ - Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). - """ + class ModifyParamsRestrictionsCurrencyOptions(TypedDict): + minimum_amount: NotRequired["int"] + """ + Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ active: bool """ diff --git a/stripe/api_resources/quote.py b/stripe/api_resources/quote.py index d5bacda66..efb572413 100644 --- a/stripe/api_resources/quote.py +++ b/stripe/api_resources/quote.py @@ -399,517 +399,501 @@ class TransferData(StripeObject): The account where funds from the payment will be transferred to upon payment success. """ - if TYPE_CHECKING: - - class AcceptParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class AcceptParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CancelParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class CancelParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CreateParams(RequestOptions): - application_fee_amount: NotRequired["Literal['']|int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. - """ - application_fee_percent: NotRequired["Literal['']|float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. - """ - automatic_tax: NotRequired["Quote.CreateParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. - """ - collection_method: NotRequired[ - "Literal['charge_automatically', 'send_invoice']" - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. - """ - customer: NotRequired["str"] - """ - The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that will apply to any line item that does not have `tax_rates` set. - """ - description: NotRequired["Literal['']|str"] - """ - A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. - """ - discounts: NotRequired[ - "Literal['']|List[Quote.CreateParamsDiscount]" - ] - """ - The discounts applied to the quote. You can only set up to one discount. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired["int"] - """ - A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. - """ - footer: NotRequired["Literal['']|str"] - """ - A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. - """ - from_quote: NotRequired["Quote.CreateParamsFromQuote"] - """ - Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. - """ - header: NotRequired["Literal['']|str"] - """ - A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. - """ - invoice_settings: NotRequired["Quote.CreateParamsInvoiceSettings"] - """ - All invoices will be billed using the specified settings. - """ - line_items: NotRequired["List[Quote.CreateParamsLineItem]"] - """ - A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. - """ - 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`. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge. - """ - subscription_data: NotRequired[ - "Quote.CreateParamsSubscriptionData" - ] - """ - When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. - """ - test_clock: NotRequired["str"] - """ - ID of the test clock to attach to the quote. - """ - transfer_data: NotRequired[ - "Literal['']|Quote.CreateParamsTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the invoices. - """ + class CreateParams(RequestOptions): + application_fee_amount: NotRequired["Literal['']|int"] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. + """ + application_fee_percent: NotRequired["Literal['']|float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + """ + automatic_tax: NotRequired["Quote.CreateParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + """ + collection_method: NotRequired[ + "Literal['charge_automatically', 'send_invoice']" + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + """ + customer: NotRequired["str"] + """ + The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates that will apply to any line item that does not have `tax_rates` set. + """ + description: NotRequired["Literal['']|str"] + """ + A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + """ + discounts: NotRequired["Literal['']|List[Quote.CreateParamsDiscount]"] + """ + The discounts applied to the quote. You can only set up to one discount. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["int"] + """ + A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + """ + footer: NotRequired["Literal['']|str"] + """ + A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + """ + from_quote: NotRequired["Quote.CreateParamsFromQuote"] + """ + Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. + """ + header: NotRequired["Literal['']|str"] + """ + A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + """ + invoice_settings: NotRequired["Quote.CreateParamsInvoiceSettings"] + """ + All invoices will be billed using the specified settings. + """ + line_items: NotRequired["List[Quote.CreateParamsLineItem]"] + """ + A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. + """ + 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`. + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account on behalf of which to charge. + """ + subscription_data: NotRequired["Quote.CreateParamsSubscriptionData"] + """ + When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + """ + test_clock: NotRequired["str"] + """ + ID of the test clock to attach to the quote. + """ + transfer_data: NotRequired[ + "Literal['']|Quote.CreateParamsTransferData" + ] + """ + The data with which to automatically create a Transfer for each of the invoices. + """ - class CreateParamsTransferData(TypedDict): - amount: NotRequired["int"] - """ - The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. - """ - amount_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ + class CreateParamsTransferData(TypedDict): + amount: NotRequired["int"] + """ + The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + """ + amount_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ - class CreateParamsSubscriptionData(TypedDict): - description: NotRequired["str"] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - effective_date: NotRequired[ - "Literal['']|Literal['current_period_end']|int" - ] - """ - When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. - """ - metadata: NotRequired["Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - trial_period_days: NotRequired["Literal['']|int"] - """ - Integer representing the number of trial period days before the customer is charged for the first time. - """ + class CreateParamsSubscriptionData(TypedDict): + description: NotRequired["str"] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + effective_date: NotRequired[ + "Literal['']|Literal['current_period_end']|int" + ] + """ + When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + """ + metadata: NotRequired["Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + """ + trial_period_days: NotRequired["Literal['']|int"] + """ + Integer representing the number of trial period days before the customer is charged for the first time. + """ - class CreateParamsLineItem(TypedDict): - price: NotRequired["str"] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired["Quote.CreateParamsLineItemPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired["int"] - """ - The quantity of the line item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. - """ + class CreateParamsLineItem(TypedDict): + price: NotRequired["str"] + """ + The ID of the price object. One of `price` or `price_data` is required. + """ + price_data: NotRequired["Quote.CreateParamsLineItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired["int"] + """ + The quantity of the line item. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. + """ - class CreateParamsLineItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - recurring: NotRequired[ - "Quote.CreateParamsLineItemPriceDataRecurring" - ] - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class CreateParamsLineItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + recurring: NotRequired["Quote.CreateParamsLineItemPriceDataRecurring"] + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class CreateParamsLineItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ + class CreateParamsLineItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ - class CreateParamsInvoiceSettings(TypedDict): - days_until_due: NotRequired["int"] - """ - Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. - """ + class CreateParamsInvoiceSettings(TypedDict): + days_until_due: NotRequired["int"] + """ + Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. + """ - class CreateParamsFromQuote(TypedDict): - is_revision: NotRequired["bool"] - """ - Whether this quote is a revision of the previous quote. - """ - quote: str - """ - The `id` of the quote that will be cloned. - """ + class CreateParamsFromQuote(TypedDict): + is_revision: NotRequired["bool"] + """ + Whether this quote is a revision of the previous quote. + """ + quote: str + """ + The `id` of the quote that will be cloned. + """ - class CreateParamsDiscount(TypedDict): - coupon: NotRequired["str"] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired["str"] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ + class CreateParamsDiscount(TypedDict): + coupon: NotRequired["str"] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired["str"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. - """ + class CreateParamsAutomaticTax(TypedDict): + enabled: bool + """ + Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. + """ - class FinalizeQuoteParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired["int"] - """ - A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. - """ + class FinalizeQuoteParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["int"] + """ + A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + """ - class ListParams(RequestOptions): - customer: NotRequired["str"] - """ - The ID of the customer whose quotes will be retrieved. - """ - 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['accepted', 'canceled', 'draft', 'open']" - ] - """ - The status of the quote. - """ - test_clock: NotRequired["str"] - """ - Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. - """ + class ListParams(RequestOptions): + customer: NotRequired["str"] + """ + The ID of the customer whose quotes will be retrieved. + """ + 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['accepted', 'canceled', 'draft', 'open']"] + """ + The status of the quote. + """ + test_clock: NotRequired["str"] + """ + Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. + """ - class ListComputedUpfrontLineItemsParams(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. - """ + class ListComputedUpfrontLineItemsParams(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. + """ - class ListLineItemsParams(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. - """ + class ListLineItemsParams(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. + """ - class ModifyParams(RequestOptions): - application_fee_amount: NotRequired["Literal['']|int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. - """ - application_fee_percent: NotRequired["Literal['']|float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. - """ - automatic_tax: NotRequired["Quote.ModifyParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. - """ - collection_method: NotRequired[ - "Literal['charge_automatically', 'send_invoice']" - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. - """ - customer: NotRequired["str"] - """ - The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that will apply to any line item that does not have `tax_rates` set. - """ - description: NotRequired["Literal['']|str"] - """ - A description that will be displayed on the quote PDF. - """ - discounts: NotRequired[ - "Literal['']|List[Quote.ModifyParamsDiscount]" - ] - """ - The discounts applied to the quote. You can only set up to one discount. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired["int"] - """ - A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. - """ - footer: NotRequired["Literal['']|str"] - """ - A footer that will be displayed on the quote PDF. - """ - header: NotRequired["Literal['']|str"] - """ - A header that will be displayed on the quote PDF. - """ - invoice_settings: NotRequired["Quote.ModifyParamsInvoiceSettings"] - """ - All invoices will be billed using the specified settings. - """ - line_items: NotRequired["List[Quote.ModifyParamsLineItem]"] - """ - A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. - """ - 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`. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge. - """ - subscription_data: NotRequired[ - "Quote.ModifyParamsSubscriptionData" - ] - """ - When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. - """ - transfer_data: NotRequired[ - "Literal['']|Quote.ModifyParamsTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the invoices. - """ + class ModifyParams(RequestOptions): + application_fee_amount: NotRequired["Literal['']|int"] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. + """ + application_fee_percent: NotRequired["Literal['']|float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + """ + automatic_tax: NotRequired["Quote.ModifyParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + """ + collection_method: NotRequired[ + "Literal['charge_automatically', 'send_invoice']" + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + """ + customer: NotRequired["str"] + """ + The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates that will apply to any line item that does not have `tax_rates` set. + """ + description: NotRequired["Literal['']|str"] + """ + A description that will be displayed on the quote PDF. + """ + discounts: NotRequired["Literal['']|List[Quote.ModifyParamsDiscount]"] + """ + The discounts applied to the quote. You can only set up to one discount. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["int"] + """ + A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + """ + footer: NotRequired["Literal['']|str"] + """ + A footer that will be displayed on the quote PDF. + """ + header: NotRequired["Literal['']|str"] + """ + A header that will be displayed on the quote PDF. + """ + invoice_settings: NotRequired["Quote.ModifyParamsInvoiceSettings"] + """ + All invoices will be billed using the specified settings. + """ + line_items: NotRequired["List[Quote.ModifyParamsLineItem]"] + """ + A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. + """ + 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`. + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account on behalf of which to charge. + """ + subscription_data: NotRequired["Quote.ModifyParamsSubscriptionData"] + """ + When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + """ + transfer_data: NotRequired[ + "Literal['']|Quote.ModifyParamsTransferData" + ] + """ + The data with which to automatically create a Transfer for each of the invoices. + """ - class ModifyParamsTransferData(TypedDict): - amount: NotRequired["int"] - """ - The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. - """ - amount_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ + class ModifyParamsTransferData(TypedDict): + amount: NotRequired["int"] + """ + The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + """ + amount_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ - class ModifyParamsSubscriptionData(TypedDict): - description: NotRequired["Literal['']|str"] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - effective_date: NotRequired[ - "Literal['']|Literal['current_period_end']|int" - ] - """ - When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. - """ - metadata: NotRequired["Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - trial_period_days: NotRequired["Literal['']|int"] - """ - Integer representing the number of trial period days before the customer is charged for the first time. - """ + class ModifyParamsSubscriptionData(TypedDict): + description: NotRequired["Literal['']|str"] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + effective_date: NotRequired[ + "Literal['']|Literal['current_period_end']|int" + ] + """ + When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + """ + metadata: NotRequired["Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + """ + trial_period_days: NotRequired["Literal['']|int"] + """ + Integer representing the number of trial period days before the customer is charged for the first time. + """ - class ModifyParamsLineItem(TypedDict): - id: NotRequired["str"] - """ - The ID of an existing line item on the quote. - """ - price: NotRequired["str"] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired["Quote.ModifyParamsLineItemPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired["int"] - """ - The quantity of the line item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. - """ + class ModifyParamsLineItem(TypedDict): + id: NotRequired["str"] + """ + The ID of an existing line item on the quote. + """ + price: NotRequired["str"] + """ + The ID of the price object. One of `price` or `price_data` is required. + """ + price_data: NotRequired["Quote.ModifyParamsLineItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired["int"] + """ + The quantity of the line item. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. + """ - class ModifyParamsLineItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - recurring: NotRequired[ - "Quote.ModifyParamsLineItemPriceDataRecurring" - ] - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class ModifyParamsLineItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + recurring: NotRequired["Quote.ModifyParamsLineItemPriceDataRecurring"] + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class ModifyParamsLineItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ + class ModifyParamsLineItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ - class ModifyParamsInvoiceSettings(TypedDict): - days_until_due: NotRequired["int"] - """ - Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. - """ + class ModifyParamsInvoiceSettings(TypedDict): + days_until_due: NotRequired["int"] + """ + Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. + """ - class ModifyParamsDiscount(TypedDict): - coupon: NotRequired["str"] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired["str"] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ + class ModifyParamsDiscount(TypedDict): + coupon: NotRequired["str"] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired["str"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ - class ModifyParamsAutomaticTax(TypedDict): - enabled: bool - """ - Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. - """ + class ModifyParamsAutomaticTax(TypedDict): + enabled: bool + """ + Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ amount_subtotal: int """ @@ -1543,9 +1527,8 @@ def _cls_pdf( return response @overload - @classmethod + @staticmethod def pdf( - cls, sid, api_key=None, idempotency_key=None, diff --git a/stripe/api_resources/radar/early_fraud_warning.py b/stripe/api_resources/radar/early_fraud_warning.py index ca3f3f722..02795e374 100644 --- a/stripe/api_resources/radar/early_fraud_warning.py +++ b/stripe/api_resources/radar/early_fraud_warning.py @@ -23,39 +23,38 @@ class EarlyFraudWarning(ListableAPIResource["EarlyFraudWarning"]): OBJECT_NAME: ClassVar[ Literal["radar.early_fraud_warning"] ] = "radar.early_fraud_warning" - if TYPE_CHECKING: - class ListParams(RequestOptions): - charge: NotRequired["str"] - """ - Only return early fraud warnings for the charge specified by this charge ID. - """ - 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. - """ - payment_intent: NotRequired["str"] - """ - Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. - """ - 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 ListParams(RequestOptions): + charge: NotRequired["str"] + """ + Only return early fraud warnings for the charge specified by this charge ID. + """ + 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. + """ + payment_intent: NotRequired["str"] + """ + Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. + """ + 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. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ actionable: bool """ diff --git a/stripe/api_resources/radar/value_list.py b/stripe/api_resources/radar/value_list.py index a3deddfd1..08a970eb0 100644 --- a/stripe/api_resources/radar/value_list.py +++ b/stripe/api_resources/radar/value_list.py @@ -36,103 +36,102 @@ class ValueList( """ OBJECT_NAME: ClassVar[Literal["radar.value_list"]] = "radar.value_list" - if TYPE_CHECKING: - class CreateParams(RequestOptions): - alias: str - """ - The name of the value list for use in rules. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - item_type: NotRequired[ - "Literal['card_bin', 'card_fingerprint', 'case_sensitive_string', 'country', 'customer_id', 'email', 'ip_address', 'sepa_debit_fingerprint', 'string', 'us_bank_account_fingerprint']" - ] - """ - Type of the items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. - """ - 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`. - """ - name: str - """ - The human-readable name of the value list. - """ + class CreateParams(RequestOptions): + alias: str + """ + The name of the value list for use in rules. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + item_type: NotRequired[ + "Literal['card_bin', 'card_fingerprint', 'case_sensitive_string', 'country', 'customer_id', 'email', 'ip_address', 'sepa_debit_fingerprint', 'string', 'us_bank_account_fingerprint']" + ] + """ + Type of the items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. + """ + 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`. + """ + name: str + """ + The human-readable name of the value list. + """ - class DeleteParams(RequestOptions): - pass + class DeleteParams(RequestOptions): + pass - class ListParams(RequestOptions): - alias: NotRequired["str"] - """ - The alias used to reference the value list when writing rules. - """ - contains: NotRequired["str"] - """ - A value contained within a value list - returns all value lists containing this value. - """ - created: NotRequired["ValueList.ListParamsCreated|int"] - 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 ListParams(RequestOptions): + alias: NotRequired["str"] + """ + The alias used to reference the value list when writing rules. + """ + contains: NotRequired["str"] + """ + A value contained within a value list - returns all value lists containing this value. + """ + created: NotRequired["ValueList.ListParamsCreated|int"] + 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 ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - alias: NotRequired["str"] - """ - The name of the value list for use in rules. - """ - expand: NotRequired["List[str]"] - """ - 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`. - """ - name: NotRequired["str"] - """ - The human-readable name of the value list. - """ + class ModifyParams(RequestOptions): + alias: NotRequired["str"] + """ + The name of the value list for use in rules. + """ + expand: NotRequired["List[str]"] + """ + 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`. + """ + name: NotRequired["str"] + """ + The human-readable name of the value list. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ alias: str """ diff --git a/stripe/api_resources/radar/value_list_item.py b/stripe/api_resources/radar/value_list_item.py index 34aa0b3af..c1457a8d3 100644 --- a/stripe/api_resources/radar/value_list_item.py +++ b/stripe/api_resources/radar/value_list_item.py @@ -9,13 +9,7 @@ from stripe.request_options import RequestOptions from stripe.util import class_method_variant from typing import ClassVar, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, NotRequired, TypedDict, Unpack from urllib.parse import quote_plus @@ -33,75 +27,74 @@ class ValueListItem( OBJECT_NAME: ClassVar[ Literal["radar.value_list_item"] ] = "radar.value_list_item" - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - value: str - """ - The value of the item (whose type must match the type of the parent value list). - """ - value_list: str - """ - The identifier of the value list which the created item will be added to. - """ - - class DeleteParams(RequestOptions): - pass - - class ListParams(RequestOptions): - created: NotRequired["ValueListItem.ListParamsCreated|int"] - 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. - """ - value: NotRequired["str"] - """ - Return items belonging to the parent list whose value matches the specified value (using an "is like" match). - """ - value_list: str - """ - Identifier for the parent value list this item belongs to. - """ - - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + + class CreateParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + value: str + """ + The value of the item (whose type must match the type of the parent value list). + """ + value_list: str + """ + The identifier of the value list which the created item will be added to. + """ + + class DeleteParams(RequestOptions): + pass + + class ListParams(RequestOptions): + created: NotRequired["ValueListItem.ListParamsCreated|int"] + 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. + """ + value: NotRequired["str"] + """ + Return items belonging to the parent list whose value matches the specified value (using an "is like" match). + """ + value_list: str + """ + Identifier for the parent value list this item belongs to. + """ + + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ + + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ created: int """ diff --git a/stripe/api_resources/refund.py b/stripe/api_resources/refund.py index 02c0647d1..2571ccecb 100644 --- a/stripe/api_resources/refund.py +++ b/stripe/api_resources/refund.py @@ -67,104 +67,102 @@ class EmailSent(StripeObject): """ _inner_class_types = {"display_details": DisplayDetails} - if TYPE_CHECKING: - - class CancelParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class CancelParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CreateParams(RequestOptions): - amount: NotRequired["int"] - charge: NotRequired["str"] - """ - The identifier of the charge to refund. - """ - currency: NotRequired["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). - """ - customer: NotRequired["str"] - """ - Customer whose customer balance to refund from. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - instructions_email: NotRequired["str"] - """ - For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions. - """ - metadata: NotRequired["Literal['']|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`. - """ - origin: NotRequired["Literal['customer_balance']"] - """ - Origin of the refund - """ - payment_intent: NotRequired["str"] - """ - The identifier of the PaymentIntent to refund. - """ - reason: NotRequired[ - "Literal['duplicate', 'fraudulent', 'requested_by_customer']" - ] - """ - String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms. - """ - refund_application_fee: NotRequired["bool"] - """ - Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. - """ - reverse_transfer: NotRequired["bool"] - """ - Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). + class CreateParams(RequestOptions): + amount: NotRequired["int"] + charge: NotRequired["str"] + """ + The identifier of the charge to refund. + """ + currency: NotRequired["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). + """ + customer: NotRequired["str"] + """ + Customer whose customer balance to refund from. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + instructions_email: NotRequired["str"] + """ + For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions. + """ + metadata: NotRequired["Literal['']|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`. + """ + origin: NotRequired["Literal['customer_balance']"] + """ + Origin of the refund + """ + payment_intent: NotRequired["str"] + """ + The identifier of the PaymentIntent to refund. + """ + reason: NotRequired[ + "Literal['duplicate', 'fraudulent', 'requested_by_customer']" + ] + """ + String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms. + """ + refund_application_fee: NotRequired["bool"] + """ + Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + """ + reverse_transfer: NotRequired["bool"] + """ + Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). - A transfer can be reversed only by the application that created the charge. - """ + A transfer can be reversed only by the application that created the charge. + """ - 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. - """ + 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. + """ - class ModifyParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ + class ModifyParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ExpireParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ExpireParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ amount: int """ diff --git a/stripe/api_resources/reporting/report_run.py b/stripe/api_resources/reporting/report_run.py index 3d1d6de03..0a7788890 100644 --- a/stripe/api_resources/reporting/report_run.py +++ b/stripe/api_resources/reporting/report_run.py @@ -73,102 +73,100 @@ class Parameters(StripeObject): Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. """ - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - parameters: NotRequired["ReportRun.CreateParamsParameters"] - """ - Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. - """ - report_type: str - """ - The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. - """ + class CreateParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + parameters: NotRequired["ReportRun.CreateParamsParameters"] + """ + Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + """ + report_type: str + """ + The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. + """ - class CreateParamsParameters(TypedDict): - columns: NotRequired["List[str]"] - """ - The set of report columns to include in the report output. If omitted, the Report Type is run with its default column set. - """ - connected_account: NotRequired["str"] - """ - Connected account ID to filter for in the report run. - """ - currency: NotRequired["str"] - """ - Currency of objects to be included in the report run. - """ - interval_end: NotRequired["int"] - """ - Ending timestamp of data to be included in the report run (exclusive). - """ - interval_start: NotRequired["int"] - """ - Starting timestamp of data to be included in the report run. - """ - payout: NotRequired["str"] - """ - Payout ID by which to filter the report run. - """ - reporting_category: NotRequired[ - "Literal['advance', 'advance_funding', 'anticipation_repayment', 'charge', 'charge_failure', 'connect_collection_transfer', 'connect_reserved_funds', 'contribution', 'dispute', 'dispute_reversal', 'fee', 'financing_paydown', 'financing_paydown_reversal', 'financing_payout', 'financing_payout_reversal', 'issuing_authorization_hold', 'issuing_authorization_release', 'issuing_dispute', 'issuing_transaction', 'network_cost', 'obligation', 'other_adjustment', 'partial_capture_reversal', 'payout', 'payout_reversal', 'platform_earning', 'platform_earning_refund', 'refund', 'refund_failure', 'risk_reserved_funds', 'tax', 'topup', 'topup_reversal', 'transfer', 'transfer_reversal', 'unreconciled_customer_funds']" - ] - """ - Category of balance transactions to be included in the report run. - """ - timezone: NotRequired[ - "Literal['Africa/Abidjan', 'Africa/Accra', 'Africa/Addis_Ababa', 'Africa/Algiers', 'Africa/Asmara', 'Africa/Asmera', 'Africa/Bamako', 'Africa/Bangui', 'Africa/Banjul', 'Africa/Bissau', 'Africa/Blantyre', 'Africa/Brazzaville', 'Africa/Bujumbura', 'Africa/Cairo', 'Africa/Casablanca', 'Africa/Ceuta', 'Africa/Conakry', 'Africa/Dakar', 'Africa/Dar_es_Salaam', 'Africa/Djibouti', 'Africa/Douala', 'Africa/El_Aaiun', 'Africa/Freetown', 'Africa/Gaborone', 'Africa/Harare', 'Africa/Johannesburg', 'Africa/Juba', 'Africa/Kampala', 'Africa/Khartoum', 'Africa/Kigali', 'Africa/Kinshasa', 'Africa/Lagos', 'Africa/Libreville', 'Africa/Lome', 'Africa/Luanda', 'Africa/Lubumbashi', 'Africa/Lusaka', 'Africa/Malabo', 'Africa/Maputo', 'Africa/Maseru', 'Africa/Mbabane', 'Africa/Mogadishu', 'Africa/Monrovia', 'Africa/Nairobi', 'Africa/Ndjamena', 'Africa/Niamey', 'Africa/Nouakchott', 'Africa/Ouagadougou', 'Africa/Porto-Novo', 'Africa/Sao_Tome', 'Africa/Timbuktu', 'Africa/Tripoli', 'Africa/Tunis', 'Africa/Windhoek', 'America/Adak', 'America/Anchorage', 'America/Anguilla', 'America/Antigua', 'America/Araguaina', 'America/Argentina/Buenos_Aires', 'America/Argentina/Catamarca', 'America/Argentina/ComodRivadavia', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/La_Rioja', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Salta', 'America/Argentina/San_Juan', 'America/Argentina/San_Luis', 'America/Argentina/Tucuman', 'America/Argentina/Ushuaia', 'America/Aruba', 'America/Asuncion', 'America/Atikokan', 'America/Atka', 'America/Bahia', 'America/Bahia_Banderas', 'America/Barbados', 'America/Belem', 'America/Belize', 'America/Blanc-Sablon', 'America/Boa_Vista', 'America/Bogota', 'America/Boise', 'America/Buenos_Aires', 'America/Cambridge_Bay', 'America/Campo_Grande', 'America/Cancun', 'America/Caracas', 'America/Catamarca', 'America/Cayenne', 'America/Cayman', 'America/Chicago', 'America/Chihuahua', 'America/Ciudad_Juarez', 'America/Coral_Harbour', 'America/Cordoba', 'America/Costa_Rica', 'America/Creston', 'America/Cuiaba', 'America/Curacao', 'America/Danmarkshavn', 'America/Dawson', 'America/Dawson_Creek', 'America/Denver', 'America/Detroit', 'America/Dominica', 'America/Edmonton', 'America/Eirunepe', 'America/El_Salvador', 'America/Ensenada', 'America/Fort_Nelson', 'America/Fort_Wayne', 'America/Fortaleza', 'America/Glace_Bay', 'America/Godthab', 'America/Goose_Bay', 'America/Grand_Turk', 'America/Grenada', 'America/Guadeloupe', 'America/Guatemala', 'America/Guayaquil', 'America/Guyana', 'America/Halifax', 'America/Havana', 'America/Hermosillo', 'America/Indiana/Indianapolis', 'America/Indiana/Knox', 'America/Indiana/Marengo', 'America/Indiana/Petersburg', 'America/Indiana/Tell_City', 'America/Indiana/Vevay', 'America/Indiana/Vincennes', 'America/Indiana/Winamac', 'America/Indianapolis', 'America/Inuvik', 'America/Iqaluit', 'America/Jamaica', 'America/Jujuy', 'America/Juneau', 'America/Kentucky/Louisville', 'America/Kentucky/Monticello', 'America/Knox_IN', 'America/Kralendijk', 'America/La_Paz', 'America/Lima', 'America/Los_Angeles', 'America/Louisville', 'America/Lower_Princes', 'America/Maceio', 'America/Managua', 'America/Manaus', 'America/Marigot', 'America/Martinique', 'America/Matamoros', 'America/Mazatlan', 'America/Mendoza', 'America/Menominee', 'America/Merida', 'America/Metlakatla', 'America/Mexico_City', 'America/Miquelon', 'America/Moncton', 'America/Monterrey', 'America/Montevideo', 'America/Montreal', 'America/Montserrat', 'America/Nassau', 'America/New_York', 'America/Nipigon', 'America/Nome', 'America/Noronha', 'America/North_Dakota/Beulah', 'America/North_Dakota/Center', 'America/North_Dakota/New_Salem', 'America/Nuuk', 'America/Ojinaga', 'America/Panama', 'America/Pangnirtung', 'America/Paramaribo', 'America/Phoenix', 'America/Port-au-Prince', 'America/Port_of_Spain', 'America/Porto_Acre', 'America/Porto_Velho', 'America/Puerto_Rico', 'America/Punta_Arenas', 'America/Rainy_River', 'America/Rankin_Inlet', 'America/Recife', 'America/Regina', 'America/Resolute', 'America/Rio_Branco', 'America/Rosario', 'America/Santa_Isabel', 'America/Santarem', 'America/Santiago', 'America/Santo_Domingo', 'America/Sao_Paulo', 'America/Scoresbysund', 'America/Shiprock', 'America/Sitka', 'America/St_Barthelemy', 'America/St_Johns', 'America/St_Kitts', 'America/St_Lucia', 'America/St_Thomas', 'America/St_Vincent', 'America/Swift_Current', 'America/Tegucigalpa', 'America/Thule', 'America/Thunder_Bay', 'America/Tijuana', 'America/Toronto', 'America/Tortola', 'America/Vancouver', 'America/Virgin', 'America/Whitehorse', 'America/Winnipeg', 'America/Yakutat', 'America/Yellowknife', 'Antarctica/Casey', 'Antarctica/Davis', 'Antarctica/DumontDUrville', 'Antarctica/Macquarie', 'Antarctica/Mawson', 'Antarctica/McMurdo', 'Antarctica/Palmer', 'Antarctica/Rothera', 'Antarctica/South_Pole', 'Antarctica/Syowa', 'Antarctica/Troll', 'Antarctica/Vostok', 'Arctic/Longyearbyen', 'Asia/Aden', 'Asia/Almaty', 'Asia/Amman', 'Asia/Anadyr', 'Asia/Aqtau', 'Asia/Aqtobe', 'Asia/Ashgabat', 'Asia/Ashkhabad', 'Asia/Atyrau', 'Asia/Baghdad', 'Asia/Bahrain', 'Asia/Baku', 'Asia/Bangkok', 'Asia/Barnaul', 'Asia/Beirut', 'Asia/Bishkek', 'Asia/Brunei', 'Asia/Calcutta', 'Asia/Chita', 'Asia/Choibalsan', 'Asia/Chongqing', 'Asia/Chungking', 'Asia/Colombo', 'Asia/Dacca', 'Asia/Damascus', 'Asia/Dhaka', 'Asia/Dili', 'Asia/Dubai', 'Asia/Dushanbe', 'Asia/Famagusta', 'Asia/Gaza', 'Asia/Harbin', 'Asia/Hebron', 'Asia/Ho_Chi_Minh', 'Asia/Hong_Kong', 'Asia/Hovd', 'Asia/Irkutsk', 'Asia/Istanbul', 'Asia/Jakarta', 'Asia/Jayapura', 'Asia/Jerusalem', 'Asia/Kabul', 'Asia/Kamchatka', 'Asia/Karachi', 'Asia/Kashgar', 'Asia/Kathmandu', 'Asia/Katmandu', 'Asia/Khandyga', 'Asia/Kolkata', 'Asia/Krasnoyarsk', 'Asia/Kuala_Lumpur', 'Asia/Kuching', 'Asia/Kuwait', 'Asia/Macao', 'Asia/Macau', 'Asia/Magadan', 'Asia/Makassar', 'Asia/Manila', 'Asia/Muscat', 'Asia/Nicosia', 'Asia/Novokuznetsk', 'Asia/Novosibirsk', 'Asia/Omsk', 'Asia/Oral', 'Asia/Phnom_Penh', 'Asia/Pontianak', 'Asia/Pyongyang', 'Asia/Qatar', 'Asia/Qostanay', 'Asia/Qyzylorda', 'Asia/Rangoon', 'Asia/Riyadh', 'Asia/Saigon', 'Asia/Sakhalin', 'Asia/Samarkand', 'Asia/Seoul', 'Asia/Shanghai', 'Asia/Singapore', 'Asia/Srednekolymsk', 'Asia/Taipei', 'Asia/Tashkent', 'Asia/Tbilisi', 'Asia/Tehran', 'Asia/Tel_Aviv', 'Asia/Thimbu', 'Asia/Thimphu', 'Asia/Tokyo', 'Asia/Tomsk', 'Asia/Ujung_Pandang', 'Asia/Ulaanbaatar', 'Asia/Ulan_Bator', 'Asia/Urumqi', 'Asia/Ust-Nera', 'Asia/Vientiane', 'Asia/Vladivostok', 'Asia/Yakutsk', 'Asia/Yangon', 'Asia/Yekaterinburg', 'Asia/Yerevan', 'Atlantic/Azores', 'Atlantic/Bermuda', 'Atlantic/Canary', 'Atlantic/Cape_Verde', 'Atlantic/Faeroe', 'Atlantic/Faroe', 'Atlantic/Jan_Mayen', 'Atlantic/Madeira', 'Atlantic/Reykjavik', 'Atlantic/South_Georgia', 'Atlantic/St_Helena', 'Atlantic/Stanley', 'Australia/ACT', 'Australia/Adelaide', 'Australia/Brisbane', 'Australia/Broken_Hill', 'Australia/Canberra', 'Australia/Currie', 'Australia/Darwin', 'Australia/Eucla', 'Australia/Hobart', 'Australia/LHI', 'Australia/Lindeman', 'Australia/Lord_Howe', 'Australia/Melbourne', 'Australia/NSW', 'Australia/North', 'Australia/Perth', 'Australia/Queensland', 'Australia/South', 'Australia/Sydney', 'Australia/Tasmania', 'Australia/Victoria', 'Australia/West', 'Australia/Yancowinna', 'Brazil/Acre', 'Brazil/DeNoronha', 'Brazil/East', 'Brazil/West', 'CET', 'CST6CDT', 'Canada/Atlantic', 'Canada/Central', 'Canada/Eastern', 'Canada/Mountain', 'Canada/Newfoundland', 'Canada/Pacific', 'Canada/Saskatchewan', 'Canada/Yukon', 'Chile/Continental', 'Chile/EasterIsland', 'Cuba', 'EET', 'EST', 'EST5EDT', 'Egypt', 'Eire', 'Etc/GMT', 'Etc/GMT+0', 'Etc/GMT+1', 'Etc/GMT+10', 'Etc/GMT+11', 'Etc/GMT+12', 'Etc/GMT+2', 'Etc/GMT+3', 'Etc/GMT+4', 'Etc/GMT+5', 'Etc/GMT+6', 'Etc/GMT+7', 'Etc/GMT+8', 'Etc/GMT+9', 'Etc/GMT-0', 'Etc/GMT-1', 'Etc/GMT-10', 'Etc/GMT-11', 'Etc/GMT-12', 'Etc/GMT-13', 'Etc/GMT-14', 'Etc/GMT-2', 'Etc/GMT-3', 'Etc/GMT-4', 'Etc/GMT-5', 'Etc/GMT-6', 'Etc/GMT-7', 'Etc/GMT-8', 'Etc/GMT-9', 'Etc/GMT0', 'Etc/Greenwich', 'Etc/UCT', 'Etc/UTC', 'Etc/Universal', 'Etc/Zulu', 'Europe/Amsterdam', 'Europe/Andorra', 'Europe/Astrakhan', 'Europe/Athens', 'Europe/Belfast', 'Europe/Belgrade', 'Europe/Berlin', 'Europe/Bratislava', 'Europe/Brussels', 'Europe/Bucharest', 'Europe/Budapest', 'Europe/Busingen', 'Europe/Chisinau', 'Europe/Copenhagen', 'Europe/Dublin', 'Europe/Gibraltar', 'Europe/Guernsey', 'Europe/Helsinki', 'Europe/Isle_of_Man', 'Europe/Istanbul', 'Europe/Jersey', 'Europe/Kaliningrad', 'Europe/Kiev', 'Europe/Kirov', 'Europe/Kyiv', 'Europe/Lisbon', 'Europe/Ljubljana', 'Europe/London', 'Europe/Luxembourg', 'Europe/Madrid', 'Europe/Malta', 'Europe/Mariehamn', 'Europe/Minsk', 'Europe/Monaco', 'Europe/Moscow', 'Europe/Nicosia', 'Europe/Oslo', 'Europe/Paris', 'Europe/Podgorica', 'Europe/Prague', 'Europe/Riga', 'Europe/Rome', 'Europe/Samara', 'Europe/San_Marino', 'Europe/Sarajevo', 'Europe/Saratov', 'Europe/Simferopol', 'Europe/Skopje', 'Europe/Sofia', 'Europe/Stockholm', 'Europe/Tallinn', 'Europe/Tirane', 'Europe/Tiraspol', 'Europe/Ulyanovsk', 'Europe/Uzhgorod', 'Europe/Vaduz', 'Europe/Vatican', 'Europe/Vienna', 'Europe/Vilnius', 'Europe/Volgograd', 'Europe/Warsaw', 'Europe/Zagreb', 'Europe/Zaporozhye', 'Europe/Zurich', 'Factory', 'GB', 'GB-Eire', 'GMT', 'GMT+0', 'GMT-0', 'GMT0', 'Greenwich', 'HST', 'Hongkong', 'Iceland', 'Indian/Antananarivo', 'Indian/Chagos', 'Indian/Christmas', 'Indian/Cocos', 'Indian/Comoro', 'Indian/Kerguelen', 'Indian/Mahe', 'Indian/Maldives', 'Indian/Mauritius', 'Indian/Mayotte', 'Indian/Reunion', 'Iran', 'Israel', 'Jamaica', 'Japan', 'Kwajalein', 'Libya', 'MET', 'MST', 'MST7MDT', 'Mexico/BajaNorte', 'Mexico/BajaSur', 'Mexico/General', 'NZ', 'NZ-CHAT', 'Navajo', 'PRC', 'PST8PDT', 'Pacific/Apia', 'Pacific/Auckland', 'Pacific/Bougainville', 'Pacific/Chatham', 'Pacific/Chuuk', 'Pacific/Easter', 'Pacific/Efate', 'Pacific/Enderbury', 'Pacific/Fakaofo', 'Pacific/Fiji', 'Pacific/Funafuti', 'Pacific/Galapagos', 'Pacific/Gambier', 'Pacific/Guadalcanal', 'Pacific/Guam', 'Pacific/Honolulu', 'Pacific/Johnston', 'Pacific/Kanton', 'Pacific/Kiritimati', 'Pacific/Kosrae', 'Pacific/Kwajalein', 'Pacific/Majuro', 'Pacific/Marquesas', 'Pacific/Midway', 'Pacific/Nauru', 'Pacific/Niue', 'Pacific/Norfolk', 'Pacific/Noumea', 'Pacific/Pago_Pago', 'Pacific/Palau', 'Pacific/Pitcairn', 'Pacific/Pohnpei', 'Pacific/Ponape', 'Pacific/Port_Moresby', 'Pacific/Rarotonga', 'Pacific/Saipan', 'Pacific/Samoa', 'Pacific/Tahiti', 'Pacific/Tarawa', 'Pacific/Tongatapu', 'Pacific/Truk', 'Pacific/Wake', 'Pacific/Wallis', 'Pacific/Yap', 'Poland', 'Portugal', 'ROC', 'ROK', 'Singapore', 'Turkey', 'UCT', 'US/Alaska', 'US/Aleutian', 'US/Arizona', 'US/Central', 'US/East-Indiana', 'US/Eastern', 'US/Hawaii', 'US/Indiana-Starke', 'US/Michigan', 'US/Mountain', 'US/Pacific', 'US/Pacific-New', 'US/Samoa', 'UTC', 'Universal', 'W-SU', 'WET', 'Zulu']" - ] - """ - Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. - """ + class CreateParamsParameters(TypedDict): + columns: NotRequired["List[str]"] + """ + The set of report columns to include in the report output. If omitted, the Report Type is run with its default column set. + """ + connected_account: NotRequired["str"] + """ + Connected account ID to filter for in the report run. + """ + currency: NotRequired["str"] + """ + Currency of objects to be included in the report run. + """ + interval_end: NotRequired["int"] + """ + Ending timestamp of data to be included in the report run (exclusive). + """ + interval_start: NotRequired["int"] + """ + Starting timestamp of data to be included in the report run. + """ + payout: NotRequired["str"] + """ + Payout ID by which to filter the report run. + """ + reporting_category: NotRequired[ + "Literal['advance', 'advance_funding', 'anticipation_repayment', 'charge', 'charge_failure', 'connect_collection_transfer', 'connect_reserved_funds', 'contribution', 'dispute', 'dispute_reversal', 'fee', 'financing_paydown', 'financing_paydown_reversal', 'financing_payout', 'financing_payout_reversal', 'issuing_authorization_hold', 'issuing_authorization_release', 'issuing_dispute', 'issuing_transaction', 'network_cost', 'obligation', 'other_adjustment', 'partial_capture_reversal', 'payout', 'payout_reversal', 'platform_earning', 'platform_earning_refund', 'refund', 'refund_failure', 'risk_reserved_funds', 'tax', 'topup', 'topup_reversal', 'transfer', 'transfer_reversal', 'unreconciled_customer_funds']" + ] + """ + Category of balance transactions to be included in the report run. + """ + timezone: NotRequired[ + "Literal['Africa/Abidjan', 'Africa/Accra', 'Africa/Addis_Ababa', 'Africa/Algiers', 'Africa/Asmara', 'Africa/Asmera', 'Africa/Bamako', 'Africa/Bangui', 'Africa/Banjul', 'Africa/Bissau', 'Africa/Blantyre', 'Africa/Brazzaville', 'Africa/Bujumbura', 'Africa/Cairo', 'Africa/Casablanca', 'Africa/Ceuta', 'Africa/Conakry', 'Africa/Dakar', 'Africa/Dar_es_Salaam', 'Africa/Djibouti', 'Africa/Douala', 'Africa/El_Aaiun', 'Africa/Freetown', 'Africa/Gaborone', 'Africa/Harare', 'Africa/Johannesburg', 'Africa/Juba', 'Africa/Kampala', 'Africa/Khartoum', 'Africa/Kigali', 'Africa/Kinshasa', 'Africa/Lagos', 'Africa/Libreville', 'Africa/Lome', 'Africa/Luanda', 'Africa/Lubumbashi', 'Africa/Lusaka', 'Africa/Malabo', 'Africa/Maputo', 'Africa/Maseru', 'Africa/Mbabane', 'Africa/Mogadishu', 'Africa/Monrovia', 'Africa/Nairobi', 'Africa/Ndjamena', 'Africa/Niamey', 'Africa/Nouakchott', 'Africa/Ouagadougou', 'Africa/Porto-Novo', 'Africa/Sao_Tome', 'Africa/Timbuktu', 'Africa/Tripoli', 'Africa/Tunis', 'Africa/Windhoek', 'America/Adak', 'America/Anchorage', 'America/Anguilla', 'America/Antigua', 'America/Araguaina', 'America/Argentina/Buenos_Aires', 'America/Argentina/Catamarca', 'America/Argentina/ComodRivadavia', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/La_Rioja', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Salta', 'America/Argentina/San_Juan', 'America/Argentina/San_Luis', 'America/Argentina/Tucuman', 'America/Argentina/Ushuaia', 'America/Aruba', 'America/Asuncion', 'America/Atikokan', 'America/Atka', 'America/Bahia', 'America/Bahia_Banderas', 'America/Barbados', 'America/Belem', 'America/Belize', 'America/Blanc-Sablon', 'America/Boa_Vista', 'America/Bogota', 'America/Boise', 'America/Buenos_Aires', 'America/Cambridge_Bay', 'America/Campo_Grande', 'America/Cancun', 'America/Caracas', 'America/Catamarca', 'America/Cayenne', 'America/Cayman', 'America/Chicago', 'America/Chihuahua', 'America/Ciudad_Juarez', 'America/Coral_Harbour', 'America/Cordoba', 'America/Costa_Rica', 'America/Creston', 'America/Cuiaba', 'America/Curacao', 'America/Danmarkshavn', 'America/Dawson', 'America/Dawson_Creek', 'America/Denver', 'America/Detroit', 'America/Dominica', 'America/Edmonton', 'America/Eirunepe', 'America/El_Salvador', 'America/Ensenada', 'America/Fort_Nelson', 'America/Fort_Wayne', 'America/Fortaleza', 'America/Glace_Bay', 'America/Godthab', 'America/Goose_Bay', 'America/Grand_Turk', 'America/Grenada', 'America/Guadeloupe', 'America/Guatemala', 'America/Guayaquil', 'America/Guyana', 'America/Halifax', 'America/Havana', 'America/Hermosillo', 'America/Indiana/Indianapolis', 'America/Indiana/Knox', 'America/Indiana/Marengo', 'America/Indiana/Petersburg', 'America/Indiana/Tell_City', 'America/Indiana/Vevay', 'America/Indiana/Vincennes', 'America/Indiana/Winamac', 'America/Indianapolis', 'America/Inuvik', 'America/Iqaluit', 'America/Jamaica', 'America/Jujuy', 'America/Juneau', 'America/Kentucky/Louisville', 'America/Kentucky/Monticello', 'America/Knox_IN', 'America/Kralendijk', 'America/La_Paz', 'America/Lima', 'America/Los_Angeles', 'America/Louisville', 'America/Lower_Princes', 'America/Maceio', 'America/Managua', 'America/Manaus', 'America/Marigot', 'America/Martinique', 'America/Matamoros', 'America/Mazatlan', 'America/Mendoza', 'America/Menominee', 'America/Merida', 'America/Metlakatla', 'America/Mexico_City', 'America/Miquelon', 'America/Moncton', 'America/Monterrey', 'America/Montevideo', 'America/Montreal', 'America/Montserrat', 'America/Nassau', 'America/New_York', 'America/Nipigon', 'America/Nome', 'America/Noronha', 'America/North_Dakota/Beulah', 'America/North_Dakota/Center', 'America/North_Dakota/New_Salem', 'America/Nuuk', 'America/Ojinaga', 'America/Panama', 'America/Pangnirtung', 'America/Paramaribo', 'America/Phoenix', 'America/Port-au-Prince', 'America/Port_of_Spain', 'America/Porto_Acre', 'America/Porto_Velho', 'America/Puerto_Rico', 'America/Punta_Arenas', 'America/Rainy_River', 'America/Rankin_Inlet', 'America/Recife', 'America/Regina', 'America/Resolute', 'America/Rio_Branco', 'America/Rosario', 'America/Santa_Isabel', 'America/Santarem', 'America/Santiago', 'America/Santo_Domingo', 'America/Sao_Paulo', 'America/Scoresbysund', 'America/Shiprock', 'America/Sitka', 'America/St_Barthelemy', 'America/St_Johns', 'America/St_Kitts', 'America/St_Lucia', 'America/St_Thomas', 'America/St_Vincent', 'America/Swift_Current', 'America/Tegucigalpa', 'America/Thule', 'America/Thunder_Bay', 'America/Tijuana', 'America/Toronto', 'America/Tortola', 'America/Vancouver', 'America/Virgin', 'America/Whitehorse', 'America/Winnipeg', 'America/Yakutat', 'America/Yellowknife', 'Antarctica/Casey', 'Antarctica/Davis', 'Antarctica/DumontDUrville', 'Antarctica/Macquarie', 'Antarctica/Mawson', 'Antarctica/McMurdo', 'Antarctica/Palmer', 'Antarctica/Rothera', 'Antarctica/South_Pole', 'Antarctica/Syowa', 'Antarctica/Troll', 'Antarctica/Vostok', 'Arctic/Longyearbyen', 'Asia/Aden', 'Asia/Almaty', 'Asia/Amman', 'Asia/Anadyr', 'Asia/Aqtau', 'Asia/Aqtobe', 'Asia/Ashgabat', 'Asia/Ashkhabad', 'Asia/Atyrau', 'Asia/Baghdad', 'Asia/Bahrain', 'Asia/Baku', 'Asia/Bangkok', 'Asia/Barnaul', 'Asia/Beirut', 'Asia/Bishkek', 'Asia/Brunei', 'Asia/Calcutta', 'Asia/Chita', 'Asia/Choibalsan', 'Asia/Chongqing', 'Asia/Chungking', 'Asia/Colombo', 'Asia/Dacca', 'Asia/Damascus', 'Asia/Dhaka', 'Asia/Dili', 'Asia/Dubai', 'Asia/Dushanbe', 'Asia/Famagusta', 'Asia/Gaza', 'Asia/Harbin', 'Asia/Hebron', 'Asia/Ho_Chi_Minh', 'Asia/Hong_Kong', 'Asia/Hovd', 'Asia/Irkutsk', 'Asia/Istanbul', 'Asia/Jakarta', 'Asia/Jayapura', 'Asia/Jerusalem', 'Asia/Kabul', 'Asia/Kamchatka', 'Asia/Karachi', 'Asia/Kashgar', 'Asia/Kathmandu', 'Asia/Katmandu', 'Asia/Khandyga', 'Asia/Kolkata', 'Asia/Krasnoyarsk', 'Asia/Kuala_Lumpur', 'Asia/Kuching', 'Asia/Kuwait', 'Asia/Macao', 'Asia/Macau', 'Asia/Magadan', 'Asia/Makassar', 'Asia/Manila', 'Asia/Muscat', 'Asia/Nicosia', 'Asia/Novokuznetsk', 'Asia/Novosibirsk', 'Asia/Omsk', 'Asia/Oral', 'Asia/Phnom_Penh', 'Asia/Pontianak', 'Asia/Pyongyang', 'Asia/Qatar', 'Asia/Qostanay', 'Asia/Qyzylorda', 'Asia/Rangoon', 'Asia/Riyadh', 'Asia/Saigon', 'Asia/Sakhalin', 'Asia/Samarkand', 'Asia/Seoul', 'Asia/Shanghai', 'Asia/Singapore', 'Asia/Srednekolymsk', 'Asia/Taipei', 'Asia/Tashkent', 'Asia/Tbilisi', 'Asia/Tehran', 'Asia/Tel_Aviv', 'Asia/Thimbu', 'Asia/Thimphu', 'Asia/Tokyo', 'Asia/Tomsk', 'Asia/Ujung_Pandang', 'Asia/Ulaanbaatar', 'Asia/Ulan_Bator', 'Asia/Urumqi', 'Asia/Ust-Nera', 'Asia/Vientiane', 'Asia/Vladivostok', 'Asia/Yakutsk', 'Asia/Yangon', 'Asia/Yekaterinburg', 'Asia/Yerevan', 'Atlantic/Azores', 'Atlantic/Bermuda', 'Atlantic/Canary', 'Atlantic/Cape_Verde', 'Atlantic/Faeroe', 'Atlantic/Faroe', 'Atlantic/Jan_Mayen', 'Atlantic/Madeira', 'Atlantic/Reykjavik', 'Atlantic/South_Georgia', 'Atlantic/St_Helena', 'Atlantic/Stanley', 'Australia/ACT', 'Australia/Adelaide', 'Australia/Brisbane', 'Australia/Broken_Hill', 'Australia/Canberra', 'Australia/Currie', 'Australia/Darwin', 'Australia/Eucla', 'Australia/Hobart', 'Australia/LHI', 'Australia/Lindeman', 'Australia/Lord_Howe', 'Australia/Melbourne', 'Australia/NSW', 'Australia/North', 'Australia/Perth', 'Australia/Queensland', 'Australia/South', 'Australia/Sydney', 'Australia/Tasmania', 'Australia/Victoria', 'Australia/West', 'Australia/Yancowinna', 'Brazil/Acre', 'Brazil/DeNoronha', 'Brazil/East', 'Brazil/West', 'CET', 'CST6CDT', 'Canada/Atlantic', 'Canada/Central', 'Canada/Eastern', 'Canada/Mountain', 'Canada/Newfoundland', 'Canada/Pacific', 'Canada/Saskatchewan', 'Canada/Yukon', 'Chile/Continental', 'Chile/EasterIsland', 'Cuba', 'EET', 'EST', 'EST5EDT', 'Egypt', 'Eire', 'Etc/GMT', 'Etc/GMT+0', 'Etc/GMT+1', 'Etc/GMT+10', 'Etc/GMT+11', 'Etc/GMT+12', 'Etc/GMT+2', 'Etc/GMT+3', 'Etc/GMT+4', 'Etc/GMT+5', 'Etc/GMT+6', 'Etc/GMT+7', 'Etc/GMT+8', 'Etc/GMT+9', 'Etc/GMT-0', 'Etc/GMT-1', 'Etc/GMT-10', 'Etc/GMT-11', 'Etc/GMT-12', 'Etc/GMT-13', 'Etc/GMT-14', 'Etc/GMT-2', 'Etc/GMT-3', 'Etc/GMT-4', 'Etc/GMT-5', 'Etc/GMT-6', 'Etc/GMT-7', 'Etc/GMT-8', 'Etc/GMT-9', 'Etc/GMT0', 'Etc/Greenwich', 'Etc/UCT', 'Etc/UTC', 'Etc/Universal', 'Etc/Zulu', 'Europe/Amsterdam', 'Europe/Andorra', 'Europe/Astrakhan', 'Europe/Athens', 'Europe/Belfast', 'Europe/Belgrade', 'Europe/Berlin', 'Europe/Bratislava', 'Europe/Brussels', 'Europe/Bucharest', 'Europe/Budapest', 'Europe/Busingen', 'Europe/Chisinau', 'Europe/Copenhagen', 'Europe/Dublin', 'Europe/Gibraltar', 'Europe/Guernsey', 'Europe/Helsinki', 'Europe/Isle_of_Man', 'Europe/Istanbul', 'Europe/Jersey', 'Europe/Kaliningrad', 'Europe/Kiev', 'Europe/Kirov', 'Europe/Kyiv', 'Europe/Lisbon', 'Europe/Ljubljana', 'Europe/London', 'Europe/Luxembourg', 'Europe/Madrid', 'Europe/Malta', 'Europe/Mariehamn', 'Europe/Minsk', 'Europe/Monaco', 'Europe/Moscow', 'Europe/Nicosia', 'Europe/Oslo', 'Europe/Paris', 'Europe/Podgorica', 'Europe/Prague', 'Europe/Riga', 'Europe/Rome', 'Europe/Samara', 'Europe/San_Marino', 'Europe/Sarajevo', 'Europe/Saratov', 'Europe/Simferopol', 'Europe/Skopje', 'Europe/Sofia', 'Europe/Stockholm', 'Europe/Tallinn', 'Europe/Tirane', 'Europe/Tiraspol', 'Europe/Ulyanovsk', 'Europe/Uzhgorod', 'Europe/Vaduz', 'Europe/Vatican', 'Europe/Vienna', 'Europe/Vilnius', 'Europe/Volgograd', 'Europe/Warsaw', 'Europe/Zagreb', 'Europe/Zaporozhye', 'Europe/Zurich', 'Factory', 'GB', 'GB-Eire', 'GMT', 'GMT+0', 'GMT-0', 'GMT0', 'Greenwich', 'HST', 'Hongkong', 'Iceland', 'Indian/Antananarivo', 'Indian/Chagos', 'Indian/Christmas', 'Indian/Cocos', 'Indian/Comoro', 'Indian/Kerguelen', 'Indian/Mahe', 'Indian/Maldives', 'Indian/Mauritius', 'Indian/Mayotte', 'Indian/Reunion', 'Iran', 'Israel', 'Jamaica', 'Japan', 'Kwajalein', 'Libya', 'MET', 'MST', 'MST7MDT', 'Mexico/BajaNorte', 'Mexico/BajaSur', 'Mexico/General', 'NZ', 'NZ-CHAT', 'Navajo', 'PRC', 'PST8PDT', 'Pacific/Apia', 'Pacific/Auckland', 'Pacific/Bougainville', 'Pacific/Chatham', 'Pacific/Chuuk', 'Pacific/Easter', 'Pacific/Efate', 'Pacific/Enderbury', 'Pacific/Fakaofo', 'Pacific/Fiji', 'Pacific/Funafuti', 'Pacific/Galapagos', 'Pacific/Gambier', 'Pacific/Guadalcanal', 'Pacific/Guam', 'Pacific/Honolulu', 'Pacific/Johnston', 'Pacific/Kanton', 'Pacific/Kiritimati', 'Pacific/Kosrae', 'Pacific/Kwajalein', 'Pacific/Majuro', 'Pacific/Marquesas', 'Pacific/Midway', 'Pacific/Nauru', 'Pacific/Niue', 'Pacific/Norfolk', 'Pacific/Noumea', 'Pacific/Pago_Pago', 'Pacific/Palau', 'Pacific/Pitcairn', 'Pacific/Pohnpei', 'Pacific/Ponape', 'Pacific/Port_Moresby', 'Pacific/Rarotonga', 'Pacific/Saipan', 'Pacific/Samoa', 'Pacific/Tahiti', 'Pacific/Tarawa', 'Pacific/Tongatapu', 'Pacific/Truk', 'Pacific/Wake', 'Pacific/Wallis', 'Pacific/Yap', 'Poland', 'Portugal', 'ROC', 'ROK', 'Singapore', 'Turkey', 'UCT', 'US/Alaska', 'US/Aleutian', 'US/Arizona', 'US/Central', 'US/East-Indiana', 'US/Eastern', 'US/Hawaii', 'US/Indiana-Starke', 'US/Michigan', 'US/Mountain', 'US/Pacific', 'US/Pacific-New', 'US/Samoa', 'UTC', 'Universal', 'W-SU', 'WET', 'Zulu']" + ] + """ + Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. + """ - class ListParams(RequestOptions): - created: NotRequired["ReportRun.ListParamsCreated|int"] - 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 ListParams(RequestOptions): + created: NotRequired["ReportRun.ListParamsCreated|int"] + 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 ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ created: int """ diff --git a/stripe/api_resources/reporting/report_type.py b/stripe/api_resources/reporting/report_type.py index 096bea60b..a3e1d73ab 100644 --- a/stripe/api_resources/reporting/report_type.py +++ b/stripe/api_resources/reporting/report_type.py @@ -4,7 +4,7 @@ from stripe.api_resources.list_object import ListObject from stripe.request_options import RequestOptions from typing import ClassVar, List, Optional -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing_extensions import Literal, NotRequired, Unpack class ReportType(ListableAPIResource["ReportType"]): @@ -22,19 +22,18 @@ class ReportType(ListableAPIResource["ReportType"]): OBJECT_NAME: ClassVar[ Literal["reporting.report_type"] ] = "reporting.report_type" - if TYPE_CHECKING: - class ListParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ListParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ data_available_end: int """ diff --git a/stripe/api_resources/review.py b/stripe/api_resources/review.py index 256967bf4..7cb4047b1 100644 --- a/stripe/api_resources/review.py +++ b/stripe/api_resources/review.py @@ -71,56 +71,54 @@ class Session(StripeObject): The version for the browser session (e.g., `61.0.3163.100`). """ - if TYPE_CHECKING: - - class ApproveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ApproveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ListParams(RequestOptions): - created: NotRequired["Review.ListParamsCreated|int"] - 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 ListParams(RequestOptions): + created: NotRequired["Review.ListParamsCreated|int"] + 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 ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ billing_zip: Optional[str] """ diff --git a/stripe/api_resources/setup_attempt.py b/stripe/api_resources/setup_attempt.py index ef9054911..6d4dcffe0 100644 --- a/stripe/api_resources/setup_attempt.py +++ b/stripe/api_resources/setup_attempt.py @@ -640,54 +640,52 @@ class SetupError(StripeObject): The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` """ - if TYPE_CHECKING: - - class ListParams(RequestOptions): - created: NotRequired["SetupAttempt.ListParamsCreated|int"] - """ - A filter on the list, based on the object `created` field. The value - can be a string with an integer Unix timestamp or a - dictionary with a number of different query options. - """ - 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. - """ - setup_intent: str - """ - Only return SetupAttempts created by the SetupIntent specified by - this ID. - """ - 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 ListParams(RequestOptions): + created: NotRequired["SetupAttempt.ListParamsCreated|int"] + """ + A filter on the list, based on the object `created` field. The value + can be a string with an integer Unix timestamp or a + dictionary with a number of different query options. + """ + 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. + """ + setup_intent: str + """ + Only return SetupAttempts created by the SetupIntent specified by + this ID. + """ + 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 ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ application: Optional[ExpandableField["Application"]] """ diff --git a/stripe/api_resources/setup_intent.py b/stripe/api_resources/setup_intent.py index d4a28c7f5..b72b85c89 100644 --- a/stripe/api_resources/setup_intent.py +++ b/stripe/api_resources/setup_intent.py @@ -593,2579 +593,2475 @@ class FinancialConnections(StripeObject): "us_bank_account": UsBankAccount, } - if TYPE_CHECKING: - - class CancelParams(RequestOptions): - cancellation_reason: NotRequired[ - "Literal['abandoned', 'duplicate', 'requested_by_customer']" - ] - """ - Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate` - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class CancelParams(RequestOptions): + cancellation_reason: NotRequired[ + "Literal['abandoned', 'duplicate', 'requested_by_customer']" + ] + """ + Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate` + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ConfirmParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - mandate_data: NotRequired[ - "Literal['']|SetupIntent.ConfirmParamsMandateData|SetupIntent.ConfirmParamsMandateData2" - ] - payment_method: NotRequired["str"] - """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. - """ - payment_method_data: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodData" - ] - """ - When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) - value in the SetupIntent. - """ - payment_method_options: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this SetupIntent. - """ - return_url: NotRequired["str"] - """ - The URL to redirect your customer back to after they authenticate on the payment method's app or site. - If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - This parameter is only used for cards and other redirect-based payment methods. - """ - use_stripe_sdk: NotRequired["bool"] - """ - Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. - """ + class ConfirmParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + mandate_data: NotRequired[ + "Literal['']|SetupIntent.ConfirmParamsMandateData|SetupIntent.ConfirmParamsMandateData2" + ] + payment_method: NotRequired["str"] + """ + ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + """ + payment_method_data: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodData" + ] + """ + When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + value in the SetupIntent. + """ + payment_method_options: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this SetupIntent. + """ + return_url: NotRequired["str"] + """ + The URL to redirect your customer back to after they authenticate on the payment method's app or site. + If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + This parameter is only used for cards and other redirect-based payment methods. + """ + use_stripe_sdk: NotRequired["bool"] + """ + Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + """ - class ConfirmParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. - """ - card: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card setup attempted on this SetupIntent. - """ - link: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsLink" - ] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - paypal: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - sepa_debit: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - us_bank_account: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. - """ + class ConfirmParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsAcssDebit" + ] + """ + If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + """ + card: NotRequired["SetupIntent.ConfirmParamsPaymentMethodOptionsCard"] + """ + Configuration for any card setup attempted on this SetupIntent. + """ + link: NotRequired["SetupIntent.ConfirmParamsPaymentMethodOptionsLink"] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ + paypal: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsPaypal" + ] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ + sepa_debit: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsSepaDebit" + ] + """ + If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ + us_bank_account: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccount" + ] + """ + If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + """ - class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - networks: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): + financial_connections: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + networks: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks" + ] + """ + Additional fields for network related functions + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks( - TypedDict - ): - requested: NotRequired["List[Literal['ach', 'us_domestic_wire']]"] - """ - Triggers validations to run across the selected networks - """ + class ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): + requested: NotRequired["List[Literal['ach', 'us_domestic_wire']]"] + """ + Triggers validations to run across the selected networks + """ - class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - permissions: NotRequired[ - "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired["List[Literal['balances']]"] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired["str"] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ + class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, + ): + permissions: NotRequired[ + "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired["List[Literal['balances']]"] + """ + List of data features that you would like to retrieve upon account creation. + """ + return_url: NotRequired["str"] + """ + For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + """ - class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ + class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ - class ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions( - TypedDict, - ): - pass + class ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): + pass - class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): - billing_agreement_id: NotRequired["str"] - """ - The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. - """ + class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): + billing_agreement_id: NotRequired["str"] + """ + The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + """ - class ConfirmParamsPaymentMethodOptionsLink(TypedDict): - persistent_token: NotRequired["str"] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ + class ConfirmParamsPaymentMethodOptionsLink(TypedDict): + persistent_token: NotRequired["str"] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ - class ConfirmParamsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired["bool"] - """ - When specified, this parameter signals that a card has been collected - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - "Literal['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'mastercard', 'unionpay', 'unknown', 'visa']" - ] - """ - Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. - """ - request_three_d_secure: NotRequired["Literal['any', 'automatic']"] - """ - 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. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ + class ConfirmParamsPaymentMethodOptionsCard(TypedDict): + mandate_options: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + moto: NotRequired["bool"] + """ + When specified, this parameter signals that a card has been collected + as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + parameter can only be provided during confirmation. + """ + network: NotRequired[ + "Literal['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'mastercard', 'unionpay', 'unknown', 'visa']" + ] + """ + Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + """ + request_three_d_secure: NotRequired["Literal['any', 'automatic']"] + """ + 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. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ - class ConfirmParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - currency: str - """ - Currency in which future payments will be charged. 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: NotRequired["str"] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired["int"] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired["List[Literal['india']]"] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ + class ConfirmParamsPaymentMethodOptionsCardMandateOptions(TypedDict): + amount: int + """ + Amount to be charged for future payments. + """ + amount_type: Literal["fixed", "maximum"] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + currency: str + """ + Currency in which future payments will be charged. 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: NotRequired["str"] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired["int"] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + interval: Literal["day", "month", "sporadic", "week", "year"] + """ + Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + """ + reference: str + """ + Unique identifier for the mandate or subscription. + """ + start_date: int + """ + Start date of the mandate or subscription. Start date should not be lesser than yesterday. + """ + supported_types: NotRequired["List[Literal['india']]"] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ - class ConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired["Literal['cad', 'usd']"] - """ - 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). - """ - mandate_options: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + class ConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): + currency: NotRequired["Literal['cad', 'usd']"] + """ + 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). + """ + mandate_options: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - default_for: NotRequired[ - "List[Literal['invoice', 'subscription']]" - ] - """ - List of Stripe products where this mandate can be selected automatically. - """ - interval_description: NotRequired["str"] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - "Literal['combined', 'interval', 'sporadic']" - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired["Literal['business', 'personal']"] - """ - Transaction type of the mandate. - """ + class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + default_for: NotRequired["List[Literal['invoice', 'subscription']]"] + """ + List of Stripe products where this mandate can be selected automatically. + """ + interval_description: NotRequired["str"] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']" + ] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired["Literal['business', 'personal']"] + """ + Transaction type of the mandate. + """ - class ConfirmParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - au_becs_debit: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billing_details: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataBlik"] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - customer_balance: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - grabpay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - ideal: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataIdeal" - ] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - klarna: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - link: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataLink"] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - 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`. - """ - oxxo: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataOxxo"] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - paynow: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - pix: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - radar_options: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - revolut_pay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - sepa_debit: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - sofort: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "blik", - "boleto", - "cashapp", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "klarna", - "konbini", - "link", - "oxxo", - "p24", - "paynow", - "paypal", - "pix", - "promptpay", - "revolut_pay", - "sepa_debit", - "sofort", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class ConfirmParamsPaymentMethodDataZip(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataWechatPay(TypedDict): - pass + class ConfirmParamsPaymentMethodData(TypedDict): + acss_debit: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataAcssDebit" + ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataAffirm"] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataAlipay"] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + au_becs_debit: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataAuBecsDebit" + ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billing_details: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataBoleto"] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + cashapp: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataCashapp" + ] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + customer_balance: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + fpx: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataGiropay" + ] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + grabpay: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataGrabpay" + ] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + ideal: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + klarna: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataKonbini" + ] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + link: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + 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`. + """ + oxxo: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + paynow: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataPaynow"] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataPaypal"] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + pix: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + radar_options: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataRadarOptions" + ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + revolut_pay: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataRevolutPay" + ] + """ + If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + sepa_debit: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + sofort: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataSofort"] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + type: Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay", + "zip", + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataUsBankAccount" + ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataWechatPay" + ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ - class ConfirmParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - Account holder type: individual or company. - """ - account_number: NotRequired["str"] - """ - Account number of the bank account. - """ - account_type: NotRequired["Literal['checking', 'savings']"] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired["str"] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired["str"] - """ - Routing number of the bank account. - """ + class ConfirmParamsPaymentMethodDataZip(TypedDict): + pass - class ConfirmParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ + class ConfirmParamsPaymentMethodDataWechatPay(TypedDict): + pass - class ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ + class ConfirmParamsPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + Account holder type: individual or company. + """ + account_number: NotRequired["str"] + """ + Account number of the bank account. + """ + account_type: NotRequired["Literal['checking', 'savings']"] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired["str"] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired["str"] + """ + Routing number of the bank account. + """ - class ConfirmParamsPaymentMethodDataRevolutPay(TypedDict): - pass + class ConfirmParamsPaymentMethodDataSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ - class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired["str"] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ + class ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ - class ConfirmParamsPaymentMethodDataPromptpay(TypedDict): - pass + class ConfirmParamsPaymentMethodDataRevolutPay(TypedDict): + pass - class ConfirmParamsPaymentMethodDataPix(TypedDict): - pass + class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): + session: NotRequired["str"] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ - class ConfirmParamsPaymentMethodDataPaypal(TypedDict): - pass + class ConfirmParamsPaymentMethodDataPromptpay(TypedDict): + pass - class ConfirmParamsPaymentMethodDataPaynow(TypedDict): - pass + class ConfirmParamsPaymentMethodDataPix(TypedDict): + pass - class ConfirmParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']" - ] - """ - The customer's bank. - """ + class ConfirmParamsPaymentMethodDataPaypal(TypedDict): + pass - class ConfirmParamsPaymentMethodDataOxxo(TypedDict): - pass + class ConfirmParamsPaymentMethodDataPaynow(TypedDict): + pass - class ConfirmParamsPaymentMethodDataLink(TypedDict): - pass + class ConfirmParamsPaymentMethodDataP24(TypedDict): + bank: NotRequired[ + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']" + ] + """ + The customer's bank. + """ - class ConfirmParamsPaymentMethodDataKonbini(TypedDict): - pass + class ConfirmParamsPaymentMethodDataOxxo(TypedDict): + pass - class ConfirmParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ + class ConfirmParamsPaymentMethodDataLink(TypedDict): + pass - class ConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ + class ConfirmParamsPaymentMethodDataKonbini(TypedDict): + pass - class ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): - pass + class ConfirmParamsPaymentMethodDataKlarna(TypedDict): + dob: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataKlarnaDob"] + """ + Customer's date of birth + """ - class ConfirmParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - "Literal['abn_amro', 'asn_bank', 'bunq', 'handelsbanken', 'ing', 'knab', 'moneyou', 'n26', 'rabobank', 'regiobank', 'revolut', 'sns_bank', 'triodos_bank', 'van_lanschot', 'yoursafe']" - ] - """ - The customer's bank. - """ + class ConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ - class ConfirmParamsPaymentMethodDataGrabpay(TypedDict): - pass + class ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): + pass - class ConfirmParamsPaymentMethodDataGiropay(TypedDict): - pass + class ConfirmParamsPaymentMethodDataIdeal(TypedDict): + bank: NotRequired[ + "Literal['abn_amro', 'asn_bank', 'bunq', 'handelsbanken', 'ing', 'knab', 'moneyou', 'n26', 'rabobank', 'regiobank', 'revolut', 'sns_bank', 'triodos_bank', 'van_lanschot', 'yoursafe']" + ] + """ + The customer's bank. + """ + + class ConfirmParamsPaymentMethodDataGrabpay(TypedDict): + pass + + class ConfirmParamsPaymentMethodDataGiropay(TypedDict): + pass + + class ConfirmParamsPaymentMethodDataFpx(TypedDict): + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ - class ConfirmParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ + class ConfirmParamsPaymentMethodDataEps(TypedDict): + bank: NotRequired[ + "Literal['arzte_und_apotheker_bank', 'austrian_anadi_bank_ag', 'bank_austria', 'bankhaus_carl_spangler', 'bankhaus_schelhammer_und_schattera_ag', 'bawag_psk_ag', 'bks_bank_ag', 'brull_kallmus_bank_ag', 'btv_vier_lander_bank', 'capital_bank_grawe_gruppe_ag', 'deutsche_bank_ag', 'dolomitenbank', 'easybank_ag', 'erste_bank_und_sparkassen', 'hypo_alpeadriabank_international_ag', 'hypo_bank_burgenland_aktiengesellschaft', 'hypo_noe_lb_fur_niederosterreich_u_wien', 'hypo_oberosterreich_salzburg_steiermark', 'hypo_tirol_bank_ag', 'hypo_vorarlberg_bank_ag', 'marchfelder_bank', 'oberbank_ag', 'raiffeisen_bankengruppe_osterreich', 'schoellerbank_ag', 'sparda_bank_wien', 'volksbank_gruppe', 'volkskreditbank_ag', 'vr_bank_braunau']" + ] + """ + The customer's bank. + """ - class ConfirmParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - "Literal['arzte_und_apotheker_bank', 'austrian_anadi_bank_ag', 'bank_austria', 'bankhaus_carl_spangler', 'bankhaus_schelhammer_und_schattera_ag', 'bawag_psk_ag', 'bks_bank_ag', 'brull_kallmus_bank_ag', 'btv_vier_lander_bank', 'capital_bank_grawe_gruppe_ag', 'deutsche_bank_ag', 'dolomitenbank', 'easybank_ag', 'erste_bank_und_sparkassen', 'hypo_alpeadriabank_international_ag', 'hypo_bank_burgenland_aktiengesellschaft', 'hypo_noe_lb_fur_niederosterreich_u_wien', 'hypo_oberosterreich_salzburg_steiermark', 'hypo_tirol_bank_ag', 'hypo_vorarlberg_bank_ag', 'marchfelder_bank', 'oberbank_ag', 'raiffeisen_bankengruppe_osterreich', 'schoellerbank_ag', 'sparda_bank_wien', 'volksbank_gruppe', 'volkskreditbank_ag', 'vr_bank_braunau']" - ] - """ - The customer's bank. - """ + class ConfirmParamsPaymentMethodDataCustomerBalance(TypedDict): + pass - class ConfirmParamsPaymentMethodDataCustomerBalance(TypedDict): - pass + class ConfirmParamsPaymentMethodDataCashapp(TypedDict): + pass - class ConfirmParamsPaymentMethodDataCashapp(TypedDict): - pass + class ConfirmParamsPaymentMethodDataBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ - class ConfirmParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ + class ConfirmParamsPaymentMethodDataBlik(TypedDict): + pass - class ConfirmParamsPaymentMethodDataBlik(TypedDict): - pass + class ConfirmParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|SetupIntent.ConfirmParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ - class ConfirmParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|SetupIntent.ConfirmParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ + class ConfirmParamsPaymentMethodDataBillingDetailsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ConfirmParamsPaymentMethodDataBillingDetailsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class ConfirmParamsPaymentMethodDataBancontact(TypedDict): + pass - class ConfirmParamsPaymentMethodDataBancontact(TypedDict): - pass + class ConfirmParamsPaymentMethodDataBacsDebit(TypedDict): + account_number: NotRequired["str"] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired["str"] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ - class ConfirmParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired["str"] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired["str"] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ + class ConfirmParamsPaymentMethodDataAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ - class ConfirmParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ + class ConfirmParamsPaymentMethodDataAlipay(TypedDict): + pass - class ConfirmParamsPaymentMethodDataAlipay(TypedDict): - pass + class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): + pass - class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass + class ConfirmParamsPaymentMethodDataAffirm(TypedDict): + pass - class ConfirmParamsPaymentMethodDataAffirm(TypedDict): - pass + class ConfirmParamsPaymentMethodDataAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ - class ConfirmParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ + class ConfirmParamsMandateData2(TypedDict): + customer_acceptance: "SetupIntent.ConfirmParamsMandateDataCustomerAcceptance2" + """ + This hash contains details about the customer acceptance of the Mandate. + """ - class ConfirmParamsMandateData2(TypedDict): - customer_acceptance: "SetupIntent.ConfirmParamsMandateDataCustomerAcceptance2" - """ - This hash contains details about the customer acceptance of the Mandate. - """ + class ConfirmParamsMandateDataCustomerAcceptance2(TypedDict): + online: "SetupIntent.ConfirmParamsMandateDataCustomerAcceptanceOnline2" + """ + If this is a Mandate accepted online, this hash contains details about the online acceptance. + """ + type: Literal["online"] + """ + The type of customer acceptance information included with the Mandate. + """ - class ConfirmParamsMandateDataCustomerAcceptance2(TypedDict): - online: "SetupIntent.ConfirmParamsMandateDataCustomerAcceptanceOnline2" - """ - If this is a Mandate accepted online, this hash contains details about the online acceptance. - """ - type: Literal["online"] - """ - The type of customer acceptance information included with the Mandate. - """ + class ConfirmParamsMandateDataCustomerAcceptanceOnline2(TypedDict): + ip_address: NotRequired["str"] + """ + The IP address from which the Mandate was accepted by the customer. + """ + user_agent: NotRequired["str"] + """ + The user agent of the browser from which the Mandate was accepted by the customer. + """ - class ConfirmParamsMandateDataCustomerAcceptanceOnline2(TypedDict): - ip_address: NotRequired["str"] - """ - The IP address from which the Mandate was accepted by the customer. - """ - user_agent: NotRequired["str"] - """ - The user agent of the browser from which the Mandate was accepted by the customer. - """ + class ConfirmParamsMandateData(TypedDict): + customer_acceptance: "SetupIntent.ConfirmParamsMandateDataCustomerAcceptance" + """ + This hash contains details about the customer acceptance of the Mandate. + """ - class ConfirmParamsMandateData(TypedDict): - customer_acceptance: "SetupIntent.ConfirmParamsMandateDataCustomerAcceptance" - """ - This hash contains details about the customer acceptance of the Mandate. - """ + class ConfirmParamsMandateDataCustomerAcceptance(TypedDict): + accepted_at: NotRequired["int"] + """ + The time at which the customer accepted the Mandate. + """ + offline: NotRequired[ + "SetupIntent.ConfirmParamsMandateDataCustomerAcceptanceOffline" + ] + """ + If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + """ + online: NotRequired[ + "SetupIntent.ConfirmParamsMandateDataCustomerAcceptanceOnline" + ] + """ + If this is a Mandate accepted online, this hash contains details about the online acceptance. + """ + type: Literal["offline", "online"] + """ + The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + """ - class ConfirmParamsMandateDataCustomerAcceptance(TypedDict): - accepted_at: NotRequired["int"] - """ - The time at which the customer accepted the Mandate. - """ - offline: NotRequired[ - "SetupIntent.ConfirmParamsMandateDataCustomerAcceptanceOffline" - ] - """ - If this is a Mandate accepted offline, this hash contains details about the offline acceptance. - """ - online: NotRequired[ - "SetupIntent.ConfirmParamsMandateDataCustomerAcceptanceOnline" - ] - """ - If this is a Mandate accepted online, this hash contains details about the online acceptance. - """ - type: Literal["offline", "online"] - """ - The type of customer acceptance information included with the Mandate. One of `online` or `offline`. - """ + class ConfirmParamsMandateDataCustomerAcceptanceOnline(TypedDict): + ip_address: str + """ + The IP address from which the Mandate was accepted by the customer. + """ + user_agent: str + """ + The user agent of the browser from which the Mandate was accepted by the customer. + """ - class ConfirmParamsMandateDataCustomerAcceptanceOnline(TypedDict): - ip_address: str - """ - The IP address from which the Mandate was accepted by the customer. - """ - user_agent: str - """ - The user agent of the browser from which the Mandate was accepted by the customer. - """ + class ConfirmParamsMandateDataCustomerAcceptanceOffline(TypedDict): + pass - class ConfirmParamsMandateDataCustomerAcceptanceOffline(TypedDict): - pass + class CreateParams(RequestOptions): + attach_to_self: NotRequired["bool"] + """ + If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. - class CreateParams(RequestOptions): - attach_to_self: NotRequired["bool"] - """ - If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + """ + automatic_payment_methods: NotRequired[ + "SetupIntent.CreateParamsAutomaticPaymentMethods" + ] + """ + When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters. + """ + confirm: NotRequired["bool"] + """ + Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary. + """ + customer: NotRequired["str"] + """ + ID of the Customer this SetupIntent belongs to, if one exists. - It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. - """ - automatic_payment_methods: NotRequired[ - "SetupIntent.CreateParamsAutomaticPaymentMethods" - ] - """ - When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters. - """ - confirm: NotRequired["bool"] - """ - Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary. - """ - customer: NotRequired["str"] - """ - ID of the Customer this SetupIntent belongs to, if one exists. + If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + flow_directions: NotRequired["List[Literal['inbound', 'outbound']]"] + """ + Indicates the directions of money movement for which this payment method is intended to be used. - If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - flow_directions: NotRequired[ - "List[Literal['inbound', 'outbound']]" - ] - """ - Indicates the directions of money movement for which this payment method is intended to be used. + Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + """ + mandate_data: NotRequired[ + "Literal['']|SetupIntent.CreateParamsMandateData" + ] + """ + This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + """ + 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`. + """ + on_behalf_of: NotRequired["str"] + """ + The Stripe account ID created for this SetupIntent. + """ + payment_method: NotRequired["str"] + """ + ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + """ + payment_method_configuration: NotRequired["str"] + """ + The ID of the payment method configuration to use with this SetupIntent. + """ + payment_method_data: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodData" + ] + """ + When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + value in the SetupIntent. + """ + payment_method_options: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this SetupIntent. + """ + 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"]. + """ + return_url: NotRequired["str"] + """ + The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + """ + single_use: NotRequired["SetupIntent.CreateParamsSingleUse"] + """ + If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion. + """ + usage: NotRequired["Literal['off_session', 'on_session']"] + """ + Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. + """ + use_stripe_sdk: NotRequired["bool"] + """ + Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + """ - Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. - """ - mandate_data: NotRequired[ - "Literal['']|SetupIntent.CreateParamsMandateData" - ] - """ - This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). - """ - 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`. - """ - on_behalf_of: NotRequired["str"] - """ - The Stripe account ID created for this SetupIntent. - """ - payment_method: NotRequired["str"] - """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. - """ - payment_method_configuration: NotRequired["str"] - """ - The ID of the payment method configuration to use with this SetupIntent. - """ - payment_method_data: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodData" - ] - """ - When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) - value in the SetupIntent. - """ - payment_method_options: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this SetupIntent. - """ - 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"]. - """ - return_url: NotRequired["str"] - """ - The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). - """ - single_use: NotRequired["SetupIntent.CreateParamsSingleUse"] - """ - If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion. - """ - usage: NotRequired["Literal['off_session', 'on_session']"] - """ - Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. - """ - use_stripe_sdk: NotRequired["bool"] - """ - Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. - """ + class CreateParamsSingleUse(TypedDict): + amount: int + """ + Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). 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](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ - class CreateParamsSingleUse(TypedDict): - amount: int - """ - Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). 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](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ + class CreateParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsAcssDebit" + ] + """ + If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + """ + card: NotRequired["SetupIntent.CreateParamsPaymentMethodOptionsCard"] + """ + Configuration for any card setup attempted on this SetupIntent. + """ + link: NotRequired["SetupIntent.CreateParamsPaymentMethodOptionsLink"] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ + paypal: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsPaypal" + ] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ + sepa_debit: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsSepaDebit" + ] + """ + If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ + us_bank_account: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccount" + ] + """ + If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + """ - class CreateParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. - """ - card: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card setup attempted on this SetupIntent. - """ - link: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsLink" - ] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - paypal: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - sepa_debit: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - us_bank_account: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. - """ + class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): + financial_connections: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + networks: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccountNetworks" + ] + """ + Additional fields for network related functions + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - networks: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): - requested: NotRequired["List[Literal['ach', 'us_domestic_wire']]"] - """ - Triggers validations to run across the selected networks - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - permissions: NotRequired[ - "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired["List[Literal['balances']]"] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired["str"] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ - - class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - - class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions( - TypedDict, - ): - pass - - class CreateParamsPaymentMethodOptionsPaypal(TypedDict): - billing_agreement_id: NotRequired["str"] - """ - The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. - """ - - class CreateParamsPaymentMethodOptionsLink(TypedDict): - persistent_token: NotRequired["str"] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - - class CreateParamsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired["bool"] - """ - When specified, this parameter signals that a card has been collected - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - "Literal['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'mastercard', 'unionpay', 'unknown', 'visa']" - ] - """ - Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. - """ - request_three_d_secure: NotRequired["Literal['any', 'automatic']"] - """ - 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. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - - class CreateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - currency: str - """ - Currency in which future payments will be charged. 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: NotRequired["str"] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired["int"] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired["List[Literal['india']]"] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ - - class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired["Literal['cad', 'usd']"] - """ - 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). - """ - mandate_options: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + class CreateParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): + requested: NotRequired["List[Literal['ach', 'us_domestic_wire']]"] + """ + Triggers validations to run across the selected networks + """ - class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - default_for: NotRequired[ - "List[Literal['invoice', 'subscription']]" - ] - """ - List of Stripe products where this mandate can be selected automatically. - """ - interval_description: NotRequired["str"] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - "Literal['combined', 'interval', 'sporadic']" - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired["Literal['business', 'personal']"] - """ - Transaction type of the mandate. - """ + class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, + ): + permissions: NotRequired[ + "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired["List[Literal['balances']]"] + """ + List of data features that you would like to retrieve upon account creation. + """ + return_url: NotRequired["str"] + """ + For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + """ - class CreateParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - au_becs_debit: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billing_details: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired["SetupIntent.CreateParamsPaymentMethodDataBlik"] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - customer_balance: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["SetupIntent.CreateParamsPaymentMethodDataEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired["SetupIntent.CreateParamsPaymentMethodDataFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - grabpay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - ideal: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataIdeal" - ] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - klarna: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - link: NotRequired["SetupIntent.CreateParamsPaymentMethodDataLink"] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - 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`. - """ - oxxo: NotRequired["SetupIntent.CreateParamsPaymentMethodDataOxxo"] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["SetupIntent.CreateParamsPaymentMethodDataP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - paynow: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - pix: NotRequired["SetupIntent.CreateParamsPaymentMethodDataPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - radar_options: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - revolut_pay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - sepa_debit: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - sofort: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "blik", - "boleto", - "cashapp", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "klarna", - "konbini", - "link", - "oxxo", - "p24", - "paynow", - "paypal", - "pix", - "promptpay", - "revolut_pay", - "sepa_debit", - "sofort", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["SetupIntent.CreateParamsPaymentMethodDataZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ + class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ - class CreateParamsPaymentMethodDataZip(TypedDict): - pass + class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): + pass - class CreateParamsPaymentMethodDataWechatPay(TypedDict): - pass + class CreateParamsPaymentMethodOptionsPaypal(TypedDict): + billing_agreement_id: NotRequired["str"] + """ + The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + """ - class CreateParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - Account holder type: individual or company. - """ - account_number: NotRequired["str"] - """ - Account number of the bank account. - """ - account_type: NotRequired["Literal['checking', 'savings']"] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired["str"] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired["str"] - """ - Routing number of the bank account. - """ + class CreateParamsPaymentMethodOptionsLink(TypedDict): + persistent_token: NotRequired["str"] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ - class CreateParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ + class CreateParamsPaymentMethodOptionsCard(TypedDict): + mandate_options: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + moto: NotRequired["bool"] + """ + When specified, this parameter signals that a card has been collected + as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + parameter can only be provided during confirmation. + """ + network: NotRequired[ + "Literal['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'mastercard', 'unionpay', 'unknown', 'visa']" + ] + """ + Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + """ + request_three_d_secure: NotRequired["Literal['any', 'automatic']"] + """ + 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. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ - class CreateParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ + class CreateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): + amount: int + """ + Amount to be charged for future payments. + """ + amount_type: Literal["fixed", "maximum"] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + currency: str + """ + Currency in which future payments will be charged. 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: NotRequired["str"] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired["int"] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + interval: Literal["day", "month", "sporadic", "week", "year"] + """ + Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + """ + reference: str + """ + Unique identifier for the mandate or subscription. + """ + start_date: int + """ + Start date of the mandate or subscription. Start date should not be lesser than yesterday. + """ + supported_types: NotRequired["List[Literal['india']]"] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ - class CreateParamsPaymentMethodDataRevolutPay(TypedDict): - pass + class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): + currency: NotRequired["Literal['cad', 'usd']"] + """ + 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). + """ + mandate_options: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class CreateParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired["str"] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ + class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + default_for: NotRequired["List[Literal['invoice', 'subscription']]"] + """ + List of Stripe products where this mandate can be selected automatically. + """ + interval_description: NotRequired["str"] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']" + ] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired["Literal['business', 'personal']"] + """ + Transaction type of the mandate. + """ - class CreateParamsPaymentMethodDataPromptpay(TypedDict): - pass + class CreateParamsPaymentMethodData(TypedDict): + acss_debit: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataAcssDebit" + ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired["SetupIntent.CreateParamsPaymentMethodDataAffirm"] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired["SetupIntent.CreateParamsPaymentMethodDataAlipay"] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + au_becs_debit: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataAuBecsDebit" + ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billing_details: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["SetupIntent.CreateParamsPaymentMethodDataBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired["SetupIntent.CreateParamsPaymentMethodDataBoleto"] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + cashapp: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataCashapp" + ] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + customer_balance: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["SetupIntent.CreateParamsPaymentMethodDataEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + fpx: NotRequired["SetupIntent.CreateParamsPaymentMethodDataFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataGiropay" + ] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + grabpay: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataGrabpay" + ] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + ideal: NotRequired["SetupIntent.CreateParamsPaymentMethodDataIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + klarna: NotRequired["SetupIntent.CreateParamsPaymentMethodDataKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataKonbini" + ] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + link: NotRequired["SetupIntent.CreateParamsPaymentMethodDataLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + 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`. + """ + oxxo: NotRequired["SetupIntent.CreateParamsPaymentMethodDataOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["SetupIntent.CreateParamsPaymentMethodDataP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + paynow: NotRequired["SetupIntent.CreateParamsPaymentMethodDataPaynow"] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired["SetupIntent.CreateParamsPaymentMethodDataPaypal"] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + pix: NotRequired["SetupIntent.CreateParamsPaymentMethodDataPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + radar_options: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataRadarOptions" + ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + revolut_pay: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataRevolutPay" + ] + """ + If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + sepa_debit: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + sofort: NotRequired["SetupIntent.CreateParamsPaymentMethodDataSofort"] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + type: Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay", + "zip", + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataUsBankAccount" + ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataWechatPay" + ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["SetupIntent.CreateParamsPaymentMethodDataZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ - class CreateParamsPaymentMethodDataPix(TypedDict): - pass + class CreateParamsPaymentMethodDataZip(TypedDict): + pass - class CreateParamsPaymentMethodDataPaypal(TypedDict): - pass + class CreateParamsPaymentMethodDataWechatPay(TypedDict): + pass - class CreateParamsPaymentMethodDataPaynow(TypedDict): - pass + class CreateParamsPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + Account holder type: individual or company. + """ + account_number: NotRequired["str"] + """ + Account number of the bank account. + """ + account_type: NotRequired["Literal['checking', 'savings']"] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired["str"] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired["str"] + """ + Routing number of the bank account. + """ - class CreateParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']" - ] - """ - The customer's bank. - """ + class CreateParamsPaymentMethodDataSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ - class CreateParamsPaymentMethodDataOxxo(TypedDict): - pass + class CreateParamsPaymentMethodDataSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ - class CreateParamsPaymentMethodDataLink(TypedDict): - pass + class CreateParamsPaymentMethodDataRevolutPay(TypedDict): + pass - class CreateParamsPaymentMethodDataKonbini(TypedDict): - pass + class CreateParamsPaymentMethodDataRadarOptions(TypedDict): + session: NotRequired["str"] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ - class CreateParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ + class CreateParamsPaymentMethodDataPromptpay(TypedDict): + pass - class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ + class CreateParamsPaymentMethodDataPix(TypedDict): + pass - class CreateParamsPaymentMethodDataInteracPresent(TypedDict): - pass + class CreateParamsPaymentMethodDataPaypal(TypedDict): + pass - class CreateParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - "Literal['abn_amro', 'asn_bank', 'bunq', 'handelsbanken', 'ing', 'knab', 'moneyou', 'n26', 'rabobank', 'regiobank', 'revolut', 'sns_bank', 'triodos_bank', 'van_lanschot', 'yoursafe']" - ] - """ - The customer's bank. - """ + class CreateParamsPaymentMethodDataPaynow(TypedDict): + pass - class CreateParamsPaymentMethodDataGrabpay(TypedDict): - pass + class CreateParamsPaymentMethodDataP24(TypedDict): + bank: NotRequired[ + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']" + ] + """ + The customer's bank. + """ - class CreateParamsPaymentMethodDataGiropay(TypedDict): - pass + class CreateParamsPaymentMethodDataOxxo(TypedDict): + pass - class CreateParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ + class CreateParamsPaymentMethodDataLink(TypedDict): + pass - class CreateParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - "Literal['arzte_und_apotheker_bank', 'austrian_anadi_bank_ag', 'bank_austria', 'bankhaus_carl_spangler', 'bankhaus_schelhammer_und_schattera_ag', 'bawag_psk_ag', 'bks_bank_ag', 'brull_kallmus_bank_ag', 'btv_vier_lander_bank', 'capital_bank_grawe_gruppe_ag', 'deutsche_bank_ag', 'dolomitenbank', 'easybank_ag', 'erste_bank_und_sparkassen', 'hypo_alpeadriabank_international_ag', 'hypo_bank_burgenland_aktiengesellschaft', 'hypo_noe_lb_fur_niederosterreich_u_wien', 'hypo_oberosterreich_salzburg_steiermark', 'hypo_tirol_bank_ag', 'hypo_vorarlberg_bank_ag', 'marchfelder_bank', 'oberbank_ag', 'raiffeisen_bankengruppe_osterreich', 'schoellerbank_ag', 'sparda_bank_wien', 'volksbank_gruppe', 'volkskreditbank_ag', 'vr_bank_braunau']" - ] - """ - The customer's bank. - """ + class CreateParamsPaymentMethodDataKonbini(TypedDict): + pass - class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): - pass + class CreateParamsPaymentMethodDataKlarna(TypedDict): + dob: NotRequired["SetupIntent.CreateParamsPaymentMethodDataKlarnaDob"] + """ + Customer's date of birth + """ - class CreateParamsPaymentMethodDataCashapp(TypedDict): - pass + class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ - class CreateParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ + class CreateParamsPaymentMethodDataInteracPresent(TypedDict): + pass - class CreateParamsPaymentMethodDataBlik(TypedDict): - pass + class CreateParamsPaymentMethodDataIdeal(TypedDict): + bank: NotRequired[ + "Literal['abn_amro', 'asn_bank', 'bunq', 'handelsbanken', 'ing', 'knab', 'moneyou', 'n26', 'rabobank', 'regiobank', 'revolut', 'sns_bank', 'triodos_bank', 'van_lanschot', 'yoursafe']" + ] + """ + The customer's bank. + """ + + class CreateParamsPaymentMethodDataGrabpay(TypedDict): + pass + + class CreateParamsPaymentMethodDataGiropay(TypedDict): + pass + + class CreateParamsPaymentMethodDataFpx(TypedDict): + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ - class CreateParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|SetupIntent.CreateParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ + class CreateParamsPaymentMethodDataEps(TypedDict): + bank: NotRequired[ + "Literal['arzte_und_apotheker_bank', 'austrian_anadi_bank_ag', 'bank_austria', 'bankhaus_carl_spangler', 'bankhaus_schelhammer_und_schattera_ag', 'bawag_psk_ag', 'bks_bank_ag', 'brull_kallmus_bank_ag', 'btv_vier_lander_bank', 'capital_bank_grawe_gruppe_ag', 'deutsche_bank_ag', 'dolomitenbank', 'easybank_ag', 'erste_bank_und_sparkassen', 'hypo_alpeadriabank_international_ag', 'hypo_bank_burgenland_aktiengesellschaft', 'hypo_noe_lb_fur_niederosterreich_u_wien', 'hypo_oberosterreich_salzburg_steiermark', 'hypo_tirol_bank_ag', 'hypo_vorarlberg_bank_ag', 'marchfelder_bank', 'oberbank_ag', 'raiffeisen_bankengruppe_osterreich', 'schoellerbank_ag', 'sparda_bank_wien', 'volksbank_gruppe', 'volkskreditbank_ag', 'vr_bank_braunau']" + ] + """ + The customer's bank. + """ - class CreateParamsPaymentMethodDataBillingDetailsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): + pass - class CreateParamsPaymentMethodDataBancontact(TypedDict): - pass + class CreateParamsPaymentMethodDataCashapp(TypedDict): + pass - class CreateParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired["str"] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired["str"] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ + class CreateParamsPaymentMethodDataBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ - class CreateParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ + class CreateParamsPaymentMethodDataBlik(TypedDict): + pass - class CreateParamsPaymentMethodDataAlipay(TypedDict): - pass + class CreateParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|SetupIntent.CreateParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ - class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass + class CreateParamsPaymentMethodDataBillingDetailsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreateParamsPaymentMethodDataAffirm(TypedDict): - pass + class CreateParamsPaymentMethodDataBancontact(TypedDict): + pass - class CreateParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ + class CreateParamsPaymentMethodDataBacsDebit(TypedDict): + account_number: NotRequired["str"] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired["str"] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ - class CreateParamsMandateData(TypedDict): - customer_acceptance: "SetupIntent.CreateParamsMandateDataCustomerAcceptance" - """ - This hash contains details about the customer acceptance of the Mandate. - """ + class CreateParamsPaymentMethodDataAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ - class CreateParamsMandateDataCustomerAcceptance(TypedDict): - accepted_at: NotRequired["int"] - """ - The time at which the customer accepted the Mandate. - """ - offline: NotRequired[ - "SetupIntent.CreateParamsMandateDataCustomerAcceptanceOffline" - ] - """ - If this is a Mandate accepted offline, this hash contains details about the offline acceptance. - """ - online: NotRequired[ - "SetupIntent.CreateParamsMandateDataCustomerAcceptanceOnline" - ] - """ - If this is a Mandate accepted online, this hash contains details about the online acceptance. - """ - type: Literal["offline", "online"] - """ - The type of customer acceptance information included with the Mandate. One of `online` or `offline`. - """ + class CreateParamsPaymentMethodDataAlipay(TypedDict): + pass - class CreateParamsMandateDataCustomerAcceptanceOnline(TypedDict): - ip_address: str - """ - The IP address from which the Mandate was accepted by the customer. - """ - user_agent: str - """ - The user agent of the browser from which the Mandate was accepted by the customer. - """ + class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): + pass - class CreateParamsMandateDataCustomerAcceptanceOffline(TypedDict): - pass + class CreateParamsPaymentMethodDataAffirm(TypedDict): + pass - class CreateParamsAutomaticPaymentMethods(TypedDict): - allow_redirects: NotRequired["Literal['always', 'never']"] - """ - Controls whether this SetupIntent will accept redirect-based payment methods. + class CreateParamsPaymentMethodDataAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ - Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. - """ - enabled: bool - """ - Whether this feature is enabled. - """ + class CreateParamsMandateData(TypedDict): + customer_acceptance: "SetupIntent.CreateParamsMandateDataCustomerAcceptance" + """ + This hash contains details about the customer acceptance of the Mandate. + """ - class ListParams(RequestOptions): - attach_to_self: NotRequired["bool"] - """ - If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + class CreateParamsMandateDataCustomerAcceptance(TypedDict): + accepted_at: NotRequired["int"] + """ + The time at which the customer accepted the Mandate. + """ + offline: NotRequired[ + "SetupIntent.CreateParamsMandateDataCustomerAcceptanceOffline" + ] + """ + If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + """ + online: NotRequired[ + "SetupIntent.CreateParamsMandateDataCustomerAcceptanceOnline" + ] + """ + If this is a Mandate accepted online, this hash contains details about the online acceptance. + """ + type: Literal["offline", "online"] + """ + The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + """ - It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. - """ - created: NotRequired["SetupIntent.ListParamsCreated|int"] - """ - A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. - """ - customer: NotRequired["str"] - """ - Only return SetupIntents for the customer specified by this customer ID. - """ - 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. - """ - payment_method: NotRequired["str"] - """ - Only return SetupIntents that associate with the specified payment method. - """ - 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 CreateParamsMandateDataCustomerAcceptanceOnline(TypedDict): + ip_address: str + """ + The IP address from which the Mandate was accepted by the customer. + """ + user_agent: str + """ + The user agent of the browser from which the Mandate was accepted by the customer. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class CreateParamsMandateDataCustomerAcceptanceOffline(TypedDict): + pass - class ModifyParams(RequestOptions): - attach_to_self: NotRequired["bool"] - """ - If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + class CreateParamsAutomaticPaymentMethods(TypedDict): + allow_redirects: NotRequired["Literal['always', 'never']"] + """ + Controls whether this SetupIntent will accept redirect-based payment methods. - It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. - """ - customer: NotRequired["str"] - """ - ID of the Customer this SetupIntent belongs to, if one exists. + Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. + """ + enabled: bool + """ + Whether this feature is enabled. + """ - If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - flow_directions: NotRequired[ - "List[Literal['inbound', 'outbound']]" - ] - """ - Indicates the directions of money movement for which this payment method is intended to be used. + class ListParams(RequestOptions): + attach_to_self: NotRequired["bool"] + """ + If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. - Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. - """ - metadata: NotRequired["Literal['']|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: NotRequired["str"] - """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. - """ - payment_method_configuration: NotRequired["str"] - """ - The ID of the payment method configuration to use with this SetupIntent. - """ - payment_method_data: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodData" - ] - """ - When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) - value in the SetupIntent. - """ - payment_method_options: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this SetupIntent. - """ - 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"]. - """ + It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + """ + created: NotRequired["SetupIntent.ListParamsCreated|int"] + """ + A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + """ + customer: NotRequired["str"] + """ + Only return SetupIntents for the customer specified by this customer ID. + """ + 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. + """ + payment_method: NotRequired["str"] + """ + Only return SetupIntents that associate with the specified payment method. + """ + 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 ModifyParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. - """ - card: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card setup attempted on this SetupIntent. - """ - link: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsLink" - ] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - paypal: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - sepa_debit: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - us_bank_account: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - networks: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + class ModifyParams(RequestOptions): + attach_to_self: NotRequired["bool"] + """ + If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. - class ModifyParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): - requested: NotRequired["List[Literal['ach', 'us_domestic_wire']]"] - """ - Triggers validations to run across the selected networks - """ + It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + """ + customer: NotRequired["str"] + """ + ID of the Customer this SetupIntent belongs to, if one exists. - class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - permissions: NotRequired[ - "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired["List[Literal['balances']]"] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired["str"] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ + If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + flow_directions: NotRequired["List[Literal['inbound', 'outbound']]"] + """ + Indicates the directions of money movement for which this payment method is intended to be used. - class ModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ + Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + """ + metadata: NotRequired["Literal['']|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: NotRequired["str"] + """ + ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + """ + payment_method_configuration: NotRequired["str"] + """ + The ID of the payment method configuration to use with this SetupIntent. + """ + payment_method_data: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodData" + ] + """ + When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + value in the SetupIntent. + """ + payment_method_options: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this SetupIntent. + """ + 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"]. + """ - class ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions( - TypedDict, - ): - pass + class ModifyParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsAcssDebit" + ] + """ + If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + """ + card: NotRequired["SetupIntent.ModifyParamsPaymentMethodOptionsCard"] + """ + Configuration for any card setup attempted on this SetupIntent. + """ + link: NotRequired["SetupIntent.ModifyParamsPaymentMethodOptionsLink"] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ + paypal: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsPaypal" + ] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ + sepa_debit: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsSepaDebit" + ] + """ + If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ + us_bank_account: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccount" + ] + """ + If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + """ - class ModifyParamsPaymentMethodOptionsPaypal(TypedDict): - billing_agreement_id: NotRequired["str"] - """ - The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. - """ + class ModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): + financial_connections: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + networks: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountNetworks" + ] + """ + Additional fields for network related functions + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class ModifyParamsPaymentMethodOptionsLink(TypedDict): - persistent_token: NotRequired["str"] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ + class ModifyParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): + requested: NotRequired["List[Literal['ach', 'us_domestic_wire']]"] + """ + Triggers validations to run across the selected networks + """ - class ModifyParamsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired["bool"] - """ - When specified, this parameter signals that a card has been collected - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - "Literal['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'mastercard', 'unionpay', 'unknown', 'visa']" - ] - """ - Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. - """ - request_three_d_secure: NotRequired["Literal['any', 'automatic']"] - """ - 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. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ + class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, + ): + permissions: NotRequired[ + "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired["List[Literal['balances']]"] + """ + List of data features that you would like to retrieve upon account creation. + """ + return_url: NotRequired["str"] + """ + For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + """ - class ModifyParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - currency: str - """ - Currency in which future payments will be charged. 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: NotRequired["str"] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired["int"] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired["List[Literal['india']]"] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ + class ModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ - class ModifyParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired["Literal['cad', 'usd']"] - """ - 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). - """ - mandate_options: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + class ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): + pass - class ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - default_for: NotRequired[ - "List[Literal['invoice', 'subscription']]" - ] - """ - List of Stripe products where this mandate can be selected automatically. - """ - interval_description: NotRequired["str"] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - "Literal['combined', 'interval', 'sporadic']" - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired["Literal['business', 'personal']"] - """ - Transaction type of the mandate. - """ + class ModifyParamsPaymentMethodOptionsPaypal(TypedDict): + billing_agreement_id: NotRequired["str"] + """ + The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + """ - class ModifyParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - au_becs_debit: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billing_details: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataBlik"] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - customer_balance: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - grabpay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - ideal: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataIdeal" - ] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - klarna: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - link: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataLink"] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - 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`. - """ - oxxo: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataOxxo"] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - paynow: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - pix: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - radar_options: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - revolut_pay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - sepa_debit: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - sofort: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "blik", - "boleto", - "cashapp", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "klarna", - "konbini", - "link", - "oxxo", - "p24", - "paynow", - "paypal", - "pix", - "promptpay", - "revolut_pay", - "sepa_debit", - "sofort", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ + class ModifyParamsPaymentMethodOptionsLink(TypedDict): + persistent_token: NotRequired["str"] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ + + class ModifyParamsPaymentMethodOptionsCard(TypedDict): + mandate_options: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + moto: NotRequired["bool"] + """ + When specified, this parameter signals that a card has been collected + as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + parameter can only be provided during confirmation. + """ + network: NotRequired[ + "Literal['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'mastercard', 'unionpay', 'unknown', 'visa']" + ] + """ + Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + """ + request_three_d_secure: NotRequired["Literal['any', 'automatic']"] + """ + 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. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ - class ModifyParamsPaymentMethodDataZip(TypedDict): - pass + class ModifyParamsPaymentMethodOptionsCardMandateOptions(TypedDict): + amount: int + """ + Amount to be charged for future payments. + """ + amount_type: Literal["fixed", "maximum"] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + currency: str + """ + Currency in which future payments will be charged. 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: NotRequired["str"] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired["int"] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + interval: Literal["day", "month", "sporadic", "week", "year"] + """ + Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + """ + reference: str + """ + Unique identifier for the mandate or subscription. + """ + start_date: int + """ + Start date of the mandate or subscription. Start date should not be lesser than yesterday. + """ + supported_types: NotRequired["List[Literal['india']]"] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ - class ModifyParamsPaymentMethodDataWechatPay(TypedDict): - pass + class ModifyParamsPaymentMethodOptionsAcssDebit(TypedDict): + currency: NotRequired["Literal['cad', 'usd']"] + """ + 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). + """ + mandate_options: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class ModifyParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - Account holder type: individual or company. - """ - account_number: NotRequired["str"] - """ - Account number of the bank account. - """ - account_type: NotRequired["Literal['checking', 'savings']"] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired["str"] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired["str"] - """ - Routing number of the bank account. - """ + class ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + default_for: NotRequired["List[Literal['invoice', 'subscription']]"] + """ + List of Stripe products where this mandate can be selected automatically. + """ + interval_description: NotRequired["str"] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']" + ] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired["Literal['business', 'personal']"] + """ + Transaction type of the mandate. + """ - class ModifyParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ + class ModifyParamsPaymentMethodData(TypedDict): + acss_debit: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataAcssDebit" + ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataAffirm"] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataAlipay"] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + au_becs_debit: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataAuBecsDebit" + ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billing_details: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataBoleto"] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + cashapp: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataCashapp" + ] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + customer_balance: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + fpx: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataGiropay" + ] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + grabpay: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataGrabpay" + ] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + ideal: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + klarna: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataKonbini" + ] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + link: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + 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`. + """ + oxxo: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + paynow: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataPaynow"] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataPaypal"] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + pix: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + radar_options: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataRadarOptions" + ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + revolut_pay: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataRevolutPay" + ] + """ + If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + sepa_debit: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + sofort: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataSofort"] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + type: Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "sepa_debit", + "sofort", + "us_bank_account", + "wechat_pay", + "zip", + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataUsBankAccount" + ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataWechatPay" + ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ - class ModifyParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ + class ModifyParamsPaymentMethodDataZip(TypedDict): + pass - class ModifyParamsPaymentMethodDataRevolutPay(TypedDict): - pass + class ModifyParamsPaymentMethodDataWechatPay(TypedDict): + pass - class ModifyParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired["str"] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ + class ModifyParamsPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + Account holder type: individual or company. + """ + account_number: NotRequired["str"] + """ + Account number of the bank account. + """ + account_type: NotRequired["Literal['checking', 'savings']"] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired["str"] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired["str"] + """ + Routing number of the bank account. + """ - class ModifyParamsPaymentMethodDataPromptpay(TypedDict): - pass + class ModifyParamsPaymentMethodDataSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ - class ModifyParamsPaymentMethodDataPix(TypedDict): - pass + class ModifyParamsPaymentMethodDataSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ - class ModifyParamsPaymentMethodDataPaypal(TypedDict): - pass + class ModifyParamsPaymentMethodDataRevolutPay(TypedDict): + pass - class ModifyParamsPaymentMethodDataPaynow(TypedDict): - pass + class ModifyParamsPaymentMethodDataRadarOptions(TypedDict): + session: NotRequired["str"] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ - class ModifyParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']" - ] - """ - The customer's bank. - """ + class ModifyParamsPaymentMethodDataPromptpay(TypedDict): + pass - class ModifyParamsPaymentMethodDataOxxo(TypedDict): - pass + class ModifyParamsPaymentMethodDataPix(TypedDict): + pass - class ModifyParamsPaymentMethodDataLink(TypedDict): - pass + class ModifyParamsPaymentMethodDataPaypal(TypedDict): + pass - class ModifyParamsPaymentMethodDataKonbini(TypedDict): - pass + class ModifyParamsPaymentMethodDataPaynow(TypedDict): + pass - class ModifyParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ + class ModifyParamsPaymentMethodDataP24(TypedDict): + bank: NotRequired[ + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'volkswagen_bank']" + ] + """ + The customer's bank. + """ - class ModifyParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ + class ModifyParamsPaymentMethodDataOxxo(TypedDict): + pass - class ModifyParamsPaymentMethodDataInteracPresent(TypedDict): - pass + class ModifyParamsPaymentMethodDataLink(TypedDict): + pass - class ModifyParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - "Literal['abn_amro', 'asn_bank', 'bunq', 'handelsbanken', 'ing', 'knab', 'moneyou', 'n26', 'rabobank', 'regiobank', 'revolut', 'sns_bank', 'triodos_bank', 'van_lanschot', 'yoursafe']" - ] - """ - The customer's bank. - """ + class ModifyParamsPaymentMethodDataKonbini(TypedDict): + pass - class ModifyParamsPaymentMethodDataGrabpay(TypedDict): - pass + class ModifyParamsPaymentMethodDataKlarna(TypedDict): + dob: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataKlarnaDob"] + """ + Customer's date of birth + """ - class ModifyParamsPaymentMethodDataGiropay(TypedDict): - pass + class ModifyParamsPaymentMethodDataKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ - class ModifyParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ + class ModifyParamsPaymentMethodDataInteracPresent(TypedDict): + pass - class ModifyParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - "Literal['arzte_und_apotheker_bank', 'austrian_anadi_bank_ag', 'bank_austria', 'bankhaus_carl_spangler', 'bankhaus_schelhammer_und_schattera_ag', 'bawag_psk_ag', 'bks_bank_ag', 'brull_kallmus_bank_ag', 'btv_vier_lander_bank', 'capital_bank_grawe_gruppe_ag', 'deutsche_bank_ag', 'dolomitenbank', 'easybank_ag', 'erste_bank_und_sparkassen', 'hypo_alpeadriabank_international_ag', 'hypo_bank_burgenland_aktiengesellschaft', 'hypo_noe_lb_fur_niederosterreich_u_wien', 'hypo_oberosterreich_salzburg_steiermark', 'hypo_tirol_bank_ag', 'hypo_vorarlberg_bank_ag', 'marchfelder_bank', 'oberbank_ag', 'raiffeisen_bankengruppe_osterreich', 'schoellerbank_ag', 'sparda_bank_wien', 'volksbank_gruppe', 'volkskreditbank_ag', 'vr_bank_braunau']" - ] - """ - The customer's bank. - """ + class ModifyParamsPaymentMethodDataIdeal(TypedDict): + bank: NotRequired[ + "Literal['abn_amro', 'asn_bank', 'bunq', 'handelsbanken', 'ing', 'knab', 'moneyou', 'n26', 'rabobank', 'regiobank', 'revolut', 'sns_bank', 'triodos_bank', 'van_lanschot', 'yoursafe']" + ] + """ + The customer's bank. + """ + + class ModifyParamsPaymentMethodDataGrabpay(TypedDict): + pass + + class ModifyParamsPaymentMethodDataGiropay(TypedDict): + pass + + class ModifyParamsPaymentMethodDataFpx(TypedDict): + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ - class ModifyParamsPaymentMethodDataCustomerBalance(TypedDict): - pass + class ModifyParamsPaymentMethodDataEps(TypedDict): + bank: NotRequired[ + "Literal['arzte_und_apotheker_bank', 'austrian_anadi_bank_ag', 'bank_austria', 'bankhaus_carl_spangler', 'bankhaus_schelhammer_und_schattera_ag', 'bawag_psk_ag', 'bks_bank_ag', 'brull_kallmus_bank_ag', 'btv_vier_lander_bank', 'capital_bank_grawe_gruppe_ag', 'deutsche_bank_ag', 'dolomitenbank', 'easybank_ag', 'erste_bank_und_sparkassen', 'hypo_alpeadriabank_international_ag', 'hypo_bank_burgenland_aktiengesellschaft', 'hypo_noe_lb_fur_niederosterreich_u_wien', 'hypo_oberosterreich_salzburg_steiermark', 'hypo_tirol_bank_ag', 'hypo_vorarlberg_bank_ag', 'marchfelder_bank', 'oberbank_ag', 'raiffeisen_bankengruppe_osterreich', 'schoellerbank_ag', 'sparda_bank_wien', 'volksbank_gruppe', 'volkskreditbank_ag', 'vr_bank_braunau']" + ] + """ + The customer's bank. + """ - class ModifyParamsPaymentMethodDataCashapp(TypedDict): - pass + class ModifyParamsPaymentMethodDataCustomerBalance(TypedDict): + pass - class ModifyParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ + class ModifyParamsPaymentMethodDataCashapp(TypedDict): + pass - class ModifyParamsPaymentMethodDataBlik(TypedDict): - pass + class ModifyParamsPaymentMethodDataBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ - class ModifyParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|SetupIntent.ModifyParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ + class ModifyParamsPaymentMethodDataBlik(TypedDict): + pass - class ModifyParamsPaymentMethodDataBillingDetailsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class ModifyParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|SetupIntent.ModifyParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ - class ModifyParamsPaymentMethodDataBancontact(TypedDict): - pass + class ModifyParamsPaymentMethodDataBillingDetailsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ModifyParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired["str"] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired["str"] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ + class ModifyParamsPaymentMethodDataBancontact(TypedDict): + pass - class ModifyParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ + class ModifyParamsPaymentMethodDataBacsDebit(TypedDict): + account_number: NotRequired["str"] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired["str"] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ - class ModifyParamsPaymentMethodDataAlipay(TypedDict): - pass + class ModifyParamsPaymentMethodDataAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ - class ModifyParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass + class ModifyParamsPaymentMethodDataAlipay(TypedDict): + pass - class ModifyParamsPaymentMethodDataAffirm(TypedDict): - pass + class ModifyParamsPaymentMethodDataAfterpayClearpay(TypedDict): + pass - class ModifyParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ + class ModifyParamsPaymentMethodDataAffirm(TypedDict): + pass - class RetrieveParams(RequestOptions): - client_secret: NotRequired["str"] - """ - The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ModifyParamsPaymentMethodDataAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ - class VerifyMicrodepositsParams(RequestOptions): - amounts: NotRequired["List[int]"] - """ - Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. - """ - descriptor_code: NotRequired["str"] - """ - A six-character code starting with SM present in the microdeposit sent to the bank account. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + client_secret: NotRequired["str"] + """ + The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + + class VerifyMicrodepositsParams(RequestOptions): + amounts: NotRequired["List[int]"] + """ + Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + """ + descriptor_code: NotRequired["str"] + """ + A six-character code starting with SM present in the microdeposit sent to the bank account. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ application: Optional[ExpandableField["Application"]] """ diff --git a/stripe/api_resources/shipping_rate.py b/stripe/api_resources/shipping_rate.py index 3606e60a5..070be0107 100644 --- a/stripe/api_resources/shipping_rate.py +++ b/stripe/api_resources/shipping_rate.py @@ -92,205 +92,203 @@ class CurrencyOptions(StripeObject): _inner_class_types = {"currency_options": CurrencyOptions} _inner_class_dicts = ["currency_options"] - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - delivery_estimate: NotRequired[ - "ShippingRate.CreateParamsDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - fixed_amount: NotRequired["ShippingRate.CreateParamsFixedAmount"] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - 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`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired["str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired["Literal['fixed_amount']"] - """ - The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. - """ + class CreateParams(RequestOptions): + delivery_estimate: NotRequired[ + "ShippingRate.CreateParamsDeliveryEstimate" + ] + """ + The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + display_name: str + """ + The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + fixed_amount: NotRequired["ShippingRate.CreateParamsFixedAmount"] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + 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`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + tax_code: NotRequired["str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ + type: NotRequired["Literal['fixed_amount']"] + """ + The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + """ - class CreateParamsFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - "Dict[str, ShippingRate.CreateParamsFixedAmountCurrencyOptions]" - ] - """ - Shipping rates 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). - """ + class CreateParamsFixedAmount(TypedDict): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + 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). + """ + currency_options: NotRequired[ + "Dict[str, ShippingRate.CreateParamsFixedAmountCurrencyOptions]" + ] + """ + Shipping rates 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). + """ - class CreateParamsFixedAmountCurrencyOptions(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ + class CreateParamsFixedAmountCurrencyOptions(TypedDict): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ - class CreateParamsDeliveryEstimate(TypedDict): - maximum: NotRequired[ - "ShippingRate.CreateParamsDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "ShippingRate.CreateParamsDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ + class CreateParamsDeliveryEstimate(TypedDict): + maximum: NotRequired[ + "ShippingRate.CreateParamsDeliveryEstimateMaximum" + ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ + minimum: NotRequired[ + "ShippingRate.CreateParamsDeliveryEstimateMinimum" + ] + """ + The lower bound of the estimated range. If empty, represents no lower bound. + """ - class CreateParamsDeliveryEstimateMinimum(TypedDict): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ + class CreateParamsDeliveryEstimateMinimum(TypedDict): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ - class CreateParamsDeliveryEstimateMaximum(TypedDict): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ + class CreateParamsDeliveryEstimateMaximum(TypedDict): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ - class ListParams(RequestOptions): - active: NotRequired["bool"] - """ - Only return shipping rates that are active or inactive. - """ - created: NotRequired["ShippingRate.ListParamsCreated|int"] - """ - A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. - """ - currency: NotRequired["str"] - """ - Only return shipping rates for the given currency. - """ - 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 ListParams(RequestOptions): + active: NotRequired["bool"] + """ + Only return shipping rates that are active or inactive. + """ + created: NotRequired["ShippingRate.ListParamsCreated|int"] + """ + A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + """ + currency: NotRequired["str"] + """ + Only return shipping rates for the given currency. + """ + 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 ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - active: NotRequired["bool"] - """ - Whether the shipping rate can be used for new purchases. Defaults to `true`. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - fixed_amount: NotRequired["ShippingRate.ModifyParamsFixedAmount"] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired["Literal['']|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`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ + class ModifyParams(RequestOptions): + active: NotRequired["bool"] + """ + Whether the shipping rate can be used for new purchases. Defaults to `true`. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + fixed_amount: NotRequired["ShippingRate.ModifyParamsFixedAmount"] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + metadata: NotRequired["Literal['']|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`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ - class ModifyParamsFixedAmount(TypedDict): - currency_options: NotRequired[ - "Dict[str, ShippingRate.ModifyParamsFixedAmountCurrencyOptions]" - ] - """ - Shipping rates 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). - """ + class ModifyParamsFixedAmount(TypedDict): + currency_options: NotRequired[ + "Dict[str, ShippingRate.ModifyParamsFixedAmountCurrencyOptions]" + ] + """ + Shipping rates 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). + """ - class ModifyParamsFixedAmountCurrencyOptions(TypedDict): - amount: NotRequired["int"] - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ + class ModifyParamsFixedAmountCurrencyOptions(TypedDict): + amount: NotRequired["int"] + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ active: bool """ diff --git a/stripe/api_resources/sigma/scheduled_query_run.py b/stripe/api_resources/sigma/scheduled_query_run.py index 7e157828a..92de76f59 100644 --- a/stripe/api_resources/sigma/scheduled_query_run.py +++ b/stripe/api_resources/sigma/scheduled_query_run.py @@ -29,31 +29,29 @@ class Error(StripeObject): Information about the run failure. """ - if TYPE_CHECKING: - - 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. - """ + 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. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ created: int """ diff --git a/stripe/api_resources/source.py b/stripe/api_resources/source.py index e46ecc789..e7634ee4b 100644 --- a/stripe/api_resources/source.py +++ b/stripe/api_resources/source.py @@ -488,531 +488,525 @@ class Wechat(StripeObject): qr_code_url: Optional[str] statement_descriptor: Optional[str] - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - amount: NotRequired["int"] - """ - Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. - """ - currency: NotRequired["str"] - """ - Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. - """ - customer: NotRequired["str"] - """ - The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - flow: NotRequired[ - "Literal['code_verification', 'none', 'receiver', 'redirect']" - ] - """ - The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. - """ - mandate: NotRequired["Source.CreateParamsMandate"] - """ - Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - """ - metadata: NotRequired["Dict[str, str]"] - original_source: NotRequired["str"] - """ - The source to share. - """ - owner: NotRequired["Source.CreateParamsOwner"] - """ - Information about the owner of the payment instrument that may be used or required by particular source types. - """ - receiver: NotRequired["Source.CreateParamsReceiver"] - """ - Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). - """ - redirect: NotRequired["Source.CreateParamsRedirect"] - """ - Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). - """ - source_order: NotRequired["Source.CreateParamsSourceOrder"] - """ - Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - """ - statement_descriptor: NotRequired["str"] - """ - An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. - """ - token: NotRequired["str"] - """ - An optional token used to create the source. When passed, token properties will override source parameters. - """ - type: NotRequired["str"] - """ - The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) - """ - usage: NotRequired["Literal['reusable', 'single_use']"] + class CreateParams(RequestOptions): + amount: NotRequired["int"] + """ + Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. + """ + currency: NotRequired["str"] + """ + Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. + """ + customer: NotRequired["str"] + """ + The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + flow: NotRequired[ + "Literal['code_verification', 'none', 'receiver', 'redirect']" + ] + """ + The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. + """ + mandate: NotRequired["Source.CreateParamsMandate"] + """ + Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + """ + metadata: NotRequired["Dict[str, str]"] + original_source: NotRequired["str"] + """ + The source to share. + """ + owner: NotRequired["Source.CreateParamsOwner"] + """ + Information about the owner of the payment instrument that may be used or required by particular source types. + """ + receiver: NotRequired["Source.CreateParamsReceiver"] + """ + Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). + """ + redirect: NotRequired["Source.CreateParamsRedirect"] + """ + Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). + """ + source_order: NotRequired["Source.CreateParamsSourceOrder"] + """ + Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + """ + statement_descriptor: NotRequired["str"] + """ + An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. + """ + token: NotRequired["str"] + """ + An optional token used to create the source. When passed, token properties will override source parameters. + """ + type: NotRequired["str"] + """ + The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) + """ + usage: NotRequired["Literal['reusable', 'single_use']"] - class CreateParamsSourceOrder(TypedDict): - items: NotRequired["List[Source.CreateParamsSourceOrderItem]"] - """ - List of items constituting the order. - """ - shipping: NotRequired["Source.CreateParamsSourceOrderShipping"] - """ - Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. - """ + class CreateParamsSourceOrder(TypedDict): + items: NotRequired["List[Source.CreateParamsSourceOrderItem]"] + """ + List of items constituting the order. + """ + shipping: NotRequired["Source.CreateParamsSourceOrderShipping"] + """ + Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. + """ - class CreateParamsSourceOrderShipping(TypedDict): - address: "Source.CreateParamsSourceOrderShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired["str"] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: NotRequired["str"] - """ - Recipient name. - """ - phone: NotRequired["str"] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired["str"] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ + class CreateParamsSourceOrderShipping(TypedDict): + address: "Source.CreateParamsSourceOrderShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired["str"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: NotRequired["str"] + """ + Recipient name. + """ + phone: NotRequired["str"] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired["str"] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ - class CreateParamsSourceOrderShippingAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: str - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsSourceOrderShippingAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: str + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreateParamsSourceOrderItem(TypedDict): - amount: NotRequired["int"] - currency: NotRequired["str"] - description: NotRequired["str"] - parent: NotRequired["str"] - """ - The ID of the SKU being ordered. - """ - quantity: NotRequired["int"] - """ - The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. - """ - type: NotRequired["Literal['discount', 'shipping', 'sku', 'tax']"] + class CreateParamsSourceOrderItem(TypedDict): + amount: NotRequired["int"] + currency: NotRequired["str"] + description: NotRequired["str"] + parent: NotRequired["str"] + """ + The ID of the SKU being ordered. + """ + quantity: NotRequired["int"] + """ + The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + """ + type: NotRequired["Literal['discount', 'shipping', 'sku', 'tax']"] - class CreateParamsRedirect(TypedDict): - return_url: str - """ - The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application. - """ + class CreateParamsRedirect(TypedDict): + return_url: str + """ + The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application. + """ - class CreateParamsReceiver(TypedDict): - refund_attributes_method: NotRequired[ - "Literal['email', 'manual', 'none']" - ] - """ - The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required. - """ + class CreateParamsReceiver(TypedDict): + refund_attributes_method: NotRequired[ + "Literal['email', 'manual', 'none']" + ] + """ + The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required. + """ - class CreateParamsOwner(TypedDict): - address: NotRequired["Source.CreateParamsOwnerAddress"] - """ - Owner's address. - """ - email: NotRequired["str"] - """ - Owner's email address. - """ - name: NotRequired["str"] - """ - Owner's full name. - """ - phone: NotRequired["str"] - """ - Owner's phone number. - """ + class CreateParamsOwner(TypedDict): + address: NotRequired["Source.CreateParamsOwnerAddress"] + """ + Owner's address. + """ + email: NotRequired["str"] + """ + Owner's email address. + """ + name: NotRequired["str"] + """ + Owner's full name. + """ + phone: NotRequired["str"] + """ + Owner's phone number. + """ - class CreateParamsOwnerAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsOwnerAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreateParamsMandate(TypedDict): - acceptance: NotRequired["Source.CreateParamsMandateAcceptance"] - """ - The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. - """ - amount: NotRequired["Literal['']|int"] - """ - The amount specified by the mandate. (Leave null for a mandate covering all amounts) - """ - currency: NotRequired["str"] - """ - The currency specified by the mandate. (Must match `currency` of the source) - """ - interval: NotRequired[ - "Literal['one_time', 'scheduled', 'variable']" - ] - """ - The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) - """ - notification_method: NotRequired[ - "Literal['deprecated_none', 'email', 'manual', 'none', 'stripe_email']" - ] - """ - The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). - """ + class CreateParamsMandate(TypedDict): + acceptance: NotRequired["Source.CreateParamsMandateAcceptance"] + """ + The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. + """ + amount: NotRequired["Literal['']|int"] + """ + The amount specified by the mandate. (Leave null for a mandate covering all amounts) + """ + currency: NotRequired["str"] + """ + The currency specified by the mandate. (Must match `currency` of the source) + """ + interval: NotRequired["Literal['one_time', 'scheduled', 'variable']"] + """ + The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) + """ + notification_method: NotRequired[ + "Literal['deprecated_none', 'email', 'manual', 'none', 'stripe_email']" + ] + """ + The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). + """ - class CreateParamsMandateAcceptance(TypedDict): - date: NotRequired["int"] - """ - The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. - """ - ip: NotRequired["str"] - """ - The IP address from which the mandate was accepted or refused by the customer. - """ - offline: NotRequired["Source.CreateParamsMandateAcceptanceOffline"] - """ - The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` - """ - online: NotRequired["Source.CreateParamsMandateAcceptanceOnline"] - """ - The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` - """ - status: Literal["accepted", "pending", "refused", "revoked"] - """ - The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). - """ - type: NotRequired["Literal['offline', 'online']"] - """ - The type of acceptance information included with the mandate. Either `online` or `offline` - """ - user_agent: NotRequired["str"] - """ - The user agent of the browser from which the mandate was accepted or refused by the customer. - """ + class CreateParamsMandateAcceptance(TypedDict): + date: NotRequired["int"] + """ + The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + """ + ip: NotRequired["str"] + """ + The IP address from which the mandate was accepted or refused by the customer. + """ + offline: NotRequired["Source.CreateParamsMandateAcceptanceOffline"] + """ + The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` + """ + online: NotRequired["Source.CreateParamsMandateAcceptanceOnline"] + """ + The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` + """ + status: Literal["accepted", "pending", "refused", "revoked"] + """ + The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). + """ + type: NotRequired["Literal['offline', 'online']"] + """ + The type of acceptance information included with the mandate. Either `online` or `offline` + """ + user_agent: NotRequired["str"] + """ + The user agent of the browser from which the mandate was accepted or refused by the customer. + """ - class CreateParamsMandateAcceptanceOnline(TypedDict): - date: NotRequired["int"] - """ - The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. - """ - ip: NotRequired["str"] - """ - The IP address from which the mandate was accepted or refused by the customer. - """ - user_agent: NotRequired["str"] - """ - The user agent of the browser from which the mandate was accepted or refused by the customer. - """ + class CreateParamsMandateAcceptanceOnline(TypedDict): + date: NotRequired["int"] + """ + The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + """ + ip: NotRequired["str"] + """ + The IP address from which the mandate was accepted or refused by the customer. + """ + user_agent: NotRequired["str"] + """ + The user agent of the browser from which the mandate was accepted or refused by the customer. + """ - class CreateParamsMandateAcceptanceOffline(TypedDict): - contact_email: str - """ - An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. - """ + class CreateParamsMandateAcceptanceOffline(TypedDict): + contact_email: str + """ + An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. + """ - class ListSourceTransactionsParams(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. - """ + class ListSourceTransactionsParams(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. + """ - class ModifyParams(RequestOptions): - amount: NotRequired["int"] - """ - Amount associated with the source. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - mandate: NotRequired["Source.ModifyParamsMandate"] - """ - Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - """ - metadata: NotRequired["Literal['']|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`. - """ - owner: NotRequired["Source.ModifyParamsOwner"] - """ - Information about the owner of the payment instrument that may be used or required by particular source types. - """ - source_order: NotRequired["Source.ModifyParamsSourceOrder"] - """ - Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - """ + class ModifyParams(RequestOptions): + amount: NotRequired["int"] + """ + Amount associated with the source. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + mandate: NotRequired["Source.ModifyParamsMandate"] + """ + Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + """ + metadata: NotRequired["Literal['']|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`. + """ + owner: NotRequired["Source.ModifyParamsOwner"] + """ + Information about the owner of the payment instrument that may be used or required by particular source types. + """ + source_order: NotRequired["Source.ModifyParamsSourceOrder"] + """ + Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + """ - class ModifyParamsSourceOrder(TypedDict): - items: NotRequired["List[Source.ModifyParamsSourceOrderItem]"] - """ - List of items constituting the order. - """ - shipping: NotRequired["Source.ModifyParamsSourceOrderShipping"] - """ - Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. - """ + class ModifyParamsSourceOrder(TypedDict): + items: NotRequired["List[Source.ModifyParamsSourceOrderItem]"] + """ + List of items constituting the order. + """ + shipping: NotRequired["Source.ModifyParamsSourceOrderShipping"] + """ + Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. + """ - class ModifyParamsSourceOrderShipping(TypedDict): - address: "Source.ModifyParamsSourceOrderShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired["str"] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: NotRequired["str"] - """ - Recipient name. - """ - phone: NotRequired["str"] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired["str"] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ + class ModifyParamsSourceOrderShipping(TypedDict): + address: "Source.ModifyParamsSourceOrderShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired["str"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: NotRequired["str"] + """ + Recipient name. + """ + phone: NotRequired["str"] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired["str"] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ - class ModifyParamsSourceOrderShippingAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: str - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class ModifyParamsSourceOrderShippingAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: str + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ModifyParamsSourceOrderItem(TypedDict): - amount: NotRequired["int"] - currency: NotRequired["str"] - description: NotRequired["str"] - parent: NotRequired["str"] - """ - The ID of the SKU being ordered. - """ - quantity: NotRequired["int"] - """ - The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. - """ - type: NotRequired["Literal['discount', 'shipping', 'sku', 'tax']"] + class ModifyParamsSourceOrderItem(TypedDict): + amount: NotRequired["int"] + currency: NotRequired["str"] + description: NotRequired["str"] + parent: NotRequired["str"] + """ + The ID of the SKU being ordered. + """ + quantity: NotRequired["int"] + """ + The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + """ + type: NotRequired["Literal['discount', 'shipping', 'sku', 'tax']"] - class ModifyParamsOwner(TypedDict): - address: NotRequired["Source.ModifyParamsOwnerAddress"] - """ - Owner's address. - """ - email: NotRequired["str"] - """ - Owner's email address. - """ - name: NotRequired["str"] - """ - Owner's full name. - """ - phone: NotRequired["str"] - """ - Owner's phone number. - """ + class ModifyParamsOwner(TypedDict): + address: NotRequired["Source.ModifyParamsOwnerAddress"] + """ + Owner's address. + """ + email: NotRequired["str"] + """ + Owner's email address. + """ + name: NotRequired["str"] + """ + Owner's full name. + """ + phone: NotRequired["str"] + """ + Owner's phone number. + """ - class ModifyParamsOwnerAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class ModifyParamsOwnerAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ModifyParamsMandate(TypedDict): - acceptance: NotRequired["Source.ModifyParamsMandateAcceptance"] - """ - The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. - """ - amount: NotRequired["Literal['']|int"] - """ - The amount specified by the mandate. (Leave null for a mandate covering all amounts) - """ - currency: NotRequired["str"] - """ - The currency specified by the mandate. (Must match `currency` of the source) - """ - interval: NotRequired[ - "Literal['one_time', 'scheduled', 'variable']" - ] - """ - The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) - """ - notification_method: NotRequired[ - "Literal['deprecated_none', 'email', 'manual', 'none', 'stripe_email']" - ] - """ - The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). - """ + class ModifyParamsMandate(TypedDict): + acceptance: NotRequired["Source.ModifyParamsMandateAcceptance"] + """ + The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. + """ + amount: NotRequired["Literal['']|int"] + """ + The amount specified by the mandate. (Leave null for a mandate covering all amounts) + """ + currency: NotRequired["str"] + """ + The currency specified by the mandate. (Must match `currency` of the source) + """ + interval: NotRequired["Literal['one_time', 'scheduled', 'variable']"] + """ + The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) + """ + notification_method: NotRequired[ + "Literal['deprecated_none', 'email', 'manual', 'none', 'stripe_email']" + ] + """ + The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). + """ - class ModifyParamsMandateAcceptance(TypedDict): - date: NotRequired["int"] - """ - The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. - """ - ip: NotRequired["str"] - """ - The IP address from which the mandate was accepted or refused by the customer. - """ - offline: NotRequired["Source.ModifyParamsMandateAcceptanceOffline"] - """ - The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` - """ - online: NotRequired["Source.ModifyParamsMandateAcceptanceOnline"] - """ - The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` - """ - status: Literal["accepted", "pending", "refused", "revoked"] - """ - The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). - """ - type: NotRequired["Literal['offline', 'online']"] - """ - The type of acceptance information included with the mandate. Either `online` or `offline` - """ - user_agent: NotRequired["str"] - """ - The user agent of the browser from which the mandate was accepted or refused by the customer. - """ + class ModifyParamsMandateAcceptance(TypedDict): + date: NotRequired["int"] + """ + The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + """ + ip: NotRequired["str"] + """ + The IP address from which the mandate was accepted or refused by the customer. + """ + offline: NotRequired["Source.ModifyParamsMandateAcceptanceOffline"] + """ + The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` + """ + online: NotRequired["Source.ModifyParamsMandateAcceptanceOnline"] + """ + The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` + """ + status: Literal["accepted", "pending", "refused", "revoked"] + """ + The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). + """ + type: NotRequired["Literal['offline', 'online']"] + """ + The type of acceptance information included with the mandate. Either `online` or `offline` + """ + user_agent: NotRequired["str"] + """ + The user agent of the browser from which the mandate was accepted or refused by the customer. + """ - class ModifyParamsMandateAcceptanceOnline(TypedDict): - date: NotRequired["int"] - """ - The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. - """ - ip: NotRequired["str"] - """ - The IP address from which the mandate was accepted or refused by the customer. - """ - user_agent: NotRequired["str"] - """ - The user agent of the browser from which the mandate was accepted or refused by the customer. - """ + class ModifyParamsMandateAcceptanceOnline(TypedDict): + date: NotRequired["int"] + """ + The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + """ + ip: NotRequired["str"] + """ + The IP address from which the mandate was accepted or refused by the customer. + """ + user_agent: NotRequired["str"] + """ + The user agent of the browser from which the mandate was accepted or refused by the customer. + """ - class ModifyParamsMandateAcceptanceOffline(TypedDict): - contact_email: str - """ - An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. - """ + class ModifyParamsMandateAcceptanceOffline(TypedDict): + contact_email: str + """ + An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. + """ - class RetrieveParams(RequestOptions): - client_secret: NotRequired["str"] - """ - The client secret of the source. Required if a publishable key is used to retrieve the source. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + client_secret: NotRequired["str"] + """ + The client secret of the source. Required if a publishable key is used to retrieve the source. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class VerifyParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - values: List[str] - """ - The values needed to verify the source. - """ + class VerifyParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + values: List[str] + """ + The values needed to verify the source. + """ ach_credit_transfer: Optional[AchCreditTransfer] ach_debit: Optional[AchDebit] @@ -1331,7 +1325,7 @@ def verify( # pyright: ignore[reportGeneralTypeIssues] ), ) - def detach(self, idempotency_key=None, **params): + def detach(self, idempotency_key=None, **params) -> "Source": token = self.id if hasattr(self, "customer") and self.customer: @@ -1343,7 +1337,7 @@ def detach(self, idempotency_key=None, **params): headers = util.populate_headers(idempotency_key) self.refresh_from(self.request("delete", url, params, headers)) - return self + return cast("Source", self) else: raise error.InvalidRequestError( diff --git a/stripe/api_resources/subscription.py b/stripe/api_resources/subscription.py index 1658e501f..1b11202f8 100644 --- a/stripe/api_resources/subscription.py +++ b/stripe/api_resources/subscription.py @@ -372,1277 +372,1255 @@ class EndBehavior(StripeObject): """ _inner_class_types = {"end_behavior": EndBehavior} - if TYPE_CHECKING: - - class CancelParams(RequestOptions): - cancellation_details: NotRequired[ - "Subscription.CancelParamsCancellationDetails" - ] - """ - Details about why this subscription was cancelled - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - invoice_now: NotRequired["bool"] - """ - Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. - """ - prorate: NotRequired["bool"] - """ - Will generate a proration invoice item that credits remaining unused time until the subscription period end. - """ - - class CancelParamsCancellationDetails(TypedDict): - comment: NotRequired["Literal['']|str"] - """ - Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. - """ - feedback: NotRequired[ - "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']" - ] - """ - The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. - """ - - class CreateParams(RequestOptions): - add_invoice_items: NotRequired[ - "List[Subscription.CreateParamsAddInvoiceItem]" - ] - """ - A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. - """ - application_fee_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired["Subscription.CreateParamsAutomaticTax"] - """ - Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. - """ - backdate_start_date: NotRequired["int"] - """ - For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. - """ - billing_cycle_anchor: NotRequired["int"] - """ - A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. - """ - billing_thresholds: NotRequired[ - "Literal['']|Subscription.CreateParamsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - cancel_at: NotRequired["int"] - """ - A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. - """ - cancel_at_period_end: NotRequired["bool"] - """ - Boolean indicating whether this subscription should cancel at the end of the current period. - """ - collection_method: NotRequired[ - "Literal['charge_automatically', 'send_invoice']" - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. - """ - coupon: NotRequired["str"] - """ - The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. - """ - currency: NotRequired["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). - """ - customer: str - """ - The identifier of the customer to subscribe. - """ - days_until_due: NotRequired["int"] - """ - Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. - """ - default_payment_method: NotRequired["str"] - """ - ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - """ - default_source: NotRequired["str"] - """ - ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. - """ - description: NotRequired["str"] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - items: NotRequired["List[Subscription.CreateParamsItem]"] - """ - A list of up to 20 subscription items, each with an attached price. - """ - metadata: NotRequired["Literal['']|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`. - """ - off_session: NotRequired["bool"] - """ - Indicates if a customer is on or off-session while an invoice payment is attempted. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge, for each of the subscription's invoices. - """ - payment_behavior: NotRequired[ - "Literal['allow_incomplete', 'default_incomplete', 'error_if_incomplete', 'pending_if_incomplete']" - ] - """ - Only applies to subscriptions with `collection_method=charge_automatically`. - - Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - - Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. - - Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + class CancelParams(RequestOptions): + cancellation_details: NotRequired[ + "Subscription.CancelParamsCancellationDetails" + ] + """ + Details about why this subscription was cancelled + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + invoice_now: NotRequired["bool"] + """ + Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. + """ + prorate: NotRequired["bool"] + """ + Will generate a proration invoice item that credits remaining unused time until the subscription period end. + """ - `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. + class CancelParamsCancellationDetails(TypedDict): + comment: NotRequired["Literal['']|str"] + """ + Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + """ + feedback: NotRequired[ + "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']" + ] + """ + The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + """ - Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first invoice status. - """ - payment_settings: NotRequired[ - "Subscription.CreateParamsPaymentSettings" - ] - """ - Payment settings to pass to invoices created by the subscription. - """ - pending_invoice_item_interval: NotRequired[ - "Literal['']|Subscription.CreateParamsPendingInvoiceItemInterval" - ] - """ - Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. - """ - promotion_code: NotRequired["str"] - """ - The API 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. - """ - proration_behavior: NotRequired[ - "Literal['always_invoice', 'create_prorations', 'none']" - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. - """ - transfer_data: NotRequired["Subscription.CreateParamsTransferData"] - """ - If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. - """ - trial_end: NotRequired["Literal['now']|int"] - """ - Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. - """ - trial_from_plan: NotRequired["bool"] - """ - Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. - """ - trial_period_days: NotRequired["int"] - """ - Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. - """ - trial_settings: NotRequired[ - "Subscription.CreateParamsTrialSettings" - ] - """ - Settings related to subscription trials. - """ + class CreateParams(RequestOptions): + add_invoice_items: NotRequired[ + "List[Subscription.CreateParamsAddInvoiceItem]" + ] + """ + A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. + """ + application_fee_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + automatic_tax: NotRequired["Subscription.CreateParamsAutomaticTax"] + """ + Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + """ + backdate_start_date: NotRequired["int"] + """ + For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + """ + billing_cycle_anchor: NotRequired["int"] + """ + A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. + """ + billing_thresholds: NotRequired[ + "Literal['']|Subscription.CreateParamsBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + cancel_at: NotRequired["int"] + """ + A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + """ + cancel_at_period_end: NotRequired["bool"] + """ + Boolean indicating whether this subscription should cancel at the end of the current period. + """ + collection_method: NotRequired[ + "Literal['charge_automatically', 'send_invoice']" + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + """ + coupon: NotRequired["str"] + """ + The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. + """ + currency: NotRequired["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). + """ + customer: str + """ + The identifier of the customer to subscribe. + """ + days_until_due: NotRequired["int"] + """ + Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. + """ + default_payment_method: NotRequired["str"] + """ + ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + """ + default_source: NotRequired["str"] + """ + ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. + """ + description: NotRequired["str"] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + items: NotRequired["List[Subscription.CreateParamsItem]"] + """ + A list of up to 20 subscription items, each with an attached price. + """ + metadata: NotRequired["Literal['']|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`. + """ + off_session: NotRequired["bool"] + """ + Indicates if a customer is on or off-session while an invoice payment is attempted. + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account on behalf of which to charge, for each of the subscription's invoices. + """ + payment_behavior: NotRequired[ + "Literal['allow_incomplete', 'default_incomplete', 'error_if_incomplete', 'pending_if_incomplete']" + ] + """ + Only applies to subscriptions with `collection_method=charge_automatically`. - class CreateParamsTrialSettings(TypedDict): - end_behavior: "Subscription.CreateParamsTrialSettingsEndBehavior" - """ - Defines how the subscription should behave when the user's free trial ends. - """ + Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - class CreateParamsTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Literal[ - "cancel", "create_invoice", "pause" - ] - """ - Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - """ + Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. - class CreateParamsTransferData(TypedDict): - amount_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ + Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - class CreateParamsPendingInvoiceItemInterval(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ + `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. - class CreateParamsPaymentSettings(TypedDict): - payment_method_options: NotRequired[ - "Subscription.CreateParamsPaymentSettingsPaymentMethodOptions" - ] - """ - 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', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'paynow', 'paypal', 'promptpay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', '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). - """ - save_default_payment_method: NotRequired[ - "Literal['off', 'on_subscription']" - ] - """ - Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" - ] - """ - This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. - """ - bancontact: NotRequired[ - "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsBancontact" - ] - """ - This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. - """ - card: NotRequired[ - "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCard" - ] - """ - This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. - """ - customer_balance: NotRequired[ - "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" - ] - """ - This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - konbini: NotRequired[ - "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsKonbini" - ] - """ - This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. - """ - us_bank_account: NotRequired[ - "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" - ] - """ - This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( - TypedDict, - ): - financial_connections: NotRequired[ - "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first invoice status. + """ + payment_settings: NotRequired[ + "Subscription.CreateParamsPaymentSettings" + ] + """ + Payment settings to pass to invoices created by the subscription. + """ + pending_invoice_item_interval: NotRequired[ + "Literal['']|Subscription.CreateParamsPendingInvoiceItemInterval" + ] + """ + Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + """ + promotion_code: NotRequired["str"] + """ + The API 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. + """ + proration_behavior: NotRequired[ + "Literal['always_invoice', 'create_prorations', 'none']" + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + """ + transfer_data: NotRequired["Subscription.CreateParamsTransferData"] + """ + If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + """ + trial_end: NotRequired["Literal['now']|int"] + """ + Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + """ + trial_from_plan: NotRequired["bool"] + """ + Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + """ + trial_period_days: NotRequired["int"] + """ + Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + """ + trial_settings: NotRequired["Subscription.CreateParamsTrialSettings"] + """ + Settings related to subscription trials. + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - permissions: NotRequired[ - "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired["List[Literal['balances']]"] - """ - List of data features that you would like to retrieve upon account creation. - """ + class CreateParamsTrialSettings(TypedDict): + end_behavior: "Subscription.CreateParamsTrialSettingsEndBehavior" + """ + Defines how the subscription should behave when the user's free trial ends. + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsKonbini( - TypedDict - ): - pass + class CreateParamsTrialSettingsEndBehavior(TypedDict): + missing_payment_method: Literal["cancel", "create_invoice", "pause"] + """ + Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( - TypedDict, - ): - bank_transfer: NotRequired[ - "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired["str"] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ + class CreateParamsTransferData(TypedDict): + amount_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - type: NotRequired["str"] - """ - The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ + class CreateParamsPendingInvoiceItemInterval(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ + class CreateParamsPaymentSettings(TypedDict): + payment_method_options: NotRequired[ + "Subscription.CreateParamsPaymentSettingsPaymentMethodOptions" + ] + """ + 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', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'paynow', 'paypal', 'promptpay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', '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). + """ + save_default_payment_method: NotRequired[ + "Literal['off', 'on_subscription']" + ] + """ + Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - network: NotRequired[ - "Literal['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'mastercard', 'unionpay', 'unknown', 'visa']" - ] - """ - Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. - """ - request_three_d_secure: NotRequired["Literal['any', 'automatic']"] - """ - 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. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ + class CreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" + ] + """ + This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. + """ + bancontact: NotRequired[ + "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsBancontact" + ] + """ + This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. + """ + card: NotRequired[ + "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCard" + ] + """ + This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. + """ + customer_balance: NotRequired[ + "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" + ] + """ + This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. + """ + konbini: NotRequired[ + "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsKonbini" + ] + """ + This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. + """ + us_bank_account: NotRequired[ + "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" + ] + """ + This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions( - TypedDict, - ): - amount: NotRequired["int"] - """ - Amount to be charged for future payments. - """ - amount_type: NotRequired["Literal['fixed', 'maximum']"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired["str"] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( + TypedDict, + ): + financial_connections: NotRequired[ + "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsBancontact( - TypedDict, - ): - preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']"] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, + ): + permissions: NotRequired[ + "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired["List[Literal['balances']]"] + """ + List of data features that you would like to retrieve upon account creation. + """ - class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( - TypedDict, - ): - mandate_options: NotRequired[ - "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict): + pass - class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - transaction_type: NotRequired["Literal['business', 'personal']"] - """ - Transaction type of the mandate. - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( + TypedDict, + ): + bank_transfer: NotRequired[ + "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired["str"] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ - class CreateParamsItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|Subscription.CreateParamsItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. - """ - 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`. - """ - plan: NotRequired["str"] - """ - Plan ID for this item, as a string. - """ - price: NotRequired["str"] - """ - The ID of the price object. - """ - price_data: NotRequired["Subscription.CreateParamsItemPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired["int"] - """ - Quantity for this item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, + ): + eu_bank_transfer: NotRequired[ + "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for eu_bank_transfer funding type. + """ + type: NotRequired["str"] + """ + The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ - class CreateParamsItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - recurring: "Subscription.CreateParamsItemPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, + ): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ - class CreateParamsItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): + mandate_options: NotRequired[ + "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + network: NotRequired[ + "Literal['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'mastercard', 'unionpay', 'unknown', 'visa']" + ] + """ + Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + """ + request_three_d_secure: NotRequired["Literal['any', 'automatic']"] + """ + 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. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ - class CreateParamsItemBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions( + TypedDict, + ): + amount: NotRequired["int"] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired["Literal['fixed', 'maximum']"] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired["str"] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ - class CreateParamsBillingThresholds(TypedDict): - amount_gte: NotRequired["int"] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired["bool"] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsBancontact(TypedDict): + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']"] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class CreateParamsAddInvoiceItem(TypedDict): - price: NotRequired["str"] - """ - The ID of the price object. - """ - price_data: NotRequired[ - "Subscription.CreateParamsAddInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired["int"] - """ - Quantity for this item. Defaults to 1. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. - """ + class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, + ): + transaction_type: NotRequired["Literal['business', 'personal']"] + """ + Transaction type of the mandate. + """ - class CreateParamsAddInvoiceItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class CreateParamsItem(TypedDict): + billing_thresholds: NotRequired[ + "Literal['']|Subscription.CreateParamsItemBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + """ + 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`. + """ + plan: NotRequired["str"] + """ + Plan ID for this item, as a string. + """ + price: NotRequired["str"] + """ + The ID of the price object. + """ + price_data: NotRequired["Subscription.CreateParamsItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired["int"] + """ + Quantity for this item. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ - class DeleteDiscountParams(RequestOptions): - pass + class CreateParamsItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + recurring: "Subscription.CreateParamsItemPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class ListParams(RequestOptions): - automatic_tax: NotRequired["Subscription.ListParamsAutomaticTax"] - """ - Filter subscriptions by their automatic tax settings. - """ - collection_method: NotRequired[ - "Literal['charge_automatically', 'send_invoice']" - ] - """ - The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. - """ - created: NotRequired["Subscription.ListParamsCreated|int"] - current_period_end: NotRequired[ - "Subscription.ListParamsCurrentPeriodEnd|int" - ] - current_period_start: NotRequired[ - "Subscription.ListParamsCurrentPeriodStart|int" - ] - customer: NotRequired["str"] - """ - The ID of the customer whose subscriptions will be retrieved. - """ - 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. - """ - plan: NotRequired["str"] - """ - The ID of the plan whose subscriptions will be retrieved. - """ - price: NotRequired["str"] - """ - Filter for subscriptions that contain this recurring price ID. - """ - 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', 'all', 'canceled', 'ended', 'incomplete', 'incomplete_expired', 'past_due', 'paused', 'trialing', 'unpaid']" - ] - """ - The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. - """ - test_clock: NotRequired["str"] - """ - Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. - """ + class CreateParamsItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ - class ListParamsCurrentPeriodStart(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class CreateParamsItemBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ - class ListParamsCurrentPeriodEnd(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class CreateParamsBillingThresholds(TypedDict): + amount_gte: NotRequired["int"] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ + reset_billing_cycle_anchor: NotRequired["bool"] + """ + Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class CreateParamsAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ - class ListParamsAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ + class CreateParamsAddInvoiceItem(TypedDict): + price: NotRequired["str"] + """ + The ID of the price object. + """ + price_data: NotRequired[ + "Subscription.CreateParamsAddInvoiceItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired["int"] + """ + Quantity for this item. Defaults to 1. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + """ - class ModifyParams(RequestOptions): - add_invoice_items: NotRequired[ - "List[Subscription.ModifyParamsAddInvoiceItem]" - ] - """ - A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. - """ - application_fee_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired["Subscription.ModifyParamsAutomaticTax"] - """ - Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. - """ - 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). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_thresholds: NotRequired[ - "Literal['']|Subscription.ModifyParamsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - cancel_at: NotRequired["Literal['']|int"] - """ - A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. - """ - cancel_at_period_end: NotRequired["bool"] - """ - Boolean indicating whether this subscription should cancel at the end of the current period. - """ - cancellation_details: NotRequired[ - "Subscription.ModifyParamsCancellationDetails" - ] - """ - Details about why this subscription was cancelled - """ - collection_method: NotRequired[ - "Literal['charge_automatically', 'send_invoice']" - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. - """ - coupon: NotRequired["str"] - """ - The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. - """ - days_until_due: NotRequired["int"] - """ - Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. - """ - default_payment_method: NotRequired["str"] - """ - ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - """ - default_source: NotRequired["Literal['']|str"] - """ - ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. - """ - description: NotRequired["Literal['']|str"] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - items: NotRequired["List[Subscription.ModifyParamsItem]"] - """ - A list of up to 20 subscription items, each with an attached price. - """ - metadata: NotRequired["Literal['']|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`. - """ - off_session: NotRequired["bool"] - """ - Indicates if a customer is on or off-session while an invoice payment is attempted. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge, for each of the subscription's invoices. - """ - pause_collection: NotRequired[ - "Literal['']|Subscription.ModifyParamsPauseCollection" - ] - """ - If specified, payment collection for this subscription will be paused. - """ - payment_behavior: NotRequired[ - "Literal['allow_incomplete', 'default_incomplete', 'error_if_incomplete', 'pending_if_incomplete']" - ] - """ - Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + class CreateParamsAddInvoiceItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + class DeleteDiscountParams(RequestOptions): + pass + + class ListParams(RequestOptions): + automatic_tax: NotRequired["Subscription.ListParamsAutomaticTax"] + """ + Filter subscriptions by their automatic tax settings. + """ + collection_method: NotRequired[ + "Literal['charge_automatically', 'send_invoice']" + ] + """ + The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. + """ + created: NotRequired["Subscription.ListParamsCreated|int"] + current_period_end: NotRequired[ + "Subscription.ListParamsCurrentPeriodEnd|int" + ] + current_period_start: NotRequired[ + "Subscription.ListParamsCurrentPeriodStart|int" + ] + customer: NotRequired["str"] + """ + The ID of the customer whose subscriptions will be retrieved. + """ + 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. + """ + plan: NotRequired["str"] + """ + The ID of the plan whose subscriptions will be retrieved. + """ + price: NotRequired["str"] + """ + Filter for subscriptions that contain this recurring price ID. + """ + 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', 'all', 'canceled', 'ended', 'incomplete', 'incomplete_expired', 'past_due', 'paused', 'trialing', 'unpaid']" + ] + """ + The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. + """ + test_clock: NotRequired["str"] + """ + Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. + """ - Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + class ListParamsCurrentPeriodStart(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + class ListParamsCurrentPeriodEnd(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - """ - payment_settings: NotRequired[ - "Subscription.ModifyParamsPaymentSettings" - ] - """ - Payment settings to pass to invoices created by the subscription. - """ - pending_invoice_item_interval: NotRequired[ - "Literal['']|Subscription.ModifyParamsPendingInvoiceItemInterval" - ] - """ - Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. - """ - 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. - """ - proration_behavior: NotRequired[ - "Literal['always_invoice', 'create_prorations', 'none']" - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - proration_date: NotRequired["int"] - """ - If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#upcoming_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. - """ - transfer_data: NotRequired[ - "Literal['']|Subscription.ModifyParamsTransferData" - ] - """ - If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. - """ - trial_end: NotRequired["Literal['now']|int"] - """ - Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. - """ - trial_from_plan: NotRequired["bool"] - """ - Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. - """ - trial_settings: NotRequired[ - "Subscription.ModifyParamsTrialSettings" - ] - """ - Settings related to subscription trials. - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParamsTrialSettings(TypedDict): - end_behavior: "Subscription.ModifyParamsTrialSettingsEndBehavior" - """ - Defines how the subscription should behave when the user's free trial ends. - """ + class ListParamsAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ - class ModifyParamsTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Literal[ - "cancel", "create_invoice", "pause" - ] - """ - Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - """ + class ModifyParams(RequestOptions): + add_invoice_items: NotRequired[ + "List[Subscription.ModifyParamsAddInvoiceItem]" + ] + """ + A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. + """ + application_fee_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + automatic_tax: NotRequired["Subscription.ModifyParamsAutomaticTax"] + """ + Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + """ + 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). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + """ + billing_thresholds: NotRequired[ + "Literal['']|Subscription.ModifyParamsBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + cancel_at: NotRequired["Literal['']|int"] + """ + A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + """ + cancel_at_period_end: NotRequired["bool"] + """ + Boolean indicating whether this subscription should cancel at the end of the current period. + """ + cancellation_details: NotRequired[ + "Subscription.ModifyParamsCancellationDetails" + ] + """ + Details about why this subscription was cancelled + """ + collection_method: NotRequired[ + "Literal['charge_automatically', 'send_invoice']" + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + """ + coupon: NotRequired["str"] + """ + The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. + """ + days_until_due: NotRequired["int"] + """ + Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. + """ + default_payment_method: NotRequired["str"] + """ + ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + """ + default_source: NotRequired["Literal['']|str"] + """ + ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. + """ + description: NotRequired["Literal['']|str"] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + items: NotRequired["List[Subscription.ModifyParamsItem]"] + """ + A list of up to 20 subscription items, each with an attached price. + """ + metadata: NotRequired["Literal['']|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`. + """ + off_session: NotRequired["bool"] + """ + Indicates if a customer is on or off-session while an invoice payment is attempted. + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account on behalf of which to charge, for each of the subscription's invoices. + """ + pause_collection: NotRequired[ + "Literal['']|Subscription.ModifyParamsPauseCollection" + ] + """ + If specified, payment collection for this subscription will be paused. + """ + payment_behavior: NotRequired[ + "Literal['allow_incomplete', 'default_incomplete', 'error_if_incomplete', 'pending_if_incomplete']" + ] + """ + Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - class ModifyParamsTransferData(TypedDict): - amount_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ + Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - class ModifyParamsPendingInvoiceItemInterval(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ + Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - class ModifyParamsPaymentSettings(TypedDict): - payment_method_options: NotRequired[ - "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptions" - ] - """ - 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', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'paynow', 'paypal', 'promptpay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', '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). - """ - save_default_payment_method: NotRequired[ - "Literal['off', 'on_subscription']" - ] - """ - Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. - """ + Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + """ + payment_settings: NotRequired[ + "Subscription.ModifyParamsPaymentSettings" + ] + """ + Payment settings to pass to invoices created by the subscription. + """ + pending_invoice_item_interval: NotRequired[ + "Literal['']|Subscription.ModifyParamsPendingInvoiceItemInterval" + ] + """ + Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + """ + 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. + """ + proration_behavior: NotRequired[ + "Literal['always_invoice', 'create_prorations', 'none']" + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + """ + proration_date: NotRequired["int"] + """ + If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#upcoming_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. + """ + transfer_data: NotRequired[ + "Literal['']|Subscription.ModifyParamsTransferData" + ] + """ + If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. + """ + trial_end: NotRequired["Literal['now']|int"] + """ + Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. + """ + trial_from_plan: NotRequired["bool"] + """ + Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + """ + trial_settings: NotRequired["Subscription.ModifyParamsTrialSettings"] + """ + Settings related to subscription trials. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit" - ] - """ - This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. - """ - bancontact: NotRequired[ - "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact" - ] - """ - This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. - """ - card: NotRequired[ - "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCard" - ] - """ - This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. - """ - customer_balance: NotRequired[ - "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" - ] - """ - This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - konbini: NotRequired[ - "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsKonbini" - ] - """ - This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. - """ - us_bank_account: NotRequired[ - "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" - ] - """ - This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. - """ + class ModifyParamsTrialSettings(TypedDict): + end_behavior: "Subscription.ModifyParamsTrialSettingsEndBehavior" + """ + Defines how the subscription should behave when the user's free trial ends. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( - TypedDict, - ): - financial_connections: NotRequired[ - "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + class ModifyParamsTrialSettingsEndBehavior(TypedDict): + missing_payment_method: Literal["cancel", "create_invoice", "pause"] + """ + Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - permissions: NotRequired[ - "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired["List[Literal['balances']]"] - """ - List of data features that you would like to retrieve upon account creation. - """ + class ModifyParamsTransferData(TypedDict): + amount_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsKonbini( - TypedDict - ): - pass + class ModifyParamsPendingInvoiceItemInterval(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( - TypedDict, - ): - bank_transfer: NotRequired[ - "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired["str"] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ + class ModifyParamsPaymentSettings(TypedDict): + payment_method_options: NotRequired[ + "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptions" + ] + """ + 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', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'paynow', 'paypal', 'promptpay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', '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). + """ + save_default_payment_method: NotRequired[ + "Literal['off', 'on_subscription']" + ] + """ + Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - type: NotRequired["str"] - """ - The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ + class ModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit" + ] + """ + This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. + """ + bancontact: NotRequired[ + "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact" + ] + """ + This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. + """ + card: NotRequired[ + "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCard" + ] + """ + This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. + """ + customer_balance: NotRequired[ + "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" + ] + """ + This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. + """ + konbini: NotRequired[ + "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsKonbini" + ] + """ + This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. + """ + us_bank_account: NotRequired[ + "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" + ] + """ + This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. + """ + + class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( + TypedDict, + ): + financial_connections: NotRequired[ + "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ + + class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, + ): + permissions: NotRequired[ + "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]" + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired["List[Literal['balances']]"] + """ + List of data features that you would like to retrieve upon account creation. + """ + + class ModifyParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict): + pass + + class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( + TypedDict, + ): + bank_transfer: NotRequired[ + "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired["str"] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, + ): + eu_bank_transfer: NotRequired[ + "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for eu_bank_transfer funding type. + """ + type: NotRequired["str"] + """ + The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - network: NotRequired[ - "Literal['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'mastercard', 'unionpay', 'unknown', 'visa']" - ] - """ - Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. - """ - request_three_d_secure: NotRequired["Literal['any', 'automatic']"] - """ - 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. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, + ): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions( - TypedDict, - ): - amount: NotRequired["int"] - """ - Amount to be charged for future payments. - """ - amount_type: NotRequired["Literal['fixed', 'maximum']"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired["str"] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): + mandate_options: NotRequired[ + "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + network: NotRequired[ + "Literal['amex', 'cartes_bancaires', 'diners', 'discover', 'eftpos_au', 'interac', 'jcb', 'mastercard', 'unionpay', 'unknown', 'visa']" + ] + """ + Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + """ + request_three_d_secure: NotRequired["Literal['any', 'automatic']"] + """ + 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. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( - TypedDict, - ): - preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']"] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions( + TypedDict, + ): + amount: NotRequired["int"] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired["Literal['fixed', 'maximum']"] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired["str"] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit( - TypedDict, - ): - mandate_options: NotRequired[ - "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - "Literal['automatic', 'instant', 'microdeposits']" - ] - """ - Verification method for the intent - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact(TypedDict): + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']"] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ - class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - transaction_type: NotRequired["Literal['business', 'personal']"] - """ - Transaction type of the mandate. - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']" + ] + """ + Verification method for the intent + """ - class ModifyParamsPauseCollection(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - resumes_at: NotRequired["int"] - """ - The time after which the subscription will resume collecting payments. - """ + class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, + ): + transaction_type: NotRequired["Literal['business', 'personal']"] + """ + Transaction type of the mandate. + """ - class ModifyParamsItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|Subscription.ModifyParamsItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. - """ - clear_usage: NotRequired["bool"] - """ - Delete all usage for a given subscription item. Allowed only when `deleted` is set to `true` and the current plan's `usage_type` is `metered`. - """ - deleted: NotRequired["bool"] - """ - A flag that, if set to `true`, will delete the specified item. - """ - id: NotRequired["str"] - """ - Subscription item to update. - """ - metadata: NotRequired["Literal['']|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`. - """ - plan: NotRequired["str"] - """ - Plan ID for this item, as a string. - """ - price: NotRequired["str"] - """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. - """ - price_data: NotRequired["Subscription.ModifyParamsItemPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired["int"] - """ - Quantity for this item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ + class ModifyParamsPauseCollection(TypedDict): + behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + """ + The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + """ + resumes_at: NotRequired["int"] + """ + The time after which the subscription will resume collecting payments. + """ - class ModifyParamsItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - recurring: "Subscription.ModifyParamsItemPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class ModifyParamsItem(TypedDict): + billing_thresholds: NotRequired[ + "Literal['']|Subscription.ModifyParamsItemBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + """ + clear_usage: NotRequired["bool"] + """ + Delete all usage for a given subscription item. Allowed only when `deleted` is set to `true` and the current plan's `usage_type` is `metered`. + """ + deleted: NotRequired["bool"] + """ + A flag that, if set to `true`, will delete the specified item. + """ + id: NotRequired["str"] + """ + Subscription item to update. + """ + metadata: NotRequired["Literal['']|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`. + """ + plan: NotRequired["str"] + """ + Plan ID for this item, as a string. + """ + price: NotRequired["str"] + """ + The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + """ + price_data: NotRequired["Subscription.ModifyParamsItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired["int"] + """ + Quantity for this item. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ - class ModifyParamsItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ + class ModifyParamsItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + recurring: "Subscription.ModifyParamsItemPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class ModifyParamsItemBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ + class ModifyParamsItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ - class ModifyParamsCancellationDetails(TypedDict): - comment: NotRequired["Literal['']|str"] - """ - Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. - """ - feedback: NotRequired[ - "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']" - ] - """ - The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. - """ + class ModifyParamsItemBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ - class ModifyParamsBillingThresholds(TypedDict): - amount_gte: NotRequired["int"] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired["bool"] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ + class ModifyParamsCancellationDetails(TypedDict): + comment: NotRequired["Literal['']|str"] + """ + Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + """ + feedback: NotRequired[ + "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']" + ] + """ + The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + """ - class ModifyParamsAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ + class ModifyParamsBillingThresholds(TypedDict): + amount_gte: NotRequired["int"] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ + reset_billing_cycle_anchor: NotRequired["bool"] + """ + Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + """ - class ModifyParamsAddInvoiceItem(TypedDict): - price: NotRequired["str"] - """ - The ID of the price object. - """ - price_data: NotRequired[ - "Subscription.ModifyParamsAddInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired["int"] - """ - Quantity for this item. Defaults to 1. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. - """ + class ModifyParamsAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ - class ModifyParamsAddInvoiceItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class ModifyParamsAddInvoiceItem(TypedDict): + price: NotRequired["str"] + """ + The ID of the price object. + """ + price_data: NotRequired[ + "Subscription.ModifyParamsAddInvoiceItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired["int"] + """ + Quantity for this item. Defaults to 1. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + """ - 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). - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - proration_behavior: NotRequired[ - "Literal['always_invoice', 'create_prorations', 'none']" - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - proration_date: NotRequired["int"] - """ - If set, the proration will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - """ + class ModifyParamsAddInvoiceItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + 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). + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + proration_behavior: NotRequired[ + "Literal['always_invoice', 'create_prorations', 'none']" + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + """ + proration_date: NotRequired["int"] + """ + If set, the proration will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + """ - class SearchParams(RequestOptions): - 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. - """ - page: NotRequired["str"] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + + class SearchParams(RequestOptions): + 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. + """ + page: NotRequired["str"] + """ + A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + """ + query: str + """ + The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). + """ application: Optional[ExpandableField["Application"]] """ diff --git a/stripe/api_resources/subscription_item.py b/stripe/api_resources/subscription_item.py index 0d2cb356c..ced9b9eac 100644 --- a/stripe/api_resources/subscription_item.py +++ b/stripe/api_resources/subscription_item.py @@ -51,299 +51,297 @@ class BillingThresholds(StripeObject): Usage threshold that triggers the subscription to create an invoice """ - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionItem.CreateParamsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. - """ - expand: NotRequired["List[str]"] - """ - 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_behavior: NotRequired[ - "Literal['allow_incomplete', 'default_incomplete', 'error_if_incomplete', 'pending_if_incomplete']" - ] - """ - Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - - Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - - Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - - Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - """ - plan: NotRequired["str"] - """ - The identifier of the plan to add to the subscription. - """ - price: NotRequired["str"] - """ - The ID of the price object. - """ - price_data: NotRequired["SubscriptionItem.CreateParamsPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - proration_behavior: NotRequired[ - "Literal['always_invoice', 'create_prorations', 'none']" - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - proration_date: NotRequired["int"] - """ - If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - """ - quantity: NotRequired["int"] - """ - The quantity you'd like to apply to the subscription item you're creating. - """ - subscription: str - """ - The identifier of the subscription to modify. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - - class CreateParamsPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - recurring: "SubscriptionItem.CreateParamsPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ - - class CreateParamsBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class DeleteParams(RequestOptions): - clear_usage: NotRequired["bool"] - """ - Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. - """ - proration_behavior: NotRequired[ - "Literal['always_invoice', 'create_prorations', 'none']" - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - proration_date: NotRequired["int"] - """ - If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - """ - - 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. - """ - subscription: str - """ - The ID of the subscription whose items will be retrieved. - """ - - class ModifyParams(RequestOptions): - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionItem.ModifyParamsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - off_session: NotRequired["bool"] - """ - Indicates if a customer is on or off-session while an invoice payment is attempted. - """ - payment_behavior: NotRequired[ - "Literal['allow_incomplete', 'default_incomplete', 'error_if_incomplete', 'pending_if_incomplete']" - ] - """ - Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - - Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - - Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - - Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - """ - plan: NotRequired["str"] - """ - The identifier of the new plan for this subscription item. - """ - price: NotRequired["str"] - """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. - """ - price_data: NotRequired["SubscriptionItem.ModifyParamsPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - proration_behavior: NotRequired[ - "Literal['always_invoice', 'create_prorations', 'none']" - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - proration_date: NotRequired["int"] - """ - If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - """ - quantity: NotRequired["int"] - """ - The quantity you'd like to apply to the subscription item you're creating. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - - class ModifyParamsPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - recurring: "SubscriptionItem.ModifyParamsPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class ModifyParamsPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ - - class ModifyParamsBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateUsageRecordParams(RequestOptions): - action: NotRequired["Literal['increment', 'set']"] - """ - Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - quantity: int - """ - The usage quantity for the specified timestamp. - """ - timestamp: NotRequired["Literal['now']|int"] - """ - The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. - """ - - class ListUsageRecordSummariesParams(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. - """ + class CreateParams(RequestOptions): + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionItem.CreateParamsBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + """ + expand: NotRequired["List[str]"] + """ + 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_behavior: NotRequired[ + "Literal['allow_incomplete', 'default_incomplete', 'error_if_incomplete', 'pending_if_incomplete']" + ] + """ + Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + + Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + + Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + + Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + """ + plan: NotRequired["str"] + """ + The identifier of the plan to add to the subscription. + """ + price: NotRequired["str"] + """ + The ID of the price object. + """ + price_data: NotRequired["SubscriptionItem.CreateParamsPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + proration_behavior: NotRequired[ + "Literal['always_invoice', 'create_prorations', 'none']" + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + """ + proration_date: NotRequired["int"] + """ + If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + """ + quantity: NotRequired["int"] + """ + The quantity you'd like to apply to the subscription item you're creating. + """ + subscription: str + """ + The identifier of the subscription to modify. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ + + class CreateParamsPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + recurring: "SubscriptionItem.CreateParamsPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + class CreateParamsPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ + + class CreateParamsBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ + + class DeleteParams(RequestOptions): + clear_usage: NotRequired["bool"] + """ + Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. + """ + proration_behavior: NotRequired[ + "Literal['always_invoice', 'create_prorations', 'none']" + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + """ + proration_date: NotRequired["int"] + """ + If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + """ + + 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. + """ + subscription: str + """ + The ID of the subscription whose items will be retrieved. + """ + + class ModifyParams(RequestOptions): + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionItem.ModifyParamsBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + off_session: NotRequired["bool"] + """ + Indicates if a customer is on or off-session while an invoice payment is attempted. + """ + payment_behavior: NotRequired[ + "Literal['allow_incomplete', 'default_incomplete', 'error_if_incomplete', 'pending_if_incomplete']" + ] + """ + Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + + Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + + Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + + Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + """ + plan: NotRequired["str"] + """ + The identifier of the new plan for this subscription item. + """ + price: NotRequired["str"] + """ + The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + """ + price_data: NotRequired["SubscriptionItem.ModifyParamsPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + proration_behavior: NotRequired[ + "Literal['always_invoice', 'create_prorations', 'none']" + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + """ + proration_date: NotRequired["int"] + """ + If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + """ + quantity: NotRequired["int"] + """ + The quantity you'd like to apply to the subscription item you're creating. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ + + class ModifyParamsPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + recurring: "SubscriptionItem.ModifyParamsPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + class ModifyParamsPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ + + class ModifyParamsBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ + + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + + class CreateUsageRecordParams(RequestOptions): + action: NotRequired["Literal['increment', 'set']"] + """ + Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + quantity: int + """ + The usage quantity for the specified timestamp. + """ + timestamp: NotRequired["Literal['now']|int"] + """ + The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. + """ + + class ListUsageRecordSummariesParams(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. + """ billing_thresholds: Optional[BillingThresholds] """ diff --git a/stripe/api_resources/subscription_schedule.py b/stripe/api_resources/subscription_schedule.py index e9bab3550..86e23981c 100644 --- a/stripe/api_resources/subscription_schedule.py +++ b/stripe/api_resources/subscription_schedule.py @@ -308,915 +308,913 @@ class TransferData(StripeObject): "transfer_data": TransferData, } - if TYPE_CHECKING: - - class CancelParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - invoice_now: NotRequired["bool"] - """ - If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. - """ - prorate: NotRequired["bool"] - """ - If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. - """ + class CancelParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + invoice_now: NotRequired["bool"] + """ + If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. + """ + prorate: NotRequired["bool"] + """ + If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. + """ - class CreateParams(RequestOptions): - customer: NotRequired["str"] - """ - The identifier of the customer to create the subscription schedule for. - """ - default_settings: NotRequired[ - "SubscriptionSchedule.CreateParamsDefaultSettings" - ] - """ - Object representing the subscription schedule's default settings. - """ - end_behavior: NotRequired[ - "Literal['cancel', 'none', 'release', 'renew']" - ] - """ - Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - from_subscription: NotRequired["str"] - """ - Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. - """ - metadata: NotRequired["Literal['']|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`. - """ - phases: NotRequired["List[SubscriptionSchedule.CreateParamsPhase]"] - """ - List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. - """ - start_date: NotRequired["int|Literal['now']"] - """ - When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. - """ + class CreateParams(RequestOptions): + customer: NotRequired["str"] + """ + The identifier of the customer to create the subscription schedule for. + """ + default_settings: NotRequired[ + "SubscriptionSchedule.CreateParamsDefaultSettings" + ] + """ + Object representing the subscription schedule's default settings. + """ + end_behavior: NotRequired[ + "Literal['cancel', 'none', 'release', 'renew']" + ] + """ + Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + from_subscription: NotRequired["str"] + """ + Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. + """ + metadata: NotRequired["Literal['']|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`. + """ + phases: NotRequired["List[SubscriptionSchedule.CreateParamsPhase]"] + """ + List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + """ + start_date: NotRequired["int|Literal['now']"] + """ + When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. + """ - class CreateParamsPhase(TypedDict): - add_invoice_items: NotRequired[ - "List[SubscriptionSchedule.CreateParamsPhaseAddInvoiceItem]" - ] - """ - A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. - """ - application_fee_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseAutomaticTax" - ] - """ - Automatic tax settings for this phase. - """ - billing_cycle_anchor: NotRequired[ - "Literal['automatic', 'phase_start']" - ] - """ - Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionSchedule.CreateParamsPhaseBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - collection_method: NotRequired[ - "Literal['charge_automatically', 'send_invoice']" - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. - """ - coupon: NotRequired["str"] - """ - The identifier of the coupon to apply to this phase of the subscription schedule. - """ - currency: NotRequired["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). - """ - default_payment_method: NotRequired["str"] - """ - ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. - """ - description: NotRequired["Literal['']|str"] - """ - Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - end_date: NotRequired["int"] - """ - The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. - """ - invoice_settings: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - items: List["SubscriptionSchedule.CreateParamsPhaseItem"] - """ - List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. - """ - iterations: NotRequired["int"] - """ - Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. - """ - metadata: NotRequired["Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. - """ - on_behalf_of: NotRequired["str"] - """ - The account on behalf of which to charge, for each of the associated subscription's invoices. - """ - proration_behavior: NotRequired[ - "Literal['always_invoice', 'create_prorations', 'none']" - ] - """ - Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. - """ - transfer_data: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the associated subscription's invoices. - """ - trial: NotRequired["bool"] - """ - If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. - """ - trial_end: NotRequired["int"] - """ - Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` - """ + class CreateParamsPhase(TypedDict): + add_invoice_items: NotRequired[ + "List[SubscriptionSchedule.CreateParamsPhaseAddInvoiceItem]" + ] + """ + A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + """ + application_fee_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + automatic_tax: NotRequired[ + "SubscriptionSchedule.CreateParamsPhaseAutomaticTax" + ] + """ + Automatic tax settings for this phase. + """ + billing_cycle_anchor: NotRequired[ + "Literal['automatic', 'phase_start']" + ] + """ + Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + """ + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionSchedule.CreateParamsPhaseBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + collection_method: NotRequired[ + "Literal['charge_automatically', 'send_invoice']" + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + """ + coupon: NotRequired["str"] + """ + The identifier of the coupon to apply to this phase of the subscription schedule. + """ + currency: NotRequired["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). + """ + default_payment_method: NotRequired["str"] + """ + ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + """ + description: NotRequired["Literal['']|str"] + """ + Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + end_date: NotRequired["int"] + """ + The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + """ + invoice_settings: NotRequired[ + "SubscriptionSchedule.CreateParamsPhaseInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + items: List["SubscriptionSchedule.CreateParamsPhaseItem"] + """ + List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + """ + iterations: NotRequired["int"] + """ + Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + """ + metadata: NotRequired["Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + """ + on_behalf_of: NotRequired["str"] + """ + The account on behalf of which to charge, for each of the associated subscription's invoices. + """ + proration_behavior: NotRequired[ + "Literal['always_invoice', 'create_prorations', 'none']" + ] + """ + Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + """ + transfer_data: NotRequired[ + "SubscriptionSchedule.CreateParamsPhaseTransferData" + ] + """ + The data with which to automatically create a Transfer for each of the associated subscription's invoices. + """ + trial: NotRequired["bool"] + """ + If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + """ + trial_end: NotRequired["int"] + """ + Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + """ - class CreateParamsPhaseTransferData(TypedDict): - amount_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ + class CreateParamsPhaseTransferData(TypedDict): + amount_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ - class CreateParamsPhaseItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionSchedule.CreateParamsPhaseItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. - """ - metadata: NotRequired["Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. - """ - plan: NotRequired["str"] - """ - The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. - """ - price: NotRequired["str"] - """ - The ID of the price object. - """ - price_data: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired["int"] - """ - Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ + class CreateParamsPhaseItem(TypedDict): + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionSchedule.CreateParamsPhaseItemBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + """ + metadata: NotRequired["Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + """ + plan: NotRequired["str"] + """ + The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + """ + price: NotRequired["str"] + """ + The ID of the price object. + """ + price_data: NotRequired[ + "SubscriptionSchedule.CreateParamsPhaseItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired["int"] + """ + Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ - class CreateParamsPhaseItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - recurring: "SubscriptionSchedule.CreateParamsPhaseItemPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class CreateParamsPhaseItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + recurring: "SubscriptionSchedule.CreateParamsPhaseItemPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class CreateParamsPhaseItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ + class CreateParamsPhaseItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ - class CreateParamsPhaseItemBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ + class CreateParamsPhaseItemBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ - class CreateParamsPhaseInvoiceSettings(TypedDict): - days_until_due: NotRequired["int"] - """ - Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. - """ + class CreateParamsPhaseInvoiceSettings(TypedDict): + days_until_due: NotRequired["int"] + """ + Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + """ - class CreateParamsPhaseBillingThresholds(TypedDict): - amount_gte: NotRequired["int"] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired["bool"] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ + class CreateParamsPhaseBillingThresholds(TypedDict): + amount_gte: NotRequired["int"] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ + reset_billing_cycle_anchor: NotRequired["bool"] + """ + Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + """ - class CreateParamsPhaseAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ + class CreateParamsPhaseAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ - class CreateParamsPhaseAddInvoiceItem(TypedDict): - price: NotRequired["str"] - """ - The ID of the price object. - """ - price_data: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseAddInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired["int"] - """ - Quantity for this item. Defaults to 1. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. - """ + class CreateParamsPhaseAddInvoiceItem(TypedDict): + price: NotRequired["str"] + """ + The ID of the price object. + """ + price_data: NotRequired[ + "SubscriptionSchedule.CreateParamsPhaseAddInvoiceItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired["int"] + """ + Quantity for this item. Defaults to 1. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + """ - class CreateParamsPhaseAddInvoiceItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class CreateParamsPhaseAddInvoiceItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class CreateParamsDefaultSettings(TypedDict): - application_fee_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired[ - "SubscriptionSchedule.CreateParamsDefaultSettingsAutomaticTax" - ] - """ - Default settings for automatic tax computation. - """ - billing_cycle_anchor: NotRequired[ - "Literal['automatic', 'phase_start']" - ] - """ - Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionSchedule.CreateParamsDefaultSettingsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - collection_method: NotRequired[ - "Literal['charge_automatically', 'send_invoice']" - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. - """ - default_payment_method: NotRequired["str"] - """ - ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - """ - description: NotRequired["Literal['']|str"] - """ - Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - invoice_settings: NotRequired[ - "SubscriptionSchedule.CreateParamsDefaultSettingsInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge, for each of the associated subscription's invoices. - """ - transfer_data: NotRequired[ - "Literal['']|SubscriptionSchedule.CreateParamsDefaultSettingsTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the associated subscription's invoices. - """ + class CreateParamsDefaultSettings(TypedDict): + application_fee_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + automatic_tax: NotRequired[ + "SubscriptionSchedule.CreateParamsDefaultSettingsAutomaticTax" + ] + """ + Default settings for automatic tax computation. + """ + billing_cycle_anchor: NotRequired[ + "Literal['automatic', 'phase_start']" + ] + """ + Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + """ + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionSchedule.CreateParamsDefaultSettingsBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + collection_method: NotRequired[ + "Literal['charge_automatically', 'send_invoice']" + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + """ + default_payment_method: NotRequired["str"] + """ + ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + """ + description: NotRequired["Literal['']|str"] + """ + Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + invoice_settings: NotRequired[ + "SubscriptionSchedule.CreateParamsDefaultSettingsInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account on behalf of which to charge, for each of the associated subscription's invoices. + """ + transfer_data: NotRequired[ + "Literal['']|SubscriptionSchedule.CreateParamsDefaultSettingsTransferData" + ] + """ + The data with which to automatically create a Transfer for each of the associated subscription's invoices. + """ - class CreateParamsDefaultSettingsTransferData(TypedDict): - amount_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ + class CreateParamsDefaultSettingsTransferData(TypedDict): + amount_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ - class CreateParamsDefaultSettingsInvoiceSettings(TypedDict): - days_until_due: NotRequired["int"] - """ - Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. - """ + class CreateParamsDefaultSettingsInvoiceSettings(TypedDict): + days_until_due: NotRequired["int"] + """ + Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. + """ - class CreateParamsDefaultSettingsBillingThresholds(TypedDict): - amount_gte: NotRequired["int"] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired["bool"] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ + class CreateParamsDefaultSettingsBillingThresholds(TypedDict): + amount_gte: NotRequired["int"] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ + reset_billing_cycle_anchor: NotRequired["bool"] + """ + Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + """ - class CreateParamsDefaultSettingsAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ + class CreateParamsDefaultSettingsAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ - class ListParams(RequestOptions): - canceled_at: NotRequired[ - "SubscriptionSchedule.ListParamsCanceledAt|int" - ] - """ - Only return subscription schedules that were created canceled the given date interval. - """ - completed_at: NotRequired[ - "SubscriptionSchedule.ListParamsCompletedAt|int" - ] - """ - Only return subscription schedules that completed during the given date interval. - """ - created: NotRequired["SubscriptionSchedule.ListParamsCreated|int"] - """ - Only return subscription schedules that were created during the given date interval. - """ - customer: NotRequired["str"] - """ - Only return subscription schedules for the given 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. - """ - released_at: NotRequired[ - "SubscriptionSchedule.ListParamsReleasedAt|int" - ] - """ - Only return subscription schedules that were released during the given date interval. - """ - scheduled: NotRequired["bool"] - """ - Only return subscription schedules that have not started yet. - """ - 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 ListParams(RequestOptions): + canceled_at: NotRequired[ + "SubscriptionSchedule.ListParamsCanceledAt|int" + ] + """ + Only return subscription schedules that were created canceled the given date interval. + """ + completed_at: NotRequired[ + "SubscriptionSchedule.ListParamsCompletedAt|int" + ] + """ + Only return subscription schedules that completed during the given date interval. + """ + created: NotRequired["SubscriptionSchedule.ListParamsCreated|int"] + """ + Only return subscription schedules that were created during the given date interval. + """ + customer: NotRequired["str"] + """ + Only return subscription schedules for the given 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. + """ + released_at: NotRequired[ + "SubscriptionSchedule.ListParamsReleasedAt|int" + ] + """ + Only return subscription schedules that were released during the given date interval. + """ + scheduled: NotRequired["bool"] + """ + Only return subscription schedules that have not started yet. + """ + 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 ListParamsReleasedAt(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsReleasedAt(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ListParamsCompletedAt(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCompletedAt(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ListParamsCanceledAt(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCanceledAt(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - default_settings: NotRequired[ - "SubscriptionSchedule.ModifyParamsDefaultSettings" - ] - """ - Object representing the subscription schedule's default settings. - """ - end_behavior: NotRequired[ - "Literal['cancel', 'none', 'release', 'renew']" - ] - """ - Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - phases: NotRequired["List[SubscriptionSchedule.ModifyParamsPhase]"] - """ - List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. - """ - proration_behavior: NotRequired[ - "Literal['always_invoice', 'create_prorations', 'none']" - ] - """ - If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`. - """ + class ModifyParams(RequestOptions): + default_settings: NotRequired[ + "SubscriptionSchedule.ModifyParamsDefaultSettings" + ] + """ + Object representing the subscription schedule's default settings. + """ + end_behavior: NotRequired[ + "Literal['cancel', 'none', 'release', 'renew']" + ] + """ + Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + phases: NotRequired["List[SubscriptionSchedule.ModifyParamsPhase]"] + """ + List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. + """ + proration_behavior: NotRequired[ + "Literal['always_invoice', 'create_prorations', 'none']" + ] + """ + If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`. + """ - class ModifyParamsPhase(TypedDict): - add_invoice_items: NotRequired[ - "List[SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItem]" - ] - """ - A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. - """ - application_fee_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseAutomaticTax" - ] - """ - Automatic tax settings for this phase. - """ - billing_cycle_anchor: NotRequired[ - "Literal['automatic', 'phase_start']" - ] - """ - Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionSchedule.ModifyParamsPhaseBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - collection_method: NotRequired[ - "Literal['charge_automatically', 'send_invoice']" - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. - """ - coupon: NotRequired["str"] - """ - The identifier of the coupon to apply to this phase of the subscription schedule. - """ - currency: NotRequired["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). - """ - default_payment_method: NotRequired["str"] - """ - ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. - """ - description: NotRequired["Literal['']|str"] - """ - Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - end_date: NotRequired["int|Literal['now']"] - """ - The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. - """ - invoice_settings: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - items: List["SubscriptionSchedule.ModifyParamsPhaseItem"] - """ - List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. - """ - iterations: NotRequired["int"] - """ - Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. - """ - metadata: NotRequired["Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. - """ - on_behalf_of: NotRequired["str"] - """ - The account on behalf of which to charge, for each of the associated subscription's invoices. - """ - proration_behavior: NotRequired[ - "Literal['always_invoice', 'create_prorations', 'none']" - ] - """ - Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. - """ - start_date: NotRequired["int|Literal['now']"] - """ - The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. - """ - transfer_data: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the associated subscription's invoices. - """ - trial: NotRequired["bool"] - """ - If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. - """ - trial_end: NotRequired["int|Literal['now']"] - """ - Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` - """ + class ModifyParamsPhase(TypedDict): + add_invoice_items: NotRequired[ + "List[SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItem]" + ] + """ + A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + """ + application_fee_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + automatic_tax: NotRequired[ + "SubscriptionSchedule.ModifyParamsPhaseAutomaticTax" + ] + """ + Automatic tax settings for this phase. + """ + billing_cycle_anchor: NotRequired[ + "Literal['automatic', 'phase_start']" + ] + """ + Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + """ + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionSchedule.ModifyParamsPhaseBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + collection_method: NotRequired[ + "Literal['charge_automatically', 'send_invoice']" + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + """ + coupon: NotRequired["str"] + """ + The identifier of the coupon to apply to this phase of the subscription schedule. + """ + currency: NotRequired["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). + """ + default_payment_method: NotRequired["str"] + """ + ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + """ + description: NotRequired["Literal['']|str"] + """ + Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + end_date: NotRequired["int|Literal['now']"] + """ + The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + """ + invoice_settings: NotRequired[ + "SubscriptionSchedule.ModifyParamsPhaseInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + items: List["SubscriptionSchedule.ModifyParamsPhaseItem"] + """ + List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + """ + iterations: NotRequired["int"] + """ + Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + """ + metadata: NotRequired["Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + """ + on_behalf_of: NotRequired["str"] + """ + The account on behalf of which to charge, for each of the associated subscription's invoices. + """ + proration_behavior: NotRequired[ + "Literal['always_invoice', 'create_prorations', 'none']" + ] + """ + Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + """ + start_date: NotRequired["int|Literal['now']"] + """ + The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + """ + transfer_data: NotRequired[ + "SubscriptionSchedule.ModifyParamsPhaseTransferData" + ] + """ + The data with which to automatically create a Transfer for each of the associated subscription's invoices. + """ + trial: NotRequired["bool"] + """ + If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + """ + trial_end: NotRequired["int|Literal['now']"] + """ + Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + """ - class ModifyParamsPhaseTransferData(TypedDict): - amount_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ + class ModifyParamsPhaseTransferData(TypedDict): + amount_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ - class ModifyParamsPhaseItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionSchedule.ModifyParamsPhaseItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. - """ - metadata: NotRequired["Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. - """ - plan: NotRequired["str"] - """ - The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. - """ - price: NotRequired["str"] - """ - The ID of the price object. - """ - price_data: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired["int"] - """ - Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ + class ModifyParamsPhaseItem(TypedDict): + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionSchedule.ModifyParamsPhaseItemBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + """ + metadata: NotRequired["Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + """ + plan: NotRequired["str"] + """ + The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + """ + price: NotRequired["str"] + """ + The ID of the price object. + """ + price_data: NotRequired[ + "SubscriptionSchedule.ModifyParamsPhaseItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired["int"] + """ + Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ - class ModifyParamsPhaseItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - recurring: "SubscriptionSchedule.ModifyParamsPhaseItemPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class ModifyParamsPhaseItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + recurring: "SubscriptionSchedule.ModifyParamsPhaseItemPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class ModifyParamsPhaseItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired["int"] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ + class ModifyParamsPhaseItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired["int"] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ - class ModifyParamsPhaseItemBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ + class ModifyParamsPhaseItemBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ - class ModifyParamsPhaseInvoiceSettings(TypedDict): - days_until_due: NotRequired["int"] - """ - Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. - """ + class ModifyParamsPhaseInvoiceSettings(TypedDict): + days_until_due: NotRequired["int"] + """ + Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + """ - class ModifyParamsPhaseBillingThresholds(TypedDict): - amount_gte: NotRequired["int"] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired["bool"] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ + class ModifyParamsPhaseBillingThresholds(TypedDict): + amount_gte: NotRequired["int"] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ + reset_billing_cycle_anchor: NotRequired["bool"] + """ + Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + """ - class ModifyParamsPhaseAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ + class ModifyParamsPhaseAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ - class ModifyParamsPhaseAddInvoiceItem(TypedDict): - price: NotRequired["str"] - """ - The ID of the price object. - """ - price_data: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired["int"] - """ - Quantity for this item. Defaults to 1. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. - """ + class ModifyParamsPhaseAddInvoiceItem(TypedDict): + price: NotRequired["str"] + """ + The ID of the price object. + """ + price_data: NotRequired[ + "SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired["int"] + """ + Quantity for this item. Defaults to 1. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + """ - class ModifyParamsPhaseAddInvoiceItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the product that this price will belong to. - """ - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'unspecified']" - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired["str"] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ + class ModifyParamsPhaseAddInvoiceItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the product that this price will belong to. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ - class ModifyParamsDefaultSettings(TypedDict): - application_fee_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired[ - "SubscriptionSchedule.ModifyParamsDefaultSettingsAutomaticTax" - ] - """ - Default settings for automatic tax computation. - """ - billing_cycle_anchor: NotRequired[ - "Literal['automatic', 'phase_start']" - ] - """ - Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionSchedule.ModifyParamsDefaultSettingsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - collection_method: NotRequired[ - "Literal['charge_automatically', 'send_invoice']" - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. - """ - default_payment_method: NotRequired["str"] - """ - ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - """ - description: NotRequired["Literal['']|str"] - """ - Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - invoice_settings: NotRequired[ - "SubscriptionSchedule.ModifyParamsDefaultSettingsInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge, for each of the associated subscription's invoices. - """ - transfer_data: NotRequired[ - "Literal['']|SubscriptionSchedule.ModifyParamsDefaultSettingsTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the associated subscription's invoices. - """ + class ModifyParamsDefaultSettings(TypedDict): + application_fee_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + automatic_tax: NotRequired[ + "SubscriptionSchedule.ModifyParamsDefaultSettingsAutomaticTax" + ] + """ + Default settings for automatic tax computation. + """ + billing_cycle_anchor: NotRequired[ + "Literal['automatic', 'phase_start']" + ] + """ + Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + """ + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionSchedule.ModifyParamsDefaultSettingsBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + collection_method: NotRequired[ + "Literal['charge_automatically', 'send_invoice']" + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + """ + default_payment_method: NotRequired["str"] + """ + ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + """ + description: NotRequired["Literal['']|str"] + """ + Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + invoice_settings: NotRequired[ + "SubscriptionSchedule.ModifyParamsDefaultSettingsInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account on behalf of which to charge, for each of the associated subscription's invoices. + """ + transfer_data: NotRequired[ + "Literal['']|SubscriptionSchedule.ModifyParamsDefaultSettingsTransferData" + ] + """ + The data with which to automatically create a Transfer for each of the associated subscription's invoices. + """ - class ModifyParamsDefaultSettingsTransferData(TypedDict): - amount_percent: NotRequired["float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ + class ModifyParamsDefaultSettingsTransferData(TypedDict): + amount_percent: NotRequired["float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ - class ModifyParamsDefaultSettingsInvoiceSettings(TypedDict): - days_until_due: NotRequired["int"] - """ - Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. - """ + class ModifyParamsDefaultSettingsInvoiceSettings(TypedDict): + days_until_due: NotRequired["int"] + """ + Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. + """ - class ModifyParamsDefaultSettingsBillingThresholds(TypedDict): - amount_gte: NotRequired["int"] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired["bool"] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ + class ModifyParamsDefaultSettingsBillingThresholds(TypedDict): + amount_gte: NotRequired["int"] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ + reset_billing_cycle_anchor: NotRequired["bool"] + """ + Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + """ - class ModifyParamsDefaultSettingsAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ + class ModifyParamsDefaultSettingsAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ - class ReleaseParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - preserve_cancel_date: NotRequired["bool"] - """ - Keep any cancellation on the subscription that the schedule has set - """ + class ReleaseParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + preserve_cancel_date: NotRequired["bool"] + """ + Keep any cancellation on the subscription that the schedule has set + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ application: Optional[ExpandableField["Application"]] """ diff --git a/stripe/api_resources/tax/calculation.py b/stripe/api_resources/tax/calculation.py index 678e3a706..23dc32631 100644 --- a/stripe/api_resources/tax/calculation.py +++ b/stripe/api_resources/tax/calculation.py @@ -345,232 +345,228 @@ class TaxRateDetails(StripeObject): """ _inner_class_types = {"tax_rate_details": TaxRateDetails} - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - 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). - """ - customer: NotRequired["str"] - """ - The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`. - """ - customer_details: NotRequired[ - "Calculation.CreateParamsCustomerDetails" - ] - """ - Details about the customer, including address and tax IDs. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - line_items: List["Calculation.CreateParamsLineItem"] - """ - A list of items the customer is purchasing. - """ - shipping_cost: NotRequired["Calculation.CreateParamsShippingCost"] - """ - Shipping cost details to be used for the calculation. - """ - tax_date: NotRequired["int"] - """ - Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future. - """ + class CreateParams(RequestOptions): + 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). + """ + customer: NotRequired["str"] + """ + The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`. + """ + customer_details: NotRequired[ + "Calculation.CreateParamsCustomerDetails" + ] + """ + Details about the customer, including address and tax IDs. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + line_items: List["Calculation.CreateParamsLineItem"] + """ + A list of items the customer is purchasing. + """ + shipping_cost: NotRequired["Calculation.CreateParamsShippingCost"] + """ + Shipping cost details to be used for the calculation. + """ + tax_date: NotRequired["int"] + """ + Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future. + """ - class CreateParamsShippingCost(TypedDict): - amount: NotRequired["int"] - """ - A positive integer in cents representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. - """ - shipping_rate: NotRequired["str"] - """ - If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters. - """ - tax_behavior: NotRequired["Literal['exclusive', 'inclusive']"] - """ - Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`. - """ - 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. - """ + class CreateParamsShippingCost(TypedDict): + amount: NotRequired["int"] + """ + A positive integer in cents representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. + """ + shipping_rate: NotRequired["str"] + """ + If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters. + """ + tax_behavior: NotRequired["Literal['exclusive', 'inclusive']"] + """ + Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`. + """ + 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. + """ - class CreateParamsLineItem(TypedDict): - amount: int - """ - A positive integer in cents representing the line item's total price. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. - """ - product: NotRequired["str"] - """ - If provided, the product's `tax_code` will be used as the line item's `tax_code`. - """ - quantity: NotRequired["int"] - """ - The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25. - """ - reference: NotRequired["str"] - """ - A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports). - """ - tax_behavior: NotRequired["Literal['exclusive', 'inclusive']"] - """ - Specifies whether the `amount` includes taxes. Defaults to `exclusive`. - """ - tax_code: NotRequired["str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings. - """ + class CreateParamsLineItem(TypedDict): + amount: int + """ + A positive integer in cents representing the line item's total price. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. + """ + product: NotRequired["str"] + """ + If provided, the product's `tax_code` will be used as the line item's `tax_code`. + """ + quantity: NotRequired["int"] + """ + The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25. + """ + reference: NotRequired["str"] + """ + A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports). + """ + tax_behavior: NotRequired["Literal['exclusive', 'inclusive']"] + """ + Specifies whether the `amount` includes taxes. Defaults to `exclusive`. + """ + tax_code: NotRequired["str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings. + """ - class CreateParamsCustomerDetails(TypedDict): - address: NotRequired[ - "Calculation.CreateParamsCustomerDetailsAddress" - ] - """ - The customer's postal address (for example, home or business location). - """ - address_source: NotRequired["Literal['billing', 'shipping']"] - """ - The type of customer address provided. - """ - ip_address: NotRequired["str"] - """ - The customer's IP address (IPv4 or IPv6). - """ - tax_ids: NotRequired[ - "List[Calculation.CreateParamsCustomerDetailsTaxId]" - ] - """ - The customer's tax IDs. - """ - taxability_override: NotRequired[ - "Literal['customer_exempt', 'none', 'reverse_charge']" - ] - """ - Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies. - """ + class CreateParamsCustomerDetails(TypedDict): + address: NotRequired["Calculation.CreateParamsCustomerDetailsAddress"] + """ + The customer's postal address (for example, home or business location). + """ + address_source: NotRequired["Literal['billing', 'shipping']"] + """ + The type of customer address provided. + """ + ip_address: NotRequired["str"] + """ + The customer's IP address (IPv4 or IPv6). + """ + tax_ids: NotRequired[ + "List[Calculation.CreateParamsCustomerDetailsTaxId]" + ] + """ + The customer's tax IDs. + """ + taxability_override: NotRequired[ + "Literal['customer_exempt', 'none', 'reverse_charge']" + ] + """ + Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies. + """ - class CreateParamsCustomerDetailsTaxId(TypedDict): - type: Literal[ - "ad_nrt", - "ae_trn", - "ar_cuit", - "au_abn", - "au_arn", - "bg_uic", - "bo_tin", - "br_cnpj", - "br_cpf", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "ch_vat", - "cl_tin", - "cn_tin", - "co_nit", - "cr_tin", - "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", - "li_uid", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "no_vat", - "nz_gst", - "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", - "za_vat", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 - """ - Value of the tax ID. - """ + class CreateParamsCustomerDetailsTaxId(TypedDict): + type: Literal[ + "ad_nrt", + "ae_trn", + "ar_cuit", + "au_abn", + "au_arn", + "bg_uic", + "bo_tin", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "cn_tin", + "co_nit", + "cr_tin", + "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", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "nz_gst", + "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", + "za_vat", + ] + """ + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `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 + """ + Value of the tax ID. + """ - class CreateParamsCustomerDetailsAddress(TypedDict): - city: NotRequired["Literal['']|str"] - """ - City, district, suburb, town, or village. - """ - country: 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. We recommend sending [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code value when possible. - """ + class CreateParamsCustomerDetailsAddress(TypedDict): + city: NotRequired["Literal['']|str"] + """ + City, district, suburb, town, or village. + """ + country: 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. We recommend sending [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code value when possible. + """ - class ListLineItemsParams(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. - """ + class ListLineItemsParams(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. + """ amount_total: int """ diff --git a/stripe/api_resources/tax/registration.py b/stripe/api_resources/tax/registration.py index 49dc59e33..247376fa4 100644 --- a/stripe/api_resources/tax/registration.py +++ b/stripe/api_resources/tax/registration.py @@ -9,13 +9,7 @@ from stripe.request_options import RequestOptions from stripe.stripe_object import StripeObject from typing import ClassVar, List, Optional, Union, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, NotRequired, TypedDict, Unpack from urllib.parse import quote_plus @@ -682,924 +676,925 @@ class Za(StripeObject): } _field_remappings = {"is_": "is"} - if TYPE_CHECKING: + class CreateParams(RequestOptions): + active_from: Union[Literal["now"], int] + """ + Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch. + """ + country: str + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + country_options: "Registration.CreateParamsCountryOptions" + """ + Specific options for a registration in the specified `country`. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["int"] + """ + If set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch. + """ - class CreateParams(RequestOptions): - active_from: Union[Literal["now"], int] - """ - Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch. - """ - country: str - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - country_options: "Registration.CreateParamsCountryOptions" - """ - Specific options for a registration in the specified `country`. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired["int"] - """ - If set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch. - """ + class CreateParamsCountryOptions( + TypedDict( + "CreateParamsCountryOptions", + {"is": NotRequired["Registration.CreateParamsCountryOptionsIs"]}, + ), + ): + ae: NotRequired["Registration.CreateParamsCountryOptionsAe"] + """ + Options for the registration in AE. + """ + at: NotRequired["Registration.CreateParamsCountryOptionsAt"] + """ + Options for the registration in AT. + """ + au: NotRequired["Registration.CreateParamsCountryOptionsAu"] + """ + Options for the registration in AU. + """ + be: NotRequired["Registration.CreateParamsCountryOptionsBe"] + """ + Options for the registration in BE. + """ + bg: NotRequired["Registration.CreateParamsCountryOptionsBg"] + """ + Options for the registration in BG. + """ + ca: NotRequired["Registration.CreateParamsCountryOptionsCa"] + """ + Options for the registration in CA. + """ + ch: NotRequired["Registration.CreateParamsCountryOptionsCh"] + """ + Options for the registration in CH. + """ + cl: NotRequired["Registration.CreateParamsCountryOptionsCl"] + """ + Options for the registration in CL. + """ + co: NotRequired["Registration.CreateParamsCountryOptionsCo"] + """ + Options for the registration in CO. + """ + cy: NotRequired["Registration.CreateParamsCountryOptionsCy"] + """ + Options for the registration in CY. + """ + cz: NotRequired["Registration.CreateParamsCountryOptionsCz"] + """ + Options for the registration in CZ. + """ + de: NotRequired["Registration.CreateParamsCountryOptionsDe"] + """ + Options for the registration in DE. + """ + dk: NotRequired["Registration.CreateParamsCountryOptionsDk"] + """ + Options for the registration in DK. + """ + ee: NotRequired["Registration.CreateParamsCountryOptionsEe"] + """ + Options for the registration in EE. + """ + es: NotRequired["Registration.CreateParamsCountryOptionsEs"] + """ + Options for the registration in ES. + """ + fi: NotRequired["Registration.CreateParamsCountryOptionsFi"] + """ + Options for the registration in FI. + """ + fr: NotRequired["Registration.CreateParamsCountryOptionsFr"] + """ + Options for the registration in FR. + """ + gb: NotRequired["Registration.CreateParamsCountryOptionsGb"] + """ + Options for the registration in GB. + """ + gr: NotRequired["Registration.CreateParamsCountryOptionsGr"] + """ + Options for the registration in GR. + """ + hr: NotRequired["Registration.CreateParamsCountryOptionsHr"] + """ + Options for the registration in HR. + """ + hu: NotRequired["Registration.CreateParamsCountryOptionsHu"] + """ + Options for the registration in HU. + """ + id: NotRequired["Registration.CreateParamsCountryOptionsId"] + """ + Options for the registration in ID. + """ + ie: NotRequired["Registration.CreateParamsCountryOptionsIe"] + """ + Options for the registration in IE. + """ + it: NotRequired["Registration.CreateParamsCountryOptionsIt"] + """ + Options for the registration in IT. + """ + jp: NotRequired["Registration.CreateParamsCountryOptionsJp"] + """ + Options for the registration in JP. + """ + kr: NotRequired["Registration.CreateParamsCountryOptionsKr"] + """ + Options for the registration in KR. + """ + lt: NotRequired["Registration.CreateParamsCountryOptionsLt"] + """ + Options for the registration in LT. + """ + lu: NotRequired["Registration.CreateParamsCountryOptionsLu"] + """ + Options for the registration in LU. + """ + lv: NotRequired["Registration.CreateParamsCountryOptionsLv"] + """ + Options for the registration in LV. + """ + mt: NotRequired["Registration.CreateParamsCountryOptionsMt"] + """ + Options for the registration in MT. + """ + mx: NotRequired["Registration.CreateParamsCountryOptionsMx"] + """ + Options for the registration in MX. + """ + my: NotRequired["Registration.CreateParamsCountryOptionsMy"] + """ + Options for the registration in MY. + """ + nl: NotRequired["Registration.CreateParamsCountryOptionsNl"] + """ + Options for the registration in NL. + """ + no: NotRequired["Registration.CreateParamsCountryOptionsNo"] + """ + Options for the registration in NO. + """ + nz: NotRequired["Registration.CreateParamsCountryOptionsNz"] + """ + Options for the registration in NZ. + """ + pl: NotRequired["Registration.CreateParamsCountryOptionsPl"] + """ + Options for the registration in PL. + """ + pt: NotRequired["Registration.CreateParamsCountryOptionsPt"] + """ + Options for the registration in PT. + """ + ro: NotRequired["Registration.CreateParamsCountryOptionsRo"] + """ + Options for the registration in RO. + """ + sa: NotRequired["Registration.CreateParamsCountryOptionsSa"] + """ + Options for the registration in SA. + """ + se: NotRequired["Registration.CreateParamsCountryOptionsSe"] + """ + Options for the registration in SE. + """ + sg: NotRequired["Registration.CreateParamsCountryOptionsSg"] + """ + Options for the registration in SG. + """ + si: NotRequired["Registration.CreateParamsCountryOptionsSi"] + """ + Options for the registration in SI. + """ + sk: NotRequired["Registration.CreateParamsCountryOptionsSk"] + """ + Options for the registration in SK. + """ + th: NotRequired["Registration.CreateParamsCountryOptionsTh"] + """ + Options for the registration in TH. + """ + tr: NotRequired["Registration.CreateParamsCountryOptionsTr"] + """ + Options for the registration in TR. + """ + us: NotRequired["Registration.CreateParamsCountryOptionsUs"] + """ + Options for the registration in US. + """ + vn: NotRequired["Registration.CreateParamsCountryOptionsVn"] + """ + Options for the registration in VN. + """ + za: NotRequired["Registration.CreateParamsCountryOptionsZa"] + """ + Options for the registration in ZA. + """ - class CreateParamsCountryOptions(TypedDict): - ae: NotRequired["Registration.CreateParamsCountryOptionsAe"] - """ - Options for the registration in AE. - """ - at: NotRequired["Registration.CreateParamsCountryOptionsAt"] - """ - Options for the registration in AT. - """ - au: NotRequired["Registration.CreateParamsCountryOptionsAu"] - """ - Options for the registration in AU. - """ - be: NotRequired["Registration.CreateParamsCountryOptionsBe"] - """ - Options for the registration in BE. - """ - bg: NotRequired["Registration.CreateParamsCountryOptionsBg"] - """ - Options for the registration in BG. - """ - ca: NotRequired["Registration.CreateParamsCountryOptionsCa"] - """ - Options for the registration in CA. - """ - ch: NotRequired["Registration.CreateParamsCountryOptionsCh"] - """ - Options for the registration in CH. - """ - cl: NotRequired["Registration.CreateParamsCountryOptionsCl"] - """ - Options for the registration in CL. - """ - co: NotRequired["Registration.CreateParamsCountryOptionsCo"] - """ - Options for the registration in CO. - """ - cy: NotRequired["Registration.CreateParamsCountryOptionsCy"] - """ - Options for the registration in CY. - """ - cz: NotRequired["Registration.CreateParamsCountryOptionsCz"] - """ - Options for the registration in CZ. - """ - de: NotRequired["Registration.CreateParamsCountryOptionsDe"] - """ - Options for the registration in DE. - """ - dk: NotRequired["Registration.CreateParamsCountryOptionsDk"] - """ - Options for the registration in DK. - """ - ee: NotRequired["Registration.CreateParamsCountryOptionsEe"] - """ - Options for the registration in EE. - """ - es: NotRequired["Registration.CreateParamsCountryOptionsEs"] - """ - Options for the registration in ES. - """ - fi: NotRequired["Registration.CreateParamsCountryOptionsFi"] - """ - Options for the registration in FI. - """ - fr: NotRequired["Registration.CreateParamsCountryOptionsFr"] - """ - Options for the registration in FR. - """ - gb: NotRequired["Registration.CreateParamsCountryOptionsGb"] - """ - Options for the registration in GB. - """ - gr: NotRequired["Registration.CreateParamsCountryOptionsGr"] - """ - Options for the registration in GR. - """ - hr: NotRequired["Registration.CreateParamsCountryOptionsHr"] - """ - Options for the registration in HR. - """ - hu: NotRequired["Registration.CreateParamsCountryOptionsHu"] - """ - Options for the registration in HU. - """ - id: NotRequired["Registration.CreateParamsCountryOptionsId"] - """ - Options for the registration in ID. - """ - ie: NotRequired["Registration.CreateParamsCountryOptionsIe"] - """ - Options for the registration in IE. - """ - it: NotRequired["Registration.CreateParamsCountryOptionsIt"] - """ - Options for the registration in IT. - """ - jp: NotRequired["Registration.CreateParamsCountryOptionsJp"] - """ - Options for the registration in JP. - """ - kr: NotRequired["Registration.CreateParamsCountryOptionsKr"] - """ - Options for the registration in KR. - """ - lt: NotRequired["Registration.CreateParamsCountryOptionsLt"] - """ - Options for the registration in LT. - """ - lu: NotRequired["Registration.CreateParamsCountryOptionsLu"] - """ - Options for the registration in LU. - """ - lv: NotRequired["Registration.CreateParamsCountryOptionsLv"] - """ - Options for the registration in LV. - """ - mt: NotRequired["Registration.CreateParamsCountryOptionsMt"] - """ - Options for the registration in MT. - """ - mx: NotRequired["Registration.CreateParamsCountryOptionsMx"] - """ - Options for the registration in MX. - """ - my: NotRequired["Registration.CreateParamsCountryOptionsMy"] - """ - Options for the registration in MY. - """ - nl: NotRequired["Registration.CreateParamsCountryOptionsNl"] - """ - Options for the registration in NL. - """ - no: NotRequired["Registration.CreateParamsCountryOptionsNo"] - """ - Options for the registration in NO. - """ - nz: NotRequired["Registration.CreateParamsCountryOptionsNz"] - """ - Options for the registration in NZ. - """ - pl: NotRequired["Registration.CreateParamsCountryOptionsPl"] - """ - Options for the registration in PL. - """ - pt: NotRequired["Registration.CreateParamsCountryOptionsPt"] - """ - Options for the registration in PT. - """ - ro: NotRequired["Registration.CreateParamsCountryOptionsRo"] - """ - Options for the registration in RO. - """ - sa: NotRequired["Registration.CreateParamsCountryOptionsSa"] - """ - Options for the registration in SA. - """ - se: NotRequired["Registration.CreateParamsCountryOptionsSe"] - """ - Options for the registration in SE. - """ - sg: NotRequired["Registration.CreateParamsCountryOptionsSg"] - """ - Options for the registration in SG. - """ - si: NotRequired["Registration.CreateParamsCountryOptionsSi"] - """ - Options for the registration in SI. - """ - sk: NotRequired["Registration.CreateParamsCountryOptionsSk"] - """ - Options for the registration in SK. - """ - th: NotRequired["Registration.CreateParamsCountryOptionsTh"] - """ - Options for the registration in TH. - """ - tr: NotRequired["Registration.CreateParamsCountryOptionsTr"] - """ - Options for the registration in TR. - """ - us: NotRequired["Registration.CreateParamsCountryOptionsUs"] - """ - Options for the registration in US. - """ - vn: NotRequired["Registration.CreateParamsCountryOptionsVn"] - """ - Options for the registration in VN. - """ - za: NotRequired["Registration.CreateParamsCountryOptionsZa"] - """ - Options for the registration in ZA. - """ + class CreateParamsCountryOptionsZa(TypedDict): + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsZa(TypedDict): - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsVn(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsVn(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsUs(TypedDict): + local_amusement_tax: NotRequired[ + "Registration.CreateParamsCountryOptionsUsLocalAmusementTax" + ] + """ + Options for the local amusement tax registration. + """ + local_lease_tax: NotRequired[ + "Registration.CreateParamsCountryOptionsUsLocalLeaseTax" + ] + """ + Options for the local lease tax registration. + """ + state: str + """ + Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + type: Literal[ + "local_amusement_tax", + "local_lease_tax", + "state_communications_tax", + "state_sales_tax", + ] + """ + Type of registration to be created in the US. + """ - class CreateParamsCountryOptionsUs(TypedDict): - local_amusement_tax: NotRequired[ - "Registration.CreateParamsCountryOptionsUsLocalAmusementTax" - ] - """ - Options for the local amusement tax registration. - """ - local_lease_tax: NotRequired[ - "Registration.CreateParamsCountryOptionsUsLocalLeaseTax" - ] - """ - Options for the local lease tax registration. - """ - state: str - """ - Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). - """ - type: Literal[ - "local_amusement_tax", - "local_lease_tax", - "state_communications_tax", - "state_sales_tax", - ] - """ - Type of registration to be created in the US. - """ + class CreateParamsCountryOptionsUsLocalLeaseTax(TypedDict): + jurisdiction: str + """ + A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago). + """ - class CreateParamsCountryOptionsUsLocalLeaseTax(TypedDict): - jurisdiction: str - """ - A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago). - """ + class CreateParamsCountryOptionsUsLocalAmusementTax(TypedDict): + jurisdiction: str + """ + A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), and `68081` (Schiller Park). + """ - class CreateParamsCountryOptionsUsLocalAmusementTax(TypedDict): - jurisdiction: str - """ - A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), and `68081` (Schiller Park). - """ + class CreateParamsCountryOptionsTr(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsTr(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsTh(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsTh(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsSk(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsSkStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsSk(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsSkStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsSkStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsSkStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsSi(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsSiStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsSi(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsSiStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsSiStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsSiStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsSg(TypedDict): + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsSg(TypedDict): - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsSe(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsSeStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsSe(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsSeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsSeStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsSeStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsSa(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsSa(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsRo(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsRoStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsRo(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsRoStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsRoStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsRoStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsPt(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsPtStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsPt(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsPtStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsPtStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsPtStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsPl(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsPlStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsPl(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsPlStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsPlStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsPlStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsNz(TypedDict): + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsNz(TypedDict): - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsNo(TypedDict): + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsNo(TypedDict): - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsNl(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsNlStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsNl(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsNlStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsNlStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsNlStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsMy(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsMy(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsMx(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsMx(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsMt(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsMtStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsMt(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsMtStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsMtStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsMtStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsLv(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsLvStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsLv(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsLvStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsLvStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsLvStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsLu(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsLuStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsLu(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsLuStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsLuStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsLuStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsLt(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsLtStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsLt(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsLtStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsLtStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsLtStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsKr(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsKr(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsJp(TypedDict): + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsJp(TypedDict): - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsIt(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsItStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsIt(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsItStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsItStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsItStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsIs(TypedDict): + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsIs(TypedDict): - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsIe(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsIeStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsIe(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsIeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsIeStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsIeStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsId(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsId(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsHu(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsHuStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsHu(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsHuStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsHuStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsHuStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsHr(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsHrStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsHr(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsHrStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsHrStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsHrStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsGr(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsGrStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsGr(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsGrStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsGrStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsGrStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsGb(TypedDict): - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsGb(TypedDict): + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsFr(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsFrStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsFr(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsFrStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsFrStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsFrStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsFi(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsFiStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsFi(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsFiStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsFiStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsFiStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsEs(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsEsStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsEs(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsEsStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsEsStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsEsStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsEe(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsEeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsEe(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsEeStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsEeStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsEeStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsDk(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsDkStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsDk(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsDkStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsDkStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsDkStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsDe(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsDeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsDe(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsDeStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsDeStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsDeStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsCz(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsCzStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsCz(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsCzStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsCzStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsCzStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsCy(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsCyStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsCy(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsCyStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsCyStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsCyStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsCo(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsCo(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsCl(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsCl(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsCh(TypedDict): - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsCh(TypedDict): + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsCa(TypedDict): - province_standard: NotRequired[ - "Registration.CreateParamsCountryOptionsCaProvinceStandard" - ] - """ - Options for the provincial tax registration. - """ - type: Literal["province_standard", "simplified", "standard"] - """ - Type of registration to be created in Canada. - """ + class CreateParamsCountryOptionsCa(TypedDict): + province_standard: NotRequired[ + "Registration.CreateParamsCountryOptionsCaProvinceStandard" + ] + """ + Options for the provincial tax registration. + """ + type: Literal["province_standard", "simplified", "standard"] + """ + Type of registration to be created in Canada. + """ - class CreateParamsCountryOptionsCaProvinceStandard(TypedDict): - province: str - """ - Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). - """ + class CreateParamsCountryOptionsCaProvinceStandard(TypedDict): + province: str + """ + Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ - class CreateParamsCountryOptionsBg(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsBgStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsBg(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsBgStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsBgStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsBgStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsBe(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsBeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsBe(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsBeStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsBeStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsBeStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsAu(TypedDict): - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsAu(TypedDict): + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ - class CreateParamsCountryOptionsAt(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsAtStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ + class CreateParamsCountryOptionsAt(TypedDict): + standard: NotRequired[ + "Registration.CreateParamsCountryOptionsAtStandard" + ] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ - class CreateParamsCountryOptionsAtStandard(TypedDict): - place_of_supply_scheme: Literal["small_seller", "standard"] - """ - Place of supply scheme used in an EU standard registration. - """ + class CreateParamsCountryOptionsAtStandard(TypedDict): + place_of_supply_scheme: Literal["small_seller", "standard"] + """ + Place of supply scheme used in an EU standard registration. + """ - class CreateParamsCountryOptionsAe(TypedDict): - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ + class CreateParamsCountryOptionsAe(TypedDict): + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ - 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', 'all', 'expired', 'scheduled']" - ] - """ - The status of the Tax Registration. - """ + 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', 'all', 'expired', 'scheduled']"] + """ + The status of the Tax Registration. + """ - class ModifyParams(RequestOptions): - active_from: NotRequired["Literal['now']|int"] - """ - Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired["Literal['']|Literal['now']|int"] - """ - If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. - """ + class ModifyParams(RequestOptions): + active_from: NotRequired["Literal['now']|int"] + """ + Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["Literal['']|Literal['now']|int"] + """ + If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. + """ active_from: int """ diff --git a/stripe/api_resources/tax/settings.py b/stripe/api_resources/tax/settings.py index 1fffee626..f704304b8 100644 --- a/stripe/api_resources/tax/settings.py +++ b/stripe/api_resources/tax/settings.py @@ -7,13 +7,7 @@ from stripe.request_options import RequestOptions from stripe.stripe_object import StripeObject from typing import ClassVar, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, NotRequired, TypedDict, Unpack from urllib.parse import quote_plus @@ -85,71 +79,69 @@ class Pending(StripeObject): pending: Optional[Pending] _inner_class_types = {"active": Active, "pending": Pending} - if TYPE_CHECKING: - - class ModifyParams(RequestOptions): - defaults: NotRequired["Settings.ModifyParamsDefaults"] - """ - Default configuration to be used on Stripe Tax calculations. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - head_office: NotRequired["Settings.ModifyParamsHeadOffice"] - """ - The place where your business is located. - """ + class ModifyParams(RequestOptions): + defaults: NotRequired["Settings.ModifyParamsDefaults"] + """ + Default configuration to be used on Stripe Tax calculations. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + head_office: NotRequired["Settings.ModifyParamsHeadOffice"] + """ + The place where your business is located. + """ - class ModifyParamsHeadOffice(TypedDict): - address: "Settings.ModifyParamsHeadOfficeAddress" - """ - The location of the business for tax purposes. - """ + class ModifyParamsHeadOffice(TypedDict): + address: "Settings.ModifyParamsHeadOfficeAddress" + """ + The location of the business for tax purposes. + """ - class ModifyParamsHeadOfficeAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". - """ + class ModifyParamsHeadOfficeAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + """ - class ModifyParamsDefaults(TypedDict): - tax_behavior: NotRequired[ - "Literal['exclusive', 'inclusive', 'inferred_by_currency']" - ] - """ - Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null. - """ - tax_code: NotRequired["str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ + class ModifyParamsDefaults(TypedDict): + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'inferred_by_currency']" + ] + """ + Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null. + """ + tax_code: NotRequired["str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ defaults: Defaults head_office: Optional[HeadOffice] diff --git a/stripe/api_resources/tax/transaction.py b/stripe/api_resources/tax/transaction.py index c0137409a..1aeee48ae 100644 --- a/stripe/api_resources/tax/transaction.py +++ b/stripe/api_resources/tax/transaction.py @@ -282,123 +282,121 @@ class TaxRateDetails(StripeObject): """ _inner_class_types = {"tax_breakdown": TaxBreakdown} - if TYPE_CHECKING: - - class CreateFromCalculationParams(RequestOptions): - calculation: str - """ - Tax Calculation ID to be used as input when creating the transaction. - """ - expand: NotRequired["List[str]"] - """ - 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`. - """ - reference: str - """ - A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals. - """ + class CreateFromCalculationParams(RequestOptions): + calculation: str + """ + Tax Calculation ID to be used as input when creating the transaction. + """ + expand: NotRequired["List[str]"] + """ + 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`. + """ + reference: str + """ + A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals. + """ - class CreateReversalParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - flat_amount: NotRequired["int"] - """ - A flat amount to reverse across the entire transaction, in negative integer cents. This value represents the total amount to refund from the transaction, including taxes. - """ - line_items: NotRequired[ - "List[Transaction.CreateReversalParamsLineItem]" - ] - """ - The line item amounts to reverse. - """ - 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`. - """ - mode: Literal["full", "partial"] - """ - If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed. - """ - original_transaction: str - """ - The ID of the Transaction to partially or fully reverse. - """ - reference: str - """ - A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://stripe.com/docs/tax/reports). - """ - shipping_cost: NotRequired[ - "Transaction.CreateReversalParamsShippingCost" - ] - """ - The shipping cost to reverse. - """ + class CreateReversalParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + flat_amount: NotRequired["int"] + """ + A flat amount to reverse across the entire transaction, in negative integer cents. This value represents the total amount to refund from the transaction, including taxes. + """ + line_items: NotRequired[ + "List[Transaction.CreateReversalParamsLineItem]" + ] + """ + The line item amounts to reverse. + """ + 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`. + """ + mode: Literal["full", "partial"] + """ + If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed. + """ + original_transaction: str + """ + The ID of the Transaction to partially or fully reverse. + """ + reference: str + """ + A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://stripe.com/docs/tax/reports). + """ + shipping_cost: NotRequired[ + "Transaction.CreateReversalParamsShippingCost" + ] + """ + The shipping cost to reverse. + """ - class CreateReversalParamsShippingCost(TypedDict): - amount: int - """ - The amount to reverse, in negative integer cents. - """ - amount_tax: int - """ - The amount of tax to reverse, in negative integer cents. - """ + class CreateReversalParamsShippingCost(TypedDict): + amount: int + """ + The amount to reverse, in negative integer cents. + """ + amount_tax: int + """ + The amount of tax to reverse, in negative integer cents. + """ - class CreateReversalParamsLineItem(TypedDict): - amount: int - """ - The amount to reverse, in negative integer cents. - """ - amount_tax: int - """ - The amount of tax to reverse, in negative integer cents. - """ - 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. - """ - original_line_item: str - """ - The `id` of the line item to reverse in the original transaction. - """ - quantity: NotRequired["int"] - """ - The quantity reversed. Appears in [tax exports](https://stripe.com/docs/tax/reports), but does not affect the amount of tax reversed. - """ - reference: str - """ - A custom identifier for this line item in the reversal transaction, such as 'L1-refund'. - """ + class CreateReversalParamsLineItem(TypedDict): + amount: int + """ + The amount to reverse, in negative integer cents. + """ + amount_tax: int + """ + The amount of tax to reverse, in negative integer cents. + """ + 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. + """ + original_line_item: str + """ + The `id` of the line item to reverse in the original transaction. + """ + quantity: NotRequired["int"] + """ + The quantity reversed. Appears in [tax exports](https://stripe.com/docs/tax/reports), but does not affect the amount of tax reversed. + """ + reference: str + """ + A custom identifier for this line item in the reversal transaction, such as 'L1-refund'. + """ - class ListLineItemsParams(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. - """ + class ListLineItemsParams(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. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ created: int """ diff --git a/stripe/api_resources/tax_code.py b/stripe/api_resources/tax_code.py index 5da2a72b4..5852fd13b 100644 --- a/stripe/api_resources/tax_code.py +++ b/stripe/api_resources/tax_code.py @@ -4,7 +4,7 @@ from stripe.api_resources.list_object import ListObject from stripe.request_options import RequestOptions from typing import ClassVar, List, Optional -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing_extensions import Literal, NotRequired, Unpack class TaxCode(ListableAPIResource["TaxCode"]): @@ -13,31 +13,30 @@ class TaxCode(ListableAPIResource["TaxCode"]): """ OBJECT_NAME: ClassVar[Literal["tax_code"]] = "tax_code" - if TYPE_CHECKING: - 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. - """ + 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. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ description: str """ diff --git a/stripe/api_resources/tax_rate.py b/stripe/api_resources/tax_rate.py index ee913609f..59577472d 100644 --- a/stripe/api_resources/tax_rate.py +++ b/stripe/api_resources/tax_rate.py @@ -8,13 +8,7 @@ from stripe.api_resources.list_object import ListObject from stripe.request_options import RequestOptions from typing import ClassVar, Dict, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, NotRequired, TypedDict, Unpack from urllib.parse import quote_plus @@ -30,149 +24,148 @@ class TaxRate( """ OBJECT_NAME: ClassVar[Literal["tax_rate"]] = "tax_rate" - if TYPE_CHECKING: - class CreateParams(RequestOptions): - active: NotRequired["bool"] - """ - Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. - """ - display_name: str - """ - The display name of the tax rate, which will be shown to users. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - inclusive: bool - """ - This specifies if the tax rate is inclusive or exclusive. - """ - jurisdiction: NotRequired["str"] - """ - The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. - """ - 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`. - """ - percentage: float - """ - This represents the tax rate percent out of 100. - """ - state: NotRequired["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. - """ - tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'pst', 'qst', 'rst', 'sales_tax', 'service_tax', 'vat']" - ] - """ - The high-level tax type, such as `vat` or `sales_tax`. - """ + class CreateParams(RequestOptions): + active: NotRequired["bool"] + """ + Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + """ + display_name: str + """ + The display name of the tax rate, which will be shown to users. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + inclusive: bool + """ + This specifies if the tax rate is inclusive or exclusive. + """ + jurisdiction: NotRequired["str"] + """ + The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. + """ + 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`. + """ + percentage: float + """ + This represents the tax rate percent out of 100. + """ + state: NotRequired["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. + """ + tax_type: NotRequired[ + "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'pst', 'qst', 'rst', 'sales_tax', 'service_tax', 'vat']" + ] + """ + The high-level tax type, such as `vat` or `sales_tax`. + """ - class ListParams(RequestOptions): - active: NotRequired["bool"] - """ - Optional flag to filter by tax rates that are either active or inactive (archived). - """ - created: NotRequired["TaxRate.ListParamsCreated|int"] - """ - Optional range for filtering created date. - """ - 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. - """ - inclusive: NotRequired["bool"] - """ - Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). - """ - 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 ListParams(RequestOptions): + active: NotRequired["bool"] + """ + Optional flag to filter by tax rates that are either active or inactive (archived). + """ + created: NotRequired["TaxRate.ListParamsCreated|int"] + """ + Optional range for filtering created date. + """ + 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. + """ + inclusive: NotRequired["bool"] + """ + Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). + """ + 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 ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - active: NotRequired["bool"] - """ - Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. - """ - display_name: NotRequired["str"] - """ - The display name of the tax rate, which will be shown to users. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - jurisdiction: NotRequired["str"] - """ - The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. - """ - metadata: NotRequired["Literal['']|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`. - """ - state: NotRequired["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. - """ - tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'pst', 'qst', 'rst', 'sales_tax', 'service_tax', 'vat']" - ] - """ - The high-level tax type, such as `vat` or `sales_tax`. - """ + class ModifyParams(RequestOptions): + active: NotRequired["bool"] + """ + Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + """ + display_name: NotRequired["str"] + """ + The display name of the tax rate, which will be shown to users. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + jurisdiction: NotRequired["str"] + """ + The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. + """ + metadata: NotRequired["Literal['']|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`. + """ + state: NotRequired["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. + """ + tax_type: NotRequired[ + "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'pst', 'qst', 'rst', 'sales_tax', 'service_tax', 'vat']" + ] + """ + The high-level tax type, such as `vat` or `sales_tax`. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ active: bool """ diff --git a/stripe/api_resources/terminal/configuration.py b/stripe/api_resources/terminal/configuration.py index a381f2a34..439747fc3 100644 --- a/stripe/api_resources/terminal/configuration.py +++ b/stripe/api_resources/terminal/configuration.py @@ -285,642 +285,628 @@ class VerifoneP400(StripeObject): A File ID representing an image you would like displayed on the reader. """ - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - bbpos_wisepos_e: NotRequired[ - "Configuration.CreateParamsBbposWiseposE" - ] - """ - An object containing device type specific settings for BBPOS WisePOS E readers - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - offline: NotRequired[ - "Literal['']|Configuration.CreateParamsOffline" - ] - """ - Configurations for collecting transactions offline. - """ - tipping: NotRequired[ - "Literal['']|Configuration.CreateParamsTipping" - ] - """ - Tipping configurations for readers supporting on-reader tips - """ - verifone_p400: NotRequired[ - "Configuration.CreateParamsVerifoneP400" - ] - """ - An object containing device type specific settings for Verifone P400 readers - """ - - class CreateParamsVerifoneP400(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image you would like displayed on the reader. - """ + class CreateParams(RequestOptions): + bbpos_wisepos_e: NotRequired["Configuration.CreateParamsBbposWiseposE"] + """ + An object containing device type specific settings for BBPOS WisePOS E readers + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + offline: NotRequired["Literal['']|Configuration.CreateParamsOffline"] + """ + Configurations for collecting transactions offline. + """ + tipping: NotRequired["Literal['']|Configuration.CreateParamsTipping"] + """ + Tipping configurations for readers supporting on-reader tips + """ + verifone_p400: NotRequired["Configuration.CreateParamsVerifoneP400"] + """ + An object containing device type specific settings for Verifone P400 readers + """ - class CreateParamsTipping(TypedDict): - aud: NotRequired["Configuration.CreateParamsTippingAud"] - """ - Tipping configuration for AUD - """ - cad: NotRequired["Configuration.CreateParamsTippingCad"] - """ - Tipping configuration for CAD - """ - chf: NotRequired["Configuration.CreateParamsTippingChf"] - """ - Tipping configuration for CHF - """ - czk: NotRequired["Configuration.CreateParamsTippingCzk"] - """ - Tipping configuration for CZK - """ - dkk: NotRequired["Configuration.CreateParamsTippingDkk"] - """ - Tipping configuration for DKK - """ - eur: NotRequired["Configuration.CreateParamsTippingEur"] - """ - Tipping configuration for EUR - """ - gbp: NotRequired["Configuration.CreateParamsTippingGbp"] - """ - Tipping configuration for GBP - """ - hkd: NotRequired["Configuration.CreateParamsTippingHkd"] - """ - Tipping configuration for HKD - """ - myr: NotRequired["Configuration.CreateParamsTippingMyr"] - """ - Tipping configuration for MYR - """ - nok: NotRequired["Configuration.CreateParamsTippingNok"] - """ - Tipping configuration for NOK - """ - nzd: NotRequired["Configuration.CreateParamsTippingNzd"] - """ - Tipping configuration for NZD - """ - sek: NotRequired["Configuration.CreateParamsTippingSek"] - """ - Tipping configuration for SEK - """ - sgd: NotRequired["Configuration.CreateParamsTippingSgd"] - """ - Tipping configuration for SGD - """ - usd: NotRequired["Configuration.CreateParamsTippingUsd"] - """ - Tipping configuration for USD - """ + class CreateParamsVerifoneP400(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ - class CreateParamsTippingUsd(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 CreateParamsTipping(TypedDict): + aud: NotRequired["Configuration.CreateParamsTippingAud"] + """ + Tipping configuration for AUD + """ + cad: NotRequired["Configuration.CreateParamsTippingCad"] + """ + Tipping configuration for CAD + """ + chf: NotRequired["Configuration.CreateParamsTippingChf"] + """ + Tipping configuration for CHF + """ + czk: NotRequired["Configuration.CreateParamsTippingCzk"] + """ + Tipping configuration for CZK + """ + dkk: NotRequired["Configuration.CreateParamsTippingDkk"] + """ + Tipping configuration for DKK + """ + eur: NotRequired["Configuration.CreateParamsTippingEur"] + """ + Tipping configuration for EUR + """ + gbp: NotRequired["Configuration.CreateParamsTippingGbp"] + """ + Tipping configuration for GBP + """ + hkd: NotRequired["Configuration.CreateParamsTippingHkd"] + """ + Tipping configuration for HKD + """ + myr: NotRequired["Configuration.CreateParamsTippingMyr"] + """ + Tipping configuration for MYR + """ + nok: NotRequired["Configuration.CreateParamsTippingNok"] + """ + Tipping configuration for NOK + """ + nzd: NotRequired["Configuration.CreateParamsTippingNzd"] + """ + Tipping configuration for NZD + """ + sek: NotRequired["Configuration.CreateParamsTippingSek"] + """ + Tipping configuration for SEK + """ + sgd: NotRequired["Configuration.CreateParamsTippingSgd"] + """ + Tipping configuration for SGD + """ + usd: NotRequired["Configuration.CreateParamsTippingUsd"] + """ + Tipping configuration for USD + """ - class CreateParamsTippingSgd(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 CreateParamsTippingUsd(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]"] - """ - 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 CreateParamsTippingSgd(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 CreateParamsTippingNzd(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]"] + """ + 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 CreateParamsTippingNok(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 CreateParamsTippingNzd(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 CreateParamsTippingMyr(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 CreateParamsTippingNok(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 CreateParamsTippingHkd(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 CreateParamsTippingMyr(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 CreateParamsTippingGbp(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 CreateParamsTippingHkd(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 CreateParamsTippingEur(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 CreateParamsTippingGbp(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 CreateParamsTippingDkk(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 CreateParamsTippingEur(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 CreateParamsTippingCzk(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 CreateParamsTippingDkk(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 CreateParamsTippingChf(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 CreateParamsTippingCzk(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 CreateParamsTippingCad(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 CreateParamsTippingChf(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 CreateParamsTippingAud(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 CreateParamsTippingCad(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 CreateParamsOffline(TypedDict): - enabled: bool - """ - Determines whether to allow transactions to be collected while reader is offline. Defaults to false. - """ + class CreateParamsTippingAud(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 CreateParamsBbposWiseposE(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image you would like displayed on the reader. - """ + class CreateParamsOffline(TypedDict): + enabled: bool + """ + Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + """ - class DeleteParams(RequestOptions): - pass + class CreateParamsBbposWiseposE(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ - 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. - """ - is_account_default: NotRequired["bool"] - """ - if present, only return the account default or non-default configurations. - """ - 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 DeleteParams(RequestOptions): + pass - class ModifyParams(RequestOptions): - bbpos_wisepos_e: NotRequired[ - "Literal['']|Configuration.ModifyParamsBbposWiseposE" - ] - """ - An object containing device type specific settings for BBPOS WisePOS E readers - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - offline: NotRequired[ - "Literal['']|Configuration.ModifyParamsOffline" - ] - """ - Configurations for collecting transactions offline. - """ - tipping: NotRequired[ - "Literal['']|Configuration.ModifyParamsTipping" - ] - """ - Tipping configurations for readers supporting on-reader tips - """ - verifone_p400: NotRequired[ - "Literal['']|Configuration.ModifyParamsVerifoneP400" - ] - """ - An object containing device type specific settings for Verifone P400 readers - """ + 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. + """ + is_account_default: NotRequired["bool"] + """ + if present, only return the account default or non-default configurations. + """ + 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 ModifyParamsVerifoneP400(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image you would like displayed on the reader. - """ + class ModifyParams(RequestOptions): + bbpos_wisepos_e: NotRequired[ + "Literal['']|Configuration.ModifyParamsBbposWiseposE" + ] + """ + An object containing device type specific settings for BBPOS WisePOS E readers + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + offline: NotRequired["Literal['']|Configuration.ModifyParamsOffline"] + """ + Configurations for collecting transactions offline. + """ + tipping: NotRequired["Literal['']|Configuration.ModifyParamsTipping"] + """ + Tipping configurations for readers supporting on-reader tips + """ + verifone_p400: NotRequired[ + "Literal['']|Configuration.ModifyParamsVerifoneP400" + ] + """ + An object containing device type specific settings for Verifone P400 readers + """ - class ModifyParamsTipping(TypedDict): - aud: NotRequired["Configuration.ModifyParamsTippingAud"] - """ - Tipping configuration for AUD - """ - cad: NotRequired["Configuration.ModifyParamsTippingCad"] - """ - Tipping configuration for CAD - """ - chf: NotRequired["Configuration.ModifyParamsTippingChf"] - """ - Tipping configuration for CHF - """ - czk: NotRequired["Configuration.ModifyParamsTippingCzk"] - """ - Tipping configuration for CZK - """ - dkk: NotRequired["Configuration.ModifyParamsTippingDkk"] - """ - Tipping configuration for DKK - """ - eur: NotRequired["Configuration.ModifyParamsTippingEur"] - """ - Tipping configuration for EUR - """ - gbp: NotRequired["Configuration.ModifyParamsTippingGbp"] - """ - Tipping configuration for GBP - """ - hkd: NotRequired["Configuration.ModifyParamsTippingHkd"] - """ - Tipping configuration for HKD - """ - myr: NotRequired["Configuration.ModifyParamsTippingMyr"] - """ - Tipping configuration for MYR - """ - nok: NotRequired["Configuration.ModifyParamsTippingNok"] - """ - Tipping configuration for NOK - """ - nzd: NotRequired["Configuration.ModifyParamsTippingNzd"] - """ - Tipping configuration for NZD - """ - sek: NotRequired["Configuration.ModifyParamsTippingSek"] - """ - Tipping configuration for SEK - """ - sgd: NotRequired["Configuration.ModifyParamsTippingSgd"] - """ - Tipping configuration for SGD - """ - usd: NotRequired["Configuration.ModifyParamsTippingUsd"] - """ - Tipping configuration for USD - """ + class ModifyParamsVerifoneP400(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ - class ModifyParamsTippingUsd(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 ModifyParamsTipping(TypedDict): + aud: NotRequired["Configuration.ModifyParamsTippingAud"] + """ + Tipping configuration for AUD + """ + cad: NotRequired["Configuration.ModifyParamsTippingCad"] + """ + Tipping configuration for CAD + """ + chf: NotRequired["Configuration.ModifyParamsTippingChf"] + """ + Tipping configuration for CHF + """ + czk: NotRequired["Configuration.ModifyParamsTippingCzk"] + """ + Tipping configuration for CZK + """ + dkk: NotRequired["Configuration.ModifyParamsTippingDkk"] + """ + Tipping configuration for DKK + """ + eur: NotRequired["Configuration.ModifyParamsTippingEur"] + """ + Tipping configuration for EUR + """ + gbp: NotRequired["Configuration.ModifyParamsTippingGbp"] + """ + Tipping configuration for GBP + """ + hkd: NotRequired["Configuration.ModifyParamsTippingHkd"] + """ + Tipping configuration for HKD + """ + myr: NotRequired["Configuration.ModifyParamsTippingMyr"] + """ + Tipping configuration for MYR + """ + nok: NotRequired["Configuration.ModifyParamsTippingNok"] + """ + Tipping configuration for NOK + """ + nzd: NotRequired["Configuration.ModifyParamsTippingNzd"] + """ + Tipping configuration for NZD + """ + sek: NotRequired["Configuration.ModifyParamsTippingSek"] + """ + Tipping configuration for SEK + """ + sgd: NotRequired["Configuration.ModifyParamsTippingSgd"] + """ + Tipping configuration for SGD + """ + usd: NotRequired["Configuration.ModifyParamsTippingUsd"] + """ + Tipping configuration for USD + """ - class ModifyParamsTippingSgd(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 ModifyParamsTippingUsd(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]"] - """ - 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 ModifyParamsTippingSgd(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 ModifyParamsTippingNzd(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]"] + """ + 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 ModifyParamsTippingNok(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 ModifyParamsTippingNzd(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 ModifyParamsTippingMyr(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 ModifyParamsTippingNok(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 ModifyParamsTippingHkd(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 ModifyParamsTippingMyr(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 ModifyParamsTippingGbp(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 ModifyParamsTippingHkd(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 ModifyParamsTippingEur(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 ModifyParamsTippingGbp(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 ModifyParamsTippingDkk(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 ModifyParamsTippingEur(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 ModifyParamsTippingCzk(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 ModifyParamsTippingDkk(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 ModifyParamsTippingChf(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 ModifyParamsTippingCzk(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 ModifyParamsTippingCad(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 ModifyParamsTippingChf(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 ModifyParamsTippingAud(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 ModifyParamsTippingCad(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 ModifyParamsOffline(TypedDict): - enabled: bool - """ - Determines whether to allow transactions to be collected while reader is offline. Defaults to false. - """ + class ModifyParamsTippingAud(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 ModifyParamsBbposWiseposE(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image you would like displayed on the reader. - """ + class ModifyParamsOffline(TypedDict): + enabled: bool + """ + Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ModifyParamsBbposWiseposE(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ + + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ bbpos_wisepos_e: Optional[BbposWiseposE] id: str diff --git a/stripe/api_resources/terminal/connection_token.py b/stripe/api_resources/terminal/connection_token.py index 561430482..b1e9eba54 100644 --- a/stripe/api_resources/terminal/connection_token.py +++ b/stripe/api_resources/terminal/connection_token.py @@ -3,7 +3,7 @@ from stripe.api_resources.abstract import CreateableAPIResource from stripe.request_options import RequestOptions from typing import ClassVar, List, Optional, cast -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing_extensions import Literal, NotRequired, Unpack class ConnectionToken(CreateableAPIResource["ConnectionToken"]): @@ -16,17 +16,16 @@ class ConnectionToken(CreateableAPIResource["ConnectionToken"]): OBJECT_NAME: ClassVar[ Literal["terminal.connection_token"] ] = "terminal.connection_token" - if TYPE_CHECKING: - class CreateParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - location: NotRequired["str"] - """ - The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). - """ + class CreateParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + location: NotRequired["str"] + """ + The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). + """ location: Optional[str] """ diff --git a/stripe/api_resources/terminal/location.py b/stripe/api_resources/terminal/location.py index c77d267dc..1c5545061 100644 --- a/stripe/api_resources/terminal/location.py +++ b/stripe/api_resources/terminal/location.py @@ -11,13 +11,7 @@ from stripe.stripe_object import StripeObject from stripe.util import class_method_variant from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, NotRequired, TypedDict, Unpack from urllib.parse import quote_plus @@ -61,130 +55,128 @@ class Address(StripeObject): State, county, province, or region. """ - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - address: "Location.CreateParamsAddress" - """ - The full address of the location. - """ - configuration_overrides: NotRequired["str"] - """ - The ID of a configuration that will be used to customize all readers in this location. - """ - display_name: str - """ - A name for the location. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ + class CreateParams(RequestOptions): + address: "Location.CreateParamsAddress" + """ + The full address of the location. + """ + configuration_overrides: NotRequired["str"] + """ + The ID of a configuration that will be used to customize all readers in this location. + """ + display_name: str + """ + A name for the location. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ - class CreateParamsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: str - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: str + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class DeleteParams(RequestOptions): - pass + class DeleteParams(RequestOptions): + pass - 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. - """ + 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. + """ - class ModifyParams(RequestOptions): - address: NotRequired["Location.ModifyParamsAddress"] - """ - The full address of the location. - """ - configuration_overrides: NotRequired["Literal['']|str"] - """ - The ID of a configuration that will be used to customize all readers in this location. - """ - display_name: NotRequired["str"] - """ - A name for the location. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ + class ModifyParams(RequestOptions): + address: NotRequired["Location.ModifyParamsAddress"] + """ + The full address of the location. + """ + configuration_overrides: NotRequired["Literal['']|str"] + """ + The ID of a configuration that will be used to customize all readers in this location. + """ + display_name: NotRequired["str"] + """ + A name for the location. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ - class ModifyParamsAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class ModifyParamsAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ address: Address configuration_overrides: Optional[str] diff --git a/stripe/api_resources/terminal/reader.py b/stripe/api_resources/terminal/reader.py index 576db1396..0142e3c44 100644 --- a/stripe/api_resources/terminal/reader.py +++ b/stripe/api_resources/terminal/reader.py @@ -217,265 +217,263 @@ class LineItem(StripeObject): "set_reader_display": SetReaderDisplay, } - if TYPE_CHECKING: - - class CancelActionParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class CancelActionParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CreateParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - label: NotRequired["str"] - """ - Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. - """ - location: NotRequired["str"] - """ - The location to assign the reader to. - """ - metadata: NotRequired["Literal['']|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`. - """ - registration_code: str - """ - A code generated by the reader used for registering to an account. - """ + class CreateParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + label: NotRequired["str"] + """ + Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. + """ + location: NotRequired["str"] + """ + The location to assign the reader to. + """ + metadata: NotRequired["Literal['']|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`. + """ + registration_code: str + """ + A code generated by the reader used for registering to an account. + """ - class DeleteParams(RequestOptions): - pass + class DeleteParams(RequestOptions): + pass - class ListParams(RequestOptions): - device_type: NotRequired[ - "Literal['bbpos_chipper2x', 'bbpos_wisepad3', 'bbpos_wisepos_e', 'simulated_wisepos_e', 'stripe_m2', 'verifone_P400']" - ] - """ - Filters readers by device type - """ - 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. - """ - location: NotRequired["str"] - """ - A location ID to filter the response list to only readers at the specific location - """ - serial_number: NotRequired["str"] - """ - Filters readers by serial number - """ - 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['offline', 'online']"] - """ - A status filter to filter readers to only offline or online readers - """ + class ListParams(RequestOptions): + device_type: NotRequired[ + "Literal['bbpos_chipper2x', 'bbpos_wisepad3', 'bbpos_wisepos_e', 'simulated_wisepos_e', 'stripe_m2', 'verifone_P400']" + ] + """ + Filters readers by device type + """ + 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. + """ + location: NotRequired["str"] + """ + A location ID to filter the response list to only readers at the specific location + """ + serial_number: NotRequired["str"] + """ + Filters readers by serial number + """ + 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['offline', 'online']"] + """ + A status filter to filter readers to only offline or online readers + """ - class ModifyParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - label: NotRequired["Literal['']|str"] - """ - The new label of the reader. - """ - metadata: NotRequired["Literal['']|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`. - """ + class ModifyParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + label: NotRequired["Literal['']|str"] + """ + The new label of the reader. + """ + metadata: NotRequired["Literal['']|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`. + """ - class ProcessPaymentIntentParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - payment_intent: str - """ - PaymentIntent ID - """ - process_config: NotRequired[ - "Reader.ProcessPaymentIntentParamsProcessConfig" - ] - """ - Configuration overrides - """ + class ProcessPaymentIntentParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + payment_intent: str + """ + PaymentIntent ID + """ + process_config: NotRequired[ + "Reader.ProcessPaymentIntentParamsProcessConfig" + ] + """ + Configuration overrides + """ - class ProcessPaymentIntentParamsProcessConfig(TypedDict): - skip_tipping: NotRequired["bool"] - """ - Override showing a tipping selection screen on this transaction. - """ - tipping: NotRequired[ - "Reader.ProcessPaymentIntentParamsProcessConfigTipping" - ] - """ - Tipping configuration for this transaction. - """ + class ProcessPaymentIntentParamsProcessConfig(TypedDict): + skip_tipping: NotRequired["bool"] + """ + Override showing a tipping selection screen on this transaction. + """ + tipping: NotRequired[ + "Reader.ProcessPaymentIntentParamsProcessConfigTipping" + ] + """ + Tipping configuration for this transaction. + """ - class ProcessPaymentIntentParamsProcessConfigTipping(TypedDict): - amount_eligible: NotRequired["int"] - """ - Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). - """ + class ProcessPaymentIntentParamsProcessConfigTipping(TypedDict): + amount_eligible: NotRequired["int"] + """ + Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + """ - class ProcessSetupIntentParams(RequestOptions): - customer_consent_collected: bool - """ - Customer Consent Collected - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - process_config: NotRequired[ - "Reader.ProcessSetupIntentParamsProcessConfig" - ] - """ - Configuration overrides - """ - setup_intent: str - """ - SetupIntent ID - """ + class ProcessSetupIntentParams(RequestOptions): + customer_consent_collected: bool + """ + Customer Consent Collected + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + process_config: NotRequired[ + "Reader.ProcessSetupIntentParamsProcessConfig" + ] + """ + Configuration overrides + """ + setup_intent: str + """ + SetupIntent ID + """ - class ProcessSetupIntentParamsProcessConfig(TypedDict): - pass + class ProcessSetupIntentParamsProcessConfig(TypedDict): + pass - class RefundPaymentParams(RequestOptions): - amount: NotRequired["int"] - """ - A positive integer in __cents__ representing how much of this charge to refund. - """ - charge: NotRequired["str"] - """ - ID of the Charge to refund. - """ - expand: NotRequired["List[str]"] - """ - 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_intent: NotRequired["str"] - """ - ID of the PaymentIntent to refund. - """ - refund_application_fee: NotRequired["bool"] - """ - Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. - """ - reverse_transfer: NotRequired["bool"] - """ - Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. - """ + class RefundPaymentParams(RequestOptions): + amount: NotRequired["int"] + """ + A positive integer in __cents__ representing how much of this charge to refund. + """ + charge: NotRequired["str"] + """ + ID of the Charge to refund. + """ + expand: NotRequired["List[str]"] + """ + 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_intent: NotRequired["str"] + """ + ID of the PaymentIntent to refund. + """ + refund_application_fee: NotRequired["bool"] + """ + Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + """ + reverse_transfer: NotRequired["bool"] + """ + Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class SetReaderDisplayParams(RequestOptions): - cart: NotRequired["Reader.SetReaderDisplayParamsCart"] - """ - Cart - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - type: Literal["cart"] - """ - Type - """ + class SetReaderDisplayParams(RequestOptions): + cart: NotRequired["Reader.SetReaderDisplayParamsCart"] + """ + Cart + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + type: Literal["cart"] + """ + Type + """ - class SetReaderDisplayParamsCart(TypedDict): - 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). - """ - line_items: List["Reader.SetReaderDisplayParamsCartLineItem"] - """ - Array of line items that were purchased. - """ - tax: NotRequired["int"] - """ - The amount of tax in cents. - """ - total: int - """ - Total balance of cart due in cents. - """ + class SetReaderDisplayParamsCart(TypedDict): + 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). + """ + line_items: List["Reader.SetReaderDisplayParamsCartLineItem"] + """ + Array of line items that were purchased. + """ + tax: NotRequired["int"] + """ + The amount of tax in cents. + """ + total: int + """ + Total balance of cart due in cents. + """ - class SetReaderDisplayParamsCartLineItem(TypedDict): - amount: int - """ - The price of the item in cents. - """ - description: str - """ - The description or name of the item. - """ - quantity: int - """ - The quantity of the line item being purchased. - """ + class SetReaderDisplayParamsCartLineItem(TypedDict): + amount: int + """ + The price of the item in cents. + """ + description: str + """ + The description or name of the item. + """ + quantity: int + """ + The quantity of the line item being purchased. + """ - class PresentPaymentMethodParams(RequestOptions): - amount_tip: NotRequired["int"] - """ - Simulated on-reader tip amount. - """ - card_present: NotRequired[ - "Reader.PresentPaymentMethodParamsCardPresent" - ] - """ - Simulated data for the card_present payment method. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - interac_present: NotRequired[ - "Reader.PresentPaymentMethodParamsInteracPresent" - ] - """ - Simulated data for the interac_present payment method. - """ - type: NotRequired["Literal['card_present', 'interac_present']"] - """ - Simulated payment type. - """ + class PresentPaymentMethodParams(RequestOptions): + amount_tip: NotRequired["int"] + """ + Simulated on-reader tip amount. + """ + card_present: NotRequired[ + "Reader.PresentPaymentMethodParamsCardPresent" + ] + """ + Simulated data for the card_present payment method. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + interac_present: NotRequired[ + "Reader.PresentPaymentMethodParamsInteracPresent" + ] + """ + Simulated data for the interac_present payment method. + """ + type: NotRequired["Literal['card_present', 'interac_present']"] + """ + Simulated payment type. + """ - class PresentPaymentMethodParamsInteracPresent(TypedDict): - number: NotRequired["str"] - """ - Card Number - """ + class PresentPaymentMethodParamsInteracPresent(TypedDict): + number: NotRequired["str"] + """ + Card Number + """ - class PresentPaymentMethodParamsCardPresent(TypedDict): - number: NotRequired["str"] - """ - The card number, as a string without any separators. - """ + class PresentPaymentMethodParamsCardPresent(TypedDict): + number: NotRequired["str"] + """ + The card number, as a string without any separators. + """ action: Optional[Action] """ diff --git a/stripe/api_resources/test_helpers/test_clock.py b/stripe/api_resources/test_helpers/test_clock.py index c8616ef1c..8de0e3984 100644 --- a/stripe/api_resources/test_helpers/test_clock.py +++ b/stripe/api_resources/test_helpers/test_clock.py @@ -10,7 +10,7 @@ from stripe.request_options import RequestOptions from stripe.util import class_method_variant from typing import ClassVar, List, Optional, cast, overload -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing_extensions import Literal, NotRequired, Unpack from urllib.parse import quote_plus @@ -28,58 +28,57 @@ class TestClock( OBJECT_NAME: ClassVar[ Literal["test_helpers.test_clock"] ] = "test_helpers.test_clock" - if TYPE_CHECKING: - class AdvanceParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - frozen_time: int - """ - The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. - """ + class AdvanceParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + frozen_time: int + """ + The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. + """ - class CreateParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - frozen_time: int - """ - The initial frozen time for this test clock. - """ - name: NotRequired["str"] - """ - The name for this test clock. - """ + class CreateParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + frozen_time: int + """ + The initial frozen time for this test clock. + """ + name: NotRequired["str"] + """ + The name for this test clock. + """ - class DeleteParams(RequestOptions): - pass + class DeleteParams(RequestOptions): + pass - 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. - """ + 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. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ created: int """ diff --git a/stripe/api_resources/token.py b/stripe/api_resources/token.py index c8498fe6f..9f18da539 100644 --- a/stripe/api_resources/token.py +++ b/stripe/api_resources/token.py @@ -41,991 +41,984 @@ class Token(CreateableAPIResource["Token"]): """ OBJECT_NAME: ClassVar[Literal["token"]] = "token" - if TYPE_CHECKING: - class CreateParams(RequestOptions): - account: NotRequired["Token.CreateParamsAccount"] - """ - Information for the account this token represents. - """ - bank_account: NotRequired["Token.CreateParamsBankAccount"] - """ - The bank account this token will represent. - """ - card: NotRequired["Token.CreateParamsCard|str"] - """ - The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below. - """ - customer: NotRequired["str"] - """ - Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). - """ - cvc_update: NotRequired["Token.CreateParamsCvcUpdate"] - """ - The updated CVC value this token represents. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - person: NotRequired["Token.CreateParamsPerson"] - """ - Information for the person this token represents. - """ - pii: NotRequired["Token.CreateParamsPii"] - """ - The PII this token represents. - """ + class CreateParams(RequestOptions): + account: NotRequired["Token.CreateParamsAccount"] + """ + Information for the account this token represents. + """ + bank_account: NotRequired["Token.CreateParamsBankAccount"] + """ + The bank account this token will represent. + """ + card: NotRequired["Token.CreateParamsCard|str"] + """ + The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below. + """ + customer: NotRequired["str"] + """ + Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). + """ + cvc_update: NotRequired["Token.CreateParamsCvcUpdate"] + """ + The updated CVC value this token represents. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + person: NotRequired["Token.CreateParamsPerson"] + """ + Information for the person this token represents. + """ + pii: NotRequired["Token.CreateParamsPii"] + """ + The PII this token represents. + """ - class CreateParamsPii(TypedDict): - id_number: NotRequired["str"] - """ - The `id_number` for the PII, in string form. - """ + class CreateParamsPii(TypedDict): + id_number: NotRequired["str"] + """ + The `id_number` for the PII, in string form. + """ - class CreateParamsPerson(TypedDict): - additional_tos_acceptances: NotRequired[ - "Token.CreateParamsPersonAdditionalTosAcceptances" - ] - """ - Details on the legal guardian's acceptance of the required Stripe agreements. - """ - address: NotRequired["Token.CreateParamsPersonAddress"] - """ - The person's address. - """ - address_kana: NotRequired["Token.CreateParamsPersonAddressKana"] - """ - The Kana variation of the person's address (Japan only). - """ - address_kanji: NotRequired["Token.CreateParamsPersonAddressKanji"] - """ - The Kanji variation of the person's address (Japan only). - """ - dob: NotRequired["Literal['']|Token.CreateParamsPersonDob"] - """ - The person's date of birth. - """ - documents: NotRequired["Token.CreateParamsPersonDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired["str"] - """ - The person's email address. - """ - first_name: NotRequired["str"] - """ - The person's first name. - """ - first_name_kana: NotRequired["str"] - """ - The Kana variation of the person's first name (Japan only). - """ - first_name_kanji: NotRequired["str"] - """ - The Kanji variation of the person's first name (Japan only). - """ - full_name_aliases: NotRequired["Literal['']|List[str]"] - """ - A list of alternate names or aliases that the person is known by. - """ - gender: NotRequired["str"] - """ - The person's gender (International regulations require either "male" or "female"). - """ - id_number: NotRequired["str"] - """ - The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). - """ - id_number_secondary: NotRequired["str"] - """ - The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). - """ - last_name: NotRequired["str"] - """ - The person's last name. - """ - last_name_kana: NotRequired["str"] - """ - The Kana variation of the person's last name (Japan only). - """ - last_name_kanji: NotRequired["str"] - """ - The Kanji variation of the person's last name (Japan only). - """ - maiden_name: NotRequired["str"] - """ - The person's maiden name. - """ - metadata: NotRequired["Literal['']|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`. - """ - nationality: NotRequired["str"] - """ - The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. - """ - phone: NotRequired["str"] - """ - The person's phone number. - """ - political_exposure: NotRequired["str"] - """ - Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - """ - registered_address: NotRequired[ - "Token.CreateParamsPersonRegisteredAddress" - ] - """ - The person's registered address. - """ - relationship: NotRequired["Token.CreateParamsPersonRelationship"] - """ - The relationship that this person has with the account's legal entity. - """ - ssn_last_4: NotRequired["str"] - """ - The last four digits of the person's Social Security number (U.S. only). - """ - verification: NotRequired["Token.CreateParamsPersonVerification"] - """ - The person's verification status. - """ + class CreateParamsPerson(TypedDict): + additional_tos_acceptances: NotRequired[ + "Token.CreateParamsPersonAdditionalTosAcceptances" + ] + """ + Details on the legal guardian's acceptance of the required Stripe agreements. + """ + address: NotRequired["Token.CreateParamsPersonAddress"] + """ + The person's address. + """ + address_kana: NotRequired["Token.CreateParamsPersonAddressKana"] + """ + The Kana variation of the person's address (Japan only). + """ + address_kanji: NotRequired["Token.CreateParamsPersonAddressKanji"] + """ + The Kanji variation of the person's address (Japan only). + """ + dob: NotRequired["Literal['']|Token.CreateParamsPersonDob"] + """ + The person's date of birth. + """ + documents: NotRequired["Token.CreateParamsPersonDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired["str"] + """ + The person's email address. + """ + first_name: NotRequired["str"] + """ + The person's first name. + """ + first_name_kana: NotRequired["str"] + """ + The Kana variation of the person's first name (Japan only). + """ + first_name_kanji: NotRequired["str"] + """ + The Kanji variation of the person's first name (Japan only). + """ + full_name_aliases: NotRequired["Literal['']|List[str]"] + """ + A list of alternate names or aliases that the person is known by. + """ + gender: NotRequired["str"] + """ + The person's gender (International regulations require either "male" or "female"). + """ + id_number: NotRequired["str"] + """ + The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). + """ + id_number_secondary: NotRequired["str"] + """ + The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). + """ + last_name: NotRequired["str"] + """ + The person's last name. + """ + last_name_kana: NotRequired["str"] + """ + The Kana variation of the person's last name (Japan only). + """ + last_name_kanji: NotRequired["str"] + """ + The Kanji variation of the person's last name (Japan only). + """ + maiden_name: NotRequired["str"] + """ + The person's maiden name. + """ + metadata: NotRequired["Literal['']|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`. + """ + nationality: NotRequired["str"] + """ + The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. + """ + phone: NotRequired["str"] + """ + The person's phone number. + """ + political_exposure: NotRequired["str"] + """ + Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + """ + registered_address: NotRequired[ + "Token.CreateParamsPersonRegisteredAddress" + ] + """ + The person's registered address. + """ + relationship: NotRequired["Token.CreateParamsPersonRelationship"] + """ + The relationship that this person has with the account's legal entity. + """ + ssn_last_4: NotRequired["str"] + """ + The last four digits of the person's Social Security number (U.S. only). + """ + verification: NotRequired["Token.CreateParamsPersonVerification"] + """ + The person's verification status. + """ - class CreateParamsPersonVerification(TypedDict): - additional_document: NotRequired[ - "Token.CreateParamsPersonVerificationAdditionalDocument" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - document: NotRequired[ - "Token.CreateParamsPersonVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ + class CreateParamsPersonVerification(TypedDict): + additional_document: NotRequired[ + "Token.CreateParamsPersonVerificationAdditionalDocument" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + document: NotRequired["Token.CreateParamsPersonVerificationDocument"] + """ + An identifying document, either a passport or local ID card. + """ - class CreateParamsPersonVerificationDocument(TypedDict): - back: NotRequired["str"] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired["str"] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ + class CreateParamsPersonVerificationDocument(TypedDict): + back: NotRequired["str"] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired["str"] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ - class CreateParamsPersonVerificationAdditionalDocument(TypedDict): - back: NotRequired["str"] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired["str"] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ + class CreateParamsPersonVerificationAdditionalDocument(TypedDict): + back: NotRequired["str"] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired["str"] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ - class CreateParamsPersonRelationship(TypedDict): - 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. - """ - executive: NotRequired["bool"] - """ - Whether the person has significant responsibility to control, manage, or direct the organization. - """ - legal_guardian: NotRequired["bool"] - """ - Whether the person is the legal guardian of the account's representative. - """ - owner: NotRequired["bool"] - """ - Whether the person is an owner of the account's legal entity. - """ - percent_ownership: NotRequired["Literal['']|float"] - """ - The percent owned by the person of the account's legal entity. - """ - representative: NotRequired["bool"] - """ - Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. - """ - title: NotRequired["str"] - """ - The person's title (e.g., CEO, Support Engineer). - """ + class CreateParamsPersonRelationship(TypedDict): + 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. + """ + executive: NotRequired["bool"] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ + legal_guardian: NotRequired["bool"] + """ + Whether the person is the legal guardian of the account's representative. + """ + owner: NotRequired["bool"] + """ + Whether the person is an owner of the account's legal entity. + """ + percent_ownership: NotRequired["Literal['']|float"] + """ + The percent owned by the person of the account's legal entity. + """ + representative: NotRequired["bool"] + """ + Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + """ + title: NotRequired["str"] + """ + The person's title (e.g., CEO, Support Engineer). + """ - class CreateParamsPersonRegisteredAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsPersonRegisteredAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreateParamsPersonDocuments(TypedDict): - company_authorization: NotRequired[ - "Token.CreateParamsPersonDocumentsCompanyAuthorization" - ] - """ - One or more documents that demonstrate proof that this person is authorized to represent the company. - """ - passport: NotRequired["Token.CreateParamsPersonDocumentsPassport"] - """ - One or more documents showing the person's passport page with photo and personal data. - """ - visa: NotRequired["Token.CreateParamsPersonDocumentsVisa"] - """ - One or more documents showing the person's visa required for living in the country where they are residing. - """ + class CreateParamsPersonDocuments(TypedDict): + company_authorization: NotRequired[ + "Token.CreateParamsPersonDocumentsCompanyAuthorization" + ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ + passport: NotRequired["Token.CreateParamsPersonDocumentsPassport"] + """ + One or more documents showing the person's passport page with photo and personal data. + """ + visa: NotRequired["Token.CreateParamsPersonDocumentsVisa"] + """ + One or more documents showing the person's visa required for living in the country where they are residing. + """ - class CreateParamsPersonDocumentsVisa(TypedDict): - files: NotRequired["List[str]"] - """ - 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 CreateParamsPersonDocumentsVisa(TypedDict): + files: NotRequired["List[str]"] + """ + 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 CreateParamsPersonDocumentsPassport(TypedDict): - files: NotRequired["List[str]"] - """ - 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 CreateParamsPersonDocumentsPassport(TypedDict): + files: NotRequired["List[str]"] + """ + 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 CreateParamsPersonDocumentsCompanyAuthorization(TypedDict): - files: NotRequired["List[str]"] - """ - 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 CreateParamsPersonDocumentsCompanyAuthorization(TypedDict): + files: NotRequired["List[str]"] + """ + 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 CreateParamsPersonDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ + class CreateParamsPersonDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ - class CreateParamsPersonAddressKanji(TypedDict): - city: NotRequired["str"] - """ - City or ward. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Block or building number. - """ - line2: NotRequired["str"] - """ - Building details. - """ - postal_code: NotRequired["str"] - """ - Postal code. - """ - state: NotRequired["str"] - """ - Prefecture. - """ - town: NotRequired["str"] - """ - Town or cho-me. - """ + class CreateParamsPersonAddressKanji(TypedDict): + city: NotRequired["str"] + """ + City or ward. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Block or building number. + """ + line2: NotRequired["str"] + """ + Building details. + """ + postal_code: NotRequired["str"] + """ + Postal code. + """ + state: NotRequired["str"] + """ + Prefecture. + """ + town: NotRequired["str"] + """ + Town or cho-me. + """ - class CreateParamsPersonAddressKana(TypedDict): - city: NotRequired["str"] - """ - City or ward. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Block or building number. - """ - line2: NotRequired["str"] - """ - Building details. - """ - postal_code: NotRequired["str"] - """ - Postal code. - """ - state: NotRequired["str"] - """ - Prefecture. - """ - town: NotRequired["str"] - """ - Town or cho-me. - """ + class CreateParamsPersonAddressKana(TypedDict): + city: NotRequired["str"] + """ + City or ward. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Block or building number. + """ + line2: NotRequired["str"] + """ + Building details. + """ + postal_code: NotRequired["str"] + """ + Postal code. + """ + state: NotRequired["str"] + """ + Prefecture. + """ + town: NotRequired["str"] + """ + Town or cho-me. + """ - class CreateParamsPersonAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsPersonAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreateParamsPersonAdditionalTosAcceptances(TypedDict): - account: NotRequired[ - "Token.CreateParamsPersonAdditionalTosAcceptancesAccount" - ] - """ - Details on the legal guardian's acceptance of the main Stripe service agreement. - """ + class CreateParamsPersonAdditionalTosAcceptances(TypedDict): + account: NotRequired[ + "Token.CreateParamsPersonAdditionalTosAcceptancesAccount" + ] + """ + Details on the legal guardian's acceptance of the main Stripe service agreement. + """ - class CreateParamsPersonAdditionalTosAcceptancesAccount(TypedDict): - date: NotRequired["int"] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired["str"] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ + class CreateParamsPersonAdditionalTosAcceptancesAccount(TypedDict): + date: NotRequired["int"] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ + ip: NotRequired["str"] + """ + The IP address from which the account representative accepted the service agreement. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ - class CreateParamsCvcUpdate(TypedDict): - cvc: str - """ - The CVC value, in string form. - """ + class CreateParamsCvcUpdate(TypedDict): + cvc: str + """ + The CVC value, in string form. + """ - class CreateParamsCard(TypedDict): - address_city: NotRequired["str"] - """ - City / District / Suburb / Town / Village. - """ - address_country: NotRequired["str"] - """ - Billing address country, if provided. - """ - address_line1: NotRequired["str"] - """ - Address line 1 (Street address / PO Box / Company name). - """ - address_line2: NotRequired["str"] - """ - Address line 2 (Apartment / Suite / Unit / Building). - """ - address_state: NotRequired["str"] - """ - State / County / Province / Region. - """ - address_zip: NotRequired["str"] - """ - ZIP or postal code. - """ - currency: NotRequired["str"] - """ - Required in order to add the card to an account; in all other cases, this parameter is not used. When added to an account, the card (which must be a debit card) can be used as a transfer destination for funds in this currency. - """ - cvc: NotRequired["str"] - """ - Card security code. Highly recommended to always include this value. - """ - exp_month: str - """ - Two-digit number representing the card's expiration month. - """ - exp_year: str - """ - Two- or four-digit number representing the card's expiration year. - """ - name: NotRequired["str"] - """ - Cardholder's full name. - """ - number: str - """ - The card number, as a string without any separators. - """ + class CreateParamsCard(TypedDict): + address_city: NotRequired["str"] + """ + City / District / Suburb / Town / Village. + """ + address_country: NotRequired["str"] + """ + Billing address country, if provided. + """ + address_line1: NotRequired["str"] + """ + Address line 1 (Street address / PO Box / Company name). + """ + address_line2: NotRequired["str"] + """ + Address line 2 (Apartment / Suite / Unit / Building). + """ + address_state: NotRequired["str"] + """ + State / County / Province / Region. + """ + address_zip: NotRequired["str"] + """ + ZIP or postal code. + """ + currency: NotRequired["str"] + """ + Required in order to add the card to an account; in all other cases, this parameter is not used. When added to an account, the card (which must be a debit card) can be used as a transfer destination for funds in this currency. + """ + cvc: NotRequired["str"] + """ + Card security code. Highly recommended to always include this value. + """ + exp_month: str + """ + Two-digit number representing the card's expiration month. + """ + exp_year: str + """ + Two- or four-digit number representing the card's expiration year. + """ + name: NotRequired["str"] + """ + Cardholder's full name. + """ + number: str + """ + The card number, as a string without any separators. + """ - class CreateParamsBankAccount(TypedDict): - account_holder_name: NotRequired["str"] - """ - The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. - """ - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. - """ - account_number: str - """ - The account number for the bank account, in string form. Must be a checking account. - """ - account_type: NotRequired[ - "Literal['checking', 'futsu', 'savings', 'toza']" - ] - """ - The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. - """ - country: str - """ - The country in which the bank account is located. - """ - currency: NotRequired["str"] - """ - The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](https://stripe.com/docs/payouts) - """ - routing_number: NotRequired["str"] - """ - The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required. - """ + class CreateParamsBankAccount(TypedDict): + account_holder_name: NotRequired["str"] + """ + The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. + """ + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + """ + account_number: str + """ + The account number for the bank account, in string form. Must be a checking account. + """ + account_type: NotRequired[ + "Literal['checking', 'futsu', 'savings', 'toza']" + ] + """ + The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + """ + country: str + """ + The country in which the bank account is located. + """ + currency: NotRequired["str"] + """ + The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](https://stripe.com/docs/payouts) + """ + routing_number: NotRequired["str"] + """ + The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required. + """ - class CreateParamsAccount(TypedDict): - business_type: NotRequired[ - "Literal['company', 'government_entity', 'individual', 'non_profit']" - ] - """ - The business type. - """ - company: NotRequired["Token.CreateParamsAccountCompany"] - """ - Information about the company or business. - """ - individual: NotRequired["Token.CreateParamsAccountIndividual"] - """ - Information about the person represented by the account. - """ - tos_shown_and_accepted: NotRequired["bool"] - """ - Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](https://stripe.com/docs/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`. - """ + class CreateParamsAccount(TypedDict): + business_type: NotRequired[ + "Literal['company', 'government_entity', 'individual', 'non_profit']" + ] + """ + The business type. + """ + company: NotRequired["Token.CreateParamsAccountCompany"] + """ + Information about the company or business. + """ + individual: NotRequired["Token.CreateParamsAccountIndividual"] + """ + Information about the person represented by the account. + """ + tos_shown_and_accepted: NotRequired["bool"] + """ + Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](https://stripe.com/docs/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`. + """ - class CreateParamsAccountIndividual(TypedDict): - address: NotRequired["Token.CreateParamsAccountIndividualAddress"] - """ - The individual's primary address. - """ - address_kana: NotRequired[ - "Token.CreateParamsAccountIndividualAddressKana" - ] - """ - The Kana variation of the the individual's primary address (Japan only). - """ - address_kanji: NotRequired[ - "Token.CreateParamsAccountIndividualAddressKanji" - ] - """ - The Kanji variation of the the individual's primary address (Japan only). - """ - dob: NotRequired[ - "Literal['']|Token.CreateParamsAccountIndividualDob" - ] - """ - The individual's date of birth. - """ - email: NotRequired["str"] - """ - The individual's email address. - """ - first_name: NotRequired["str"] - """ - The individual's first name. - """ - first_name_kana: NotRequired["str"] - """ - The Kana variation of the the individual's first name (Japan only). - """ - first_name_kanji: NotRequired["str"] - """ - The Kanji variation of the individual's first name (Japan only). - """ - full_name_aliases: NotRequired["Literal['']|List[str]"] - """ - A list of alternate names or aliases that the individual is known by. - """ - gender: NotRequired["str"] - """ - The individual's gender (International regulations require either "male" or "female"). - """ - id_number: NotRequired["str"] - """ - The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). - """ - id_number_secondary: NotRequired["str"] - """ - The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). - """ - last_name: NotRequired["str"] - """ - The individual's last name. - """ - last_name_kana: NotRequired["str"] - """ - The Kana variation of the individual's last name (Japan only). - """ - last_name_kanji: NotRequired["str"] - """ - The Kanji variation of the individual's last name (Japan only). - """ - maiden_name: NotRequired["str"] - """ - The individual's maiden name. - """ - metadata: NotRequired["Literal['']|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`. - """ - phone: NotRequired["str"] - """ - The individual's phone number. - """ - political_exposure: NotRequired["Literal['existing', 'none']"] - """ - Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - """ - registered_address: NotRequired[ - "Token.CreateParamsAccountIndividualRegisteredAddress" - ] - """ - The individual's registered address. - """ - ssn_last_4: NotRequired["str"] - """ - The last four digits of the individual's Social Security Number (U.S. only). - """ - verification: NotRequired[ - "Token.CreateParamsAccountIndividualVerification" - ] - """ - The individual's verification document information. - """ + class CreateParamsAccountIndividual(TypedDict): + address: NotRequired["Token.CreateParamsAccountIndividualAddress"] + """ + The individual's primary address. + """ + address_kana: NotRequired[ + "Token.CreateParamsAccountIndividualAddressKana" + ] + """ + The Kana variation of the the individual's primary address (Japan only). + """ + address_kanji: NotRequired[ + "Token.CreateParamsAccountIndividualAddressKanji" + ] + """ + The Kanji variation of the the individual's primary address (Japan only). + """ + dob: NotRequired["Literal['']|Token.CreateParamsAccountIndividualDob"] + """ + The individual's date of birth. + """ + email: NotRequired["str"] + """ + The individual's email address. + """ + first_name: NotRequired["str"] + """ + The individual's first name. + """ + first_name_kana: NotRequired["str"] + """ + The Kana variation of the the individual's first name (Japan only). + """ + first_name_kanji: NotRequired["str"] + """ + The Kanji variation of the individual's first name (Japan only). + """ + full_name_aliases: NotRequired["Literal['']|List[str]"] + """ + A list of alternate names or aliases that the individual is known by. + """ + gender: NotRequired["str"] + """ + The individual's gender (International regulations require either "male" or "female"). + """ + id_number: NotRequired["str"] + """ + The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). + """ + id_number_secondary: NotRequired["str"] + """ + The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://stripe.com/docs/js/tokens/create_token?type=pii). + """ + last_name: NotRequired["str"] + """ + The individual's last name. + """ + last_name_kana: NotRequired["str"] + """ + The Kana variation of the individual's last name (Japan only). + """ + last_name_kanji: NotRequired["str"] + """ + The Kanji variation of the individual's last name (Japan only). + """ + maiden_name: NotRequired["str"] + """ + The individual's maiden name. + """ + metadata: NotRequired["Literal['']|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`. + """ + phone: NotRequired["str"] + """ + The individual's phone number. + """ + political_exposure: NotRequired["Literal['existing', 'none']"] + """ + Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + """ + registered_address: NotRequired[ + "Token.CreateParamsAccountIndividualRegisteredAddress" + ] + """ + The individual's registered address. + """ + ssn_last_4: NotRequired["str"] + """ + The last four digits of the individual's Social Security Number (U.S. only). + """ + verification: NotRequired[ + "Token.CreateParamsAccountIndividualVerification" + ] + """ + The individual's verification document information. + """ - class CreateParamsAccountIndividualVerification(TypedDict): - additional_document: NotRequired[ - "Token.CreateParamsAccountIndividualVerificationAdditionalDocument" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - document: NotRequired[ - "Token.CreateParamsAccountIndividualVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ + class CreateParamsAccountIndividualVerification(TypedDict): + additional_document: NotRequired[ + "Token.CreateParamsAccountIndividualVerificationAdditionalDocument" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + document: NotRequired[ + "Token.CreateParamsAccountIndividualVerificationDocument" + ] + """ + An identifying document, either a passport or local ID card. + """ - class CreateParamsAccountIndividualVerificationDocument(TypedDict): - back: NotRequired["str"] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired["str"] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ + class CreateParamsAccountIndividualVerificationDocument(TypedDict): + back: NotRequired["str"] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired["str"] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ - class CreateParamsAccountIndividualVerificationAdditionalDocument( - TypedDict, - ): - back: NotRequired["str"] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired["str"] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ + class CreateParamsAccountIndividualVerificationAdditionalDocument( + TypedDict, + ): + back: NotRequired["str"] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired["str"] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ - class CreateParamsAccountIndividualRegisteredAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsAccountIndividualRegisteredAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreateParamsAccountIndividualDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ + class CreateParamsAccountIndividualDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ - class CreateParamsAccountIndividualAddressKanji(TypedDict): - city: NotRequired["str"] - """ - City or ward. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Block or building number. - """ - line2: NotRequired["str"] - """ - Building details. - """ - postal_code: NotRequired["str"] - """ - Postal code. - """ - state: NotRequired["str"] - """ - Prefecture. - """ - town: NotRequired["str"] - """ - Town or cho-me. - """ + class CreateParamsAccountIndividualAddressKanji(TypedDict): + city: NotRequired["str"] + """ + City or ward. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Block or building number. + """ + line2: NotRequired["str"] + """ + Building details. + """ + postal_code: NotRequired["str"] + """ + Postal code. + """ + state: NotRequired["str"] + """ + Prefecture. + """ + town: NotRequired["str"] + """ + Town or cho-me. + """ - class CreateParamsAccountIndividualAddressKana(TypedDict): - city: NotRequired["str"] - """ - City or ward. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Block or building number. - """ - line2: NotRequired["str"] - """ - Building details. - """ - postal_code: NotRequired["str"] - """ - Postal code. - """ - state: NotRequired["str"] - """ - Prefecture. - """ - town: NotRequired["str"] - """ - Town or cho-me. - """ + class CreateParamsAccountIndividualAddressKana(TypedDict): + city: NotRequired["str"] + """ + City or ward. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Block or building number. + """ + line2: NotRequired["str"] + """ + Building details. + """ + postal_code: NotRequired["str"] + """ + Postal code. + """ + state: NotRequired["str"] + """ + Prefecture. + """ + town: NotRequired["str"] + """ + Town or cho-me. + """ - class CreateParamsAccountIndividualAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsAccountIndividualAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class CreateParamsAccountCompany(TypedDict): - address: NotRequired["Token.CreateParamsAccountCompanyAddress"] - """ - The company's primary address. - """ - address_kana: NotRequired[ - "Token.CreateParamsAccountCompanyAddressKana" - ] - """ - The Kana variation of the company's primary address (Japan only). - """ - address_kanji: NotRequired[ - "Token.CreateParamsAccountCompanyAddressKanji" - ] - """ - The Kanji variation of the company's primary address (Japan only). - """ - directors_provided: NotRequired["bool"] - """ - Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. - """ - executives_provided: NotRequired["bool"] - """ - Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.executive` requirement. - """ - export_license_id: NotRequired["str"] - """ - The export license ID number of the company, also referred as Import Export Code (India only). - """ - export_purpose_code: NotRequired["str"] - """ - The purpose code to use for export transactions (India only). - """ - name: NotRequired["str"] - """ - The company's legal name. - """ - name_kana: NotRequired["str"] - """ - The Kana variation of the company's legal name (Japan only). - """ - name_kanji: NotRequired["str"] - """ - The Kanji variation of the company's legal name (Japan only). - """ - owners_provided: NotRequired["bool"] - """ - Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.owner` requirement. - """ - ownership_declaration: NotRequired[ - "Token.CreateParamsAccountCompanyOwnershipDeclaration" - ] - """ - This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. - """ - ownership_declaration_shown_and_signed: NotRequired["bool"] - """ - Whether the user described by the data in the token has been shown the Ownership Declaration and indicated that it is correct. - """ - phone: NotRequired["str"] - """ - The company's phone number (used for verification). - """ - registration_number: NotRequired["str"] - """ - The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). - """ - structure: NotRequired[ - "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" - ] - """ - The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. - """ - tax_id: NotRequired["str"] - """ - The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) - """ - tax_id_registrar: NotRequired["str"] - """ - The jurisdiction in which the `tax_id` is registered (Germany-based companies only). - """ - vat_id: NotRequired["str"] - """ - The VAT number of the company. - """ - verification: NotRequired[ - "Token.CreateParamsAccountCompanyVerification" - ] - """ - Information on the verification state of the company. - """ + class CreateParamsAccountCompany(TypedDict): + address: NotRequired["Token.CreateParamsAccountCompanyAddress"] + """ + The company's primary address. + """ + address_kana: NotRequired[ + "Token.CreateParamsAccountCompanyAddressKana" + ] + """ + The Kana variation of the company's primary address (Japan only). + """ + address_kanji: NotRequired[ + "Token.CreateParamsAccountCompanyAddressKanji" + ] + """ + The Kanji variation of the company's primary address (Japan only). + """ + directors_provided: NotRequired["bool"] + """ + Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + """ + executives_provided: NotRequired["bool"] + """ + Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.executive` requirement. + """ + export_license_id: NotRequired["str"] + """ + The export license ID number of the company, also referred as Import Export Code (India only). + """ + export_purpose_code: NotRequired["str"] + """ + The purpose code to use for export transactions (India only). + """ + name: NotRequired["str"] + """ + The company's legal name. + """ + name_kana: NotRequired["str"] + """ + The Kana variation of the company's legal name (Japan only). + """ + name_kanji: NotRequired["str"] + """ + The Kanji variation of the company's legal name (Japan only). + """ + owners_provided: NotRequired["bool"] + """ + Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.owner` requirement. + """ + ownership_declaration: NotRequired[ + "Token.CreateParamsAccountCompanyOwnershipDeclaration" + ] + """ + This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + """ + ownership_declaration_shown_and_signed: NotRequired["bool"] + """ + Whether the user described by the data in the token has been shown the Ownership Declaration and indicated that it is correct. + """ + phone: NotRequired["str"] + """ + The company's phone number (used for verification). + """ + registration_number: NotRequired["str"] + """ + The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + """ + structure: NotRequired[ + "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" + ] + """ + The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. + """ + tax_id: NotRequired["str"] + """ + The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + """ + tax_id_registrar: NotRequired["str"] + """ + The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + """ + vat_id: NotRequired["str"] + """ + The VAT number of the company. + """ + verification: NotRequired[ + "Token.CreateParamsAccountCompanyVerification" + ] + """ + Information on the verification state of the company. + """ - class CreateParamsAccountCompanyVerification(TypedDict): - document: NotRequired[ - "Token.CreateParamsAccountCompanyVerificationDocument" - ] - """ - A document verifying the business. - """ + class CreateParamsAccountCompanyVerification(TypedDict): + document: NotRequired[ + "Token.CreateParamsAccountCompanyVerificationDocument" + ] + """ + A document verifying the business. + """ - class CreateParamsAccountCompanyVerificationDocument(TypedDict): - back: NotRequired["str"] - """ - The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired["str"] - """ - The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ + class CreateParamsAccountCompanyVerificationDocument(TypedDict): + back: NotRequired["str"] + """ + The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired["str"] + """ + The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ - class CreateParamsAccountCompanyOwnershipDeclaration(TypedDict): - date: NotRequired["int"] - """ - The Unix timestamp marking when the beneficial owner attestation was made. - """ - ip: NotRequired["str"] - """ - The IP address from which the beneficial owner attestation was made. - """ - user_agent: NotRequired["str"] - """ - The user agent of the browser from which the beneficial owner attestation was made. - """ + class CreateParamsAccountCompanyOwnershipDeclaration(TypedDict): + date: NotRequired["int"] + """ + The Unix timestamp marking when the beneficial owner attestation was made. + """ + ip: NotRequired["str"] + """ + The IP address from which the beneficial owner attestation was made. + """ + user_agent: NotRequired["str"] + """ + The user agent of the browser from which the beneficial owner attestation was made. + """ - class CreateParamsAccountCompanyAddressKanji(TypedDict): - city: NotRequired["str"] - """ - City or ward. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Block or building number. - """ - line2: NotRequired["str"] - """ - Building details. - """ - postal_code: NotRequired["str"] - """ - Postal code. - """ - state: NotRequired["str"] - """ - Prefecture. - """ - town: NotRequired["str"] - """ - Town or cho-me. - """ + class CreateParamsAccountCompanyAddressKanji(TypedDict): + city: NotRequired["str"] + """ + City or ward. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Block or building number. + """ + line2: NotRequired["str"] + """ + Building details. + """ + postal_code: NotRequired["str"] + """ + Postal code. + """ + state: NotRequired["str"] + """ + Prefecture. + """ + town: NotRequired["str"] + """ + Town or cho-me. + """ - class CreateParamsAccountCompanyAddressKana(TypedDict): - city: NotRequired["str"] - """ - City or ward. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Block or building number. - """ - line2: NotRequired["str"] - """ - Building details. - """ - postal_code: NotRequired["str"] - """ - Postal code. - """ - state: NotRequired["str"] - """ - Prefecture. - """ - town: NotRequired["str"] - """ - Town or cho-me. - """ + class CreateParamsAccountCompanyAddressKana(TypedDict): + city: NotRequired["str"] + """ + City or ward. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Block or building number. + """ + line2: NotRequired["str"] + """ + Building details. + """ + postal_code: NotRequired["str"] + """ + Postal code. + """ + state: NotRequired["str"] + """ + Prefecture. + """ + town: NotRequired["str"] + """ + Town or cho-me. + """ - class CreateParamsAccountCompanyAddress(TypedDict): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsAccountCompanyAddress(TypedDict): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ bank_account: Optional["BankAccount"] """ diff --git a/stripe/api_resources/topup.py b/stripe/api_resources/topup.py index 67ddbf14b..7b5e89a9c 100644 --- a/stripe/api_resources/topup.py +++ b/stripe/api_resources/topup.py @@ -39,135 +39,134 @@ class Topup( """ OBJECT_NAME: ClassVar[Literal["topup"]] = "topup" - if TYPE_CHECKING: - class CancelParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class CancelParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CreateParams(RequestOptions): - amount: int - """ - A positive integer representing how much to transfer. - """ - 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). - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - source: NotRequired["str"] - """ - The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). - """ - statement_descriptor: NotRequired["str"] - """ - Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. - """ - transfer_group: NotRequired["str"] - """ - A string that identifies this top-up as part of a group. - """ + class CreateParams(RequestOptions): + amount: int + """ + A positive integer representing how much to transfer. + """ + 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). + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + source: NotRequired["str"] + """ + The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). + """ + statement_descriptor: NotRequired["str"] + """ + Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. + """ + transfer_group: NotRequired["str"] + """ + A string that identifies this top-up as part of a group. + """ - class ListParams(RequestOptions): - amount: NotRequired["Topup.ListParamsAmount|int"] - """ - A positive integer representing how much to transfer. - """ - created: NotRequired["Topup.ListParamsCreated|int"] - """ - A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. - """ - 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['canceled', 'failed', 'pending', 'succeeded']" - ] - """ - Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. - """ + class ListParams(RequestOptions): + amount: NotRequired["Topup.ListParamsAmount|int"] + """ + A positive integer representing how much to transfer. + """ + created: NotRequired["Topup.ListParamsCreated|int"] + """ + A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + """ + 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['canceled', 'failed', 'pending', 'succeeded']" + ] + """ + Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ListParamsAmount(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsAmount(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ + class ModifyParams(RequestOptions): + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ amount: int """ @@ -219,7 +218,7 @@ class RetrieveParams(RequestOptions): """ source: Optional["Source"] """ - For most Stripe users, the source of every top-up is a bank account. This hash is then the [source object](https://stripe.com/docs/api#source_object) describing that bank account. + The source field is deprecated. It might not always be present in the API response. """ statement_descriptor: Optional[str] """ diff --git a/stripe/api_resources/transfer.py b/stripe/api_resources/transfer.py index 132f5126c..f4e65475a 100644 --- a/stripe/api_resources/transfer.py +++ b/stripe/api_resources/transfer.py @@ -47,166 +47,165 @@ class Transfer( """ OBJECT_NAME: ClassVar[Literal["transfer"]] = "transfer" - if TYPE_CHECKING: - class CreateParams(RequestOptions): - amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) representing how much to transfer. - """ - currency: str - """ - 3-letter [ISO code for currency](https://stripe.com/docs/payouts). - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - destination: str - """ - The ID of a connected Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. - """ - expand: NotRequired["List[str]"] - """ - 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`. - """ - source_transaction: NotRequired["str"] - """ - You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details. - """ - source_type: NotRequired["Literal['bank_account', 'card', 'fpx']"] - """ - The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. - """ - transfer_group: NotRequired["str"] - """ - A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. - """ + class CreateParams(RequestOptions): + amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) representing how much to transfer. + """ + currency: str + """ + 3-letter [ISO code for currency](https://stripe.com/docs/payouts). + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + destination: str + """ + The ID of a connected Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + """ + expand: NotRequired["List[str]"] + """ + 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`. + """ + source_transaction: NotRequired["str"] + """ + You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details. + """ + source_type: NotRequired["Literal['bank_account', 'card', 'fpx']"] + """ + The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. + """ + transfer_group: NotRequired["str"] + """ + A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + """ - class ListParams(RequestOptions): - created: NotRequired["Transfer.ListParamsCreated|int"] - destination: NotRequired["str"] - """ - Only return transfers for the destination specified by this account ID. - """ - 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. - """ - transfer_group: NotRequired["str"] - """ - Only return transfers with the specified transfer group. - """ + class ListParams(RequestOptions): + created: NotRequired["Transfer.ListParamsCreated|int"] + destination: NotRequired["str"] + """ + Only return transfers for the destination specified by this account ID. + """ + 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. + """ + transfer_group: NotRequired["str"] + """ + Only return transfers with the specified transfer group. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ + class ModifyParams(RequestOptions): + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CreateReversalParams(RequestOptions): - amount: NotRequired["int"] - """ - A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. - """ - description: NotRequired["str"] - """ - An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - refund_application_fee: NotRequired["bool"] - """ - Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. - """ + class CreateReversalParams(RequestOptions): + amount: NotRequired["int"] + """ + A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. + """ + description: NotRequired["str"] + """ + An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + refund_application_fee: NotRequired["bool"] + """ + Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. + """ - class RetrieveReversalParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveReversalParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ModifyReversalParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ + class ModifyReversalParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ - class ListReversalsParams(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. - """ + class ListReversalsParams(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. + """ amount: int """ diff --git a/stripe/api_resources/treasury/credit_reversal.py b/stripe/api_resources/treasury/credit_reversal.py index 683a27a35..b99af2111 100644 --- a/stripe/api_resources/treasury/credit_reversal.py +++ b/stripe/api_resources/treasury/credit_reversal.py @@ -33,57 +33,55 @@ class StatusTransitions(StripeObject): Timestamp describing when the CreditReversal changed status to `posted` """ - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - 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`. - """ - received_credit: str - """ - The ReceivedCredit to reverse. - """ + class CreateParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + 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`. + """ + received_credit: str + """ + The ReceivedCredit to reverse. + """ - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - received_credit: NotRequired["str"] - """ - Only return CreditReversals for the ReceivedCredit ID. - """ - 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['canceled', 'posted', 'processing']"] - """ - Only return CreditReversals for a given status. - """ + 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. + """ + financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ + 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. + """ + received_credit: NotRequired["str"] + """ + Only return CreditReversals for the ReceivedCredit ID. + """ + 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['canceled', 'posted', 'processing']"] + """ + Only return CreditReversals for a given status. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ amount: int """ diff --git a/stripe/api_resources/treasury/debit_reversal.py b/stripe/api_resources/treasury/debit_reversal.py index d04a8f56c..968878cc8 100644 --- a/stripe/api_resources/treasury/debit_reversal.py +++ b/stripe/api_resources/treasury/debit_reversal.py @@ -39,63 +39,59 @@ class StatusTransitions(StripeObject): Timestamp describing when the DebitReversal changed status to `completed`. """ - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - 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`. - """ - received_debit: str - """ - The ReceivedDebit to reverse. - """ + class CreateParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + 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`. + """ + received_debit: str + """ + The ReceivedDebit to reverse. + """ - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - received_debit: NotRequired["str"] - """ - Only return DebitReversals for the ReceivedDebit ID. - """ - resolution: NotRequired["Literal['lost', 'won']"] - """ - Only return DebitReversals for a given resolution. - """ - 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['canceled', 'completed', 'processing']" - ] - """ - Only return DebitReversals for a given status. - """ + 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. + """ + financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ + 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. + """ + received_debit: NotRequired["str"] + """ + Only return DebitReversals for the ReceivedDebit ID. + """ + resolution: NotRequired["Literal['lost', 'won']"] + """ + Only return DebitReversals for a given resolution. + """ + 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['canceled', 'completed', 'processing']"] + """ + Only return DebitReversals for a given status. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ amount: int """ diff --git a/stripe/api_resources/treasury/financial_account.py b/stripe/api_resources/treasury/financial_account.py index 8b81b3f74..87508edff 100644 --- a/stripe/api_resources/treasury/financial_account.py +++ b/stripe/api_resources/treasury/financial_account.py @@ -116,554 +116,548 @@ class Closed(StripeObject): """ _inner_class_types = {"closed": Closed} - if TYPE_CHECKING: - - class CreateParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - features: NotRequired["FinancialAccount.CreateParamsFeatures"] - """ - Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. - """ - 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`. - """ - platform_restrictions: NotRequired[ - "FinancialAccount.CreateParamsPlatformRestrictions" - ] - """ - The set of functionalities that the platform can restrict on the FinancialAccount. - """ - supported_currencies: List[str] - """ - The currencies the FinancialAccount can hold a balance in. - """ + class CreateParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + features: NotRequired["FinancialAccount.CreateParamsFeatures"] + """ + Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. + """ + 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`. + """ + platform_restrictions: NotRequired[ + "FinancialAccount.CreateParamsPlatformRestrictions" + ] + """ + The set of functionalities that the platform can restrict on the FinancialAccount. + """ + supported_currencies: List[str] + """ + The currencies the FinancialAccount can hold a balance in. + """ - class CreateParamsPlatformRestrictions(TypedDict): - inbound_flows: NotRequired["Literal['restricted', 'unrestricted']"] - """ - Restricts all inbound money movement. - """ - outbound_flows: NotRequired[ - "Literal['restricted', 'unrestricted']" - ] - """ - Restricts all outbound money movement. - """ + class CreateParamsPlatformRestrictions(TypedDict): + inbound_flows: NotRequired["Literal['restricted', 'unrestricted']"] + """ + Restricts all inbound money movement. + """ + outbound_flows: NotRequired["Literal['restricted', 'unrestricted']"] + """ + Restricts all outbound money movement. + """ - class CreateParamsFeatures(TypedDict): - card_issuing: NotRequired[ - "FinancialAccount.CreateParamsFeaturesCardIssuing" - ] - """ - Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. - """ - deposit_insurance: NotRequired[ - "FinancialAccount.CreateParamsFeaturesDepositInsurance" - ] - """ - Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. - """ - financial_addresses: NotRequired[ - "FinancialAccount.CreateParamsFeaturesFinancialAddresses" - ] - """ - Contains Features that add FinancialAddresses to the FinancialAccount. - """ - inbound_transfers: NotRequired[ - "FinancialAccount.CreateParamsFeaturesInboundTransfers" - ] - """ - Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. - """ - intra_stripe_flows: NotRequired[ - "FinancialAccount.CreateParamsFeaturesIntraStripeFlows" - ] - """ - Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). - """ - outbound_payments: NotRequired[ - "FinancialAccount.CreateParamsFeaturesOutboundPayments" - ] - """ - Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. - """ - outbound_transfers: NotRequired[ - "FinancialAccount.CreateParamsFeaturesOutboundTransfers" - ] - """ - Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. - """ + class CreateParamsFeatures(TypedDict): + card_issuing: NotRequired[ + "FinancialAccount.CreateParamsFeaturesCardIssuing" + ] + """ + Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + """ + deposit_insurance: NotRequired[ + "FinancialAccount.CreateParamsFeaturesDepositInsurance" + ] + """ + Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + """ + financial_addresses: NotRequired[ + "FinancialAccount.CreateParamsFeaturesFinancialAddresses" + ] + """ + Contains Features that add FinancialAddresses to the FinancialAccount. + """ + inbound_transfers: NotRequired[ + "FinancialAccount.CreateParamsFeaturesInboundTransfers" + ] + """ + Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + """ + intra_stripe_flows: NotRequired[ + "FinancialAccount.CreateParamsFeaturesIntraStripeFlows" + ] + """ + Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + """ + outbound_payments: NotRequired[ + "FinancialAccount.CreateParamsFeaturesOutboundPayments" + ] + """ + Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + """ + outbound_transfers: NotRequired[ + "FinancialAccount.CreateParamsFeaturesOutboundTransfers" + ] + """ + Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + """ - class CreateParamsFeaturesOutboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccount.CreateParamsFeaturesOutboundTransfersAch" - ] - """ - Enables ACH transfers via the OutboundTransfers API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccount.CreateParamsFeaturesOutboundTransfersUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundTransfers API. - """ + class CreateParamsFeaturesOutboundTransfers(TypedDict): + ach: NotRequired[ + "FinancialAccount.CreateParamsFeaturesOutboundTransfersAch" + ] + """ + Enables ACH transfers via the OutboundTransfers API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccount.CreateParamsFeaturesOutboundTransfersUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundTransfers API. + """ - class CreateParamsFeaturesOutboundTransfersUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class CreateParamsFeaturesOutboundTransfersUsDomesticWire(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class CreateParamsFeaturesOutboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class CreateParamsFeaturesOutboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class CreateParamsFeaturesOutboundPayments(TypedDict): - ach: NotRequired[ - "FinancialAccount.CreateParamsFeaturesOutboundPaymentsAch" - ] - """ - Enables ACH transfers via the OutboundPayments API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccount.CreateParamsFeaturesOutboundPaymentsUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundPayments API. - """ + class CreateParamsFeaturesOutboundPayments(TypedDict): + ach: NotRequired[ + "FinancialAccount.CreateParamsFeaturesOutboundPaymentsAch" + ] + """ + Enables ACH transfers via the OutboundPayments API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccount.CreateParamsFeaturesOutboundPaymentsUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundPayments API. + """ - class CreateParamsFeaturesOutboundPaymentsUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class CreateParamsFeaturesOutboundPaymentsUsDomesticWire(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class CreateParamsFeaturesOutboundPaymentsAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class CreateParamsFeaturesOutboundPaymentsAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class CreateParamsFeaturesIntraStripeFlows(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class CreateParamsFeaturesIntraStripeFlows(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class CreateParamsFeaturesInboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccount.CreateParamsFeaturesInboundTransfersAch" - ] - """ - Enables ACH Debits via the InboundTransfers API. - """ + class CreateParamsFeaturesInboundTransfers(TypedDict): + ach: NotRequired[ + "FinancialAccount.CreateParamsFeaturesInboundTransfersAch" + ] + """ + Enables ACH Debits via the InboundTransfers API. + """ - class CreateParamsFeaturesInboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class CreateParamsFeaturesInboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class CreateParamsFeaturesFinancialAddresses(TypedDict): - aba: NotRequired[ - "FinancialAccount.CreateParamsFeaturesFinancialAddressesAba" - ] - """ - Adds an ABA FinancialAddress to the FinancialAccount. - """ + class CreateParamsFeaturesFinancialAddresses(TypedDict): + aba: NotRequired[ + "FinancialAccount.CreateParamsFeaturesFinancialAddressesAba" + ] + """ + Adds an ABA FinancialAddress to the FinancialAccount. + """ - class CreateParamsFeaturesFinancialAddressesAba(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class CreateParamsFeaturesFinancialAddressesAba(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class CreateParamsFeaturesDepositInsurance(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class CreateParamsFeaturesDepositInsurance(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class CreateParamsFeaturesCardIssuing(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class CreateParamsFeaturesCardIssuing(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class ListParams(RequestOptions): - created: NotRequired["FinancialAccount.ListParamsCreated|int"] - ending_before: NotRequired["str"] - """ - An object ID cursor for use in pagination. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - limit: NotRequired["int"] - """ - A limit ranging from 1 to 100 (defaults to 10). - """ - starting_after: NotRequired["str"] - """ - An object ID cursor for use in pagination. - """ + class ListParams(RequestOptions): + created: NotRequired["FinancialAccount.ListParamsCreated|int"] + ending_before: NotRequired["str"] + """ + An object ID cursor for use in pagination. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired["int"] + """ + A limit ranging from 1 to 100 (defaults to 10). + """ + starting_after: NotRequired["str"] + """ + An object ID cursor for use in pagination. + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ModifyParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - features: NotRequired["FinancialAccount.ModifyParamsFeatures"] - """ - Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. - """ - 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`. - """ - platform_restrictions: NotRequired[ - "FinancialAccount.ModifyParamsPlatformRestrictions" - ] - """ - The set of functionalities that the platform can restrict on the FinancialAccount. - """ + class ModifyParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + features: NotRequired["FinancialAccount.ModifyParamsFeatures"] + """ + Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. + """ + 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`. + """ + platform_restrictions: NotRequired[ + "FinancialAccount.ModifyParamsPlatformRestrictions" + ] + """ + The set of functionalities that the platform can restrict on the FinancialAccount. + """ - class ModifyParamsPlatformRestrictions(TypedDict): - inbound_flows: NotRequired["Literal['restricted', 'unrestricted']"] - """ - Restricts all inbound money movement. - """ - outbound_flows: NotRequired[ - "Literal['restricted', 'unrestricted']" - ] - """ - Restricts all outbound money movement. - """ + class ModifyParamsPlatformRestrictions(TypedDict): + inbound_flows: NotRequired["Literal['restricted', 'unrestricted']"] + """ + Restricts all inbound money movement. + """ + outbound_flows: NotRequired["Literal['restricted', 'unrestricted']"] + """ + Restricts all outbound money movement. + """ - class ModifyParamsFeatures(TypedDict): - card_issuing: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesCardIssuing" - ] - """ - Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. - """ - deposit_insurance: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesDepositInsurance" - ] - """ - Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. - """ - financial_addresses: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesFinancialAddresses" - ] - """ - Contains Features that add FinancialAddresses to the FinancialAccount. - """ - inbound_transfers: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesInboundTransfers" - ] - """ - Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. - """ - intra_stripe_flows: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesIntraStripeFlows" - ] - """ - Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). - """ - outbound_payments: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesOutboundPayments" - ] - """ - Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. - """ - outbound_transfers: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesOutboundTransfers" - ] - """ - Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. - """ + class ModifyParamsFeatures(TypedDict): + card_issuing: NotRequired[ + "FinancialAccount.ModifyParamsFeaturesCardIssuing" + ] + """ + Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + """ + deposit_insurance: NotRequired[ + "FinancialAccount.ModifyParamsFeaturesDepositInsurance" + ] + """ + Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + """ + financial_addresses: NotRequired[ + "FinancialAccount.ModifyParamsFeaturesFinancialAddresses" + ] + """ + Contains Features that add FinancialAddresses to the FinancialAccount. + """ + inbound_transfers: NotRequired[ + "FinancialAccount.ModifyParamsFeaturesInboundTransfers" + ] + """ + Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + """ + intra_stripe_flows: NotRequired[ + "FinancialAccount.ModifyParamsFeaturesIntraStripeFlows" + ] + """ + Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + """ + outbound_payments: NotRequired[ + "FinancialAccount.ModifyParamsFeaturesOutboundPayments" + ] + """ + Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + """ + outbound_transfers: NotRequired[ + "FinancialAccount.ModifyParamsFeaturesOutboundTransfers" + ] + """ + Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + """ - class ModifyParamsFeaturesOutboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesOutboundTransfersAch" - ] - """ - Enables ACH transfers via the OutboundTransfers API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesOutboundTransfersUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundTransfers API. - """ + class ModifyParamsFeaturesOutboundTransfers(TypedDict): + ach: NotRequired[ + "FinancialAccount.ModifyParamsFeaturesOutboundTransfersAch" + ] + """ + Enables ACH transfers via the OutboundTransfers API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccount.ModifyParamsFeaturesOutboundTransfersUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundTransfers API. + """ - class ModifyParamsFeaturesOutboundTransfersUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class ModifyParamsFeaturesOutboundTransfersUsDomesticWire(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class ModifyParamsFeaturesOutboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class ModifyParamsFeaturesOutboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class ModifyParamsFeaturesOutboundPayments(TypedDict): - ach: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesOutboundPaymentsAch" - ] - """ - Enables ACH transfers via the OutboundPayments API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesOutboundPaymentsUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundPayments API. - """ + class ModifyParamsFeaturesOutboundPayments(TypedDict): + ach: NotRequired[ + "FinancialAccount.ModifyParamsFeaturesOutboundPaymentsAch" + ] + """ + Enables ACH transfers via the OutboundPayments API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccount.ModifyParamsFeaturesOutboundPaymentsUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundPayments API. + """ - class ModifyParamsFeaturesOutboundPaymentsUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class ModifyParamsFeaturesOutboundPaymentsUsDomesticWire(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class ModifyParamsFeaturesOutboundPaymentsAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class ModifyParamsFeaturesOutboundPaymentsAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class ModifyParamsFeaturesIntraStripeFlows(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class ModifyParamsFeaturesIntraStripeFlows(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class ModifyParamsFeaturesInboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesInboundTransfersAch" - ] - """ - Enables ACH Debits via the InboundTransfers API. - """ + class ModifyParamsFeaturesInboundTransfers(TypedDict): + ach: NotRequired[ + "FinancialAccount.ModifyParamsFeaturesInboundTransfersAch" + ] + """ + Enables ACH Debits via the InboundTransfers API. + """ - class ModifyParamsFeaturesInboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class ModifyParamsFeaturesInboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class ModifyParamsFeaturesFinancialAddresses(TypedDict): - aba: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesFinancialAddressesAba" - ] - """ - Adds an ABA FinancialAddress to the FinancialAccount. - """ + class ModifyParamsFeaturesFinancialAddresses(TypedDict): + aba: NotRequired[ + "FinancialAccount.ModifyParamsFeaturesFinancialAddressesAba" + ] + """ + Adds an ABA FinancialAddress to the FinancialAccount. + """ - class ModifyParamsFeaturesFinancialAddressesAba(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class ModifyParamsFeaturesFinancialAddressesAba(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class ModifyParamsFeaturesDepositInsurance(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class ModifyParamsFeaturesDepositInsurance(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class ModifyParamsFeaturesCardIssuing(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class ModifyParamsFeaturesCardIssuing(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class RetrieveFeaturesParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveFeaturesParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class UpdateFeaturesParams(RequestOptions): - card_issuing: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsCardIssuing" - ] - """ - Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. - """ - deposit_insurance: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsDepositInsurance" - ] - """ - Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - financial_addresses: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsFinancialAddresses" - ] - """ - Contains Features that add FinancialAddresses to the FinancialAccount. - """ - inbound_transfers: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsInboundTransfers" - ] - """ - Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. - """ - intra_stripe_flows: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsIntraStripeFlows" - ] - """ - Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). - """ - outbound_payments: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsOutboundPayments" - ] - """ - Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. - """ - outbound_transfers: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsOutboundTransfers" - ] - """ - Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. - """ + class UpdateFeaturesParams(RequestOptions): + card_issuing: NotRequired[ + "FinancialAccount.UpdateFeaturesParamsCardIssuing" + ] + """ + Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + """ + deposit_insurance: NotRequired[ + "FinancialAccount.UpdateFeaturesParamsDepositInsurance" + ] + """ + Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + financial_addresses: NotRequired[ + "FinancialAccount.UpdateFeaturesParamsFinancialAddresses" + ] + """ + Contains Features that add FinancialAddresses to the FinancialAccount. + """ + inbound_transfers: NotRequired[ + "FinancialAccount.UpdateFeaturesParamsInboundTransfers" + ] + """ + Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + """ + intra_stripe_flows: NotRequired[ + "FinancialAccount.UpdateFeaturesParamsIntraStripeFlows" + ] + """ + Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + """ + outbound_payments: NotRequired[ + "FinancialAccount.UpdateFeaturesParamsOutboundPayments" + ] + """ + Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + """ + outbound_transfers: NotRequired[ + "FinancialAccount.UpdateFeaturesParamsOutboundTransfers" + ] + """ + Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + """ - class UpdateFeaturesParamsOutboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsOutboundTransfersAch" - ] - """ - Enables ACH transfers via the OutboundTransfers API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsOutboundTransfersUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundTransfers API. - """ + class UpdateFeaturesParamsOutboundTransfers(TypedDict): + ach: NotRequired[ + "FinancialAccount.UpdateFeaturesParamsOutboundTransfersAch" + ] + """ + Enables ACH transfers via the OutboundTransfers API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccount.UpdateFeaturesParamsOutboundTransfersUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundTransfers API. + """ - class UpdateFeaturesParamsOutboundTransfersUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class UpdateFeaturesParamsOutboundTransfersUsDomesticWire(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class UpdateFeaturesParamsOutboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class UpdateFeaturesParamsOutboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class UpdateFeaturesParamsOutboundPayments(TypedDict): - ach: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsOutboundPaymentsAch" - ] - """ - Enables ACH transfers via the OutboundPayments API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsOutboundPaymentsUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundPayments API. - """ + class UpdateFeaturesParamsOutboundPayments(TypedDict): + ach: NotRequired[ + "FinancialAccount.UpdateFeaturesParamsOutboundPaymentsAch" + ] + """ + Enables ACH transfers via the OutboundPayments API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccount.UpdateFeaturesParamsOutboundPaymentsUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundPayments API. + """ - class UpdateFeaturesParamsOutboundPaymentsUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class UpdateFeaturesParamsOutboundPaymentsUsDomesticWire(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class UpdateFeaturesParamsOutboundPaymentsAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class UpdateFeaturesParamsOutboundPaymentsAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class UpdateFeaturesParamsIntraStripeFlows(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class UpdateFeaturesParamsIntraStripeFlows(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class UpdateFeaturesParamsInboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsInboundTransfersAch" - ] - """ - Enables ACH Debits via the InboundTransfers API. - """ + class UpdateFeaturesParamsInboundTransfers(TypedDict): + ach: NotRequired[ + "FinancialAccount.UpdateFeaturesParamsInboundTransfersAch" + ] + """ + Enables ACH Debits via the InboundTransfers API. + """ - class UpdateFeaturesParamsInboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class UpdateFeaturesParamsInboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class UpdateFeaturesParamsFinancialAddresses(TypedDict): - aba: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsFinancialAddressesAba" - ] - """ - Adds an ABA FinancialAddress to the FinancialAccount. - """ + class UpdateFeaturesParamsFinancialAddresses(TypedDict): + aba: NotRequired[ + "FinancialAccount.UpdateFeaturesParamsFinancialAddressesAba" + ] + """ + Adds an ABA FinancialAddress to the FinancialAccount. + """ - class UpdateFeaturesParamsFinancialAddressesAba(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class UpdateFeaturesParamsFinancialAddressesAba(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class UpdateFeaturesParamsDepositInsurance(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class UpdateFeaturesParamsDepositInsurance(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ - class UpdateFeaturesParamsCardIssuing(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ + class UpdateFeaturesParamsCardIssuing(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ active_features: Optional[ List[ diff --git a/stripe/api_resources/treasury/inbound_transfer.py b/stripe/api_resources/treasury/inbound_transfer.py index 5de0bf281..87e7f9750 100644 --- a/stripe/api_resources/treasury/inbound_transfer.py +++ b/stripe/api_resources/treasury/inbound_transfer.py @@ -157,113 +157,111 @@ class StatusTransitions(StripeObject): Timestamp describing when an InboundTransfer changed status to `succeeded`. """ - if TYPE_CHECKING: - - class CancelParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class CancelParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CreateParams(RequestOptions): - amount: int - """ - Amount (in cents) to be transferred. - """ - 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). - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: str - """ - The FinancialAccount to send funds to. - """ - 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`. - """ - origin_payment_method: str - """ - The origin payment method to be debited for the InboundTransfer. - """ - statement_descriptor: NotRequired["str"] - """ - The complete description that appears on your customers' statements. Maximum 10 characters. - """ + class CreateParams(RequestOptions): + amount: int + """ + Amount (in cents) to be transferred. + """ + 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). + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + financial_account: str + """ + The FinancialAccount to send funds to. + """ + 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`. + """ + origin_payment_method: str + """ + The origin payment method to be debited for the InboundTransfer. + """ + statement_descriptor: NotRequired["str"] + """ + The complete description that appears on your customers' statements. Maximum 10 characters. + """ - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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['canceled', 'failed', 'processing', 'succeeded']" - ] - """ - Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. - """ + 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. + """ + financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ + 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['canceled', 'failed', 'processing', 'succeeded']" + ] + """ + Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class FailParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - failure_details: NotRequired[ - "InboundTransfer.FailParamsFailureDetails" - ] - """ - Details about a failed InboundTransfer. - """ + class FailParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + failure_details: NotRequired[ + "InboundTransfer.FailParamsFailureDetails" + ] + """ + Details about a failed InboundTransfer. + """ - class FailParamsFailureDetails(TypedDict): - code: NotRequired[ - "Literal['account_closed', 'account_frozen', 'bank_account_restricted', 'bank_ownership_changed', 'debit_not_authorized', 'incorrect_account_holder_address', 'incorrect_account_holder_name', 'incorrect_account_holder_tax_id', 'insufficient_funds', 'invalid_account_number', 'invalid_currency', 'no_account', 'other']" - ] - """ - Reason for the failure. - """ + class FailParamsFailureDetails(TypedDict): + code: NotRequired[ + "Literal['account_closed', 'account_frozen', 'bank_account_restricted', 'bank_ownership_changed', 'debit_not_authorized', 'incorrect_account_holder_address', 'incorrect_account_holder_name', 'incorrect_account_holder_tax_id', 'insufficient_funds', 'invalid_account_number', 'invalid_currency', 'no_account', 'other']" + ] + """ + Reason for the failure. + """ - class ReturnInboundTransferParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class ReturnInboundTransferParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class SucceedParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class SucceedParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ amount: int """ diff --git a/stripe/api_resources/treasury/outbound_payment.py b/stripe/api_resources/treasury/outbound_payment.py index a42b87e6b..9dddf4076 100644 --- a/stripe/api_resources/treasury/outbound_payment.py +++ b/stripe/api_resources/treasury/outbound_payment.py @@ -180,265 +180,257 @@ class StatusTransitions(StripeObject): Timestamp describing when an OutboundPayment changed status to `returned`. """ - if TYPE_CHECKING: - - class CancelParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class CancelParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CreateParams(RequestOptions): - amount: int - """ - Amount (in cents) to be transferred. - """ - 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). - """ - customer: NotRequired["str"] - """ - ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - destination_payment_method: NotRequired["str"] - """ - The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. - """ - destination_payment_method_data: NotRequired[ - "OutboundPayment.CreateParamsDestinationPaymentMethodData" - ] - """ - Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. - """ - destination_payment_method_options: NotRequired[ - "OutboundPayment.CreateParamsDestinationPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this OutboundPayment. - """ - end_user_details: NotRequired[ - "OutboundPayment.CreateParamsEndUserDetails" - ] - """ - End user details. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: str - """ - The FinancialAccount to pull funds from. - """ - 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`. - """ - statement_descriptor: NotRequired["str"] - """ - The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `wire` payments, or 500 characters for `stripe` network transfers. The default value is `payment`. - """ + class CreateParams(RequestOptions): + amount: int + """ + Amount (in cents) to be transferred. + """ + 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). + """ + customer: NotRequired["str"] + """ + ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + destination_payment_method: NotRequired["str"] + """ + The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. + """ + destination_payment_method_data: NotRequired[ + "OutboundPayment.CreateParamsDestinationPaymentMethodData" + ] + """ + Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. + """ + destination_payment_method_options: NotRequired[ + "OutboundPayment.CreateParamsDestinationPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this OutboundPayment. + """ + end_user_details: NotRequired[ + "OutboundPayment.CreateParamsEndUserDetails" + ] + """ + End user details. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + financial_account: str + """ + The FinancialAccount to pull funds from. + """ + 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`. + """ + statement_descriptor: NotRequired["str"] + """ + The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `wire` payments, or 500 characters for `stripe` network transfers. The default value is `payment`. + """ - class CreateParamsEndUserDetails(TypedDict): - ip_address: NotRequired["str"] - """ - IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`. - """ - present: bool - """ - `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. - """ + class CreateParamsEndUserDetails(TypedDict): + ip_address: NotRequired["str"] + """ + IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`. + """ + present: bool + """ + `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. + """ - class CreateParamsDestinationPaymentMethodOptions(TypedDict): - us_bank_account: NotRequired[ - "Literal['']|OutboundPayment.CreateParamsDestinationPaymentMethodOptionsUsBankAccount" - ] - """ - Optional fields for `us_bank_account`. - """ + class CreateParamsDestinationPaymentMethodOptions(TypedDict): + us_bank_account: NotRequired[ + "Literal['']|OutboundPayment.CreateParamsDestinationPaymentMethodOptionsUsBankAccount" + ] + """ + Optional fields for `us_bank_account`. + """ - class CreateParamsDestinationPaymentMethodOptionsUsBankAccount( - TypedDict, - ): - network: NotRequired["Literal['ach', 'us_domestic_wire']"] - """ - The US bank account network that must be used for this OutboundPayment. If not set, we will default to the PaymentMethod's preferred network. - """ + class CreateParamsDestinationPaymentMethodOptionsUsBankAccount(TypedDict): + network: NotRequired["Literal['ach', 'us_domestic_wire']"] + """ + The US bank account network that must be used for this OutboundPayment. If not set, we will default to the PaymentMethod's preferred network. + """ - class CreateParamsDestinationPaymentMethodData(TypedDict): - billing_details: NotRequired[ - "OutboundPayment.CreateParamsDestinationPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - financial_account: NotRequired["str"] - """ - Required if type is set to `financial_account`. The FinancialAccount ID to send funds to. - """ - 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`. - """ - type: Literal["financial_account", "us_bank_account"] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "OutboundPayment.CreateParamsDestinationPaymentMethodDataUsBankAccount" - ] - """ - Required hash if type is set to `us_bank_account`. - """ + class CreateParamsDestinationPaymentMethodData(TypedDict): + billing_details: NotRequired[ + "OutboundPayment.CreateParamsDestinationPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + financial_account: NotRequired["str"] + """ + Required if type is set to `financial_account`. The FinancialAccount ID to send funds to. + """ + 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`. + """ + type: Literal["financial_account", "us_bank_account"] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "OutboundPayment.CreateParamsDestinationPaymentMethodDataUsBankAccount" + ] + """ + Required hash if type is set to `us_bank_account`. + """ - class CreateParamsDestinationPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[ - "Literal['company', 'individual']" - ] - """ - Account holder type: individual or company. - """ - account_number: NotRequired["str"] - """ - Account number of the bank account. - """ - account_type: NotRequired["Literal['checking', 'savings']"] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired["str"] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired["str"] - """ - Routing number of the bank account. - """ + class CreateParamsDestinationPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired["Literal['company', 'individual']"] + """ + Account holder type: individual or company. + """ + account_number: NotRequired["str"] + """ + Account number of the bank account. + """ + account_type: NotRequired["Literal['checking', 'savings']"] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired["str"] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired["str"] + """ + Routing number of the bank account. + """ - class CreateParamsDestinationPaymentMethodDataBillingDetails( - TypedDict - ): - address: NotRequired[ - "Literal['']|OutboundPayment.CreateParamsDestinationPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ + class CreateParamsDestinationPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|OutboundPayment.CreateParamsDestinationPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ - class CreateParamsDestinationPaymentMethodDataBillingDetailsAddress( - TypedDict, - ): - city: NotRequired["str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["str"] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - line1: NotRequired["str"] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired["str"] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired["str"] - """ - ZIP or postal code. - """ - state: NotRequired["str"] - """ - State, county, province, or region. - """ + class CreateParamsDestinationPaymentMethodDataBillingDetailsAddress( + TypedDict, + ): + city: NotRequired["str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["str"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired["str"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired["str"] + """ + ZIP or postal code. + """ + state: NotRequired["str"] + """ + State, county, province, or region. + """ - class ListParams(RequestOptions): - customer: NotRequired["str"] - """ - Only return OutboundPayments sent to 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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['canceled', 'failed', 'posted', 'processing', 'returned']" - ] - """ - Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. - """ + class ListParams(RequestOptions): + customer: NotRequired["str"] + """ + Only return OutboundPayments sent to 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. + """ + financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ + 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['canceled', 'failed', 'posted', 'processing', 'returned']" + ] + """ + Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class FailParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class FailParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class PostParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class PostParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ReturnOutboundPaymentParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - returned_details: NotRequired[ - "OutboundPayment.ReturnOutboundPaymentParamsReturnedDetails" - ] - """ - Optional hash to set the the return code. - """ + class ReturnOutboundPaymentParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + returned_details: NotRequired[ + "OutboundPayment.ReturnOutboundPaymentParamsReturnedDetails" + ] + """ + Optional hash to set the the return code. + """ - class ReturnOutboundPaymentParamsReturnedDetails(TypedDict): - code: NotRequired[ - "Literal['account_closed', 'account_frozen', 'bank_account_restricted', 'bank_ownership_changed', 'declined', 'incorrect_account_holder_name', 'invalid_account_number', 'invalid_currency', 'no_account', 'other']" - ] - """ - The return code to be set on the OutboundPayment object. - """ + class ReturnOutboundPaymentParamsReturnedDetails(TypedDict): + code: NotRequired[ + "Literal['account_closed', 'account_frozen', 'bank_account_restricted', 'bank_ownership_changed', 'declined', 'incorrect_account_holder_name', 'invalid_account_number', 'invalid_currency', 'no_account', 'other']" + ] + """ + The return code to be set on the OutboundPayment object. + """ amount: int """ diff --git a/stripe/api_resources/treasury/outbound_transfer.py b/stripe/api_resources/treasury/outbound_transfer.py index aefef73b8..5ae606d00 100644 --- a/stripe/api_resources/treasury/outbound_transfer.py +++ b/stripe/api_resources/treasury/outbound_transfer.py @@ -158,135 +158,131 @@ class StatusTransitions(StripeObject): Timestamp describing when an OutboundTransfer changed status to `returned` """ - if TYPE_CHECKING: - - class CancelParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class CancelParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CreateParams(RequestOptions): - amount: int - """ - Amount (in cents) to be transferred. - """ - 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). - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - destination_payment_method: NotRequired["str"] - """ - The PaymentMethod to use as the payment instrument for the OutboundTransfer. - """ - destination_payment_method_options: NotRequired[ - "OutboundTransfer.CreateParamsDestinationPaymentMethodOptions" - ] - """ - Hash describing payment method configuration details. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: str - """ - The FinancialAccount to pull funds from. - """ - 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`. - """ - statement_descriptor: NotRequired["str"] - """ - Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `wire` transfers. The default value is `transfer`. - """ + class CreateParams(RequestOptions): + amount: int + """ + Amount (in cents) to be transferred. + """ + 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). + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + destination_payment_method: NotRequired["str"] + """ + The PaymentMethod to use as the payment instrument for the OutboundTransfer. + """ + destination_payment_method_options: NotRequired[ + "OutboundTransfer.CreateParamsDestinationPaymentMethodOptions" + ] + """ + Hash describing payment method configuration details. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + financial_account: str + """ + The FinancialAccount to pull funds from. + """ + 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`. + """ + statement_descriptor: NotRequired["str"] + """ + Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `wire` transfers. The default value is `transfer`. + """ - class CreateParamsDestinationPaymentMethodOptions(TypedDict): - us_bank_account: NotRequired[ - "Literal['']|OutboundTransfer.CreateParamsDestinationPaymentMethodOptionsUsBankAccount" - ] - """ - Optional fields for `us_bank_account`. - """ + class CreateParamsDestinationPaymentMethodOptions(TypedDict): + us_bank_account: NotRequired[ + "Literal['']|OutboundTransfer.CreateParamsDestinationPaymentMethodOptionsUsBankAccount" + ] + """ + Optional fields for `us_bank_account`. + """ - class CreateParamsDestinationPaymentMethodOptionsUsBankAccount( - TypedDict, - ): - network: NotRequired["Literal['ach', 'us_domestic_wire']"] - """ - Designate the OutboundTransfer as using a US bank account network configuration. - """ + class CreateParamsDestinationPaymentMethodOptionsUsBankAccount(TypedDict): + network: NotRequired["Literal['ach', 'us_domestic_wire']"] + """ + Designate the OutboundTransfer as using a US bank account network configuration. + """ - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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['canceled', 'failed', 'posted', 'processing', 'returned']" - ] - """ - Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. - """ + 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. + """ + financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ + 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['canceled', 'failed', 'posted', 'processing', 'returned']" + ] + """ + Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class FailParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class FailParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class PostParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class PostParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class ReturnOutboundTransferParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - returned_details: NotRequired[ - "OutboundTransfer.ReturnOutboundTransferParamsReturnedDetails" - ] - """ - Details about a returned OutboundTransfer. - """ + class ReturnOutboundTransferParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + returned_details: NotRequired[ + "OutboundTransfer.ReturnOutboundTransferParamsReturnedDetails" + ] + """ + Details about a returned OutboundTransfer. + """ - class ReturnOutboundTransferParamsReturnedDetails(TypedDict): - code: NotRequired[ - "Literal['account_closed', 'account_frozen', 'bank_account_restricted', 'bank_ownership_changed', 'declined', 'incorrect_account_holder_name', 'invalid_account_number', 'invalid_currency', 'no_account', 'other']" - ] - """ - Reason for the return. - """ + class ReturnOutboundTransferParamsReturnedDetails(TypedDict): + code: NotRequired[ + "Literal['account_closed', 'account_frozen', 'bank_account_restricted', 'bank_ownership_changed', 'declined', 'incorrect_account_holder_name', 'invalid_account_number', 'invalid_currency', 'no_account', 'other']" + ] + """ + Reason for the return. + """ amount: int """ diff --git a/stripe/api_resources/treasury/received_credit.py b/stripe/api_resources/treasury/received_credit.py index 43bfd8950..7829f7ef4 100644 --- a/stripe/api_resources/treasury/received_credit.py +++ b/stripe/api_resources/treasury/received_credit.py @@ -198,111 +198,107 @@ class ReversalDetails(StripeObject): Set if a ReceivedCredit cannot be reversed. """ - if TYPE_CHECKING: - - 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. - """ - financial_account: str - """ - The FinancialAccount that received the funds. - """ - 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. - """ - linked_flows: NotRequired["ReceivedCredit.ListParamsLinkedFlows"] - """ - Only return ReceivedCredits described by the flow. - """ - 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['failed', 'succeeded']"] - """ - Only return ReceivedCredits that have the given status: `succeeded` or `failed`. - """ + 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. + """ + financial_account: str + """ + The FinancialAccount that received the funds. + """ + 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. + """ + linked_flows: NotRequired["ReceivedCredit.ListParamsLinkedFlows"] + """ + Only return ReceivedCredits described by the flow. + """ + 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['failed', 'succeeded']"] + """ + Only return ReceivedCredits that have the given status: `succeeded` or `failed`. + """ - class ListParamsLinkedFlows(TypedDict): - source_flow_type: Literal[ - "credit_reversal", "other", "outbound_payment", "payout" - ] - """ - The source flow type. - """ + class ListParamsLinkedFlows(TypedDict): + source_flow_type: Literal[ + "credit_reversal", "other", "outbound_payment", "payout" + ] + """ + The source flow type. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CreateParams(RequestOptions): - amount: int - """ - Amount (in cents) to be transferred. - """ - 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). - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: str - """ - The FinancialAccount to send funds to. - """ - initiating_payment_method_details: NotRequired[ - "ReceivedCredit.CreateParamsInitiatingPaymentMethodDetails" - ] - """ - Initiating payment method details for the object. - """ - network: Literal["ach", "us_domestic_wire"] - """ - The rails used for the object. - """ + class CreateParams(RequestOptions): + amount: int + """ + Amount (in cents) to be transferred. + """ + 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). + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + financial_account: str + """ + The FinancialAccount to send funds to. + """ + initiating_payment_method_details: NotRequired[ + "ReceivedCredit.CreateParamsInitiatingPaymentMethodDetails" + ] + """ + Initiating payment method details for the object. + """ + network: Literal["ach", "us_domestic_wire"] + """ + The rails used for the object. + """ - class CreateParamsInitiatingPaymentMethodDetails(TypedDict): - type: Literal["us_bank_account"] - """ - The source type. - """ - us_bank_account: NotRequired[ - "ReceivedCredit.CreateParamsInitiatingPaymentMethodDetailsUsBankAccount" - ] - """ - Optional fields for `us_bank_account`. - """ + class CreateParamsInitiatingPaymentMethodDetails(TypedDict): + type: Literal["us_bank_account"] + """ + The source type. + """ + us_bank_account: NotRequired[ + "ReceivedCredit.CreateParamsInitiatingPaymentMethodDetailsUsBankAccount" + ] + """ + Optional fields for `us_bank_account`. + """ - class CreateParamsInitiatingPaymentMethodDetailsUsBankAccount( - TypedDict, - ): - account_holder_name: NotRequired["str"] - """ - The bank account holder's name. - """ - account_number: NotRequired["str"] - """ - The bank account number. - """ - routing_number: NotRequired["str"] - """ - The bank account's routing number. - """ + class CreateParamsInitiatingPaymentMethodDetailsUsBankAccount(TypedDict): + account_holder_name: NotRequired["str"] + """ + The bank account holder's name. + """ + account_number: NotRequired["str"] + """ + The bank account number. + """ + routing_number: NotRequired["str"] + """ + The bank account's routing number. + """ amount: int """ diff --git a/stripe/api_resources/treasury/received_debit.py b/stripe/api_resources/treasury/received_debit.py index f038abfc8..f7a955fe8 100644 --- a/stripe/api_resources/treasury/received_debit.py +++ b/stripe/api_resources/treasury/received_debit.py @@ -157,99 +157,95 @@ class ReversalDetails(StripeObject): Set if a ReceivedDebit can't be reversed. """ - if TYPE_CHECKING: - - 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. - """ - financial_account: str - """ - The FinancialAccount that funds were pulled from. - """ - 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['failed', 'succeeded']"] - """ - Only return ReceivedDebits that have the given status: `succeeded` or `failed`. - """ + 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. + """ + financial_account: str + """ + The FinancialAccount that funds were pulled from. + """ + 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['failed', 'succeeded']"] + """ + Only return ReceivedDebits that have the given status: `succeeded` or `failed`. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ - class CreateParams(RequestOptions): - amount: int - """ - Amount (in cents) to be transferred. - """ - 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). - """ - description: NotRequired["str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: str - """ - The FinancialAccount to pull funds from. - """ - initiating_payment_method_details: NotRequired[ - "ReceivedDebit.CreateParamsInitiatingPaymentMethodDetails" - ] - """ - Initiating payment method details for the object. - """ - network: Literal["ach"] - """ - The rails used for the object. - """ + class CreateParams(RequestOptions): + amount: int + """ + Amount (in cents) to be transferred. + """ + 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). + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + financial_account: str + """ + The FinancialAccount to pull funds from. + """ + initiating_payment_method_details: NotRequired[ + "ReceivedDebit.CreateParamsInitiatingPaymentMethodDetails" + ] + """ + Initiating payment method details for the object. + """ + network: Literal["ach"] + """ + The rails used for the object. + """ - class CreateParamsInitiatingPaymentMethodDetails(TypedDict): - type: Literal["us_bank_account"] - """ - The source type. - """ - us_bank_account: NotRequired[ - "ReceivedDebit.CreateParamsInitiatingPaymentMethodDetailsUsBankAccount" - ] - """ - Optional fields for `us_bank_account`. - """ + class CreateParamsInitiatingPaymentMethodDetails(TypedDict): + type: Literal["us_bank_account"] + """ + The source type. + """ + us_bank_account: NotRequired[ + "ReceivedDebit.CreateParamsInitiatingPaymentMethodDetailsUsBankAccount" + ] + """ + Optional fields for `us_bank_account`. + """ - class CreateParamsInitiatingPaymentMethodDetailsUsBankAccount( - TypedDict, - ): - account_holder_name: NotRequired["str"] - """ - The bank account holder's name. - """ - account_number: NotRequired["str"] - """ - The bank account number. - """ - routing_number: NotRequired["str"] - """ - The bank account's routing number. - """ + class CreateParamsInitiatingPaymentMethodDetailsUsBankAccount(TypedDict): + account_holder_name: NotRequired["str"] + """ + The bank account holder's name. + """ + account_number: NotRequired["str"] + """ + The bank account number. + """ + routing_number: NotRequired["str"] + """ + The bank account's routing number. + """ amount: int """ diff --git a/stripe/api_resources/treasury/transaction.py b/stripe/api_resources/treasury/transaction.py index a0130d4d1..128dfde6f 100644 --- a/stripe/api_resources/treasury/transaction.py +++ b/stripe/api_resources/treasury/transaction.py @@ -118,94 +118,92 @@ class StatusTransitions(StripeObject): Timestamp describing when the Transaction changed status to `void`. """ - if TYPE_CHECKING: - - class ListParams(RequestOptions): - created: NotRequired["Transaction.ListParamsCreated|int"] - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - order_by: NotRequired["Literal['created', 'posted_at']"] - """ - The results are in reverse chronological order by `created` or `posted_at`. The default is `created`. - """ - 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['open', 'posted', 'void']"] - """ - Only return Transactions that have the given status: `open`, `posted`, or `void`. - """ - status_transitions: NotRequired[ - "Transaction.ListParamsStatusTransitions" - ] - """ - A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. - """ + class ListParams(RequestOptions): + created: NotRequired["Transaction.ListParamsCreated|int"] + 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. + """ + financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ + 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. + """ + order_by: NotRequired["Literal['created', 'posted_at']"] + """ + The results are in reverse chronological order by `created` or `posted_at`. The default is `created`. + """ + 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['open', 'posted', 'void']"] + """ + Only return Transactions that have the given status: `open`, `posted`, or `void`. + """ + status_transitions: NotRequired[ + "Transaction.ListParamsStatusTransitions" + ] + """ + A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. + """ - class ListParamsStatusTransitions(TypedDict): - posted_at: NotRequired[ - "Transaction.ListParamsStatusTransitionsPostedAt|int" - ] - """ - Returns Transactions with `posted_at` within the specified range. - """ + class ListParamsStatusTransitions(TypedDict): + posted_at: NotRequired[ + "Transaction.ListParamsStatusTransitionsPostedAt|int" + ] + """ + Returns Transactions with `posted_at` within the specified range. + """ - class ListParamsStatusTransitionsPostedAt(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsStatusTransitionsPostedAt(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ amount: int """ diff --git a/stripe/api_resources/treasury/transaction_entry.py b/stripe/api_resources/treasury/transaction_entry.py index 2f330eb87..19deffa01 100644 --- a/stripe/api_resources/treasury/transaction_entry.py +++ b/stripe/api_resources/treasury/transaction_entry.py @@ -107,83 +107,79 @@ class FlowDetails(StripeObject): Type of the flow that created the Transaction. Set to the same value as `flow_type`. """ - if TYPE_CHECKING: - - class ListParams(RequestOptions): - created: NotRequired["TransactionEntry.ListParamsCreated|int"] - effective_at: NotRequired[ - "TransactionEntry.ListParamsEffectiveAt|int" - ] - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - order_by: NotRequired["Literal['created', 'effective_at']"] - """ - The results are in reverse chronological order by `created` or `effective_at`. The default is `created`. - """ - 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. - """ - transaction: NotRequired["str"] - """ - Only return TransactionEntries associated with this Transaction. - """ + class ListParams(RequestOptions): + created: NotRequired["TransactionEntry.ListParamsCreated|int"] + effective_at: NotRequired["TransactionEntry.ListParamsEffectiveAt|int"] + 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. + """ + financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ + 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. + """ + order_by: NotRequired["Literal['created', 'effective_at']"] + """ + The results are in reverse chronological order by `created` or `effective_at`. The default is `created`. + """ + 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. + """ + transaction: NotRequired["str"] + """ + Only return TransactionEntries associated with this Transaction. + """ - class ListParamsEffectiveAt(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsEffectiveAt(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class ListParamsCreated(TypedDict): - gt: NotRequired["int"] - """ - Minimum value to filter by (exclusive) - """ - gte: NotRequired["int"] - """ - Minimum value to filter by (inclusive) - """ - lt: NotRequired["int"] - """ - Maximum value to filter by (exclusive) - """ - lte: NotRequired["int"] - """ - Maximum value to filter by (inclusive) - """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ balance_impact: BalanceImpact """ diff --git a/stripe/api_resources/webhook_endpoint.py b/stripe/api_resources/webhook_endpoint.py index 1366ea026..5df5097de 100644 --- a/stripe/api_resources/webhook_endpoint.py +++ b/stripe/api_resources/webhook_endpoint.py @@ -10,7 +10,7 @@ from stripe.request_options import RequestOptions from stripe.util import class_method_variant from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing_extensions import Literal, NotRequired, Unpack from urllib.parse import quote_plus @@ -31,323 +31,322 @@ class WebhookEndpoint( """ OBJECT_NAME: ClassVar[Literal["webhook_endpoint"]] = "webhook_endpoint" - if TYPE_CHECKING: - class CreateParams(RequestOptions): - api_version: NotRequired[ - "Literal['2011-01-01', '2011-06-21', '2011-06-28', '2011-08-01', '2011-09-15', '2011-11-17', '2012-02-23', '2012-03-25', '2012-06-18', '2012-06-28', '2012-07-09', '2012-09-24', '2012-10-26', '2012-11-07', '2013-02-11', '2013-02-13', '2013-07-05', '2013-08-12', '2013-08-13', '2013-10-29', '2013-12-03', '2014-01-31', '2014-03-13', '2014-03-28', '2014-05-19', '2014-06-13', '2014-06-17', '2014-07-22', '2014-07-26', '2014-08-04', '2014-08-20', '2014-09-08', '2014-10-07', '2014-11-05', '2014-11-20', '2014-12-08', '2014-12-17', '2014-12-22', '2015-01-11', '2015-01-26', '2015-02-10', '2015-02-16', '2015-02-18', '2015-03-24', '2015-04-07', '2015-06-15', '2015-07-07', '2015-07-13', '2015-07-28', '2015-08-07', '2015-08-19', '2015-09-03', '2015-09-08', '2015-09-23', '2015-10-01', '2015-10-12', '2015-10-16', '2016-02-03', '2016-02-19', '2016-02-22', '2016-02-23', '2016-02-29', '2016-03-07', '2016-06-15', '2016-07-06', '2016-10-19', '2017-01-27', '2017-02-14', '2017-04-06', '2017-05-25', '2017-06-05', '2017-08-15', '2017-12-14', '2018-01-23', '2018-02-05', '2018-02-06', '2018-02-28', '2018-05-21', '2018-07-27', '2018-08-23', '2018-09-06', '2018-09-24', '2018-10-31', '2018-11-08', '2019-02-11', '2019-02-19', '2019-03-14', '2019-05-16', '2019-08-14', '2019-09-09', '2019-10-08', '2019-10-17', '2019-11-05', '2019-12-03', '2020-03-02', '2020-08-27', '2022-08-01', '2022-11-15', '2023-08-16', '2023-10-16']" - ] - """ - Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. - """ - connect: NotRequired["bool"] - """ - Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. - """ - description: NotRequired["Literal['']|str"] - """ - An optional description of what the webhook is used for. - """ - enabled_events: List[ - Literal[ - "*", - "account.application.authorized", - "account.application.deauthorized", - "account.external_account.created", - "account.external_account.deleted", - "account.external_account.updated", - "account.updated", - "application_fee.created", - "application_fee.refund.updated", - "application_fee.refunded", - "balance.available", - "billing_portal.configuration.created", - "billing_portal.configuration.updated", - "billing_portal.session.created", - "capability.updated", - "cash_balance.funds_available", - "charge.captured", - "charge.dispute.closed", - "charge.dispute.created", - "charge.dispute.funds_reinstated", - "charge.dispute.funds_withdrawn", - "charge.dispute.updated", - "charge.expired", - "charge.failed", - "charge.pending", - "charge.refund.updated", - "charge.refunded", - "charge.succeeded", - "charge.updated", - "checkout.session.async_payment_failed", - "checkout.session.async_payment_succeeded", - "checkout.session.completed", - "checkout.session.expired", - "coupon.created", - "coupon.deleted", - "coupon.updated", - "credit_note.created", - "credit_note.updated", - "credit_note.voided", - "customer.created", - "customer.deleted", - "customer.discount.created", - "customer.discount.deleted", - "customer.discount.updated", - "customer.source.created", - "customer.source.deleted", - "customer.source.expiring", - "customer.source.updated", - "customer.subscription.created", - "customer.subscription.deleted", - "customer.subscription.paused", - "customer.subscription.pending_update_applied", - "customer.subscription.pending_update_expired", - "customer.subscription.resumed", - "customer.subscription.trial_will_end", - "customer.subscription.updated", - "customer.tax_id.created", - "customer.tax_id.deleted", - "customer.tax_id.updated", - "customer.updated", - "customer_cash_balance_transaction.created", - "file.created", - "financial_connections.account.created", - "financial_connections.account.deactivated", - "financial_connections.account.disconnected", - "financial_connections.account.reactivated", - "financial_connections.account.refreshed_balance", - "identity.verification_session.canceled", - "identity.verification_session.created", - "identity.verification_session.processing", - "identity.verification_session.redacted", - "identity.verification_session.requires_input", - "identity.verification_session.verified", - "invoice.created", - "invoice.deleted", - "invoice.finalization_failed", - "invoice.finalized", - "invoice.marked_uncollectible", - "invoice.paid", - "invoice.payment_action_required", - "invoice.payment_failed", - "invoice.payment_succeeded", - "invoice.sent", - "invoice.upcoming", - "invoice.updated", - "invoice.voided", - "invoiceitem.created", - "invoiceitem.deleted", - "issuing_authorization.created", - "issuing_authorization.request", - "issuing_authorization.updated", - "issuing_card.created", - "issuing_card.updated", - "issuing_cardholder.created", - "issuing_cardholder.updated", - "issuing_dispute.closed", - "issuing_dispute.created", - "issuing_dispute.funds_reinstated", - "issuing_dispute.submitted", - "issuing_dispute.updated", - "issuing_token.created", - "issuing_token.updated", - "issuing_transaction.created", - "issuing_transaction.updated", - "mandate.updated", - "payment_intent.amount_capturable_updated", - "payment_intent.canceled", - "payment_intent.created", - "payment_intent.partially_funded", - "payment_intent.payment_failed", - "payment_intent.processing", - "payment_intent.requires_action", - "payment_intent.succeeded", - "payment_link.created", - "payment_link.updated", - "payment_method.attached", - "payment_method.automatically_updated", - "payment_method.detached", - "payment_method.updated", - "payout.canceled", - "payout.created", - "payout.failed", - "payout.paid", - "payout.reconciliation_completed", - "payout.updated", - "person.created", - "person.deleted", - "person.updated", - "plan.created", - "plan.deleted", - "plan.updated", - "price.created", - "price.deleted", - "price.updated", - "product.created", - "product.deleted", - "product.updated", - "promotion_code.created", - "promotion_code.updated", - "quote.accepted", - "quote.canceled", - "quote.created", - "quote.finalized", - "radar.early_fraud_warning.created", - "radar.early_fraud_warning.updated", - "refund.created", - "refund.updated", - "reporting.report_run.failed", - "reporting.report_run.succeeded", - "reporting.report_type.updated", - "review.closed", - "review.opened", - "setup_intent.canceled", - "setup_intent.created", - "setup_intent.requires_action", - "setup_intent.setup_failed", - "setup_intent.succeeded", - "sigma.scheduled_query_run.created", - "source.canceled", - "source.chargeable", - "source.failed", - "source.mandate_notification", - "source.refund_attributes_required", - "source.transaction.created", - "source.transaction.updated", - "subscription_schedule.aborted", - "subscription_schedule.canceled", - "subscription_schedule.completed", - "subscription_schedule.created", - "subscription_schedule.expiring", - "subscription_schedule.released", - "subscription_schedule.updated", - "tax.settings.updated", - "tax_rate.created", - "tax_rate.updated", - "terminal.reader.action_failed", - "terminal.reader.action_succeeded", - "test_helpers.test_clock.advancing", - "test_helpers.test_clock.created", - "test_helpers.test_clock.deleted", - "test_helpers.test_clock.internal_failure", - "test_helpers.test_clock.ready", - "topup.canceled", - "topup.created", - "topup.failed", - "topup.reversed", - "topup.succeeded", - "transfer.created", - "transfer.reversed", - "transfer.updated", - "treasury.credit_reversal.created", - "treasury.credit_reversal.posted", - "treasury.debit_reversal.completed", - "treasury.debit_reversal.created", - "treasury.debit_reversal.initial_credit_granted", - "treasury.financial_account.closed", - "treasury.financial_account.created", - "treasury.financial_account.features_status_updated", - "treasury.inbound_transfer.canceled", - "treasury.inbound_transfer.created", - "treasury.inbound_transfer.failed", - "treasury.inbound_transfer.succeeded", - "treasury.outbound_payment.canceled", - "treasury.outbound_payment.created", - "treasury.outbound_payment.expected_arrival_date_updated", - "treasury.outbound_payment.failed", - "treasury.outbound_payment.posted", - "treasury.outbound_payment.returned", - "treasury.outbound_transfer.canceled", - "treasury.outbound_transfer.created", - "treasury.outbound_transfer.expected_arrival_date_updated", - "treasury.outbound_transfer.failed", - "treasury.outbound_transfer.posted", - "treasury.outbound_transfer.returned", - "treasury.received_credit.created", - "treasury.received_credit.failed", - "treasury.received_credit.succeeded", - "treasury.received_debit.created", - "invoiceitem.updated", - "order.created", - "recipient.created", - "recipient.deleted", - "recipient.updated", - "sku.created", - "sku.deleted", - "sku.updated", - ] + class CreateParams(RequestOptions): + api_version: NotRequired[ + "Literal['2011-01-01', '2011-06-21', '2011-06-28', '2011-08-01', '2011-09-15', '2011-11-17', '2012-02-23', '2012-03-25', '2012-06-18', '2012-06-28', '2012-07-09', '2012-09-24', '2012-10-26', '2012-11-07', '2013-02-11', '2013-02-13', '2013-07-05', '2013-08-12', '2013-08-13', '2013-10-29', '2013-12-03', '2014-01-31', '2014-03-13', '2014-03-28', '2014-05-19', '2014-06-13', '2014-06-17', '2014-07-22', '2014-07-26', '2014-08-04', '2014-08-20', '2014-09-08', '2014-10-07', '2014-11-05', '2014-11-20', '2014-12-08', '2014-12-17', '2014-12-22', '2015-01-11', '2015-01-26', '2015-02-10', '2015-02-16', '2015-02-18', '2015-03-24', '2015-04-07', '2015-06-15', '2015-07-07', '2015-07-13', '2015-07-28', '2015-08-07', '2015-08-19', '2015-09-03', '2015-09-08', '2015-09-23', '2015-10-01', '2015-10-12', '2015-10-16', '2016-02-03', '2016-02-19', '2016-02-22', '2016-02-23', '2016-02-29', '2016-03-07', '2016-06-15', '2016-07-06', '2016-10-19', '2017-01-27', '2017-02-14', '2017-04-06', '2017-05-25', '2017-06-05', '2017-08-15', '2017-12-14', '2018-01-23', '2018-02-05', '2018-02-06', '2018-02-28', '2018-05-21', '2018-07-27', '2018-08-23', '2018-09-06', '2018-09-24', '2018-10-31', '2018-11-08', '2019-02-11', '2019-02-19', '2019-03-14', '2019-05-16', '2019-08-14', '2019-09-09', '2019-10-08', '2019-10-17', '2019-11-05', '2019-12-03', '2020-03-02', '2020-08-27', '2022-08-01', '2022-11-15', '2023-08-16', '2023-10-16']" + ] + """ + Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. + """ + connect: NotRequired["bool"] + """ + Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. + """ + description: NotRequired["Literal['']|str"] + """ + An optional description of what the webhook is used for. + """ + enabled_events: List[ + Literal[ + "*", + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.created", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "file.created", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.paid", + "invoice.payment_action_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoiceitem.created", + "invoiceitem.deleted", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_token.created", + "issuing_token.updated", + "issuing_transaction.created", + "issuing_transaction.updated", + "mandate.updated", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.reconciliation_completed", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accepted", + "quote.canceled", + "quote.created", + "quote.finalized", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "refund.created", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax.settings.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created", + "invoiceitem.updated", + "order.created", + "recipient.created", + "recipient.deleted", + "recipient.updated", + "sku.created", + "sku.deleted", + "sku.updated", ] - """ - The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - url: str - """ - The URL of the webhook endpoint. - """ + ] + """ + The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + url: str + """ + The URL of the webhook endpoint. + """ - class DeleteParams(RequestOptions): - pass + class DeleteParams(RequestOptions): + pass - 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. - """ + 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. + """ - class ModifyParams(RequestOptions): - description: NotRequired["Literal['']|str"] - """ - An optional description of what the webhook is used for. - """ - disabled: NotRequired["bool"] - """ - Disable the webhook endpoint if set to true. - """ - enabled_events: NotRequired[ - "List[Literal['*', 'account.application.authorized', 'account.application.deauthorized', 'account.external_account.created', 'account.external_account.deleted', 'account.external_account.updated', 'account.updated', 'application_fee.created', 'application_fee.refund.updated', 'application_fee.refunded', 'balance.available', 'billing_portal.configuration.created', 'billing_portal.configuration.updated', 'billing_portal.session.created', 'capability.updated', 'cash_balance.funds_available', 'charge.captured', 'charge.dispute.closed', 'charge.dispute.created', 'charge.dispute.funds_reinstated', 'charge.dispute.funds_withdrawn', 'charge.dispute.updated', 'charge.expired', 'charge.failed', 'charge.pending', 'charge.refund.updated', 'charge.refunded', 'charge.succeeded', 'charge.updated', 'checkout.session.async_payment_failed', 'checkout.session.async_payment_succeeded', 'checkout.session.completed', 'checkout.session.expired', 'coupon.created', 'coupon.deleted', 'coupon.updated', 'credit_note.created', 'credit_note.updated', 'credit_note.voided', 'customer.created', 'customer.deleted', 'customer.discount.created', 'customer.discount.deleted', 'customer.discount.updated', 'customer.source.created', 'customer.source.deleted', 'customer.source.expiring', 'customer.source.updated', 'customer.subscription.created', 'customer.subscription.deleted', 'customer.subscription.paused', 'customer.subscription.pending_update_applied', 'customer.subscription.pending_update_expired', 'customer.subscription.resumed', 'customer.subscription.trial_will_end', 'customer.subscription.updated', 'customer.tax_id.created', 'customer.tax_id.deleted', 'customer.tax_id.updated', 'customer.updated', 'customer_cash_balance_transaction.created', 'file.created', 'financial_connections.account.created', 'financial_connections.account.deactivated', 'financial_connections.account.disconnected', 'financial_connections.account.reactivated', 'financial_connections.account.refreshed_balance', 'identity.verification_session.canceled', 'identity.verification_session.created', 'identity.verification_session.processing', 'identity.verification_session.redacted', 'identity.verification_session.requires_input', 'identity.verification_session.verified', 'invoice.created', 'invoice.deleted', 'invoice.finalization_failed', 'invoice.finalized', 'invoice.marked_uncollectible', 'invoice.paid', 'invoice.payment_action_required', 'invoice.payment_failed', 'invoice.payment_succeeded', 'invoice.sent', 'invoice.upcoming', 'invoice.updated', 'invoice.voided', 'invoiceitem.created', 'invoiceitem.deleted', 'issuing_authorization.created', 'issuing_authorization.request', 'issuing_authorization.updated', 'issuing_card.created', 'issuing_card.updated', 'issuing_cardholder.created', 'issuing_cardholder.updated', 'issuing_dispute.closed', 'issuing_dispute.created', 'issuing_dispute.funds_reinstated', 'issuing_dispute.submitted', 'issuing_dispute.updated', 'issuing_token.created', 'issuing_token.updated', 'issuing_transaction.created', 'issuing_transaction.updated', 'mandate.updated', 'payment_intent.amount_capturable_updated', 'payment_intent.canceled', 'payment_intent.created', 'payment_intent.partially_funded', 'payment_intent.payment_failed', 'payment_intent.processing', 'payment_intent.requires_action', 'payment_intent.succeeded', 'payment_link.created', 'payment_link.updated', 'payment_method.attached', 'payment_method.automatically_updated', 'payment_method.detached', 'payment_method.updated', 'payout.canceled', 'payout.created', 'payout.failed', 'payout.paid', 'payout.reconciliation_completed', 'payout.updated', 'person.created', 'person.deleted', 'person.updated', 'plan.created', 'plan.deleted', 'plan.updated', 'price.created', 'price.deleted', 'price.updated', 'product.created', 'product.deleted', 'product.updated', 'promotion_code.created', 'promotion_code.updated', 'quote.accepted', 'quote.canceled', 'quote.created', 'quote.finalized', 'radar.early_fraud_warning.created', 'radar.early_fraud_warning.updated', 'refund.created', 'refund.updated', 'reporting.report_run.failed', 'reporting.report_run.succeeded', 'reporting.report_type.updated', 'review.closed', 'review.opened', 'setup_intent.canceled', 'setup_intent.created', 'setup_intent.requires_action', 'setup_intent.setup_failed', 'setup_intent.succeeded', 'sigma.scheduled_query_run.created', 'source.canceled', 'source.chargeable', 'source.failed', 'source.mandate_notification', 'source.refund_attributes_required', 'source.transaction.created', 'source.transaction.updated', 'subscription_schedule.aborted', 'subscription_schedule.canceled', 'subscription_schedule.completed', 'subscription_schedule.created', 'subscription_schedule.expiring', 'subscription_schedule.released', 'subscription_schedule.updated', 'tax.settings.updated', 'tax_rate.created', 'tax_rate.updated', 'terminal.reader.action_failed', 'terminal.reader.action_succeeded', 'test_helpers.test_clock.advancing', 'test_helpers.test_clock.created', 'test_helpers.test_clock.deleted', 'test_helpers.test_clock.internal_failure', 'test_helpers.test_clock.ready', 'topup.canceled', 'topup.created', 'topup.failed', 'topup.reversed', 'topup.succeeded', 'transfer.created', 'transfer.reversed', 'transfer.updated', 'treasury.credit_reversal.created', 'treasury.credit_reversal.posted', 'treasury.debit_reversal.completed', 'treasury.debit_reversal.created', 'treasury.debit_reversal.initial_credit_granted', 'treasury.financial_account.closed', 'treasury.financial_account.created', 'treasury.financial_account.features_status_updated', 'treasury.inbound_transfer.canceled', 'treasury.inbound_transfer.created', 'treasury.inbound_transfer.failed', 'treasury.inbound_transfer.succeeded', 'treasury.outbound_payment.canceled', 'treasury.outbound_payment.created', 'treasury.outbound_payment.expected_arrival_date_updated', 'treasury.outbound_payment.failed', 'treasury.outbound_payment.posted', 'treasury.outbound_payment.returned', 'treasury.outbound_transfer.canceled', 'treasury.outbound_transfer.created', 'treasury.outbound_transfer.expected_arrival_date_updated', 'treasury.outbound_transfer.failed', 'treasury.outbound_transfer.posted', 'treasury.outbound_transfer.returned', 'treasury.received_credit.created', 'treasury.received_credit.failed', 'treasury.received_credit.succeeded', 'treasury.received_debit.created', 'invoiceitem.updated', 'order.created', 'recipient.created', 'recipient.deleted', 'recipient.updated', 'sku.created', 'sku.deleted', 'sku.updated']]" - ] - """ - The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. - """ - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|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`. - """ - url: NotRequired["str"] - """ - The URL of the webhook endpoint. - """ + class ModifyParams(RequestOptions): + description: NotRequired["Literal['']|str"] + """ + An optional description of what the webhook is used for. + """ + disabled: NotRequired["bool"] + """ + Disable the webhook endpoint if set to true. + """ + enabled_events: NotRequired[ + "List[Literal['*', 'account.application.authorized', 'account.application.deauthorized', 'account.external_account.created', 'account.external_account.deleted', 'account.external_account.updated', 'account.updated', 'application_fee.created', 'application_fee.refund.updated', 'application_fee.refunded', 'balance.available', 'billing_portal.configuration.created', 'billing_portal.configuration.updated', 'billing_portal.session.created', 'capability.updated', 'cash_balance.funds_available', 'charge.captured', 'charge.dispute.closed', 'charge.dispute.created', 'charge.dispute.funds_reinstated', 'charge.dispute.funds_withdrawn', 'charge.dispute.updated', 'charge.expired', 'charge.failed', 'charge.pending', 'charge.refund.updated', 'charge.refunded', 'charge.succeeded', 'charge.updated', 'checkout.session.async_payment_failed', 'checkout.session.async_payment_succeeded', 'checkout.session.completed', 'checkout.session.expired', 'coupon.created', 'coupon.deleted', 'coupon.updated', 'credit_note.created', 'credit_note.updated', 'credit_note.voided', 'customer.created', 'customer.deleted', 'customer.discount.created', 'customer.discount.deleted', 'customer.discount.updated', 'customer.source.created', 'customer.source.deleted', 'customer.source.expiring', 'customer.source.updated', 'customer.subscription.created', 'customer.subscription.deleted', 'customer.subscription.paused', 'customer.subscription.pending_update_applied', 'customer.subscription.pending_update_expired', 'customer.subscription.resumed', 'customer.subscription.trial_will_end', 'customer.subscription.updated', 'customer.tax_id.created', 'customer.tax_id.deleted', 'customer.tax_id.updated', 'customer.updated', 'customer_cash_balance_transaction.created', 'file.created', 'financial_connections.account.created', 'financial_connections.account.deactivated', 'financial_connections.account.disconnected', 'financial_connections.account.reactivated', 'financial_connections.account.refreshed_balance', 'identity.verification_session.canceled', 'identity.verification_session.created', 'identity.verification_session.processing', 'identity.verification_session.redacted', 'identity.verification_session.requires_input', 'identity.verification_session.verified', 'invoice.created', 'invoice.deleted', 'invoice.finalization_failed', 'invoice.finalized', 'invoice.marked_uncollectible', 'invoice.paid', 'invoice.payment_action_required', 'invoice.payment_failed', 'invoice.payment_succeeded', 'invoice.sent', 'invoice.upcoming', 'invoice.updated', 'invoice.voided', 'invoiceitem.created', 'invoiceitem.deleted', 'issuing_authorization.created', 'issuing_authorization.request', 'issuing_authorization.updated', 'issuing_card.created', 'issuing_card.updated', 'issuing_cardholder.created', 'issuing_cardholder.updated', 'issuing_dispute.closed', 'issuing_dispute.created', 'issuing_dispute.funds_reinstated', 'issuing_dispute.submitted', 'issuing_dispute.updated', 'issuing_token.created', 'issuing_token.updated', 'issuing_transaction.created', 'issuing_transaction.updated', 'mandate.updated', 'payment_intent.amount_capturable_updated', 'payment_intent.canceled', 'payment_intent.created', 'payment_intent.partially_funded', 'payment_intent.payment_failed', 'payment_intent.processing', 'payment_intent.requires_action', 'payment_intent.succeeded', 'payment_link.created', 'payment_link.updated', 'payment_method.attached', 'payment_method.automatically_updated', 'payment_method.detached', 'payment_method.updated', 'payout.canceled', 'payout.created', 'payout.failed', 'payout.paid', 'payout.reconciliation_completed', 'payout.updated', 'person.created', 'person.deleted', 'person.updated', 'plan.created', 'plan.deleted', 'plan.updated', 'price.created', 'price.deleted', 'price.updated', 'product.created', 'product.deleted', 'product.updated', 'promotion_code.created', 'promotion_code.updated', 'quote.accepted', 'quote.canceled', 'quote.created', 'quote.finalized', 'radar.early_fraud_warning.created', 'radar.early_fraud_warning.updated', 'refund.created', 'refund.updated', 'reporting.report_run.failed', 'reporting.report_run.succeeded', 'reporting.report_type.updated', 'review.closed', 'review.opened', 'setup_intent.canceled', 'setup_intent.created', 'setup_intent.requires_action', 'setup_intent.setup_failed', 'setup_intent.succeeded', 'sigma.scheduled_query_run.created', 'source.canceled', 'source.chargeable', 'source.failed', 'source.mandate_notification', 'source.refund_attributes_required', 'source.transaction.created', 'source.transaction.updated', 'subscription_schedule.aborted', 'subscription_schedule.canceled', 'subscription_schedule.completed', 'subscription_schedule.created', 'subscription_schedule.expiring', 'subscription_schedule.released', 'subscription_schedule.updated', 'tax.settings.updated', 'tax_rate.created', 'tax_rate.updated', 'terminal.reader.action_failed', 'terminal.reader.action_succeeded', 'test_helpers.test_clock.advancing', 'test_helpers.test_clock.created', 'test_helpers.test_clock.deleted', 'test_helpers.test_clock.internal_failure', 'test_helpers.test_clock.ready', 'topup.canceled', 'topup.created', 'topup.failed', 'topup.reversed', 'topup.succeeded', 'transfer.created', 'transfer.reversed', 'transfer.updated', 'treasury.credit_reversal.created', 'treasury.credit_reversal.posted', 'treasury.debit_reversal.completed', 'treasury.debit_reversal.created', 'treasury.debit_reversal.initial_credit_granted', 'treasury.financial_account.closed', 'treasury.financial_account.created', 'treasury.financial_account.features_status_updated', 'treasury.inbound_transfer.canceled', 'treasury.inbound_transfer.created', 'treasury.inbound_transfer.failed', 'treasury.inbound_transfer.succeeded', 'treasury.outbound_payment.canceled', 'treasury.outbound_payment.created', 'treasury.outbound_payment.expected_arrival_date_updated', 'treasury.outbound_payment.failed', 'treasury.outbound_payment.posted', 'treasury.outbound_payment.returned', 'treasury.outbound_transfer.canceled', 'treasury.outbound_transfer.created', 'treasury.outbound_transfer.expected_arrival_date_updated', 'treasury.outbound_transfer.failed', 'treasury.outbound_transfer.posted', 'treasury.outbound_transfer.returned', 'treasury.received_credit.created', 'treasury.received_credit.failed', 'treasury.received_credit.succeeded', 'treasury.received_debit.created', 'invoiceitem.updated', 'order.created', 'recipient.created', 'recipient.deleted', 'recipient.updated', 'sku.created', 'sku.deleted', 'sku.updated']]" + ] + """ + The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|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`. + """ + url: NotRequired["str"] + """ + The URL of the webhook endpoint. + """ - class RetrieveParams(RequestOptions): - expand: NotRequired["List[str]"] - """ - Specifies which fields in the response should be expanded. - """ + class RetrieveParams(RequestOptions): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ api_version: Optional[str] """ diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index 31f5e144a..870cd1700 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -3,9 +3,11 @@ from __future__ import absolute_import, division, print_function import stripe +from typing import Any + class TestGeneratedExamples(object): - def test_account_links_post(self, request_mock): + def test_account_links_post(self, request_mock: Any) -> None: stripe.AccountLink.create( account="acct_xxxxxxxxxxxxx", refresh_url="https://example.com/reauth", @@ -17,14 +19,14 @@ def test_account_links_post(self, request_mock): "/v1/account_links", ) - def test_accounts_capabilities_get(self, request_mock): + def test_accounts_capabilities_get(self, request_mock: Any) -> None: stripe.Account.list_capabilities("acct_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities", ) - def test_accounts_capabilities_get_2(self, request_mock): + def test_accounts_capabilities_get_2(self, request_mock: Any) -> None: stripe.Account.retrieve_capability( "acct_xxxxxxxxxxxxx", "card_payments", @@ -34,7 +36,7 @@ def test_accounts_capabilities_get_2(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities/card_payments", ) - def test_accounts_capabilities_post(self, request_mock): + def test_accounts_capabilities_post(self, request_mock: Any) -> None: stripe.Account.modify_capability( "acct_xxxxxxxxxxxxx", "card_payments", @@ -45,14 +47,16 @@ def test_accounts_capabilities_post(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities/card_payments", ) - def test_accounts_delete(self, request_mock): + def test_accounts_delete(self, request_mock: Any) -> None: stripe.Account.delete("acct_xxxxxxxxxxxxx") request_mock.assert_requested( "delete", "/v1/accounts/acct_xxxxxxxxxxxxx", ) - def test_accounts_external_accounts_delete(self, request_mock): + def test_accounts_external_accounts_delete( + self, request_mock: Any + ) -> None: stripe.Account.delete_external_account( "acct_xxxxxxxxxxxxx", "ba_xxxxxxxxxxxxx", @@ -62,7 +66,9 @@ def test_accounts_external_accounts_delete(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts/ba_xxxxxxxxxxxxx", ) - def test_accounts_external_accounts_delete_2(self, request_mock): + def test_accounts_external_accounts_delete_2( + self, request_mock: Any + ) -> None: stripe.Account.delete_external_account( "acct_xxxxxxxxxxxxx", "card_xxxxxxxxxxxxx", @@ -72,7 +78,7 @@ def test_accounts_external_accounts_delete_2(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts/card_xxxxxxxxxxxxx", ) - def test_accounts_external_accounts_get(self, request_mock): + def test_accounts_external_accounts_get(self, request_mock: Any) -> None: stripe.Account.list_external_accounts( "acct_xxxxxxxxxxxxx", limit=3, @@ -82,7 +88,7 @@ def test_accounts_external_accounts_get(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts", ) - def test_accounts_external_accounts_get_2(self, request_mock): + def test_accounts_external_accounts_get_2(self, request_mock: Any) -> None: stripe.Account.list_external_accounts( "acct_xxxxxxxxxxxxx", object="bank_account", @@ -93,7 +99,7 @@ def test_accounts_external_accounts_get_2(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts", ) - def test_accounts_external_accounts_get_3(self, request_mock): + def test_accounts_external_accounts_get_3(self, request_mock: Any) -> None: stripe.Account.list_external_accounts( "acct_xxxxxxxxxxxxx", object="card", @@ -104,7 +110,7 @@ def test_accounts_external_accounts_get_3(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts", ) - def test_accounts_external_accounts_get_4(self, request_mock): + def test_accounts_external_accounts_get_4(self, request_mock: Any) -> None: stripe.Account.retrieve_external_account( "acct_xxxxxxxxxxxxx", "ba_xxxxxxxxxxxxx", @@ -114,7 +120,7 @@ def test_accounts_external_accounts_get_4(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts/ba_xxxxxxxxxxxxx", ) - def test_accounts_external_accounts_get_5(self, request_mock): + def test_accounts_external_accounts_get_5(self, request_mock: Any) -> None: stripe.Account.retrieve_external_account( "acct_xxxxxxxxxxxxx", "card_xxxxxxxxxxxxx", @@ -124,7 +130,7 @@ def test_accounts_external_accounts_get_5(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts/card_xxxxxxxxxxxxx", ) - def test_accounts_external_accounts_post(self, request_mock): + def test_accounts_external_accounts_post(self, request_mock: Any) -> None: stripe.Account.create_external_account( "acct_xxxxxxxxxxxxx", external_account="btok_xxxxxxxxxxxxx", @@ -134,7 +140,9 @@ def test_accounts_external_accounts_post(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts", ) - def test_accounts_external_accounts_post_2(self, request_mock): + def test_accounts_external_accounts_post_2( + self, request_mock: Any + ) -> None: stripe.Account.create_external_account( "acct_xxxxxxxxxxxxx", external_account="tok_xxxx_debit", @@ -144,7 +152,9 @@ def test_accounts_external_accounts_post_2(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts", ) - def test_accounts_external_accounts_post_3(self, request_mock): + def test_accounts_external_accounts_post_3( + self, request_mock: Any + ) -> None: stripe.Account.modify_external_account( "acct_xxxxxxxxxxxxx", "ba_xxxxxxxxxxxxx", @@ -155,7 +165,9 @@ def test_accounts_external_accounts_post_3(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts/ba_xxxxxxxxxxxxx", ) - def test_accounts_external_accounts_post_4(self, request_mock): + def test_accounts_external_accounts_post_4( + self, request_mock: Any + ) -> None: stripe.Account.modify_external_account( "acct_xxxxxxxxxxxxx", "card_xxxxxxxxxxxxx", @@ -166,28 +178,28 @@ def test_accounts_external_accounts_post_4(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/external_accounts/card_xxxxxxxxxxxxx", ) - def test_accounts_get(self, request_mock): + def test_accounts_get(self, request_mock: Any) -> None: stripe.Account.list(limit=3) request_mock.assert_requested( "get", "/v1/accounts", ) - def test_accounts_get_2(self, request_mock): + def test_accounts_get_2(self, request_mock: Any) -> None: stripe.Account.retrieve("acct_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/accounts/acct_xxxxxxxxxxxxx", ) - def test_accounts_login_links_post(self, request_mock): + def test_accounts_login_links_post(self, request_mock: Any) -> None: stripe.Account.create_login_link("acct_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/accounts/acct_xxxxxxxxxxxxx/login_links", ) - def test_accounts_persons_delete(self, request_mock): + def test_accounts_persons_delete(self, request_mock: Any) -> None: stripe.Account.delete_person( "acct_xxxxxxxxxxxxx", "person_xxxxxxxxxxxxx", @@ -197,7 +209,7 @@ def test_accounts_persons_delete(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx", ) - def test_accounts_persons_get(self, request_mock): + def test_accounts_persons_get(self, request_mock: Any) -> None: stripe.Account.list_persons( "acct_xxxxxxxxxxxxx", limit=3, @@ -207,7 +219,7 @@ def test_accounts_persons_get(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/persons", ) - def test_accounts_persons_get_2(self, request_mock): + def test_accounts_persons_get_2(self, request_mock: Any) -> None: stripe.Account.retrieve_person( "acct_xxxxxxxxxxxxx", "person_xxxxxxxxxxxxx", @@ -217,7 +229,7 @@ def test_accounts_persons_get_2(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx", ) - def test_accounts_persons_post(self, request_mock): + def test_accounts_persons_post(self, request_mock: Any) -> None: stripe.Account.create_person( "acct_xxxxxxxxxxxxx", first_name="Jane", @@ -228,7 +240,7 @@ def test_accounts_persons_post(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/persons", ) - def test_accounts_persons_post_2(self, request_mock): + def test_accounts_persons_post_2(self, request_mock: Any) -> None: stripe.Account.modify_person( "acct_xxxxxxxxxxxxx", "person_xxxxxxxxxxxxx", @@ -239,7 +251,7 @@ def test_accounts_persons_post_2(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx", ) - def test_accounts_post(self, request_mock): + def test_accounts_post(self, request_mock: Any) -> None: stripe.Account.create( type="custom", country="US", @@ -254,7 +266,7 @@ def test_accounts_post(self, request_mock): "/v1/accounts", ) - def test_accounts_post_2(self, request_mock): + def test_accounts_post_2(self, request_mock: Any) -> None: stripe.Account.modify( "acct_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -264,7 +276,7 @@ def test_accounts_post_2(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx", ) - def test_accounts_reject_post(self, request_mock): + def test_accounts_reject_post(self, request_mock: Any) -> None: stripe.Account.reject( "acct_xxxxxxxxxxxxx", reason="fraud", @@ -274,21 +286,21 @@ def test_accounts_reject_post(self, request_mock): "/v1/accounts/acct_xxxxxxxxxxxxx/reject", ) - def test_application_fees_get(self, request_mock): + def test_application_fees_get(self, request_mock: Any) -> None: stripe.ApplicationFee.list(limit=3) request_mock.assert_requested( "get", "/v1/application_fees", ) - def test_application_fees_get_2(self, request_mock): + def test_application_fees_get_2(self, request_mock: Any) -> None: stripe.ApplicationFee.retrieve("fee_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/application_fees/fee_xxxxxxxxxxxxx", ) - def test_application_fees_refunds_get(self, request_mock): + def test_application_fees_refunds_get(self, request_mock: Any) -> None: stripe.ApplicationFee.list_refunds( "fee_xxxxxxxxxxxxx", limit=3, @@ -298,7 +310,7 @@ def test_application_fees_refunds_get(self, request_mock): "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds", ) - def test_application_fees_refunds_get_2(self, request_mock): + def test_application_fees_refunds_get_2(self, request_mock: Any) -> None: stripe.ApplicationFee.retrieve_refund( "fee_xxxxxxxxxxxxx", "fr_xxxxxxxxxxxxx", @@ -308,14 +320,14 @@ def test_application_fees_refunds_get_2(self, request_mock): "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx", ) - def test_application_fees_refunds_post(self, request_mock): + def test_application_fees_refunds_post(self, request_mock: Any) -> None: stripe.ApplicationFee.create_refund("fee_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds", ) - def test_application_fees_refunds_post_2(self, request_mock): + def test_application_fees_refunds_post_2(self, request_mock: Any) -> None: stripe.ApplicationFee.modify_refund( "fee_xxxxxxxxxxxxx", "fr_xxxxxxxxxxxxx", @@ -326,7 +338,7 @@ def test_application_fees_refunds_post_2(self, request_mock): "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx", ) - def test_apps_secrets_delete_post(self, request_mock): + def test_apps_secrets_delete_post(self, request_mock: Any) -> None: stripe.apps.Secret.delete_where( name="my-api-key", scope={"type": "account"}, @@ -336,7 +348,7 @@ def test_apps_secrets_delete_post(self, request_mock): "/v1/apps/secrets/delete", ) - def test_apps_secrets_find_get(self, request_mock): + def test_apps_secrets_find_get(self, request_mock: Any) -> None: stripe.apps.Secret.find( name="sec_123", scope={"type": "account"}, @@ -346,7 +358,7 @@ def test_apps_secrets_find_get(self, request_mock): "/v1/apps/secrets/find", ) - def test_apps_secrets_get(self, request_mock): + def test_apps_secrets_get(self, request_mock: Any) -> None: stripe.apps.Secret.list( scope={"type": "account"}, limit=2, @@ -356,7 +368,7 @@ def test_apps_secrets_get(self, request_mock): "/v1/apps/secrets", ) - def test_apps_secrets_get_2(self, request_mock): + def test_apps_secrets_get_2(self, request_mock: Any) -> None: stripe.apps.Secret.list( scope={"type": "account"}, limit=2, @@ -366,7 +378,7 @@ def test_apps_secrets_get_2(self, request_mock): "/v1/apps/secrets", ) - def test_apps_secrets_post(self, request_mock): + def test_apps_secrets_post(self, request_mock: Any) -> None: stripe.apps.Secret.create( name="sec_123", payload="very secret string", @@ -377,7 +389,7 @@ def test_apps_secrets_post(self, request_mock): "/v1/apps/secrets", ) - def test_apps_secrets_post_2(self, request_mock): + def test_apps_secrets_post_2(self, request_mock: Any) -> None: stripe.apps.Secret.create( name="my-api-key", payload="secret_key_xxxxxx", @@ -388,35 +400,41 @@ def test_apps_secrets_post_2(self, request_mock): "/v1/apps/secrets", ) - def test_balance_transactions_get(self, request_mock): + def test_balance_transactions_get(self, request_mock: Any) -> None: stripe.BalanceTransaction.list(limit=3) request_mock.assert_requested( "get", "/v1/balance_transactions", ) - def test_balance_transactions_get_2(self, request_mock): + def test_balance_transactions_get_2(self, request_mock: Any) -> None: stripe.BalanceTransaction.retrieve("txn_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/balance_transactions/txn_xxxxxxxxxxxxx", ) - def test_billing_portal_configurations_get(self, request_mock): + def test_billing_portal_configurations_get( + self, request_mock: Any + ) -> None: stripe.billing_portal.Configuration.list(limit=3) request_mock.assert_requested( "get", "/v1/billing_portal/configurations", ) - def test_billing_portal_configurations_get_2(self, request_mock): + def test_billing_portal_configurations_get_2( + self, request_mock: Any + ) -> None: stripe.billing_portal.Configuration.retrieve("bpc_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/billing_portal/configurations/bpc_xxxxxxxxxxxxx", ) - def test_billing_portal_configurations_post(self, request_mock): + def test_billing_portal_configurations_post( + self, request_mock: Any + ) -> None: stripe.billing_portal.Configuration.create( features={ "customer_update": { @@ -435,7 +453,9 @@ def test_billing_portal_configurations_post(self, request_mock): "/v1/billing_portal/configurations", ) - def test_billing_portal_configurations_post_2(self, request_mock): + def test_billing_portal_configurations_post_2( + self, request_mock: Any + ) -> None: stripe.billing_portal.Configuration.modify( "bpc_xxxxxxxxxxxxx", business_profile={ @@ -448,7 +468,7 @@ def test_billing_portal_configurations_post_2(self, request_mock): "/v1/billing_portal/configurations/bpc_xxxxxxxxxxxxx", ) - def test_billing_portal_sessions_post(self, request_mock): + def test_billing_portal_sessions_post(self, request_mock: Any) -> None: stripe.billing_portal.Session.create( customer="cus_xxxxxxxxxxxxx", return_url="https://example.com/account", @@ -458,28 +478,28 @@ def test_billing_portal_sessions_post(self, request_mock): "/v1/billing_portal/sessions", ) - def test_charges_capture_post(self, request_mock): + def test_charges_capture_post(self, request_mock: Any) -> None: stripe.Charge.capture("ch_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/charges/ch_xxxxxxxxxxxxx/capture", ) - def test_charges_get(self, request_mock): + def test_charges_get(self, request_mock: Any) -> None: stripe.Charge.list(limit=3) request_mock.assert_requested( "get", "/v1/charges", ) - def test_charges_get_2(self, request_mock): + def test_charges_get_2(self, request_mock: Any) -> None: stripe.Charge.retrieve("ch_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/charges/ch_xxxxxxxxxxxxx", ) - def test_charges_post(self, request_mock): + def test_charges_post(self, request_mock: Any) -> None: stripe.Charge.create( amount=2000, currency="usd", @@ -491,7 +511,7 @@ def test_charges_post(self, request_mock): "/v1/charges", ) - def test_charges_post_2(self, request_mock): + def test_charges_post_2(self, request_mock: Any) -> None: stripe.Charge.modify( "ch_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -501,7 +521,7 @@ def test_charges_post_2(self, request_mock): "/v1/charges/ch_xxxxxxxxxxxxx", ) - def test_charges_search_get(self, request_mock): + def test_charges_search_get(self, request_mock: Any) -> None: stripe.Charge.search( query="amount>999 AND metadata['order_id']:'6735'" ) @@ -510,42 +530,42 @@ def test_charges_search_get(self, request_mock): "/v1/charges/search", ) - def test_checkout_sessions_expire_post(self, request_mock): + def test_checkout_sessions_expire_post(self, request_mock: Any) -> None: stripe.checkout.Session.expire("sess_xyz") request_mock.assert_requested( "post", "/v1/checkout/sessions/sess_xyz/expire", ) - def test_checkout_sessions_expire_post_2(self, request_mock): + def test_checkout_sessions_expire_post_2(self, request_mock: Any) -> None: stripe.checkout.Session.expire("cs_test_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx/expire", ) - def test_checkout_sessions_get(self, request_mock): + def test_checkout_sessions_get(self, request_mock: Any) -> None: stripe.checkout.Session.list(limit=3) request_mock.assert_requested( "get", "/v1/checkout/sessions", ) - def test_checkout_sessions_get_2(self, request_mock): + def test_checkout_sessions_get_2(self, request_mock: Any) -> None: stripe.checkout.Session.retrieve("cs_test_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx", ) - def test_checkout_sessions_line_items_get(self, request_mock): + def test_checkout_sessions_line_items_get(self, request_mock: Any) -> None: stripe.checkout.Session.list_line_items("sess_xyz") request_mock.assert_requested( "get", "/v1/checkout/sessions/sess_xyz/line_items", ) - def test_checkout_sessions_post(self, request_mock): + def test_checkout_sessions_post(self, request_mock: Any) -> None: stripe.checkout.Session.create( success_url="https://example.com/success", cancel_url="https://example.com/cancel", @@ -568,7 +588,7 @@ def test_checkout_sessions_post(self, request_mock): "/v1/checkout/sessions", ) - def test_checkout_sessions_post_2(self, request_mock): + def test_checkout_sessions_post_2(self, request_mock: Any) -> None: stripe.checkout.Session.create( success_url="https://example.com/success", line_items=[{"price": "price_xxxxxxxxxxxxx", "quantity": 2}], @@ -579,42 +599,42 @@ def test_checkout_sessions_post_2(self, request_mock): "/v1/checkout/sessions", ) - def test_country_specs_get(self, request_mock): + def test_country_specs_get(self, request_mock: Any) -> None: stripe.CountrySpec.list(limit=3) request_mock.assert_requested( "get", "/v1/country_specs", ) - def test_country_specs_get_2(self, request_mock): + def test_country_specs_get_2(self, request_mock: Any) -> None: stripe.CountrySpec.retrieve("US") request_mock.assert_requested( "get", "/v1/country_specs/US", ) - def test_coupons_delete(self, request_mock): + def test_coupons_delete(self, request_mock: Any) -> None: stripe.Coupon.delete("Z4OV52SU") request_mock.assert_requested( "delete", "/v1/coupons/Z4OV52SU", ) - def test_coupons_get(self, request_mock): + def test_coupons_get(self, request_mock: Any) -> None: stripe.Coupon.list(limit=3) request_mock.assert_requested( "get", "/v1/coupons", ) - def test_coupons_get_2(self, request_mock): + def test_coupons_get_2(self, request_mock: Any) -> None: stripe.Coupon.retrieve("Z4OV52SU") request_mock.assert_requested( "get", "/v1/coupons/Z4OV52SU", ) - def test_coupons_post(self, request_mock): + def test_coupons_post(self, request_mock: Any) -> None: stripe.Coupon.create( percent_off=25.5, duration="repeating", @@ -625,7 +645,7 @@ def test_coupons_post(self, request_mock): "/v1/coupons", ) - def test_coupons_post_2(self, request_mock): + def test_coupons_post_2(self, request_mock: Any) -> None: stripe.Coupon.modify( "Z4OV52SU", metadata={"order_id": "6735"}, @@ -635,14 +655,14 @@ def test_coupons_post_2(self, request_mock): "/v1/coupons/Z4OV52SU", ) - def test_credit_notes_get(self, request_mock): + def test_credit_notes_get(self, request_mock: Any) -> None: stripe.CreditNote.list(limit=3) request_mock.assert_requested( "get", "/v1/credit_notes", ) - def test_credit_notes_lines_get(self, request_mock): + def test_credit_notes_lines_get(self, request_mock: Any) -> None: stripe.CreditNote.list_lines( "cn_xxxxxxxxxxxxx", limit=3, @@ -652,7 +672,7 @@ def test_credit_notes_lines_get(self, request_mock): "/v1/credit_notes/cn_xxxxxxxxxxxxx/lines", ) - def test_credit_notes_post(self, request_mock): + def test_credit_notes_post(self, request_mock: Any) -> None: stripe.CreditNote.create( invoice="in_xxxxxxxxxxxxx", lines=[ @@ -668,7 +688,7 @@ def test_credit_notes_post(self, request_mock): "/v1/credit_notes", ) - def test_credit_notes_preview_get(self, request_mock): + def test_credit_notes_preview_get(self, request_mock: Any) -> None: stripe.CreditNote.preview( invoice="in_xxxxxxxxxxxxx", lines=[ @@ -684,7 +704,7 @@ def test_credit_notes_preview_get(self, request_mock): "/v1/credit_notes/preview", ) - def test_credit_notes_preview_lines_get(self, request_mock): + def test_credit_notes_preview_lines_get(self, request_mock: Any) -> None: stripe.CreditNote.preview_lines( limit=3, invoice="in_xxxxxxxxxxxxx", @@ -694,14 +714,16 @@ def test_credit_notes_preview_lines_get(self, request_mock): "/v1/credit_notes/preview/lines", ) - def test_credit_notes_void_post(self, request_mock): + def test_credit_notes_void_post(self, request_mock: Any) -> None: stripe.CreditNote.void_credit_note("cn_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/credit_notes/cn_xxxxxxxxxxxxx/void", ) - def test_customers_balance_transactions_get(self, request_mock): + def test_customers_balance_transactions_get( + self, request_mock: Any + ) -> None: stripe.Customer.list_balance_transactions( "cus_xxxxxxxxxxxxx", limit=3, @@ -711,7 +733,9 @@ def test_customers_balance_transactions_get(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions", ) - def test_customers_balance_transactions_get_2(self, request_mock): + def test_customers_balance_transactions_get_2( + self, request_mock: Any + ) -> None: stripe.Customer.retrieve_balance_transaction( "cus_xxxxxxxxxxxxx", "cbtxn_xxxxxxxxxxxxx", @@ -721,7 +745,9 @@ def test_customers_balance_transactions_get_2(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions/cbtxn_xxxxxxxxxxxxx", ) - def test_customers_balance_transactions_post(self, request_mock): + def test_customers_balance_transactions_post( + self, request_mock: Any + ) -> None: stripe.Customer.create_balance_transaction( "cus_xxxxxxxxxxxxx", amount=-500, @@ -732,7 +758,9 @@ def test_customers_balance_transactions_post(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions", ) - def test_customers_balance_transactions_post_2(self, request_mock): + def test_customers_balance_transactions_post_2( + self, request_mock: Any + ) -> None: stripe.Customer.modify_balance_transaction( "cus_xxxxxxxxxxxxx", "cbtxn_xxxxxxxxxxxxx", @@ -743,14 +771,14 @@ def test_customers_balance_transactions_post_2(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions/cbtxn_xxxxxxxxxxxxx", ) - def test_customers_cash_balance_get(self, request_mock): + def test_customers_cash_balance_get(self, request_mock: Any) -> None: stripe.Customer.retrieve_cash_balance("cus_123") request_mock.assert_requested( "get", "/v1/customers/cus_123/cash_balance", ) - def test_customers_cash_balance_post(self, request_mock): + def test_customers_cash_balance_post(self, request_mock: Any) -> None: stripe.Customer.modify_cash_balance( "cus_123", settings={"reconciliation_mode": "manual"}, @@ -760,14 +788,16 @@ def test_customers_cash_balance_post(self, request_mock): "/v1/customers/cus_123/cash_balance", ) - def test_customers_delete(self, request_mock): + def test_customers_delete(self, request_mock: Any) -> None: stripe.Customer.delete("cus_xxxxxxxxxxxxx") request_mock.assert_requested( "delete", "/v1/customers/cus_xxxxxxxxxxxxx", ) - def test_customers_funding_instructions_post(self, request_mock): + def test_customers_funding_instructions_post( + self, request_mock: Any + ) -> None: stripe.Customer.create_funding_instructions( "cus_123", bank_transfer={ @@ -782,28 +812,28 @@ def test_customers_funding_instructions_post(self, request_mock): "/v1/customers/cus_123/funding_instructions", ) - def test_customers_get(self, request_mock): + def test_customers_get(self, request_mock: Any) -> None: stripe.Customer.list(limit=3) request_mock.assert_requested( "get", "/v1/customers", ) - def test_customers_get_2(self, request_mock): + def test_customers_get_2(self, request_mock: Any) -> None: stripe.Customer.list(limit=3) request_mock.assert_requested( "get", "/v1/customers", ) - def test_customers_get_3(self, request_mock): + def test_customers_get_3(self, request_mock: Any) -> None: stripe.Customer.retrieve("cus_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/customers/cus_xxxxxxxxxxxxx", ) - def test_customers_payment_methods_get(self, request_mock): + def test_customers_payment_methods_get(self, request_mock: Any) -> None: stripe.Customer.list_payment_methods( "cus_xyz", type="card", @@ -813,7 +843,7 @@ def test_customers_payment_methods_get(self, request_mock): "/v1/customers/cus_xyz/payment_methods", ) - def test_customers_payment_methods_get_2(self, request_mock): + def test_customers_payment_methods_get_2(self, request_mock: Any) -> None: stripe.Customer.list_payment_methods( "cus_xxxxxxxxxxxxx", type="card", @@ -823,7 +853,7 @@ def test_customers_payment_methods_get_2(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/payment_methods", ) - def test_customers_post(self, request_mock): + def test_customers_post(self, request_mock: Any) -> None: stripe.Customer.create( description="My First Test Customer (created for API docs at https://www.stripe.com/docs/api)", ) @@ -832,7 +862,7 @@ def test_customers_post(self, request_mock): "/v1/customers", ) - def test_customers_post_2(self, request_mock): + def test_customers_post_2(self, request_mock: Any) -> None: stripe.Customer.modify( "cus_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -842,7 +872,7 @@ def test_customers_post_2(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx", ) - def test_customers_search_get(self, request_mock): + def test_customers_search_get(self, request_mock: Any) -> None: stripe.Customer.search( query="name:'fakename' AND metadata['foo']:'bar'", ) @@ -851,7 +881,7 @@ def test_customers_search_get(self, request_mock): "/v1/customers/search", ) - def test_customers_search_get_2(self, request_mock): + def test_customers_search_get_2(self, request_mock: Any) -> None: stripe.Customer.search( query="name:'fakename' AND metadata['foo']:'bar'", ) @@ -860,7 +890,7 @@ def test_customers_search_get_2(self, request_mock): "/v1/customers/search", ) - def test_customers_sources_delete(self, request_mock): + def test_customers_sources_delete(self, request_mock: Any) -> None: stripe.Customer.delete_source( "cus_xxxxxxxxxxxxx", "ba_xxxxxxxxxxxxx", @@ -870,7 +900,7 @@ def test_customers_sources_delete(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/sources/ba_xxxxxxxxxxxxx", ) - def test_customers_sources_delete_2(self, request_mock): + def test_customers_sources_delete_2(self, request_mock: Any) -> None: stripe.Customer.delete_source( "cus_xxxxxxxxxxxxx", "card_xxxxxxxxxxxxx", @@ -880,7 +910,7 @@ def test_customers_sources_delete_2(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/sources/card_xxxxxxxxxxxxx", ) - def test_customers_sources_get(self, request_mock): + def test_customers_sources_get(self, request_mock: Any) -> None: stripe.Customer.list_sources( "cus_xxxxxxxxxxxxx", object="bank_account", @@ -891,7 +921,7 @@ def test_customers_sources_get(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/sources", ) - def test_customers_sources_get_2(self, request_mock): + def test_customers_sources_get_2(self, request_mock: Any) -> None: stripe.Customer.list_sources( "cus_xxxxxxxxxxxxx", object="card", @@ -902,7 +932,7 @@ def test_customers_sources_get_2(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/sources", ) - def test_customers_sources_get_3(self, request_mock): + def test_customers_sources_get_3(self, request_mock: Any) -> None: stripe.Customer.retrieve_source( "cus_xxxxxxxxxxxxx", "ba_xxxxxxxxxxxxx", @@ -912,7 +942,7 @@ def test_customers_sources_get_3(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/sources/ba_xxxxxxxxxxxxx", ) - def test_customers_sources_get_4(self, request_mock): + def test_customers_sources_get_4(self, request_mock: Any) -> None: stripe.Customer.retrieve_source( "cus_xxxxxxxxxxxxx", "card_xxxxxxxxxxxxx", @@ -922,7 +952,7 @@ def test_customers_sources_get_4(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/sources/card_xxxxxxxxxxxxx", ) - def test_customers_sources_post(self, request_mock): + def test_customers_sources_post(self, request_mock: Any) -> None: stripe.Customer.modify_source( "cus_123", "card_123", @@ -933,7 +963,7 @@ def test_customers_sources_post(self, request_mock): "/v1/customers/cus_123/sources/card_123", ) - def test_customers_sources_post_2(self, request_mock): + def test_customers_sources_post_2(self, request_mock: Any) -> None: stripe.Customer.create_source( "cus_xxxxxxxxxxxxx", source="btok_xxxxxxxxxxxxx", @@ -943,7 +973,7 @@ def test_customers_sources_post_2(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/sources", ) - def test_customers_sources_post_3(self, request_mock): + def test_customers_sources_post_3(self, request_mock: Any) -> None: stripe.Customer.create_source( "cus_xxxxxxxxxxxxx", source="tok_xxxx", @@ -953,7 +983,7 @@ def test_customers_sources_post_3(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/sources", ) - def test_customers_sources_post_4(self, request_mock): + def test_customers_sources_post_4(self, request_mock: Any) -> None: stripe.Customer.modify_source( "cus_xxxxxxxxxxxxx", "ba_xxxxxxxxxxxxx", @@ -964,7 +994,7 @@ def test_customers_sources_post_4(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/sources/ba_xxxxxxxxxxxxx", ) - def test_customers_sources_post_5(self, request_mock): + def test_customers_sources_post_5(self, request_mock: Any) -> None: stripe.Customer.modify_source( "cus_xxxxxxxxxxxxx", "card_xxxxxxxxxxxxx", @@ -975,7 +1005,7 @@ def test_customers_sources_post_5(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/sources/card_xxxxxxxxxxxxx", ) - def test_customers_tax_ids_delete(self, request_mock): + def test_customers_tax_ids_delete(self, request_mock: Any) -> None: stripe.Customer.delete_tax_id( "cus_xxxxxxxxxxxxx", "txi_xxxxxxxxxxxxx", @@ -985,7 +1015,7 @@ def test_customers_tax_ids_delete(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx", ) - def test_customers_tax_ids_get(self, request_mock): + def test_customers_tax_ids_get(self, request_mock: Any) -> None: stripe.Customer.list_tax_ids( "cus_xxxxxxxxxxxxx", limit=3, @@ -995,7 +1025,7 @@ def test_customers_tax_ids_get(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids", ) - def test_customers_tax_ids_get_2(self, request_mock): + def test_customers_tax_ids_get_2(self, request_mock: Any) -> None: stripe.Customer.retrieve_tax_id( "cus_xxxxxxxxxxxxx", "txi_xxxxxxxxxxxxx", @@ -1005,7 +1035,7 @@ def test_customers_tax_ids_get_2(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx", ) - def test_customers_tax_ids_post(self, request_mock): + def test_customers_tax_ids_post(self, request_mock: Any) -> None: stripe.Customer.create_tax_id( "cus_xxxxxxxxxxxxx", type="eu_vat", @@ -1016,28 +1046,28 @@ def test_customers_tax_ids_post(self, request_mock): "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids", ) - def test_disputes_close_post(self, request_mock): + def test_disputes_close_post(self, request_mock: Any) -> None: stripe.Dispute.close("dp_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/disputes/dp_xxxxxxxxxxxxx/close", ) - def test_disputes_get(self, request_mock): + def test_disputes_get(self, request_mock: Any) -> None: stripe.Dispute.list(limit=3) request_mock.assert_requested( "get", "/v1/disputes", ) - def test_disputes_get_2(self, request_mock): + def test_disputes_get_2(self, request_mock: Any) -> None: stripe.Dispute.retrieve("dp_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/disputes/dp_xxxxxxxxxxxxx", ) - def test_disputes_post(self, request_mock): + def test_disputes_post(self, request_mock: Any) -> None: stripe.Dispute.modify( "dp_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -1047,42 +1077,42 @@ def test_disputes_post(self, request_mock): "/v1/disputes/dp_xxxxxxxxxxxxx", ) - def test_events_get(self, request_mock): + def test_events_get(self, request_mock: Any) -> None: stripe.Event.list(limit=3) request_mock.assert_requested( "get", "/v1/events", ) - def test_events_get_2(self, request_mock): + def test_events_get_2(self, request_mock: Any) -> None: stripe.Event.retrieve("evt_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/events/evt_xxxxxxxxxxxxx", ) - def test_file_links_get(self, request_mock): + def test_file_links_get(self, request_mock: Any) -> None: stripe.FileLink.list(limit=3) request_mock.assert_requested( "get", "/v1/file_links", ) - def test_file_links_get_2(self, request_mock): + def test_file_links_get_2(self, request_mock: Any) -> None: stripe.FileLink.retrieve("link_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/file_links/link_xxxxxxxxxxxxx", ) - def test_file_links_post(self, request_mock): + def test_file_links_post(self, request_mock: Any) -> None: stripe.FileLink.create(file="file_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/file_links", ) - def test_file_links_post_2(self, request_mock): + def test_file_links_post_2(self, request_mock: Any) -> None: stripe.FileLink.modify( "link_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -1092,14 +1122,14 @@ def test_file_links_post_2(self, request_mock): "/v1/file_links/link_xxxxxxxxxxxxx", ) - def test_files_get(self, request_mock): + def test_files_get(self, request_mock: Any) -> None: stripe.File.list(limit=3) request_mock.assert_requested( "get", "/v1/files", ) - def test_files_get_2(self, request_mock): + def test_files_get_2(self, request_mock: Any) -> None: stripe.File.retrieve("file_xxxxxxxxxxxxx") request_mock.assert_requested( "get", @@ -1107,8 +1137,8 @@ def test_files_get_2(self, request_mock): ) def test_financial_connections_accounts_disconnect_post( - self, request_mock - ): + self, request_mock: Any + ) -> None: stripe.financial_connections.Account.disconnect("fca_xyz") request_mock.assert_requested( "post", @@ -1116,29 +1146,35 @@ def test_financial_connections_accounts_disconnect_post( ) def test_financial_connections_accounts_disconnect_post_2( - self, request_mock - ): + self, request_mock: Any + ) -> None: stripe.financial_connections.Account.disconnect("fca_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/disconnect", ) - def test_financial_connections_accounts_get(self, request_mock): + def test_financial_connections_accounts_get( + self, request_mock: Any + ) -> None: stripe.financial_connections.Account.list() request_mock.assert_requested( "get", "/v1/financial_connections/accounts", ) - def test_financial_connections_accounts_get_2(self, request_mock): + def test_financial_connections_accounts_get_2( + self, request_mock: Any + ) -> None: stripe.financial_connections.Account.retrieve("fca_xyz") request_mock.assert_requested( "get", "/v1/financial_connections/accounts/fca_xyz", ) - def test_financial_connections_accounts_get_3(self, request_mock): + def test_financial_connections_accounts_get_3( + self, request_mock: Any + ) -> None: stripe.financial_connections.Account.list( account_holder={"customer": "cus_xxxxxxxxxxxxx"}, ) @@ -1147,14 +1183,18 @@ def test_financial_connections_accounts_get_3(self, request_mock): "/v1/financial_connections/accounts", ) - def test_financial_connections_accounts_get_4(self, request_mock): + def test_financial_connections_accounts_get_4( + self, request_mock: Any + ) -> None: stripe.financial_connections.Account.retrieve("fca_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx", ) - def test_financial_connections_accounts_owners_get(self, request_mock): + def test_financial_connections_accounts_owners_get( + self, request_mock: Any + ) -> None: stripe.financial_connections.Account.list_owners( "fca_xyz", ownership="fcaowns_xyz", @@ -1164,7 +1204,9 @@ def test_financial_connections_accounts_owners_get(self, request_mock): "/v1/financial_connections/accounts/fca_xyz/owners", ) - def test_financial_connections_accounts_owners_get_2(self, request_mock): + def test_financial_connections_accounts_owners_get_2( + self, request_mock: Any + ) -> None: stripe.financial_connections.Account.list_owners( "fca_xxxxxxxxxxxxx", limit=3, @@ -1175,7 +1217,9 @@ def test_financial_connections_accounts_owners_get_2(self, request_mock): "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/owners", ) - def test_financial_connections_accounts_refresh_post(self, request_mock): + def test_financial_connections_accounts_refresh_post( + self, request_mock: Any + ) -> None: stripe.financial_connections.Account.refresh_account( "fca_xyz", features=["balance"], @@ -1185,21 +1229,27 @@ def test_financial_connections_accounts_refresh_post(self, request_mock): "/v1/financial_connections/accounts/fca_xyz/refresh", ) - def test_financial_connections_sessions_get(self, request_mock): + def test_financial_connections_sessions_get( + self, request_mock: Any + ) -> None: stripe.financial_connections.Session.retrieve("fcsess_xyz") request_mock.assert_requested( "get", "/v1/financial_connections/sessions/fcsess_xyz", ) - def test_financial_connections_sessions_get_2(self, request_mock): + def test_financial_connections_sessions_get_2( + self, request_mock: Any + ) -> None: stripe.financial_connections.Session.retrieve("fcsess_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/financial_connections/sessions/fcsess_xxxxxxxxxxxxx", ) - def test_financial_connections_sessions_post(self, request_mock): + def test_financial_connections_sessions_post( + self, request_mock: Any + ) -> None: stripe.financial_connections.Session.create( account_holder={"type": "customer", "customer": "cus_123"}, permissions=["balances"], @@ -1209,7 +1259,9 @@ def test_financial_connections_sessions_post(self, request_mock): "/v1/financial_connections/sessions", ) - def test_financial_connections_sessions_post_2(self, request_mock): + def test_financial_connections_sessions_post_2( + self, request_mock: Any + ) -> None: stripe.financial_connections.Session.create( account_holder={ "type": "customer", @@ -1223,49 +1275,63 @@ def test_financial_connections_sessions_post_2(self, request_mock): "/v1/financial_connections/sessions", ) - def test_identity_verification_reports_get(self, request_mock): + def test_identity_verification_reports_get( + self, request_mock: Any + ) -> None: stripe.identity.VerificationReport.list(limit=3) request_mock.assert_requested( "get", "/v1/identity/verification_reports", ) - def test_identity_verification_reports_get_2(self, request_mock): + def test_identity_verification_reports_get_2( + self, request_mock: Any + ) -> None: stripe.identity.VerificationReport.retrieve("vr_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/identity/verification_reports/vr_xxxxxxxxxxxxx", ) - def test_identity_verification_sessions_cancel_post(self, request_mock): + def test_identity_verification_sessions_cancel_post( + self, request_mock: Any + ) -> None: stripe.identity.VerificationSession.cancel("vs_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/cancel", ) - def test_identity_verification_sessions_get(self, request_mock): + def test_identity_verification_sessions_get( + self, request_mock: Any + ) -> None: stripe.identity.VerificationSession.list(limit=3) request_mock.assert_requested( "get", "/v1/identity/verification_sessions", ) - def test_identity_verification_sessions_get_2(self, request_mock): + def test_identity_verification_sessions_get_2( + self, request_mock: Any + ) -> None: stripe.identity.VerificationSession.retrieve("vs_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx", ) - def test_identity_verification_sessions_post(self, request_mock): + def test_identity_verification_sessions_post( + self, request_mock: Any + ) -> None: stripe.identity.VerificationSession.create(type="document") request_mock.assert_requested( "post", "/v1/identity/verification_sessions", ) - def test_identity_verification_sessions_post_2(self, request_mock): + def test_identity_verification_sessions_post_2( + self, request_mock: Any + ) -> None: stripe.identity.VerificationSession.modify( "vs_xxxxxxxxxxxxx", type="id_number", @@ -1275,35 +1341,37 @@ def test_identity_verification_sessions_post_2(self, request_mock): "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx", ) - def test_identity_verification_sessions_redact_post(self, request_mock): + def test_identity_verification_sessions_redact_post( + self, request_mock: Any + ) -> None: stripe.identity.VerificationSession.redact("vs_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/redact", ) - def test_invoiceitems_delete(self, request_mock): + def test_invoiceitems_delete(self, request_mock: Any) -> None: stripe.InvoiceItem.delete("ii_xxxxxxxxxxxxx") request_mock.assert_requested( "delete", "/v1/invoiceitems/ii_xxxxxxxxxxxxx", ) - def test_invoiceitems_get(self, request_mock): + def test_invoiceitems_get(self, request_mock: Any) -> None: stripe.InvoiceItem.list(limit=3) request_mock.assert_requested( "get", "/v1/invoiceitems", ) - def test_invoiceitems_get_2(self, request_mock): + def test_invoiceitems_get_2(self, request_mock: Any) -> None: stripe.InvoiceItem.retrieve("ii_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/invoiceitems/ii_xxxxxxxxxxxxx", ) - def test_invoiceitems_post(self, request_mock): + def test_invoiceitems_post(self, request_mock: Any) -> None: stripe.InvoiceItem.create( customer="cus_xxxxxxxxxxxxx", price="price_xxxxxxxxxxxxx", @@ -1313,7 +1381,7 @@ def test_invoiceitems_post(self, request_mock): "/v1/invoiceitems", ) - def test_invoiceitems_post_2(self, request_mock): + def test_invoiceitems_post_2(self, request_mock: Any) -> None: stripe.InvoiceItem.modify( "ii_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -1323,35 +1391,35 @@ def test_invoiceitems_post_2(self, request_mock): "/v1/invoiceitems/ii_xxxxxxxxxxxxx", ) - def test_invoices_delete(self, request_mock): + def test_invoices_delete(self, request_mock: Any) -> None: stripe.Invoice.delete("in_xxxxxxxxxxxxx") request_mock.assert_requested( "delete", "/v1/invoices/in_xxxxxxxxxxxxx", ) - def test_invoices_finalize_post(self, request_mock): + def test_invoices_finalize_post(self, request_mock: Any) -> None: stripe.Invoice.finalize_invoice("in_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/invoices/in_xxxxxxxxxxxxx/finalize", ) - def test_invoices_get(self, request_mock): + def test_invoices_get(self, request_mock: Any) -> None: stripe.Invoice.list(limit=3) request_mock.assert_requested( "get", "/v1/invoices", ) - def test_invoices_get_2(self, request_mock): + def test_invoices_get_2(self, request_mock: Any) -> None: stripe.Invoice.retrieve("in_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/invoices/in_xxxxxxxxxxxxx", ) - def test_invoices_get_3(self, request_mock): + def test_invoices_get_3(self, request_mock: Any) -> None: stripe.Invoice.retrieve( "in_xxxxxxxxxxxxx", expand=["customer"], @@ -1361,28 +1429,28 @@ def test_invoices_get_3(self, request_mock): "/v1/invoices/in_xxxxxxxxxxxxx", ) - def test_invoices_mark_uncollectible_post(self, request_mock): + def test_invoices_mark_uncollectible_post(self, request_mock: Any) -> None: stripe.Invoice.mark_uncollectible("in_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/invoices/in_xxxxxxxxxxxxx/mark_uncollectible", ) - def test_invoices_pay_post(self, request_mock): + def test_invoices_pay_post(self, request_mock: Any) -> None: stripe.Invoice.pay("in_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/invoices/in_xxxxxxxxxxxxx/pay", ) - def test_invoices_post(self, request_mock): + def test_invoices_post(self, request_mock: Any) -> None: stripe.Invoice.create(customer="cus_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/invoices", ) - def test_invoices_post_2(self, request_mock): + def test_invoices_post_2(self, request_mock: Any) -> None: stripe.Invoice.modify( "in_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -1392,7 +1460,7 @@ def test_invoices_post_2(self, request_mock): "/v1/invoices/in_xxxxxxxxxxxxx", ) - def test_invoices_search_get(self, request_mock): + def test_invoices_search_get(self, request_mock: Any) -> None: stripe.Invoice.search( query="total>999 AND metadata['order_id']:'6735'" ) @@ -1401,56 +1469,60 @@ def test_invoices_search_get(self, request_mock): "/v1/invoices/search", ) - def test_invoices_send_post(self, request_mock): + def test_invoices_send_post(self, request_mock: Any) -> None: stripe.Invoice.send_invoice("in_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/invoices/in_xxxxxxxxxxxxx/send", ) - def test_invoices_upcoming_get(self, request_mock): + def test_invoices_upcoming_get(self, request_mock: Any) -> None: stripe.Invoice.upcoming(customer="cus_9utnxg47pWjV1e") request_mock.assert_requested( "get", "/v1/invoices/upcoming", ) - def test_invoices_void_post(self, request_mock): + def test_invoices_void_post(self, request_mock: Any) -> None: stripe.Invoice.void_invoice("in_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/invoices/in_xxxxxxxxxxxxx/void", ) - def test_issuing_authorizations_approve_post(self, request_mock): + def test_issuing_authorizations_approve_post( + self, request_mock: Any + ) -> None: stripe.issuing.Authorization.approve("iauth_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx/approve", ) - def test_issuing_authorizations_decline_post(self, request_mock): + def test_issuing_authorizations_decline_post( + self, request_mock: Any + ) -> None: stripe.issuing.Authorization.decline("iauth_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx/decline", ) - def test_issuing_authorizations_get(self, request_mock): + def test_issuing_authorizations_get(self, request_mock: Any) -> None: stripe.issuing.Authorization.list(limit=3) request_mock.assert_requested( "get", "/v1/issuing/authorizations", ) - def test_issuing_authorizations_get_2(self, request_mock): + def test_issuing_authorizations_get_2(self, request_mock: Any) -> None: stripe.issuing.Authorization.retrieve("iauth_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx", ) - def test_issuing_authorizations_post(self, request_mock): + def test_issuing_authorizations_post(self, request_mock: Any) -> None: stripe.issuing.Authorization.modify( "iauth_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -1460,21 +1532,21 @@ def test_issuing_authorizations_post(self, request_mock): "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx", ) - def test_issuing_cardholders_get(self, request_mock): + def test_issuing_cardholders_get(self, request_mock: Any) -> None: stripe.issuing.Cardholder.list(limit=3) request_mock.assert_requested( "get", "/v1/issuing/cardholders", ) - def test_issuing_cardholders_get_2(self, request_mock): + def test_issuing_cardholders_get_2(self, request_mock: Any) -> None: stripe.issuing.Cardholder.retrieve("ich_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/issuing/cardholders/ich_xxxxxxxxxxxxx", ) - def test_issuing_cardholders_post(self, request_mock): + def test_issuing_cardholders_post(self, request_mock: Any) -> None: stripe.issuing.Cardholder.create( type="individual", name="Jenny Rosen", @@ -1495,7 +1567,7 @@ def test_issuing_cardholders_post(self, request_mock): "/v1/issuing/cardholders", ) - def test_issuing_cardholders_post_2(self, request_mock): + def test_issuing_cardholders_post_2(self, request_mock: Any) -> None: stripe.issuing.Cardholder.modify( "ich_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -1505,21 +1577,21 @@ def test_issuing_cardholders_post_2(self, request_mock): "/v1/issuing/cardholders/ich_xxxxxxxxxxxxx", ) - def test_issuing_cards_get(self, request_mock): + def test_issuing_cards_get(self, request_mock: Any) -> None: stripe.issuing.Card.list(limit=3) request_mock.assert_requested( "get", "/v1/issuing/cards", ) - def test_issuing_cards_get_2(self, request_mock): + def test_issuing_cards_get_2(self, request_mock: Any) -> None: stripe.issuing.Card.retrieve("ic_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/issuing/cards/ic_xxxxxxxxxxxxx", ) - def test_issuing_cards_post(self, request_mock): + def test_issuing_cards_post(self, request_mock: Any) -> None: stripe.issuing.Card.create( cardholder="ich_xxxxxxxxxxxxx", currency="usd", @@ -1530,7 +1602,7 @@ def test_issuing_cards_post(self, request_mock): "/v1/issuing/cards", ) - def test_issuing_cards_post_2(self, request_mock): + def test_issuing_cards_post_2(self, request_mock: Any) -> None: stripe.issuing.Card.modify( "ic_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -1540,21 +1612,21 @@ def test_issuing_cards_post_2(self, request_mock): "/v1/issuing/cards/ic_xxxxxxxxxxxxx", ) - def test_issuing_disputes_get(self, request_mock): + def test_issuing_disputes_get(self, request_mock: Any) -> None: stripe.issuing.Dispute.list(limit=3) request_mock.assert_requested( "get", "/v1/issuing/disputes", ) - def test_issuing_disputes_get_2(self, request_mock): + def test_issuing_disputes_get_2(self, request_mock: Any) -> None: stripe.issuing.Dispute.retrieve("idp_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/issuing/disputes/idp_xxxxxxxxxxxxx", ) - def test_issuing_disputes_post(self, request_mock): + def test_issuing_disputes_post(self, request_mock: Any) -> None: stripe.issuing.Dispute.create( transaction="ipi_xxxxxxxxxxxxx", evidence={ @@ -1567,28 +1639,28 @@ def test_issuing_disputes_post(self, request_mock): "/v1/issuing/disputes", ) - def test_issuing_disputes_submit_post(self, request_mock): + def test_issuing_disputes_submit_post(self, request_mock: Any) -> None: stripe.issuing.Dispute.submit("idp_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/issuing/disputes/idp_xxxxxxxxxxxxx/submit", ) - def test_issuing_transactions_get(self, request_mock): + def test_issuing_transactions_get(self, request_mock: Any) -> None: stripe.issuing.Transaction.list(limit=3) request_mock.assert_requested( "get", "/v1/issuing/transactions", ) - def test_issuing_transactions_get_2(self, request_mock): + def test_issuing_transactions_get_2(self, request_mock: Any) -> None: stripe.issuing.Transaction.retrieve("ipi_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/issuing/transactions/ipi_xxxxxxxxxxxxx", ) - def test_issuing_transactions_post(self, request_mock): + def test_issuing_transactions_post(self, request_mock: Any) -> None: stripe.issuing.Transaction.modify( "ipi_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -1598,35 +1670,37 @@ def test_issuing_transactions_post(self, request_mock): "/v1/issuing/transactions/ipi_xxxxxxxxxxxxx", ) - def test_mandates_get(self, request_mock): + def test_mandates_get(self, request_mock: Any) -> None: stripe.Mandate.retrieve("mandate_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/mandates/mandate_xxxxxxxxxxxxx", ) - def test_payment_intents_apply_customer_balance_post(self, request_mock): + def test_payment_intents_apply_customer_balance_post( + self, request_mock: Any + ) -> None: stripe.PaymentIntent.apply_customer_balance("pi_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/payment_intents/pi_xxxxxxxxxxxxx/apply_customer_balance", ) - def test_payment_intents_cancel_post(self, request_mock): + def test_payment_intents_cancel_post(self, request_mock: Any) -> None: stripe.PaymentIntent.cancel("pi_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/payment_intents/pi_xxxxxxxxxxxxx/cancel", ) - def test_payment_intents_capture_post(self, request_mock): + def test_payment_intents_capture_post(self, request_mock: Any) -> None: stripe.PaymentIntent.capture("pi_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/payment_intents/pi_xxxxxxxxxxxxx/capture", ) - def test_payment_intents_confirm_post(self, request_mock): + def test_payment_intents_confirm_post(self, request_mock: Any) -> None: stripe.PaymentIntent.confirm( "pi_xxxxxxxxxxxxx", payment_method="pm_card_visa", @@ -1636,21 +1710,23 @@ def test_payment_intents_confirm_post(self, request_mock): "/v1/payment_intents/pi_xxxxxxxxxxxxx/confirm", ) - def test_payment_intents_get(self, request_mock): + def test_payment_intents_get(self, request_mock: Any) -> None: stripe.PaymentIntent.list(limit=3) request_mock.assert_requested( "get", "/v1/payment_intents", ) - def test_payment_intents_get_2(self, request_mock): + def test_payment_intents_get_2(self, request_mock: Any) -> None: stripe.PaymentIntent.retrieve("pi_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/payment_intents/pi_xxxxxxxxxxxxx", ) - def test_payment_intents_increment_authorization_post(self, request_mock): + def test_payment_intents_increment_authorization_post( + self, request_mock: Any + ) -> None: stripe.PaymentIntent.increment_authorization( "pi_xxxxxxxxxxxxx", amount=2099, @@ -1660,7 +1736,7 @@ def test_payment_intents_increment_authorization_post(self, request_mock): "/v1/payment_intents/pi_xxxxxxxxxxxxx/increment_authorization", ) - def test_payment_intents_post(self, request_mock): + def test_payment_intents_post(self, request_mock: Any) -> None: stripe.PaymentIntent.create( amount=1099, currency="eur", @@ -1671,7 +1747,7 @@ def test_payment_intents_post(self, request_mock): "/v1/payment_intents", ) - def test_payment_intents_post_2(self, request_mock): + def test_payment_intents_post_2(self, request_mock: Any) -> None: stripe.PaymentIntent.create( amount=2000, currency="usd", @@ -1682,7 +1758,7 @@ def test_payment_intents_post_2(self, request_mock): "/v1/payment_intents", ) - def test_payment_intents_post_3(self, request_mock): + def test_payment_intents_post_3(self, request_mock: Any) -> None: stripe.PaymentIntent.modify( "pi_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -1692,7 +1768,7 @@ def test_payment_intents_post_3(self, request_mock): "/v1/payment_intents/pi_xxxxxxxxxxxxx", ) - def test_payment_intents_post_4(self, request_mock): + def test_payment_intents_post_4(self, request_mock: Any) -> None: stripe.PaymentIntent.create( amount=200, currency="usd", @@ -1703,7 +1779,7 @@ def test_payment_intents_post_4(self, request_mock): "/v1/payment_intents", ) - def test_payment_intents_search_get(self, request_mock): + def test_payment_intents_search_get(self, request_mock: Any) -> None: stripe.PaymentIntent.search( query="status:'succeeded' AND metadata['order_id']:'6735'", ) @@ -1712,14 +1788,18 @@ def test_payment_intents_search_get(self, request_mock): "/v1/payment_intents/search", ) - def test_payment_intents_verify_microdeposits_post(self, request_mock): + def test_payment_intents_verify_microdeposits_post( + self, request_mock: Any + ) -> None: stripe.PaymentIntent.verify_microdeposits("pi_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/payment_intents/pi_xxxxxxxxxxxxx/verify_microdeposits", ) - def test_payment_intents_verify_microdeposits_post_2(self, request_mock): + def test_payment_intents_verify_microdeposits_post_2( + self, request_mock: Any + ) -> None: stripe.PaymentIntent.verify_microdeposits( "pi_xxxxxxxxxxxxx", amounts=[32, 45], @@ -1729,35 +1809,35 @@ def test_payment_intents_verify_microdeposits_post_2(self, request_mock): "/v1/payment_intents/pi_xxxxxxxxxxxxx/verify_microdeposits", ) - def test_payment_links_get(self, request_mock): + def test_payment_links_get(self, request_mock: Any) -> None: stripe.PaymentLink.retrieve("pl_xyz") request_mock.assert_requested( "get", "/v1/payment_links/pl_xyz", ) - def test_payment_links_get_2(self, request_mock): + def test_payment_links_get_2(self, request_mock: Any) -> None: stripe.PaymentLink.list(limit=3) request_mock.assert_requested( "get", "/v1/payment_links", ) - def test_payment_links_get_3(self, request_mock): + def test_payment_links_get_3(self, request_mock: Any) -> None: stripe.PaymentLink.retrieve("plink_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/payment_links/plink_xxxxxxxxxxxxx", ) - def test_payment_links_line_items_get(self, request_mock): + def test_payment_links_line_items_get(self, request_mock: Any) -> None: stripe.PaymentLink.list_line_items("pl_xyz") request_mock.assert_requested( "get", "/v1/payment_links/pl_xyz/line_items", ) - def test_payment_links_post(self, request_mock): + def test_payment_links_post(self, request_mock: Any) -> None: stripe.PaymentLink.create( line_items=[{"price": "price_xxxxxxxxxxxxx", "quantity": 1}], ) @@ -1766,7 +1846,7 @@ def test_payment_links_post(self, request_mock): "/v1/payment_links", ) - def test_payment_links_post_2(self, request_mock): + def test_payment_links_post_2(self, request_mock: Any) -> None: stripe.PaymentLink.create( line_items=[{"price": "price_xxxxxxxxxxxxx", "quantity": 1}], ) @@ -1775,7 +1855,7 @@ def test_payment_links_post_2(self, request_mock): "/v1/payment_links", ) - def test_payment_links_post_3(self, request_mock): + def test_payment_links_post_3(self, request_mock: Any) -> None: stripe.PaymentLink.modify( "plink_xxxxxxxxxxxxx", active=False, @@ -1785,21 +1865,27 @@ def test_payment_links_post_3(self, request_mock): "/v1/payment_links/plink_xxxxxxxxxxxxx", ) - def test_payment_method_configurations_get(self, request_mock): + def test_payment_method_configurations_get( + self, request_mock: Any + ) -> None: stripe.PaymentMethodConfiguration.list(application="foo") request_mock.assert_requested( "get", "/v1/payment_method_configurations", ) - def test_payment_method_configurations_get_2(self, request_mock): + def test_payment_method_configurations_get_2( + self, request_mock: Any + ) -> None: stripe.PaymentMethodConfiguration.retrieve("foo") request_mock.assert_requested( "get", "/v1/payment_method_configurations/foo", ) - def test_payment_method_configurations_post(self, request_mock): + def test_payment_method_configurations_post( + self, request_mock: Any + ) -> None: stripe.PaymentMethodConfiguration.create( acss_debit={"display_preference": {"preference": "none"}}, affirm={"display_preference": {"preference": "none"}}, @@ -1809,7 +1895,9 @@ def test_payment_method_configurations_post(self, request_mock): "/v1/payment_method_configurations", ) - def test_payment_method_configurations_post_2(self, request_mock): + def test_payment_method_configurations_post_2( + self, request_mock: Any + ) -> None: stripe.PaymentMethodConfiguration.modify( "foo", acss_debit={"display_preference": {"preference": "on"}}, @@ -1819,7 +1907,7 @@ def test_payment_method_configurations_post_2(self, request_mock): "/v1/payment_method_configurations/foo", ) - def test_payment_methods_attach_post(self, request_mock): + def test_payment_methods_attach_post(self, request_mock: Any) -> None: stripe.PaymentMethod.attach( "pm_xxxxxxxxxxxxx", customer="cus_xxxxxxxxxxxxx", @@ -1829,14 +1917,14 @@ def test_payment_methods_attach_post(self, request_mock): "/v1/payment_methods/pm_xxxxxxxxxxxxx/attach", ) - def test_payment_methods_detach_post(self, request_mock): + def test_payment_methods_detach_post(self, request_mock: Any) -> None: stripe.PaymentMethod.detach("pm_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/payment_methods/pm_xxxxxxxxxxxxx/detach", ) - def test_payment_methods_get(self, request_mock): + def test_payment_methods_get(self, request_mock: Any) -> None: stripe.PaymentMethod.list( customer="cus_xxxxxxxxxxxxx", type="card", @@ -1846,14 +1934,14 @@ def test_payment_methods_get(self, request_mock): "/v1/payment_methods", ) - def test_payment_methods_get_2(self, request_mock): + def test_payment_methods_get_2(self, request_mock: Any) -> None: stripe.PaymentMethod.retrieve("pm_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/payment_methods/pm_xxxxxxxxxxxxx", ) - def test_payment_methods_post(self, request_mock): + def test_payment_methods_post(self, request_mock: Any) -> None: stripe.PaymentMethod.create( type="card", card={ @@ -1868,7 +1956,7 @@ def test_payment_methods_post(self, request_mock): "/v1/payment_methods", ) - def test_payment_methods_post_2(self, request_mock): + def test_payment_methods_post_2(self, request_mock: Any) -> None: stripe.PaymentMethod.modify( "pm_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -1878,28 +1966,28 @@ def test_payment_methods_post_2(self, request_mock): "/v1/payment_methods/pm_xxxxxxxxxxxxx", ) - def test_payouts_cancel_post(self, request_mock): + def test_payouts_cancel_post(self, request_mock: Any) -> None: stripe.Payout.cancel("po_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/payouts/po_xxxxxxxxxxxxx/cancel", ) - def test_payouts_get(self, request_mock): + def test_payouts_get(self, request_mock: Any) -> None: stripe.Payout.list(limit=3) request_mock.assert_requested( "get", "/v1/payouts", ) - def test_payouts_get_2(self, request_mock): + def test_payouts_get_2(self, request_mock: Any) -> None: stripe.Payout.retrieve("po_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/payouts/po_xxxxxxxxxxxxx", ) - def test_payouts_post(self, request_mock): + def test_payouts_post(self, request_mock: Any) -> None: stripe.Payout.create( amount=1100, currency="usd", @@ -1909,7 +1997,7 @@ def test_payouts_post(self, request_mock): "/v1/payouts", ) - def test_payouts_post_2(self, request_mock): + def test_payouts_post_2(self, request_mock: Any) -> None: stripe.Payout.modify( "po_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -1919,35 +2007,35 @@ def test_payouts_post_2(self, request_mock): "/v1/payouts/po_xxxxxxxxxxxxx", ) - def test_payouts_reverse_post(self, request_mock): + def test_payouts_reverse_post(self, request_mock: Any) -> None: stripe.Payout.reverse("po_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/payouts/po_xxxxxxxxxxxxx/reverse", ) - def test_plans_delete(self, request_mock): + def test_plans_delete(self, request_mock: Any) -> None: stripe.Plan.delete("price_xxxxxxxxxxxxx") request_mock.assert_requested( "delete", "/v1/plans/price_xxxxxxxxxxxxx", ) - def test_plans_get(self, request_mock): + def test_plans_get(self, request_mock: Any) -> None: stripe.Plan.list(limit=3) request_mock.assert_requested( "get", "/v1/plans", ) - def test_plans_get_2(self, request_mock): + def test_plans_get_2(self, request_mock: Any) -> None: stripe.Plan.retrieve("price_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/plans/price_xxxxxxxxxxxxx", ) - def test_plans_post(self, request_mock): + def test_plans_post(self, request_mock: Any) -> None: stripe.Plan.create( amount=2000, currency="usd", @@ -1959,7 +2047,7 @@ def test_plans_post(self, request_mock): "/v1/plans", ) - def test_plans_post_2(self, request_mock): + def test_plans_post_2(self, request_mock: Any) -> None: stripe.Plan.create( amount=2000, currency="usd", @@ -1971,7 +2059,7 @@ def test_plans_post_2(self, request_mock): "/v1/plans", ) - def test_plans_post_3(self, request_mock): + def test_plans_post_3(self, request_mock: Any) -> None: stripe.Plan.modify( "price_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -1981,21 +2069,21 @@ def test_plans_post_3(self, request_mock): "/v1/plans/price_xxxxxxxxxxxxx", ) - def test_prices_get(self, request_mock): + def test_prices_get(self, request_mock: Any) -> None: stripe.Price.list(limit=3) request_mock.assert_requested( "get", "/v1/prices", ) - def test_prices_get_2(self, request_mock): + def test_prices_get_2(self, request_mock: Any) -> None: stripe.Price.retrieve("price_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/prices/price_xxxxxxxxxxxxx", ) - def test_prices_post(self, request_mock): + def test_prices_post(self, request_mock: Any) -> None: stripe.Price.create( unit_amount=2000, currency="usd", @@ -2011,7 +2099,7 @@ def test_prices_post(self, request_mock): "/v1/prices", ) - def test_prices_post_2(self, request_mock): + def test_prices_post_2(self, request_mock: Any) -> None: stripe.Price.create( unit_amount=2000, currency="usd", @@ -2023,7 +2111,7 @@ def test_prices_post_2(self, request_mock): "/v1/prices", ) - def test_prices_post_3(self, request_mock): + def test_prices_post_3(self, request_mock: Any) -> None: stripe.Price.modify( "price_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -2033,7 +2121,7 @@ def test_prices_post_3(self, request_mock): "/v1/prices/price_xxxxxxxxxxxxx", ) - def test_prices_search_get(self, request_mock): + def test_prices_search_get(self, request_mock: Any) -> None: stripe.Price.search( query="active:'true' AND metadata['order_id']:'6735'", ) @@ -2042,35 +2130,35 @@ def test_prices_search_get(self, request_mock): "/v1/prices/search", ) - def test_products_delete(self, request_mock): + def test_products_delete(self, request_mock: Any) -> None: stripe.Product.delete("prod_xxxxxxxxxxxxx") request_mock.assert_requested( "delete", "/v1/products/prod_xxxxxxxxxxxxx", ) - def test_products_get(self, request_mock): + def test_products_get(self, request_mock: Any) -> None: stripe.Product.list(limit=3) request_mock.assert_requested( "get", "/v1/products", ) - def test_products_get_2(self, request_mock): + def test_products_get_2(self, request_mock: Any) -> None: stripe.Product.retrieve("prod_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/products/prod_xxxxxxxxxxxxx", ) - def test_products_post(self, request_mock): + def test_products_post(self, request_mock: Any) -> None: stripe.Product.create(name="Gold Special") request_mock.assert_requested( "post", "/v1/products", ) - def test_products_post_2(self, request_mock): + def test_products_post_2(self, request_mock: Any) -> None: stripe.Product.modify( "prod_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -2080,7 +2168,7 @@ def test_products_post_2(self, request_mock): "/v1/products/prod_xxxxxxxxxxxxx", ) - def test_products_search_get(self, request_mock): + def test_products_search_get(self, request_mock: Any) -> None: stripe.Product.search( query="active:'true' AND metadata['order_id']:'6735'", ) @@ -2089,28 +2177,28 @@ def test_products_search_get(self, request_mock): "/v1/products/search", ) - def test_promotion_codes_get(self, request_mock): + def test_promotion_codes_get(self, request_mock: Any) -> None: stripe.PromotionCode.list(limit=3) request_mock.assert_requested( "get", "/v1/promotion_codes", ) - def test_promotion_codes_get_2(self, request_mock): + def test_promotion_codes_get_2(self, request_mock: Any) -> None: stripe.PromotionCode.retrieve("promo_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/promotion_codes/promo_xxxxxxxxxxxxx", ) - def test_promotion_codes_post(self, request_mock): + def test_promotion_codes_post(self, request_mock: Any) -> None: stripe.PromotionCode.create(coupon="Z4OV52SU") request_mock.assert_requested( "post", "/v1/promotion_codes", ) - def test_promotion_codes_post_2(self, request_mock): + def test_promotion_codes_post_2(self, request_mock: Any) -> None: stripe.PromotionCode.modify( "promo_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -2120,56 +2208,56 @@ def test_promotion_codes_post_2(self, request_mock): "/v1/promotion_codes/promo_xxxxxxxxxxxxx", ) - def test_quotes_accept_post(self, request_mock): + def test_quotes_accept_post(self, request_mock: Any) -> None: stripe.Quote.accept("qt_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/quotes/qt_xxxxxxxxxxxxx/accept", ) - def test_quotes_cancel_post(self, request_mock): + def test_quotes_cancel_post(self, request_mock: Any) -> None: stripe.Quote.cancel("qt_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/quotes/qt_xxxxxxxxxxxxx/cancel", ) - def test_quotes_finalize_post(self, request_mock): + def test_quotes_finalize_post(self, request_mock: Any) -> None: stripe.Quote.finalize_quote("qt_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/quotes/qt_xxxxxxxxxxxxx/finalize", ) - def test_quotes_get(self, request_mock): + def test_quotes_get(self, request_mock: Any) -> None: stripe.Quote.list(limit=3) request_mock.assert_requested( "get", "/v1/quotes", ) - def test_quotes_get_2(self, request_mock): + def test_quotes_get_2(self, request_mock: Any) -> None: stripe.Quote.retrieve("qt_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/quotes/qt_xxxxxxxxxxxxx", ) - def test_quotes_line_items_get(self, request_mock): + def test_quotes_line_items_get(self, request_mock: Any) -> None: stripe.Quote.list_line_items("qt_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/quotes/qt_xxxxxxxxxxxxx/line_items", ) - def test_quotes_pdf_get(self, request_mock): + def test_quotes_pdf_get(self, request_mock: Any) -> None: stripe.Quote.pdf("qt_xxxxxxxxxxxxx") request_mock.assert_requested_stream( "get", "/v1/quotes/qt_xxxxxxxxxxxxx/pdf", ) - def test_quotes_post(self, request_mock): + def test_quotes_post(self, request_mock: Any) -> None: stripe.Quote.create( customer="cus_xxxxxxxxxxxxx", line_items=[{"price": "price_xxxxxxxxxxxxx", "quantity": 2}], @@ -2179,7 +2267,7 @@ def test_quotes_post(self, request_mock): "/v1/quotes", ) - def test_quotes_post_2(self, request_mock): + def test_quotes_post_2(self, request_mock: Any) -> None: stripe.Quote.modify( "qt_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -2189,28 +2277,28 @@ def test_quotes_post_2(self, request_mock): "/v1/quotes/qt_xxxxxxxxxxxxx", ) - def test_radar_early_fraud_warnings_get(self, request_mock): + def test_radar_early_fraud_warnings_get(self, request_mock: Any) -> None: stripe.radar.EarlyFraudWarning.list(limit=3) request_mock.assert_requested( "get", "/v1/radar/early_fraud_warnings", ) - def test_radar_early_fraud_warnings_get_2(self, request_mock): + def test_radar_early_fraud_warnings_get_2(self, request_mock: Any) -> None: stripe.radar.EarlyFraudWarning.retrieve("issfr_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/radar/early_fraud_warnings/issfr_xxxxxxxxxxxxx", ) - def test_radar_value_list_items_delete(self, request_mock): + def test_radar_value_list_items_delete(self, request_mock: Any) -> None: stripe.radar.ValueListItem.delete("rsli_xxxxxxxxxxxxx") request_mock.assert_requested( "delete", "/v1/radar/value_list_items/rsli_xxxxxxxxxxxxx", ) - def test_radar_value_list_items_get(self, request_mock): + def test_radar_value_list_items_get(self, request_mock: Any) -> None: stripe.radar.ValueListItem.list( limit=3, value_list="rsl_xxxxxxxxxxxxx", @@ -2220,14 +2308,14 @@ def test_radar_value_list_items_get(self, request_mock): "/v1/radar/value_list_items", ) - def test_radar_value_list_items_get_2(self, request_mock): + def test_radar_value_list_items_get_2(self, request_mock: Any) -> None: stripe.radar.ValueListItem.retrieve("rsli_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/radar/value_list_items/rsli_xxxxxxxxxxxxx", ) - def test_radar_value_list_items_post(self, request_mock): + def test_radar_value_list_items_post(self, request_mock: Any) -> None: stripe.radar.ValueListItem.create( value_list="rsl_xxxxxxxxxxxxx", value="1.2.3.4", @@ -2237,28 +2325,28 @@ def test_radar_value_list_items_post(self, request_mock): "/v1/radar/value_list_items", ) - def test_radar_value_lists_delete(self, request_mock): + def test_radar_value_lists_delete(self, request_mock: Any) -> None: stripe.radar.ValueList.delete("rsl_xxxxxxxxxxxxx") request_mock.assert_requested( "delete", "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx", ) - def test_radar_value_lists_get(self, request_mock): + def test_radar_value_lists_get(self, request_mock: Any) -> None: stripe.radar.ValueList.list(limit=3) request_mock.assert_requested( "get", "/v1/radar/value_lists", ) - def test_radar_value_lists_get_2(self, request_mock): + def test_radar_value_lists_get_2(self, request_mock: Any) -> None: stripe.radar.ValueList.retrieve("rsl_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx", ) - def test_radar_value_lists_post(self, request_mock): + def test_radar_value_lists_post(self, request_mock: Any) -> None: stripe.radar.ValueList.create( alias="custom_ip_xxxxxxxxxxxxx", name="Custom IP Blocklist", @@ -2269,7 +2357,7 @@ def test_radar_value_lists_post(self, request_mock): "/v1/radar/value_lists", ) - def test_radar_value_lists_post_2(self, request_mock): + def test_radar_value_lists_post_2(self, request_mock: Any) -> None: stripe.radar.ValueList.modify( "rsl_xxxxxxxxxxxxx", name="Updated IP Block List", @@ -2279,35 +2367,35 @@ def test_radar_value_lists_post_2(self, request_mock): "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx", ) - def test_refunds_cancel_post(self, request_mock): + def test_refunds_cancel_post(self, request_mock: Any) -> None: stripe.Refund.cancel("re_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/refunds/re_xxxxxxxxxxxxx/cancel", ) - def test_refunds_get(self, request_mock): + def test_refunds_get(self, request_mock: Any) -> None: stripe.Refund.list(limit=3) request_mock.assert_requested( "get", "/v1/refunds", ) - def test_refunds_get_2(self, request_mock): + def test_refunds_get_2(self, request_mock: Any) -> None: stripe.Refund.retrieve("re_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/refunds/re_xxxxxxxxxxxxx", ) - def test_refunds_post(self, request_mock): + def test_refunds_post(self, request_mock: Any) -> None: stripe.Refund.create(charge="ch_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/refunds", ) - def test_refunds_post_2(self, request_mock): + def test_refunds_post_2(self, request_mock: Any) -> None: stripe.Refund.modify( "re_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -2317,21 +2405,21 @@ def test_refunds_post_2(self, request_mock): "/v1/refunds/re_xxxxxxxxxxxxx", ) - def test_reporting_report_runs_get(self, request_mock): + def test_reporting_report_runs_get(self, request_mock: Any) -> None: stripe.reporting.ReportRun.list(limit=3) request_mock.assert_requested( "get", "/v1/reporting/report_runs", ) - def test_reporting_report_runs_get_2(self, request_mock): + def test_reporting_report_runs_get_2(self, request_mock: Any) -> None: stripe.reporting.ReportRun.retrieve("frr_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/reporting/report_runs/frr_xxxxxxxxxxxxx", ) - def test_reporting_report_runs_post(self, request_mock): + def test_reporting_report_runs_post(self, request_mock: Any) -> None: stripe.reporting.ReportRun.create( report_type="balance.summary.1", parameters={ @@ -2344,42 +2432,42 @@ def test_reporting_report_runs_post(self, request_mock): "/v1/reporting/report_runs", ) - def test_reporting_report_types_get(self, request_mock): + def test_reporting_report_types_get(self, request_mock: Any) -> None: stripe.reporting.ReportType.list() request_mock.assert_requested( "get", "/v1/reporting/report_types", ) - def test_reporting_report_types_get_2(self, request_mock): + def test_reporting_report_types_get_2(self, request_mock: Any) -> None: stripe.reporting.ReportType.retrieve("balance.summary.1") request_mock.assert_requested( "get", "/v1/reporting/report_types/balance.summary.1", ) - def test_reviews_approve_post(self, request_mock): + def test_reviews_approve_post(self, request_mock: Any) -> None: stripe.Review.approve("prv_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/reviews/prv_xxxxxxxxxxxxx/approve", ) - def test_reviews_get(self, request_mock): + def test_reviews_get(self, request_mock: Any) -> None: stripe.Review.list(limit=3) request_mock.assert_requested( "get", "/v1/reviews", ) - def test_reviews_get_2(self, request_mock): + def test_reviews_get_2(self, request_mock: Any) -> None: stripe.Review.retrieve("prv_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/reviews/prv_xxxxxxxxxxxxx", ) - def test_setup_attempts_get(self, request_mock): + def test_setup_attempts_get(self, request_mock: Any) -> None: stripe.SetupAttempt.list( limit=3, setup_intent="si_xyz", @@ -2389,14 +2477,14 @@ def test_setup_attempts_get(self, request_mock): "/v1/setup_attempts", ) - def test_setup_intents_cancel_post(self, request_mock): + def test_setup_intents_cancel_post(self, request_mock: Any) -> None: stripe.SetupIntent.cancel("seti_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/setup_intents/seti_xxxxxxxxxxxxx/cancel", ) - def test_setup_intents_confirm_post(self, request_mock): + def test_setup_intents_confirm_post(self, request_mock: Any) -> None: stripe.SetupIntent.confirm( "seti_xxxxxxxxxxxxx", payment_method="pm_card_visa", @@ -2406,28 +2494,28 @@ def test_setup_intents_confirm_post(self, request_mock): "/v1/setup_intents/seti_xxxxxxxxxxxxx/confirm", ) - def test_setup_intents_get(self, request_mock): + def test_setup_intents_get(self, request_mock: Any) -> None: stripe.SetupIntent.list(limit=3) request_mock.assert_requested( "get", "/v1/setup_intents", ) - def test_setup_intents_get_2(self, request_mock): + def test_setup_intents_get_2(self, request_mock: Any) -> None: stripe.SetupIntent.retrieve("seti_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/setup_intents/seti_xxxxxxxxxxxxx", ) - def test_setup_intents_post(self, request_mock): + def test_setup_intents_post(self, request_mock: Any) -> None: stripe.SetupIntent.create(payment_method_types=["card"]) request_mock.assert_requested( "post", "/v1/setup_intents", ) - def test_setup_intents_post_2(self, request_mock): + def test_setup_intents_post_2(self, request_mock: Any) -> None: stripe.SetupIntent.modify( "seti_xxxxxxxxxxxxx", metadata={"user_id": "3435453"}, @@ -2437,14 +2525,18 @@ def test_setup_intents_post_2(self, request_mock): "/v1/setup_intents/seti_xxxxxxxxxxxxx", ) - def test_setup_intents_verify_microdeposits_post(self, request_mock): + def test_setup_intents_verify_microdeposits_post( + self, request_mock: Any + ) -> None: stripe.SetupIntent.verify_microdeposits("seti_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/setup_intents/seti_xxxxxxxxxxxxx/verify_microdeposits", ) - def test_setup_intents_verify_microdeposits_post_2(self, request_mock): + def test_setup_intents_verify_microdeposits_post_2( + self, request_mock: Any + ) -> None: stripe.SetupIntent.verify_microdeposits( "seti_xxxxxxxxxxxxx", amounts=[32, 45], @@ -2454,28 +2546,28 @@ def test_setup_intents_verify_microdeposits_post_2(self, request_mock): "/v1/setup_intents/seti_xxxxxxxxxxxxx/verify_microdeposits", ) - def test_shipping_rates_get(self, request_mock): + def test_shipping_rates_get(self, request_mock: Any) -> None: stripe.ShippingRate.list() request_mock.assert_requested( "get", "/v1/shipping_rates", ) - def test_shipping_rates_get_2(self, request_mock): + def test_shipping_rates_get_2(self, request_mock: Any) -> None: stripe.ShippingRate.list(limit=3) request_mock.assert_requested( "get", "/v1/shipping_rates", ) - def test_shipping_rates_get_3(self, request_mock): + def test_shipping_rates_get_3(self, request_mock: Any) -> None: stripe.ShippingRate.retrieve("shr_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/shipping_rates/shr_xxxxxxxxxxxxx", ) - def test_shipping_rates_post(self, request_mock): + def test_shipping_rates_post(self, request_mock: Any) -> None: stripe.ShippingRate.create( display_name="Sample Shipper", fixed_amount={"currency": "usd", "amount": 400}, @@ -2486,7 +2578,7 @@ def test_shipping_rates_post(self, request_mock): "/v1/shipping_rates", ) - def test_shipping_rates_post_2(self, request_mock): + def test_shipping_rates_post_2(self, request_mock: Any) -> None: stripe.ShippingRate.create( display_name="Ground shipping", type="fixed_amount", @@ -2497,7 +2589,7 @@ def test_shipping_rates_post_2(self, request_mock): "/v1/shipping_rates", ) - def test_shipping_rates_post_3(self, request_mock): + def test_shipping_rates_post_3(self, request_mock: Any) -> None: stripe.ShippingRate.modify( "shr_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -2507,35 +2599,35 @@ def test_shipping_rates_post_3(self, request_mock): "/v1/shipping_rates/shr_xxxxxxxxxxxxx", ) - def test_sigma_scheduled_query_runs_get(self, request_mock): + def test_sigma_scheduled_query_runs_get(self, request_mock: Any) -> None: stripe.sigma.ScheduledQueryRun.list(limit=3) request_mock.assert_requested( "get", "/v1/sigma/scheduled_query_runs", ) - def test_sigma_scheduled_query_runs_get_2(self, request_mock): + def test_sigma_scheduled_query_runs_get_2(self, request_mock: Any) -> None: stripe.sigma.ScheduledQueryRun.retrieve("sqr_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/sigma/scheduled_query_runs/sqr_xxxxxxxxxxxxx", ) - def test_sources_get(self, request_mock): + def test_sources_get(self, request_mock: Any) -> None: stripe.Source.retrieve("src_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/sources/src_xxxxxxxxxxxxx", ) - def test_sources_get_2(self, request_mock): + def test_sources_get_2(self, request_mock: Any) -> None: stripe.Source.retrieve("src_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/sources/src_xxxxxxxxxxxxx", ) - def test_sources_post(self, request_mock): + def test_sources_post(self, request_mock: Any) -> None: stripe.Source.modify( "src_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -2545,28 +2637,28 @@ def test_sources_post(self, request_mock): "/v1/sources/src_xxxxxxxxxxxxx", ) - def test_subscription_items_delete(self, request_mock): + def test_subscription_items_delete(self, request_mock: Any) -> None: stripe.SubscriptionItem.delete("si_xxxxxxxxxxxxx") request_mock.assert_requested( "delete", "/v1/subscription_items/si_xxxxxxxxxxxxx", ) - def test_subscription_items_get(self, request_mock): + def test_subscription_items_get(self, request_mock: Any) -> None: stripe.SubscriptionItem.list(subscription="sub_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/subscription_items", ) - def test_subscription_items_get_2(self, request_mock): + def test_subscription_items_get_2(self, request_mock: Any) -> None: stripe.SubscriptionItem.retrieve("si_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/subscription_items/si_xxxxxxxxxxxxx", ) - def test_subscription_items_post(self, request_mock): + def test_subscription_items_post(self, request_mock: Any) -> None: stripe.SubscriptionItem.create( subscription="sub_xxxxxxxxxxxxx", price="price_xxxxxxxxxxxxx", @@ -2577,7 +2669,7 @@ def test_subscription_items_post(self, request_mock): "/v1/subscription_items", ) - def test_subscription_items_post_2(self, request_mock): + def test_subscription_items_post_2(self, request_mock: Any) -> None: stripe.SubscriptionItem.modify( "si_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -2587,7 +2679,9 @@ def test_subscription_items_post_2(self, request_mock): "/v1/subscription_items/si_xxxxxxxxxxxxx", ) - def test_subscription_items_usage_record_summaries_get(self, request_mock): + def test_subscription_items_usage_record_summaries_get( + self, request_mock: Any + ) -> None: stripe.SubscriptionItem.list_usage_record_summaries( "si_xxxxxxxxxxxxx", limit=3, @@ -2597,7 +2691,9 @@ def test_subscription_items_usage_record_summaries_get(self, request_mock): "/v1/subscription_items/si_xxxxxxxxxxxxx/usage_record_summaries", ) - def test_subscription_items_usage_records_post(self, request_mock): + def test_subscription_items_usage_records_post( + self, request_mock: Any + ) -> None: stripe.SubscriptionItem.create_usage_record( "si_xxxxxxxxxxxxx", quantity=100, @@ -2608,28 +2704,30 @@ def test_subscription_items_usage_records_post(self, request_mock): "/v1/subscription_items/si_xxxxxxxxxxxxx/usage_records", ) - def test_subscription_schedules_cancel_post(self, request_mock): + def test_subscription_schedules_cancel_post( + self, request_mock: Any + ) -> None: stripe.SubscriptionSchedule.cancel("sub_sched_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx/cancel", ) - def test_subscription_schedules_get(self, request_mock): + def test_subscription_schedules_get(self, request_mock: Any) -> None: stripe.SubscriptionSchedule.list(limit=3) request_mock.assert_requested( "get", "/v1/subscription_schedules", ) - def test_subscription_schedules_get_2(self, request_mock): + def test_subscription_schedules_get_2(self, request_mock: Any) -> None: stripe.SubscriptionSchedule.retrieve("sub_sched_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx", ) - def test_subscription_schedules_post(self, request_mock): + def test_subscription_schedules_post(self, request_mock: Any) -> None: stripe.SubscriptionSchedule.create( customer="cus_xxxxxxxxxxxxx", start_date=1676070661, @@ -2646,7 +2744,7 @@ def test_subscription_schedules_post(self, request_mock): "/v1/subscription_schedules", ) - def test_subscription_schedules_post_2(self, request_mock): + def test_subscription_schedules_post_2(self, request_mock: Any) -> None: stripe.SubscriptionSchedule.modify( "sub_sched_xxxxxxxxxxxxx", end_behavior="release", @@ -2656,42 +2754,44 @@ def test_subscription_schedules_post_2(self, request_mock): "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx", ) - def test_subscription_schedules_release_post(self, request_mock): + def test_subscription_schedules_release_post( + self, request_mock: Any + ) -> None: stripe.SubscriptionSchedule.release("sub_sched_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx/release", ) - def test_subscriptions_delete(self, request_mock): + def test_subscriptions_delete(self, request_mock: Any) -> None: stripe.Subscription.cancel("sub_xxxxxxxxxxxxx") request_mock.assert_requested( "delete", "/v1/subscriptions/sub_xxxxxxxxxxxxx", ) - def test_subscriptions_discount_delete(self, request_mock): + def test_subscriptions_discount_delete(self, request_mock: Any) -> None: stripe.Subscription.delete_discount("sub_xyz") request_mock.assert_requested( "delete", "/v1/subscriptions/sub_xyz/discount", ) - def test_subscriptions_get(self, request_mock): + def test_subscriptions_get(self, request_mock: Any) -> None: stripe.Subscription.list(limit=3) request_mock.assert_requested( "get", "/v1/subscriptions", ) - def test_subscriptions_get_2(self, request_mock): + def test_subscriptions_get_2(self, request_mock: Any) -> None: stripe.Subscription.retrieve("sub_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/subscriptions/sub_xxxxxxxxxxxxx", ) - def test_subscriptions_post(self, request_mock): + def test_subscriptions_post(self, request_mock: Any) -> None: stripe.Subscription.create( customer="cus_xxxxxxxxxxxxx", items=[{"price": "price_xxxxxxxxxxxxx"}], @@ -2701,7 +2801,7 @@ def test_subscriptions_post(self, request_mock): "/v1/subscriptions", ) - def test_subscriptions_post_2(self, request_mock): + def test_subscriptions_post_2(self, request_mock: Any) -> None: stripe.Subscription.modify( "sub_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -2711,7 +2811,7 @@ def test_subscriptions_post_2(self, request_mock): "/v1/subscriptions/sub_xxxxxxxxxxxxx", ) - def test_subscriptions_search_get(self, request_mock): + def test_subscriptions_search_get(self, request_mock: Any) -> None: stripe.Subscription.search( query="status:'active' AND metadata['order_id']:'6735'", ) @@ -2720,14 +2820,14 @@ def test_subscriptions_search_get(self, request_mock): "/v1/subscriptions/search", ) - def test_tax_calculations_line_items_get(self, request_mock): + def test_tax_calculations_line_items_get(self, request_mock: Any) -> None: stripe.tax.Calculation.list_line_items("xxx") request_mock.assert_requested( "get", "/v1/tax/calculations/xxx/line_items", ) - def test_tax_calculations_post(self, request_mock): + def test_tax_calculations_post(self, request_mock: Any) -> None: stripe.tax.Calculation.create( currency="usd", line_items=[{"amount": 1000, "reference": "L1"}], @@ -2747,35 +2847,35 @@ def test_tax_calculations_post(self, request_mock): "/v1/tax/calculations", ) - def test_tax_codes_get(self, request_mock): + def test_tax_codes_get(self, request_mock: Any) -> None: stripe.TaxCode.list(limit=3) request_mock.assert_requested( "get", "/v1/tax_codes", ) - def test_tax_codes_get_2(self, request_mock): + def test_tax_codes_get_2(self, request_mock: Any) -> None: stripe.TaxCode.retrieve("txcd_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/tax_codes/txcd_xxxxxxxxxxxxx", ) - def test_tax_rates_get(self, request_mock): + def test_tax_rates_get(self, request_mock: Any) -> None: stripe.TaxRate.list(limit=3) request_mock.assert_requested( "get", "/v1/tax_rates", ) - def test_tax_rates_get_2(self, request_mock): + def test_tax_rates_get_2(self, request_mock: Any) -> None: stripe.TaxRate.retrieve("txr_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/tax_rates/txr_xxxxxxxxxxxxx", ) - def test_tax_rates_post(self, request_mock): + def test_tax_rates_post(self, request_mock: Any) -> None: stripe.TaxRate.create( display_name="VAT", description="VAT Germany", @@ -2788,7 +2888,7 @@ def test_tax_rates_post(self, request_mock): "/v1/tax_rates", ) - def test_tax_rates_post_2(self, request_mock): + def test_tax_rates_post_2(self, request_mock: Any) -> None: stripe.TaxRate.modify( "txr_xxxxxxxxxxxxx", active=False, @@ -2798,7 +2898,9 @@ def test_tax_rates_post_2(self, request_mock): "/v1/tax_rates/txr_xxxxxxxxxxxxx", ) - def test_tax_transactions_create_from_calculation_post(self, request_mock): + def test_tax_transactions_create_from_calculation_post( + self, request_mock: Any + ) -> None: stripe.tax.Transaction.create_from_calculation( calculation="xxx", reference="yyy", @@ -2808,56 +2910,56 @@ def test_tax_transactions_create_from_calculation_post(self, request_mock): "/v1/tax/transactions/create_from_calculation", ) - def test_terminal_configurations_delete(self, request_mock): + def test_terminal_configurations_delete(self, request_mock: Any) -> None: stripe.terminal.Configuration.delete("uc_123") request_mock.assert_requested( "delete", "/v1/terminal/configurations/uc_123", ) - def test_terminal_configurations_delete_2(self, request_mock): + def test_terminal_configurations_delete_2(self, request_mock: Any) -> None: stripe.terminal.Configuration.delete("tmc_xxxxxxxxxxxxx") request_mock.assert_requested( "delete", "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx", ) - def test_terminal_configurations_get(self, request_mock): + def test_terminal_configurations_get(self, request_mock: Any) -> None: stripe.terminal.Configuration.list() request_mock.assert_requested( "get", "/v1/terminal/configurations", ) - def test_terminal_configurations_get_2(self, request_mock): + def test_terminal_configurations_get_2(self, request_mock: Any) -> None: stripe.terminal.Configuration.retrieve("uc_123") request_mock.assert_requested( "get", "/v1/terminal/configurations/uc_123", ) - def test_terminal_configurations_get_3(self, request_mock): + def test_terminal_configurations_get_3(self, request_mock: Any) -> None: stripe.terminal.Configuration.list(limit=3) request_mock.assert_requested( "get", "/v1/terminal/configurations", ) - def test_terminal_configurations_get_4(self, request_mock): + def test_terminal_configurations_get_4(self, request_mock: Any) -> None: stripe.terminal.Configuration.retrieve("tmc_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx", ) - def test_terminal_configurations_post(self, request_mock): + def test_terminal_configurations_post(self, request_mock: Any) -> None: stripe.terminal.Configuration.create() request_mock.assert_requested( "post", "/v1/terminal/configurations", ) - def test_terminal_configurations_post_2(self, request_mock): + def test_terminal_configurations_post_2(self, request_mock: Any) -> None: stripe.terminal.Configuration.modify( "uc_123", tipping={"usd": {"fixed_amounts": [10]}}, @@ -2867,7 +2969,7 @@ def test_terminal_configurations_post_2(self, request_mock): "/v1/terminal/configurations/uc_123", ) - def test_terminal_configurations_post_3(self, request_mock): + def test_terminal_configurations_post_3(self, request_mock: Any) -> None: stripe.terminal.Configuration.create( bbpos_wisepos_e={"splashscreen": "file_xxxxxxxxxxxxx"}, ) @@ -2876,7 +2978,7 @@ def test_terminal_configurations_post_3(self, request_mock): "/v1/terminal/configurations", ) - def test_terminal_configurations_post_4(self, request_mock): + def test_terminal_configurations_post_4(self, request_mock: Any) -> None: stripe.terminal.Configuration.modify( "tmc_xxxxxxxxxxxxx", bbpos_wisepos_e={"splashscreen": "file_xxxxxxxxxxxxx"}, @@ -2886,35 +2988,35 @@ def test_terminal_configurations_post_4(self, request_mock): "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx", ) - def test_terminal_connection_tokens_post(self, request_mock): + def test_terminal_connection_tokens_post(self, request_mock: Any) -> None: stripe.terminal.ConnectionToken.create() request_mock.assert_requested( "post", "/v1/terminal/connection_tokens", ) - def test_terminal_locations_delete(self, request_mock): + def test_terminal_locations_delete(self, request_mock: Any) -> None: stripe.terminal.Location.delete("tml_xxxxxxxxxxxxx") request_mock.assert_requested( "delete", "/v1/terminal/locations/tml_xxxxxxxxxxxxx", ) - def test_terminal_locations_get(self, request_mock): + def test_terminal_locations_get(self, request_mock: Any) -> None: stripe.terminal.Location.list(limit=3) request_mock.assert_requested( "get", "/v1/terminal/locations", ) - def test_terminal_locations_get_2(self, request_mock): + def test_terminal_locations_get_2(self, request_mock: Any) -> None: stripe.terminal.Location.retrieve("tml_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/terminal/locations/tml_xxxxxxxxxxxxx", ) - def test_terminal_locations_post(self, request_mock): + def test_terminal_locations_post(self, request_mock: Any) -> None: stripe.terminal.Location.create( display_name="My First Store", address={ @@ -2930,7 +3032,7 @@ def test_terminal_locations_post(self, request_mock): "/v1/terminal/locations", ) - def test_terminal_locations_post_2(self, request_mock): + def test_terminal_locations_post_2(self, request_mock: Any) -> None: stripe.terminal.Location.modify( "tml_xxxxxxxxxxxxx", display_name="My First Store", @@ -2940,35 +3042,37 @@ def test_terminal_locations_post_2(self, request_mock): "/v1/terminal/locations/tml_xxxxxxxxxxxxx", ) - def test_terminal_readers_cancel_action_post(self, request_mock): + def test_terminal_readers_cancel_action_post( + self, request_mock: Any + ) -> None: stripe.terminal.Reader.cancel_action("tmr_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/cancel_action", ) - def test_terminal_readers_delete(self, request_mock): + def test_terminal_readers_delete(self, request_mock: Any) -> None: stripe.terminal.Reader.delete("tmr_xxxxxxxxxxxxx") request_mock.assert_requested( "delete", "/v1/terminal/readers/tmr_xxxxxxxxxxxxx", ) - def test_terminal_readers_get(self, request_mock): + def test_terminal_readers_get(self, request_mock: Any) -> None: stripe.terminal.Reader.list(limit=3) request_mock.assert_requested( "get", "/v1/terminal/readers", ) - def test_terminal_readers_get_2(self, request_mock): + def test_terminal_readers_get_2(self, request_mock: Any) -> None: stripe.terminal.Reader.retrieve("tmr_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/terminal/readers/tmr_xxxxxxxxxxxxx", ) - def test_terminal_readers_post(self, request_mock): + def test_terminal_readers_post(self, request_mock: Any) -> None: stripe.terminal.Reader.create( registration_code="puppies-plug-could", label="Blue Rabbit", @@ -2979,7 +3083,7 @@ def test_terminal_readers_post(self, request_mock): "/v1/terminal/readers", ) - def test_terminal_readers_post_2(self, request_mock): + def test_terminal_readers_post_2(self, request_mock: Any) -> None: stripe.terminal.Reader.modify( "tmr_xxxxxxxxxxxxx", label="Blue Rabbit", @@ -2989,7 +3093,9 @@ def test_terminal_readers_post_2(self, request_mock): "/v1/terminal/readers/tmr_xxxxxxxxxxxxx", ) - def test_terminal_readers_process_payment_intent_post(self, request_mock): + def test_terminal_readers_process_payment_intent_post( + self, request_mock: Any + ) -> None: stripe.terminal.Reader.process_payment_intent( "tmr_xxxxxxxxxxxxx", payment_intent="pi_xxxxxxxxxxxxx", @@ -2999,7 +3105,9 @@ def test_terminal_readers_process_payment_intent_post(self, request_mock): "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_payment_intent", ) - def test_terminal_readers_process_setup_intent_post(self, request_mock): + def test_terminal_readers_process_setup_intent_post( + self, request_mock: Any + ) -> None: stripe.terminal.Reader.process_setup_intent( "tmr_xxxxxxxxxxxxx", setup_intent="seti_xxxxxxxxxxxxx", @@ -3010,7 +3118,9 @@ def test_terminal_readers_process_setup_intent_post(self, request_mock): "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", ) - def test_test_helpers_customers_fund_cash_balance_post(self, request_mock): + def test_test_helpers_customers_fund_cash_balance_post( + self, request_mock: Any + ) -> None: stripe.Customer.TestHelpers.fund_cash_balance( "cus_123", amount=30, @@ -3022,8 +3132,8 @@ def test_test_helpers_customers_fund_cash_balance_post(self, request_mock): ) def test_test_helpers_issuing_authorizations_capture_post( - self, request_mock - ): + self, request_mock: Any + ) -> None: stripe.issuing.Authorization.TestHelpers.capture( "example_authorization", capture_amount=100, @@ -3069,8 +3179,8 @@ def test_test_helpers_issuing_authorizations_capture_post( ) def test_test_helpers_issuing_authorizations_expire_post( - self, request_mock - ): + self, request_mock: Any + ) -> None: stripe.issuing.Authorization.TestHelpers.expire( "example_authorization" ) @@ -3080,8 +3190,8 @@ def test_test_helpers_issuing_authorizations_expire_post( ) def test_test_helpers_issuing_authorizations_increment_post( - self, request_mock - ): + self, request_mock: Any + ) -> None: stripe.issuing.Authorization.TestHelpers.increment( "example_authorization", increment_amount=50, @@ -3092,7 +3202,9 @@ def test_test_helpers_issuing_authorizations_increment_post( "/v1/test_helpers/issuing/authorizations/example_authorization/increment", ) - def test_test_helpers_issuing_authorizations_post(self, request_mock): + def test_test_helpers_issuing_authorizations_post( + self, request_mock: Any + ) -> None: stripe.issuing.Authorization.TestHelpers.create( amount=100, amount_details={"atm_fee": 10, "cashback_amount": 5}, @@ -3125,8 +3237,8 @@ def test_test_helpers_issuing_authorizations_post(self, request_mock): ) def test_test_helpers_issuing_authorizations_reverse_post( - self, request_mock - ): + self, request_mock: Any + ) -> None: stripe.issuing.Authorization.TestHelpers.reverse( "example_authorization", reverse_amount=20, @@ -3137,15 +3249,17 @@ def test_test_helpers_issuing_authorizations_reverse_post( ) def test_test_helpers_issuing_cards_shipping_deliver_post( - self, request_mock - ): + self, request_mock: Any + ) -> None: stripe.issuing.Card.TestHelpers.deliver_card("card_123") request_mock.assert_requested( "post", "/v1/test_helpers/issuing/cards/card_123/shipping/deliver", ) - def test_test_helpers_issuing_cards_shipping_fail_post(self, request_mock): + def test_test_helpers_issuing_cards_shipping_fail_post( + self, request_mock: Any + ) -> None: stripe.issuing.Card.TestHelpers.fail_card("card_123") request_mock.assert_requested( "post", @@ -3153,15 +3267,17 @@ def test_test_helpers_issuing_cards_shipping_fail_post(self, request_mock): ) def test_test_helpers_issuing_cards_shipping_return_post( - self, request_mock - ): + self, request_mock: Any + ) -> None: stripe.issuing.Card.TestHelpers.return_card("card_123") request_mock.assert_requested( "post", "/v1/test_helpers/issuing/cards/card_123/shipping/return", ) - def test_test_helpers_issuing_cards_shipping_ship_post(self, request_mock): + def test_test_helpers_issuing_cards_shipping_ship_post( + self, request_mock: Any + ) -> None: stripe.issuing.Card.TestHelpers.ship_card("card_123") request_mock.assert_requested( "post", @@ -3169,8 +3285,8 @@ def test_test_helpers_issuing_cards_shipping_ship_post(self, request_mock): ) def test_test_helpers_issuing_transactions_create_force_capture_post( - self, request_mock - ): + self, request_mock: Any + ) -> None: stripe.issuing.Transaction.TestHelpers.create_force_capture( amount=100, card="foo", @@ -3226,8 +3342,8 @@ def test_test_helpers_issuing_transactions_create_force_capture_post( ) def test_test_helpers_issuing_transactions_create_unlinked_refund_post( - self, request_mock - ): + self, request_mock: Any + ) -> None: stripe.issuing.Transaction.TestHelpers.create_unlinked_refund( amount=100, card="foo", @@ -3282,7 +3398,9 @@ def test_test_helpers_issuing_transactions_create_unlinked_refund_post( "/v1/test_helpers/issuing/transactions/create_unlinked_refund", ) - def test_test_helpers_issuing_transactions_refund_post(self, request_mock): + def test_test_helpers_issuing_transactions_refund_post( + self, request_mock: Any + ) -> None: stripe.issuing.Transaction.TestHelpers.refund( "example_transaction", refund_amount=50, @@ -3292,14 +3410,16 @@ def test_test_helpers_issuing_transactions_refund_post(self, request_mock): "/v1/test_helpers/issuing/transactions/example_transaction/refund", ) - def test_test_helpers_refunds_expire_post(self, request_mock): + def test_test_helpers_refunds_expire_post(self, request_mock: Any) -> None: stripe.Refund.TestHelpers.expire("re_123") request_mock.assert_requested( "post", "/v1/test_helpers/refunds/re_123/expire", ) - def test_test_helpers_test_clocks_advance_post(self, request_mock): + def test_test_helpers_test_clocks_advance_post( + self, request_mock: Any + ) -> None: stripe.test_helpers.TestClock.advance( "clock_xyz", frozen_time=142, @@ -3309,7 +3429,9 @@ def test_test_helpers_test_clocks_advance_post(self, request_mock): "/v1/test_helpers/test_clocks/clock_xyz/advance", ) - def test_test_helpers_test_clocks_advance_post_2(self, request_mock): + def test_test_helpers_test_clocks_advance_post_2( + self, request_mock: Any + ) -> None: stripe.test_helpers.TestClock.advance( "clock_xxxxxxxxxxxxx", frozen_time=1675552261, @@ -3319,49 +3441,51 @@ def test_test_helpers_test_clocks_advance_post_2(self, request_mock): "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx/advance", ) - def test_test_helpers_test_clocks_delete(self, request_mock): + def test_test_helpers_test_clocks_delete(self, request_mock: Any) -> None: stripe.test_helpers.TestClock.delete("clock_xyz") request_mock.assert_requested( "delete", "/v1/test_helpers/test_clocks/clock_xyz", ) - def test_test_helpers_test_clocks_delete_2(self, request_mock): + def test_test_helpers_test_clocks_delete_2( + self, request_mock: Any + ) -> None: stripe.test_helpers.TestClock.delete("clock_xxxxxxxxxxxxx") request_mock.assert_requested( "delete", "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx", ) - def test_test_helpers_test_clocks_get(self, request_mock): + def test_test_helpers_test_clocks_get(self, request_mock: Any) -> None: stripe.test_helpers.TestClock.list() request_mock.assert_requested( "get", "/v1/test_helpers/test_clocks", ) - def test_test_helpers_test_clocks_get_2(self, request_mock): + def test_test_helpers_test_clocks_get_2(self, request_mock: Any) -> None: stripe.test_helpers.TestClock.retrieve("clock_xyz") request_mock.assert_requested( "get", "/v1/test_helpers/test_clocks/clock_xyz", ) - def test_test_helpers_test_clocks_get_3(self, request_mock): + def test_test_helpers_test_clocks_get_3(self, request_mock: Any) -> None: stripe.test_helpers.TestClock.list(limit=3) request_mock.assert_requested( "get", "/v1/test_helpers/test_clocks", ) - def test_test_helpers_test_clocks_get_4(self, request_mock): + def test_test_helpers_test_clocks_get_4(self, request_mock: Any) -> None: stripe.test_helpers.TestClock.retrieve("clock_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx", ) - def test_test_helpers_test_clocks_post(self, request_mock): + def test_test_helpers_test_clocks_post(self, request_mock: Any) -> None: stripe.test_helpers.TestClock.create( frozen_time=123, name="cogsworth", @@ -3371,7 +3495,7 @@ def test_test_helpers_test_clocks_post(self, request_mock): "/v1/test_helpers/test_clocks", ) - def test_test_helpers_test_clocks_post_2(self, request_mock): + def test_test_helpers_test_clocks_post_2(self, request_mock: Any) -> None: stripe.test_helpers.TestClock.create(frozen_time=1577836800) request_mock.assert_requested( "post", @@ -3379,8 +3503,8 @@ def test_test_helpers_test_clocks_post_2(self, request_mock): ) def test_test_helpers_treasury_inbound_transfers_fail_post( - self, request_mock - ): + self, request_mock: Any + ) -> None: stripe.treasury.InboundTransfer.TestHelpers.fail( "ibt_123", failure_details={"code": "account_closed"}, @@ -3391,8 +3515,8 @@ def test_test_helpers_treasury_inbound_transfers_fail_post( ) def test_test_helpers_treasury_inbound_transfers_return_post( - self, request_mock - ): + self, request_mock: Any + ) -> None: stripe.treasury.InboundTransfer.TestHelpers.return_inbound_transfer( "ibt_123", ) @@ -3402,8 +3526,8 @@ def test_test_helpers_treasury_inbound_transfers_return_post( ) def test_test_helpers_treasury_inbound_transfers_succeed_post( - self, request_mock - ): + self, request_mock: Any + ) -> None: stripe.treasury.InboundTransfer.TestHelpers.succeed("ibt_123") request_mock.assert_requested( "post", @@ -3411,8 +3535,8 @@ def test_test_helpers_treasury_inbound_transfers_succeed_post( ) def test_test_helpers_treasury_outbound_transfers_fail_post( - self, request_mock - ): + self, request_mock: Any + ) -> None: stripe.treasury.OutboundTransfer.TestHelpers.fail("obt_123") request_mock.assert_requested( "post", @@ -3420,8 +3544,8 @@ def test_test_helpers_treasury_outbound_transfers_fail_post( ) def test_test_helpers_treasury_outbound_transfers_post_post( - self, request_mock - ): + self, request_mock: Any + ) -> None: stripe.treasury.OutboundTransfer.TestHelpers.post("obt_123") request_mock.assert_requested( "post", @@ -3429,8 +3553,8 @@ def test_test_helpers_treasury_outbound_transfers_post_post( ) def test_test_helpers_treasury_outbound_transfers_return_post( - self, request_mock - ): + self, request_mock: Any + ) -> None: stripe.treasury.OutboundTransfer.TestHelpers.return_outbound_transfer( "obt_123", returned_details={"code": "account_closed"}, @@ -3440,7 +3564,9 @@ def test_test_helpers_treasury_outbound_transfers_return_post( "/v1/test_helpers/treasury/outbound_transfers/obt_123/return", ) - def test_test_helpers_treasury_received_credits_post(self, request_mock): + def test_test_helpers_treasury_received_credits_post( + self, request_mock: Any + ) -> None: stripe.treasury.ReceivedCredit.TestHelpers.create( financial_account="fa_123", network="ach", @@ -3452,7 +3578,9 @@ def test_test_helpers_treasury_received_credits_post(self, request_mock): "/v1/test_helpers/treasury/received_credits", ) - def test_test_helpers_treasury_received_debits_post(self, request_mock): + def test_test_helpers_treasury_received_debits_post( + self, request_mock: Any + ) -> None: stripe.treasury.ReceivedDebit.TestHelpers.create( financial_account="fa_123", network="ach", @@ -3464,14 +3592,14 @@ def test_test_helpers_treasury_received_debits_post(self, request_mock): "/v1/test_helpers/treasury/received_debits", ) - def test_tokens_get(self, request_mock): + def test_tokens_get(self, request_mock: Any) -> None: stripe.Token.retrieve("tok_xxxx") request_mock.assert_requested( "get", "/v1/tokens/tok_xxxx", ) - def test_tokens_post(self, request_mock): + def test_tokens_post(self, request_mock: Any) -> None: stripe.Token.create( card={ "number": "4242424242424242", @@ -3485,7 +3613,7 @@ def test_tokens_post(self, request_mock): "/v1/tokens", ) - def test_tokens_post_2(self, request_mock): + def test_tokens_post_2(self, request_mock: Any) -> None: stripe.Token.create( bank_account={ "country": "US", @@ -3501,14 +3629,14 @@ def test_tokens_post_2(self, request_mock): "/v1/tokens", ) - def test_tokens_post_3(self, request_mock): + def test_tokens_post_3(self, request_mock: Any) -> None: stripe.Token.create(pii={"id_number": "000000000"}) request_mock.assert_requested( "post", "/v1/tokens", ) - def test_tokens_post_4(self, request_mock): + def test_tokens_post_4(self, request_mock: Any) -> None: stripe.Token.create( account={ "individual": {"first_name": "Jane", "last_name": "Doe"}, @@ -3520,7 +3648,7 @@ def test_tokens_post_4(self, request_mock): "/v1/tokens", ) - def test_tokens_post_5(self, request_mock): + def test_tokens_post_5(self, request_mock: Any) -> None: stripe.Token.create( person={ "first_name": "Jane", @@ -3533,35 +3661,35 @@ def test_tokens_post_5(self, request_mock): "/v1/tokens", ) - def test_tokens_post_6(self, request_mock): + def test_tokens_post_6(self, request_mock: Any) -> None: stripe.Token.create(cvc_update={"cvc": "123"}) request_mock.assert_requested( "post", "/v1/tokens", ) - def test_topups_cancel_post(self, request_mock): + def test_topups_cancel_post(self, request_mock: Any) -> None: stripe.Topup.cancel("tu_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/topups/tu_xxxxxxxxxxxxx/cancel", ) - def test_topups_get(self, request_mock): + def test_topups_get(self, request_mock: Any) -> None: stripe.Topup.list(limit=3) request_mock.assert_requested( "get", "/v1/topups", ) - def test_topups_get_2(self, request_mock): + def test_topups_get_2(self, request_mock: Any) -> None: stripe.Topup.retrieve("tu_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/topups/tu_xxxxxxxxxxxxx", ) - def test_topups_post(self, request_mock): + def test_topups_post(self, request_mock: Any) -> None: stripe.Topup.create( amount=2000, currency="usd", @@ -3573,7 +3701,7 @@ def test_topups_post(self, request_mock): "/v1/topups", ) - def test_topups_post_2(self, request_mock): + def test_topups_post_2(self, request_mock: Any) -> None: stripe.Topup.modify( "tu_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -3583,21 +3711,21 @@ def test_topups_post_2(self, request_mock): "/v1/topups/tu_xxxxxxxxxxxxx", ) - def test_transfers_get(self, request_mock): + def test_transfers_get(self, request_mock: Any) -> None: stripe.Transfer.list(limit=3) request_mock.assert_requested( "get", "/v1/transfers", ) - def test_transfers_get_2(self, request_mock): + def test_transfers_get_2(self, request_mock: Any) -> None: stripe.Transfer.retrieve("tr_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/transfers/tr_xxxxxxxxxxxxx", ) - def test_transfers_post(self, request_mock): + def test_transfers_post(self, request_mock: Any) -> None: stripe.Transfer.create( amount=400, currency="usd", @@ -3609,7 +3737,7 @@ def test_transfers_post(self, request_mock): "/v1/transfers", ) - def test_transfers_post_2(self, request_mock): + def test_transfers_post_2(self, request_mock: Any) -> None: stripe.Transfer.modify( "tr_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -3619,7 +3747,7 @@ def test_transfers_post_2(self, request_mock): "/v1/transfers/tr_xxxxxxxxxxxxx", ) - def test_transfers_reversals_get(self, request_mock): + def test_transfers_reversals_get(self, request_mock: Any) -> None: stripe.Transfer.list_reversals( "tr_xxxxxxxxxxxxx", limit=3, @@ -3629,7 +3757,7 @@ def test_transfers_reversals_get(self, request_mock): "/v1/transfers/tr_xxxxxxxxxxxxx/reversals", ) - def test_transfers_reversals_get_2(self, request_mock): + def test_transfers_reversals_get_2(self, request_mock: Any) -> None: stripe.Transfer.retrieve_reversal( "tr_xxxxxxxxxxxxx", "trr_xxxxxxxxxxxxx", @@ -3639,7 +3767,7 @@ def test_transfers_reversals_get_2(self, request_mock): "/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx", ) - def test_transfers_reversals_post(self, request_mock): + def test_transfers_reversals_post(self, request_mock: Any) -> None: stripe.Transfer.create_reversal( "tr_xxxxxxxxxxxxx", amount=100, @@ -3649,7 +3777,7 @@ def test_transfers_reversals_post(self, request_mock): "/v1/transfers/tr_xxxxxxxxxxxxx/reversals", ) - def test_transfers_reversals_post_2(self, request_mock): + def test_transfers_reversals_post_2(self, request_mock: Any) -> None: stripe.Transfer.modify_reversal( "tr_xxxxxxxxxxxxx", "trr_xxxxxxxxxxxxx", @@ -3660,7 +3788,7 @@ def test_transfers_reversals_post_2(self, request_mock): "/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx", ) - def test_treasury_credit_reversals_get(self, request_mock): + def test_treasury_credit_reversals_get(self, request_mock: Any) -> None: stripe.treasury.CreditReversal.list( financial_account="fa_xxxxxxxxxxxxx", limit=3, @@ -3670,14 +3798,14 @@ def test_treasury_credit_reversals_get(self, request_mock): "/v1/treasury/credit_reversals", ) - def test_treasury_credit_reversals_get_2(self, request_mock): + def test_treasury_credit_reversals_get_2(self, request_mock: Any) -> None: stripe.treasury.CreditReversal.retrieve("credrev_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/treasury/credit_reversals/credrev_xxxxxxxxxxxxx", ) - def test_treasury_credit_reversals_post(self, request_mock): + def test_treasury_credit_reversals_post(self, request_mock: Any) -> None: stripe.treasury.CreditReversal.create( received_credit="rc_xxxxxxxxxxxxx", ) @@ -3686,7 +3814,7 @@ def test_treasury_credit_reversals_post(self, request_mock): "/v1/treasury/credit_reversals", ) - def test_treasury_debit_reversals_get(self, request_mock): + def test_treasury_debit_reversals_get(self, request_mock: Any) -> None: stripe.treasury.DebitReversal.list( financial_account="fa_xxxxxxxxxxxxx", limit=3, @@ -3696,42 +3824,46 @@ def test_treasury_debit_reversals_get(self, request_mock): "/v1/treasury/debit_reversals", ) - def test_treasury_debit_reversals_get_2(self, request_mock): + def test_treasury_debit_reversals_get_2(self, request_mock: Any) -> None: stripe.treasury.DebitReversal.retrieve("debrev_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/treasury/debit_reversals/debrev_xxxxxxxxxxxxx", ) - def test_treasury_debit_reversals_post(self, request_mock): + def test_treasury_debit_reversals_post(self, request_mock: Any) -> None: stripe.treasury.DebitReversal.create(received_debit="rd_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/treasury/debit_reversals", ) - def test_treasury_financial_accounts_features_get(self, request_mock): + def test_treasury_financial_accounts_features_get( + self, request_mock: Any + ) -> None: stripe.treasury.FinancialAccount.retrieve_features("fa_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx/features", ) - def test_treasury_financial_accounts_get(self, request_mock): + def test_treasury_financial_accounts_get(self, request_mock: Any) -> None: stripe.treasury.FinancialAccount.list(limit=3) request_mock.assert_requested( "get", "/v1/treasury/financial_accounts", ) - def test_treasury_financial_accounts_get_2(self, request_mock): + def test_treasury_financial_accounts_get_2( + self, request_mock: Any + ) -> None: stripe.treasury.FinancialAccount.retrieve("fa_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx", ) - def test_treasury_financial_accounts_post(self, request_mock): + def test_treasury_financial_accounts_post(self, request_mock: Any) -> None: stripe.treasury.FinancialAccount.create( supported_currencies=["usd"], features={}, @@ -3741,7 +3873,9 @@ def test_treasury_financial_accounts_post(self, request_mock): "/v1/treasury/financial_accounts", ) - def test_treasury_financial_accounts_post_2(self, request_mock): + def test_treasury_financial_accounts_post_2( + self, request_mock: Any + ) -> None: stripe.treasury.FinancialAccount.modify( "fa_xxxxxxxxxxxxx", metadata={"order_id": "6735"}, @@ -3751,14 +3885,16 @@ def test_treasury_financial_accounts_post_2(self, request_mock): "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx", ) - def test_treasury_inbound_transfers_cancel_post(self, request_mock): + def test_treasury_inbound_transfers_cancel_post( + self, request_mock: Any + ) -> None: stripe.treasury.InboundTransfer.cancel("ibt_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx/cancel", ) - def test_treasury_inbound_transfers_get(self, request_mock): + def test_treasury_inbound_transfers_get(self, request_mock: Any) -> None: stripe.treasury.InboundTransfer.list( financial_account="fa_xxxxxxxxxxxxx", limit=3, @@ -3768,14 +3904,14 @@ def test_treasury_inbound_transfers_get(self, request_mock): "/v1/treasury/inbound_transfers", ) - def test_treasury_inbound_transfers_get_2(self, request_mock): + def test_treasury_inbound_transfers_get_2(self, request_mock: Any) -> None: stripe.treasury.InboundTransfer.retrieve("ibt_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx", ) - def test_treasury_inbound_transfers_post(self, request_mock): + def test_treasury_inbound_transfers_post(self, request_mock: Any) -> None: stripe.treasury.InboundTransfer.create( financial_account="fa_xxxxxxxxxxxxx", amount=10000, @@ -3788,14 +3924,16 @@ def test_treasury_inbound_transfers_post(self, request_mock): "/v1/treasury/inbound_transfers", ) - def test_treasury_outbound_payments_cancel_post(self, request_mock): + def test_treasury_outbound_payments_cancel_post( + self, request_mock: Any + ) -> None: stripe.treasury.OutboundPayment.cancel("bot_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx/cancel", ) - def test_treasury_outbound_payments_get(self, request_mock): + def test_treasury_outbound_payments_get(self, request_mock: Any) -> None: stripe.treasury.OutboundPayment.list( financial_account="fa_xxxxxxxxxxxxx", limit=3, @@ -3805,14 +3943,14 @@ def test_treasury_outbound_payments_get(self, request_mock): "/v1/treasury/outbound_payments", ) - def test_treasury_outbound_payments_get_2(self, request_mock): + def test_treasury_outbound_payments_get_2(self, request_mock: Any) -> None: stripe.treasury.OutboundPayment.retrieve("bot_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx", ) - def test_treasury_outbound_payments_post(self, request_mock): + def test_treasury_outbound_payments_post(self, request_mock: Any) -> None: stripe.treasury.OutboundPayment.create( financial_account="fa_xxxxxxxxxxxxx", amount=10000, @@ -3826,14 +3964,16 @@ def test_treasury_outbound_payments_post(self, request_mock): "/v1/treasury/outbound_payments", ) - def test_treasury_outbound_transfers_cancel_post(self, request_mock): + def test_treasury_outbound_transfers_cancel_post( + self, request_mock: Any + ) -> None: stripe.treasury.OutboundTransfer.cancel("obt_xxxxxxxxxxxxx") request_mock.assert_requested( "post", "/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx/cancel", ) - def test_treasury_outbound_transfers_get(self, request_mock): + def test_treasury_outbound_transfers_get(self, request_mock: Any) -> None: stripe.treasury.OutboundTransfer.list( financial_account="fa_xxxxxxxxxxxxx", limit=3, @@ -3843,14 +3983,16 @@ def test_treasury_outbound_transfers_get(self, request_mock): "/v1/treasury/outbound_transfers", ) - def test_treasury_outbound_transfers_get_2(self, request_mock): + def test_treasury_outbound_transfers_get_2( + self, request_mock: Any + ) -> None: stripe.treasury.OutboundTransfer.retrieve("obt_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx", ) - def test_treasury_outbound_transfers_post(self, request_mock): + def test_treasury_outbound_transfers_post(self, request_mock: Any) -> None: stripe.treasury.OutboundTransfer.create( financial_account="fa_xxxxxxxxxxxxx", destination_payment_method="pm_xxxxxxxxxxxxx", @@ -3863,7 +4005,7 @@ def test_treasury_outbound_transfers_post(self, request_mock): "/v1/treasury/outbound_transfers", ) - def test_treasury_received_credits_get(self, request_mock): + def test_treasury_received_credits_get(self, request_mock: Any) -> None: stripe.treasury.ReceivedCredit.list( financial_account="fa_xxxxxxxxxxxxx", limit=3, @@ -3873,14 +4015,14 @@ def test_treasury_received_credits_get(self, request_mock): "/v1/treasury/received_credits", ) - def test_treasury_received_credits_get_2(self, request_mock): + def test_treasury_received_credits_get_2(self, request_mock: Any) -> None: stripe.treasury.ReceivedCredit.retrieve("rc_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/treasury/received_credits/rc_xxxxxxxxxxxxx", ) - def test_treasury_received_debits_get(self, request_mock): + def test_treasury_received_debits_get(self, request_mock: Any) -> None: stripe.treasury.ReceivedDebit.list( financial_account="fa_xxxxxxxxxxxxx", limit=3, @@ -3890,14 +4032,14 @@ def test_treasury_received_debits_get(self, request_mock): "/v1/treasury/received_debits", ) - def test_treasury_received_debits_get_2(self, request_mock): + def test_treasury_received_debits_get_2(self, request_mock: Any) -> None: stripe.treasury.ReceivedDebit.retrieve("rd_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/treasury/received_debits/rd_xxxxxxxxxxxxx", ) - def test_treasury_transaction_entries_get(self, request_mock): + def test_treasury_transaction_entries_get(self, request_mock: Any) -> None: stripe.treasury.TransactionEntry.list( financial_account="fa_xxxxxxxxxxxxx", limit=3, @@ -3907,14 +4049,16 @@ def test_treasury_transaction_entries_get(self, request_mock): "/v1/treasury/transaction_entries", ) - def test_treasury_transaction_entries_get_2(self, request_mock): + def test_treasury_transaction_entries_get_2( + self, request_mock: Any + ) -> None: stripe.treasury.TransactionEntry.retrieve("trxne_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/treasury/transaction_entries/trxne_xxxxxxxxxxxxx", ) - def test_treasury_transactions_get(self, request_mock): + def test_treasury_transactions_get(self, request_mock: Any) -> None: stripe.treasury.Transaction.list( financial_account="fa_xxxxxxxxxxxxx", limit=3, @@ -3924,35 +4068,35 @@ def test_treasury_transactions_get(self, request_mock): "/v1/treasury/transactions", ) - def test_treasury_transactions_get_2(self, request_mock): + def test_treasury_transactions_get_2(self, request_mock: Any) -> None: stripe.treasury.Transaction.retrieve("trxn_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/treasury/transactions/trxn_xxxxxxxxxxxxx", ) - def test_webhook_endpoints_delete(self, request_mock): + def test_webhook_endpoints_delete(self, request_mock: Any) -> None: stripe.WebhookEndpoint.delete("we_xxxxxxxxxxxxx") request_mock.assert_requested( "delete", "/v1/webhook_endpoints/we_xxxxxxxxxxxxx", ) - def test_webhook_endpoints_get(self, request_mock): + def test_webhook_endpoints_get(self, request_mock: Any) -> None: stripe.WebhookEndpoint.list(limit=3) request_mock.assert_requested( "get", "/v1/webhook_endpoints", ) - def test_webhook_endpoints_get_2(self, request_mock): + def test_webhook_endpoints_get_2(self, request_mock: Any) -> None: stripe.WebhookEndpoint.retrieve("we_xxxxxxxxxxxxx") request_mock.assert_requested( "get", "/v1/webhook_endpoints/we_xxxxxxxxxxxxx", ) - def test_webhook_endpoints_post(self, request_mock): + def test_webhook_endpoints_post(self, request_mock: Any) -> None: stripe.WebhookEndpoint.create( url="https://example.com/my/webhook/endpoint", enabled_events=["charge.failed", "charge.succeeded"], @@ -3962,7 +4106,7 @@ def test_webhook_endpoints_post(self, request_mock): "/v1/webhook_endpoints", ) - def test_webhook_endpoints_post_2(self, request_mock): + def test_webhook_endpoints_post_2(self, request_mock: Any) -> None: stripe.WebhookEndpoint.modify( "we_xxxxxxxxxxxxx", url="https://example.com/new_endpoint",