From 3e9ff481ac591fa227ff11774e7b01ecbf8513cc Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Thu, 26 Oct 2023 07:46:05 -0700 Subject: [PATCH 1/3] Docstrings on fields --- setup.py | 2 +- stripe/api_resources/account.py | 1509 ++++++++ stripe/api_resources/account_link.py | 30 + stripe/api_resources/account_session.py | 34 + stripe/api_resources/apple_pay_domain.py | 33 + stripe/api_resources/application.py | 12 + stripe/api_resources/application_fee.py | 111 + .../api_resources/application_fee_refund.py | 24 + stripe/api_resources/apps/secret.py | 96 + stripe/api_resources/balance.py | 21 + stripe/api_resources/balance_transaction.py | 84 + stripe/api_resources/bank_account.py | 62 + .../billing_portal/configuration.py | 254 ++ .../api_resources/billing_portal/session.py | 126 + stripe/api_resources/capability.py | 18 + stripe/api_resources/card.py | 98 + stripe/api_resources/cash_balance.py | 12 + stripe/api_resources/charge.py | 375 ++ stripe/api_resources/checkout/session.py | 1204 ++++++ .../connect_collection_transfer.py | 18 + stripe/api_resources/country_spec.py | 36 + stripe/api_resources/coupon.py | 141 + stripe/api_resources/credit_note.py | 342 ++ stripe/api_resources/credit_note_line_item.py | 60 + stripe/api_resources/customer.py | 650 ++++ .../customer_balance_transaction.py | 39 + .../customer_cash_balance_transaction.py | 42 + stripe/api_resources/discount.py | 38 + stripe/api_resources/dispute.py | 171 + stripe/api_resources/ephemeral_key.py | 21 + stripe/api_resources/event.py | 63 + stripe/api_resources/exchange_rate.py | 24 + stripe/api_resources/file.py | 63 + stripe/api_resources/file_link.py | 81 + .../financial_connections/account.py | 115 + .../financial_connections/account_owner.py | 24 + .../account_ownership.py | 12 + .../financial_connections/session.py | 62 + stripe/api_resources/funding_instructions.py | 12 + .../identity/verification_report.py | 60 + .../identity/verification_session.py | 135 + stripe/api_resources/invoice.py | 1504 ++++++++ stripe/api_resources/invoice_item.py | 261 ++ stripe/api_resources/invoice_line_item.py | 69 + stripe/api_resources/issuing/authorization.py | 303 ++ stripe/api_resources/issuing/card.py | 257 ++ stripe/api_resources/issuing/cardholder.py | 333 ++ stripe/api_resources/issuing/dispute.py | 384 ++ stripe/api_resources/issuing/token.py | 75 + stripe/api_resources/issuing/transaction.py | 327 ++ stripe/api_resources/line_item.py | 36 + stripe/api_resources/login_link.py | 9 + stripe/api_resources/mandate.py | 24 + stripe/api_resources/payment_intent.py | 3231 +++++++++++++++++ stripe/api_resources/payment_link.py | 598 +++ stripe/api_resources/payment_method.py | 348 ++ .../payment_method_configuration.py | 645 ++++ stripe/api_resources/payment_method_domain.py | 69 + stripe/api_resources/payout.py | 156 + stripe/api_resources/person.py | 78 + stripe/api_resources/plan.py | 212 ++ stripe/api_resources/platform_tax_fee.py | 15 + stripe/api_resources/price.py | 368 ++ stripe/api_resources/product.py | 309 ++ stripe/api_resources/promotion_code.py | 140 + stripe/api_resources/quote.py | 405 +++ .../radar/early_fraud_warning.py | 45 + stripe/api_resources/radar/value_list.py | 93 + stripe/api_resources/radar/value_list_item.py | 66 + stripe/api_resources/refund.py | 116 + stripe/api_resources/reporting/report_run.py | 92 + stripe/api_resources/reporting/report_type.py | 33 + stripe/api_resources/reserve_transaction.py | 12 + stripe/api_resources/reversal.py | 30 + stripe/api_resources/review.py | 72 + stripe/api_resources/setup_attempt.py | 79 + stripe/api_resources/setup_intent.py | 1324 +++++++ stripe/api_resources/shipping_rate.py | 150 + .../sigma/scheduled_query_run.py | 45 + stripe/api_resources/source.py | 381 ++ .../source_mandate_notification.py | 36 + stripe/api_resources/source_transaction.py | 27 + stripe/api_resources/subscription.py | 849 +++++ stripe/api_resources/subscription_item.py | 234 ++ stripe/api_resources/subscription_schedule.py | 600 +++ stripe/api_resources/tax/calculation.py | 141 + .../tax/calculation_line_item.py | 33 + stripe/api_resources/tax/settings.py | 51 + stripe/api_resources/tax/transaction.py | 114 + .../tax/transaction_line_item.py | 39 + stripe/api_resources/tax_code.py | 27 + .../api_resources/tax_deducted_at_source.py | 15 + stripe/api_resources/tax_id.py | 30 + stripe/api_resources/tax_rate.py | 143 + .../api_resources/terminal/configuration.py | 417 +++ .../terminal/connection_token.py | 15 + stripe/api_resources/terminal/location.py | 102 + stripe/api_resources/terminal/reader.py | 195 + .../api_resources/test_helpers/test_clock.py | 57 + stripe/api_resources/token.py | 682 ++++ stripe/api_resources/topup.py | 132 + stripe/api_resources/transfer.py | 156 + .../api_resources/treasury/credit_reversal.py | 72 + .../api_resources/treasury/debit_reversal.py | 78 + .../treasury/financial_account.py | 316 ++ .../treasury/financial_account_features.py | 24 + .../treasury/inbound_transfer.py | 117 + .../treasury/outbound_payment.py | 210 ++ .../treasury/outbound_transfer.py | 123 + .../api_resources/treasury/received_credit.py | 105 + .../api_resources/treasury/received_debit.py | 99 + stripe/api_resources/treasury/transaction.py | 96 + .../treasury/transaction_entry.py | 87 + stripe/api_resources/usage_record.py | 18 + stripe/api_resources/usage_record_summary.py | 18 + stripe/api_resources/webhook_endpoint.py | 93 + 116 files changed, 24558 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7a3fc3ff4..7464eb739 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ license="MIT", keywords="stripe api payments", packages=find_packages(exclude=["tests", "tests.*"]), - package_data={"stripe": ["data/ca-certificates.crt"]}, + package_data={"stripe": ["data/ca-certificates.crt", "py.typed"]}, zip_safe=False, install_requires=[ 'typing_extensions <= 4.2.0, > 3.7.2; python_version < "3.7"', diff --git a/stripe/api_resources/account.py b/stripe/api_resources/account.py index bd919f4e9..f47132f72 100644 --- a/stripe/api_resources/account.py +++ b/stripe/api_resources/account.py @@ -56,558 +56,1337 @@ class Account( class CreateParams(RequestOptions): account_token: NotRequired["str|None"] + """ + An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. + """ business_profile: NotRequired[ "Account.CreateParamsBusinessProfile|None" ] + """ + Business information about the account. + """ business_type: NotRequired[ "Literal['company', 'government_entity', 'individual', 'non_profit']|None" ] + """ + The business type. + """ capabilities: NotRequired["Account.CreateParamsCapabilities|None"] + """ + 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|None"] + """ + Information about the company or business. This field is available for any `business_type`. + """ country: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + Documents that may be submitted to satisfy various informational requests. + """ email: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ external_account: NotRequired["str|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + Options for customizing how the account functions within Stripe. + """ tos_acceptance: NotRequired[ "Account.CreateParamsTosAcceptance|None" ] + """ + 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']|None"] + """ + The type of Stripe account to create. May be one of `custom`, `express` or `standard`. + """ class CreateParamsTosAcceptance(TypedDict): date: NotRequired["int|None"] + """ + The Unix timestamp marking when the account representative accepted their service agreement. + """ ip: NotRequired["str|None"] + """ + The IP address from which the account representative accepted their service agreement. + """ service_agreement: NotRequired["str|None"] + """ + The user's service agreement type. + """ user_agent: NotRequired["str|None"] + """ + The user agent of the browser from which the account representative accepted their service agreement. + """ class CreateParamsSettings(TypedDict): branding: NotRequired["Account.CreateParamsSettingsBranding|None"] + """ + Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. + """ card_issuing: NotRequired[ "Account.CreateParamsSettingsCardIssuing|None" ] + """ + Settings specific to the account's use of the Card Issuing product. + """ card_payments: NotRequired[ "Account.CreateParamsSettingsCardPayments|None" ] + """ + Settings specific to card charging on the account. + """ payments: NotRequired["Account.CreateParamsSettingsPayments|None"] + """ + Settings that apply across payment methods for charging on the account. + """ payouts: NotRequired["Account.CreateParamsSettingsPayouts|None"] + """ + Settings specific to the account's payouts. + """ treasury: NotRequired["Account.CreateParamsSettingsTreasury|None"] + """ + Settings specific to the account's Treasury FinancialAccounts. + """ class CreateParamsSettingsTreasury(TypedDict): tos_acceptance: NotRequired[ "Account.CreateParamsSettingsTreasuryTosAcceptance|None" ] + """ + Details on the account's acceptance of the Stripe Treasury Services Agreement. + """ class CreateParamsSettingsTreasuryTosAcceptance(TypedDict): date: NotRequired["int|None"] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ ip: NotRequired["str|None"] + """ + The IP address from which the account representative accepted the service agreement. + """ user_agent: NotRequired["Literal['']|str|None"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ class CreateParamsSettingsPayouts(TypedDict): debit_negative_balances: NotRequired["bool|None"] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. + """ monthly_anchor: NotRequired["int|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. + """ statement_descriptor_prefix: NotRequired["str|None"] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None"] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ ip: NotRequired["str|None"] + """ + The IP address from which the account representative accepted the service agreement. + """ user_agent: NotRequired["Literal['']|str|None"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ class CreateParamsSettingsBranding(TypedDict): icon: NotRequired["str|None"] + """ + (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|None"] + """ + (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|None"] + """ + A CSS hex color value representing the primary branding color for this account. + """ secondary_color: NotRequired["str|None"] + """ + A CSS hex color value representing the secondary branding color for this account. + """ class CreateParamsIndividual(TypedDict): address: NotRequired["Account.CreateParamsIndividualAddress|None"] + """ + The individual's primary address. + """ address_kana: NotRequired[ "Account.CreateParamsIndividualAddressKana|None" ] + """ + The Kana variation of the the individual's primary address (Japan only). + """ address_kanji: NotRequired[ "Account.CreateParamsIndividualAddressKanji|None" ] + """ + The Kanji variation of the the individual's primary address (Japan only). + """ dob: NotRequired[ "Literal['']|Account.CreateParamsIndividualDob|None" ] + """ + The individual's date of birth. + """ email: NotRequired["str|None"] + """ + The individual's email address. + """ first_name: NotRequired["str|None"] + """ + The individual's first name. + """ first_name_kana: NotRequired["str|None"] + """ + The Kana variation of the the individual's first name (Japan only). + """ first_name_kanji: NotRequired["str|None"] + """ + The Kanji variation of the individual's first name (Japan only). + """ full_name_aliases: NotRequired["Literal['']|List[str]|None"] + """ + A list of alternate names or aliases that the individual is known by. + """ gender: NotRequired["str|None"] + """ + The individual's gender (International regulations require either "male" or "female"). + """ id_number: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + The individual's last name. + """ last_name_kana: NotRequired["str|None"] + """ + The Kana variation of the individual's last name (Japan only). + """ last_name_kanji: NotRequired["str|None"] + """ + The Kanji variation of the individual's last name (Japan only). + """ maiden_name: NotRequired["str|None"] + """ + The individual's maiden name. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The individual's phone number. + """ political_exposure: NotRequired["Literal['existing', 'none']|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|None" ] + """ + The individual's registered address. + """ ssn_last_4: NotRequired["str|None"] + """ + The last four digits of the individual's Social Security Number (U.S. only). + """ verification: NotRequired[ "Account.CreateParamsIndividualVerification|None" ] + """ + The individual's verification document information. + """ class CreateParamsIndividualVerification(TypedDict): additional_document: NotRequired[ "Account.CreateParamsIndividualVerificationAdditionalDocument|None" ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ document: NotRequired[ "Account.CreateParamsIndividualVerificationDocument|None" ] + """ + An identifying document, either a passport or local ID card. + """ class CreateParamsIndividualVerificationDocument(TypedDict): back: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + 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 CreateParamsIndividualAddressKanji(TypedDict): city: NotRequired["str|None"] + """ + City or ward. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Block or building number. + """ line2: NotRequired["str|None"] + """ + Building details. + """ postal_code: NotRequired["str|None"] + """ + Postal code. + """ state: NotRequired["str|None"] + """ + Prefecture. + """ town: NotRequired["str|None"] + """ + Town or cho-me. + """ class CreateParamsIndividualAddressKana(TypedDict): city: NotRequired["str|None"] + """ + City or ward. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Block or building number. + """ line2: NotRequired["str|None"] + """ + Building details. + """ postal_code: NotRequired["str|None"] + """ + Postal code. + """ state: NotRequired["str|None"] + """ + Prefecture. + """ town: NotRequired["str|None"] + """ + Town or cho-me. + """ class CreateParamsIndividualAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreateParamsDocuments(TypedDict): bank_account_ownership_verification: NotRequired[ "Account.CreateParamsDocumentsBankAccountOwnershipVerification|None" ] + """ + 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|None" ] + """ + One or more documents that demonstrate proof of a company's license to operate. + """ company_memorandum_of_association: NotRequired[ "Account.CreateParamsDocumentsCompanyMemorandumOfAssociation|None" ] + """ + One or more documents showing the company's Memorandum of Association. + """ company_ministerial_decree: NotRequired[ "Account.CreateParamsDocumentsCompanyMinisterialDecree|None" ] + """ + (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. + """ company_registration_verification: NotRequired[ "Account.CreateParamsDocumentsCompanyRegistrationVerification|None" ] + """ + One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. + """ company_tax_id_verification: NotRequired[ "Account.CreateParamsDocumentsCompanyTaxIdVerification|None" ] + """ + One or more documents that demonstrate proof of a company's tax ID. + """ proof_of_registration: NotRequired[ "Account.CreateParamsDocumentsProofOfRegistration|None" ] + """ + One or more documents showing the company's proof of registration with the national business registry. + """ class CreateParamsDocumentsProofOfRegistration(TypedDict): files: NotRequired["List[str]|None"] + """ + 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]|None"] + """ + 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]|None"] + """ + 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]|None"] + """ + 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]|None"] + """ + 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]|None"] + """ + 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]|None"] + """ + 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|None"] + """ + The company's primary address. + """ address_kana: NotRequired[ "Account.CreateParamsCompanyAddressKana|None" ] + """ + The Kana variation of the company's primary address (Japan only). + """ address_kanji: NotRequired[ "Account.CreateParamsCompanyAddressKanji|None" ] + """ + The Kanji variation of the company's primary address (Japan only). + """ directors_provided: NotRequired["bool|None"] + """ + 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|None"] + """ + 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|None"] + """ + The export license ID number of the company, also referred as Import Export Code (India only). + """ export_purpose_code: NotRequired["str|None"] + """ + The purpose code to use for export transactions (India only). + """ name: NotRequired["str|None"] + """ + The company's legal name. + """ name_kana: NotRequired["str|None"] + """ + The Kana variation of the company's legal name (Japan only). + """ name_kanji: NotRequired["str|None"] + """ + The Kanji variation of the company's legal name (Japan only). + """ owners_provided: NotRequired["bool|None"] + """ + 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|None" ] + """ + This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + """ phone: NotRequired["str|None"] + """ + The company's phone number (used for verification). + """ registration_number: NotRequired["str|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + 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|None"] + """ + The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + """ vat_id: NotRequired["str|None"] + """ + The VAT number of the company. + """ verification: NotRequired[ "Account.CreateParamsCompanyVerification|None" ] + """ + Information on the verification state of the company. + """ class CreateParamsCompanyVerification(TypedDict): document: NotRequired[ "Account.CreateParamsCompanyVerificationDocument|None" ] + """ + A document verifying the business. + """ class CreateParamsCompanyVerificationDocument(TypedDict): back: NotRequired["str|None"] + """ + 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|None"] + """ + 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 CreateParamsCompanyOwnershipDeclaration(TypedDict): date: NotRequired["int|None"] + """ + The Unix timestamp marking when the beneficial owner attestation was made. + """ ip: NotRequired["str|None"] + """ + The IP address from which the beneficial owner attestation was made. + """ user_agent: NotRequired["str|None"] + """ + The user agent of the browser from which the beneficial owner attestation was made. + """ class CreateParamsCompanyAddressKanji(TypedDict): city: NotRequired["str|None"] + """ + City or ward. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Block or building number. + """ line2: NotRequired["str|None"] + """ + Building details. + """ postal_code: NotRequired["str|None"] + """ + Postal code. + """ state: NotRequired["str|None"] + """ + Prefecture. + """ town: NotRequired["str|None"] + """ + Town or cho-me. + """ class CreateParamsCompanyAddressKana(TypedDict): city: NotRequired["str|None"] + """ + City or ward. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Block or building number. + """ line2: NotRequired["str|None"] + """ + Building details. + """ postal_code: NotRequired["str|None"] + """ + Postal code. + """ state: NotRequired["str|None"] + """ + Prefecture. + """ town: NotRequired["str|None"] + """ + Town or cho-me. + """ class CreateParamsCompanyAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreateParamsCapabilities(TypedDict): acss_debit_payments: NotRequired[ "Account.CreateParamsCapabilitiesAcssDebitPayments|None" ] + """ + The acss_debit_payments capability. + """ affirm_payments: NotRequired[ "Account.CreateParamsCapabilitiesAffirmPayments|None" ] + """ + The affirm_payments capability. + """ afterpay_clearpay_payments: NotRequired[ "Account.CreateParamsCapabilitiesAfterpayClearpayPayments|None" ] + """ + The afterpay_clearpay_payments capability. + """ au_becs_debit_payments: NotRequired[ "Account.CreateParamsCapabilitiesAuBecsDebitPayments|None" ] + """ + The au_becs_debit_payments capability. + """ bacs_debit_payments: NotRequired[ "Account.CreateParamsCapabilitiesBacsDebitPayments|None" ] + """ + The bacs_debit_payments capability. + """ bancontact_payments: NotRequired[ "Account.CreateParamsCapabilitiesBancontactPayments|None" ] + """ + The bancontact_payments capability. + """ bank_transfer_payments: NotRequired[ "Account.CreateParamsCapabilitiesBankTransferPayments|None" ] + """ + The bank_transfer_payments capability. + """ blik_payments: NotRequired[ "Account.CreateParamsCapabilitiesBlikPayments|None" ] + """ + The blik_payments capability. + """ boleto_payments: NotRequired[ "Account.CreateParamsCapabilitiesBoletoPayments|None" ] + """ + The boleto_payments capability. + """ card_issuing: NotRequired[ "Account.CreateParamsCapabilitiesCardIssuing|None" ] + """ + The card_issuing capability. + """ card_payments: NotRequired[ "Account.CreateParamsCapabilitiesCardPayments|None" ] + """ + The card_payments capability. + """ cartes_bancaires_payments: NotRequired[ "Account.CreateParamsCapabilitiesCartesBancairesPayments|None" ] + """ + The cartes_bancaires_payments capability. + """ cashapp_payments: NotRequired[ "Account.CreateParamsCapabilitiesCashappPayments|None" ] + """ + The cashapp_payments capability. + """ eps_payments: NotRequired[ "Account.CreateParamsCapabilitiesEpsPayments|None" ] + """ + The eps_payments capability. + """ fpx_payments: NotRequired[ "Account.CreateParamsCapabilitiesFpxPayments|None" ] + """ + The fpx_payments capability. + """ giropay_payments: NotRequired[ "Account.CreateParamsCapabilitiesGiropayPayments|None" ] + """ + The giropay_payments capability. + """ grabpay_payments: NotRequired[ "Account.CreateParamsCapabilitiesGrabpayPayments|None" ] + """ + The grabpay_payments capability. + """ ideal_payments: NotRequired[ "Account.CreateParamsCapabilitiesIdealPayments|None" ] + """ + The ideal_payments capability. + """ india_international_payments: NotRequired[ "Account.CreateParamsCapabilitiesIndiaInternationalPayments|None" ] + """ + The india_international_payments capability. + """ jcb_payments: NotRequired[ "Account.CreateParamsCapabilitiesJcbPayments|None" ] + """ + The jcb_payments capability. + """ klarna_payments: NotRequired[ "Account.CreateParamsCapabilitiesKlarnaPayments|None" ] + """ + The klarna_payments capability. + """ konbini_payments: NotRequired[ "Account.CreateParamsCapabilitiesKonbiniPayments|None" ] + """ + The konbini_payments capability. + """ legacy_payments: NotRequired[ "Account.CreateParamsCapabilitiesLegacyPayments|None" ] + """ + The legacy_payments capability. + """ link_payments: NotRequired[ "Account.CreateParamsCapabilitiesLinkPayments|None" ] + """ + The link_payments capability. + """ oxxo_payments: NotRequired[ "Account.CreateParamsCapabilitiesOxxoPayments|None" ] + """ + The oxxo_payments capability. + """ p24_payments: NotRequired[ "Account.CreateParamsCapabilitiesP24Payments|None" ] + """ + The p24_payments capability. + """ paynow_payments: NotRequired[ "Account.CreateParamsCapabilitiesPaynowPayments|None" ] + """ + The paynow_payments capability. + """ promptpay_payments: NotRequired[ "Account.CreateParamsCapabilitiesPromptpayPayments|None" ] + """ + The promptpay_payments capability. + """ sepa_debit_payments: NotRequired[ "Account.CreateParamsCapabilitiesSepaDebitPayments|None" ] + """ + The sepa_debit_payments capability. + """ sofort_payments: NotRequired[ "Account.CreateParamsCapabilitiesSofortPayments|None" ] + """ + The sofort_payments capability. + """ tax_reporting_us_1099_k: NotRequired[ "Account.CreateParamsCapabilitiesTaxReportingUs1099K|None" ] + """ + The tax_reporting_us_1099_k capability. + """ tax_reporting_us_1099_misc: NotRequired[ "Account.CreateParamsCapabilitiesTaxReportingUs1099Misc|None" ] + """ + The tax_reporting_us_1099_misc capability. + """ transfers: NotRequired[ "Account.CreateParamsCapabilitiesTransfers|None" ] + """ + The transfers capability. + """ treasury: NotRequired[ "Account.CreateParamsCapabilitiesTreasury|None" ] + """ + The treasury capability. + """ us_bank_account_ach_payments: NotRequired[ "Account.CreateParamsCapabilitiesUsBankAccountAchPayments|None" ] + """ + The us_bank_account_ach_payments capability. + """ zip_payments: NotRequired[ "Account.CreateParamsCapabilitiesZipPayments|None" ] + """ + The zip_payments capability. + """ class CreateParamsCapabilitiesZipPayments(TypedDict): requested: NotRequired["bool|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + [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|None" ] + """ + An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. + """ name: NotRequired["str|None"] + """ + The customer-facing business name. + """ product_description: NotRequired["str|None"] + """ + 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|None" ] + """ + A publicly available mailing address for sending support issues to. + """ support_email: NotRequired["str|None"] + """ + A publicly available email address for sending support issues to. + """ support_phone: NotRequired["str|None"] + """ + A publicly available phone number to call with support issues. + """ support_url: NotRequired["Literal['']|str|None"] + """ + A publicly available website for handling support issues. + """ url: NotRequired["str|None"] + """ + The business's publicly available website. + """ class CreateParamsBusinessProfileSupportAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ 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 DeleteParams(RequestOptions): pass @@ -615,415 +1394,1145 @@ class DeleteParams(RequestOptions): class ListParams(RequestOptions): created: NotRequired["Account.ListParamsCreated|int|None"] ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class PersonsParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + Filters on the list of people returned based on the person's relationship to the account's company. + """ starting_after: NotRequired["str|None"] + """ + 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 PersonsParamsRelationship(TypedDict): director: NotRequired["bool|None"] + """ + A filter on the list of people returned based on whether these people are directors of the account's company. + """ executive: NotRequired["bool|None"] + """ + A filter on the list of people returned based on whether these people are executives of the account's company. + """ legal_guardian: NotRequired["bool|None"] + """ + A filter on the list of people returned based on whether these people are legal guardians of the account's representative. + """ owner: NotRequired["bool|None"] + """ + A filter on the list of people returned based on whether these people are owners of the account's company. + """ representative: NotRequired["bool|None"] + """ + A filter on the list of people returned based on whether these people are the representative of the account's company. + """ class RejectParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + 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 RetrieveCapabilityParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ModifyCapabilityParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ requested: NotRequired["bool|None"] + """ + 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. + + 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 ListCapabilitiesParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class CreateExternalAccountParams(RequestOptions): default_for_currency: NotRequired["bool|None"] + """ + 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]|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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 RetrieveExternalAccountParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ModifyExternalAccountParams(RequestOptions): account_holder_name: NotRequired["str|None"] + """ + The name of the person or business that owns the bank account. + """ account_holder_type: NotRequired[ "Literal['']|Literal['company', 'individual']|None" ] + """ + The type of entity that holds the account. This can be either `individual` or `company`. + """ account_type: NotRequired[ "Literal['checking', 'futsu', 'savings', 'toza']|None" ] + """ + 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|None"] + """ + City/District/Suburb/Town/Village. + """ address_country: NotRequired["str|None"] + """ + Billing address country, if provided when creating card. + """ address_line1: NotRequired["str|None"] + """ + Address line 1 (Street address/PO Box/Company name). + """ address_line2: NotRequired["str|None"] + """ + Address line 2 (Apartment/Suite/Unit/Building). + """ address_state: NotRequired["str|None"] + """ + State/County/Province/Region. + """ address_zip: NotRequired["str|None"] + """ + ZIP or postal code. + """ default_for_currency: NotRequired["bool|None"] + """ + When set to true, this becomes the default external account for its currency. + """ documents: NotRequired[ "Account.ModifyExternalAccountParamsDocuments|None" ] + """ + Documents that may be submitted to satisfy various informational requests. + """ exp_month: NotRequired["str|None"] + """ + Two digit number representing the card's expiration month. + """ exp_year: NotRequired["str|None"] + """ + Four digit number representing the card's expiration year. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + Cardholder name. + """ class ModifyExternalAccountParamsDocuments(TypedDict): bank_account_ownership_verification: NotRequired[ "Account.ModifyExternalAccountParamsDocumentsBankAccountOwnershipVerification|None" ] + """ + 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 ModifyExternalAccountParamsDocumentsBankAccountOwnershipVerification( TypedDict, ): files: NotRequired["List[str]|None"] + """ + 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 DeleteExternalAccountParams(RequestOptions): pass class ListExternalAccountsParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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']|None"] + """ + Filter external accounts according to a particular object type. + """ starting_after: NotRequired["str|None"] + """ + 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 CreateLoginLinkParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class CreatePersonParams(RequestOptions): additional_tos_acceptances: NotRequired[ "Account.CreatePersonParamsAdditionalTosAcceptances|None" ] + """ + Details on the legal guardian's acceptance of the required Stripe agreements. + """ address: NotRequired["Account.CreatePersonParamsAddress|None"] + """ + The person's address. + """ address_kana: NotRequired[ "Account.CreatePersonParamsAddressKana|None" ] + """ + The Kana variation of the person's address (Japan only). + """ address_kanji: NotRequired[ "Account.CreatePersonParamsAddressKanji|None" ] + """ + The Kanji variation of the person's address (Japan only). + """ dob: NotRequired["Literal['']|Account.CreatePersonParamsDob|None"] + """ + The person's date of birth. + """ documents: NotRequired["Account.CreatePersonParamsDocuments|None"] + """ + Documents that may be submitted to satisfy various informational requests. + """ email: NotRequired["str|None"] + """ + The person's email address. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ first_name: NotRequired["str|None"] + """ + The person's first name. + """ first_name_kana: NotRequired["str|None"] + """ + The Kana variation of the person's first name (Japan only). + """ first_name_kanji: NotRequired["str|None"] + """ + The Kanji variation of the person's first name (Japan only). + """ full_name_aliases: NotRequired["Literal['']|List[str]|None"] + """ + A list of alternate names or aliases that the person is known by. + """ gender: NotRequired["str|None"] + """ + The person's gender (International regulations require either "male" or "female"). + """ id_number: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + The person's last name. + """ last_name_kana: NotRequired["str|None"] + """ + The Kana variation of the person's last name (Japan only). + """ last_name_kanji: NotRequired["str|None"] + """ + The Kanji variation of the person's last name (Japan only). + """ maiden_name: NotRequired["str|None"] + """ + The person's maiden name. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. + """ phone: NotRequired["str|None"] + """ + The person's phone number. + """ political_exposure: NotRequired["str|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.CreatePersonParamsRegisteredAddress|None" ] + """ + The person's registered address. + """ relationship: NotRequired[ "Account.CreatePersonParamsRelationship|None" ] + """ + The relationship that this person has with the account's legal entity. + """ ssn_last_4: NotRequired["str|None"] + """ + The last four digits of the person's Social Security number (U.S. only). + """ verification: NotRequired[ "Account.CreatePersonParamsVerification|None" ] + """ + The person's verification status. + """ class CreatePersonParamsVerification(TypedDict): additional_document: NotRequired[ "Account.CreatePersonParamsVerificationAdditionalDocument|None" ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ document: NotRequired[ "Account.CreatePersonParamsVerificationDocument|None" ] + """ + An identifying document, either a passport or local ID card. + """ class CreatePersonParamsVerificationDocument(TypedDict): back: NotRequired["str|None"] + """ + 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|None"] + """ + 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 CreatePersonParamsVerificationAdditionalDocument(TypedDict): back: NotRequired["str|None"] + """ + 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|None"] + """ + 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 CreatePersonParamsRelationship(TypedDict): director: NotRequired["bool|None"] + """ + 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|None"] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ legal_guardian: NotRequired["bool|None"] + """ + Whether the person is the legal guardian of the account's representative. + """ owner: NotRequired["bool|None"] + """ + Whether the person is an owner of the account's legal entity. + """ percent_ownership: NotRequired["Literal['']|float|None"] + """ + The percent owned by the person of the account's legal entity. + """ representative: NotRequired["bool|None"] + """ + 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|None"] + """ + The person's title (e.g., CEO, Support Engineer). + """ class CreatePersonParamsRegisteredAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreatePersonParamsDocuments(TypedDict): company_authorization: NotRequired[ "Account.CreatePersonParamsDocumentsCompanyAuthorization|None" ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ passport: NotRequired[ "Account.CreatePersonParamsDocumentsPassport|None" ] + """ + One or more documents showing the person's passport page with photo and personal data. + """ visa: NotRequired["Account.CreatePersonParamsDocumentsVisa|None"] + """ + One or more documents showing the person's visa required for living in the country where they are residing. + """ class CreatePersonParamsDocumentsVisa(TypedDict): files: NotRequired["List[str]|None"] + """ + 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]|None"] + """ + 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]|None"] + """ + 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 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 CreatePersonParamsAddressKanji(TypedDict): city: NotRequired["str|None"] + """ + City or ward. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Block or building number. + """ line2: NotRequired["str|None"] + """ + Building details. + """ postal_code: NotRequired["str|None"] + """ + Postal code. + """ state: NotRequired["str|None"] + """ + Prefecture. + """ town: NotRequired["str|None"] + """ + Town or cho-me. + """ class CreatePersonParamsAddressKana(TypedDict): city: NotRequired["str|None"] + """ + City or ward. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Block or building number. + """ line2: NotRequired["str|None"] + """ + Building details. + """ postal_code: NotRequired["str|None"] + """ + Postal code. + """ state: NotRequired["str|None"] + """ + Prefecture. + """ town: NotRequired["str|None"] + """ + Town or cho-me. + """ class CreatePersonParamsAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreatePersonParamsAdditionalTosAcceptances(TypedDict): account: NotRequired[ "Account.CreatePersonParamsAdditionalTosAcceptancesAccount|None" ] + """ + Details on the legal guardian's acceptance of the main Stripe service agreement. + """ class CreatePersonParamsAdditionalTosAcceptancesAccount(TypedDict): date: NotRequired["int|None"] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ ip: NotRequired["str|None"] + """ + The IP address from which the account representative accepted the service agreement. + """ user_agent: NotRequired["Literal['']|str|None"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ class RetrievePersonParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ModifyPersonParams(RequestOptions): additional_tos_acceptances: NotRequired[ "Account.ModifyPersonParamsAdditionalTosAcceptances|None" ] + """ + Details on the legal guardian's acceptance of the required Stripe agreements. + """ address: NotRequired["Account.ModifyPersonParamsAddress|None"] + """ + The person's address. + """ address_kana: NotRequired[ "Account.ModifyPersonParamsAddressKana|None" ] + """ + The Kana variation of the person's address (Japan only). + """ address_kanji: NotRequired[ "Account.ModifyPersonParamsAddressKanji|None" ] + """ + The Kanji variation of the person's address (Japan only). + """ dob: NotRequired["Literal['']|Account.ModifyPersonParamsDob|None"] + """ + The person's date of birth. + """ documents: NotRequired["Account.ModifyPersonParamsDocuments|None"] + """ + Documents that may be submitted to satisfy various informational requests. + """ email: NotRequired["str|None"] + """ + The person's email address. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ first_name: NotRequired["str|None"] + """ + The person's first name. + """ first_name_kana: NotRequired["str|None"] + """ + The Kana variation of the person's first name (Japan only). + """ first_name_kanji: NotRequired["str|None"] + """ + The Kanji variation of the person's first name (Japan only). + """ full_name_aliases: NotRequired["Literal['']|List[str]|None"] + """ + A list of alternate names or aliases that the person is known by. + """ gender: NotRequired["str|None"] + """ + The person's gender (International regulations require either "male" or "female"). + """ id_number: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + The person's last name. + """ last_name_kana: NotRequired["str|None"] + """ + The Kana variation of the person's last name (Japan only). + """ last_name_kanji: NotRequired["str|None"] + """ + The Kanji variation of the person's last name (Japan only). + """ maiden_name: NotRequired["str|None"] + """ + The person's maiden name. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. + """ phone: NotRequired["str|None"] + """ + The person's phone number. + """ political_exposure: NotRequired["str|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.ModifyPersonParamsRegisteredAddress|None" ] + """ + The person's registered address. + """ relationship: NotRequired[ "Account.ModifyPersonParamsRelationship|None" ] + """ + The relationship that this person has with the account's legal entity. + """ ssn_last_4: NotRequired["str|None"] + """ + The last four digits of the person's Social Security number (U.S. only). + """ verification: NotRequired[ "Account.ModifyPersonParamsVerification|None" ] + """ + The person's verification status. + """ class ModifyPersonParamsVerification(TypedDict): additional_document: NotRequired[ "Account.ModifyPersonParamsVerificationAdditionalDocument|None" ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ document: NotRequired[ "Account.ModifyPersonParamsVerificationDocument|None" ] + """ + An identifying document, either a passport or local ID card. + """ class ModifyPersonParamsVerificationDocument(TypedDict): back: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ legal_guardian: NotRequired["bool|None"] + """ + Whether the person is the legal guardian of the account's representative. + """ owner: NotRequired["bool|None"] + """ + Whether the person is an owner of the account's legal entity. + """ percent_ownership: NotRequired["Literal['']|float|None"] + """ + The percent owned by the person of the account's legal entity. + """ representative: NotRequired["bool|None"] + """ + 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|None"] + """ + The person's title (e.g., CEO, Support Engineer). + """ class ModifyPersonParamsRegisteredAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class ModifyPersonParamsDocuments(TypedDict): company_authorization: NotRequired[ "Account.ModifyPersonParamsDocumentsCompanyAuthorization|None" ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ passport: NotRequired[ "Account.ModifyPersonParamsDocumentsPassport|None" ] + """ + One or more documents showing the person's passport page with photo and personal data. + """ visa: NotRequired["Account.ModifyPersonParamsDocumentsVisa|None"] + """ + 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]|None"] + """ + 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]|None"] + """ + 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]|None"] + """ + 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 ModifyPersonParamsAddressKanji(TypedDict): city: NotRequired["str|None"] + """ + City or ward. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Block or building number. + """ line2: NotRequired["str|None"] + """ + Building details. + """ postal_code: NotRequired["str|None"] + """ + Postal code. + """ state: NotRequired["str|None"] + """ + Prefecture. + """ town: NotRequired["str|None"] + """ + Town or cho-me. + """ class ModifyPersonParamsAddressKana(TypedDict): city: NotRequired["str|None"] + """ + City or ward. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Block or building number. + """ line2: NotRequired["str|None"] + """ + Building details. + """ postal_code: NotRequired["str|None"] + """ + Postal code. + """ state: NotRequired["str|None"] + """ + Prefecture. + """ town: NotRequired["str|None"] + """ + Town or cho-me. + """ class ModifyPersonParamsAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class ModifyPersonParamsAdditionalTosAcceptances(TypedDict): account: NotRequired[ "Account.ModifyPersonParamsAdditionalTosAcceptancesAccount|None" ] + """ + Details on the legal guardian's acceptance of the main Stripe service agreement. + """ class ModifyPersonParamsAdditionalTosAcceptancesAccount(TypedDict): date: NotRequired["int|None"] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ ip: NotRequired["str|None"] + """ + The IP address from which the account representative accepted the service agreement. + """ user_agent: NotRequired["Literal['']|str|None"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ class DeletePersonParams(RequestOptions): pass class ListPersonsParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None" ] + """ + Filters on the list of people returned based on the person's relationship to the account's company. + """ starting_after: NotRequired["str|None"] + """ + 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|None"] + """ + A filter on the list of people returned based on whether these people are directors of the account's company. + """ executive: NotRequired["bool|None"] + """ + A filter on the list of people returned based on whether these people are executives of the account's company. + """ legal_guardian: NotRequired["bool|None"] + """ + A filter on the list of people returned based on whether these people are legal guardians of the account's representative. + """ owner: NotRequired["bool|None"] + """ + A filter on the list of people returned based on whether these people are owners of the account's company. + """ representative: NotRequired["bool|None"] + """ + A filter on the list of people returned based on whether these people are the representative of the account's company. + """ business_profile: Optional[StripeObject] + """ + Business information about the account. + """ business_type: Optional[ Literal["company", "government_entity", "individual", "non_profit"] ] + """ + The business type. + """ capabilities: Optional[StripeObject] charges_enabled: Optional[bool] + """ + Whether the account can create live charges. + """ company: Optional[StripeObject] controller: Optional[StripeObject] country: Optional[str] + """ + The account's country. + """ created: Optional[int] + """ + Time at which the account was connected. Measured in seconds since the Unix epoch. + """ default_currency: Optional[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). + """ details_submitted: Optional[bool] + """ + Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. + """ email: Optional[str] + """ + An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform. + """ external_accounts: Optional[ListObject[Union["BankAccount", "Card"]]] + """ + External accounts (bank accounts and debit cards) currently attached to this account + """ future_requirements: Optional[StripeObject] id: str + """ + Unique identifier for the object. + """ individual: Optional["Person"] + """ + This is an object representing a person associated with a Stripe account. + + A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. + See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform prefilling and account onboarding steps. + + Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/handling-api-verification#person-information) + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["account"] + """ + String representing the object's type. Objects of the same type share the same value. + """ payouts_enabled: Optional[bool] + """ + Whether Stripe can send payouts to this account. + """ requirements: Optional[StripeObject] settings: Optional[StripeObject] + """ + Options for customizing how the account functions within Stripe. + """ tos_acceptance: Optional[StripeObject] type: Optional[Literal["custom", "express", "standard"]] + """ + The Stripe account type. Can be `standard`, `express`, or `custom`. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def create( diff --git a/stripe/api_resources/account_link.py b/stripe/api_resources/account_link.py index 4ac6471f2..b59bc4cfb 100644 --- a/stripe/api_resources/account_link.py +++ b/stripe/api_resources/account_link.py @@ -19,18 +19,48 @@ class AccountLink(CreateableAPIResource["AccountLink"]): class CreateParams(RequestOptions): account: str + """ + The identifier of the account to create an account link for. + """ collect: NotRequired[ "Literal['currently_due', 'eventually_due']|None" ] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ refresh_url: NotRequired["str|None"] + """ + 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|None"] + """ + 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 + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ expires_at: int + """ + The timestamp at which this account link will expire. + """ object: Literal["account_link"] + """ + String representing the object's type. Objects of the same type share the same value. + """ url: str + """ + The URL for the account link. + """ @classmethod def create( diff --git a/stripe/api_resources/account_session.py b/stripe/api_resources/account_session.py index 0e748f5dd..074c06b0f 100644 --- a/stripe/api_resources/account_session.py +++ b/stripe/api_resources/account_session.py @@ -29,23 +29,57 @@ class AccountSession(CreateableAPIResource["AccountSession"]): 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class CreateParamsComponents(TypedDict): account_onboarding: NotRequired[ "AccountSession.CreateParamsComponentsAccountOnboarding|None" ] + """ + Configuration for the account onboarding embedded component. + """ class CreateParamsComponentsAccountOnboarding(TypedDict): enabled: bool + """ + Whether the embedded component is enabled. + """ account: str + """ + The ID of the account the AccountSession was created for + """ client_secret: str + """ + The client secret of this AccountSession. Used on the client to set up secure access to the given `account`. + + The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret. + + Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled. + """ components: StripeObject expires_at: int + """ + The timestamp at which this AccountSession will expire. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["account_session"] + """ + String representing the object's type. Objects of the same type share the same value. + """ @classmethod def create( diff --git a/stripe/api_resources/apple_pay_domain.py b/stripe/api_resources/apple_pay_domain.py index 7d175b54e..66d0c538d 100644 --- a/stripe/api_resources/apple_pay_domain.py +++ b/stripe/api_resources/apple_pay_domain.py @@ -24,6 +24,9 @@ class ApplePayDomain( class CreateParams(RequestOptions): domain_name: str expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class DeleteParams(RequestOptions): pass @@ -31,19 +34,49 @@ class DeleteParams(RequestOptions): class ListParams(RequestOptions): domain_name: NotRequired["str|None"] ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ domain_name: str id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["apple_pay_domain"] + """ + String representing the object's type. Objects of the same type share the same value. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def create( diff --git a/stripe/api_resources/application.py b/stripe/api_resources/application.py index 21c40e72d..6e94e9141 100644 --- a/stripe/api_resources/application.py +++ b/stripe/api_resources/application.py @@ -8,6 +8,18 @@ class Application(StripeObject): OBJECT_NAME: ClassVar[Literal["application"]] = "application" id: str + """ + Unique identifier for the object. + """ name: Optional[str] + """ + The name of the application. + """ object: Literal["application"] + """ + String representing the object's type. Objects of the same type share the same value. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ diff --git a/stripe/api_resources/application_fee.py b/stripe/api_resources/application_fee.py index 83a943312..10e163571 100644 --- a/stripe/api_resources/application_fee.py +++ b/stripe/api_resources/application_fee.py @@ -35,58 +35,169 @@ class ApplicationFee(ListableAPIResource["ApplicationFee"]): class ListParams(RequestOptions): charge: NotRequired["str|None"] + """ + Only return application fees for the charge specified by this charge ID. + """ created: NotRequired["ApplicationFee.ListParamsCreated|int|None"] ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class RefundParams(RequestOptions): amount: NotRequired["int|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class CreateRefundParams(RequestOptions): amount: NotRequired["int|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ModifyRefundParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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"] + """ + ID of the Stripe account this fee was taken from. + """ amount: int + """ + Amount earned, in cents (or local equivalent). + """ amount_refunded: int + """ + Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued) + """ application: ExpandableField["Application"] + """ + ID of the Connect application that earned the fee. + """ balance_transaction: Optional[ExpandableField["BalanceTransaction"]] + """ + Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). + """ charge: ExpandableField["Charge"] + """ + ID of the charge that the application fee was taken from. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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). + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["application_fee"] + """ + String representing the object's type. Objects of the same type share the same value. + """ originating_transaction: Optional[ExpandableField["Charge"]] + """ + ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. + """ refunded: bool + """ + Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. + """ refunds: ListObject["ApplicationFeeRefund"] + """ + A list of refunds that have been applied to the fee. + """ @classmethod def list( diff --git a/stripe/api_resources/application_fee_refund.py b/stripe/api_resources/application_fee_refund.py index eb6d6f12c..75c90ce1a 100644 --- a/stripe/api_resources/application_fee_refund.py +++ b/stripe/api_resources/application_fee_refund.py @@ -22,13 +22,37 @@ class ApplicationFeeRefund(UpdateableAPIResource["ApplicationFeeRefund"]): OBJECT_NAME: ClassVar[Literal["fee_refund"]] = "fee_refund" amount: int + """ + Amount, in cents (or local equivalent). + """ balance_transaction: Optional[ExpandableField["BalanceTransaction"]] + """ + Balance transaction that describes the impact on your account balance. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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). + """ fee: ExpandableField["ApplicationFee"] + """ + ID of the application fee that was refunded. + """ id: str + """ + Unique identifier for the object. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["fee_refund"] + """ + String representing the object's type. Objects of the same type share the same value. + """ @classmethod def _build_instance_url(cls, fee, sid): diff --git a/stripe/api_resources/apps/secret.py b/stripe/api_resources/apps/secret.py index 13afa43ab..a0d797345 100644 --- a/stripe/api_resources/apps/secret.py +++ b/stripe/api_resources/apps/secret.py @@ -35,52 +35,148 @@ class Secret(CreateableAPIResource["Secret"], ListableAPIResource["Secret"]): class CreateParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ expires_at: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + 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|None"] + """ + 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]|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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 + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ deleted: Optional[bool] + """ + If true, indicates that this secret has been deleted + """ expires_at: Optional[int] + """ + The Unix timestamp for the expiry time of the secret, after which the secret deletes. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ name: str + """ + A name for the secret that's unique within the scope. + """ object: Literal["apps.secret"] + """ + String representing the object's type. Objects of the same type share the same value. + """ payload: Optional[str] + """ + The plaintext secret value to be stored. + """ scope: StripeObject @classmethod diff --git a/stripe/api_resources/balance.py b/stripe/api_resources/balance.py index f652c6fee..74cdc5db0 100644 --- a/stripe/api_resources/balance.py +++ b/stripe/api_resources/balance.py @@ -27,14 +27,35 @@ class Balance(SingletonAPIResource["Balance"]): class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ available: List[StripeObject] + """ + Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property. + """ connect_reserved: Optional[List[StripeObject]] + """ + Funds held due to negative balances on connected Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property. + """ instant_available: Optional[List[StripeObject]] + """ + Funds that you can pay out using Instant Payouts. + """ issuing: Optional[StripeObject] livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["balance"] + """ + String representing the object's type. Objects of the same type share the same value. + """ pending: List[StripeObject] + """ + Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property. + """ @classmethod def retrieve(cls, **params: Unpack["Balance.RetrieveParams"]) -> "Balance": diff --git a/stripe/api_resources/balance_transaction.py b/stripe/api_resources/balance_transaction.py index e15d3c642..1c8a3f43c 100644 --- a/stripe/api_resources/balance_transaction.py +++ b/stripe/api_resources/balance_transaction.py @@ -60,35 +60,110 @@ class ListParams(RequestOptions): "BalanceTransaction.ListParamsCreated|int|None" ] currency: NotRequired["str|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. + """ source: NotRequired["str|None"] + """ + Only returns the original transaction. + """ starting_after: NotRequired["str|None"] + """ + 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|None"] + """ + 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`, `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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ amount: int + """ + Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. + """ available_on: int + """ + The date that the transaction's net funds become available in the Stripe balance. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ exchange_rate: Optional[float] + """ + If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`. + """ fee: int + """ + Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. + """ fee_details: List[StripeObject] + """ + Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. + """ id: str + """ + Unique identifier for the object. + """ net: int + """ + Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee` + """ object: Literal["balance_transaction"] + """ + String representing the object's type. Objects of the same type share the same value. + """ reporting_category: str + """ + Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective. + """ source: Optional[ ExpandableField[ Union[ @@ -112,7 +187,13 @@ class RetrieveParams(RequestOptions): ] ] ] + """ + This transaction relates to the Stripe object. + """ status: str + """ + The transaction's net funds status in the Stripe balance, which are either `available` or `pending`. + """ type: Literal[ "adjustment", "advance", @@ -154,6 +235,9 @@ class RetrieveParams(RequestOptions): "transfer_failure", "transfer_refund", ] + """ + Transaction type: `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`, `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`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. + """ @classmethod def list( diff --git a/stripe/api_resources/bank_account.py b/stripe/api_resources/bank_account.py index 4534dacfa..218d2e6d0 100644 --- a/stripe/api_resources/bank_account.py +++ b/stripe/api_resources/bank_account.py @@ -42,25 +42,87 @@ class DeleteParams(RequestOptions): pass account: Optional[ExpandableField["Account"]] + """ + The ID of the account that the bank account is associated with. + """ account_holder_name: Optional[str] + """ + The name of the person or business that owns the bank account. + """ account_holder_type: Optional[str] + """ + The type of entity that holds the account. This can be either `individual` or `company`. + """ account_type: Optional[str] + """ + The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + """ available_payout_methods: Optional[List[Literal["instant", "standard"]]] + """ + A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. + """ bank_name: Optional[str] + """ + Name of the bank associated with the routing number (e.g., `WELLS FARGO`). + """ country: str + """ + Two-letter ISO code representing the country the bank account is located in. + """ currency: str + """ + Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + """ customer: Optional[ExpandableField["Customer"]] + """ + The ID of the customer that the bank account is associated with. + """ default_for_currency: Optional[bool] + """ + Whether this bank account is the default external account for its currency. + """ fingerprint: Optional[str] + """ + Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + """ future_requirements: Optional[StripeObject] + """ + Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. + """ id: str + """ + Unique identifier for the object. + """ last4: str + """ + The last four digits of the bank account number. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["bank_account"] + """ + String representing the object's type. Objects of the same type share the same value. + """ requirements: Optional[StripeObject] + """ + Information about the requirements for the bank account, including what information needs to be collected. + """ routing_number: Optional[str] + """ + The routing transit number for the bank account. + """ status: str + """ + For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated. + + For external accounts, possible values are `new`, `errored` and `verification_failed`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. In India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def _cls_delete( diff --git a/stripe/api_resources/billing_portal/configuration.py b/stripe/api_resources/billing_portal/configuration.py index bc8f8571c..34c9165f8 100644 --- a/stripe/api_resources/billing_portal/configuration.py +++ b/stripe/api_resources/billing_portal/configuration.py @@ -39,72 +39,147 @@ class Configuration( class CreateParams(RequestOptions): business_profile: "Configuration.CreateParamsBusinessProfile" + """ + The business information shown to customers in the portal. + """ default_return_url: NotRequired["Literal['']|str|None"] + """ + 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]|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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 CreateParamsFeatures(TypedDict): customer_update: NotRequired[ "Configuration.CreateParamsFeaturesCustomerUpdate|None" ] + """ + Information about updating the customer details in the portal. + """ invoice_history: NotRequired[ "Configuration.CreateParamsFeaturesInvoiceHistory|None" ] + """ + Information about showing the billing history in the portal. + """ payment_method_update: NotRequired[ "Configuration.CreateParamsFeaturesPaymentMethodUpdate|None" ] + """ + Information about updating payment methods in the portal. + """ subscription_cancel: NotRequired[ "Configuration.CreateParamsFeaturesSubscriptionCancel|None" ] + """ + Information about canceling subscriptions in the portal. + """ subscription_pause: NotRequired[ "Configuration.CreateParamsFeaturesSubscriptionPause|None" ] + """ + Information about pausing subscriptions in the portal. + """ subscription_update: NotRequired[ "Configuration.CreateParamsFeaturesSubscriptionUpdate|None" ] + """ + 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 products that support subscription updates. + """ proration_behavior: NotRequired[ "Literal['always_invoice', 'create_prorations', 'none']|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 CreateParamsFeaturesSubscriptionPause(TypedDict): enabled: NotRequired["bool|None"] + """ + Whether the feature is enabled. + """ class CreateParamsFeaturesSubscriptionCancel(TypedDict): cancellation_reason: NotRequired[ "Configuration.CreateParamsFeaturesSubscriptionCancelCancellationReason|None" ] + """ + 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']|None"] + """ + Whether to cancel subscriptions immediately or at the end of the billing period. + """ proration_behavior: NotRequired[ "Literal['always_invoice', 'create_prorations', 'none']|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[ @@ -120,136 +195,315 @@ class CreateParamsFeaturesSubscriptionCancelCancellationReason( ] ], ] + """ + Which cancellation reasons will be given as options to the customer. + """ class CreateParamsFeaturesPaymentMethodUpdate(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']]|None" ] + """ + 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|None"] + """ + The messaging shown to customers in the portal. + """ privacy_policy_url: NotRequired["str|None"] + """ + A link to the business's publicly available privacy policy. + """ terms_of_service_url: NotRequired["str|None"] + """ + A link to the business's publicly available terms of service. + """ class ListParams(RequestOptions): active: NotRequired["bool|None"] + """ + Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations). + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ is_default: NotRequired["bool|None"] + """ + Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration). + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Whether the configuration is active and can be used to create portal sessions. + """ business_profile: NotRequired[ "Configuration.ModifyParamsBusinessProfile|None" ] + """ + The business information shown to customers in the portal. + """ default_return_url: NotRequired["Literal['']|str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ features: NotRequired["Configuration.ModifyParamsFeatures|None"] + """ + Information about the features available in the portal. + """ login_page: NotRequired["Configuration.ModifyParamsLoginPage|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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. + + Set to `false` to deactivate the `login_page.url`. + """ class ModifyParamsFeatures(TypedDict): customer_update: NotRequired[ "Configuration.ModifyParamsFeaturesCustomerUpdate|None" ] + """ + Information about updating the customer details in the portal. + """ invoice_history: NotRequired[ "Configuration.ModifyParamsFeaturesInvoiceHistory|None" ] + """ + Information about showing the billing history in the portal. + """ payment_method_update: NotRequired[ "Configuration.ModifyParamsFeaturesPaymentMethodUpdate|None" ] + """ + Information about updating payment methods in the portal. + """ subscription_cancel: NotRequired[ "Configuration.ModifyParamsFeaturesSubscriptionCancel|None" ] + """ + Information about canceling subscriptions in the portal. + """ subscription_pause: NotRequired[ "Configuration.ModifyParamsFeaturesSubscriptionPause|None" ] + """ + Information about pausing subscriptions in the portal. + """ subscription_update: NotRequired[ "Configuration.ModifyParamsFeaturesSubscriptionUpdate|None" ] + """ + Information about updating subscriptions in the portal. + """ class ModifyParamsFeaturesSubscriptionUpdate(TypedDict): default_allowed_updates: NotRequired[ "Literal['']|List[Literal['price', 'promotion_code', 'quantity']]|None" ] + """ + The types of subscription updates that are supported. When empty, subscriptions are not updateable. + """ enabled: NotRequired["bool|None"] + """ + Whether the feature is enabled. + """ products: NotRequired[ "Literal['']|List[Configuration.ModifyParamsFeaturesSubscriptionUpdateProduct]|None" ] + """ + The list of products that support subscription updates. + """ proration_behavior: NotRequired[ "Literal['always_invoice', 'create_prorations', 'none']|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 ModifyParamsFeaturesSubscriptionPause(TypedDict): enabled: NotRequired["bool|None"] + """ + Whether the feature is enabled. + """ class ModifyParamsFeaturesSubscriptionCancel(TypedDict): cancellation_reason: NotRequired[ "Configuration.ModifyParamsFeaturesSubscriptionCancelCancellationReason|None" ] + """ + Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer + """ enabled: NotRequired["bool|None"] + """ + Whether the feature is enabled. + """ mode: NotRequired["Literal['at_period_end', 'immediately']|None"] + """ + Whether to cancel subscriptions immediately or at the end of the billing period. + """ proration_behavior: NotRequired[ "Literal['always_invoice', 'create_prorations', 'none']|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']]|None" ] + """ + Which cancellation reasons will be given as options to the customer. + """ class ModifyParamsFeaturesPaymentMethodUpdate(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']]|None" ] + """ + The types of customer updates that are supported. When empty, customers are not updateable. + """ enabled: NotRequired["bool|None"] + """ + Whether the feature is enabled. + """ class ModifyParamsBusinessProfile(TypedDict): headline: NotRequired["Literal['']|str|None"] + """ + The messaging shown to customers in the portal. + """ privacy_policy_url: NotRequired["Literal['']|str|None"] + """ + A link to the business's publicly available privacy policy. + """ terms_of_service_url: NotRequired["Literal['']|str|None"] + """ + A link to the business's publicly available terms of service. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ active: bool + """ + Whether the configuration is active and can be used to create portal sessions. + """ application: Optional[ExpandableField["Application"]] + """ + ID of the Connect Application that created the configuration. + """ business_profile: StripeObject created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ default_return_url: Optional[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. + """ features: StripeObject id: str + """ + Unique identifier for the object. + """ is_default: bool + """ + Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ login_page: StripeObject metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["billing_portal.configuration"] + """ + String representing the object's type. Objects of the same type share the same value. + """ updated: int + """ + Time at which the object was last updated. Measured in seconds since the Unix epoch. + """ @classmethod def create( diff --git a/stripe/api_resources/billing_portal/session.py b/stripe/api_resources/billing_portal/session.py index 9ae6d003a..89d16bea2 100644 --- a/stripe/api_resources/billing_portal/session.py +++ b/stripe/api_resources/billing_portal/session.py @@ -42,92 +42,203 @@ class Session(CreateableAPIResource["Session"]): class CreateParams(RequestOptions): configuration: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ flow_data: NotRequired["Session.CreateParamsFlowData|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + Behavior after the flow is completed. + """ subscription_cancel: NotRequired[ "Session.CreateParamsFlowDataSubscriptionCancel|None" ] + """ + Configuration when `flow_data.type=subscription_cancel`. + """ subscription_update: NotRequired[ "Session.CreateParamsFlowDataSubscriptionUpdate|None" ] + """ + Configuration when `flow_data.type=subscription_update`. + """ subscription_update_confirm: NotRequired[ "Session.CreateParamsFlowDataSubscriptionUpdateConfirm|None" ] + """ + 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]|None" ] + """ + 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|None"] + """ + 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|None"] + """ + [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|None"] + """ + The ID of the coupon to apply to this subscription update. + """ promotion_code: NotRequired["str|None"] + """ + 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 CreateParamsFlowDataSubscriptionCancel(TypedDict): retention: NotRequired[ "Session.CreateParamsFlowDataSubscriptionCancelRetention|None" ] + """ + 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 CreateParamsFlowDataSubscriptionCancelRetentionCouponOffer( TypedDict, ): coupon: str + """ + The ID of the coupon to be offered. + """ class CreateParamsFlowDataAfterCompletion(TypedDict): hosted_confirmation: NotRequired[ "Session.CreateParamsFlowDataAfterCompletionHostedConfirmation|None" ] + """ + Configuration when `after_completion.type=hosted_confirmation`. + """ redirect: NotRequired[ "Session.CreateParamsFlowDataAfterCompletionRedirect|None" ] + """ + 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 CreateParamsFlowDataAfterCompletionHostedConfirmation(TypedDict): custom_message: NotRequired["str|None"] + """ + A custom message to display to the customer after the flow is completed. + """ configuration: ExpandableField["Configuration"] + """ + The configuration used by this session, describing the features available. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ customer: str + """ + The ID of the customer for this session. + """ flow: Optional[StripeObject] + """ + 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. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ locale: Optional[ Literal[ "auto", @@ -179,10 +290,25 @@ class CreateParamsFlowDataAfterCompletionHostedConfirmation(TypedDict): "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. + """ object: Literal["billing_portal.session"] + """ + String representing the object's type. Objects of the same type share the same value. + """ on_behalf_of: Optional[str] + """ + The account for which the session was created on behalf of. 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: Optional[str] + """ + The URL to redirect customers to when they click on the portal's link to return to your website. + """ url: str + """ + The short-lived URL of the session that gives customers access to the customer portal. + """ @classmethod def create( diff --git a/stripe/api_resources/capability.py b/stripe/api_resources/capability.py index af9158bab..06189d852 100644 --- a/stripe/api_resources/capability.py +++ b/stripe/api_resources/capability.py @@ -18,13 +18,31 @@ class Capability(UpdateableAPIResource["Capability"]): OBJECT_NAME: ClassVar[Literal["capability"]] = "capability" account: ExpandableField["Account"] + """ + The account for which the capability enables functionality. + """ future_requirements: Optional[StripeObject] id: str + """ + The identifier for the capability. + """ object: Literal["capability"] + """ + String representing the object's type. Objects of the same type share the same value. + """ requested: bool + """ + Whether the capability has been requested. + """ requested_at: Optional[int] + """ + Time at which the capability was requested. Measured in seconds since the Unix epoch. + """ requirements: Optional[StripeObject] status: Literal["active", "disabled", "inactive", "pending", "unrequested"] + """ + The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`. + """ def instance_url(self): token = self.id diff --git a/stripe/api_resources/card.py b/stripe/api_resources/card.py index 24957a00e..ad0ddd67a 100644 --- a/stripe/api_resources/card.py +++ b/stripe/api_resources/card.py @@ -34,37 +34,135 @@ class DeleteParams(RequestOptions): pass account: Optional[ExpandableField["Account"]] + """ + The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. + """ address_city: Optional[str] + """ + City/District/Suburb/Town/Village. + """ address_country: Optional[str] + """ + Billing address country, if provided when creating card. + """ address_line1: Optional[str] + """ + Address line 1 (Street address/PO Box/Company name). + """ address_line1_check: Optional[str] + """ + If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. + """ address_line2: Optional[str] + """ + Address line 2 (Apartment/Suite/Unit/Building). + """ address_state: Optional[str] + """ + State/County/Province/Region. + """ address_zip: Optional[str] + """ + ZIP or postal code. + """ address_zip_check: Optional[str] + """ + If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. + """ available_payout_methods: Optional[List[Literal["instant", "standard"]]] + """ + A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. + """ brand: str + """ + Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. + """ country: Optional[str] + """ + Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + """ currency: Optional[str] + """ + Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. + """ customer: Optional[ExpandableField["Customer"]] + """ + The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. + """ cvc_check: Optional[str] + """ + If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). + """ default_for_currency: Optional[bool] + """ + Whether this card is the default external account for its currency. + """ description: Optional[str] + """ + A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + """ dynamic_last4: Optional[str] + """ + (For tokenized numbers only.) The last four digits of the device account number. + """ exp_month: int + """ + Two-digit number representing the card's expiration month. + """ exp_year: int + """ + Four-digit number representing the card's expiration year. + """ fingerprint: Optional[str] + """ + Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + + *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + """ funding: str + """ + Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + """ id: str + """ + Unique identifier for the object. + """ iin: Optional[str] + """ + Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + """ issuer: Optional[str] + """ + The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + """ last4: str + """ + The last four digits of the card. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ name: Optional[str] + """ + Cardholder name. + """ object: Literal["card"] + """ + String representing the object's type. Objects of the same type share the same value. + """ status: Optional[str] + """ + For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. + """ tokenization_method: Optional[str] + """ + If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def _cls_delete( diff --git a/stripe/api_resources/cash_balance.py b/stripe/api_resources/cash_balance.py index 072879a4e..8b23c5f92 100644 --- a/stripe/api_resources/cash_balance.py +++ b/stripe/api_resources/cash_balance.py @@ -14,9 +14,21 @@ class CashBalance(StripeObject): OBJECT_NAME: ClassVar[Literal["cash_balance"]] = "cash_balance" available: Optional[Dict[str, int]] + """ + A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ customer: str + """ + The ID of the customer whose cash balance this object represents. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["cash_balance"] + """ + String representing the object's type. Objects of the same type share the same value. + """ settings: StripeObject def instance_url(self): diff --git a/stripe/api_resources/charge.py b/stripe/api_resources/charge.py index 34c911039..68d9c78f9 100644 --- a/stripe/api_resources/charge.py +++ b/stripe/api_resources/charge.py @@ -66,168 +66,543 @@ class Charge( class CaptureParams(RequestOptions): amount: NotRequired["int|None"] + """ + 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|None"] + """ + An application fee to add on to this charge. + """ application_fee_amount: NotRequired["int|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ receipt_email: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] application_fee_amount: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + The ID of an existing customer that will be charged in this request. + """ description: NotRequired["str|None"] + """ + 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|None"] expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ receipt_email: NotRequired["str|None"] + """ + 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|None"] + """ + Shipping information for the charge. Helps prevent fraud on charges for physical goods. + """ source: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ name: str + """ + Recipient name. + """ phone: NotRequired["str|None"] + """ + Recipient phone (including extension). + """ tracking_number: NotRequired["str|None"] + """ + 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|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreateParamsRadarOptions(TypedDict): session: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] customer: NotRequired["str|None"] + """ + Only return charges for the customer specified by this customer ID. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. + """ starting_after: NotRequired["str|None"] + """ + 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|None"] + """ + Only return charges for this transfer group. + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): customer: NotRequired["str|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ fraud_details: NotRequired["Charge.ModifyParamsFraudDetails|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + Shipping information for the charge. Helps prevent fraud on charges for physical goods. + """ transfer_group: NotRequired["str|None"] + """ + 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|None"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ name: str + """ + Recipient name. + """ phone: NotRequired["str|None"] + """ + Recipient phone (including extension). + """ tracking_number: NotRequired["str|None"] + """ + 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|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class ModifyParamsFraudDetails(TypedDict): user_report: Union[Literal[""], Literal["fraudulent", "safe"]] + """ + Either `safe` or `fraudulent`. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class SearchParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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 + """ + 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). + """ amount_captured: int + """ + Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). + """ amount_refunded: int + """ + Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). + """ application: Optional[ExpandableField["Application"]] + """ + ID of the Connect application that created the charge. + """ application_fee: Optional[ExpandableField["ApplicationFee"]] + """ + The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. + """ application_fee_amount: Optional[int] + """ + The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. + """ authorization_code: Optional[str] + """ + Authorization code on the charge. + """ balance_transaction: Optional[ExpandableField["BalanceTransaction"]] + """ + ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). + """ billing_details: StripeObject calculated_statement_descriptor: Optional[str] + """ + The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. + """ captured: bool + """ + If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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: Optional[ExpandableField["Customer"]] + """ + ID of the customer this charge is for if one exists. + """ description: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ disputed: bool + """ + Whether the charge has been disputed. + """ failure_balance_transaction: Optional[ ExpandableField["BalanceTransaction"] ] + """ + ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. + """ failure_code: Optional[str] + """ + Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes). + """ failure_message: Optional[str] + """ + Message to user further explaining reason for charge failure if available. + """ fraud_details: Optional[StripeObject] + """ + Information on fraud assessments for the charge. + """ id: str + """ + Unique identifier for the object. + """ invoice: Optional[ExpandableField["Invoice"]] + """ + ID of the invoice this charge is for if one exists. + """ level3: Optional[StripeObject] livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["charge"] + """ + String representing the object's type. Objects of the same type share the same value. + """ on_behalf_of: Optional[ExpandableField["Account"]] + """ + The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + """ outcome: Optional[StripeObject] + """ + Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. + """ paid: bool + """ + `true` if the charge succeeded, or was successfully authorized for later capture. + """ payment_intent: Optional[ExpandableField["PaymentIntent"]] + """ + ID of the PaymentIntent associated with this charge, if one exists. + """ payment_method: Optional[str] + """ + ID of the payment method used in this charge. + """ payment_method_details: Optional[StripeObject] + """ + Details about the payment method at the time of the transaction. + """ radar_options: Optional[StripeObject] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ receipt_email: Optional[str] + """ + This is the email address that the receipt for this charge was sent to. + """ receipt_number: Optional[str] + """ + This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. + """ receipt_url: Optional[str] + """ + This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. + """ refunded: bool + """ + Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. + """ refunds: Optional[ListObject["Refund"]] + """ + A list of refunds that have been applied to the charge. + """ review: Optional[ExpandableField["Review"]] + """ + ID of the review associated with this charge if one exists. + """ shipping: Optional[StripeObject] + """ + Shipping information for the charge. + """ source: Optional[Union["Account", "BankAccount", "Card", "Source"]] + """ + This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead. + """ source_transfer: Optional[ExpandableField["Transfer"]] + """ + The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + """ statement_descriptor: Optional[str] + """ + For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers' statements. Must contain at least one letter, maximum 22 characters. + """ statement_descriptor_suffix: Optional[str] + """ + Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + """ status: Literal["failed", "pending", "succeeded"] + """ + The status of the payment is either `succeeded`, `pending`, or `failed`. + """ transfer: Optional[ExpandableField["Transfer"]] + """ + ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). + """ transfer_data: Optional[StripeObject] + """ + 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: Optional[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. + """ @classmethod def _cls_capture( diff --git a/stripe/api_resources/checkout/session.py b/stripe/api_resources/checkout/session.py index bd6666905..918ac61e1 100644 --- a/stripe/api_resources/checkout/session.py +++ b/stripe/api_resources/checkout/session.py @@ -56,153 +56,418 @@ class CreateParams(RequestOptions): after_expiration: NotRequired[ "Session.CreateParamsAfterExpiration|None" ] + """ + Configure actions after a Checkout Session has expired. + """ allow_promotion_codes: NotRequired["bool|None"] + """ + Enables user redeemable promotion codes. + """ automatic_tax: NotRequired["Session.CreateParamsAutomaticTax|None"] + """ + Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. + """ billing_address_collection: NotRequired[ "Literal['auto', 'required']|None" ] + """ + Specify whether Checkout should collect the customer's billing address. + """ cancel_url: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None" ] + """ + Configure fields for the Checkout Session to gather active consent from customers. + """ currency: NotRequired["str|None"] + """ + 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). + """ custom_fields: NotRequired[ "List[Session.CreateParamsCustomField]|None" ] + """ + Collect additional information from your customer using custom fields. Up to 2 fields are supported. + """ custom_text: NotRequired["Session.CreateParamsCustomText|None"] + """ + Display additional text for your customers using custom text. + """ customer: NotRequired["str|None"] + """ + ID of an existing Customer, if one exists. In `payment` mode, the customer's most recent 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, and otherwise the most recent 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 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']|None" ] + """ + 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). + + 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|None"] + """ + 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|None" ] + """ + 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]|None"] + """ + The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ expires_at: NotRequired["int|None"] + """ + 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|None" ] + """ + Generate a post-purchase Invoice for one-time payments. + """ line_items: NotRequired["List[Session.CreateParamsLineItem]|None"] + """ + 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 `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']|None" ] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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']|None" ] + """ + The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item. + """ payment_intent_data: NotRequired[ "Session.CreateParamsPaymentIntentData|None" ] + """ + A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + """ payment_method_collection: NotRequired[ "Literal['always', 'if_required']|None" ] + """ + 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_configuration: NotRequired["str|None"] + """ + The ID of the payment method configuration to use with this Checkout session. + """ payment_method_options: NotRequired[ "Session.CreateParamsPaymentMethodOptions|None" ] + """ + 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', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay', 'zip']]|None" ] + """ + A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. + + In `payment` and `subscription` mode, you can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + It is required in `setup` mode. + + 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|None" ] + """ + 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']|None" ] + """ + 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|None"] + """ + 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|None" ] + """ + A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. + """ shipping_address_collection: NotRequired[ "Session.CreateParamsShippingAddressCollection|None" ] + """ + When set, provides configuration for Checkout to collect a shipping address from a customer. + """ shipping_options: NotRequired[ "List[Session.CreateParamsShippingOption]|None" ] + """ + The shipping rate options to apply to this Session. Up to a maximum of 5. + """ submit_type: NotRequired[ "Literal['auto', 'book', 'donate', 'pay']|None" ] + """ + 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|None" ] + """ + A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. + """ success_url: NotRequired["str|None"] + """ + The URL to which Stripe should send customers when payment or setup + is complete. + 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|None" ] + """ + Controls tax ID collection settings for the session. + """ ui_mode: NotRequired["Literal['embedded', 'hosted']|None"] + """ + `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 CreateParamsSubscriptionData(TypedDict): application_fee_percent: NotRequired["float|None"] + """ + 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|None"] + """ + A future timestamp to anchor the subscription's billing cycle for new subscriptions. + """ default_tax_rates: NotRequired["List[str]|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The account on behalf of which to charge, for each of the subscription's invoices. + """ proration_behavior: NotRequired[ "Literal['create_prorations', 'none']|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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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 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|None"] + """ + 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|None"] + """ + The ID of the Shipping Rate to use for this shipping option. + """ shipping_rate_data: NotRequired[ "Session.CreateParamsShippingOptionShippingRateData|None" ] + """ + Parameters to be passed to Shipping Rate creation for this shipping option + """ class CreateParamsShippingOptionShippingRateData(TypedDict): delivery_estimate: NotRequired[ "Session.CreateParamsShippingOptionShippingRateDataDeliveryEstimate|None" ] + """ + 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|None" ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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']|None" ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ tax_code: NotRequired["str|None"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ type: NotRequired["Literal['fixed_amount']|None"] + """ + The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + """ 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]|None" ] + """ + 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 CreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions( TypedDict, ): amount: int + """ + A non-negative integer in cents representing how much to charge. + """ tax_behavior: NotRequired[ "Literal['exclusive', 'inclusive', 'unspecified']|None" ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ class CreateParamsShippingOptionShippingRateDataDeliveryEstimate( TypedDict, @@ -210,21 +475,39 @@ class CreateParamsShippingOptionShippingRateDataDeliveryEstimate( maximum: NotRequired[ "Session.CreateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum|None" ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ minimum: NotRequired[ "Session.CreateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum|None" ] + """ + The lower bound of the estimated range. If empty, represents no lower bound. + """ class CreateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum( TypedDict, ): unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ value: int + """ + Must be greater than 0. + """ class CreateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum( TypedDict, ): unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ value: int + """ + Must be greater than 0. + """ class CreateParamsShippingAddressCollection(TypedDict): allowed_countries: List[ @@ -468,116 +751,242 @@ class CreateParamsShippingAddressCollection(TypedDict): "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 CreateParamsSetupIntentData(TypedDict): description: NotRequired["str|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The Stripe account for which the setup is intended. + """ class CreateParamsPhoneNumberCollection(TypedDict): enabled: bool + """ + Set to `true` to enable phone number collection. + """ class CreateParamsPaymentMethodOptions(TypedDict): acss_debit: NotRequired[ "Session.CreateParamsPaymentMethodOptionsAcssDebit|None" ] + """ + contains details about the ACSS Debit payment method options. + """ affirm: NotRequired[ "Session.CreateParamsPaymentMethodOptionsAffirm|None" ] + """ + contains details about the Affirm payment method options. + """ afterpay_clearpay: NotRequired[ "Session.CreateParamsPaymentMethodOptionsAfterpayClearpay|None" ] + """ + contains details about the Afterpay Clearpay payment method options. + """ alipay: NotRequired[ "Session.CreateParamsPaymentMethodOptionsAlipay|None" ] + """ + contains details about the Alipay payment method options. + """ au_becs_debit: NotRequired[ "Session.CreateParamsPaymentMethodOptionsAuBecsDebit|None" ] + """ + contains details about the AU Becs Debit payment method options. + """ bacs_debit: NotRequired[ "Session.CreateParamsPaymentMethodOptionsBacsDebit|None" ] + """ + contains details about the Bacs Debit payment method options. + """ bancontact: NotRequired[ "Session.CreateParamsPaymentMethodOptionsBancontact|None" ] + """ + contains details about the Bancontact payment method options. + """ boleto: NotRequired[ "Session.CreateParamsPaymentMethodOptionsBoleto|None" ] + """ + contains details about the Boleto payment method options. + """ card: NotRequired[ "Session.CreateParamsPaymentMethodOptionsCard|None" ] + """ + contains details about the Card payment method options. + """ cashapp: NotRequired[ "Session.CreateParamsPaymentMethodOptionsCashapp|None" ] + """ + contains details about the Cashapp Pay payment method options. + """ customer_balance: NotRequired[ "Session.CreateParamsPaymentMethodOptionsCustomerBalance|None" ] + """ + contains details about the Customer Balance payment method options. + """ eps: NotRequired[ "Session.CreateParamsPaymentMethodOptionsEps|None" ] + """ + contains details about the EPS payment method options. + """ fpx: NotRequired[ "Session.CreateParamsPaymentMethodOptionsFpx|None" ] + """ + contains details about the FPX payment method options. + """ giropay: NotRequired[ "Session.CreateParamsPaymentMethodOptionsGiropay|None" ] + """ + contains details about the Giropay payment method options. + """ grabpay: NotRequired[ "Session.CreateParamsPaymentMethodOptionsGrabpay|None" ] + """ + contains details about the Grabpay payment method options. + """ ideal: NotRequired[ "Session.CreateParamsPaymentMethodOptionsIdeal|None" ] + """ + contains details about the Ideal payment method options. + """ klarna: NotRequired[ "Session.CreateParamsPaymentMethodOptionsKlarna|None" ] + """ + contains details about the Klarna payment method options. + """ konbini: NotRequired[ "Session.CreateParamsPaymentMethodOptionsKonbini|None" ] + """ + contains details about the Konbini payment method options. + """ link: NotRequired[ "Session.CreateParamsPaymentMethodOptionsLink|None" ] + """ + contains details about the Link payment method options. + """ oxxo: NotRequired[ "Session.CreateParamsPaymentMethodOptionsOxxo|None" ] + """ + contains details about the OXXO payment method options. + """ p24: NotRequired[ "Session.CreateParamsPaymentMethodOptionsP24|None" ] + """ + contains details about the P24 payment method options. + """ paynow: NotRequired[ "Session.CreateParamsPaymentMethodOptionsPaynow|None" ] + """ + contains details about the PayNow payment method options. + """ paypal: NotRequired[ "Session.CreateParamsPaymentMethodOptionsPaypal|None" ] + """ + contains details about the PayPal payment method options. + """ pix: NotRequired[ "Session.CreateParamsPaymentMethodOptionsPix|None" ] + """ + contains details about the Pix payment method options. + """ sepa_debit: NotRequired[ "Session.CreateParamsPaymentMethodOptionsSepaDebit|None" ] + """ + contains details about the Sepa Debit payment method options. + """ sofort: NotRequired[ "Session.CreateParamsPaymentMethodOptionsSofort|None" ] + """ + contains details about the Sofort payment method options. + """ us_bank_account: NotRequired[ "Session.CreateParamsPaymentMethodOptionsUsBankAccount|None" ] + """ + contains details about the Us Bank Account payment method options. + """ wechat_pay: NotRequired[ "Session.CreateParamsPaymentMethodOptionsWechatPay|None" ] + """ + contains details about the WeChat Pay payment method options. + """ class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired["str|None"] + """ + 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']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): financial_connections: NotRequired[ "Session.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections|None" ] + """ + Additional fields for Financial Connections Session creation + """ setup_future_usage: NotRequired[ "Literal['none', 'off_session', 'on_session']|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). + """ verification_method: NotRequired[ "Literal['automatic', 'instant']|None" ] + """ + Verification method for the intent + """ class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, @@ -585,74 +994,217 @@ class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( permissions: NotRequired[ "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]|None" ] + """ + 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']]|None"] + """ + List of data features that you would like to retrieve upon account creation. + """ class CreateParamsPaymentMethodOptionsSofort(TypedDict): setup_future_usage: NotRequired["Literal['none']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): setup_future_usage: NotRequired[ "Literal['none', 'off_session', 'on_session']|None" ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsPix(TypedDict): expires_after_seconds: NotRequired["int|None"] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ class CreateParamsPaymentMethodOptionsPaypal(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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']|None" ] + """ + [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + """ reference: NotRequired["str|None"] + """ + 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|None"] + """ + The risk correlation ID for an on-session payment using a saved PayPal payment method. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 CreateParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired["Literal['none']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsP24(TypedDict): setup_future_usage: NotRequired["Literal['none']|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|None"] + """ + Confirm that the payer has accepted the P24 terms and conditions. + """ class CreateParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired["int|None"] + """ + 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']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsLink(TypedDict): setup_future_usage: NotRequired[ "Literal['none', 'off_session']|None" ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): expires_after_days: NotRequired["int|None"] + """ + 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']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): setup_future_usage: NotRequired["Literal['none']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): setup_future_usage: NotRequired["Literal['none']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): setup_future_usage: NotRequired["Literal['none']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): setup_future_usage: NotRequired["Literal['none']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsFpx(TypedDict): setup_future_usage: NotRequired["Literal['none']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsEps(TypedDict): setup_future_usage: NotRequired["Literal['none']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): bank_transfer: NotRequired[ "Session.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer|None" ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ funding_type: NotRequired["Literal['bank_transfer']|None"] + """ + 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']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( TypedDict, @@ -660,9 +1212,17 @@ class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( eu_bank_transfer: NotRequired[ "Session.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer|None" ] + """ + Configuration for eu_bank_transfer funding type. + """ requested_address_types: NotRequired[ "List[Literal['aba', 'iban', 'sepa', 'sort_code', 'spei', 'swift', 'zengin']]|None" ] + """ + 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", @@ -670,184 +1230,498 @@ class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( "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 CreateParamsPaymentMethodOptionsCashapp(TypedDict): setup_future_usage: NotRequired[ "Literal['none', 'off_session', 'on_session']|None" ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsCard(TypedDict): installments: NotRequired[ "Session.CreateParamsPaymentMethodOptionsCardInstallments|None" ] + """ + Installment options for card payments + """ setup_future_usage: NotRequired[ "Literal['off_session', 'on_session']|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). + """ statement_descriptor_suffix_kana: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsBancontact(TypedDict): setup_future_usage: NotRequired["Literal['none']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): setup_future_usage: NotRequired[ "Literal['none', 'off_session', 'on_session']|None" ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): setup_future_usage: NotRequired["Literal['none']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): setup_future_usage: NotRequired["Literal['none']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): setup_future_usage: NotRequired["Literal['none']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsAffirm(TypedDict): setup_future_usage: NotRequired["Literal['none']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): currency: NotRequired["Literal['cad', 'usd']|None"] + """ + 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|None" ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['none', 'off_session', 'on_session']|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). + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, ): custom_mandate_url: NotRequired["Literal['']|str|None"] + """ + 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']]|None" ] + """ + List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode. + """ interval_description: NotRequired["str|None"] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ payment_schedule: NotRequired[ "Literal['combined', 'interval', 'sporadic']|None" ] + """ + Payment schedule for the mandate. + """ transaction_type: NotRequired[ "Literal['business', 'personal']|None" ] + """ + Transaction type of the mandate. + """ class CreateParamsPaymentIntentData(TypedDict): application_fee_amount: NotRequired["int|None"] + """ + 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']|None" ] + """ + Controls when the funds will be captured from the customer's account. + """ description: NotRequired["str|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + 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. + """ shipping: NotRequired[ "Session.CreateParamsPaymentIntentDataShipping|None" ] + """ + Shipping information for this payment. + """ statement_descriptor: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ name: str + """ + Recipient name. + """ phone: NotRequired["str|None"] + """ + Recipient phone (including extension). + """ tracking_number: NotRequired["str|None"] + """ + 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|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + 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|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreateParamsLineItem(TypedDict): adjustable_quantity: NotRequired[ "Session.CreateParamsLineItemAdjustableQuantity|None" ] + """ + When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout. + """ dynamic_tax_rates: NotRequired["List[str]|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None"] + """ + The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`. + """ tax_rates: NotRequired["List[str]|None"] + """ + 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|None"] + """ + The ID of the product that this price will belong to. One of `product` or `product_data` is required. + """ product_data: NotRequired[ "Session.CreateParamsLineItemPriceDataProductData|None" ] + """ + Data used to generate a new product object inline. One of `product` or `product_data` is required. + """ recurring: NotRequired[ "Session.CreateParamsLineItemPriceDataRecurring|None" ] + """ + The recurring components of a price such as `interval` and `interval_count`. + """ tax_behavior: NotRequired[ "Literal['exclusive', 'inclusive', 'unspecified']|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + Parameters passed when creating invoices for payment-mode Checkout Sessions. + """ class CreateParamsInvoiceCreationInvoiceData(TypedDict): account_tax_ids: NotRequired["Literal['']|List[str]|None"] + """ + The account tax IDs associated with the invoice. + """ custom_fields: NotRequired[ "Literal['']|List[Session.CreateParamsInvoiceCreationInvoiceDataCustomField]|None" ] + """ + Default custom fields to be displayed on invoices for this customer. + """ description: NotRequired["str|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ footer: NotRequired["str|None"] + """ + Default footer to be displayed on invoices for this customer. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + Default options for invoice PDF rendering for this customer. + """ class CreateParamsInvoiceCreationInvoiceDataRenderingOptions( TypedDict @@ -855,140 +1729,385 @@ class CreateParamsInvoiceCreationInvoiceDataRenderingOptions( amount_tax_display: NotRequired[ "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']|None" ] + """ + 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 CreateParamsDiscount(TypedDict): coupon: NotRequired["str|None"] + """ + The ID of the coupon to apply to this Session. + """ promotion_code: NotRequired["str|None"] + """ + The ID of a promotion code to apply to this Session. + """ class CreateParamsCustomerUpdate(TypedDict): address: NotRequired["Literal['auto', 'never']|None"] + """ + 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']|None"] + """ + Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`. + """ shipping: NotRequired["Literal['auto', 'never']|None"] + """ + 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|None" ] + """ + Custom text that should be displayed alongside shipping address collection. + """ submit: NotRequired[ "Literal['']|Session.CreateParamsCustomTextSubmit|None" ] + """ + Custom text that should be displayed alongside the payment confirmation button. + """ terms_of_service_acceptance: NotRequired[ "Literal['']|Session.CreateParamsCustomTextTermsOfServiceAcceptance|None" ] + """ + 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 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 CreateParamsCustomField(TypedDict): dropdown: NotRequired[ "Session.CreateParamsCustomFieldDropdown|None" ] + """ + 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|None"] + """ + Configuration for `type=numeric` fields. + """ optional: NotRequired["bool|None"] + """ + Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + """ text: NotRequired["Session.CreateParamsCustomFieldText|None"] + """ + Configuration for `type=text` fields. + """ type: Literal["dropdown", "numeric", "text"] + """ + The type of the field. + """ class CreateParamsCustomFieldText(TypedDict): maximum_length: NotRequired["int|None"] + """ + The maximum character length constraint for the customer's input. + """ minimum_length: NotRequired["int|None"] + """ + The minimum character length requirement for the customer's input. + """ class CreateParamsCustomFieldNumeric(TypedDict): maximum_length: NotRequired["int|None"] + """ + The maximum character length constraint for the customer's input. + """ minimum_length: NotRequired["int|None"] + """ + 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 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 CreateParamsConsentCollection(TypedDict): promotions: NotRequired["Literal['auto', 'none']|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']|None"] + """ + 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 CreateParamsAfterExpiration(TypedDict): recovery: NotRequired[ "Session.CreateParamsAfterExpirationRecovery|None" ] + """ + Configure a Checkout Session that can be used to recover an expired session. + """ class CreateParamsAfterExpirationRecovery(TypedDict): allow_promotion_codes: NotRequired["bool|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ListParams(RequestOptions): customer: NotRequired["str|None"] + """ + Only return the Checkout Sessions for the Customer specified. + """ customer_details: NotRequired[ "Session.ListParamsCustomerDetails|None" ] + """ + Only return the Checkout Sessions for the Customer details specified. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + Only return the Checkout Session for the PaymentIntent specified. + """ payment_link: NotRequired["str|None"] + """ + Only return the Checkout Sessions for the Payment Link specified. + """ starting_after: NotRequired["str|None"] + """ + 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|None"] + """ + Only return the Checkout Session for the subscription specified. + """ class ListParamsCustomerDetails(TypedDict): email: str + """ + Customer's email address. + """ class ListLineItemsParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ after_expiration: Optional[StripeObject] + """ + When set, provides configuration for actions to take if this Checkout Session expires. + """ allow_promotion_codes: Optional[bool] + """ + Enables user redeemable promotion codes. + """ amount_subtotal: Optional[int] + """ + Total of all items before discounts or taxes are applied. + """ amount_total: Optional[int] + """ + Total of all items after discounts and taxes are applied. + """ automatic_tax: StripeObject billing_address_collection: Optional[Literal["auto", "required"]] + """ + Describes whether Checkout should collect the customer's billing address. + """ cancel_url: Optional[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: Optional[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. + """ client_secret: Optional[str] + """ + Client secret to be used when initializing Stripe.js embedded checkout. + """ consent: Optional[StripeObject] + """ + Results of `consent_collection` for this session. + """ consent_collection: Optional[StripeObject] + """ + When set, provides configuration for the Checkout Session to gather active consent from customers. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ currency: Optional[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_conversion: Optional[StripeObject] + """ + Currency conversion details for automatic currency conversion sessions + """ custom_fields: List[StripeObject] + """ + Collect additional information from your customer using custom fields. Up to 2 fields are supported. + """ custom_text: StripeObject customer: Optional[ExpandableField["Customer"]] + """ + The ID of the customer for this Session. + For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout + will create a new customer object based on information provided + during the payment flow unless an existing customer was provided when + the Session was created. + """ customer_creation: Optional[Literal["always", "if_required"]] + """ + Configure whether a Checkout Session creates a Customer when the Checkout Session completes. + """ customer_details: Optional[StripeObject] + """ + The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode. + """ customer_email: Optional[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 the payment flow is + complete, use the `customer` attribute. + """ expires_at: int + """ + The timestamp at which the Checkout Session will expire. + """ id: str + """ + Unique identifier for the object. + """ invoice: Optional[ExpandableField["Invoice"]] + """ + ID of the invoice created by the Checkout Session, if it exists. + """ invoice_creation: Optional[StripeObject] + """ + Details on the state of invoice creation for the Checkout Session. + """ line_items: Optional[ListObject["LineItem"]] + """ + The line items purchased by the customer. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ locale: Optional[ Literal[ "auto", @@ -1034,33 +2153,118 @@ class RetrieveParams(RequestOptions): "zh-TW", ] ] + """ + The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ mode: Literal["payment", "setup", "subscription"] + """ + The mode of the Checkout Session. + """ object: Literal["checkout.session"] + """ + String representing the object's type. Objects of the same type share the same value. + """ payment_intent: Optional[ExpandableField["PaymentIntent"]] + """ + The ID of the PaymentIntent for Checkout Sessions in `payment` mode. + """ payment_link: Optional[ExpandableField["PaymentLink"]] + """ + The ID of the Payment Link that created this Session. + """ payment_method_collection: Optional[Literal["always", "if_required"]] + """ + Configure whether a Checkout Session should collect a payment method. + """ payment_method_configuration_details: Optional[StripeObject] + """ + Information about the payment method configuration used for this Checkout session if using dynamic payment methods. + """ payment_method_options: Optional[StripeObject] + """ + Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. + """ payment_method_types: List[str] + """ + A list of the types of payment methods (e.g. card) this Checkout + Session is allowed to accept. + """ payment_status: Literal["no_payment_required", "paid", "unpaid"] + """ + The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. + You can use this value to decide when to fulfill your customer's order. + """ phone_number_collection: Optional[StripeObject] recovered_from: Optional[str] + """ + The ID of the original expired Checkout Session that triggered the recovery flow. + """ redirect_on_completion: Optional[Literal["always", "if_required", "never"]] + """ + Applies to Checkout Sessions with `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: Optional[str] + """ + Applies to Checkout Sessions with `ui_mode: embedded`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + """ setup_intent: Optional[ExpandableField["SetupIntent"]] + """ + The ID of the SetupIntent for Checkout Sessions in `setup` mode. + """ shipping_address_collection: Optional[StripeObject] + """ + When set, provides configuration for Checkout to collect a shipping address from a customer. + """ shipping_cost: Optional[StripeObject] + """ + The details of the customer cost of shipping, including the customer chosen ShippingRate. + """ shipping_details: Optional[StripeObject] + """ + Shipping information for this Checkout Session. + """ shipping_options: List[StripeObject] + """ + The shipping rate options applied to this Session. + """ status: Optional[Literal["complete", "expired", "open"]] + """ + The status of the Checkout Session, one of `open`, `complete`, or `expired`. + """ submit_type: Optional[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: Optional[ExpandableField["Subscription"]] + """ + The ID of the subscription for Checkout Sessions in `subscription` mode. + """ success_url: Optional[str] + """ + The URL the customer will be directed to after the payment or + subscription creation is successful. + """ tax_id_collection: Optional[StripeObject] total_details: Optional[StripeObject] + """ + Tax and discount details for the computed total amount. + """ ui_mode: Optional[Literal["embedded", "hosted"]] + """ + The UI mode of the Session. Can be `hosted` (default) or `embedded`. + """ url: Optional[str] + """ + The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you're using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it'll use `checkout.stripe.com.` + This value is only present when the session is active. + """ @classmethod def create( diff --git a/stripe/api_resources/connect_collection_transfer.py b/stripe/api_resources/connect_collection_transfer.py index 044424b2d..07eb815d6 100644 --- a/stripe/api_resources/connect_collection_transfer.py +++ b/stripe/api_resources/connect_collection_transfer.py @@ -14,8 +14,26 @@ class ConnectCollectionTransfer(StripeObject): Literal["connect_collection_transfer"] ] = "connect_collection_transfer" amount: int + """ + Amount transferred, in cents (or local equivalent). + """ 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). + """ destination: ExpandableField["Account"] + """ + ID of the account that funds are being collected for. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["connect_collection_transfer"] + """ + String representing the object's type. Objects of the same type share the same value. + """ diff --git a/stripe/api_resources/country_spec.py b/stripe/api_resources/country_spec.py index 8b70a25e4..702917243 100644 --- a/stripe/api_resources/country_spec.py +++ b/stripe/api_resources/country_spec.py @@ -23,20 +23,56 @@ class CountrySpec(ListableAPIResource["CountrySpec"]): class ListParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ default_currency: str + """ + The default currency for this country. This applies to both payment methods and bank accounts. + """ id: str + """ + Unique identifier for the object. Represented as the ISO country code for this country. + """ object: Literal["country_spec"] + """ + String representing the object's type. Objects of the same type share the same value. + """ supported_bank_account_currencies: Dict[str, List[str]] + """ + Currencies that can be accepted in the specific country (for transfers). + """ supported_payment_currencies: List[str] + """ + Currencies that can be accepted in the specified country (for payments). + """ supported_payment_methods: List[str] + """ + Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). + """ supported_transfer_countries: List[str] + """ + Countries that can accept transfers from the specified country. + """ verification_fields: StripeObject @classmethod diff --git a/stripe/api_resources/coupon.py b/stripe/api_resources/coupon.py index 4ee4e883c..c846e3b6f 100644 --- a/stripe/api_resources/coupon.py +++ b/stripe/api_resources/coupon.py @@ -38,77 +38,218 @@ class Coupon( class CreateParams(RequestOptions): amount_off: NotRequired["int|None"] + """ + A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). + """ applies_to: NotRequired["Coupon.CreateParamsAppliesTo|None"] + """ + A hash containing directions for what this Coupon will apply discounts to. + """ currency: NotRequired["str|None"] + """ + 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]|None" ] + """ + 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']|None" ] + """ + Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. + """ duration_in_months: NotRequired["int|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ id: NotRequired["str|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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 CreateParamsAppliesTo(TypedDict): products: NotRequired["List[str]|None"] + """ + An array of Product IDs that this Coupon will apply to. + """ class DeleteParams(RequestOptions): pass class ListParams(RequestOptions): created: NotRequired["Coupon.ListParamsCreated|int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): currency_options: NotRequired[ "Dict[str, Coupon.ModifyParamsCurrencyOptions]|None" ] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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 RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ amount_off: Optional[int] + """ + Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. + """ applies_to: Optional[StripeObject] created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ currency: Optional[str] + """ + If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. + """ currency_options: Optional[Dict[str, StripeObject]] + """ + Coupons 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). + """ duration: Literal["forever", "once", "repeating"] + """ + One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. + """ duration_in_months: Optional[int] + """ + If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ max_redemptions: Optional[int] + """ + Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ name: Optional[str] + """ + Name of the coupon displayed to customers on for instance invoices or receipts. + """ object: Literal["coupon"] + """ + String representing the object's type. Objects of the same type share the same value. + """ percent_off: Optional[float] + """ + Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead. + """ redeem_by: Optional[int] + """ + Date after which the coupon can no longer be redeemed. + """ times_redeemed: int + """ + Number of times this coupon has been applied to a customer. + """ valid: bool + """ + Taking account of the above properties, whether this coupon can still be applied to a customer. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def create( diff --git a/stripe/api_resources/credit_note.py b/stripe/api_resources/credit_note.py index b6c60e476..b97b91d14 100644 --- a/stripe/api_resources/credit_note.py +++ b/stripe/api_resources/credit_note.py @@ -49,164 +49,506 @@ class CreditNote( class CreateParams(RequestOptions): amount: NotRequired["int|None"] + """ + The integer amount in cents (or local equivalent) representing the total amount of the credit note. + """ credit_amount: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ invoice: str + """ + ID of the invoice. + """ lines: NotRequired["List[CreditNote.CreateParamsLine]|None"] + """ + Line items that make up the credit note. + """ memo: NotRequired["str|None"] + """ + The credit note's memo appears on the credit note PDF. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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']|None" ] + """ + Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + """ refund: NotRequired["str|None"] + """ + ID of an existing refund to link this credit note to. + """ refund_amount: NotRequired["int|None"] + """ + 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|None" ] + """ + 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|None"] + """ + The ID of the shipping rate to use for this order. + """ class CreateParamsLine(TypedDict): amount: NotRequired["int|None"] + """ + The line item amount to credit. Only valid when `type` is `invoice_line_item`. + """ description: NotRequired["str|None"] + """ + The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + """ invoice_line_item: NotRequired["str|None"] + """ + The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + """ quantity: NotRequired["int|None"] + """ + The line item quantity to credit. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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): customer: NotRequired["str|None"] + """ + Only return credit notes for the customer specified by this customer ID. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ invoice: NotRequired["str|None"] + """ + Only return credit notes for the invoice specified by this invoice ID. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ memo: NotRequired["str|None"] + """ + Credit note memo. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The integer amount in cents (or local equivalent) representing the total amount of the credit note. + """ credit_amount: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ invoice: str + """ + ID of the invoice. + """ lines: NotRequired["List[CreditNote.PreviewParamsLine]|None"] + """ + Line items that make up the credit note. + """ memo: NotRequired["str|None"] + """ + The credit note's memo appears on the credit note PDF. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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']|None" ] + """ + Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + """ refund: NotRequired["str|None"] + """ + ID of an existing refund to link this credit note to. + """ refund_amount: NotRequired["int|None"] + """ + 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|None" ] + """ + 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|None"] + """ + The ID of the shipping rate to use for this order. + """ class PreviewParamsLine(TypedDict): amount: NotRequired["int|None"] + """ + The line item amount to credit. Only valid when `type` is `invoice_line_item`. + """ description: NotRequired["str|None"] + """ + The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + """ invoice_line_item: NotRequired["str|None"] + """ + The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + """ quantity: NotRequired["int|None"] + """ + The line item quantity to credit. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + The integer amount in cents (or local equivalent) representing the total amount of the credit note. + """ credit_amount: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ invoice: str + """ + ID of the invoice. + """ limit: NotRequired["int|None"] + """ + 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]|None"] + """ + Line items that make up the credit note. + """ memo: NotRequired["str|None"] + """ + The credit note's memo appears on the credit note PDF. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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']|None" ] + """ + Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + """ refund: NotRequired["str|None"] + """ + ID of an existing refund to link this credit note to. + """ refund_amount: NotRequired["int|None"] + """ + 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|None" ] + """ + When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + """ starting_after: NotRequired["str|None"] + """ + 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 PreviewLinesParamsShippingCost(TypedDict): shipping_rate: NotRequired["str|None"] + """ + The ID of the shipping rate to use for this order. + """ class PreviewLinesParamsLine(TypedDict): amount: NotRequired["int|None"] + """ + The line item amount to credit. Only valid when `type` is `invoice_line_item`. + """ description: NotRequired["str|None"] + """ + The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + """ invoice_line_item: NotRequired["str|None"] + """ + The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + """ quantity: NotRequired["int|None"] + """ + The line item quantity to credit. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class VoidCreditNoteParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ListLinesParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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 + """ + The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. + """ amount_shipping: int + """ + This is the sum of all the shipping amounts. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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: ExpandableField["Customer"] + """ + ID of the customer. + """ customer_balance_transaction: Optional[ ExpandableField["CustomerBalanceTransaction"] ] + """ + Customer balance transaction related to this credit note. + """ discount_amount: int + """ + The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. + """ discount_amounts: List[StripeObject] + """ + The aggregate amounts calculated per discount for all line items. + """ effective_at: Optional[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. + """ id: str + """ + Unique identifier for the object. + """ invoice: ExpandableField["Invoice"] + """ + ID of the invoice. + """ lines: ListObject["CreditNoteLineItem"] + """ + Line items that make up the credit note + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ memo: Optional[str] + """ + Customer-facing text that appears on the credit note PDF. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ number: str + """ + A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. + """ object: Literal["credit_note"] + """ + String representing the object's type. Objects of the same type share the same value. + """ out_of_band_amount: Optional[int] + """ + Amount that was credited outside of Stripe. + """ pdf: str + """ + The link to download the PDF of the credit note. + """ reason: Optional[ Literal[ "duplicate", "fraudulent", "order_change", "product_unsatisfactory" ] ] + """ + Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + """ refund: Optional[ExpandableField["Refund"]] + """ + Refund related to this credit note. + """ shipping_cost: Optional[StripeObject] + """ + The details of the cost of shipping, including the ShippingRate applied to the invoice. + """ status: Literal["issued", "void"] + """ + Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). + """ subtotal: int + """ + The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. + """ subtotal_excluding_tax: Optional[int] + """ + The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. + """ tax_amounts: List[StripeObject] + """ + The aggregate amounts calculated per tax rate for all line items. + """ total: int + """ + The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. + """ total_excluding_tax: Optional[int] + """ + The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. + """ type: Literal["post_payment", "pre_payment"] + """ + Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. + """ voided_at: Optional[int] + """ + The time that the credit note was voided. + """ @classmethod def create( diff --git a/stripe/api_resources/credit_note_line_item.py b/stripe/api_resources/credit_note_line_item.py index d24889ac8..eb4dad793 100644 --- a/stripe/api_resources/credit_note_line_item.py +++ b/stripe/api_resources/credit_note_line_item.py @@ -23,26 +23,86 @@ class CreditNoteLineItem(ListableAPIResource["CreditNoteLineItem"]): class ListParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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 + """ + The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. + """ amount_excluding_tax: Optional[int] + """ + The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts. + """ description: Optional[str] + """ + Description of the item being credited. + """ discount_amount: int + """ + The integer amount in cents (or local equivalent) representing the discount being credited for this line item. + """ discount_amounts: List[StripeObject] + """ + The amount of discount calculated per discount for this line item + """ id: str + """ + Unique identifier for the object. + """ invoice_line_item: Optional[str] + """ + ID of the invoice line item being credited + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["credit_note_line_item"] + """ + String representing the object's type. Objects of the same type share the same value. + """ quantity: Optional[int] + """ + The number of units of product being credited. + """ tax_amounts: List[StripeObject] + """ + The amount of tax calculated per tax rate for this line item + """ tax_rates: List["TaxRate"] + """ + The tax rates which apply to the line item. + """ type: Literal["custom_line_item", "invoice_line_item"] + """ + The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. + """ unit_amount: Optional[int] + """ + The cost of each unit of product being credited. + """ unit_amount_decimal: Optional[str] + """ + Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + """ unit_amount_excluding_tax: Optional[str] + """ + The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts. + """ @classmethod def list( diff --git a/stripe/api_resources/customer.py b/stripe/api_resources/customer.py index 9f1d9a6d8..fca0e4426 100644 --- a/stripe/api_resources/customer.py +++ b/stripe/api_resources/customer.py @@ -80,35 +80,92 @@ class CreateParams(RequestOptions): address: NotRequired[ "Literal['']|Customer.CreateParamsAddress|None" ] + """ + The customer's address. + """ balance: NotRequired["int|None"] + """ + 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|None"] + """ + Balance information and default balance settings for this customer. + """ coupon: NotRequired["str|None"] description: NotRequired["str|None"] + """ + An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. + """ email: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ invoice_prefix: NotRequired["str|None"] + """ + The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + """ invoice_settings: NotRequired[ "Customer.CreateParamsInvoiceSettings|None" ] + """ + Default invoice settings for this customer. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The customer's full name or business name. + """ next_invoice_sequence: NotRequired["int|None"] + """ + The sequence to be used on the customer's next invoice. Defaults to 1. + """ payment_method: NotRequired["str|None"] phone: NotRequired["str|None"] + """ + The customer's phone number. + """ preferred_locales: NotRequired["List[str]|None"] + """ + Customer's preferred languages, ordered by preference. + """ promotion_code: NotRequired["str|None"] + """ + 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|None" ] + """ + The customer's shipping information. Appears on invoices emailed to this customer. + """ source: NotRequired["str|None"] tax: NotRequired["Customer.CreateParamsTax|None"] + """ + Tax details about the customer. + """ tax_exempt: NotRequired[ "Literal['']|Literal['exempt', 'none', 'reverse']|None" ] + """ + The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + """ tax_id_data: NotRequired[ "List[Customer.CreateParamsTaxIdDatum]|None" ] + """ + The customer's tax IDs. + """ test_clock: NotRequired["str|None"] + """ + ID of the test clock to attach to the customer. + """ validate: NotRequired["bool|None"] class CreateParamsTaxIdDatum(TypedDict): @@ -180,74 +237,176 @@ class CreateParamsTaxIdDatum(TypedDict): "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|None"] + """ + 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|None"] + """ + Customer phone (including extension). + """ class CreateParamsShippingAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreateParamsInvoiceSettings(TypedDict): custom_fields: NotRequired[ "Literal['']|List[Customer.CreateParamsInvoiceSettingsCustomField]|None" ] + """ + 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|None"] + """ + 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|None"] + """ + Default footer to be displayed on invoices for this customer. + """ rendering_options: NotRequired[ "Literal['']|Customer.CreateParamsInvoiceSettingsRenderingOptions|None" ] + """ + Default options for invoice PDF rendering for this customer. + """ class CreateParamsInvoiceSettingsRenderingOptions(TypedDict): amount_tax_display: NotRequired[ "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']|None" ] + """ + 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|None" ] + """ + 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']|None" ] + """ + 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 CreateParamsAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ funding_type: Literal["bank_transfer"] + """ + The `funding_type` to get the instructions for. + """ class CreateFundingInstructionsParamsBankTransfer(TypedDict): eu_bank_transfer: NotRequired[ "Customer.CreateFundingInstructionsParamsBankTransferEuBankTransfer|None" ] + """ + Configuration for eu_bank_transfer funding type. + """ requested_address_types: NotRequired[ "List[Literal['iban', 'sort_code', 'spei', 'zengin']]|None" ] + """ + 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", @@ -255,11 +414,17 @@ class CreateFundingInstructionsParamsBankTransfer(TypedDict): "mx_bank_transfer", "us_bank_transfer", ] + """ + The type of the `bank_transfer` + """ 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 DeleteParams(RequestOptions): pass @@ -270,228 +435,605 @@ class DeleteDiscountParams(RequestOptions): class ListParams(RequestOptions): created: NotRequired["Customer.ListParamsCreated|int|None"] email: NotRequired["str|None"] + """ + A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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 ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ListPaymentMethodsParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay', 'zip']|None" ] + """ + 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): address: NotRequired[ "Literal['']|Customer.ModifyParamsAddress|None" ] + """ + The customer's address. + """ balance: NotRequired["int|None"] + """ + 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|None"] + """ + Balance information and default balance settings for this customer. + """ coupon: NotRequired["str|None"] default_source: NotRequired["str|None"] + """ + 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. + + Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. + + 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|None"] + """ + An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. + """ email: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ invoice_prefix: NotRequired["str|None"] + """ + The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + """ invoice_settings: NotRequired[ "Customer.ModifyParamsInvoiceSettings|None" ] + """ + Default invoice settings for this customer. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The customer's full name or business name. + """ next_invoice_sequence: NotRequired["int|None"] + """ + The sequence to be used on the customer's next invoice. Defaults to 1. + """ phone: NotRequired["str|None"] + """ + The customer's phone number. + """ preferred_locales: NotRequired["List[str]|None"] + """ + Customer's preferred languages, ordered by preference. + """ promotion_code: NotRequired["str|None"] + """ + 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|None" ] + """ + The customer's shipping information. Appears on invoices emailed to this customer. + """ source: NotRequired["str|None"] tax: NotRequired["Customer.ModifyParamsTax|None"] + """ + Tax details about the customer. + """ tax_exempt: NotRequired[ "Literal['']|Literal['exempt', 'none', 'reverse']|None" ] + """ + The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + """ validate: NotRequired["bool|None"] class ModifyParamsTax(TypedDict): ip_address: NotRequired["Literal['']|str|None"] + """ + 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 ModifyParamsShipping(TypedDict): address: "Customer.ModifyParamsShippingAddress" + """ + Customer shipping address. + """ name: str + """ + Customer name. + """ phone: NotRequired["str|None"] + """ + Customer phone (including extension). + """ class ModifyParamsShippingAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class ModifyParamsInvoiceSettings(TypedDict): custom_fields: NotRequired[ "Literal['']|List[Customer.ModifyParamsInvoiceSettingsCustomField]|None" ] + """ + 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|None"] + """ + 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|None"] + """ + Default footer to be displayed on invoices for this customer. + """ rendering_options: NotRequired[ "Literal['']|Customer.ModifyParamsInvoiceSettingsRenderingOptions|None" ] + """ + Default options for invoice PDF rendering for this customer. + """ class ModifyParamsInvoiceSettingsRenderingOptions(TypedDict): amount_tax_display: NotRequired[ "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']|None" ] + """ + 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 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 ModifyParamsCashBalance(TypedDict): settings: NotRequired[ "Customer.ModifyParamsCashBalanceSettings|None" ] + """ + Settings controlling the behavior of the customer's cash balance, + such as reconciliation of funds received. + """ class ModifyParamsCashBalanceSettings(TypedDict): reconciliation_mode: NotRequired[ "Literal['automatic', 'manual', 'merchant_default']|None" ] + """ + 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|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class RetrievePaymentMethodParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class SearchParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ settings: NotRequired[ "Customer.ModifyCashBalanceParamsSettings|None" ] + """ + A hash of settings for this cash balance. + """ class ModifyCashBalanceParamsSettings(TypedDict): reconciliation_mode: NotRequired[ "Literal['automatic', 'manual', 'merchant_default']|None" ] + """ + 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 RetrieveCashBalanceParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ reference: NotRequired["str|None"] + """ + 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 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|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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 RetrieveBalanceTransactionParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ModifyBalanceTransactionParams(RequestOptions): description: NotRequired["str|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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 ListBalanceTransactionsParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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 RetrieveCashBalanceTransactionParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ListCashBalanceTransactionsParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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 CreateSourceParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] class RetrieveSourceParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ModifySourceParams(RequestOptions): account_holder_name: NotRequired["str|None"] + """ + The name of the person or business that owns the bank account. + """ account_holder_type: NotRequired[ "Literal['company', 'individual']|None" ] + """ + The type of entity that holds the account. This can be either `individual` or `company`. + """ address_city: NotRequired["str|None"] + """ + City/District/Suburb/Town/Village. + """ address_country: NotRequired["str|None"] + """ + Billing address country, if provided when creating card. + """ address_line1: NotRequired["str|None"] + """ + Address line 1 (Street address/PO Box/Company name). + """ address_line2: NotRequired["str|None"] + """ + Address line 2 (Apartment/Suite/Unit/Building). + """ address_state: NotRequired["str|None"] + """ + State/County/Province/Region. + """ address_zip: NotRequired["str|None"] + """ + ZIP or postal code. + """ exp_month: NotRequired["str|None"] + """ + Two digit number representing the card's expiration month. + """ exp_year: NotRequired["str|None"] + """ + Four digit number representing the card's expiration year. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + Cardholder name. + """ owner: NotRequired["Customer.ModifySourceParamsOwner|None"] class ModifySourceParamsOwner(TypedDict): address: NotRequired[ "Customer.ModifySourceParamsOwnerAddress|None" ] + """ + Owner's address. + """ email: NotRequired["str|None"] + """ + Owner's email address. + """ name: NotRequired["str|None"] + """ + Owner's full name. + """ phone: NotRequired["str|None"] + """ + Owner's phone number. + """ class ModifySourceParamsOwnerAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class DeleteSourceParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ListSourcesParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + Filter sources according to a particular object type. + """ starting_after: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ type: Literal[ "ad_nrt", "ae_trn", @@ -560,53 +1102,161 @@ class CreateTaxIdParams(RequestOptions): "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 RetrieveTaxIdParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class DeleteTaxIdParams(RequestOptions): pass class ListTaxIdsParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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[StripeObject] + """ + The customer's address. + """ balance: Optional[int] + """ + The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. + """ cash_balance: Optional["CashBalance"] + """ + The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ currency: Optional[str] + """ + Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. + """ default_source: Optional[ ExpandableField[Union["Account", "BankAccount", "Card", "Source"]] ] + """ + ID of the default payment source for the customer. + + If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. + """ delinquent: Optional[bool] + """ + Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`. + + If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`. + + If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`. + """ description: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ discount: Optional["Discount"] + """ + Describes the current discount active on the customer, if there is one. + """ email: Optional[str] + """ + The customer's email address. + """ id: str + """ + Unique identifier for the object. + """ invoice_credit_balance: Optional[Dict[str, int]] + """ + The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes. + """ invoice_prefix: Optional[str] + """ + The prefix for the customer used to generate unique invoice numbers. + """ invoice_settings: Optional[StripeObject] livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ name: Optional[str] + """ + The customer's full name or business name. + """ next_invoice_sequence: Optional[int] + """ + The suffix of the customer's next invoice number (for example, 0001). + """ object: Literal["customer"] + """ + String representing the object's type. Objects of the same type share the same value. + """ phone: Optional[str] + """ + The customer's phone number. + """ preferred_locales: Optional[List[str]] + """ + The customer's preferred locales (languages), ordered by preference. + """ shipping: Optional[StripeObject] + """ + Mailing and shipping address for the customer. Appears on invoices emailed to this customer. + """ sources: Optional[ ListObject[Union["Account", "BankAccount", "Card", "Source"]] ] + """ + The customer's payment sources, if any. + """ subscriptions: Optional[ListObject["Subscription"]] + """ + The customer's current subscriptions, if any. + """ tax: Optional[StripeObject] tax_exempt: Optional[Literal["exempt", "none", "reverse"]] + """ + Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**. + """ tax_ids: Optional[ListObject["TaxId"]] + """ + The customer's tax IDs. + """ test_clock: Optional[ExpandableField["TestClock"]] + """ + ID of the test clock that this customer belongs to. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def create( diff --git a/stripe/api_resources/customer_balance_transaction.py b/stripe/api_resources/customer_balance_transaction.py index 8180413a5..46182a0e0 100644 --- a/stripe/api_resources/customer_balance_transaction.py +++ b/stripe/api_resources/customer_balance_transaction.py @@ -26,17 +26,53 @@ class CustomerBalanceTransaction(APIResource["CustomerBalanceTransaction"]): Literal["customer_balance_transaction"] ] = "customer_balance_transaction" amount: int + """ + The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ credit_note: Optional[ExpandableField["CreditNote"]] + """ + The ID of the credit note (if any) related to the transaction. + """ 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: ExpandableField["Customer"] + """ + The ID of the customer the transaction belongs to. + """ description: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ ending_balance: int + """ + The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. + """ id: str + """ + Unique identifier for the object. + """ invoice: Optional[ExpandableField["Invoice"]] + """ + The ID of the invoice (if any) related to the transaction. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["customer_balance_transaction"] + """ + String representing the object's type. Objects of the same type share the same value. + """ type: Literal[ "adjustment", "applied_to_invoice", @@ -49,6 +85,9 @@ class CustomerBalanceTransaction(APIResource["CustomerBalanceTransaction"]): "unapplied_from_invoice", "unspent_receiver_credit", ] + """ + Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. + """ def instance_url(self): token = self.id diff --git a/stripe/api_resources/customer_cash_balance_transaction.py b/stripe/api_resources/customer_cash_balance_transaction.py index 6c53cee89..b3bc46e4b 100644 --- a/stripe/api_resources/customer_cash_balance_transaction.py +++ b/stripe/api_resources/customer_cash_balance_transaction.py @@ -29,24 +29,63 @@ class CustomerCashBalanceTransaction( class ListParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ adjusted_for_overdraft: Optional[StripeObject] applied_to_payment: Optional[StripeObject] created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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: ExpandableField["Customer"] + """ + The customer whose available cash balance changed as a result of this transaction. + """ ending_balance: int + """ + The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ funded: Optional[StripeObject] id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ net_amount: int + """ + The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. + """ object: Literal["customer_cash_balance_transaction"] + """ + String representing the object's type. Objects of the same type share the same value. + """ refunded_from_payment: Optional[StripeObject] type: Literal[ "adjusted_for_overdraft", @@ -58,6 +97,9 @@ class RetrieveParams(RequestOptions): "return_initiated", "unapplied_from_payment", ] + """ + The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. + """ unapplied_from_payment: Optional[StripeObject] @classmethod diff --git a/stripe/api_resources/discount.py b/stripe/api_resources/discount.py index c54a9dbac..9df91fb3a 100644 --- a/stripe/api_resources/discount.py +++ b/stripe/api_resources/discount.py @@ -21,14 +21,52 @@ class Discount(StripeObject): OBJECT_NAME: ClassVar[Literal["discount"]] = "discount" checkout_session: Optional[str] + """ + The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. + """ coupon: "Coupon" + """ + A coupon contains information about a percent-off or amount-off discount you + might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + """ customer: Optional[ExpandableField["Customer"]] + """ + The ID of the customer associated with this discount. + """ end: Optional[int] + """ + If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. + """ id: str + """ + The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. + """ invoice: Optional[str] + """ + The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. + """ invoice_item: Optional[str] + """ + The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. + """ object: Literal["discount"] + """ + String representing the object's type. Objects of the same type share the same value. + """ promotion_code: Optional[ExpandableField["PromotionCode"]] + """ + The promotion code applied to create this discount. + """ start: int + """ + Date that the coupon was applied. + """ subscription: Optional[str] + """ + The subscription that this coupon is applied to, if it is applied to a particular subscription. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ diff --git a/stripe/api_resources/dispute.py b/stripe/api_resources/dispute.py index 660f08e38..6578ca33d 100644 --- a/stripe/api_resources/dispute.py +++ b/stripe/api_resources/dispute.py @@ -42,76 +42,244 @@ class Dispute( class CloseParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ListParams(RequestOptions): charge: NotRequired["str|None"] + """ + Only return disputes associated to the charge specified by this charge ID. + """ created: NotRequired["Dispute.ListParamsCreated|int|None"] ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. + """ starting_after: NotRequired["str|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): evidence: NotRequired["Dispute.ModifyParamsEvidence|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + The billing address provided by the customer. + """ cancellation_policy: NotRequired["str|None"] + """ + (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|None"] + """ + 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|None"] + """ + A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000. + """ customer_communication: NotRequired["str|None"] + """ + (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|None"] + """ + The email address of the customer. + """ customer_name: NotRequired["str|None"] + """ + The name of the customer. + """ customer_purchase_ip: NotRequired["str|None"] + """ + The IP address that the customer used when making the purchase. + """ customer_signature: NotRequired["str|None"] + """ + (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|None"] + """ + (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|None"] + """ + 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|None"] + """ + The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. + """ product_description: NotRequired["str|None"] + """ + A description of the product or service that was sold. Has a maximum character count of 20,000. + """ receipt: NotRequired["str|None"] + """ + (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|None"] + """ + (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|None"] + """ + 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|None"] + """ + A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000. + """ service_date: NotRequired["str|None"] + """ + The date on which the customer received or began receiving the purchased service, in a clear human-readable format. + """ service_documentation: NotRequired["str|None"] + """ + (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|None"] + """ + The address to which a physical product was shipped. You should try to include as complete address information as possible. + """ shipping_carrier: NotRequired["str|None"] + """ + 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|None"] + """ + The date on which a physical product began its route to the shipping address, in a clear human-readable format. + """ shipping_documentation: NotRequired["str|None"] + """ + (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|None"] + """ + 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|None"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. + """ uncategorized_text: NotRequired["str|None"] + """ + Any additional evidence or statements. Has a maximum character count of 20,000. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ amount: int + """ + Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). + """ balance_transactions: List["BalanceTransaction"] + """ + List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. + """ charge: ExpandableField["Charge"] + """ + ID of the charge that's disputed. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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). + """ evidence: StripeObject evidence_details: StripeObject id: str + """ + Unique identifier for the object. + """ is_charge_refundable: bool + """ + If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ network_reason_code: Optional[str] + """ + Network-dependent reason code for the dispute. + """ object: Literal["dispute"] + """ + String representing the object's type. Objects of the same type share the same value. + """ payment_intent: Optional[ExpandableField["PaymentIntent"]] + """ + ID of the PaymentIntent that's disputed. + """ payment_method_details: Optional[StripeObject] reason: str + """ + Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories). + """ status: Literal[ "lost", "needs_response", @@ -121,6 +289,9 @@ class RetrieveParams(RequestOptions): "warning_under_review", "won", ] + """ + Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`. + """ @classmethod def _cls_close( diff --git a/stripe/api_resources/ephemeral_key.py b/stripe/api_resources/ephemeral_key.py index f0a20a9e8..aa2808918 100644 --- a/stripe/api_resources/ephemeral_key.py +++ b/stripe/api_resources/ephemeral_key.py @@ -15,13 +15,34 @@ class EphemeralKey(DeletableAPIResource["EphemeralKey"]): class DeleteParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ expires: int + """ + Time at which the key will expire. Measured in seconds since the Unix epoch. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["ephemeral_key"] + """ + String representing the object's type. Objects of the same type share the same value. + """ secret: Optional[str] + """ + The key's secret. You can use this value to make authorized requests to the Stripe API. + """ @classmethod def _cls_delete( diff --git a/stripe/api_resources/event.py b/stripe/api_resources/event.py index b162631ce..7d2aa248c 100644 --- a/stripe/api_resources/event.py +++ b/stripe/api_resources/event.py @@ -54,31 +54,91 @@ class Event(ListableAPIResource["Event"]): class ListParams(RequestOptions): created: NotRequired["Event.ListParamsCreated|int|None"] delivery_success: NotRequired["bool|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ account: Optional[str] + """ + The connected account that originates the event. + """ api_version: Optional[str] + """ + The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ data: StripeObject id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["event"] + """ + String representing the object's type. Objects of the same type share the same value. + """ pending_webhooks: int + """ + Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. + """ request: Optional[StripeObject] + """ + Information on the API request that triggers the event. + """ type: Literal[ "account.application.authorized", "account.application.deauthorized", @@ -306,6 +366,9 @@ class RetrieveParams(RequestOptions): "sku.deleted", "sku.updated", ] + """ + Description of the event (for example, `invoice.created` or `charge.refunded`). + """ @classmethod def list( diff --git a/stripe/api_resources/exchange_rate.py b/stripe/api_resources/exchange_rate.py index ba14e03b5..75aceedce 100644 --- a/stripe/api_resources/exchange_rate.py +++ b/stripe/api_resources/exchange_rate.py @@ -27,16 +27,40 @@ class ExchangeRate(ListableAPIResource["ExchangeRate"]): class ListParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ id: str + """ + Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. + """ object: Literal["exchange_rate"] + """ + String representing the object's type. Objects of the same type share the same value. + """ rates: Dict[str, float] + """ + Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. + """ @classmethod def list( diff --git a/stripe/api_resources/file.py b/stripe/api_resources/file.py index 670a7e4fd..cc9c0bcbc 100644 --- a/stripe/api_resources/file.py +++ b/stripe/api_resources/file.py @@ -35,28 +35,76 @@ class File(ListableAPIResource["File"]): class ListParams(RequestOptions): created: NotRequired["File.ListParamsCreated|int|None"] ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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']|None" ] + """ + Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files. + """ starting_after: NotRequired["str|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ expires_at: Optional[int] + """ + The file expires and isn't available at this time in epoch seconds. + """ filename: Optional[str] + """ + The suitable name for saving the file to a filesystem. + """ id: str + """ + Unique identifier for the object. + """ links: Optional[ListObject["FileLink"]] + """ + A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. + """ object: Literal["file"] + """ + String representing the object's type. Objects of the same type share the same value. + """ purpose: Literal[ "account_requirement", "additional_verification", @@ -74,10 +122,25 @@ class RetrieveParams(RequestOptions): "tax_document_user_upload", "terminal_reader_splashscreen", ] + """ + The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + """ size: int + """ + The size of the file object in bytes. + """ title: Optional[str] + """ + A suitable title for the document. + """ type: Optional[str] + """ + The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). + """ url: Optional[str] + """ + Use your live secret API key to download the file from this URL. + """ @classmethod def list( diff --git a/stripe/api_resources/file_link.py b/stripe/api_resources/file_link.py index d03dd2429..b8887a3dd 100644 --- a/stripe/api_resources/file_link.py +++ b/stripe/api_resources/file_link.py @@ -38,42 +38,123 @@ class FileLink( class CreateParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ expires_at: NotRequired["int|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ expired: NotRequired["bool|None"] + """ + Filter links by their expiration status. By default, Stripe returns all links. + """ file: NotRequired["str|None"] + """ + Only return links for the given file. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ expires_at: NotRequired["Literal['']|Literal['now']|int|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ expired: bool + """ + Returns if the link is already expired. + """ expires_at: Optional[int] + """ + Time that the link expires. + """ file: ExpandableField["File"] + """ + The file object this link points to. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["file_link"] + """ + String representing the object's type. Objects of the same type share the same value. + """ url: Optional[str] + """ + The publicly accessible URL to download the file. + """ @classmethod def create( diff --git a/stripe/api_resources/financial_connections/account.py b/stripe/api_resources/financial_connections/account.py index 0be7ca296..7c55ce9b9 100644 --- a/stripe/api_resources/financial_connections/account.py +++ b/stripe/api_resources/financial_connections/account.py @@ -37,52 +37,148 @@ class Account(ListableAPIResource["Account"]): class DisconnectParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ListParams(RequestOptions): account_holder: NotRequired["Account.ListParamsAccountHolder|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + If present, only return accounts that were collected as part of the given session. + """ starting_after: NotRequired["str|None"] + """ + 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|None"] + """ + The ID of the Stripe account whose accounts will be retrieved. + """ customer: NotRequired["str|None"] + """ + The ID of the Stripe customer whose accounts will be retrieved. + """ class ListOwnersParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ account_holder: Optional[StripeObject] + """ + The account holder that this account belongs to. + """ balance: Optional[StripeObject] + """ + The most recent information about the account's balance. + """ balance_refresh: Optional[StripeObject] + """ + The state of the most recent attempt to refresh the account balance. + """ category: Literal["cash", "credit", "investment", "other"] + """ + The type of the account. Account category is further divided in `subcategory`. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ display_name: Optional[str] + """ + A human-readable name that has been assigned to this account, either by the account holder or by the institution. + """ id: str + """ + Unique identifier for the object. + """ institution_name: str + """ + The name of the institution that holds this account. + """ last4: Optional[str] + """ + The last 4 digits of the account number. If present, this will be 4 numeric characters. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["financial_connections.account"] + """ + String representing the object's type. Objects of the same type share the same value. + """ ownership: Optional[ExpandableField["AccountOwnership"]] + """ + The most recent information about the account's owners. + """ ownership_refresh: Optional[StripeObject] + """ + The state of the most recent attempt to refresh the account owners. + """ permissions: Optional[ List[ Literal["balances", "ownership", "payment_method", "transactions"] ] ] + """ + The list of permissions granted by this account. + """ status: Literal["active", "disconnected", "inactive"] + """ + The status of the link to the account. + """ subcategory: Literal[ "checking", "credit_card", @@ -91,7 +187,26 @@ class RetrieveParams(RequestOptions): "other", "savings", ] + """ + If `category` is `cash`, one of: + + - `checking` + - `savings` + - `other` + + If `category` is `credit`, one of: + + - `mortgage` + - `line_of_credit` + - `credit_card` + - `other` + + If `category` is `investment` or `other`, this will be `other`. + """ supported_payment_method_types: List[Literal["link", "us_bank_account"]] + """ + The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. + """ @classmethod def _cls_disconnect( diff --git a/stripe/api_resources/financial_connections/account_owner.py b/stripe/api_resources/financial_connections/account_owner.py index 58869d1c4..44dbb7a53 100644 --- a/stripe/api_resources/financial_connections/account_owner.py +++ b/stripe/api_resources/financial_connections/account_owner.py @@ -14,10 +14,34 @@ class AccountOwner(StripeObject): Literal["financial_connections.account_owner"] ] = "financial_connections.account_owner" email: Optional[str] + """ + The email address of the owner. + """ id: str + """ + Unique identifier for the object. + """ name: str + """ + The full name of the owner. + """ object: Literal["financial_connections.account_owner"] + """ + String representing the object's type. Objects of the same type share the same value. + """ ownership: str + """ + The ownership object that this owner belongs to. + """ phone: Optional[str] + """ + The raw phone number of the owner. + """ raw_address: Optional[str] + """ + The raw physical address of the owner. + """ refreshed_at: Optional[int] + """ + The timestamp of the refresh that updated this owner. + """ diff --git a/stripe/api_resources/financial_connections/account_ownership.py b/stripe/api_resources/financial_connections/account_ownership.py index 97b49320c..a95ba8984 100644 --- a/stripe/api_resources/financial_connections/account_ownership.py +++ b/stripe/api_resources/financial_connections/account_ownership.py @@ -20,6 +20,18 @@ class AccountOwnership(StripeObject): Literal["financial_connections.account_ownership"] ] = "financial_connections.account_ownership" created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ id: str + """ + Unique identifier for the object. + """ object: Literal["financial_connections.account_ownership"] + """ + String representing the object's type. Objects of the same type share the same value. + """ owners: ListObject["AccountOwner"] + """ + A paginated list of owners for this account. + """ diff --git a/stripe/api_resources/financial_connections/session.py b/stripe/api_resources/financial_connections/session.py index 963ebeb67..ea42fca7e 100644 --- a/stripe/api_resources/financial_connections/session.py +++ b/stripe/api_resources/financial_connections/session.py @@ -29,41 +29,103 @@ class Session(CreateableAPIResource["Session"]): class CreateParams(RequestOptions): account_holder: "Session.CreateParamsAccountHolder" + """ + The account holder to link accounts for. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ filters: NotRequired["Session.CreateParamsFilters|None"] + """ + 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']]|None" ] + """ + List of data features that you would like to retrieve upon account creation. + """ return_url: NotRequired["str|None"] + """ + 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 CreateParamsAccountHolder(TypedDict): account: NotRequired["str|None"] + """ + The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`. + """ customer: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ account_holder: Optional[StripeObject] + """ + The account holder for whom accounts are collected in this session. + """ accounts: ListObject["Account"] + """ + The accounts that were collected as part of this Session. + """ client_secret: str + """ + A value that will be passed to the client to launch the authentication flow. + """ filters: Optional[StripeObject] id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["financial_connections.session"] + """ + String representing the object's type. Objects of the same type share the same value. + """ permissions: List[ Literal["balances", "ownership", "payment_method", "transactions"] ] + """ + Permissions requested for accounts collected during this session. + """ prefetch: Optional[List[Literal["balances", "ownership"]]] + """ + Data features requested to be retrieved upon account creation. + """ return_url: Optional[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. + """ @classmethod def create( diff --git a/stripe/api_resources/funding_instructions.py b/stripe/api_resources/funding_instructions.py index 312b912cb..162e28984 100644 --- a/stripe/api_resources/funding_instructions.py +++ b/stripe/api_resources/funding_instructions.py @@ -19,6 +19,18 @@ class FundingInstructions(StripeObject): ] = "funding_instructions" bank_transfer: StripeObject currency: str + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ funding_type: Literal["bank_transfer"] + """ + The `funding_type` of the returned instructions + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["funding_instructions"] + """ + String representing the object's type. Objects of the same type share the same value. + """ diff --git a/stripe/api_resources/identity/verification_report.py b/stripe/api_resources/identity/verification_report.py index 8af343eec..bc6f26d97 100644 --- a/stripe/api_resources/identity/verification_report.py +++ b/stripe/api_resources/identity/verification_report.py @@ -39,31 +39,91 @@ class ListParams(RequestOptions): "VerificationReport.ListParamsCreated|int|None" ] ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None"] + """ + Only return VerificationReports of this type + """ verification_session: NotRequired["str|None"] + """ + Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID. + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ document: Optional[StripeObject] + """ + Result from a document check + """ id: str + """ + Unique identifier for the object. + """ id_number: Optional[StripeObject] + """ + Result from an id_number check + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["identity.verification_report"] + """ + String representing the object's type. Objects of the same type share the same value. + """ options: Optional[StripeObject] selfie: Optional[StripeObject] + """ + Result from a selfie check + """ type: Optional[Literal["document", "id_number"]] + """ + Type of report. + """ verification_session: Optional[str] + """ + ID of the VerificationSession that created this report. + """ @classmethod def list( diff --git a/stripe/api_resources/identity/verification_session.py b/stripe/api_resources/identity/verification_session.py index c8bbf859f..fb1ebbb8b 100644 --- a/stripe/api_resources/identity/verification_session.py +++ b/stripe/api_resources/identity/verification_session.py @@ -53,88 +53,223 @@ class VerificationSession( class CancelParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class CreateParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + A set of options for the session's verification checks. + """ return_url: NotRequired["str|None"] + """ + 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|None" ] + """ + 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']]|None" ] + """ + 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|None"] + """ + 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|None"] + """ + Disable image uploads, identity document images have to be captured using the device's camera. + """ require_matching_selfie: NotRequired["bool|None"] + """ + 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|None" ] ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + A set of options for the session's verification checks. + """ type: NotRequired["Literal['document', 'id_number']|None"] + """ + The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + """ class ModifyParamsOptions(TypedDict): document: NotRequired[ "Literal['']|VerificationSession.ModifyParamsOptionsDocument|None" ] + """ + 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']]|None" ] + """ + 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|None"] + """ + 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|None"] + """ + Disable image uploads, identity document images have to be captured using the device's camera. + """ require_matching_selfie: NotRequired["bool|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ client_secret: Optional[str] + """ + The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don't store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ id: str + """ + Unique identifier for the object. + """ last_error: Optional[StripeObject] + """ + If present, this property tells you the last error encountered when processing the verification. + """ last_verification_report: Optional[ExpandableField["VerificationReport"]] + """ + ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["identity.verification_session"] + """ + String representing the object's type. Objects of the same type share the same value. + """ options: Optional[StripeObject] + """ + A set of options for the session's verification checks. + """ redaction: Optional[StripeObject] + """ + Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. + """ status: Literal["canceled", "processing", "requires_input", "verified"] + """ + Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). + """ type: Optional[Literal["document", "id_number"]] + """ + The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + """ url: Optional[str] + """ + The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don't store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. + """ verified_outputs: Optional[StripeObject] + """ + The user's verified data. + """ @classmethod def _cls_cancel( diff --git a/stripe/api_resources/invoice.py b/stripe/api_resources/invoice.py index 58f9024c3..98ddf4322 100644 --- a/stripe/api_resources/invoice.py +++ b/stripe/api_resources/invoice.py @@ -99,102 +99,267 @@ class Invoice( class CreateParams(RequestOptions): account_tax_ids: NotRequired["Literal['']|List[str]|None"] + """ + The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + """ application_fee_amount: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Settings for automatic tax lookup for this invoice. + """ collection_method: NotRequired[ "Literal['charge_automatically', 'send_invoice']|None" ] + """ + 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|None"] + """ + The currency to create this invoice in. Defaults to that of `customer` if not specified. + """ custom_fields: NotRequired[ "Literal['']|List[Invoice.CreateParamsCustomField]|None" ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ customer: NotRequired["str|None"] + """ + The ID of the customer who will be billed. + """ days_until_due: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + The tax rates that will apply to any line item that does not have `tax_rates` set. + """ description: NotRequired["str|None"] + """ + 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]|None" ] + """ + 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|None"] + """ + The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. + """ effective_at: NotRequired["int|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ footer: NotRequired["str|None"] + """ + Footer to be displayed on the invoice. + """ from_invoice: NotRequired["Invoice.CreateParamsFromInvoice|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None" ] + """ + Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + """ pending_invoice_items_behavior: NotRequired[ "Literal['exclude', 'include', 'include_and_require']|None" ] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None"] + """ + Settings for the cost of shipping for this invoice. + """ shipping_details: NotRequired[ "Invoice.CreateParamsShippingDetails|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + Recipient phone (including extension) + """ class CreateParamsShippingDetailsAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreateParamsShippingCost(TypedDict): shipping_rate: NotRequired["str|None"] + """ + The ID of the shipping rate to use for this order. + """ shipping_rate_data: NotRequired[ "Invoice.CreateParamsShippingCostShippingRateData|None" ] + """ + Parameters to create a new ad-hoc shipping rate for this order. + """ class CreateParamsShippingCostShippingRateData(TypedDict): delivery_estimate: NotRequired[ "Invoice.CreateParamsShippingCostShippingRateDataDeliveryEstimate|None" ] + """ + 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|None" ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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']|None" ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ tax_code: NotRequired["str|None"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ type: NotRequired["Literal['fixed_amount']|None"] + """ + 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]|None" ] + """ + 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']|None" ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ class CreateParamsShippingCostShippingRateDataDeliveryEstimate( TypedDict, @@ -202,64 +367,123 @@ class CreateParamsShippingCostShippingRateDataDeliveryEstimate( maximum: NotRequired[ "Invoice.CreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum|None" ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ minimum: NotRequired[ "Invoice.CreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum|None" ] + """ + 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 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']|None" ] + """ + 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']|None" ] + """ + 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|None"] + """ + Invoice pdf rendering options + """ class CreateParamsRenderingPdf(TypedDict): page_size: NotRequired["Literal['a4', 'auto', 'letter']|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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']]|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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, @@ -267,9 +491,15 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( financial_connections: NotRequired[ "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections|None" ] + """ + Additional fields for Financial Connections Session creation + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, @@ -277,7 +507,13 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne permissions: NotRequired[ "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]|None" ] + """ + 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']]|None"] + """ + List of data features that you would like to retrieve upon account creation. + """ class CreateParamsPaymentSettingsPaymentMethodOptionsKonbini( TypedDict @@ -290,7 +526,13 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( bank_transfer: NotRequired[ "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer|None" ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ funding_type: NotRequired["str|None"] + """ + 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, @@ -298,35 +540,69 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer eu_bank_transfer: NotRequired[ "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer|None" ] + """ + Configuration for eu_bank_transfer funding type. + """ type: NotRequired["str|None"] + """ + 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 CreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): installments: NotRequired[ "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallments|None" ] + """ + 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']|None" ] + """ + 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|None"] + """ + 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|None" ] + """ + 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 CreateParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict, @@ -334,6 +610,9 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsBancontact( preferred_language: NotRequired[ "Literal['de', 'en', 'fr', 'nl']|None" ] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( TypedDict, @@ -341,9 +620,15 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( mandate_options: NotRequired[ "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions|None" ] + """ + Additional fields for Mandate creation + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, @@ -351,155 +636,386 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( transaction_type: NotRequired[ "Literal['business', 'personal']|None" ] + """ + 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 CreateParamsDiscount(TypedDict): coupon: NotRequired["str|None"] + """ + ID of the coupon to create a new discount for. + """ discount: NotRequired["str|None"] + """ + 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 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 FinalizeInvoiceParams(RequestOptions): auto_advance: NotRequired["bool|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ListParams(RequestOptions): collection_method: NotRequired[ "Literal['charge_automatically', 'send_invoice']|None" ] + """ + The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. + """ created: NotRequired["Invoice.ListParamsCreated|int|None"] customer: NotRequired["str|None"] + """ + Only return invoices for the customer specified by this customer ID. + """ due_date: NotRequired["Invoice.ListParamsDueDate|int|None"] ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + Only return invoices for the subscription specified by this subscription ID. + """ class ListParamsDueDate(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class MarkUncollectibleParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ModifyParams(RequestOptions): account_tax_ids: NotRequired["Literal['']|List[str]|None"] + """ + The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + """ application_fee_amount: NotRequired["int|None"] + """ + 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|None"] + """ + Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. + """ automatic_tax: NotRequired["Invoice.ModifyParamsAutomaticTax|None"] + """ + Settings for automatic tax lookup for this invoice. + """ collection_method: NotRequired[ "Literal['charge_automatically', 'send_invoice']|None" ] + """ + Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. + """ custom_fields: NotRequired[ "Literal['']|List[Invoice.ModifyParamsCustomField]|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + 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|None"] + """ + 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]|None" ] + """ + The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts. + """ due_date: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ footer: NotRequired["str|None"] + """ + Footer to be displayed on the invoice. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None" ] + """ + Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + """ rendering: NotRequired["Invoice.ModifyParamsRendering|None"] + """ + 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|None" ] + """ + 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|None" ] + """ + Settings for the cost of shipping for this invoice. + """ shipping_details: NotRequired[ "Literal['']|Invoice.ModifyParamsShippingDetails|None" ] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + Recipient phone (including extension) + """ class ModifyParamsShippingDetailsAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class ModifyParamsShippingCost(TypedDict): shipping_rate: NotRequired["str|None"] + """ + The ID of the shipping rate to use for this order. + """ shipping_rate_data: NotRequired[ "Invoice.ModifyParamsShippingCostShippingRateData|None" ] + """ + Parameters to create a new ad-hoc shipping rate for this order. + """ class ModifyParamsShippingCostShippingRateData(TypedDict): delivery_estimate: NotRequired[ "Invoice.ModifyParamsShippingCostShippingRateDataDeliveryEstimate|None" ] + """ + 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|None" ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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']|None" ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ tax_code: NotRequired["str|None"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ type: NotRequired["Literal['fixed_amount']|None"] + """ + 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]|None" ] + """ + 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']|None" ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ class ModifyParamsShippingCostShippingRateDataDeliveryEstimate( TypedDict, @@ -507,64 +1023,123 @@ class ModifyParamsShippingCostShippingRateDataDeliveryEstimate( maximum: NotRequired[ "Invoice.ModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum|None" ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ minimum: NotRequired[ "Invoice.ModifyParamsShippingCostShippingRateDataDeliveryEstimateMinimum|None" ] + """ + 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 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']|None" ] + """ + 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']|None" ] + """ + 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|None"] + """ + Invoice pdf rendering options + """ class ModifyParamsRenderingPdf(TypedDict): page_size: NotRequired["Literal['a4', 'auto', 'letter']|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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']]|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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, @@ -572,9 +1147,15 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( financial_connections: NotRequired[ "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections|None" ] + """ + Additional fields for Financial Connections Session creation + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, @@ -582,7 +1163,13 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne permissions: NotRequired[ "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]|None" ] + """ + 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']]|None"] + """ + List of data features that you would like to retrieve upon account creation. + """ class ModifyParamsPaymentSettingsPaymentMethodOptionsKonbini( TypedDict @@ -595,7 +1182,13 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( bank_transfer: NotRequired[ "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer|None" ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ funding_type: NotRequired["str|None"] + """ + 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, @@ -603,35 +1196,69 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer eu_bank_transfer: NotRequired[ "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer|None" ] + """ + Configuration for eu_bank_transfer funding type. + """ type: NotRequired["str|None"] + """ + 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 ModifyParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): installments: NotRequired[ "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallments|None" ] + """ + 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']|None" ] + """ + 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|None"] + """ + 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|None" ] + """ + 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 ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict, @@ -639,6 +1266,9 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( preferred_language: NotRequired[ "Literal['de', 'en', 'fr', 'nl']|None" ] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit( TypedDict, @@ -646,9 +1276,15 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit( mandate_options: NotRequired[ "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions|None" ] + """ + Additional fields for Mandate creation + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, @@ -656,165 +1292,431 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( transaction_type: NotRequired[ "Literal['business', 'personal']|None" ] + """ + Transaction type of the mandate. + """ class ModifyParamsDiscount(TypedDict): coupon: NotRequired["str|None"] + """ + ID of the coupon to create a new discount for. + """ discount: NotRequired["str|None"] + """ + 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 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ forgive: NotRequired["bool|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class SendInvoiceParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class UpcomingParams(RequestOptions): automatic_tax: NotRequired[ "Invoice.UpcomingParamsAutomaticTax|None" ] + """ + Settings for automatic tax lookup for this invoice preview. + """ coupon: NotRequired["str|None"] + """ + 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|None"] + """ + The currency to preview this invoice in. Defaults to that of `customer` if not specified. + """ customer: NotRequired["str|None"] + """ + 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|None" ] + """ + 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]|None" ] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ invoice_items: NotRequired[ "List[Invoice.UpcomingParamsInvoiceItem]|None" ] + """ + List of invoice items to add or update in the upcoming invoice preview. + """ schedule: NotRequired["str|None"] + """ + The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. + """ subscription: NotRequired["str|None"] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + Boolean indicating whether this subscription should cancel at the end of the current period. + """ subscription_cancel_now: NotRequired["bool|None"] + """ + This simulates the subscription being canceled or expired immediately. + """ subscription_default_tax_rates: NotRequired[ "Literal['']|List[str]|None" ] + """ + 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]|None" ] + """ + A list of up to 20 subscription items, each with an attached price. + """ subscription_proration_behavior: NotRequired[ "Literal['always_invoice', 'create_prorations', 'none']|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|None"] + """ + 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']|None"] + """ + 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|None"] + """ + Date a subscription is intended to start (can be future or past) + """ subscription_trial_end: NotRequired["Literal['now']|int|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + A flag that, if set to `true`, will delete the specified item. + """ id: NotRequired["str|None"] + """ + Subscription item to update. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + Plan ID for this item, as a string. + """ price: NotRequired["str|None"] + """ + 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|None" ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ quantity: NotRequired["int|None"] + """ + Quantity for this item. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + 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 UpcomingParamsInvoiceItem(TypedDict): amount: NotRequired["int|None"] + """ + The integer amount in cents (or local equivalent) of previewed invoice item. + """ currency: NotRequired["str|None"] + """ + 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|None"] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ discountable: NotRequired["bool|None"] + """ + Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + """ discounts: NotRequired[ "Literal['']|List[Invoice.UpcomingParamsInvoiceItemDiscount]|None" ] + """ + The coupons to redeem into discounts for the invoice item in the preview. + """ invoiceitem: NotRequired["str|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + The ID of the price object. + """ price_data: NotRequired[ "Invoice.UpcomingParamsInvoiceItemPriceData|None" ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ quantity: NotRequired["int|None"] + """ + Non-negative integer. The quantity of units for the invoice item. + """ tax_behavior: NotRequired[ "Literal['exclusive', 'inclusive', 'unspecified']|None" ] + """ + 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|None"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + """ unit_amount: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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 UpcomingParamsInvoiceItemDiscount(TypedDict): coupon: NotRequired["str|None"] + """ + ID of the coupon to create a new discount for. + """ discount: NotRequired["str|None"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ class UpcomingParamsDiscount(TypedDict): coupon: NotRequired["str|None"] + """ + ID of the coupon to create a new discount for. + """ discount: NotRequired["str|None"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ class UpcomingParamsCustomerDetails(TypedDict): address: NotRequired[ "Literal['']|Invoice.UpcomingParamsCustomerDetailsAddress|None" ] + """ + The customer's address. + """ shipping: NotRequired[ "Literal['']|Invoice.UpcomingParamsCustomerDetailsShipping|None" ] + """ + The customer's shipping information. Appears on invoices emailed to this customer. + """ tax: NotRequired["Invoice.UpcomingParamsCustomerDetailsTax|None"] + """ + Tax details about the customer. + """ tax_exempt: NotRequired[ "Literal['']|Literal['exempt', 'none', 'reverse']|None" ] + """ + The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + """ tax_ids: NotRequired[ "List[Invoice.UpcomingParamsCustomerDetailsTaxId]|None" ] + """ + The customer's tax IDs. + """ class UpcomingParamsCustomerDetailsTaxId(TypedDict): type: Literal[ @@ -885,174 +1787,459 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "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 UpcomingParamsCustomerDetailsTax(TypedDict): ip_address: NotRequired["Literal['']|str|None"] + """ + 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 UpcomingParamsCustomerDetailsShipping(TypedDict): address: "Invoice.UpcomingParamsCustomerDetailsShippingAddress" + """ + Customer shipping address. + """ name: str + """ + Customer name. + """ phone: NotRequired["str|None"] + """ + Customer phone (including extension). + """ class UpcomingParamsCustomerDetailsShippingAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class UpcomingParamsCustomerDetailsAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + 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 UpcomingLinesParams(RequestOptions): automatic_tax: NotRequired[ "Invoice.UpcomingLinesParamsAutomaticTax|None" ] + """ + Settings for automatic tax lookup for this invoice preview. + """ coupon: NotRequired["str|None"] + """ + 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|None"] + """ + The currency to preview this invoice in. Defaults to that of `customer` if not specified. + """ customer: NotRequired["str|None"] + """ + 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|None" ] + """ + 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]|None" ] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ invoice_items: NotRequired[ "List[Invoice.UpcomingLinesParamsInvoiceItem]|None" ] + """ + List of invoice items to add or update in the upcoming invoice preview. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + Boolean indicating whether this subscription should cancel at the end of the current period. + """ subscription_cancel_now: NotRequired["bool|None"] + """ + This simulates the subscription being canceled or expired immediately. + """ subscription_default_tax_rates: NotRequired[ "Literal['']|List[str]|None" ] + """ + 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]|None" ] + """ + A list of up to 20 subscription items, each with an attached price. + """ subscription_proration_behavior: NotRequired[ "Literal['always_invoice', 'create_prorations', 'none']|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|None"] + """ + 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']|None"] + """ + 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|None"] + """ + Date a subscription is intended to start (can be future or past) + """ subscription_trial_end: NotRequired["Literal['now']|int|None"] + """ + 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|None"] + """ + 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 UpcomingLinesParamsSubscriptionItem(TypedDict): billing_thresholds: NotRequired[ "Literal['']|Invoice.UpcomingLinesParamsSubscriptionItemBillingThresholds|None" ] + """ + 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|None"] + """ + 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|None"] + """ + A flag that, if set to `true`, will delete the specified item. + """ id: NotRequired["str|None"] + """ + Subscription item to update. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + Plan ID for this item, as a string. + """ price: NotRequired["str|None"] + """ + 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|None" ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ quantity: NotRequired["int|None"] + """ + Quantity for this item. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + 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 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']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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 UpcomingLinesParamsSubscriptionItemPriceDataRecurring(TypedDict): interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ interval_count: NotRequired["int|None"] + """ + 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 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 UpcomingLinesParamsInvoiceItem(TypedDict): amount: NotRequired["int|None"] + """ + The integer amount in cents (or local equivalent) of previewed invoice item. + """ currency: NotRequired["str|None"] + """ + 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|None"] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ discountable: NotRequired["bool|None"] + """ + Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + """ discounts: NotRequired[ "Literal['']|List[Invoice.UpcomingLinesParamsInvoiceItemDiscount]|None" ] + """ + The coupons to redeem into discounts for the invoice item in the preview. + """ invoiceitem: NotRequired["str|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + 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|None"] + """ + The ID of the price object. + """ price_data: NotRequired[ "Invoice.UpcomingLinesParamsInvoiceItemPriceData|None" ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ quantity: NotRequired["int|None"] + """ + Non-negative integer. The quantity of units for the invoice item. + """ tax_behavior: NotRequired[ "Literal['exclusive', 'inclusive', 'unspecified']|None" ] + """ + 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|None"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + """ unit_amount: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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 UpcomingLinesParamsInvoiceItemDiscount(TypedDict): coupon: NotRequired["str|None"] + """ + ID of the coupon to create a new discount for. + """ discount: NotRequired["str|None"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ class UpcomingLinesParamsDiscount(TypedDict): coupon: NotRequired["str|None"] + """ + ID of the coupon to create a new discount for. + """ discount: NotRequired["str|None"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ class UpcomingLinesParamsCustomerDetails(TypedDict): address: NotRequired[ "Literal['']|Invoice.UpcomingLinesParamsCustomerDetailsAddress|None" ] + """ + The customer's address. + """ shipping: NotRequired[ "Literal['']|Invoice.UpcomingLinesParamsCustomerDetailsShipping|None" ] + """ + The customer's shipping information. Appears on invoices emailed to this customer. + """ tax: NotRequired[ "Invoice.UpcomingLinesParamsCustomerDetailsTax|None" ] + """ + Tax details about the customer. + """ tax_exempt: NotRequired[ "Literal['']|Literal['exempt', 'none', 'reverse']|None" ] + """ + The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + """ tax_ids: NotRequired[ "List[Invoice.UpcomingLinesParamsCustomerDetailsTaxId]|None" ] + """ + The customer's tax IDs. + """ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): type: Literal[ @@ -1123,56 +2310,164 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "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|None"] + """ + 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|None"] + """ + Customer phone (including extension). + """ class UpcomingLinesParamsCustomerDetailsShippingAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class UpcomingLinesParamsCustomerDetailsAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + 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 VoidInvoiceParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class SearchParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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] + """ + The country of the business associated with this invoice, most often the business creating the invoice. + """ account_name: Optional[str] + """ + The public name of the business associated with this invoice, most often the business creating the invoice. + """ account_tax_ids: Optional[List[ExpandableField["TaxId"]]] + """ + The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + """ amount_due: int + """ + Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. + """ amount_paid: int + """ + The amount, in cents (or local equivalent), that was paid. + """ amount_remaining: int + """ + The difference between amount_due and amount_paid, in cents (or local equivalent). + """ amount_shipping: int + """ + This is the sum of all the shipping amounts. + """ application: Optional[ExpandableField["Application"]] + """ + ID of the Connect Application that created the invoice. + """ application_fee_amount: Optional[int] + """ + The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. + """ attempt_count: int + """ + Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. + """ attempted: bool + """ + Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. + """ auto_advance: Optional[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: StripeObject billing_reason: Optional[ Literal[ @@ -1187,77 +2482,286 @@ class SearchParams(RequestOptions): "upcoming", ] ] + """ + Indicates the reason why the invoice was created. + + * `manual`: Unrelated to a subscription, for example, created via the invoice editor. + * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. + * `subscription_create`: A new subscription was created. + * `subscription_cycle`: A subscription advanced into a new period. + * `subscription_threshold`: A subscription reached a billing threshold. + * `subscription_update`: A subscription was updated. + * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. + """ charge: Optional[ExpandableField["Charge"]] + """ + ID of the latest charge generated for this invoice, if any. + """ collection_method: 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. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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). + """ custom_fields: Optional[List[StripeObject]] + """ + Custom fields displayed on the invoice. + """ customer: Optional[ExpandableField["Customer"]] + """ + The ID of the customer who will be billed. + """ customer_address: Optional[StripeObject] + """ + The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. + """ customer_email: Optional[str] + """ + The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. + """ customer_name: Optional[str] + """ + The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. + """ customer_phone: Optional[str] + """ + The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. + """ customer_shipping: Optional[StripeObject] + """ + The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. + """ customer_tax_exempt: Optional[Literal["exempt", "none", "reverse"]] + """ + The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + """ customer_tax_ids: Optional[List[StripeObject]] + """ + The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. + """ default_payment_method: Optional[ExpandableField["PaymentMethod"]] + """ + 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: Optional[ ExpandableField[Union["Account", "BankAccount", "Card", "Source"]] ] + """ + 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: List["TaxRate"] + """ + The tax rates applied to this invoice, if any. + """ description: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + """ discount: Optional["Discount"] + """ + Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. + """ discounts: Optional[List[ExpandableField["Discount"]]] + """ + The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + """ due_date: Optional[int] + """ + The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. + """ effective_at: Optional[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. + """ ending_balance: Optional[int] + """ + Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. + """ footer: Optional[str] + """ + Footer displayed on the invoice. + """ from_invoice: Optional[StripeObject] + """ + Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + """ hosted_invoice_url: Optional[str] + """ + The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. + """ id: Optional[str] + """ + Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. + """ invoice_pdf: Optional[str] + """ + The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. + """ last_finalization_error: Optional[StripeObject] + """ + The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. + """ latest_revision: Optional[ExpandableField["Invoice"]] + """ + The ID of the most recent non-draft revision of this invoice + """ lines: ListObject["InvoiceLineItem"] + """ + The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ next_payment_attempt: Optional[int] + """ + The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. + """ number: Optional[str] + """ + A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. + """ object: Literal["invoice"] + """ + String representing the object's type. Objects of the same type share the same value. + """ on_behalf_of: Optional[ExpandableField["Account"]] + """ + 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. + """ paid: bool + """ + Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. + """ paid_out_of_band: bool + """ + Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. + """ payment_intent: Optional[ExpandableField["PaymentIntent"]] + """ + The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. + """ payment_settings: StripeObject period_end: int + """ + End of the usage period during which invoice items were added to this invoice. + """ period_start: int + """ + Start of the usage period during which invoice items were added to this invoice. + """ post_payment_credit_notes_amount: int + """ + Total amount of all post-payment credit notes issued for this invoice. + """ pre_payment_credit_notes_amount: int + """ + Total amount of all pre-payment credit notes issued for this invoice. + """ quote: Optional[ExpandableField["Quote"]] + """ + The quote this invoice was generated from. + """ receipt_number: Optional[str] + """ + This is the transaction number that appears on email receipts sent for this invoice. + """ rendering: Optional[StripeObject] + """ + The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + """ rendering_options: Optional[StripeObject] + """ + 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: Optional[StripeObject] + """ + The details of the cost of shipping, including the ShippingRate applied on the invoice. + """ shipping_details: Optional[StripeObject] + """ + 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. + """ starting_balance: int + """ + Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. + """ statement_descriptor: Optional[str] + """ + Extra information about an invoice for the customer's credit card statement. + """ status: Optional[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) + """ status_transitions: StripeObject subscription: Optional[ExpandableField["Subscription"]] + """ + The subscription that this invoice was prepared for, if any. + """ subscription_details: Optional[StripeObject] + """ + Details about the subscription that created this invoice. + """ subscription_proration_date: Optional[int] + """ + Only set for upcoming invoices that preview prorations. The time used to calculate prorations. + """ subtotal: int + """ + Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated + """ subtotal_excluding_tax: Optional[int] + """ + The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated + """ tax: Optional[int] + """ + The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. + """ test_clock: Optional[ExpandableField["TestClock"]] + """ + ID of the test clock this invoice belongs to. + """ threshold_reason: Optional[StripeObject] total: int + """ + Total after discounts and taxes. + """ total_discount_amounts: Optional[List[StripeObject]] + """ + The aggregate amounts calculated per discount across all line items. + """ total_excluding_tax: Optional[int] + """ + The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. + """ total_tax_amounts: List[StripeObject] + """ + The aggregate amounts calculated per tax rate for all line items. + """ transfer_data: Optional[StripeObject] + """ + The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. + """ webhooks_delivered_at: Optional[int] + """ + Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def create( diff --git a/stripe/api_resources/invoice_item.py b/stripe/api_resources/invoice_item.py index d4d8e7c6b..d74dbc0ca 100644 --- a/stripe/api_resources/invoice_item.py +++ b/stripe/api_resources/invoice_item.py @@ -57,45 +57,129 @@ class InvoiceItem( class CreateParams(RequestOptions): amount: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ discountable: NotRequired["bool|None"] + """ + 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]|None" ] + """ + The coupons to redeem into discounts for the invoice item or invoice line item. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ invoice: NotRequired["str|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + The ID of the price object. + """ price_data: NotRequired["InvoiceItem.CreateParamsPriceData|None"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ quantity: NotRequired["int|None"] + """ + Non-negative integer. The quantity of units for the invoice item. + """ subscription: NotRequired["str|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ tax_rates: NotRequired["List[str]|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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 CreateParamsDiscount(TypedDict): coupon: NotRequired["str|None"] + """ + ID of the coupon to create a new discount for. + """ discount: NotRequired["str|None"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ class DeleteParams(RequestOptions): pass @@ -103,84 +187,261 @@ class DeleteParams(RequestOptions): class ListParams(RequestOptions): created: NotRequired["InvoiceItem.ListParamsCreated|int|None"] customer: NotRequired["str|None"] + """ + The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ invoice: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): amount: NotRequired["int|None"] + """ + 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|None"] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ discountable: NotRequired["bool|None"] + """ + 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]|None" ] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + The ID of the price object. + """ price_data: NotRequired["InvoiceItem.ModifyParamsPriceData|None"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ quantity: NotRequired["int|None"] + """ + Non-negative integer. The quantity of units for the invoice item. + """ tax_behavior: NotRequired[ "Literal['exclusive', 'inclusive', 'unspecified']|None" ] + """ + 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|None"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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 ModifyParamsDiscount(TypedDict): coupon: NotRequired["str|None"] + """ + ID of the coupon to create a new discount for. + """ discount: NotRequired["str|None"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ amount: int + """ + Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. + """ 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: ExpandableField["Customer"] + """ + The ID of the customer who will be billed when this invoice item is billed. + """ date: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ description: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ discountable: bool + """ + If true, discounts will apply to this invoice item. Always false for prorations. + """ discounts: Optional[List[ExpandableField["Discount"]]] + """ + The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + """ id: str + """ + Unique identifier for the object. + """ invoice: Optional[ExpandableField["Invoice"]] + """ + The ID of the invoice this invoice item belongs to. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["invoiceitem"] + """ + String representing the object's type. Objects of the same type share the same value. + """ period: StripeObject plan: Optional["Plan"] + """ + If the invoice item is a proration, the plan of the subscription that the proration was computed for. + """ price: Optional["Price"] + """ + The price of the invoice item. + """ proration: bool + """ + Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. + """ quantity: int + """ + Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. + """ subscription: Optional[ExpandableField["Subscription"]] + """ + The subscription that this invoice item has been created for, if any. + """ subscription_item: Optional[str] + """ + The subscription item that this invoice item has been created for, if any. + """ tax_rates: Optional[List["TaxRate"]] + """ + 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. + """ test_clock: Optional[ExpandableField["TestClock"]] + """ + ID of the test clock this invoice item belongs to. + """ unit_amount: Optional[int] + """ + Unit amount (in the `currency` specified) of the invoice item. + """ unit_amount_decimal: Optional[str] + """ + Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def create( diff --git a/stripe/api_resources/invoice_line_item.py b/stripe/api_resources/invoice_line_item.py index a3c583867..8edcc8a07 100644 --- a/stripe/api_resources/invoice_line_item.py +++ b/stripe/api_resources/invoice_line_item.py @@ -18,26 +18,95 @@ class InvoiceLineItem(StripeObject): OBJECT_NAME: ClassVar[Literal["line_item"]] = "line_item" amount: int + """ + The amount, in cents (or local equivalent). + """ amount_excluding_tax: Optional[int] + """ + The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts. + """ 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: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ discount_amounts: Optional[List[StripeObject]] + """ + The amount of discount calculated per discount for this line item. + """ discountable: bool + """ + If true, discounts will apply to this line item. Always false for prorations. + """ discounts: Optional[List[ExpandableField["Discount"]]] + """ + The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + """ id: str + """ + Unique identifier for the object. + """ invoice_item: Optional[ExpandableField["InvoiceItem"]] + """ + The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created. + """ object: Literal["line_item"] + """ + String representing the object's type. Objects of the same type share the same value. + """ period: StripeObject plan: Optional["Plan"] + """ + The plan of the subscription, if the line item is a subscription or a proration. + """ price: Optional["Price"] + """ + The price of the line item. + """ proration: bool + """ + Whether this is a proration. + """ proration_details: Optional[StripeObject] + """ + Additional details for proration line items + """ quantity: Optional[int] + """ + The quantity of the subscription, if the line item is a subscription or a proration. + """ subscription: Optional[ExpandableField["Subscription"]] + """ + The subscription that the invoice item pertains to, if any. + """ subscription_item: Optional[ExpandableField["SubscriptionItem"]] + """ + The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription. + """ tax_amounts: Optional[List[StripeObject]] + """ + The amount of tax calculated per tax rate for this line item + """ tax_rates: Optional[List["TaxRate"]] + """ + The tax rates which apply to the line item. + """ type: Literal["invoiceitem", "subscription"] + """ + A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. + """ unit_amount_excluding_tax: Optional[str] + """ + The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. + """ diff --git a/stripe/api_resources/issuing/authorization.py b/stripe/api_resources/issuing/authorization.py index 5cef55808..82b2c4dbf 100644 --- a/stripe/api_resources/issuing/authorization.py +++ b/stripe/api_resources/issuing/authorization.py @@ -49,60 +49,147 @@ class Authorization( class ApproveParams(RequestOptions): amount: NotRequired["int|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + Only return authorizations that belong to the given card. + """ cardholder: NotRequired["str|None"] + """ + Only return authorizations that belong to the given cardholder. + """ created: NotRequired["Authorization.ListParamsCreated|int|None"] + """ + Only return authorizations that were created during the given date interval. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class CaptureParams(RequestOptions): capture_amount: NotRequired["int|None"] + """ + 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|None"] + """ + Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ purchase_details: NotRequired[ "Authorization.CaptureParamsPurchaseDetails|None" ] + """ + Additional purchase information that is optionally provided by the merchant. + """ class CaptureParamsPurchaseDetails(TypedDict): flight: NotRequired[ "Authorization.CaptureParamsPurchaseDetailsFlight|None" ] + """ + Information about the flight that was purchased with this transaction. + """ fuel: NotRequired[ "Authorization.CaptureParamsPurchaseDetailsFuel|None" ] + """ + Information about fuel that was purchased with this transaction. + """ lodging: NotRequired[ "Authorization.CaptureParamsPurchaseDetailsLodging|None" ] + """ + Information about lodging that was purchased with this transaction. + """ receipt: NotRequired[ "List[Authorization.CaptureParamsPurchaseDetailsReceipt]|None" ] + """ + The line items in the purchase. + """ reference: NotRequired["str|None"] + """ + A merchant-specific order number. + """ class CaptureParamsPurchaseDetailsReceipt(TypedDict): description: NotRequired["str|None"] @@ -112,130 +199,346 @@ class CaptureParamsPurchaseDetailsReceipt(TypedDict): class CaptureParamsPurchaseDetailsLodging(TypedDict): check_in_at: NotRequired["int|None"] + """ + The time of checking into the lodging. + """ nights: NotRequired["int|None"] + """ + The number of nights stayed at the lodging. + """ class CaptureParamsPurchaseDetailsFuel(TypedDict): type: NotRequired[ "Literal['diesel', 'other', 'unleaded_plus', 'unleaded_regular', 'unleaded_super']|None" ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ unit: NotRequired["Literal['liter', 'us_gallon']|None"] + """ + The units for `volume_decimal`. One of `us_gallon` or `liter`. + """ unit_cost_decimal: NotRequired["str|None"] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ volume_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + The time that the flight departed. + """ passenger_name: NotRequired["str|None"] + """ + The name of the passenger. + """ refundable: NotRequired["bool|None"] + """ + Whether the ticket is refundable. + """ segments: NotRequired[ "List[Authorization.CaptureParamsPurchaseDetailsFlightSegment]|None" ] + """ + The legs of the trip. + """ travel_agency: NotRequired["str|None"] + """ + The travel agency that issued the ticket. + """ class CaptureParamsPurchaseDetailsFlightSegment(TypedDict): arrival_airport_code: NotRequired["str|None"] + """ + The three-letter IATA airport code of the flight's destination. + """ carrier: NotRequired["str|None"] + """ + The airline carrier code. + """ departure_airport_code: NotRequired["str|None"] + """ + The three-letter IATA airport code that the flight departed from. + """ flight_number: NotRequired["str|None"] + """ + The flight number. + """ service_class: NotRequired["str|None"] + """ + The flight's service class. + """ stopover_allowed: NotRequired["bool|None"] + """ + 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|None" ] + """ + 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']|None" ] + """ + How the card details were provided. Defaults to online. + """ card: str + """ + Card associated with this authorization. + """ currency: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ is_amount_controllable: NotRequired["bool|None"] + """ + 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|None" ] + """ + Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + """ network_data: NotRequired[ "Authorization.CreateParamsNetworkData|None" ] + """ + Details about the authorization, such as identifiers, set by the card network. + """ verification_data: NotRequired[ "Authorization.CreateParamsVerificationData|None" ] + """ + Verifications that Stripe performed on information that the cardholder provided to the merchant. + """ wallet: NotRequired[ "Literal['apple_pay', 'google_pay', 'samsung_pay']|None" ] + """ + 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']|None" ] + """ + 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']|None" ] + """ + Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`. + """ cvc_check: NotRequired[ "Literal['match', 'mismatch', 'not_provided']|None" ] + """ + Whether the cardholder provided a CVC and if it matched Stripe's record. + """ expiry_check: NotRequired[ "Literal['match', 'mismatch', 'not_provided']|None" ] + """ + Whether the cardholder provided an expiry date and if it matched Stripe's record. + """ class CreateParamsNetworkData(TypedDict): acquiring_institution_id: NotRequired["str|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + City where the seller is located + """ country: NotRequired["str|None"] + """ + Country where the seller is located + """ name: NotRequired["str|None"] + """ + Name of the seller + """ network_id: NotRequired["str|None"] + """ + 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|None"] + """ + Postal code where the seller is located + """ state: NotRequired["str|None"] + """ + State where the seller is located + """ terminal_id: NotRequired["str|None"] + """ + An ID assigned by the seller to the location of the sale. + """ class CreateParamsAmountDetails(TypedDict): atm_fee: NotRequired["int|None"] + """ + The ATM withdrawal fee. + """ cashback_amount: NotRequired["int|None"] + """ + The amount of cash requested by the cardholder. + """ class ExpireParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class IncrementParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ reverse_amount: NotRequired["int|None"] + """ + 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 + """ + The total amount that was authorized or rejected. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ amount_details: Optional[StripeObject] + """ + Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ approved: bool + """ + Whether the authorization has been approved. + """ authorization_method: Literal[ "chip", "contactless", "keyed_in", "online", "swipe" ] + """ + How the card details were provided. + """ balance_transactions: List["BalanceTransaction"] + """ + List of balance transactions associated with this authorization. + """ card: "Card" + """ + You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders. + """ cardholder: Optional[ExpandableField["Cardholder"]] + """ + The cardholder to whom this authorization belongs. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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). + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ merchant_amount: int + """ + The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ merchant_currency: str + """ + The currency that was presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ merchant_data: StripeObject metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ network_data: Optional[StripeObject] + """ + Details about the authorization, such as identifiers, set by the card network. + """ object: Literal["issuing.authorization"] + """ + String representing the object's type. Objects of the same type share the same value. + """ pending_request: Optional[StripeObject] + """ + The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. + """ request_history: List[StripeObject] + """ + History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. + """ status: Literal["closed", "pending", "reversed"] + """ + The current status of the authorization in its lifecycle. + """ token: Optional[ExpandableField["Token"]] + """ + [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null. + """ transactions: List["Transaction"] + """ + List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. + """ treasury: Optional[StripeObject] + """ + [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). + """ verification_data: StripeObject wallet: Optional[str] + """ + The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. + """ @classmethod def _cls_approve( diff --git a/stripe/api_resources/issuing/card.py b/stripe/api_resources/issuing/card.py index 7098af18b..1072f6659 100644 --- a/stripe/api_resources/issuing/card.py +++ b/stripe/api_resources/issuing/card.py @@ -41,37 +41,82 @@ class Card( class CreateParams(RequestOptions): cardholder: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ financial_account: NotRequired["str|None"] metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The card this is meant to be a replacement for (if any). + """ replacement_reason: NotRequired[ "Literal['damaged', 'expired', 'lost', 'stolen']|None" ] + """ + If `replacement_for` is specified, this should indicate why that card is being replaced. + """ shipping: NotRequired["Card.CreateParamsShipping|None"] + """ + The address where the card will be shipped. + """ spending_controls: NotRequired[ "Card.CreateParamsSpendingControls|None" ] + """ + 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']|None"] + """ + 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']]|None" ] + """ + 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']]|None" ] + """ + 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]|None" ] + """ + 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']]|None" ] + """ + 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", @@ -80,78 +125,201 @@ class CreateParamsSpendingControlsSpendingLimit(TypedDict): "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|None"] + """ + Customs information for the shipment. + """ name: str + """ + The name printed on the shipping label when shipping the card. + """ phone_number: NotRequired["str|None"] + """ + Phone number of the recipient of the shipment. + """ require_signature: NotRequired["bool|None"] + """ + Whether a signature is required for card delivery. + """ service: NotRequired[ "Literal['express', 'priority', 'standard']|None" ] + """ + Shipment service. + """ type: NotRequired["Literal['bulk', 'individual']|None"] + """ + Packaging options. + """ class CreateParamsShippingCustoms(TypedDict): eori_number: NotRequired["str|None"] + """ + 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|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: str + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class ListParams(RequestOptions): cardholder: NotRequired["str|None"] + """ + Only return cards belonging to the Cardholder with the provided ID. + """ created: NotRequired["Card.ListParamsCreated|int|None"] + """ + Only return cards that were issued during the given date interval. + """ ending_before: NotRequired["str|None"] + """ + 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|None"] + """ + Only return cards that have the given expiration month. + """ exp_year: NotRequired["int|None"] + """ + Only return cards that have the given expiration year. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ last4: NotRequired["str|None"] + """ + Only return cards that have the given last four digits. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. + """ type: NotRequired["Literal['physical', 'virtual']|None"] + """ + Only return cards that have the given type. One of `virtual` or `physical`. + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): cancellation_reason: NotRequired["Literal['lost', 'stolen']|None"] + """ + Reason why the `status` of this card is `canceled`. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The desired new PIN for this card. + """ spending_controls: NotRequired[ "Card.ModifyParamsSpendingControls|None" ] + """ + 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']|None" ] + """ + 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']]|None" ] + """ + 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']]|None" ] + """ + 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]|None" ] + """ + 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']]|None" ] + """ + 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", @@ -160,50 +328,139 @@ class ModifyParamsSpendingControlsSpendingLimit(TypedDict): "weekly", "yearly", ] + """ + Interval (or event) to which the amount applies. + """ class ModifyParamsPin(TypedDict): encrypted_number: NotRequired["str|None"] + """ + The card's desired new PIN, encrypted under Stripe's public key. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class DeliverCardParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class FailCardParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ReturnCardParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ShipCardParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ brand: str + """ + The brand of the card. + """ cancellation_reason: Optional[Literal["design_rejected", "lost", "stolen"]] + """ + The reason why the card was canceled. + """ cardholder: "Cardholder" + """ + An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. + + Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards#create-cardholder) + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ currency: str + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. + """ cvc: Optional[str] + """ + The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. + """ exp_month: int + """ + The expiration month of the card. + """ exp_year: int + """ + The expiration year of the card. + """ financial_account: Optional[str] + """ + The financial account this card is attached to. + """ id: str + """ + Unique identifier for the object. + """ last4: str + """ + The last 4 digits of the card number. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ number: Optional[str] + """ + The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. + """ object: Literal["issuing.card"] + """ + String representing the object's type. Objects of the same type share the same value. + """ replaced_by: Optional[ExpandableField["Card"]] + """ + The latest card that replaces this card, if any. + """ replacement_for: Optional[ExpandableField["Card"]] + """ + The card this card replaces, if any. + """ replacement_reason: Optional[ Literal["damaged", "expired", "lost", "stolen"] ] + """ + The reason why the previous card needed to be replaced. + """ shipping: Optional[StripeObject] + """ + Where and how the card will be shipped. + """ spending_controls: StripeObject status: Literal["active", "canceled", "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 the card. + """ wallets: Optional[StripeObject] + """ + Information relating to digital wallets (like Apple Pay and Google Pay). + """ @classmethod def create( diff --git a/stripe/api_resources/issuing/cardholder.py b/stripe/api_resources/issuing/cardholder.py index e46cb6d27..1a686453f 100644 --- a/stripe/api_resources/issuing/cardholder.py +++ b/stripe/api_resources/issuing/cardholder.py @@ -35,39 +35,94 @@ class Cardholder( class CreateParams(RequestOptions): billing: "Cardholder.CreateParamsBilling" + """ + The cardholder's billing address. + """ company: NotRequired["Cardholder.CreateParamsCompany|None"] + """ + Additional information about a `company` cardholder. + """ email: NotRequired["str|None"] + """ + The cardholder's email address. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ individual: NotRequired["Cardholder.CreateParamsIndividual|None"] + """ + Additional information about an `individual` cardholder. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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']]|None" ] + """ + 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|None" ] + """ + 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']|None"] + """ + Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. + """ type: NotRequired["Literal['company', 'individual']|None"] + """ + 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']]|None" ] + """ + 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']]|None" ] + """ + 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]|None" ] + """ + Limit spending with amount-based rules that apply across this cardholder's cards. + """ spending_limits_currency: NotRequired["str|None"] + """ + 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']]|None" ] + """ + 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", @@ -76,108 +131,268 @@ class CreateParamsSpendingControlsSpendingLimit(TypedDict): "weekly", "yearly", ] + """ + Interval (or event) to which the amount applies. + """ class CreateParamsIndividual(TypedDict): card_issuing: NotRequired[ "Cardholder.CreateParamsIndividualCardIssuing|None" ] + """ + Information related to the card_issuing program for this cardholder. + """ dob: NotRequired["Cardholder.CreateParamsIndividualDob|None"] + """ + The date of birth of this cardholder. Cardholders must be older than 13 years old. + """ first_name: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None" ] + """ + Government-issued ID document for this cardholder. + """ class CreateParamsIndividualVerification(TypedDict): document: NotRequired[ "Cardholder.CreateParamsIndividualVerificationDocument|None" ] + """ + An identifying document, either a passport or local ID card. + """ class CreateParamsIndividualVerificationDocument(TypedDict): back: NotRequired["str|None"] + """ + 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|None"] + """ + 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 CreateParamsIndividualCardIssuing(TypedDict): user_terms_acceptance: NotRequired[ "Cardholder.CreateParamsIndividualCardIssuingUserTermsAcceptance|None" ] + """ + Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards). + """ class CreateParamsIndividualCardIssuingUserTermsAcceptance(TypedDict): date: NotRequired["int|None"] + """ + The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + """ ip: NotRequired["str|None"] + """ + The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + """ user_agent: NotRequired["Literal['']|str|None"] + """ + The user agent of the browser from which the cardholder accepted the Authorized User Terms. + """ class CreateParamsCompany(TypedDict): tax_id: NotRequired["str|None"] + """ + The entity's business ID number. + """ 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|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: str + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class ListParams(RequestOptions): created: NotRequired["Cardholder.ListParamsCreated|int|None"] + """ + Only return cardholders that were created during the given date interval. + """ email: NotRequired["str|None"] + """ + Only return cardholders that have the given email address. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + Only return cardholders that have the given phone number. + """ starting_after: NotRequired["str|None"] + """ + 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']|None" ] + """ + Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. + """ type: NotRequired["Literal['company', 'individual']|None"] + """ + Only return cardholders that have the given type. One of `individual` or `company`. + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): billing: NotRequired["Cardholder.ModifyParamsBilling|None"] + """ + The cardholder's billing address. + """ company: NotRequired["Cardholder.ModifyParamsCompany|None"] + """ + Additional information about a `company` cardholder. + """ email: NotRequired["str|None"] + """ + The cardholder's email address. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ individual: NotRequired["Cardholder.ModifyParamsIndividual|None"] + """ + Additional information about an `individual` cardholder. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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']]|None" ] + """ + 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|None" ] + """ + 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']|None"] + """ + 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']]|None" ] + """ + 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']]|None" ] + """ + 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]|None" ] + """ + Limit spending with amount-based rules that apply across this cardholder's cards. + """ spending_limits_currency: NotRequired["str|None"] + """ + 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']]|None" ] + """ + 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", @@ -186,75 +401,193 @@ class ModifyParamsSpendingControlsSpendingLimit(TypedDict): "weekly", "yearly", ] + """ + Interval (or event) to which the amount applies. + """ class ModifyParamsIndividual(TypedDict): card_issuing: NotRequired[ "Cardholder.ModifyParamsIndividualCardIssuing|None" ] + """ + Information related to the card_issuing program for this cardholder. + """ dob: NotRequired["Cardholder.ModifyParamsIndividualDob|None"] + """ + The date of birth of this cardholder. Cardholders must be older than 13 years old. + """ first_name: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None" ] + """ + Government-issued ID document for this cardholder. + """ class ModifyParamsIndividualVerification(TypedDict): document: NotRequired[ "Cardholder.ModifyParamsIndividualVerificationDocument|None" ] + """ + An identifying document, either a passport or local ID card. + """ class ModifyParamsIndividualVerificationDocument(TypedDict): back: NotRequired["str|None"] + """ + 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|None"] + """ + 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 ModifyParamsIndividualCardIssuing(TypedDict): user_terms_acceptance: NotRequired[ "Cardholder.ModifyParamsIndividualCardIssuingUserTermsAcceptance|None" ] + """ + Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards). + """ class ModifyParamsIndividualCardIssuingUserTermsAcceptance(TypedDict): date: NotRequired["int|None"] + """ + The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + """ ip: NotRequired["str|None"] + """ + The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + """ user_agent: NotRequired["Literal['']|str|None"] + """ + The user agent of the browser from which the cardholder accepted the Authorized User Terms. + """ class ModifyParamsCompany(TypedDict): tax_id: NotRequired["str|None"] + """ + The entity's business ID number. + """ 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|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: str + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ billing: StripeObject company: Optional[StripeObject] + """ + Additional information about a `company` cardholder. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ email: Optional[str] + """ + The cardholder's email address. + """ id: str + """ + Unique identifier for the object. + """ individual: Optional[StripeObject] + """ + Additional information about an `individual` cardholder. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ name: str + """ + The cardholder's name. This will be printed on cards issued to them. + """ object: Literal["issuing.cardholder"] + """ + String representing the object's type. Objects of the same type share the same value. + """ phone_number: Optional[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#when-is-3d-secure-applied) for more details. + """ preferred_locales: Optional[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. + """ requirements: StripeObject spending_controls: Optional[StripeObject] + """ + 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: Literal["active", "blocked", "inactive"] + """ + Specifies whether to permit authorizations on this cardholder's cards. + """ type: Literal["company", "individual"] + """ + One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. + """ @classmethod def create( diff --git a/stripe/api_resources/issuing/dispute.py b/stripe/api_resources/issuing/dispute.py index f0f566cef..a32c181fa 100644 --- a/stripe/api_resources/issuing/dispute.py +++ b/stripe/api_resources/issuing/dispute.py @@ -42,233 +42,617 @@ class Dispute( class CreateParams(RequestOptions): amount: NotRequired["int|None"] + """ + 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|None"] + """ + Evidence provided for the dispute. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. + """ treasury: NotRequired["Dispute.CreateParamsTreasury|None"] + """ + 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 CreateParamsEvidence(TypedDict): canceled: NotRequired[ "Literal['']|Dispute.CreateParamsEvidenceCanceled|None" ] + """ + Evidence provided when `reason` is 'canceled'. + """ duplicate: NotRequired[ "Literal['']|Dispute.CreateParamsEvidenceDuplicate|None" ] + """ + Evidence provided when `reason` is 'duplicate'. + """ fraudulent: NotRequired[ "Literal['']|Dispute.CreateParamsEvidenceFraudulent|None" ] + """ + Evidence provided when `reason` is 'fraudulent'. + """ merchandise_not_as_described: NotRequired[ "Literal['']|Dispute.CreateParamsEvidenceMerchandiseNotAsDescribed|None" ] + """ + Evidence provided when `reason` is 'merchandise_not_as_described'. + """ not_received: NotRequired[ "Literal['']|Dispute.CreateParamsEvidenceNotReceived|None" ] + """ + Evidence provided when `reason` is 'not_received'. + """ other: NotRequired[ "Literal['']|Dispute.CreateParamsEvidenceOther|None" ] + """ + Evidence provided when `reason` is 'other'. + """ reason: NotRequired[ "Literal['canceled', 'duplicate', 'fraudulent', 'merchandise_not_as_described', 'not_received', 'other', 'service_not_as_described']|None" ] + """ + 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|None" ] + """ + Evidence provided when `reason` is 'service_not_as_described'. + """ class CreateParamsEvidenceServiceNotAsDescribed(TypedDict): additional_documentation: NotRequired["Literal['']|str|None"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ canceled_at: NotRequired["Literal['']|int|None"] + """ + Date when order was canceled. + """ cancellation_reason: NotRequired["Literal['']|str|None"] + """ + Reason for canceling the order. + """ explanation: NotRequired["Literal['']|str|None"] + """ + Explanation of why the cardholder is disputing this transaction. + """ received_at: NotRequired["Literal['']|int|None"] + """ + Date when the product was received. + """ class CreateParamsEvidenceOther(TypedDict): additional_documentation: NotRequired["Literal['']|str|None"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ explanation: NotRequired["Literal['']|str|None"] + """ + Explanation of why the cardholder is disputing this transaction. + """ product_description: NotRequired["Literal['']|str|None"] + """ + Description of the merchandise or service that was purchased. + """ product_type: NotRequired[ "Literal['']|Literal['merchandise', 'service']|None" ] + """ + Whether the product was a merchandise or service. + """ class CreateParamsEvidenceNotReceived(TypedDict): additional_documentation: NotRequired["Literal['']|str|None"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ expected_at: NotRequired["Literal['']|int|None"] + """ + Date when the cardholder expected to receive the product. + """ explanation: NotRequired["Literal['']|str|None"] + """ + Explanation of why the cardholder is disputing this transaction. + """ product_description: NotRequired["Literal['']|str|None"] + """ + Description of the merchandise or service that was purchased. + """ product_type: NotRequired[ "Literal['']|Literal['merchandise', 'service']|None" ] + """ + Whether the product was a merchandise or service. + """ class CreateParamsEvidenceMerchandiseNotAsDescribed(TypedDict): additional_documentation: NotRequired["Literal['']|str|None"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ explanation: NotRequired["Literal['']|str|None"] + """ + Explanation of why the cardholder is disputing this transaction. + """ received_at: NotRequired["Literal['']|int|None"] + """ + Date when the product was received. + """ return_description: NotRequired["Literal['']|str|None"] + """ + Description of the cardholder's attempt to return the product. + """ return_status: NotRequired[ "Literal['']|Literal['merchant_rejected', 'successful']|None" ] + """ + Result of cardholder's attempt to return the product. + """ returned_at: NotRequired["Literal['']|int|None"] + """ + Date when the product was returned or attempted to be returned. + """ class CreateParamsEvidenceFraudulent(TypedDict): additional_documentation: NotRequired["Literal['']|str|None"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ explanation: NotRequired["Literal['']|str|None"] + """ + Explanation of why the cardholder is disputing this transaction. + """ class CreateParamsEvidenceDuplicate(TypedDict): additional_documentation: NotRequired["Literal['']|str|None"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ card_statement: NotRequired["Literal['']|str|None"] + """ + (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|None"] + """ + (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|None"] + """ + (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|None"] + """ + Explanation of why the cardholder is disputing this transaction. + """ original_transaction: NotRequired["str|None"] + """ + 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 CreateParamsEvidenceCanceled(TypedDict): additional_documentation: NotRequired["Literal['']|str|None"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ canceled_at: NotRequired["Literal['']|int|None"] + """ + Date when order was canceled. + """ cancellation_policy_provided: NotRequired["Literal['']|bool|None"] + """ + Whether the cardholder was provided with a cancellation policy. + """ cancellation_reason: NotRequired["Literal['']|str|None"] + """ + Reason for canceling the order. + """ expected_at: NotRequired["Literal['']|int|None"] + """ + Date when the cardholder expected to receive the product. + """ explanation: NotRequired["Literal['']|str|None"] + """ + Explanation of why the cardholder is disputing this transaction. + """ product_description: NotRequired["Literal['']|str|None"] + """ + Description of the merchandise or service that was purchased. + """ product_type: NotRequired[ "Literal['']|Literal['merchandise', 'service']|None" ] + """ + Whether the product was a merchandise or service. + """ return_status: NotRequired[ "Literal['']|Literal['merchant_rejected', 'successful']|None" ] + """ + Result of cardholder's attempt to return the product. + """ returned_at: NotRequired["Literal['']|int|None"] + """ + Date when the product was returned or attempted to be returned. + """ class ListParams(RequestOptions): created: NotRequired["Dispute.ListParamsCreated|int|None"] + """ + Select Issuing disputes that were created during the given date interval. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + Select Issuing disputes with the given status. + """ transaction: NotRequired["str|None"] + """ + Select the Issuing dispute for the given transaction. + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): amount: NotRequired["int|None"] + """ + 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|None"] + """ + Evidence provided for the dispute. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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 ModifyParamsEvidence(TypedDict): canceled: NotRequired[ "Literal['']|Dispute.ModifyParamsEvidenceCanceled|None" ] + """ + Evidence provided when `reason` is 'canceled'. + """ duplicate: NotRequired[ "Literal['']|Dispute.ModifyParamsEvidenceDuplicate|None" ] + """ + Evidence provided when `reason` is 'duplicate'. + """ fraudulent: NotRequired[ "Literal['']|Dispute.ModifyParamsEvidenceFraudulent|None" ] + """ + Evidence provided when `reason` is 'fraudulent'. + """ merchandise_not_as_described: NotRequired[ "Literal['']|Dispute.ModifyParamsEvidenceMerchandiseNotAsDescribed|None" ] + """ + Evidence provided when `reason` is 'merchandise_not_as_described'. + """ not_received: NotRequired[ "Literal['']|Dispute.ModifyParamsEvidenceNotReceived|None" ] + """ + Evidence provided when `reason` is 'not_received'. + """ other: NotRequired[ "Literal['']|Dispute.ModifyParamsEvidenceOther|None" ] + """ + Evidence provided when `reason` is 'other'. + """ reason: NotRequired[ "Literal['canceled', 'duplicate', 'fraudulent', 'merchandise_not_as_described', 'not_received', 'other', 'service_not_as_described']|None" ] + """ + 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|None" ] + """ + Evidence provided when `reason` is 'service_not_as_described'. + """ class ModifyParamsEvidenceServiceNotAsDescribed(TypedDict): additional_documentation: NotRequired["Literal['']|str|None"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ canceled_at: NotRequired["Literal['']|int|None"] + """ + Date when order was canceled. + """ cancellation_reason: NotRequired["Literal['']|str|None"] + """ + Reason for canceling the order. + """ explanation: NotRequired["Literal['']|str|None"] + """ + Explanation of why the cardholder is disputing this transaction. + """ received_at: NotRequired["Literal['']|int|None"] + """ + Date when the product was received. + """ class ModifyParamsEvidenceOther(TypedDict): additional_documentation: NotRequired["Literal['']|str|None"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ explanation: NotRequired["Literal['']|str|None"] + """ + Explanation of why the cardholder is disputing this transaction. + """ product_description: NotRequired["Literal['']|str|None"] + """ + Description of the merchandise or service that was purchased. + """ product_type: NotRequired[ "Literal['']|Literal['merchandise', 'service']|None" ] + """ + Whether the product was a merchandise or service. + """ class ModifyParamsEvidenceNotReceived(TypedDict): additional_documentation: NotRequired["Literal['']|str|None"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ expected_at: NotRequired["Literal['']|int|None"] + """ + Date when the cardholder expected to receive the product. + """ explanation: NotRequired["Literal['']|str|None"] + """ + Explanation of why the cardholder is disputing this transaction. + """ product_description: NotRequired["Literal['']|str|None"] + """ + Description of the merchandise or service that was purchased. + """ product_type: NotRequired[ "Literal['']|Literal['merchandise', 'service']|None" ] + """ + Whether the product was a merchandise or service. + """ class ModifyParamsEvidenceMerchandiseNotAsDescribed(TypedDict): additional_documentation: NotRequired["Literal['']|str|None"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ explanation: NotRequired["Literal['']|str|None"] + """ + Explanation of why the cardholder is disputing this transaction. + """ received_at: NotRequired["Literal['']|int|None"] + """ + Date when the product was received. + """ return_description: NotRequired["Literal['']|str|None"] + """ + Description of the cardholder's attempt to return the product. + """ return_status: NotRequired[ "Literal['']|Literal['merchant_rejected', 'successful']|None" ] + """ + Result of cardholder's attempt to return the product. + """ returned_at: NotRequired["Literal['']|int|None"] + """ + Date when the product was returned or attempted to be returned. + """ class ModifyParamsEvidenceFraudulent(TypedDict): additional_documentation: NotRequired["Literal['']|str|None"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ explanation: NotRequired["Literal['']|str|None"] + """ + Explanation of why the cardholder is disputing this transaction. + """ class ModifyParamsEvidenceDuplicate(TypedDict): additional_documentation: NotRequired["Literal['']|str|None"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ card_statement: NotRequired["Literal['']|str|None"] + """ + (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|None"] + """ + (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|None"] + """ + (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|None"] + """ + Explanation of why the cardholder is disputing this transaction. + """ original_transaction: NotRequired["str|None"] + """ + 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 ModifyParamsEvidenceCanceled(TypedDict): additional_documentation: NotRequired["Literal['']|str|None"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ canceled_at: NotRequired["Literal['']|int|None"] + """ + Date when order was canceled. + """ cancellation_policy_provided: NotRequired["Literal['']|bool|None"] + """ + Whether the cardholder was provided with a cancellation policy. + """ cancellation_reason: NotRequired["Literal['']|str|None"] + """ + Reason for canceling the order. + """ expected_at: NotRequired["Literal['']|int|None"] + """ + Date when the cardholder expected to receive the product. + """ explanation: NotRequired["Literal['']|str|None"] + """ + Explanation of why the cardholder is disputing this transaction. + """ product_description: NotRequired["Literal['']|str|None"] + """ + Description of the merchandise or service that was purchased. + """ product_type: NotRequired[ "Literal['']|Literal['merchandise', 'service']|None" ] + """ + Whether the product was a merchandise or service. + """ return_status: NotRequired[ "Literal['']|Literal['merchant_rejected', 'successful']|None" ] + """ + Result of cardholder's attempt to return the product. + """ returned_at: NotRequired["Literal['']|int|None"] + """ + Date when the product was returned or attempted to be returned. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class SubmitParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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 + """ + Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). + """ balance_transactions: Optional[List["BalanceTransaction"]] + """ + List of balance transactions associated with the dispute. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ currency: str + """ + The currency the `transaction` was made in. + """ evidence: StripeObject id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["issuing.dispute"] + """ + String representing the object's type. Objects of the same type share the same value. + """ status: Literal["expired", "lost", "submitted", "unsubmitted", "won"] + """ + Current status of the dispute. + """ transaction: ExpandableField["Transaction"] + """ + The transaction being disputed. + """ treasury: Optional[StripeObject] + """ + [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + """ @classmethod def create( diff --git a/stripe/api_resources/issuing/token.py b/stripe/api_resources/issuing/token.py index 6ae43ac3b..fab12cf53 100644 --- a/stripe/api_resources/issuing/token.py +++ b/stripe/api_resources/issuing/token.py @@ -32,42 +32,117 @@ class Token(ListableAPIResource["Token"], UpdateableAPIResource["Token"]): class ListParams(RequestOptions): card: str + """ + The Issuing card identifier to list tokens for. + """ created: NotRequired["Token.ListParamsCreated|int|None"] + """ + Select Issuing tokens that were created during the given date interval. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + Select Issuing tokens with the given status. + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ card: ExpandableField["Card"] + """ + Card associated with this token. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ device_fingerprint: Optional[str] + """ + The hashed ID derived from the device ID from the card network associated with the token + """ id: str + """ + Unique identifier for the object. + """ last4: Optional[str] + """ + The last four digits of the token. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ network: Literal["mastercard", "visa"] + """ + The token service provider / card network associated with the token. + """ network_data: Optional[StripeObject] network_updated_at: int + """ + Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch. + """ object: Literal["issuing.token"] + """ + String representing the object's type. Objects of the same type share the same value. + """ status: Literal["active", "deleted", "requested", "suspended"] + """ + The usage state of the token. + """ wallet_provider: Optional[ Literal["apple_pay", "google_pay", "samsung_pay"] ] + """ + The digital wallet for this token, if one was used. + """ @classmethod def list( diff --git a/stripe/api_resources/issuing/transaction.py b/stripe/api_resources/issuing/transaction.py index 714fbb16d..b833ecf74 100644 --- a/stripe/api_resources/issuing/transaction.py +++ b/stripe/api_resources/issuing/transaction.py @@ -50,53 +50,131 @@ class Transaction( class ListParams(RequestOptions): card: NotRequired["str|None"] + """ + Only return transactions that belong to the given card. + """ cardholder: NotRequired["str|None"] + """ + Only return transactions that belong to the given cardholder. + """ created: NotRequired["Transaction.ListParamsCreated|int|None"] + """ + Only return transactions that were created during the given date interval. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None"] + """ + Only return transactions that have the given type. One of `capture` or `refund`. + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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]|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ merchant_data: NotRequired[ "Transaction.CreateForceCaptureParamsMerchantData|None" ] + """ + Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + """ purchase_details: NotRequired[ "Transaction.CreateForceCaptureParamsPurchaseDetails|None" ] + """ + Additional purchase information that is optionally provided by the merchant. + """ class CreateForceCaptureParamsPurchaseDetails(TypedDict): flight: NotRequired[ "Transaction.CreateForceCaptureParamsPurchaseDetailsFlight|None" ] + """ + Information about the flight that was purchased with this transaction. + """ fuel: NotRequired[ "Transaction.CreateForceCaptureParamsPurchaseDetailsFuel|None" ] + """ + Information about fuel that was purchased with this transaction. + """ lodging: NotRequired[ "Transaction.CreateForceCaptureParamsPurchaseDetailsLodging|None" ] + """ + Information about lodging that was purchased with this transaction. + """ receipt: NotRequired[ "List[Transaction.CreateForceCaptureParamsPurchaseDetailsReceipt]|None" ] + """ + The line items in the purchase. + """ reference: NotRequired["str|None"] + """ + A merchant-specific order number. + """ class CreateForceCaptureParamsPurchaseDetailsReceipt(TypedDict): description: NotRequired["str|None"] @@ -106,71 +184,179 @@ class CreateForceCaptureParamsPurchaseDetailsReceipt(TypedDict): class CreateForceCaptureParamsPurchaseDetailsLodging(TypedDict): check_in_at: NotRequired["int|None"] + """ + The time of checking into the lodging. + """ nights: NotRequired["int|None"] + """ + The number of nights stayed at the lodging. + """ class CreateForceCaptureParamsPurchaseDetailsFuel(TypedDict): type: NotRequired[ "Literal['diesel', 'other', 'unleaded_plus', 'unleaded_regular', 'unleaded_super']|None" ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ unit: NotRequired["Literal['liter', 'us_gallon']|None"] + """ + The units for `volume_decimal`. One of `us_gallon` or `liter`. + """ unit_cost_decimal: NotRequired["str|None"] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ volume_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + The time that the flight departed. + """ passenger_name: NotRequired["str|None"] + """ + The name of the passenger. + """ refundable: NotRequired["bool|None"] + """ + Whether the ticket is refundable. + """ segments: NotRequired[ "List[Transaction.CreateForceCaptureParamsPurchaseDetailsFlightSegment]|None" ] + """ + The legs of the trip. + """ travel_agency: NotRequired["str|None"] + """ + The travel agency that issued the ticket. + """ class CreateForceCaptureParamsPurchaseDetailsFlightSegment(TypedDict): arrival_airport_code: NotRequired["str|None"] + """ + The three-letter IATA airport code of the flight's destination. + """ carrier: NotRequired["str|None"] + """ + The airline carrier code. + """ departure_airport_code: NotRequired["str|None"] + """ + The three-letter IATA airport code that the flight departed from. + """ flight_number: NotRequired["str|None"] + """ + The flight number. + """ service_class: NotRequired["str|None"] + """ + The flight's service class. + """ stopover_allowed: NotRequired["bool|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + City where the seller is located + """ country: NotRequired["str|None"] + """ + Country where the seller is located + """ name: NotRequired["str|None"] + """ + Name of the seller + """ network_id: NotRequired["str|None"] + """ + 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|None"] + """ + Postal code where the seller is located + """ state: NotRequired["str|None"] + """ + State where the seller is located + """ terminal_id: NotRequired["str|None"] + """ + An ID assigned by the seller to the location of the sale. + """ 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ merchant_data: NotRequired[ "Transaction.CreateUnlinkedRefundParamsMerchantData|None" ] + """ + Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + """ purchase_details: NotRequired[ "Transaction.CreateUnlinkedRefundParamsPurchaseDetails|None" ] + """ + Additional purchase information that is optionally provided by the merchant. + """ class CreateUnlinkedRefundParamsPurchaseDetails(TypedDict): flight: NotRequired[ "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFlight|None" ] + """ + Information about the flight that was purchased with this transaction. + """ fuel: NotRequired[ "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFuel|None" ] + """ + Information about fuel that was purchased with this transaction. + """ lodging: NotRequired[ "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsLodging|None" ] + """ + Information about lodging that was purchased with this transaction. + """ receipt: NotRequired[ "List[Transaction.CreateUnlinkedRefundParamsPurchaseDetailsReceipt]|None" ] + """ + The line items in the purchase. + """ reference: NotRequired["str|None"] + """ + A merchant-specific order number. + """ class CreateUnlinkedRefundParamsPurchaseDetailsReceipt(TypedDict): description: NotRequired["str|None"] @@ -180,72 +366,213 @@ class CreateUnlinkedRefundParamsPurchaseDetailsReceipt(TypedDict): class CreateUnlinkedRefundParamsPurchaseDetailsLodging(TypedDict): check_in_at: NotRequired["int|None"] + """ + The time of checking into the lodging. + """ nights: NotRequired["int|None"] + """ + The number of nights stayed at the lodging. + """ class CreateUnlinkedRefundParamsPurchaseDetailsFuel(TypedDict): type: NotRequired[ "Literal['diesel', 'other', 'unleaded_plus', 'unleaded_regular', 'unleaded_super']|None" ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ unit: NotRequired["Literal['liter', 'us_gallon']|None"] + """ + The units for `volume_decimal`. One of `us_gallon` or `liter`. + """ unit_cost_decimal: NotRequired["str|None"] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ volume_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + The time that the flight departed. + """ passenger_name: NotRequired["str|None"] + """ + The name of the passenger. + """ refundable: NotRequired["bool|None"] + """ + Whether the ticket is refundable. + """ segments: NotRequired[ "List[Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFlightSegment]|None" ] + """ + The legs of the trip. + """ travel_agency: NotRequired["str|None"] + """ + The travel agency that issued the ticket. + """ class CreateUnlinkedRefundParamsPurchaseDetailsFlightSegment( TypedDict ): arrival_airport_code: NotRequired["str|None"] + """ + The three-letter IATA airport code of the flight's destination. + """ carrier: NotRequired["str|None"] + """ + The airline carrier code. + """ departure_airport_code: NotRequired["str|None"] + """ + The three-letter IATA airport code that the flight departed from. + """ flight_number: NotRequired["str|None"] + """ + The flight number. + """ service_class: NotRequired["str|None"] + """ + The flight's service class. + """ stopover_allowed: NotRequired["bool|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + City where the seller is located + """ country: NotRequired["str|None"] + """ + Country where the seller is located + """ name: NotRequired["str|None"] + """ + Name of the seller + """ network_id: NotRequired["str|None"] + """ + 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|None"] + """ + Postal code where the seller is located + """ state: NotRequired["str|None"] + """ + State where the seller is located + """ terminal_id: NotRequired["str|None"] + """ + An ID assigned by the seller to the location of the sale. + """ class RefundParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ refund_amount: NotRequired["int|None"] + """ + 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 + """ + The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ amount_details: Optional[StripeObject] + """ + 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: Optional[ExpandableField["Authorization"]] + """ + The `Authorization` object that led to this transaction. + """ balance_transaction: Optional[ExpandableField["BalanceTransaction"]] + """ + ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. + """ card: ExpandableField["Card"] + """ + The card used to make this transaction. + """ cardholder: Optional[ExpandableField["Cardholder"]] + """ + The cardholder to whom this transaction belongs. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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). + """ dispute: Optional[ExpandableField["Dispute"]] + """ + If you've disputed the transaction, the ID of the dispute. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ merchant_amount: int + """ + The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. + """ merchant_currency: str + """ + The currency with which the merchant is taking payment. + """ merchant_data: StripeObject metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["issuing.transaction"] + """ + String representing the object's type. Objects of the same type share the same value. + """ purchase_details: Optional[StripeObject] + """ + Additional purchase information that is optionally provided by the merchant. + """ token: Optional[ExpandableField["Token"]] + """ + [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null. + """ treasury: Optional[StripeObject] + """ + [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + """ type: Literal["capture", "refund"] + """ + The nature of the transaction. + """ wallet: Optional[Literal["apple_pay", "google_pay", "samsung_pay"]] + """ + The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. + """ @classmethod def list( diff --git a/stripe/api_resources/line_item.py b/stripe/api_resources/line_item.py index 7b8570a7f..849b8254d 100644 --- a/stripe/api_resources/line_item.py +++ b/stripe/api_resources/line_item.py @@ -15,14 +15,50 @@ class LineItem(StripeObject): OBJECT_NAME: ClassVar[Literal["item"]] = "item" amount_discount: int + """ + Total discount amount applied. If no discounts were applied, defaults to 0. + """ amount_subtotal: int + """ + Total before any discounts or taxes are applied. + """ amount_tax: int + """ + Total tax amount applied. If no tax was applied, defaults to 0. + """ amount_total: int + """ + Total after discounts and taxes. + """ 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: str + """ + An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. + """ discounts: Optional[List[StripeObject]] + """ + The discounts applied to the line item. + """ id: str + """ + Unique identifier for the object. + """ object: Literal["item"] + """ + String representing the object's type. Objects of the same type share the same value. + """ price: Optional["Price"] + """ + The price used to generate the line item. + """ quantity: Optional[int] + """ + The quantity of products being purchased. + """ taxes: Optional[List[StripeObject]] + """ + The taxes applied to the line item. + """ diff --git a/stripe/api_resources/login_link.py b/stripe/api_resources/login_link.py index a1c60d1c3..1e20b691c 100644 --- a/stripe/api_resources/login_link.py +++ b/stripe/api_resources/login_link.py @@ -12,5 +12,14 @@ class LoginLink(StripeObject): OBJECT_NAME: ClassVar[Literal["login_link"]] = "login_link" created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ object: Literal["login_link"] + """ + String representing the object's type. Objects of the same type share the same value. + """ url: str + """ + The URL for the login link. + """ diff --git a/stripe/api_resources/mandate.py b/stripe/api_resources/mandate.py index 9f395c4e7..e842e8516 100644 --- a/stripe/api_resources/mandate.py +++ b/stripe/api_resources/mandate.py @@ -21,18 +21,42 @@ class Mandate(APIResource["Mandate"]): class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ customer_acceptance: StripeObject id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ multi_use: Optional[StripeObject] object: Literal["mandate"] + """ + String representing the object's type. Objects of the same type share the same value. + """ on_behalf_of: Optional[str] + """ + The account (if any) that the mandate is intended for. + """ payment_method: ExpandableField["PaymentMethod"] + """ + ID of the payment method associated with this mandate. + """ payment_method_details: StripeObject single_use: Optional[StripeObject] status: Literal["active", "inactive", "pending"] + """ + The mandate status indicates whether or not you can use it to initiate a payment. + """ type: Literal["multi_use", "single_use"] + """ + The type of the mandate. + """ @classmethod def retrieve( diff --git a/stripe/api_resources/payment_intent.py b/stripe/api_resources/payment_intent.py index 86b81ab2a..079f0f377 100644 --- a/stripe/api_resources/payment_intent.py +++ b/stripe/api_resources/payment_intent.py @@ -70,206 +70,487 @@ class PaymentIntent( class ApplyCustomerBalanceParams(RequestOptions): amount: NotRequired["int|None"] + """ + 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). + + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class CancelParams(RequestOptions): cancellation_reason: NotRequired[ "Literal['abandoned', 'duplicate', 'fraudulent', 'requested_by_customer']|None" ] + """ + Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class CaptureParams(RequestOptions): amount_to_capture: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ final_capture: NotRequired["bool|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None"] + """ + The amount that will be transferred automatically when a charge succeeds. + """ class ConfirmParams(RequestOptions): capture_method: NotRequired[ "Literal['automatic', 'automatic_async', 'manual']|None" ] + """ + Controls when the funds will be captured from the customer's account. + """ error_on_requires_action: NotRequired["bool|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ mandate: NotRequired["str|None"] + """ + ID of the mandate that's used for this payment. + """ mandate_data: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsMandateData|PaymentIntent.ConfirmParamsMandateData2|None" ] off_session: NotRequired[ "bool|Literal['one_off', 'recurring']|None" ] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None" ] + """ + Payment method-specific configuration for this PaymentIntent. + """ radar_options: NotRequired[ "PaymentIntent.ConfirmParamsRadarOptions|None" ] + """ + Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). + """ receipt_email: NotRequired["Literal['']|str|None"] + """ + 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|None"] + """ + 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']|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`. + """ shipping: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsShipping|None" ] + """ + Shipping information for this PaymentIntent. + """ use_stripe_sdk: NotRequired["bool|None"] + """ + 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|None"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ name: str + """ + Recipient name. + """ phone: NotRequired["str|None"] + """ + Recipient phone (including extension). + """ tracking_number: NotRequired["str|None"] + """ + 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|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class ConfirmParamsRadarOptions(TypedDict): session: NotRequired["str|None"] + """ + 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|None" ] + """ + If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + """ affirm: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAffirm|None" ] + """ + If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + """ afterpay_clearpay: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAfterpayClearpay|None" ] + """ + If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + """ alipay: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAlipay|None" ] + """ + If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + """ au_becs_debit: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAuBecsDebit|None" ] + """ + 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|None" ] + """ + If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + """ bancontact: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsBancontact|None" ] + """ + If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + """ blik: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsBlik|None" ] + """ + If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + """ boleto: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsBoleto|None" ] + """ + If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + """ card: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCard|None" ] + """ + Configuration for any card payments attempted on this PaymentIntent. + """ card_present: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCardPresent|None" ] + """ + If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ cashapp: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCashapp|None" ] + """ + 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|None" ] + """ + If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + """ eps: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsEps|None" ] + """ + If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + """ fpx: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsFpx|None" ] + """ + If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + """ giropay: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsGiropay|None" ] + """ + If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + """ grabpay: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsGrabpay|None" ] + """ + If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + """ ideal: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsIdeal|None" ] + """ + If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + """ interac_present: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsInteracPresent|None" ] + """ + If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ klarna: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsKlarna|None" ] + """ + If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + """ konbini: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsKonbini|None" ] + """ + If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + """ link: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsLink|None" ] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ oxxo: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsOxxo|None" ] + """ + If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + """ p24: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsP24|None" ] + """ + If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + """ paynow: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPaynow|None" ] + """ + If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + """ paypal: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPaypal|None" ] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ pix: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPix|None" ] + """ + If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + """ promptpay: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPromptpay|None" ] + """ + If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + """ sepa_debit: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsSepaDebit|None" ] + """ + If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ sofort: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsSofort|None" ] + """ + If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + """ us_bank_account: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccount|None" ] + """ + 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|None" ] + """ + If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + """ zip: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsZip|None" ] + """ + 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']|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 ConfirmParamsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired["str|None"] + """ + 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']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): financial_connections: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections|None" ] + """ + Additional fields for Financial Connections Session creation + """ networks: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks|None" ] + """ + Additional fields for network related functions + """ preferred_settlement_speed: NotRequired[ "Literal['']|Literal['fastest', 'standard']|None" ] + """ + Preferred transaction settlement speed + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|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`. + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks( TypedDict @@ -277,6 +558,9 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks( requested: NotRequired[ "List[Literal['ach', 'us_domestic_wire']]|None" ] + """ + Triggers validations to run across the selected networks + """ class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, @@ -284,24 +568,57 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( permissions: NotRequired[ "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]|None" ] + """ + 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']]|None"] + """ + List of data features that you would like to retrieve upon account creation. + """ return_url: NotRequired["str|None"] + """ + 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']|None" ] + """ + Language shown to the payer on redirect. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions|None" ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|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 ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions( TypedDict, @@ -310,54 +627,191 @@ class ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions( class ConfirmParamsPaymentMethodOptionsPromptpay(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 ConfirmParamsPaymentMethodOptionsPix(TypedDict): expires_after_seconds: NotRequired["int|None"] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ expires_at: NotRequired["int|None"] + """ + 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']|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 ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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']|None" ] + """ + [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + """ reference: NotRequired["str|None"] + """ + 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|None"] + """ + The risk correlation ID for an on-session payment using a saved PayPal payment method. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 ConfirmParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 ConfirmParamsPaymentMethodOptionsP24(TypedDict): setup_future_usage: NotRequired["Literal['none']|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`. + """ tos_shown_and_accepted: NotRequired["bool|None"] + """ + Confirm that the payer has accepted the P24 terms and conditions. + """ class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired["int|None"] + """ + 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']|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 ConfirmParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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|None"] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): confirmation_number: NotRequired["Literal['']|str|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + """ setup_future_usage: NotRequired["Literal['none']|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 ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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']|None" ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ setup_future_usage: NotRequired["Literal['none']|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 ConfirmParamsPaymentMethodOptionsInteracPresent(TypedDict): pass @@ -366,25 +820,85 @@ class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 ConfirmParamsPaymentMethodOptionsGrabpay(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 ConfirmParamsPaymentMethodOptionsGiropay(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 ConfirmParamsPaymentMethodOptionsFpx(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 ConfirmParamsPaymentMethodOptionsEps(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 ConfirmParamsPaymentMethodOptionsCustomerBalance(TypedDict): bank_transfer: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer|None" ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ funding_type: NotRequired["Literal['bank_transfer']|None"] + """ + 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']|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 ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer( TypedDict, @@ -392,9 +906,17 @@ class ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer( eu_bank_transfer: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer|None" ] + """ + Configuration for the eu_bank_transfer funding type. + """ requested_address_types: NotRequired[ "List[Literal['aba', 'iban', 'sepa', 'sort_code', 'spei', 'swift', 'zengin']]|None" ] + """ + 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", @@ -402,245 +924,596 @@ class ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer( "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 ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( TypedDict, ): country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ class ConfirmParamsPaymentMethodOptionsCashapp(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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']|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 ConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): request_extended_authorization: NotRequired["bool|None"] + """ + 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: NotRequired[ "Literal['if_available', 'never']|None" ] + """ + Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + """ request_incremental_authorization_support: NotRequired["bool|None"] + """ + 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']|None" ] + """ + This field was released by mistake and will be removed in the next major version + """ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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|None"] + """ + 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|None" ] + """ + 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.ConfirmParamsPaymentMethodOptionsCardMandateOptions|None" ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ moto: NotRequired["bool|None"] + """ + 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']|None" ] + """ + 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']|None" ] + """ + 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']|None" ] + """ + Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + """ request_multicapture: NotRequired[ "Literal['if_available', 'never']|None" ] + """ + Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + """ request_overcapture: NotRequired[ "Literal['if_available', 'never']|None" ] + """ + Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + """ request_three_d_secure: NotRequired[ "Literal['any', 'automatic']|None" ] + """ + 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']|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`. + """ statement_descriptor_suffix_kana: NotRequired[ "Literal['']|str|None" ] + """ + 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|None" ] + """ + 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 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|None"] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ end_date: NotRequired["int|None"] + """ + 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|None"] + """ + 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']]|None"] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ class ConfirmParamsPaymentMethodOptionsCardInstallments(TypedDict): enabled: NotRequired["bool|None"] + """ + 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|None" ] + """ + The selected installment plan to use for this payment attempt. + This parameter can only be provided during confirmation. + """ 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`. + """ class ConfirmParamsPaymentMethodOptionsBoleto(TypedDict): expires_after_days: NotRequired["int|None"] + """ + 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']|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 ConfirmParamsPaymentMethodOptionsBlik(TypedDict): code: NotRequired["str|None"] + """ + The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + """ class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): preferred_language: NotRequired[ "Literal['de', 'en', 'fr', 'nl']|None" ] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|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 ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|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 ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 ConfirmParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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|None"] + """ + 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']|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 ConfirmParamsPaymentMethodOptionsAffirm(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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|None"] + """ + Preferred language of the Affirm authorization page that the customer is redirected to. + """ setup_future_usage: NotRequired["Literal['none']|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 ConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions|None" ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|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`. + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, ): custom_mandate_url: NotRequired["Literal['']|str|None"] + """ + 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|None"] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ payment_schedule: NotRequired[ "Literal['combined', 'interval', 'sporadic']|None" ] + """ + Payment schedule for the mandate. + """ transaction_type: NotRequired[ "Literal['business', 'personal']|None" ] + """ + Transaction type of the mandate. + """ class ConfirmParamsPaymentMethodData(TypedDict): acss_debit: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataAcssDebit|None" ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ affirm: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataAffirm|None" ] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ afterpay_clearpay: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataAfterpayClearpay|None" ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ alipay: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataAlipay|None" ] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ au_becs_debit: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataAuBecsDebit|None" ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ bacs_debit: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataBacsDebit|None" ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ bancontact: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataBancontact|None" ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ billing_details: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataBillingDetails|None" ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ blik: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataBlik|None" ] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ boleto: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataBoleto|None" ] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ cashapp: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataCashapp|None" ] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ customer_balance: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataCustomerBalance|None" ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ eps: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataEps|None" ] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ fpx: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataFpx|None" ] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ giropay: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataGiropay|None" ] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ grabpay: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataGrabpay|None" ] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ ideal: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataIdeal|None" ] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ interac_present: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataInteracPresent|None" ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ klarna: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataKlarna|None" ] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ konbini: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataKonbini|None" ] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ link: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataLink|None" ] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ p24: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataP24|None" ] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ paynow: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataPaynow|None" ] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ paypal: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataPaypal|None" ] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ pix: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataPix|None" ] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ promptpay: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataPromptpay|None" ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ radar_options: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataRadarOptions|None" ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ sepa_debit: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataSepaDebit|None" ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ sofort: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataSofort|None" ] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ type: Literal[ "acss_debit", "affirm", @@ -673,15 +1546,27 @@ class ConfirmParamsPaymentMethodData(TypedDict): "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|None" ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ wechat_pay: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataWechatPay|None" ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ zip: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataZip|None" ] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ class ConfirmParamsPaymentMethodDataZip(TypedDict): pass @@ -693,19 +1578,43 @@ class ConfirmParamsPaymentMethodDataUsBankAccount(TypedDict): account_holder_type: NotRequired[ "Literal['company', 'individual']|None" ] + """ + Account holder type: individual or company. + """ account_number: NotRequired["str|None"] + """ + Account number of the bank account. + """ account_type: NotRequired["Literal['checking', 'savings']|None"] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ financial_connections_account: NotRequired["str|None"] + """ + The ID of a Financial Connections Account to use as a payment method. + """ routing_number: NotRequired["str|None"] + """ + Routing number of the bank account. + """ 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 ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): iban: str + """ + IBAN of the bank account. + """ class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): session: NotRequired["str|None"] + """ + 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 ConfirmParamsPaymentMethodDataPromptpay(TypedDict): pass @@ -723,6 +1632,9 @@ 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']|None" ] + """ + The customer's bank. + """ class ConfirmParamsPaymentMethodDataOxxo(TypedDict): pass @@ -737,11 +1649,23 @@ class ConfirmParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataKlarnaDob|None" ] + """ + Customer's date of birth + """ 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 ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): pass @@ -750,6 +1674,9 @@ 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']|None" ] + """ + The customer's bank. + """ class ConfirmParamsPaymentMethodDataGrabpay(TypedDict): pass @@ -761,6 +1688,9 @@ class ConfirmParamsPaymentMethodDataFpx(TypedDict): account_holder_type: NotRequired[ "Literal['company', 'individual']|None" ] + """ + Account holder type for FPX transaction + """ bank: Literal[ "affin_bank", "agrobank", @@ -785,11 +1715,17 @@ class ConfirmParamsPaymentMethodDataFpx(TypedDict): "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']|None" ] + """ + The customer's bank. + """ class ConfirmParamsPaymentMethodDataCustomerBalance(TypedDict): pass @@ -799,6 +1735,9 @@ class ConfirmParamsPaymentMethodDataCashapp(TypedDict): 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 @@ -807,28 +1746,70 @@ class ConfirmParamsPaymentMethodDataBillingDetails(TypedDict): address: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodDataBillingDetailsAddress|None" ] + """ + Billing address. + """ email: NotRequired["Literal['']|str|None"] + """ + Email address. + """ name: NotRequired["Literal['']|str|None"] + """ + Full name. + """ phone: NotRequired["Literal['']|str|None"] + """ + Billing phone number (including extension). + """ class ConfirmParamsPaymentMethodDataBillingDetailsAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class ConfirmParamsPaymentMethodDataBancontact(TypedDict): pass class ConfirmParamsPaymentMethodDataBacsDebit(TypedDict): account_number: NotRequired["str|None"] + """ + Account number of the bank account that the funds will be debited from. + """ sort_code: NotRequired["str|None"] + """ + 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 ConfirmParamsPaymentMethodDataAlipay(TypedDict): pass @@ -841,245 +1822,591 @@ class ConfirmParamsPaymentMethodDataAffirm(TypedDict): 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: "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptance2" + """ + This hash contains details about the customer acceptance of the Mandate. + """ 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 ConfirmParamsMandateDataCustomerAcceptanceOnline2(TypedDict): ip_address: NotRequired["str|None"] + """ + The IP address from which the Mandate was accepted by the customer. + """ user_agent: NotRequired["str|None"] + """ + The user agent of the browser from which the Mandate was accepted by the customer. + """ class ConfirmParamsMandateData(TypedDict): customer_acceptance: "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptance" + """ + This hash contains details about the customer acceptance of the Mandate. + """ class ConfirmParamsMandateDataCustomerAcceptance(TypedDict): accepted_at: NotRequired["int|None"] + """ + The time at which the customer accepted the Mandate. + """ offline: NotRequired[ "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptanceOffline|None" ] + """ + If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + """ online: NotRequired[ "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptanceOnline|None" ] + """ + 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 ConfirmParamsMandateDataCustomerAcceptanceOffline(TypedDict): pass 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|None"] + """ + 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|None" ] + """ + 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']|None" ] + """ + Controls when the funds will be captured from the customer's account. + """ confirm: NotRequired["bool|None"] + """ + 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']|None" ] 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|None"] + """ + ID of the Customer this PaymentIntent belongs to, if one exists. + + Payment methods attached to other Customers cannot be used with this PaymentIntent. + + If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + """ description: NotRequired["str|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ error_on_requires_action: NotRequired["bool|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ mandate: NotRequired["str|None"] + """ + 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|None" ] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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']|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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 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|None"] + """ + The ID of the payment method configuration to use with this PaymentIntent. + """ payment_method_data: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodData|None" ] + """ + 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|None" ] + """ + Payment method-specific configuration for this PaymentIntent. + """ payment_method_types: NotRequired["List[str]|None"] + """ + 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|None" ] + """ + Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). + """ receipt_email: NotRequired["str|None"] + """ + 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|None"] + """ + 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']|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). + """ shipping: NotRequired["PaymentIntent.CreateParamsShipping|None"] + """ + Shipping information for this PaymentIntent. + """ statement_descriptor: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None" ] + """ + The parameters that you can use to automatically create a Transfer after the payment succeeds. + Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ transfer_group: NotRequired["str|None"] + """ + 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|None"] + """ + Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + """ class CreateParamsTransferData(TypedDict): amount: NotRequired["int|None"] + """ + 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 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. + """ class CreateParamsShipping(TypedDict): address: "PaymentIntent.CreateParamsShippingAddress" + """ + Shipping address. + """ carrier: NotRequired["str|None"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ name: str + """ + Recipient name. + """ phone: NotRequired["str|None"] + """ + Recipient phone (including extension). + """ tracking_number: NotRequired["str|None"] + """ + 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|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreateParamsRadarOptions(TypedDict): session: NotRequired["str|None"] + """ + 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 CreateParamsPaymentMethodOptions(TypedDict): acss_debit: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAcssDebit|None" ] + """ + If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + """ affirm: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAffirm|None" ] + """ + If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + """ afterpay_clearpay: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAfterpayClearpay|None" ] + """ + If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + """ alipay: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAlipay|None" ] + """ + If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + """ au_becs_debit: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAuBecsDebit|None" ] + """ + 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|None" ] + """ + If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + """ bancontact: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsBancontact|None" ] + """ + If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + """ blik: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsBlik|None" ] + """ + If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + """ boleto: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsBoleto|None" ] + """ + If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + """ card: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCard|None" ] + """ + Configuration for any card payments attempted on this PaymentIntent. + """ card_present: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCardPresent|None" ] + """ + If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ cashapp: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCashapp|None" ] + """ + 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|None" ] + """ + If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + """ eps: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsEps|None" ] + """ + If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + """ fpx: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsFpx|None" ] + """ + If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + """ giropay: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsGiropay|None" ] + """ + If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + """ grabpay: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsGrabpay|None" ] + """ + If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + """ ideal: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsIdeal|None" ] + """ + If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + """ interac_present: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsInteracPresent|None" ] + """ + If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ klarna: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsKlarna|None" ] + """ + If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + """ konbini: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsKonbini|None" ] + """ + If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + """ link: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsLink|None" ] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ oxxo: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsOxxo|None" ] + """ + If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + """ p24: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsP24|None" ] + """ + If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + """ paynow: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPaynow|None" ] + """ + If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + """ paypal: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPaypal|None" ] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ pix: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPix|None" ] + """ + If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + """ promptpay: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPromptpay|None" ] + """ + If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + """ sepa_debit: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsSepaDebit|None" ] + """ + If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ sofort: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsSofort|None" ] + """ + If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + """ us_bank_account: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccount|None" ] + """ + 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|None" ] + """ + If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + """ zip: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsZip|None" ] + """ + If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + """ class CreateParamsPaymentMethodOptionsZip(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 CreateParamsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired["str|None"] + """ + 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']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): financial_connections: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections|None" ] + """ + Additional fields for Financial Connections Session creation + """ networks: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountNetworks|None" ] + """ + Additional fields for network related functions + """ preferred_settlement_speed: NotRequired[ "Literal['']|Literal['fastest', 'standard']|None" ] + """ + Preferred transaction settlement speed + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|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`. + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class CreateParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): requested: NotRequired[ "List[Literal['ach', 'us_domestic_wire']]|None" ] + """ + Triggers validations to run across the selected networks + """ class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, @@ -1087,24 +2414,57 @@ class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( permissions: NotRequired[ "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]|None" ] + """ + 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']]|None"] + """ + List of data features that you would like to retrieve upon account creation. + """ return_url: NotRequired["str|None"] + """ + 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 CreateParamsPaymentMethodOptionsSofort(TypedDict): preferred_language: NotRequired[ "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']|None" ] + """ + Language shown to the payer on redirect. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions|None" ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|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 CreateParamsPaymentMethodOptionsSepaDebitMandateOptions( TypedDict, @@ -1113,54 +2473,191 @@ class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions( class CreateParamsPaymentMethodOptionsPromptpay(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 CreateParamsPaymentMethodOptionsPix(TypedDict): expires_after_seconds: NotRequired["int|None"] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ expires_at: NotRequired["int|None"] + """ + 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']|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 CreateParamsPaymentMethodOptionsPaypal(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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']|None" ] + """ + [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + """ reference: NotRequired["str|None"] + """ + 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|None"] + """ + The risk correlation ID for an on-session payment using a saved PayPal payment method. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 CreateParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 CreateParamsPaymentMethodOptionsP24(TypedDict): setup_future_usage: NotRequired["Literal['none']|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`. + """ tos_shown_and_accepted: NotRequired["bool|None"] + """ + Confirm that the payer has accepted the P24 terms and conditions. + """ class CreateParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired["int|None"] + """ + 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']|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 CreateParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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|None"] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 CreateParamsPaymentMethodOptionsKonbini(TypedDict): confirmation_number: NotRequired["Literal['']|str|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + """ setup_future_usage: NotRequired["Literal['none']|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 CreateParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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']|None" ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ setup_future_usage: NotRequired["Literal['none']|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 CreateParamsPaymentMethodOptionsInteracPresent(TypedDict): pass @@ -1169,25 +2666,85 @@ class CreateParamsPaymentMethodOptionsIdeal(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 CreateParamsPaymentMethodOptionsGrabpay(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 CreateParamsPaymentMethodOptionsGiropay(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 CreateParamsPaymentMethodOptionsFpx(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 CreateParamsPaymentMethodOptionsEps(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): bank_transfer: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer|None" ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ funding_type: NotRequired["Literal['bank_transfer']|None"] + """ + 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']|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 CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( TypedDict, @@ -1195,9 +2752,17 @@ class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( eu_bank_transfer: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer|None" ] + """ + Configuration for the eu_bank_transfer funding type. + """ requested_address_types: NotRequired[ "List[Literal['aba', 'iban', 'sepa', 'sort_code', 'spei', 'swift', 'zengin']]|None" ] + """ + 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", @@ -1205,245 +2770,596 @@ class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( "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 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): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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']|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 CreateParamsPaymentMethodOptionsCardPresent(TypedDict): request_extended_authorization: NotRequired["bool|None"] + """ + 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: NotRequired[ "Literal['if_available', 'never']|None" ] + """ + Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + """ request_incremental_authorization_support: NotRequired["bool|None"] + """ + 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']|None" ] + """ + This field was released by mistake and will be removed in the next major version + """ class CreateParamsPaymentMethodOptionsCard(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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|None"] + """ + 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|None" ] + """ + 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.CreateParamsPaymentMethodOptionsCardMandateOptions|None" ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ moto: NotRequired["bool|None"] + """ + 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']|None" ] + """ + 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']|None" ] + """ + 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']|None" ] + """ + Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + """ request_multicapture: NotRequired[ "Literal['if_available', 'never']|None" ] + """ + Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + """ request_overcapture: NotRequired[ "Literal['if_available', 'never']|None" ] + """ + Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + """ request_three_d_secure: NotRequired[ "Literal['any', 'automatic']|None" ] + """ + 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']|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`. + """ statement_descriptor_suffix_kana: NotRequired[ "Literal['']|str|None" ] + """ + 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|None" ] + """ + 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 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|None"] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ end_date: NotRequired["int|None"] + """ + 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|None"] + """ + 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']]|None"] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ class CreateParamsPaymentMethodOptionsCardInstallments(TypedDict): enabled: NotRequired["bool|None"] + """ + 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|None" ] + """ + The selected installment plan to use for this payment attempt. + This parameter can only be provided during confirmation. + """ 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`. + """ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): expires_after_days: NotRequired["int|None"] + """ + 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']|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 CreateParamsPaymentMethodOptionsBlik(TypedDict): code: NotRequired["str|None"] + """ + The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + """ class CreateParamsPaymentMethodOptionsBancontact(TypedDict): preferred_language: NotRequired[ "Literal['de', 'en', 'fr', 'nl']|None" ] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|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 CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|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 CreateParamsPaymentMethodOptionsAlipay(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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|None"] + """ + 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']|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 CreateParamsPaymentMethodOptionsAffirm(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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|None"] + """ + Preferred language of the Affirm authorization page that the customer is redirected to. + """ setup_future_usage: NotRequired["Literal['none']|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 CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodOptionsAcssDebitMandateOptions|None" ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|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`. + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, ): custom_mandate_url: NotRequired["Literal['']|str|None"] + """ + 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|None"] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ payment_schedule: NotRequired[ "Literal['combined', 'interval', 'sporadic']|None" ] + """ + Payment schedule for the mandate. + """ transaction_type: NotRequired[ "Literal['business', 'personal']|None" ] + """ + Transaction type of the mandate. + """ class CreateParamsPaymentMethodData(TypedDict): acss_debit: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataAcssDebit|None" ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ affirm: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataAffirm|None" ] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ afterpay_clearpay: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataAfterpayClearpay|None" ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ alipay: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataAlipay|None" ] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ au_becs_debit: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataAuBecsDebit|None" ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ bacs_debit: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataBacsDebit|None" ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ bancontact: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataBancontact|None" ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ billing_details: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataBillingDetails|None" ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ blik: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataBlik|None" ] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ boleto: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataBoleto|None" ] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ cashapp: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataCashapp|None" ] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ customer_balance: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataCustomerBalance|None" ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ eps: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataEps|None" ] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ fpx: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataFpx|None" ] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ giropay: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataGiropay|None" ] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ grabpay: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataGrabpay|None" ] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ ideal: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataIdeal|None" ] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ interac_present: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataInteracPresent|None" ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ klarna: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataKlarna|None" ] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ konbini: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataKonbini|None" ] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ link: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataLink|None" ] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ p24: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataP24|None" ] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ paynow: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataPaynow|None" ] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ paypal: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataPaypal|None" ] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ pix: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataPix|None" ] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ promptpay: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataPromptpay|None" ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ radar_options: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataRadarOptions|None" ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ sepa_debit: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataSepaDebit|None" ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ sofort: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataSofort|None" ] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ type: Literal[ "acss_debit", "affirm", @@ -1476,15 +3392,27 @@ class CreateParamsPaymentMethodData(TypedDict): "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|None" ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ wechat_pay: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataWechatPay|None" ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ zip: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataZip|None" ] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ class CreateParamsPaymentMethodDataZip(TypedDict): pass @@ -1496,19 +3424,43 @@ class CreateParamsPaymentMethodDataUsBankAccount(TypedDict): account_holder_type: NotRequired[ "Literal['company', 'individual']|None" ] + """ + Account holder type: individual or company. + """ account_number: NotRequired["str|None"] + """ + Account number of the bank account. + """ account_type: NotRequired["Literal['checking', 'savings']|None"] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ financial_connections_account: NotRequired["str|None"] + """ + The ID of a Financial Connections Account to use as a payment method. + """ routing_number: NotRequired["str|None"] + """ + Routing number of the bank account. + """ 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 CreateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str + """ + IBAN of the bank account. + """ class CreateParamsPaymentMethodDataRadarOptions(TypedDict): session: NotRequired["str|None"] + """ + 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 CreateParamsPaymentMethodDataPromptpay(TypedDict): pass @@ -1526,6 +3478,9 @@ 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']|None" ] + """ + The customer's bank. + """ class CreateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -1540,11 +3495,23 @@ class CreateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataKlarnaDob|None" ] + """ + Customer's date of birth + """ 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 CreateParamsPaymentMethodDataInteracPresent(TypedDict): pass @@ -1553,6 +3520,9 @@ 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']|None" ] + """ + The customer's bank. + """ class CreateParamsPaymentMethodDataGrabpay(TypedDict): pass @@ -1564,6 +3534,9 @@ class CreateParamsPaymentMethodDataFpx(TypedDict): account_holder_type: NotRequired[ "Literal['company', 'individual']|None" ] + """ + Account holder type for FPX transaction + """ bank: Literal[ "affin_bank", "agrobank", @@ -1588,11 +3561,17 @@ class CreateParamsPaymentMethodDataFpx(TypedDict): "standard_chartered", "uob", ] + """ + 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']|None" ] + """ + The customer's bank. + """ class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): pass @@ -1602,6 +3581,9 @@ class CreateParamsPaymentMethodDataCashapp(TypedDict): class CreateParamsPaymentMethodDataBoleto(TypedDict): tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ class CreateParamsPaymentMethodDataBlik(TypedDict): pass @@ -1610,28 +3592,70 @@ class CreateParamsPaymentMethodDataBillingDetails(TypedDict): address: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodDataBillingDetailsAddress|None" ] + """ + Billing address. + """ email: NotRequired["Literal['']|str|None"] + """ + Email address. + """ name: NotRequired["Literal['']|str|None"] + """ + Full name. + """ phone: NotRequired["Literal['']|str|None"] + """ + Billing phone number (including extension). + """ class CreateParamsPaymentMethodDataBillingDetailsAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreateParamsPaymentMethodDataBancontact(TypedDict): pass class CreateParamsPaymentMethodDataBacsDebit(TypedDict): account_number: NotRequired["str|None"] + """ + Account number of the bank account that the funds will be debited from. + """ sort_code: NotRequired["str|None"] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ 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 CreateParamsPaymentMethodDataAlipay(TypedDict): pass @@ -1644,243 +3668,591 @@ class CreateParamsPaymentMethodDataAffirm(TypedDict): 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 CreateParamsMandateData(TypedDict): customer_acceptance: "PaymentIntent.CreateParamsMandateDataCustomerAcceptance" + """ + This hash contains details about the customer acceptance of the Mandate. + """ class CreateParamsMandateDataCustomerAcceptance(TypedDict): accepted_at: NotRequired["int|None"] + """ + The time at which the customer accepted the Mandate. + """ offline: NotRequired[ "PaymentIntent.CreateParamsMandateDataCustomerAcceptanceOffline|None" ] + """ + If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + """ online: NotRequired[ "PaymentIntent.CreateParamsMandateDataCustomerAcceptanceOnline|None" ] + """ + 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 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 CreateParamsMandateDataCustomerAcceptanceOffline(TypedDict): pass class CreateParamsAutomaticPaymentMethods(TypedDict): allow_redirects: NotRequired["Literal['always', 'never']|None"] + """ + Controls whether this PaymentIntent will accept redirect-based payment methods. + + 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 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|None"] + """ + 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|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None" ] + """ + 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 IncrementAuthorizationParamsTransferData(TypedDict): amount: NotRequired["int|None"] + """ + The amount that will be transferred automatically when a charge succeeds. + """ class ListParams(RequestOptions): created: NotRequired["PaymentIntent.ListParamsCreated|int|None"] + """ + 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|None"] + """ + Only return PaymentIntents for the customer that this customer ID specifies. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): amount: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + Controls when the funds will be captured from the customer's account. + """ currency: NotRequired["str|None"] + """ + 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|None"] + """ + ID of the Customer this PaymentIntent belongs to, if one exists. + + Payment methods attached to other Customers cannot be used with this PaymentIntent. + + If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + """ description: NotRequired["str|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + The ID of the payment method configuration to use with this PaymentIntent. + """ payment_method_data: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodData|None" ] + """ + 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|None" ] + """ + Payment-method-specific configuration for this PaymentIntent. + """ payment_method_types: NotRequired["List[str]|None"] + """ + 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|None"] + """ + 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']|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`. + """ shipping: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsShipping|None" ] + """ + Shipping information for this PaymentIntent. + """ statement_descriptor: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + The amount that will be transferred automatically when a charge succeeds. + """ class ModifyParamsShipping(TypedDict): address: "PaymentIntent.ModifyParamsShippingAddress" + """ + Shipping address. + """ carrier: NotRequired["str|None"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ name: str + """ + Recipient name. + """ phone: NotRequired["str|None"] + """ + Recipient phone (including extension). + """ tracking_number: NotRequired["str|None"] + """ + 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|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class ModifyParamsPaymentMethodOptions(TypedDict): acss_debit: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAcssDebit|None" ] + """ + If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + """ affirm: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAffirm|None" ] + """ + If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + """ afterpay_clearpay: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAfterpayClearpay|None" ] + """ + If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + """ alipay: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAlipay|None" ] + """ + If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + """ au_becs_debit: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAuBecsDebit|None" ] + """ + 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|None" ] + """ + If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + """ bancontact: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsBancontact|None" ] + """ + If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + """ blik: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsBlik|None" ] + """ + If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + """ boleto: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsBoleto|None" ] + """ + If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + """ card: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCard|None" ] + """ + Configuration for any card payments attempted on this PaymentIntent. + """ card_present: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCardPresent|None" ] + """ + If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ cashapp: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCashapp|None" ] + """ + 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|None" ] + """ + If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + """ eps: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsEps|None" ] + """ + If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + """ fpx: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsFpx|None" ] + """ + If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + """ giropay: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsGiropay|None" ] + """ + If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + """ grabpay: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsGrabpay|None" ] + """ + If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + """ ideal: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsIdeal|None" ] + """ + If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + """ interac_present: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsInteracPresent|None" ] + """ + If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ klarna: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsKlarna|None" ] + """ + If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + """ konbini: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsKonbini|None" ] + """ + If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + """ link: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsLink|None" ] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ oxxo: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsOxxo|None" ] + """ + If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + """ p24: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsP24|None" ] + """ + If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + """ paynow: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPaynow|None" ] + """ + If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + """ paypal: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPaypal|None" ] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ pix: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPix|None" ] + """ + If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + """ promptpay: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPromptpay|None" ] + """ + If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + """ sepa_debit: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsSepaDebit|None" ] + """ + If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ sofort: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsSofort|None" ] + """ + If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + """ us_bank_account: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccount|None" ] + """ + 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|None" ] + """ + If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + """ zip: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsZip|None" ] + """ + If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + """ class ModifyParamsPaymentMethodOptionsZip(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 ModifyParamsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired["str|None"] + """ + 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']|None"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ class ModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): financial_connections: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections|None" ] + """ + Additional fields for Financial Connections Session creation + """ networks: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountNetworks|None" ] + """ + Additional fields for network related functions + """ preferred_settlement_speed: NotRequired[ "Literal['']|Literal['fastest', 'standard']|None" ] + """ + Preferred transaction settlement speed + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|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`. + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class ModifyParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): requested: NotRequired[ "List[Literal['ach', 'us_domestic_wire']]|None" ] + """ + Triggers validations to run across the selected networks + """ class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, @@ -1888,24 +4260,57 @@ class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( permissions: NotRequired[ "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]|None" ] + """ + 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']]|None"] + """ + List of data features that you would like to retrieve upon account creation. + """ return_url: NotRequired["str|None"] + """ + 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']|None" ] + """ + Language shown to the payer on redirect. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 ModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions|None" ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|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 ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions( TypedDict, @@ -1914,54 +4319,191 @@ class ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions( class ModifyParamsPaymentMethodOptionsPromptpay(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 ModifyParamsPaymentMethodOptionsPix(TypedDict): expires_after_seconds: NotRequired["int|None"] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ expires_at: NotRequired["int|None"] + """ + 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']|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 ModifyParamsPaymentMethodOptionsPaypal(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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']|None" ] + """ + [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + """ reference: NotRequired["str|None"] + """ + 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|None"] + """ + The risk correlation ID for an on-session payment using a saved PayPal payment method. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 ModifyParamsPaymentMethodOptionsPaynow(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 ModifyParamsPaymentMethodOptionsP24(TypedDict): setup_future_usage: NotRequired["Literal['none']|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`. + """ tos_shown_and_accepted: NotRequired["bool|None"] + """ + Confirm that the payer has accepted the P24 terms and conditions. + """ class ModifyParamsPaymentMethodOptionsOxxo(TypedDict): expires_after_days: NotRequired["int|None"] + """ + 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']|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 ModifyParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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|None"] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 ModifyParamsPaymentMethodOptionsKonbini(TypedDict): confirmation_number: NotRequired["Literal['']|str|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + """ setup_future_usage: NotRequired["Literal['none']|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 ModifyParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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']|None" ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ setup_future_usage: NotRequired["Literal['none']|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 ModifyParamsPaymentMethodOptionsInteracPresent(TypedDict): pass @@ -1970,25 +4512,85 @@ class ModifyParamsPaymentMethodOptionsIdeal(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 ModifyParamsPaymentMethodOptionsGrabpay(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 ModifyParamsPaymentMethodOptionsGiropay(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 ModifyParamsPaymentMethodOptionsFpx(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 ModifyParamsPaymentMethodOptionsEps(TypedDict): setup_future_usage: NotRequired["Literal['none']|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 ModifyParamsPaymentMethodOptionsCustomerBalance(TypedDict): bank_transfer: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer|None" ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ funding_type: NotRequired["Literal['bank_transfer']|None"] + """ + 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']|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 ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer( TypedDict, @@ -1996,9 +4598,17 @@ class ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer( eu_bank_transfer: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer|None" ] + """ + Configuration for the eu_bank_transfer funding type. + """ requested_address_types: NotRequired[ "List[Literal['aba', 'iban', 'sepa', 'sort_code', 'spei', 'swift', 'zengin']]|None" ] + """ + 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", @@ -2006,245 +4616,596 @@ class ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer( "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 ModifyParamsPaymentMethodOptionsCashapp(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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']|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 ModifyParamsPaymentMethodOptionsCardPresent(TypedDict): request_extended_authorization: NotRequired["bool|None"] + """ + 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: NotRequired[ "Literal['if_available', 'never']|None" ] + """ + Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + """ request_incremental_authorization_support: NotRequired["bool|None"] + """ + 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']|None" ] + """ + This field was released by mistake and will be removed in the next major version + """ class ModifyParamsPaymentMethodOptionsCard(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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|None"] + """ + 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|None" ] + """ + 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|None" ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ moto: NotRequired["bool|None"] + """ + 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']|None" ] + """ + 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']|None" ] + """ + 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']|None" ] + """ + Request ability to [increment](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + """ request_multicapture: NotRequired[ "Literal['if_available', 'never']|None" ] + """ + Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + """ request_overcapture: NotRequired[ "Literal['if_available', 'never']|None" ] + """ + Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + """ request_three_d_secure: NotRequired[ "Literal['any', 'automatic']|None" ] + """ + 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']|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`. + """ statement_descriptor_suffix_kana: NotRequired[ "Literal['']|str|None" ] + """ + 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|None" ] + """ + 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|None"] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ end_date: NotRequired["int|None"] + """ + 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|None"] + """ + 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']]|None"] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ class ModifyParamsPaymentMethodOptionsCardInstallments(TypedDict): enabled: NotRequired["bool|None"] + """ + 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|None" ] + """ + 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 ModifyParamsPaymentMethodOptionsBoleto(TypedDict): expires_after_days: NotRequired["int|None"] + """ + 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']|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 ModifyParamsPaymentMethodOptionsBlik(TypedDict): code: NotRequired["str|None"] + """ + 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']|None" ] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 ModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|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 ModifyParamsPaymentMethodOptionsAuBecsDebit(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|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 ModifyParamsPaymentMethodOptionsAlipay(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']|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 ModifyParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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|None"] + """ + 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']|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 ModifyParamsPaymentMethodOptionsAffirm(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']|None"] + """ + 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 `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|None"] + """ + Preferred language of the Affirm authorization page that the customer is redirected to. + """ setup_future_usage: NotRequired["Literal['none']|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 ModifyParamsPaymentMethodOptionsAcssDebit(TypedDict): mandate_options: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions|None" ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|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`. + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, ): custom_mandate_url: NotRequired["Literal['']|str|None"] + """ + 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|None"] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ payment_schedule: NotRequired[ "Literal['combined', 'interval', 'sporadic']|None" ] + """ + Payment schedule for the mandate. + """ transaction_type: NotRequired[ "Literal['business', 'personal']|None" ] + """ + Transaction type of the mandate. + """ class ModifyParamsPaymentMethodData(TypedDict): acss_debit: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataAcssDebit|None" ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ affirm: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataAffirm|None" ] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ afterpay_clearpay: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataAfterpayClearpay|None" ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ alipay: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataAlipay|None" ] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ au_becs_debit: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataAuBecsDebit|None" ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ bacs_debit: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataBacsDebit|None" ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ bancontact: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataBancontact|None" ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ billing_details: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataBillingDetails|None" ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ blik: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataBlik|None" ] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ boleto: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataBoleto|None" ] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ cashapp: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataCashapp|None" ] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ customer_balance: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataCustomerBalance|None" ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ eps: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataEps|None" ] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ fpx: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataFpx|None" ] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ giropay: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataGiropay|None" ] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ grabpay: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataGrabpay|None" ] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ ideal: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataIdeal|None" ] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ interac_present: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataInteracPresent|None" ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ klarna: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataKlarna|None" ] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ konbini: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataKonbini|None" ] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ link: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataLink|None" ] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ p24: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataP24|None" ] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ paynow: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataPaynow|None" ] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ paypal: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataPaypal|None" ] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ pix: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataPix|None" ] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ promptpay: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataPromptpay|None" ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ radar_options: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataRadarOptions|None" ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ sepa_debit: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataSepaDebit|None" ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ sofort: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataSofort|None" ] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ type: Literal[ "acss_debit", "affirm", @@ -2277,15 +5238,27 @@ class ModifyParamsPaymentMethodData(TypedDict): "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|None" ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ wechat_pay: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataWechatPay|None" ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ zip: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataZip|None" ] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ class ModifyParamsPaymentMethodDataZip(TypedDict): pass @@ -2297,19 +5270,43 @@ class ModifyParamsPaymentMethodDataUsBankAccount(TypedDict): account_holder_type: NotRequired[ "Literal['company', 'individual']|None" ] + """ + Account holder type: individual or company. + """ account_number: NotRequired["str|None"] + """ + Account number of the bank account. + """ account_type: NotRequired["Literal['checking', 'savings']|None"] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ financial_connections_account: NotRequired["str|None"] + """ + The ID of a Financial Connections Account to use as a payment method. + """ routing_number: NotRequired["str|None"] + """ + 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 ModifyParamsPaymentMethodDataSepaDebit(TypedDict): iban: str + """ + IBAN of the bank account. + """ class ModifyParamsPaymentMethodDataRadarOptions(TypedDict): session: NotRequired["str|None"] + """ + 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 @@ -2327,6 +5324,9 @@ 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']|None" ] + """ + The customer's bank. + """ class ModifyParamsPaymentMethodDataOxxo(TypedDict): pass @@ -2341,11 +5341,23 @@ class ModifyParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataKlarnaDob|None" ] + """ + 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 ModifyParamsPaymentMethodDataInteracPresent(TypedDict): pass @@ -2354,6 +5366,9 @@ 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']|None" ] + """ + The customer's bank. + """ class ModifyParamsPaymentMethodDataGrabpay(TypedDict): pass @@ -2365,6 +5380,9 @@ class ModifyParamsPaymentMethodDataFpx(TypedDict): account_holder_type: NotRequired[ "Literal['company', 'individual']|None" ] + """ + Account holder type for FPX transaction + """ bank: Literal[ "affin_bank", "agrobank", @@ -2389,11 +5407,17 @@ class ModifyParamsPaymentMethodDataFpx(TypedDict): "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']|None" ] + """ + The customer's bank. + """ class ModifyParamsPaymentMethodDataCustomerBalance(TypedDict): pass @@ -2403,6 +5427,9 @@ class ModifyParamsPaymentMethodDataCashapp(TypedDict): 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 @@ -2411,28 +5438,70 @@ class ModifyParamsPaymentMethodDataBillingDetails(TypedDict): address: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodDataBillingDetailsAddress|None" ] + """ + Billing address. + """ email: NotRequired["Literal['']|str|None"] + """ + Email address. + """ name: NotRequired["Literal['']|str|None"] + """ + Full name. + """ phone: NotRequired["Literal['']|str|None"] + """ + Billing phone number (including extension). + """ class ModifyParamsPaymentMethodDataBillingDetailsAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class ModifyParamsPaymentMethodDataBancontact(TypedDict): pass class ModifyParamsPaymentMethodDataBacsDebit(TypedDict): account_number: NotRequired["str|None"] + """ + Account number of the bank account that the funds will be debited from. + """ sort_code: NotRequired["str|None"] + """ + 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 ModifyParamsPaymentMethodDataAlipay(TypedDict): pass @@ -2445,32 +5514,89 @@ class ModifyParamsPaymentMethodDataAffirm(TypedDict): 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|None"] + """ + The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class VerifyMicrodepositsParams(RequestOptions): amounts: NotRequired["List[int]|None"] + """ + Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + """ descriptor_code: NotRequired["str|None"] + """ + A six-character code starting with SM present in the microdeposit sent to the bank account. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class SearchParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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 + """ + 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). + """ amount_capturable: int + """ + Amount that can be captured from this PaymentIntent. + """ amount_details: Optional[StripeObject] amount_received: int + """ + Amount that this PaymentIntent collects. + """ application: Optional[ExpandableField["Application"]] + """ + ID of the Connect application that created the PaymentIntent. + """ application_fee_amount: Optional[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: Optional[StripeObject] + """ + Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) + """ canceled_at: Optional[int] + """ + Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. + """ cancellation_reason: Optional[ Literal[ "abandoned", @@ -2482,36 +5608,132 @@ class SearchParams(RequestOptions): "void_invoice", ] ] + """ + Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). + """ capture_method: Literal["automatic", "automatic_async", "manual"] + """ + Controls when the funds will be captured from the customer's account. + """ client_secret: Optional[str] + """ + The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. + + The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + + Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. + """ confirmation_method: Literal["automatic", "manual"] created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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: Optional[ExpandableField["Customer"]] + """ + ID of the Customer this PaymentIntent belongs to, if one exists. + + Payment methods attached to other Customers cannot be used with this PaymentIntent. + + If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + """ description: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ id: str + """ + Unique identifier for the object. + """ invoice: Optional[ExpandableField["Invoice"]] + """ + ID of the invoice that created this PaymentIntent, if it exists. + """ last_payment_error: Optional[StripeObject] + """ + The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. + """ latest_charge: Optional[ExpandableField["Charge"]] + """ + The latest charge created by this PaymentIntent. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). + """ next_action: Optional[StripeObject] + """ + If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. + """ object: Literal["payment_intent"] + """ + String representing the object's type. Objects of the same type share the same value. + """ on_behalf_of: Optional[ExpandableField["Account"]] + """ + The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + """ payment_method: Optional[ExpandableField["PaymentMethod"]] + """ + ID of the payment method used in this PaymentIntent. + """ payment_method_configuration_details: Optional[StripeObject] + """ + Information about the payment method configuration used for this PaymentIntent. + """ payment_method_options: Optional[StripeObject] + """ + Payment-method-specific configuration for this PaymentIntent. + """ payment_method_types: List[str] + """ + The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. + """ processing: Optional[StripeObject] + """ + If present, this property tells you about the processing state of the payment. + """ receipt_email: Optional[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). + """ review: Optional[ExpandableField["Review"]] + """ + ID of the review associated with this PaymentIntent, if any. + """ setup_future_usage: Optional[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. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ shipping: Optional[StripeObject] + """ + Shipping information for this PaymentIntent. + """ source: Optional[ ExpandableField[Union["Account", "BankAccount", "Card", "Source"]] ] + """ + This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. + """ statement_descriptor: Optional[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: Optional[str] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + """ status: Literal[ "canceled", "processing", @@ -2521,8 +5743,17 @@ class SearchParams(RequestOptions): "requires_payment_method", "succeeded", ] + """ + Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). + """ transfer_data: Optional[StripeObject] + """ + The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ transfer_group: Optional[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). + """ @classmethod def _cls_apply_customer_balance( diff --git a/stripe/api_resources/payment_link.py b/stripe/api_resources/payment_link.py index b470e5c44..840f6c84d 100644 --- a/stripe/api_resources/payment_link.py +++ b/stripe/api_resources/payment_link.py @@ -47,78 +47,186 @@ class CreateParams(RequestOptions): after_completion: NotRequired[ "PaymentLink.CreateParamsAfterCompletion|None" ] + """ + Behavior after the purchase is complete. + """ allow_promotion_codes: NotRequired["bool|None"] + """ + Enables user redeemable promotion codes. + """ application_fee_amount: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None" ] + """ + Configuration for automatic tax collection. + """ billing_address_collection: NotRequired[ "Literal['auto', 'required']|None" ] + """ + Configuration for collecting the customer's billing address. + """ consent_collection: NotRequired[ "PaymentLink.CreateParamsConsentCollection|None" ] + """ + Configure fields to gather active consent from customers. + """ currency: NotRequired["str|None"] + """ + 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]|None" ] + """ + Collect additional information from your customer using custom fields. Up to 2 fields are supported. + """ custom_text: NotRequired["PaymentLink.CreateParamsCustomText|None"] + """ + Display additional text for your customers using custom text. + """ customer_creation: NotRequired[ "Literal['always', 'if_required']|None" ] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ invoice_creation: NotRequired[ "PaymentLink.CreateParamsInvoiceCreation|None" ] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The account on behalf of which to charge. + """ payment_intent_data: NotRequired[ "PaymentLink.CreateParamsPaymentIntentData|None" ] + """ + A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + """ payment_method_collection: NotRequired[ "Literal['always', 'if_required']|None" ] + """ + 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']]|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + Configuration for collecting the customer's shipping address. + """ shipping_options: NotRequired[ "List[PaymentLink.CreateParamsShippingOption]|None" ] + """ + 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']|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + Controls tax ID collection during checkout. + """ transfer_data: NotRequired[ "PaymentLink.CreateParamsTransferData|None" ] + """ + 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|None"] + """ + 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|None"] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + 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|None"] + """ + 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|None"] + """ + The ID of the Shipping Rate to use for this shipping option. + """ class CreateParamsShippingAddressCollection(TypedDict): allowed_countries: List[ @@ -362,50 +470,124 @@ class CreateParamsShippingAddressCollection(TypedDict): "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']|None" ] + """ + Controls when the funds will be captured from the customer's account. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None"] + """ + The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999. + """ minimum: NotRequired["int|None"] + """ + 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|None" ] + """ + Invoice PDF configuration. + """ class CreateParamsInvoiceCreationInvoiceData(TypedDict): account_tax_ids: NotRequired["Literal['']|List[str]|None"] + """ + The account tax IDs associated with the invoice. + """ custom_fields: NotRequired[ "Literal['']|List[PaymentLink.CreateParamsInvoiceCreationInvoiceDataCustomField]|None" ] + """ + Default custom fields to be displayed on invoices for this customer. + """ description: NotRequired["str|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ footer: NotRequired["str|None"] + """ + Default footer to be displayed on invoices for this customer. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + Default options for invoice PDF rendering for this customer. + """ class CreateParamsInvoiceCreationInvoiceDataRenderingOptions( TypedDict @@ -413,143 +595,330 @@ class CreateParamsInvoiceCreationInvoiceDataRenderingOptions( amount_tax_display: NotRequired[ "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']|None" ] + """ + 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 CreateParamsCustomText(TypedDict): shipping_address: NotRequired[ "Literal['']|PaymentLink.CreateParamsCustomTextShippingAddress|None" ] + """ + Custom text that should be displayed alongside shipping address collection. + """ submit: NotRequired[ "Literal['']|PaymentLink.CreateParamsCustomTextSubmit|None" ] + """ + Custom text that should be displayed alongside the payment confirmation button. + """ terms_of_service_acceptance: NotRequired[ "Literal['']|PaymentLink.CreateParamsCustomTextTermsOfServiceAcceptance|None" ] + """ + 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 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 CreateParamsCustomField(TypedDict): dropdown: NotRequired[ "PaymentLink.CreateParamsCustomFieldDropdown|None" ] + """ + 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|None" ] + """ + Configuration for `type=numeric` fields. + """ optional: NotRequired["bool|None"] + """ + Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + """ text: NotRequired["PaymentLink.CreateParamsCustomFieldText|None"] + """ + Configuration for `type=text` fields. + """ type: Literal["dropdown", "numeric", "text"] + """ + The type of the field. + """ class CreateParamsCustomFieldText(TypedDict): maximum_length: NotRequired["int|None"] + """ + The maximum character length constraint for the customer's input. + """ minimum_length: NotRequired["int|None"] + """ + The minimum character length requirement for the customer's input. + """ class CreateParamsCustomFieldNumeric(TypedDict): maximum_length: NotRequired["int|None"] + """ + The maximum character length constraint for the customer's input. + """ minimum_length: NotRequired["int|None"] + """ + 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 CreateParamsCustomFieldDropdown(TypedDict): options: List["PaymentLink.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 CreateParamsConsentCollection(TypedDict): promotions: NotRequired["Literal['auto', 'none']|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']|None"] + """ + 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 + """ + If `true`, tax will be calculated automatically using the customer's location. + """ class CreateParamsAfterCompletion(TypedDict): hosted_confirmation: NotRequired[ "PaymentLink.CreateParamsAfterCompletionHostedConfirmation|None" ] + """ + Configuration when `type=hosted_confirmation`. + """ redirect: NotRequired[ "PaymentLink.CreateParamsAfterCompletionRedirect|None" ] + """ + Configuration when `type=redirect`. + """ type: Literal["hosted_confirmation", "redirect"] + """ + The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. + """ 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 CreateParamsAfterCompletionHostedConfirmation(TypedDict): custom_message: NotRequired["str|None"] + """ + A custom message to display to the customer after the purchase is complete. + """ class ListParams(RequestOptions): active: NotRequired["bool|None"] + """ + Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + Behavior after the purchase is complete. + """ allow_promotion_codes: NotRequired["bool|None"] + """ + Enables user redeemable promotion codes. + """ automatic_tax: NotRequired[ "PaymentLink.ModifyParamsAutomaticTax|None" ] + """ + Configuration for automatic tax collection. + """ billing_address_collection: NotRequired[ "Literal['auto', 'required']|None" ] + """ + Configuration for collecting the customer's billing address. + """ custom_fields: NotRequired[ "Literal['']|List[PaymentLink.ModifyParamsCustomField]|None" ] + """ + Collect additional information from your customer using custom fields. Up to 2 fields are supported. + """ custom_text: NotRequired["PaymentLink.ModifyParamsCustomText|None"] + """ + Display additional text for your customers using custom text. + """ customer_creation: NotRequired[ "Literal['always', 'if_required']|None" ] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ invoice_creation: NotRequired[ "PaymentLink.ModifyParamsInvoiceCreation|None" ] + """ + Generate a post-purchase Invoice for one-time payments. + """ line_items: NotRequired[ "List[PaymentLink.ModifyParamsLineItem]|None" ] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + """ payment_method_collection: NotRequired[ "Literal['always', 'if_required']|None" ] + """ + 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']]|None" ] + """ + 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|None" ] + """ + Configuration for collecting the customer's shipping address. + """ subscription_data: NotRequired[ "PaymentLink.ModifyParamsSubscriptionData|None" ] + """ + 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]|None"] + """ + 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[ @@ -793,41 +1162,96 @@ class ModifyParamsShippingAddressCollection(TypedDict): "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 ModifyParamsPaymentIntentData(TypedDict): metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999. + """ minimum: NotRequired["int|None"] + """ + 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|None" ] + """ + Invoice PDF configuration. + """ class ModifyParamsInvoiceCreationInvoiceData(TypedDict): account_tax_ids: NotRequired["Literal['']|List[str]|None"] + """ + The account tax IDs associated with the invoice. + """ custom_fields: NotRequired[ "Literal['']|List[PaymentLink.ModifyParamsInvoiceCreationInvoiceDataCustomField]|None" ] + """ + Default custom fields to be displayed on invoices for this customer. + """ description: NotRequired["str|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ footer: NotRequired["str|None"] + """ + Default footer to be displayed on invoices for this customer. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + Default options for invoice PDF rendering for this customer. + """ class ModifyParamsInvoiceCreationInvoiceDataRenderingOptions( TypedDict @@ -835,106 +1259,259 @@ class ModifyParamsInvoiceCreationInvoiceDataRenderingOptions( amount_tax_display: NotRequired[ "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']|None" ] + """ + 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 ModifyParamsCustomText(TypedDict): shipping_address: NotRequired[ "Literal['']|PaymentLink.ModifyParamsCustomTextShippingAddress|None" ] + """ + Custom text that should be displayed alongside shipping address collection. + """ submit: NotRequired[ "Literal['']|PaymentLink.ModifyParamsCustomTextSubmit|None" ] + """ + Custom text that should be displayed alongside the payment confirmation button. + """ terms_of_service_acceptance: NotRequired[ "Literal['']|PaymentLink.ModifyParamsCustomTextTermsOfServiceAcceptance|None" ] + """ + 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 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 ModifyParamsCustomField(TypedDict): dropdown: NotRequired[ "PaymentLink.ModifyParamsCustomFieldDropdown|None" ] + """ + 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|None" ] + """ + Configuration for `type=numeric` fields. + """ optional: NotRequired["bool|None"] + """ + Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + """ text: NotRequired["PaymentLink.ModifyParamsCustomFieldText|None"] + """ + Configuration for `type=text` fields. + """ type: Literal["dropdown", "numeric", "text"] + """ + The type of the field. + """ class ModifyParamsCustomFieldText(TypedDict): maximum_length: NotRequired["int|None"] + """ + The maximum character length constraint for the customer's input. + """ minimum_length: NotRequired["int|None"] + """ + The minimum character length requirement for the customer's input. + """ class ModifyParamsCustomFieldNumeric(TypedDict): maximum_length: NotRequired["int|None"] + """ + The maximum character length constraint for the customer's input. + """ minimum_length: NotRequired["int|None"] + """ + 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 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 ModifyParamsAutomaticTax(TypedDict): enabled: bool + """ + If `true`, tax will be calculated automatically using the customer's location. + """ class ModifyParamsAfterCompletion(TypedDict): hosted_confirmation: NotRequired[ "PaymentLink.ModifyParamsAfterCompletionHostedConfirmation|None" ] + """ + Configuration when `type=hosted_confirmation`. + """ redirect: NotRequired[ "PaymentLink.ModifyParamsAfterCompletionRedirect|None" ] + """ + 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 ModifyParamsAfterCompletionHostedConfirmation(TypedDict): custom_message: NotRequired["str|None"] + """ + A custom message to display to the customer after the purchase is complete. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ active: 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: StripeObject allow_promotion_codes: bool + """ + Whether user redeemable promotion codes are enabled. + """ application: Optional[ExpandableField["Application"]] + """ + The ID of the Connect application that created the Payment Link. + """ application_fee_amount: Optional[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. + """ application_fee_percent: Optional[float] + """ + This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. + """ automatic_tax: StripeObject billing_address_collection: Literal["auto", "required"] + """ + Configuration for collecting the customer's billing address. + """ consent_collection: Optional[StripeObject] + """ + When set, provides configuration to gather active consent from customers. + """ 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). + """ custom_fields: List[StripeObject] + """ + Collect additional information from your customer using custom fields. Up to 2 fields are supported. + """ custom_text: StripeObject customer_creation: Literal["always", "if_required"] + """ + Configuration for Customer creation during checkout. + """ id: str + """ + Unique identifier for the object. + """ invoice_creation: Optional[StripeObject] + """ + Configuration for creating invoice for payment mode payment links. + """ line_items: Optional[ListObject["LineItem"]] + """ + The line items representing what is being sold. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["payment_link"] + """ + String representing the object's type. Objects of the same type share the same value. + """ on_behalf_of: Optional[ExpandableField["Account"]] + """ + The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + """ payment_intent_data: Optional[StripeObject] + """ + Indicates the parameters to be passed to PaymentIntent creation during checkout. + """ payment_method_collection: Literal["always", "if_required"] + """ + Configuration for collecting a payment method during checkout. + """ payment_method_types: Optional[ List[ Literal[ @@ -969,14 +1546,35 @@ class RetrieveParams(RequestOptions): ] ] ] + """ + The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + """ phone_number_collection: StripeObject shipping_address_collection: Optional[StripeObject] + """ + Configuration for collecting the customer's shipping address. + """ shipping_options: List[StripeObject] + """ + The shipping rate options applied to the session. + """ submit_type: Literal["auto", "book", "donate", "pay"] + """ + Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. + """ subscription_data: Optional[StripeObject] + """ + 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: StripeObject transfer_data: Optional[StripeObject] + """ + The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + """ url: str + """ + The public URL that can be shared with customers. + """ @classmethod def create( diff --git a/stripe/api_resources/payment_method.py b/stripe/api_resources/payment_method.py index 308822bf7..b5c3fee34 100644 --- a/stripe/api_resources/payment_method.py +++ b/stripe/api_resources/payment_method.py @@ -43,68 +43,191 @@ class PaymentMethod( class AttachParams(RequestOptions): customer: str + """ + The ID of the customer to which to attach the PaymentMethod. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class CreateParams(RequestOptions): acss_debit: NotRequired["PaymentMethod.CreateParamsAcssDebit|None"] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ affirm: NotRequired["PaymentMethod.CreateParamsAffirm|None"] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ afterpay_clearpay: NotRequired[ "PaymentMethod.CreateParamsAfterpayClearpay|None" ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ alipay: NotRequired["PaymentMethod.CreateParamsAlipay|None"] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ au_becs_debit: NotRequired[ "PaymentMethod.CreateParamsAuBecsDebit|None" ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ bacs_debit: NotRequired["PaymentMethod.CreateParamsBacsDebit|None"] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ bancontact: NotRequired[ "PaymentMethod.CreateParamsBancontact|None" ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ billing_details: NotRequired[ "PaymentMethod.CreateParamsBillingDetails|None" ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ blik: NotRequired["PaymentMethod.CreateParamsBlik|None"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ boleto: NotRequired["PaymentMethod.CreateParamsBoleto|None"] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ card: NotRequired[ "PaymentMethod.CreateParamsCard|PaymentMethod.CreateParamsCard2|None" ] + """ + 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|None"] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ customer: NotRequired["str|None"] + """ + The `Customer` to whom the original PaymentMethod is attached. + """ customer_balance: NotRequired[ "PaymentMethod.CreateParamsCustomerBalance|None" ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ eps: NotRequired["PaymentMethod.CreateParamsEps|None"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ fpx: NotRequired["PaymentMethod.CreateParamsFpx|None"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ giropay: NotRequired["PaymentMethod.CreateParamsGiropay|None"] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ grabpay: NotRequired["PaymentMethod.CreateParamsGrabpay|None"] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ ideal: NotRequired["PaymentMethod.CreateParamsIdeal|None"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ interac_present: NotRequired[ "PaymentMethod.CreateParamsInteracPresent|None" ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ klarna: NotRequired["PaymentMethod.CreateParamsKlarna|None"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ konbini: NotRequired["PaymentMethod.CreateParamsKonbini|None"] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ link: NotRequired["PaymentMethod.CreateParamsLink|None"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ p24: NotRequired["PaymentMethod.CreateParamsP24|None"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ payment_method: NotRequired["str|None"] + """ + The PaymentMethod to share. + """ paynow: NotRequired["PaymentMethod.CreateParamsPaynow|None"] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ paypal: NotRequired["PaymentMethod.CreateParamsPaypal|None"] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ pix: NotRequired["PaymentMethod.CreateParamsPix|None"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ promptpay: NotRequired["PaymentMethod.CreateParamsPromptpay|None"] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ radar_options: NotRequired[ "PaymentMethod.CreateParamsRadarOptions|None" ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ sepa_debit: NotRequired["PaymentMethod.CreateParamsSepaDebit|None"] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ sofort: NotRequired["PaymentMethod.CreateParamsSofort|None"] + """ + 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', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay', 'zip']|None" ] + """ + 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|None" ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ wechat_pay: NotRequired["PaymentMethod.CreateParamsWechatPay|None"] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ zip: NotRequired["PaymentMethod.CreateParamsZip|None"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ class CreateParamsZip(TypedDict): pass @@ -116,19 +239,43 @@ class CreateParamsUsBankAccount(TypedDict): account_holder_type: NotRequired[ "Literal['company', 'individual']|None" ] + """ + Account holder type: individual or company. + """ account_number: NotRequired["str|None"] + """ + Account number of the bank account. + """ account_type: NotRequired["Literal['checking', 'savings']|None"] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ financial_connections_account: NotRequired["str|None"] + """ + The ID of a Financial Connections Account to use as a payment method. + """ routing_number: NotRequired["str|None"] + """ + 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 CreateParamsSepaDebit(TypedDict): iban: str + """ + IBAN of the bank account. + """ class CreateParamsRadarOptions(TypedDict): session: NotRequired["str|None"] + """ + 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 @@ -146,6 +293,9 @@ 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']|None" ] + """ + The customer's bank. + """ class CreateParamsOxxo(TypedDict): pass @@ -158,11 +308,23 @@ class CreateParamsKonbini(TypedDict): class CreateParamsKlarna(TypedDict): dob: NotRequired["PaymentMethod.CreateParamsKlarnaDob|None"] + """ + 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 CreateParamsInteracPresent(TypedDict): pass @@ -171,6 +333,9 @@ 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']|None" ] + """ + The customer's bank. + """ class CreateParamsGrabpay(TypedDict): pass @@ -182,6 +347,9 @@ class CreateParamsFpx(TypedDict): account_holder_type: NotRequired[ "Literal['company', 'individual']|None" ] + """ + Account holder type for FPX transaction + """ bank: Literal[ "affin_bank", "agrobank", @@ -206,11 +374,17 @@ class CreateParamsFpx(TypedDict): "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']|None" ] + """ + The customer's bank. + """ class CreateParamsCustomerBalance(TypedDict): pass @@ -220,15 +394,33 @@ class CreateParamsCashapp(TypedDict): 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|None"] + """ + 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 CreateParamsBlik(TypedDict): pass @@ -237,28 +429,70 @@ class CreateParamsBillingDetails(TypedDict): address: NotRequired[ "Literal['']|PaymentMethod.CreateParamsBillingDetailsAddress|None" ] + """ + Billing address. + """ email: NotRequired["Literal['']|str|None"] + """ + Email address. + """ name: NotRequired["Literal['']|str|None"] + """ + Full name. + """ phone: NotRequired["Literal['']|str|None"] + """ + Billing phone number (including extension). + """ class CreateParamsBillingDetailsAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreateParamsBancontact(TypedDict): pass class CreateParamsBacsDebit(TypedDict): account_number: NotRequired["str|None"] + """ + Account number of the bank account that the funds will be debited from. + """ sort_code: NotRequired["str|None"] + """ + 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 CreateParamsAlipay(TypedDict): pass @@ -271,64 +505,154 @@ class CreateParamsAffirm(TypedDict): 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ListParams(RequestOptions): customer: NotRequired["str|None"] + """ + The ID of the customer whose PaymentMethods will be retrieved. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay', 'zip']|None" ] + """ + 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|None" ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ card: NotRequired["PaymentMethod.ModifyParamsCard|None"] + """ + If this is a `card` PaymentMethod, this hash contains the user's card details. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ link: NotRequired["PaymentMethod.ModifyParamsLink|None"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + 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']|None" ] + """ + Bank account type. + """ class ModifyParamsLink(TypedDict): pass class ModifyParamsCard(TypedDict): exp_month: NotRequired["int|None"] + """ + Two-digit number representing the card's expiration month. + """ exp_year: NotRequired["int|None"] + """ + Four-digit number representing the card's expiration year. + """ class ModifyParamsBillingDetails(TypedDict): address: NotRequired[ "Literal['']|PaymentMethod.ModifyParamsBillingDetailsAddress|None" ] + """ + Billing address. + """ email: NotRequired["Literal['']|str|None"] + """ + Email address. + """ name: NotRequired["Literal['']|str|None"] + """ + Full name. + """ phone: NotRequired["Literal['']|str|None"] + """ + Billing phone number (including extension). + """ class ModifyParamsBillingDetailsAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ acss_debit: Optional[StripeObject] affirm: Optional[StripeObject] @@ -344,21 +668,39 @@ class RetrieveParams(RequestOptions): card_present: Optional[StripeObject] cashapp: Optional[StripeObject] created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ customer: Optional[ExpandableField["Customer"]] + """ + The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. + """ customer_balance: Optional[StripeObject] eps: Optional[StripeObject] fpx: Optional[StripeObject] giropay: Optional[StripeObject] grabpay: Optional[StripeObject] id: str + """ + Unique identifier for the object. + """ ideal: Optional[StripeObject] interac_present: Optional[StripeObject] klarna: Optional[StripeObject] konbini: Optional[StripeObject] link: Optional[StripeObject] livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["payment_method"] + """ + String representing the object's type. Objects of the same type share the same value. + """ oxxo: Optional[StripeObject] p24: Optional[StripeObject] paynow: Optional[StripeObject] @@ -366,6 +708,9 @@ class RetrieveParams(RequestOptions): pix: Optional[StripeObject] promptpay: Optional[StripeObject] radar_options: Optional[StripeObject] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ sepa_debit: Optional[StripeObject] sofort: Optional[StripeObject] type: Literal[ @@ -403,6 +748,9 @@ class RetrieveParams(RequestOptions): "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: Optional[StripeObject] wechat_pay: Optional[StripeObject] zip: Optional[StripeObject] diff --git a/stripe/api_resources/payment_method_configuration.py b/stripe/api_resources/payment_method_configuration.py index fb55bc580..86f2e7512 100644 --- a/stripe/api_resources/payment_method_configuration.py +++ b/stripe/api_resources/payment_method_configuration.py @@ -50,736 +50,1363 @@ class CreateParams(RequestOptions): acss_debit: NotRequired[ "PaymentMethodConfiguration.CreateParamsAcssDebit|None" ] + """ + 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|None" ] + """ + [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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ fpx: NotRequired["PaymentMethodConfiguration.CreateParamsFpx|None"] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + [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|None"] + """ + Configuration name. + """ oxxo: NotRequired[ "PaymentMethodConfiguration.CreateParamsOxxo|None" ] + """ + 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|None"] + """ + 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|None"] + """ + Configuration's parent configuration. Specify to create a child configuration. + """ paynow: NotRequired[ "PaymentMethodConfiguration.CreateParamsPaynow|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsWechatPayDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsUsBankAccount(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsUsBankAccountDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsUsBankAccountDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsSofort(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsSofortDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsSofortDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsSepaDebit(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsSepaDebitDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsSepaDebitDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsPromptpay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsPromptpayDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsPromptpayDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsPaypal(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsPaypalDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsPaypalDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsPaynow(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsPaynowDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsPaynowDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsP24(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsP24DisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsP24DisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsOxxo(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsOxxoDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsOxxoDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsLink(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsLinkDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsLinkDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsKonbini(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsKonbiniDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsKonbiniDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsKlarna(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsKlarnaDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsKlarnaDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsJcb(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsJcbDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsJcbDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsIdeal(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsIdealDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsIdealDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsGrabpay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsGrabpayDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsGrabpayDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsGooglePay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsGooglePayDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsGooglePayDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsGiropay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsGiropayDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsGiropayDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsFpx(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsFpxDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsFpxDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsEps(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsEpsDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsEpsDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsCashapp(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsCashappDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsCashappDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsCartesBancaires(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsCartesBancairesDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsCartesBancairesDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsCard(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsCardDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsCardDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsBoleto(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsBoletoDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsBoletoDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsBlik(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsBlikDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsBlikDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsBancontact(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsBancontactDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsBancontactDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsBacsDebit(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsBacsDebitDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsBacsDebitDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsAuBecsDebit(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsAuBecsDebitDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsAuBecsDebitDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsApplePayLater(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsApplePayLaterDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsApplePayLaterDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsApplePay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsApplePayDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsApplePayDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsAlipay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsAlipayDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsAlipayDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsAfterpayClearpay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsAfterpayClearpayDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsAfterpayClearpayDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsAffirm(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsAffirmDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsAffirmDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class CreateParamsAcssDebit(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsAcssDebitDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class CreateParamsAcssDebitDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ListParams(RequestOptions): application: NotRequired["Literal['']|str|None"] + """ + The Connect application to filter by. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ModifyParams(RequestOptions): acss_debit: NotRequired[ "PaymentMethodConfiguration.ModifyParamsAcssDebit|None" ] + """ + Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. + """ active: NotRequired["bool|None"] + """ + Whether the configuration can be used for new payments. + """ affirm: NotRequired[ "PaymentMethodConfiguration.ModifyParamsAffirm|None" ] + """ + [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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ fpx: NotRequired["PaymentMethodConfiguration.ModifyParamsFpx|None"] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + [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|None"] + """ + Configuration name. + """ oxxo: NotRequired[ "PaymentMethodConfiguration.ModifyParamsOxxo|None" ] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsWechatPayDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsUsBankAccount(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsUsBankAccountDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsUsBankAccountDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsSofort(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsSofortDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsSofortDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsSepaDebit(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsSepaDebitDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsSepaDebitDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsPromptpay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsPromptpayDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsPromptpayDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsPaypal(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsPaypalDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsPaypalDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsPaynow(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsPaynowDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsPaynowDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsP24(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsP24DisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsP24DisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsOxxo(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsOxxoDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsOxxoDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsLink(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsLinkDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsLinkDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsKonbini(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsKonbiniDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsKonbiniDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsKlarna(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsKlarnaDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsKlarnaDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsJcb(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsJcbDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsJcbDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsIdeal(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsIdealDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsIdealDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsGrabpay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsGrabpayDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsGrabpayDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsGooglePay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsGooglePayDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsGooglePayDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsGiropay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsGiropayDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsGiropayDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsFpx(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsFpxDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsFpxDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsEps(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsEpsDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsEpsDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsCashapp(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsCashappDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsCashappDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsCartesBancaires(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsCartesBancairesDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsCartesBancairesDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsCard(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsCardDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsCardDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsBoleto(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsBoletoDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsBoletoDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsBlik(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsBlikDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsBlikDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsBancontact(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsBancontactDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsBancontactDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsBacsDebit(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsBacsDebitDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsBacsDebitDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsAuBecsDebit(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsAuBecsDebitDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsAuBecsDebitDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsApplePayLater(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsApplePayLaterDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsApplePayLaterDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsApplePay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsApplePayDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsApplePayDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsAlipay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsAlipayDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsAlipayDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsAfterpayClearpay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsAfterpayClearpayDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsAfterpayClearpayDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsAffirm(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsAffirmDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsAffirmDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class ModifyParamsAcssDebit(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsAcssDebitDisplayPreference|None" ] + """ + Whether or not the payment method should be displayed. + """ class ModifyParamsAcssDebitDisplayPreference(TypedDict): preference: NotRequired["Literal['none', 'off', 'on']|None"] + """ + The account's preference for whether or not to display this payment method. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ acss_debit: Optional[StripeObject] active: bool + """ + Whether the configuration can be used for new payments. + """ affirm: Optional[StripeObject] afterpay_clearpay: Optional[StripeObject] alipay: Optional[StripeObject] apple_pay: Optional[StripeObject] application: Optional[str] + """ + For child configs, the Connect application associated with the configuration. + """ au_becs_debit: Optional[StripeObject] bacs_debit: Optional[StripeObject] bancontact: Optional[StripeObject] @@ -794,21 +1421,39 @@ class RetrieveParams(RequestOptions): google_pay: Optional[StripeObject] grabpay: Optional[StripeObject] id: str + """ + Unique identifier for the object. + """ id_bank_transfer: Optional[StripeObject] ideal: Optional[StripeObject] is_default: bool + """ + The default configuration is used whenever a payment method configuration is not specified. + """ jcb: Optional[StripeObject] klarna: Optional[StripeObject] konbini: Optional[StripeObject] link: Optional[StripeObject] livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ multibanco: Optional[StripeObject] name: str + """ + The configuration's name. + """ netbanking: Optional[StripeObject] object: Literal["payment_method_configuration"] + """ + String representing the object's type. Objects of the same type share the same value. + """ oxxo: Optional[StripeObject] p24: Optional[StripeObject] parent: Optional[str] + """ + For child configs, the configuration's parent configuration. + """ pay_by_bank: Optional[StripeObject] paynow: Optional[StripeObject] paypal: Optional[StripeObject] diff --git a/stripe/api_resources/payment_method_domain.py b/stripe/api_resources/payment_method_domain.py index cb7c2072b..44b6c3b1d 100644 --- a/stripe/api_resources/payment_method_domain.py +++ b/stripe/api_resources/payment_method_domain.py @@ -34,37 +34,106 @@ class PaymentMethodDomain( class CreateParams(RequestOptions): domain_name: str + """ + The domain name that this payment method domain object represents. + """ enabled: NotRequired["bool|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ListParams(RequestOptions): domain_name: NotRequired["str|None"] + """ + The domain name that this payment method domain object represents. + """ enabled: NotRequired["bool|None"] + """ + Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ValidateParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ apple_pay: StripeObject + """ + Indicates the status of a specific payment method on a payment method domain. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ domain_name: str + """ + The domain name that this payment method domain object represents. + """ enabled: 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. + """ google_pay: StripeObject + """ + Indicates the status of a specific payment method on a payment method domain. + """ id: str + """ + Unique identifier for the object. + """ link: StripeObject + """ + Indicates the status of a specific payment method on a payment method domain. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["payment_method_domain"] + """ + String representing the object's type. Objects of the same type share the same value. + """ paypal: StripeObject + """ + Indicates the status of a specific payment method on a payment method domain. + """ @classmethod def create( diff --git a/stripe/api_resources/payout.py b/stripe/api_resources/payout.py index a058c95b4..95f128a93 100644 --- a/stripe/api_resources/payout.py +++ b/stripe/api_resources/payout.py @@ -47,80 +47,236 @@ class Payout( class CancelParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + 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|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ destination: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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']|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + 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|None"] created: NotRequired["Payout.ListParamsCreated|int|None"] destination: NotRequired["str|None"] + """ + The ID of an external account - only return payouts sent to this external account. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ListParamsArrivalDate(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ReverseParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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 + """ + The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. + """ arrival_date: int + """ + Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. + """ automatic: bool + """ + Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts). + """ balance_transaction: Optional[ExpandableField["BalanceTransaction"]] + """ + ID of the balance transaction that describes the impact of this payout on your account balance. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ destination: Optional[ExpandableField[Union["BankAccount", "Card"]]] + """ + ID of the bank account or card the payout is sent to. + """ failure_balance_transaction: Optional[ ExpandableField["BalanceTransaction"] ] + """ + If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. + """ failure_code: Optional[str] + """ + Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures). + """ failure_message: Optional[str] + """ + Message that provides the reason for a payout failure, if available. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ method: str + """ + The method used to send this payout, which can be `standard` or `instant`. `instant` is supported 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). + """ object: Literal["payout"] + """ + String representing the object's type. Objects of the same type share the same value. + """ original_payout: Optional[ExpandableField["Payout"]] + """ + If the payout reverses another, this is the ID of the original payout. + """ reconciliation_status: Literal[ "completed", "in_progress", "not_applicable" ] + """ + If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout. + """ reversed_by: Optional[ExpandableField["Payout"]] + """ + If the payout reverses, this is the ID of the payout that reverses this payout. + """ source_type: str + """ + The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`. + """ statement_descriptor: Optional[str] + """ + Extra information about a payout that displays on the user's bank statement. + """ status: str + """ + Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`. + """ type: Literal["bank_account", "card"] + """ + Can be `bank_account` or `card`. + """ @classmethod def _cls_cancel( diff --git a/stripe/api_resources/person.py b/stripe/api_resources/person.py index 9ca8079a2..ab3d9dd2a 100644 --- a/stripe/api_resources/person.py +++ b/stripe/api_resources/person.py @@ -20,37 +20,115 @@ class Person(UpdateableAPIResource["Person"]): OBJECT_NAME: ClassVar[Literal["person"]] = "person" account: Optional[str] + """ + The account the person is associated with. + """ additional_tos_acceptances: Optional[StripeObject] address: Optional[StripeObject] address_kana: Optional[StripeObject] + """ + The Kana variation of the person's address (Japan only). + """ address_kanji: Optional[StripeObject] + """ + The Kanji variation of the person's address (Japan only). + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ dob: Optional[StripeObject] email: Optional[str] + """ + The person's email address. + """ first_name: Optional[str] + """ + The person's first name. + """ first_name_kana: Optional[str] + """ + The Kana variation of the person's first name (Japan only). + """ first_name_kanji: Optional[str] + """ + The Kanji variation of the person's first name (Japan only). + """ full_name_aliases: Optional[List[str]] + """ + A list of alternate names or aliases that the person is known by. + """ future_requirements: Optional[StripeObject] + """ + Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. + """ gender: Optional[str] + """ + The person's gender (International regulations require either "male" or "female"). + """ id: str + """ + Unique identifier for the object. + """ id_number_provided: Optional[bool] + """ + Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`). + """ id_number_secondary_provided: Optional[bool] + """ + Whether the person's `id_number_secondary` was provided. + """ last_name: Optional[str] + """ + The person's last name. + """ last_name_kana: Optional[str] + """ + The Kana variation of the person's last name (Japan only). + """ last_name_kanji: Optional[str] + """ + The Kanji variation of the person's last name (Japan only). + """ maiden_name: Optional[str] + """ + The person's maiden name. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ nationality: Optional[str] + """ + The country where the person is a national. + """ object: Literal["person"] + """ + String representing the object's type. Objects of the same type share the same value. + """ phone: Optional[str] + """ + The person's phone number. + """ political_exposure: Optional[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: Optional[StripeObject] relationship: Optional[StripeObject] requirements: Optional[StripeObject] + """ + Information about the requirements for this person, including what information needs to be collected, and by when. + """ ssn_last_4_provided: Optional[bool] + """ + Whether the last four digits of the person's Social Security number have been provided (U.S. only). + """ verification: Optional[StripeObject] deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ def instance_url(self): token = self.id diff --git a/stripe/api_resources/plan.py b/stripe/api_resources/plan.py index a9e4642bc..5b81e495c 100644 --- a/stripe/api_resources/plan.py +++ b/stripe/api_resources/plan.py @@ -47,100 +47,312 @@ class Plan( class CreateParams(RequestOptions): active: NotRequired["bool|None"] + """ + Whether the plan is currently available for new subscriptions. Defaults to `true`. + """ aggregate_usage: NotRequired[ "Literal['last_during_period', 'last_ever', 'max', 'sum']|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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']|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ id: NotRequired["str|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + A brief description of the plan, hidden from customers. + """ product: NotRequired["Plan.CreateParamsProduct|str|None"] tiers: NotRequired["List[Plan.CreateParamsTier]|None"] + """ + 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']|None"] + """ + 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|None" ] + """ + 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|None"] + """ + 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']|None"] + """ + 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 CreateParamsTier(TypedDict): flat_amount: NotRequired["int|None"] + """ + The flat billing amount for an entire tier, regardless of the number of units in the tier. + """ flat_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + The per unit billing amount for each individual unit for which this tier applies. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + Whether the product is currently available for purchase. Defaults to `true`. + """ id: NotRequired["str|None"] + """ + The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ unit_label: NotRequired["str|None"] + """ + 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 ListParams(RequestOptions): active: NotRequired["bool|None"] + """ + Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). + """ created: NotRequired["Plan.ListParamsCreated|int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + Only return plans for the given product. + """ starting_after: NotRequired["str|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): active: NotRequired["bool|None"] + """ + Whether the plan is currently available for new subscriptions. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + A brief description of the plan, hidden from customers. + """ product: NotRequired["str|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ active: bool + """ + Whether the plan can be used for new purchases. + """ aggregate_usage: Optional[ 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: Optional[int] + """ + The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + """ amount_decimal: Optional[str] + """ + The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + """ billing_scheme: 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. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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). + """ id: str + """ + Unique identifier for the object. + """ interval: Literal["day", "month", "week", "year"] + """ + The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + """ interval_count: int + """ + The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ nickname: Optional[str] + """ + A brief description of the plan, hidden from customers. + """ object: Literal["plan"] + """ + String representing the object's type. Objects of the same type share the same value. + """ product: Optional[ExpandableField["Product"]] + """ + The product whose pricing this plan determines. + """ tiers: Optional[List[StripeObject]] + """ + 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: Optional[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 change as the quantity grows. + """ transform_usage: Optional[StripeObject] + """ + Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + """ trial_period_days: Optional[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: 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`. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def create( diff --git a/stripe/api_resources/platform_tax_fee.py b/stripe/api_resources/platform_tax_fee.py index 983a086e6..a12bd2cc0 100644 --- a/stripe/api_resources/platform_tax_fee.py +++ b/stripe/api_resources/platform_tax_fee.py @@ -8,7 +8,22 @@ class PlatformTaxFee(StripeObject): OBJECT_NAME: ClassVar[Literal["platform_tax_fee"]] = "platform_tax_fee" account: str + """ + The Connected account that incurred this charge. + """ id: str + """ + Unique identifier for the object. + """ object: Literal["platform_tax_fee"] + """ + String representing the object's type. Objects of the same type share the same value. + """ source_transaction: str + """ + The payment object that caused this tax to be inflicted. + """ type: str + """ + The type of tax (VAT). + """ diff --git a/stripe/api_resources/price.py b/stripe/api_resources/price.py index 098d68008..078326008 100644 --- a/stripe/api_resources/price.py +++ b/stripe/api_resources/price.py @@ -45,190 +45,558 @@ class Price( class CreateParams(RequestOptions): active: NotRequired["bool|None"] + """ + Whether the price can be used for new purchases. Defaults to `true`. + """ billing_scheme: NotRequired["Literal['per_unit', 'tiered']|None"] + """ + 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]|None" ] + """ + 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|None" ] + """ + When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ lookup_key: NotRequired["str|None"] + """ + A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + A brief description of the price, hidden from customers. + """ product: NotRequired["str|None"] + """ + The ID of the product that this price will belong to. + """ product_data: NotRequired["Price.CreateParamsProductData|None"] + """ + These fields can be used to create a new product that this price will belong to. + """ recurring: NotRequired["Price.CreateParamsRecurring|None"] + """ + The recurring components of a price such as `interval` and `usage_type`. + """ tax_behavior: NotRequired[ "Literal['exclusive', 'inclusive', 'unspecified']|None" ] + """ + 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]|None"] + """ + 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']|None"] + """ + 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|None"] + """ + 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|None" ] + """ + Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + """ unit_amount: NotRequired["int|None"] + """ + 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|None"] + """ + 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 CreateParamsTier(TypedDict): flat_amount: NotRequired["int|None"] + """ + The flat billing amount for an entire tier, regardless of the number of units in the tier. + """ flat_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + The per unit billing amount for each individual unit for which this tier applies. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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']|None"] + """ + 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|None"] + """ + Whether the product is currently available for purchase. Defaults to `true`. + """ id: NotRequired["str|None"] + """ + The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ unit_label: NotRequired["str|None"] + """ + 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|None"] + """ + The maximum unit amount the customer can specify for this item. + """ minimum: NotRequired["int|None"] + """ + The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + """ preset: NotRequired["int|None"] + """ + The starting unit amount which can be updated by the customer. + """ class CreateParamsCurrencyOptions(TypedDict): custom_unit_amount: NotRequired[ "Price.CreateParamsCurrencyOptionsCustomUnitAmount|None" ] + """ + 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']|None" ] + """ + 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]|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + The flat billing amount for an entire tier, regardless of the number of units in the tier. + """ flat_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + The per unit billing amount for each individual unit for which this tier applies. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + The maximum unit amount the customer can specify for this item. + """ minimum: NotRequired["int|None"] + """ + The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + """ preset: NotRequired["int|None"] + """ + The starting unit amount which can be updated by the customer. + """ class ListParams(RequestOptions): active: NotRequired["bool|None"] + """ + Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). + """ created: NotRequired["Price.ListParamsCreated|int|None"] + """ + 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|None"] + """ + Only return prices for the given currency. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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]|None"] + """ + Only return the price with these lookup_keys, if any exist. + """ product: NotRequired["str|None"] + """ + Only return prices for the given product. + """ recurring: NotRequired["Price.ListParamsRecurring|None"] + """ + Only return prices with these recurring fields. + """ starting_after: NotRequired["str|None"] + """ + 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']|None"] + """ + Only return prices of type `recurring` or `one_time`. + """ class ListParamsRecurring(TypedDict): interval: NotRequired[ "Literal['day', 'month', 'week', 'year']|None" ] + """ + Filter by billing frequency. Either `day`, `week`, `month` or `year`. + """ usage_type: NotRequired["Literal['licensed', 'metered']|None"] + """ + Filter by the usage type for this price. Can be either `metered` or `licensed`. + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): active: NotRequired["bool|None"] + """ + Whether the price can be used for new purchases. Defaults to `true`. + """ currency_options: NotRequired[ "Literal['']|Dict[str, Price.ModifyParamsCurrencyOptions]|None" ] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ lookup_key: NotRequired["str|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + A brief description of the price, hidden from customers. + """ tax_behavior: NotRequired[ "Literal['exclusive', 'inclusive', 'unspecified']|None" ] + """ + 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|None"] + """ + 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|None" ] + """ + 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']|None" ] + """ + 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]|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + The flat billing amount for an entire tier, regardless of the number of units in the tier. + """ flat_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + The per unit billing amount for each individual unit for which this tier applies. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + The maximum unit amount the customer can specify for this item. + """ minimum: NotRequired["int|None"] + """ + The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + """ preset: NotRequired["int|None"] + """ + The starting unit amount which can be updated by the customer. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class SearchParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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 + """ + Whether the price can be used for new purchases. + """ billing_scheme: 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. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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: Optional[Dict[str, StripeObject]] + """ + 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: Optional[StripeObject] + """ + When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ lookup_key: Optional[str] + """ + A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ nickname: Optional[str] + """ + A brief description of the price, hidden from customers. + """ object: Literal["price"] + """ + String representing the object's type. Objects of the same type share the same value. + """ product: ExpandableField["Product"] + """ + The ID of the product this price is associated with. + """ recurring: Optional[StripeObject] + """ + The recurring components of a price such as `interval` and `usage_type`. + """ tax_behavior: Optional[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: Optional[List[StripeObject]] + """ + 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: Optional[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 change as the quantity grows. + """ transform_quantity: Optional[StripeObject] + """ + Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + """ type: Literal["one_time", "recurring"] + """ + One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. + """ unit_amount: Optional[int] + """ + The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + """ unit_amount_decimal: Optional[str] + """ + The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def create( diff --git a/stripe/api_resources/product.py b/stripe/api_resources/product.py index df702f59f..d28b8eaab 100644 --- a/stripe/api_resources/product.py +++ b/stripe/api_resources/product.py @@ -60,160 +60,469 @@ class Product( class CreateParams(RequestOptions): active: NotRequired["bool|None"] + """ + Whether the product is currently available for purchase. Defaults to `true`. + """ default_price_data: NotRequired[ "Product.CreateParamsDefaultPriceData|None" ] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ features: NotRequired["List[Product.CreateParamsFeature]|None"] + """ + 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|None"] + """ + 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]|None"] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + The dimensions of this product for shipping purposes. + """ shippable: NotRequired["bool|None"] + """ + Whether this product is shipped (i.e., physical goods). + """ statement_descriptor: NotRequired["str|None"] + """ + 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|None"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ type: NotRequired["Literal['good', 'service']|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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]|None" ] + """ + 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|None" ] + """ + The recurring components of a price such as `interval` and `interval_count`. + """ tax_behavior: NotRequired[ "Literal['exclusive', 'inclusive', 'unspecified']|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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']|None" ] + """ + 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]|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + The flat billing amount for an entire tier, regardless of the number of units in the tier. + """ flat_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + The per unit billing amount for each individual unit for which this tier applies. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + The maximum unit amount the customer can specify for this item. + """ minimum: NotRequired["int|None"] + """ + The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + """ preset: NotRequired["int|None"] + """ + The starting unit amount which can be updated by the customer. + """ class DeleteParams(RequestOptions): pass class ListParams(RequestOptions): active: NotRequired["bool|None"] + """ + Only return products that are active or inactive (e.g., pass `false` to list all inactive products). + """ created: NotRequired["Product.ListParamsCreated|int|None"] + """ + Only return products that were created during the given date interval. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ ids: NotRequired["List[str]|None"] + """ + 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|None"] + """ + 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|None"] + """ + Only return products that can be shipped (i.e., physical, not digital products). + """ starting_after: NotRequired["str|None"] + """ + 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']|None"] + """ + Only return products of this type. + """ url: NotRequired["str|None"] + """ + Only return products with the given url. + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): active: NotRequired["bool|None"] + """ + Whether the product is available for purchase. + """ default_price: NotRequired["str|None"] + """ + The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + """ description: NotRequired["Literal['']|str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ features: NotRequired[ "Literal['']|List[Product.ModifyParamsFeature]|None" ] + """ + 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]|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The product's name, meant to be displayable to the customer. + """ package_dimensions: NotRequired[ "Literal['']|Product.ModifyParamsPackageDimensions|None" ] + """ + The dimensions of this product for shipping purposes. + """ shippable: NotRequired["bool|None"] + """ + Whether this product is shipped (i.e., physical goods). + """ statement_descriptor: NotRequired["str|None"] + """ + 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|None"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ unit_label: NotRequired["Literal['']|str|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class SearchParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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 + """ + Whether the product is currently available for purchase. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ default_price: Optional[ExpandableField["Price"]] + """ + The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + """ description: Optional[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. + """ features: List[StripeObject] + """ + 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: str + """ + Unique identifier for the object. + """ images: List[str] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ name: str + """ + The product's name, meant to be displayable to the customer. + """ object: Literal["product"] + """ + String representing the object's type. Objects of the same type share the same value. + """ package_dimensions: Optional[StripeObject] + """ + The dimensions of this product for shipping purposes. + """ shippable: Optional[bool] + """ + Whether this product is shipped (i.e., physical goods). + """ statement_descriptor: Optional[str] + """ + Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. + """ tax_code: Optional[ExpandableField["TaxCode"]] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ type: Literal["good", "service"] + """ + The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans. + """ unit_label: Optional[str] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + """ updated: int + """ + Time at which the object was last updated. Measured in seconds since the Unix epoch. + """ url: Optional[str] + """ + A URL of a publicly-accessible webpage for this product. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def create( diff --git a/stripe/api_resources/promotion_code.py b/stripe/api_resources/promotion_code.py index 901bf9b70..075c11a1d 100644 --- a/stripe/api_resources/promotion_code.py +++ b/stripe/api_resources/promotion_code.py @@ -39,77 +39,217 @@ class PromotionCode( class CreateParams(RequestOptions): active: NotRequired["bool|None"] + """ + Whether the promotion code is currently active. + """ code: NotRequired["str|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ expires_at: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + Settings that restrict the redemption of the promotion code. + """ class CreateParamsRestrictions(TypedDict): currency_options: NotRequired[ "Dict[str, PromotionCode.CreateParamsRestrictionsCurrencyOptions]|None" ] + """ + 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|None"] + """ + A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices + """ minimum_amount: NotRequired["int|None"] + """ + 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|None"] + """ + Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount + """ class CreateParamsRestrictionsCurrencyOptions(TypedDict): minimum_amount: NotRequired["int|None"] + """ + 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|None"] + """ + Filter promotion codes by whether they are active. + """ code: NotRequired["str|None"] + """ + Only return promotion codes that have this case-insensitive code. + """ coupon: NotRequired["str|None"] + """ + Only return promotion codes for this coupon. + """ created: NotRequired["PromotionCode.ListParamsCreated|int|None"] + """ + 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|None"] + """ + Only return promotion codes that are restricted to this customer. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): active: NotRequired["bool|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + Settings that restrict the redemption of the promotion code. + """ class ModifyParamsRestrictions(TypedDict): currency_options: NotRequired[ "Dict[str, PromotionCode.ModifyParamsRestrictionsCurrencyOptions]|None" ] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ active: bool + """ + Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. + """ code: str + """ + The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. + """ coupon: "Coupon" + """ + A coupon contains information about a percent-off or amount-off discount you + might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ customer: Optional[ExpandableField["Customer"]] + """ + The customer that this promotion code can be used by. + """ expires_at: Optional[int] + """ + Date at which the promotion code can no longer be redeemed. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ max_redemptions: Optional[int] + """ + Maximum number of times this promotion code can be redeemed. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["promotion_code"] + """ + String representing the object's type. Objects of the same type share the same value. + """ restrictions: StripeObject times_redeemed: int + """ + Number of times this promotion code has been used. + """ @classmethod def create( diff --git a/stripe/api_resources/quote.py b/stripe/api_resources/quote.py index f1cc67c01..a377ffd18 100644 --- a/stripe/api_resources/quote.py +++ b/stripe/api_resources/quote.py @@ -50,230 +50,635 @@ class Quote( class AcceptParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class CancelParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class CreateParams(RequestOptions): application_fee_amount: NotRequired["Literal['']|int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + """ collection_method: NotRequired[ "Literal['charge_automatically', 'send_invoice']|None" ] + """ + 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|None"] + """ + 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]|None"] + """ + The tax rates that will apply to any line item that does not have `tax_rates` set. + """ description: NotRequired["Literal['']|str|None"] + """ + 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]|None" ] + """ + The discounts applied to the quote. You can only set up to one discount. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ expires_at: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + All invoices will be billed using the specified settings. + """ line_items: NotRequired["List[Quote.CreateParamsLineItem]|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The account on behalf of which to charge. + """ subscription_data: NotRequired[ "Quote.CreateParamsSubscriptionData|None" ] + """ + 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|None"] + """ + ID of the test clock to attach to the quote. + """ transfer_data: NotRequired[ "Literal['']|Quote.CreateParamsTransferData|None" ] + """ + The data with which to automatically create a Transfer for each of the invoices. + """ class CreateParamsTransferData(TypedDict): amount: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + """ effective_date: NotRequired[ "Literal['']|Literal['current_period_end']|int|None" ] + """ + 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. + """ trial_period_days: NotRequired["Literal['']|int|None"] + """ + Integer representing the number of trial period days before the customer is charged for the first time. + """ class CreateParamsLineItem(TypedDict): price: NotRequired["str|None"] + """ + The ID of the price object. One of `price` or `price_data` is required. + """ price_data: NotRequired["Quote.CreateParamsLineItemPriceData|None"] + """ + 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|None"] + """ + The quantity of the line item. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + 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|None" ] + """ + The recurring components of a price such as `interval` and `interval_count`. + """ tax_behavior: NotRequired[ "Literal['exclusive', 'inclusive', 'unspecified']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + ID of the coupon to create a new discount for. + """ discount: NotRequired["str|None"] + """ + 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 FinalizeQuoteParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ expires_at: NotRequired["int|None"] + """ + 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|None"] + """ + The ID of the customer whose quotes will be retrieved. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + The status of the quote. + """ test_clock: NotRequired["str|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + """ collection_method: NotRequired[ "Literal['charge_automatically', 'send_invoice']|None" ] + """ + 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|None"] + """ + 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]|None"] + """ + The tax rates that will apply to any line item that does not have `tax_rates` set. + """ description: NotRequired["Literal['']|str|None"] + """ + A description that will be displayed on the quote PDF. + """ discounts: NotRequired[ "Literal['']|List[Quote.ModifyParamsDiscount]|None" ] + """ + The discounts applied to the quote. You can only set up to one discount. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ expires_at: NotRequired["int|None"] + """ + 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|None"] + """ + A footer that will be displayed on the quote PDF. + """ header: NotRequired["Literal['']|str|None"] + """ + A header that will be displayed on the quote PDF. + """ invoice_settings: NotRequired[ "Quote.ModifyParamsInvoiceSettings|None" ] + """ + All invoices will be billed using the specified settings. + """ line_items: NotRequired["List[Quote.ModifyParamsLineItem]|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The account on behalf of which to charge. + """ subscription_data: NotRequired[ "Quote.ModifyParamsSubscriptionData|None" ] + """ + 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|None" ] + """ + The data with which to automatically create a Transfer for each of the invoices. + """ class ModifyParamsTransferData(TypedDict): amount: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + """ effective_date: NotRequired[ "Literal['']|Literal['current_period_end']|int|None" ] + """ + 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. + """ trial_period_days: NotRequired["Literal['']|int|None"] + """ + Integer representing the number of trial period days before the customer is charged for the first time. + """ class ModifyParamsLineItem(TypedDict): id: NotRequired["str|None"] + """ + The ID of an existing line item on the quote. + """ price: NotRequired["str|None"] + """ + The ID of the price object. One of `price` or `price_data` is required. + """ price_data: NotRequired["Quote.ModifyParamsLineItemPriceData|None"] + """ + 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|None"] + """ + The quantity of the line item. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + 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|None" ] + """ + The recurring components of a price such as `interval` and `interval_count`. + """ tax_behavior: NotRequired[ "Literal['exclusive', 'inclusive', 'unspecified']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + ID of the coupon to create a new discount for. + """ discount: NotRequired["str|None"] + """ + 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 RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ amount_subtotal: int + """ + Total before any discounts or taxes are applied. + """ amount_total: int + """ + Total after discounts and taxes are applied. + """ application: Optional[ExpandableField["Application"]] + """ + ID of the Connect Application that created the quote. + """ application_fee_amount: Optional[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. Only applicable if there are no line items with recurring prices on the quote. + """ application_fee_percent: Optional[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. Only applicable if there are line items with recurring prices on the quote. + """ automatic_tax: StripeObject collection_method: 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 on 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`. + """ computed: StripeObject created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ currency: Optional[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: Optional[ExpandableField["Customer"]] + """ + The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + """ default_tax_rates: Optional[List[ExpandableField["TaxRate"]]] + """ + The tax rates applied to this quote. + """ description: Optional[str] + """ + A description that will be displayed on the quote PDF. + """ discounts: List[ExpandableField["Discount"]] + """ + The discounts applied to this quote. + """ expires_at: int + """ + The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + """ footer: Optional[str] + """ + A footer that will be displayed on the quote PDF. + """ from_quote: Optional[StripeObject] + """ + Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. + """ header: Optional[str] + """ + A header that will be displayed on the quote PDF. + """ id: str + """ + Unique identifier for the object. + """ invoice: Optional[ExpandableField["Invoice"]] + """ + The invoice that was created from this quote. + """ invoice_settings: Optional[StripeObject] + """ + All invoices will be billed using the specified settings. + """ line_items: Optional[ListObject["LineItem"]] + """ + A list of items the customer is being quoted for. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ number: Optional[str] + """ + A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). + """ object: Literal["quote"] + """ + String representing the object's type. Objects of the same type share the same value. + """ on_behalf_of: Optional[ExpandableField["Account"]] + """ + The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + """ status: Literal["accepted", "canceled", "draft", "open"] + """ + The status of the quote. + """ status_transitions: StripeObject subscription: Optional[ExpandableField["Subscription"]] + """ + The subscription that was created or updated from this quote. + """ subscription_data: StripeObject subscription_schedule: Optional[ExpandableField["SubscriptionSchedule"]] + """ + The subscription schedule that was created or updated from this quote. + """ test_clock: Optional[ExpandableField["TestClock"]] + """ + ID of the test clock this quote belongs to. + """ total_details: StripeObject transfer_data: Optional[StripeObject] + """ + The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. + """ @classmethod def _cls_accept( diff --git a/stripe/api_resources/radar/early_fraud_warning.py b/stripe/api_resources/radar/early_fraud_warning.py index f6f7c678a..f32f64755 100644 --- a/stripe/api_resources/radar/early_fraud_warning.py +++ b/stripe/api_resources/radar/early_fraud_warning.py @@ -27,23 +27,68 @@ class EarlyFraudWarning(ListableAPIResource["EarlyFraudWarning"]): class ListParams(RequestOptions): charge: NotRequired["str|None"] + """ + Only return early fraud warnings for the charge specified by this charge ID. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. + """ starting_after: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ actionable: bool + """ + An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. + """ charge: ExpandableField["Charge"] + """ + ID of the charge this early fraud warning is for, optionally expanded. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ fraud_type: str + """ + The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["radar.early_fraud_warning"] + """ + String representing the object's type. Objects of the same type share the same value. + """ payment_intent: Optional[ExpandableField["PaymentIntent"]] + """ + ID of the Payment Intent this early fraud warning is for, optionally expanded. + """ @classmethod def list( diff --git a/stripe/api_resources/radar/value_list.py b/stripe/api_resources/radar/value_list.py index 77517abfb..8e5478374 100644 --- a/stripe/api_resources/radar/value_list.py +++ b/stripe/api_resources/radar/value_list.py @@ -40,44 +40,116 @@ class ValueList( class CreateParams(RequestOptions): alias: str + """ + The name of the value list for use in rules. + """ expand: NotRequired["List[str]|None"] + """ + 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']|None" ] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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 ListParams(RequestOptions): alias: NotRequired["str|None"] + """ + The alias used to reference the value list when writing rules. + """ contains: NotRequired["str|None"] + """ + A value contained within a value list - returns all value lists containing this value. + """ created: NotRequired["ValueList.ListParamsCreated|int|None"] ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): alias: NotRequired["str|None"] + """ + The name of the value list for use in rules. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The human-readable name of the value list. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ alias: str + """ + The name of the value list for use in rules. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ created_by: str + """ + The name or email address of the user who created this value list. + """ id: str + """ + Unique identifier for the object. + """ item_type: Literal[ "card_bin", "card_fingerprint", @@ -90,12 +162,33 @@ class RetrieveParams(RequestOptions): "string", "us_bank_account_fingerprint", ] + """ + The type of 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`. + """ list_items: ListObject["ValueListItem"] + """ + List of items contained within this value list. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ name: str + """ + The name of the value list. + """ object: Literal["radar.value_list"] + """ + String representing the object's type. Objects of the same type share the same value. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def create( diff --git a/stripe/api_resources/radar/value_list_item.py b/stripe/api_resources/radar/value_list_item.py index 9f6f93933..41b189b46 100644 --- a/stripe/api_resources/radar/value_list_item.py +++ b/stripe/api_resources/radar/value_list_item.py @@ -37,8 +37,17 @@ class ValueListItem( class CreateParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + 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 @@ -46,29 +55,86 @@ class DeleteParams(RequestOptions): class ListParams(RequestOptions): created: NotRequired["ValueListItem.ListParamsCreated|int|None"] ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ created_by: str + """ + The name or email address of the user who added this item to the value list. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["radar.value_list_item"] + """ + String representing the object's type. Objects of the same type share the same value. + """ value: str + """ + The value of the item. + """ value_list: str + """ + The identifier of the value list this item belongs to. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def create( diff --git a/stripe/api_resources/refund.py b/stripe/api_resources/refund.py index c25806d63..6c2c62234 100644 --- a/stripe/api_resources/refund.py +++ b/stripe/api_resources/refund.py @@ -41,55 +41,156 @@ class Refund( class CancelParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class CreateParams(RequestOptions): amount: NotRequired["int|None"] charge: NotRequired["str|None"] + """ + The identifier of the charge to refund. + """ currency: NotRequired["str|None"] + """ + 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|None"] + """ + Customer whose customer balance to refund from. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ instructions_email: NotRequired["str|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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']|None"] + """ + Origin of the refund + """ payment_intent: NotRequired["str|None"] + """ + The identifier of the PaymentIntent to refund. + """ reason: NotRequired[ "Literal['duplicate', 'fraudulent', 'requested_by_customer']|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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 ListParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ExpireParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ amount: int + """ + Amount, in cents (or local equivalent). + """ balance_transaction: Optional[ExpandableField["BalanceTransaction"]] + """ + Balance transaction that describes the impact on your account balance. + """ charge: Optional[ExpandableField["Charge"]] + """ + ID of the charge that's refunded. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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: Optional[str] + """ + An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). + """ failure_balance_transaction: Optional[ ExpandableField["BalanceTransaction"] ] + """ + After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. + """ failure_reason: Optional[str] + """ + Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. + """ id: str + """ + Unique identifier for the object. + """ instructions_email: Optional[str] + """ + For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ next_action: Optional[StripeObject] object: Literal["refund"] + """ + String representing the object's type. Objects of the same type share the same value. + """ payment_intent: Optional[ExpandableField["PaymentIntent"]] + """ + ID of the PaymentIntent that's refunded. + """ reason: Optional[ Literal[ "duplicate", @@ -98,10 +199,25 @@ class ExpireParams(RequestOptions): "requested_by_customer", ] ] + """ + Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). + """ receipt_number: Optional[str] + """ + This is the transaction number that appears on email receipts sent for this refund. + """ source_transfer_reversal: Optional[ExpandableField["Reversal"]] + """ + The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. + """ status: Optional[str] + """ + Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds). + """ transfer_reversal: Optional[ExpandableField["Reversal"]] + """ + This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. + """ @classmethod def _cls_cancel( diff --git a/stripe/api_resources/reporting/report_run.py b/stripe/api_resources/reporting/report_run.py index 2f7a8ef18..fc1507105 100644 --- a/stripe/api_resources/reporting/report_run.py +++ b/stripe/api_resources/reporting/report_run.py @@ -42,49 +42,141 @@ class ReportRun( class CreateParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ parameters: NotRequired["ReportRun.CreateParamsParameters|None"] + """ + 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]|None"] + """ + 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|None"] + """ + Connected account ID to filter for in the report run. + """ currency: NotRequired["str|None"] + """ + Currency of objects to be included in the report run. + """ interval_end: NotRequired["int|None"] + """ + Ending timestamp of data to be included in the report run (exclusive). + """ interval_start: NotRequired["int|None"] + """ + Starting timestamp of data to be included in the report run. + """ payout: NotRequired["str|None"] + """ + 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']|None" ] + """ + 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']|None" ] + """ + 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|None"] ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ error: Optional[str] + """ + If something should go wrong during the run, a message about the failure (populated when + `status=failed`). + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + `true` if the report is run on live mode data and `false` if it is run on test mode data. + """ object: Literal["reporting.report_run"] + """ + String representing the object's type. Objects of the same type share the same value. + """ parameters: StripeObject report_type: str + """ + The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`. + """ result: Optional["File"] + """ + The file object representing the result of the report run (populated when + `status=succeeded`). + """ status: str + """ + Status of this report run. This will be `pending` when the run is initially created. + When the run finishes, this will be set to `succeeded` and the `result` field will be populated. + Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. + """ succeeded_at: Optional[int] + """ + Timestamp at which this run successfully finished (populated when + `status=succeeded`). Measured in seconds since the Unix epoch. + """ @classmethod def create( diff --git a/stripe/api_resources/reporting/report_type.py b/stripe/api_resources/reporting/report_type.py index 70e154988..193f6b8cb 100644 --- a/stripe/api_resources/reporting/report_type.py +++ b/stripe/api_resources/reporting/report_type.py @@ -26,19 +26,52 @@ class ReportType(ListableAPIResource["ReportType"]): class ListParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ data_available_end: int + """ + Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. + """ data_available_start: int + """ + Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. + """ default_columns: Optional[List[str]] + """ + List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) + """ id: str + """ + The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ name: str + """ + Human-readable name of the Report Type + """ object: Literal["reporting.report_type"] + """ + String representing the object's type. Objects of the same type share the same value. + """ updated: int + """ + When this Report Type was latest updated. Measured in seconds since the Unix epoch. + """ version: int + """ + Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. + """ @classmethod def list( diff --git a/stripe/api_resources/reserve_transaction.py b/stripe/api_resources/reserve_transaction.py index 86023daa9..e38e68a70 100644 --- a/stripe/api_resources/reserve_transaction.py +++ b/stripe/api_resources/reserve_transaction.py @@ -11,6 +11,18 @@ class ReserveTransaction(StripeObject): ] = "reserve_transaction" amount: int 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: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ id: str + """ + Unique identifier for the object. + """ object: Literal["reserve_transaction"] + """ + String representing the object's type. Objects of the same type share the same value. + """ diff --git a/stripe/api_resources/reversal.py b/stripe/api_resources/reversal.py index 20ee3e43e..7f5e85634 100644 --- a/stripe/api_resources/reversal.py +++ b/stripe/api_resources/reversal.py @@ -31,15 +31,45 @@ class Reversal(UpdateableAPIResource["Reversal"]): OBJECT_NAME: ClassVar[Literal["transfer_reversal"]] = "transfer_reversal" amount: int + """ + Amount, in cents (or local equivalent). + """ balance_transaction: Optional[ExpandableField["BalanceTransaction"]] + """ + Balance transaction that describes the impact on your account balance. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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). + """ destination_payment_refund: Optional[ExpandableField["Refund"]] + """ + Linked payment refund for the transfer reversal. + """ id: str + """ + Unique identifier for the object. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["transfer_reversal"] + """ + String representing the object's type. Objects of the same type share the same value. + """ source_refund: Optional[ExpandableField["Refund"]] + """ + ID of the refund responsible for the transfer reversal. + """ transfer: ExpandableField["Transfer"] + """ + ID of the transfer that was reversed. + """ def instance_url(self): token = self.id diff --git a/stripe/api_resources/review.py b/stripe/api_resources/review.py index 675378438..8327f2b9c 100644 --- a/stripe/api_resources/review.py +++ b/stripe/api_resources/review.py @@ -34,41 +34,113 @@ class Review(ListableAPIResource["Review"]): class ApproveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ListParams(RequestOptions): created: NotRequired["Review.ListParamsCreated|int|None"] ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ billing_zip: Optional[str] + """ + The ZIP or postal code of the card used, if applicable. + """ charge: Optional[ExpandableField["Charge"]] + """ + The charge associated with this review. + """ closed_reason: Optional[ Literal[ "approved", "disputed", "redacted", "refunded", "refunded_as_fraud" ] ] + """ + The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ id: str + """ + Unique identifier for the object. + """ ip_address: Optional[str] + """ + The IP address where the payment originated. + """ ip_address_location: Optional[StripeObject] + """ + Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["review"] + """ + String representing the object's type. Objects of the same type share the same value. + """ open: bool + """ + If `true`, the review needs action. + """ opened_reason: Literal["manual", "rule"] + """ + The reason the review was opened. One of `rule` or `manual`. + """ payment_intent: Optional[ExpandableField["PaymentIntent"]] + """ + The PaymentIntent ID associated with this review, if one exists. + """ reason: str + """ + The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. + """ session: Optional[StripeObject] + """ + Information related to the browsing session of the user who initiated the payment. + """ @classmethod def _cls_approve( diff --git a/stripe/api_resources/setup_attempt.py b/stripe/api_resources/setup_attempt.py index 35b52b518..bf5773c78 100644 --- a/stripe/api_resources/setup_attempt.py +++ b/stripe/api_resources/setup_attempt.py @@ -35,33 +35,112 @@ class SetupAttempt(ListableAPIResource["SetupAttempt"]): class ListParams(RequestOptions): created: NotRequired["SetupAttempt.ListParamsCreated|int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ application: Optional[ExpandableField["Application"]] + """ + The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. + """ attach_to_self: Optional[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. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ customer: Optional[ExpandableField["Customer"]] + """ + The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. + """ flow_directions: Optional[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. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["setup_attempt"] + """ + String representing the object's type. Objects of the same type share the same value. + """ on_behalf_of: Optional[ExpandableField["Account"]] + """ + The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. + """ payment_method: ExpandableField["PaymentMethod"] + """ + ID of the payment method used with this SetupAttempt. + """ payment_method_details: StripeObject setup_error: Optional[StripeObject] + """ + The error encountered during this attempt to confirm the SetupIntent, if any. + """ setup_intent: ExpandableField["SetupIntent"] + """ + ID of the SetupIntent that this attempt belongs to. + """ status: str + """ + Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. + """ usage: str + """ + The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. + """ @classmethod def list( diff --git a/stripe/api_resources/setup_intent.py b/stripe/api_resources/setup_intent.py index 3840a1f66..bdda72bfc 100644 --- a/stripe/api_resources/setup_intent.py +++ b/stripe/api_resources/setup_intent.py @@ -66,53 +66,107 @@ class CancelParams(RequestOptions): cancellation_reason: NotRequired[ "Literal['abandoned', 'duplicate', 'requested_by_customer']|None" ] + """ + Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate` + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ConfirmParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ mandate_data: NotRequired[ "Literal['']|SetupIntent.ConfirmParamsMandateData|SetupIntent.ConfirmParamsMandateData2|None" ] payment_method: NotRequired["str|None"] + """ + ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + """ payment_method_data: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodData|None" ] + """ + 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|None" ] + """ + Payment method-specific configuration for this SetupIntent. + """ return_url: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None" ] + """ + If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + """ card: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodOptionsCard|None" ] + """ + Configuration for any card setup attempted on this SetupIntent. + """ link: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodOptionsLink|None" ] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ paypal: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodOptionsPaypal|None" ] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ sepa_debit: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodOptionsSepaDebit|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + Additional fields for Financial Connections Session creation + """ networks: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks|None" ] + """ + Additional fields for network related functions + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks( TypedDict @@ -120,6 +174,9 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks( requested: NotRequired[ "List[Literal['ach', 'us_domestic_wire']]|None" ] + """ + Triggers validations to run across the selected networks + """ class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, @@ -127,13 +184,25 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( permissions: NotRequired[ "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]|None" ] + """ + 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']]|None"] + """ + List of data features that you would like to retrieve upon account creation. + """ return_url: NotRequired["str|None"] + """ + 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|None" ] + """ + Additional fields for Mandate creation + """ class ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions( TypedDict, @@ -142,150 +211,319 @@ class ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions( class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): billing_agreement_id: NotRequired["str|None"] + """ + 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|None"] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ class ConfirmParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodOptionsCardMandateOptions|None" ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ moto: NotRequired["bool|None"] + """ + 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']|None" ] + """ + 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']|None" ] + """ + 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|None"] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ end_date: NotRequired["int|None"] + """ + 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|None"] + """ + 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']]|None"] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ class ConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): currency: NotRequired["Literal['cad', 'usd']|None"] + """ + 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|None" ] + """ + Additional fields for Mandate creation + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, ): custom_mandate_url: NotRequired["Literal['']|str|None"] + """ + 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']]|None" ] + """ + List of Stripe products where this mandate can be selected automatically. + """ interval_description: NotRequired["str|None"] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ payment_schedule: NotRequired[ "Literal['combined', 'interval', 'sporadic']|None" ] + """ + Payment schedule for the mandate. + """ transaction_type: NotRequired[ "Literal['business', 'personal']|None" ] + """ + Transaction type of the mandate. + """ class ConfirmParamsPaymentMethodData(TypedDict): acss_debit: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataAcssDebit|None" ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ affirm: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataAffirm|None" ] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ afterpay_clearpay: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataAfterpayClearpay|None" ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ alipay: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataAlipay|None" ] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ au_becs_debit: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataAuBecsDebit|None" ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ bacs_debit: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataBacsDebit|None" ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ bancontact: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataBancontact|None" ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ billing_details: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataBillingDetails|None" ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ blik: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataBlik|None" ] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ boleto: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataBoleto|None" ] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ cashapp: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataCashapp|None" ] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ customer_balance: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataCustomerBalance|None" ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ eps: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataEps|None" ] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ fpx: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataFpx|None" ] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ giropay: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataGiropay|None" ] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ grabpay: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataGrabpay|None" ] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ ideal: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataIdeal|None" ] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ interac_present: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataInteracPresent|None" ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ klarna: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataKlarna|None" ] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ konbini: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataKonbini|None" ] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ link: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataLink|None" ] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ p24: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataP24|None" ] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ paynow: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataPaynow|None" ] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ paypal: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataPaypal|None" ] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ pix: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataPix|None" ] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ promptpay: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataPromptpay|None" ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ radar_options: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataRadarOptions|None" ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ sepa_debit: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataSepaDebit|None" ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ sofort: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataSofort|None" ] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ type: Literal[ "acss_debit", "affirm", @@ -318,15 +556,27 @@ class ConfirmParamsPaymentMethodData(TypedDict): "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|None" ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ wechat_pay: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataWechatPay|None" ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ zip: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataZip|None" ] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ class ConfirmParamsPaymentMethodDataZip(TypedDict): pass @@ -338,19 +588,43 @@ class ConfirmParamsPaymentMethodDataUsBankAccount(TypedDict): account_holder_type: NotRequired[ "Literal['company', 'individual']|None" ] + """ + Account holder type: individual or company. + """ account_number: NotRequired["str|None"] + """ + Account number of the bank account. + """ account_type: NotRequired["Literal['checking', 'savings']|None"] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ financial_connections_account: NotRequired["str|None"] + """ + The ID of a Financial Connections Account to use as a payment method. + """ routing_number: NotRequired["str|None"] + """ + Routing number of the bank account. + """ 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 ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): iban: str + """ + IBAN of the bank account. + """ class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): session: NotRequired["str|None"] + """ + 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 ConfirmParamsPaymentMethodDataPromptpay(TypedDict): pass @@ -368,6 +642,9 @@ 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']|None" ] + """ + The customer's bank. + """ class ConfirmParamsPaymentMethodDataOxxo(TypedDict): pass @@ -382,11 +659,23 @@ class ConfirmParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataKlarnaDob|None" ] + """ + Customer's date of birth + """ 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 ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): pass @@ -395,6 +684,9 @@ 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']|None" ] + """ + The customer's bank. + """ class ConfirmParamsPaymentMethodDataGrabpay(TypedDict): pass @@ -406,6 +698,9 @@ class ConfirmParamsPaymentMethodDataFpx(TypedDict): account_holder_type: NotRequired[ "Literal['company', 'individual']|None" ] + """ + Account holder type for FPX transaction + """ bank: Literal[ "affin_bank", "agrobank", @@ -430,11 +725,17 @@ class ConfirmParamsPaymentMethodDataFpx(TypedDict): "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']|None" ] + """ + The customer's bank. + """ class ConfirmParamsPaymentMethodDataCustomerBalance(TypedDict): pass @@ -444,6 +745,9 @@ class ConfirmParamsPaymentMethodDataCashapp(TypedDict): 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 @@ -452,28 +756,70 @@ class ConfirmParamsPaymentMethodDataBillingDetails(TypedDict): address: NotRequired[ "Literal['']|SetupIntent.ConfirmParamsPaymentMethodDataBillingDetailsAddress|None" ] + """ + Billing address. + """ email: NotRequired["Literal['']|str|None"] + """ + Email address. + """ name: NotRequired["Literal['']|str|None"] + """ + Full name. + """ phone: NotRequired["Literal['']|str|None"] + """ + Billing phone number (including extension). + """ class ConfirmParamsPaymentMethodDataBillingDetailsAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class ConfirmParamsPaymentMethodDataBancontact(TypedDict): pass class ConfirmParamsPaymentMethodDataBacsDebit(TypedDict): account_number: NotRequired["str|None"] + """ + Account number of the bank account that the funds will be debited from. + """ sort_code: NotRequired["str|None"] + """ + 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 ConfirmParamsPaymentMethodDataAlipay(TypedDict): pass @@ -486,110 +832,255 @@ class ConfirmParamsPaymentMethodDataAffirm(TypedDict): 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 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|None"] + """ + The IP address from which the Mandate was accepted by the customer. + """ user_agent: NotRequired["str|None"] + """ + 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 ConfirmParamsMandateDataCustomerAcceptance(TypedDict): accepted_at: NotRequired["int|None"] + """ + The time at which the customer accepted the Mandate. + """ offline: NotRequired[ "SetupIntent.ConfirmParamsMandateDataCustomerAcceptanceOffline|None" ] + """ + If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + """ online: NotRequired[ "SetupIntent.ConfirmParamsMandateDataCustomerAcceptanceOnline|None" ] + """ + 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 ConfirmParamsMandateDataCustomerAcceptanceOffline(TypedDict): pass class CreateParams(RequestOptions): attach_to_self: NotRequired["bool|None"] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ flow_directions: NotRequired[ "List[Literal['inbound', 'outbound']]|None" ] + """ + 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|None" ] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The Stripe account ID created for this SetupIntent. + """ payment_method: NotRequired["str|None"] + """ + ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + """ payment_method_configuration: NotRequired["str|None"] + """ + The ID of the payment method configuration to use with this SetupIntent. + """ payment_method_data: NotRequired[ "SetupIntent.CreateParamsPaymentMethodData|None" ] + """ + 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|None" ] + """ + Payment method-specific configuration for this SetupIntent. + """ payment_method_types: NotRequired["List[str]|None"] + """ + 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|None"] + """ + 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|None"] + """ + If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion. + """ usage: NotRequired["Literal['off_session', 'on_session']|None"] + """ + 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|None"] + """ + 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 CreateParamsPaymentMethodOptions(TypedDict): acss_debit: NotRequired[ "SetupIntent.CreateParamsPaymentMethodOptionsAcssDebit|None" ] + """ + If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + """ card: NotRequired[ "SetupIntent.CreateParamsPaymentMethodOptionsCard|None" ] + """ + Configuration for any card setup attempted on this SetupIntent. + """ link: NotRequired[ "SetupIntent.CreateParamsPaymentMethodOptionsLink|None" ] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ paypal: NotRequired[ "SetupIntent.CreateParamsPaymentMethodOptionsPaypal|None" ] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ sepa_debit: NotRequired[ "SetupIntent.CreateParamsPaymentMethodOptionsSepaDebit|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + Additional fields for Financial Connections Session creation + """ networks: NotRequired[ "SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccountNetworks|None" ] + """ + Additional fields for network related functions + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class CreateParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): requested: NotRequired[ "List[Literal['ach', 'us_domestic_wire']]|None" ] + """ + Triggers validations to run across the selected networks + """ class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, @@ -597,13 +1088,25 @@ class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( permissions: NotRequired[ "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]|None" ] + """ + 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']]|None"] + """ + List of data features that you would like to retrieve upon account creation. + """ return_url: NotRequired["str|None"] + """ + 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|None" ] + """ + Additional fields for Mandate creation + """ class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions( TypedDict, @@ -612,150 +1115,319 @@ class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions( class CreateParamsPaymentMethodOptionsPaypal(TypedDict): billing_agreement_id: NotRequired["str|None"] + """ + 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|None"] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ class CreateParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntent.CreateParamsPaymentMethodOptionsCardMandateOptions|None" ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ moto: NotRequired["bool|None"] + """ + 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']|None" ] + """ + 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']|None" ] + """ + 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|None"] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ end_date: NotRequired["int|None"] + """ + 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|None"] + """ + 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']]|None"] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): currency: NotRequired["Literal['cad', 'usd']|None"] + """ + 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|None" ] + """ + Additional fields for Mandate creation + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, ): custom_mandate_url: NotRequired["Literal['']|str|None"] + """ + 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']]|None" ] + """ + List of Stripe products where this mandate can be selected automatically. + """ interval_description: NotRequired["str|None"] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ payment_schedule: NotRequired[ "Literal['combined', 'interval', 'sporadic']|None" ] + """ + Payment schedule for the mandate. + """ transaction_type: NotRequired[ "Literal['business', 'personal']|None" ] + """ + Transaction type of the mandate. + """ class CreateParamsPaymentMethodData(TypedDict): acss_debit: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataAcssDebit|None" ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ affirm: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataAffirm|None" ] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ afterpay_clearpay: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataAfterpayClearpay|None" ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ alipay: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataAlipay|None" ] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ au_becs_debit: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataAuBecsDebit|None" ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ bacs_debit: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataBacsDebit|None" ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ bancontact: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataBancontact|None" ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ billing_details: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataBillingDetails|None" ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ blik: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataBlik|None" ] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ boleto: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataBoleto|None" ] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ cashapp: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataCashapp|None" ] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ customer_balance: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataCustomerBalance|None" ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ eps: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataEps|None" ] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ fpx: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataFpx|None" ] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ giropay: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataGiropay|None" ] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ grabpay: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataGrabpay|None" ] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ ideal: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataIdeal|None" ] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ interac_present: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataInteracPresent|None" ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ klarna: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataKlarna|None" ] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ konbini: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataKonbini|None" ] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ link: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataLink|None" ] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ p24: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataP24|None" ] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ paynow: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataPaynow|None" ] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ paypal: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataPaypal|None" ] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ pix: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataPix|None" ] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ promptpay: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataPromptpay|None" ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ radar_options: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataRadarOptions|None" ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ sepa_debit: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataSepaDebit|None" ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ sofort: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataSofort|None" ] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ type: Literal[ "acss_debit", "affirm", @@ -788,15 +1460,27 @@ class CreateParamsPaymentMethodData(TypedDict): "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|None" ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ wechat_pay: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataWechatPay|None" ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ zip: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataZip|None" ] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ class CreateParamsPaymentMethodDataZip(TypedDict): pass @@ -808,19 +1492,43 @@ class CreateParamsPaymentMethodDataUsBankAccount(TypedDict): account_holder_type: NotRequired[ "Literal['company', 'individual']|None" ] + """ + Account holder type: individual or company. + """ account_number: NotRequired["str|None"] + """ + Account number of the bank account. + """ account_type: NotRequired["Literal['checking', 'savings']|None"] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ financial_connections_account: NotRequired["str|None"] + """ + The ID of a Financial Connections Account to use as a payment method. + """ routing_number: NotRequired["str|None"] + """ + Routing number of the bank account. + """ 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 CreateParamsPaymentMethodDataSepaDebit(TypedDict): iban: str + """ + IBAN of the bank account. + """ class CreateParamsPaymentMethodDataRadarOptions(TypedDict): session: NotRequired["str|None"] + """ + 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 CreateParamsPaymentMethodDataPromptpay(TypedDict): pass @@ -838,6 +1546,9 @@ 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']|None" ] + """ + The customer's bank. + """ class CreateParamsPaymentMethodDataOxxo(TypedDict): pass @@ -852,11 +1563,23 @@ class CreateParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataKlarnaDob|None" ] + """ + Customer's date of birth + """ 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 CreateParamsPaymentMethodDataInteracPresent(TypedDict): pass @@ -865,6 +1588,9 @@ 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']|None" ] + """ + The customer's bank. + """ class CreateParamsPaymentMethodDataGrabpay(TypedDict): pass @@ -876,6 +1602,9 @@ class CreateParamsPaymentMethodDataFpx(TypedDict): account_holder_type: NotRequired[ "Literal['company', 'individual']|None" ] + """ + Account holder type for FPX transaction + """ bank: Literal[ "affin_bank", "agrobank", @@ -900,11 +1629,17 @@ class CreateParamsPaymentMethodDataFpx(TypedDict): "standard_chartered", "uob", ] + """ + 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']|None" ] + """ + The customer's bank. + """ class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): pass @@ -914,6 +1649,9 @@ class CreateParamsPaymentMethodDataCashapp(TypedDict): class CreateParamsPaymentMethodDataBoleto(TypedDict): tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ class CreateParamsPaymentMethodDataBlik(TypedDict): pass @@ -922,28 +1660,70 @@ class CreateParamsPaymentMethodDataBillingDetails(TypedDict): address: NotRequired[ "Literal['']|SetupIntent.CreateParamsPaymentMethodDataBillingDetailsAddress|None" ] + """ + Billing address. + """ email: NotRequired["Literal['']|str|None"] + """ + Email address. + """ name: NotRequired["Literal['']|str|None"] + """ + Full name. + """ phone: NotRequired["Literal['']|str|None"] + """ + Billing phone number (including extension). + """ class CreateParamsPaymentMethodDataBillingDetailsAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreateParamsPaymentMethodDataBancontact(TypedDict): pass class CreateParamsPaymentMethodDataBacsDebit(TypedDict): account_number: NotRequired["str|None"] + """ + Account number of the bank account that the funds will be debited from. + """ sort_code: NotRequired["str|None"] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ 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 CreateParamsPaymentMethodDataAlipay(TypedDict): pass @@ -956,103 +1736,249 @@ class CreateParamsPaymentMethodDataAffirm(TypedDict): 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 CreateParamsMandateData(TypedDict): customer_acceptance: "SetupIntent.CreateParamsMandateDataCustomerAcceptance" + """ + This hash contains details about the customer acceptance of the Mandate. + """ class CreateParamsMandateDataCustomerAcceptance(TypedDict): accepted_at: NotRequired["int|None"] + """ + The time at which the customer accepted the Mandate. + """ offline: NotRequired[ "SetupIntent.CreateParamsMandateDataCustomerAcceptanceOffline|None" ] + """ + If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + """ online: NotRequired[ "SetupIntent.CreateParamsMandateDataCustomerAcceptanceOnline|None" ] + """ + 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 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 CreateParamsMandateDataCustomerAcceptanceOffline(TypedDict): pass class CreateParamsAutomaticPaymentMethods(TypedDict): allow_redirects: NotRequired["Literal['always', 'never']|None"] + """ + Controls whether this SetupIntent will accept redirect-based payment methods. + + 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 ListParams(RequestOptions): attach_to_self: NotRequired["bool|None"] + """ + 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. + """ created: NotRequired["SetupIntent.ListParamsCreated|int|None"] + """ + 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|None"] + """ + Only return SetupIntents for the customer specified by this customer ID. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + Only return SetupIntents that associate with the specified payment method. + """ starting_after: NotRequired["str|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): attach_to_self: NotRequired["bool|None"] + """ + 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. + """ customer: NotRequired["str|None"] + """ + 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|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ flow_directions: NotRequired[ "List[Literal['inbound', 'outbound']]|None" ] + """ + 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. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + """ payment_method_configuration: NotRequired["str|None"] + """ + The ID of the payment method configuration to use with this SetupIntent. + """ payment_method_data: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodData|None" ] + """ + 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|None" ] + """ + Payment method-specific configuration for this SetupIntent. + """ payment_method_types: NotRequired["List[str]|None"] + """ + 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 ModifyParamsPaymentMethodOptions(TypedDict): acss_debit: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodOptionsAcssDebit|None" ] + """ + If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + """ card: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodOptionsCard|None" ] + """ + Configuration for any card setup attempted on this SetupIntent. + """ link: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodOptionsLink|None" ] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ paypal: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodOptionsPaypal|None" ] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ sepa_debit: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodOptionsSepaDebit|None" ] + """ + 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|None" ] + """ + If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + """ class ModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): financial_connections: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections|None" ] + """ + Additional fields for Financial Connections Session creation + """ networks: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountNetworks|None" ] + """ + Additional fields for network related functions + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class ModifyParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): requested: NotRequired[ "List[Literal['ach', 'us_domestic_wire']]|None" ] + """ + Triggers validations to run across the selected networks + """ class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, @@ -1060,13 +1986,25 @@ class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( permissions: NotRequired[ "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]|None" ] + """ + 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']]|None"] + """ + List of data features that you would like to retrieve upon account creation. + """ return_url: NotRequired["str|None"] + """ + 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 ModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions|None" ] + """ + Additional fields for Mandate creation + """ class ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions( TypedDict, @@ -1075,150 +2013,319 @@ class ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions( class ModifyParamsPaymentMethodOptionsPaypal(TypedDict): billing_agreement_id: NotRequired["str|None"] + """ + The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + """ class ModifyParamsPaymentMethodOptionsLink(TypedDict): persistent_token: NotRequired["str|None"] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ class ModifyParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodOptionsCardMandateOptions|None" ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ moto: NotRequired["bool|None"] + """ + 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']|None" ] + """ + 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']|None" ] + """ + 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 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|None"] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ end_date: NotRequired["int|None"] + """ + 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|None"] + """ + 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']]|None"] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ class ModifyParamsPaymentMethodOptionsAcssDebit(TypedDict): currency: NotRequired["Literal['cad', 'usd']|None"] + """ + 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|None" ] + """ + Additional fields for Mandate creation + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, ): custom_mandate_url: NotRequired["Literal['']|str|None"] + """ + 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']]|None" ] + """ + List of Stripe products where this mandate can be selected automatically. + """ interval_description: NotRequired["str|None"] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ payment_schedule: NotRequired[ "Literal['combined', 'interval', 'sporadic']|None" ] + """ + Payment schedule for the mandate. + """ transaction_type: NotRequired[ "Literal['business', 'personal']|None" ] + """ + Transaction type of the mandate. + """ class ModifyParamsPaymentMethodData(TypedDict): acss_debit: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataAcssDebit|None" ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ affirm: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataAffirm|None" ] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ afterpay_clearpay: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataAfterpayClearpay|None" ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ alipay: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataAlipay|None" ] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ au_becs_debit: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataAuBecsDebit|None" ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ bacs_debit: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataBacsDebit|None" ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ bancontact: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataBancontact|None" ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ billing_details: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataBillingDetails|None" ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ blik: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataBlik|None" ] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ boleto: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataBoleto|None" ] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ cashapp: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataCashapp|None" ] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ customer_balance: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataCustomerBalance|None" ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ eps: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataEps|None" ] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ fpx: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataFpx|None" ] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ giropay: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataGiropay|None" ] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ grabpay: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataGrabpay|None" ] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ ideal: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataIdeal|None" ] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ interac_present: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataInteracPresent|None" ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ klarna: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataKlarna|None" ] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ konbini: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataKonbini|None" ] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ link: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataLink|None" ] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ p24: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataP24|None" ] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ paynow: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataPaynow|None" ] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ paypal: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataPaypal|None" ] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ pix: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataPix|None" ] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ promptpay: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataPromptpay|None" ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ radar_options: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataRadarOptions|None" ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ sepa_debit: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataSepaDebit|None" ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ sofort: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataSofort|None" ] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ type: Literal[ "acss_debit", "affirm", @@ -1251,15 +2358,27 @@ class ModifyParamsPaymentMethodData(TypedDict): "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|None" ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ wechat_pay: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataWechatPay|None" ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ zip: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataZip|None" ] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ class ModifyParamsPaymentMethodDataZip(TypedDict): pass @@ -1271,19 +2390,43 @@ class ModifyParamsPaymentMethodDataUsBankAccount(TypedDict): account_holder_type: NotRequired[ "Literal['company', 'individual']|None" ] + """ + Account holder type: individual or company. + """ account_number: NotRequired["str|None"] + """ + Account number of the bank account. + """ account_type: NotRequired["Literal['checking', 'savings']|None"] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ financial_connections_account: NotRequired["str|None"] + """ + The ID of a Financial Connections Account to use as a payment method. + """ routing_number: NotRequired["str|None"] + """ + 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 ModifyParamsPaymentMethodDataSepaDebit(TypedDict): iban: str + """ + IBAN of the bank account. + """ class ModifyParamsPaymentMethodDataRadarOptions(TypedDict): session: NotRequired["str|None"] + """ + 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 @@ -1301,6 +2444,9 @@ 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']|None" ] + """ + The customer's bank. + """ class ModifyParamsPaymentMethodDataOxxo(TypedDict): pass @@ -1315,11 +2461,23 @@ class ModifyParamsPaymentMethodDataKlarna(TypedDict): dob: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataKlarnaDob|None" ] + """ + 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 ModifyParamsPaymentMethodDataInteracPresent(TypedDict): pass @@ -1328,6 +2486,9 @@ 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']|None" ] + """ + The customer's bank. + """ class ModifyParamsPaymentMethodDataGrabpay(TypedDict): pass @@ -1339,6 +2500,9 @@ class ModifyParamsPaymentMethodDataFpx(TypedDict): account_holder_type: NotRequired[ "Literal['company', 'individual']|None" ] + """ + Account holder type for FPX transaction + """ bank: Literal[ "affin_bank", "agrobank", @@ -1363,11 +2527,17 @@ class ModifyParamsPaymentMethodDataFpx(TypedDict): "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']|None" ] + """ + The customer's bank. + """ class ModifyParamsPaymentMethodDataCustomerBalance(TypedDict): pass @@ -1377,6 +2547,9 @@ class ModifyParamsPaymentMethodDataCashapp(TypedDict): 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 @@ -1385,28 +2558,70 @@ class ModifyParamsPaymentMethodDataBillingDetails(TypedDict): address: NotRequired[ "Literal['']|SetupIntent.ModifyParamsPaymentMethodDataBillingDetailsAddress|None" ] + """ + Billing address. + """ email: NotRequired["Literal['']|str|None"] + """ + Email address. + """ name: NotRequired["Literal['']|str|None"] + """ + Full name. + """ phone: NotRequired["Literal['']|str|None"] + """ + Billing phone number (including extension). + """ class ModifyParamsPaymentMethodDataBillingDetailsAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class ModifyParamsPaymentMethodDataBancontact(TypedDict): pass class ModifyParamsPaymentMethodDataBacsDebit(TypedDict): account_number: NotRequired["str|None"] + """ + Account number of the bank account that the funds will be debited from. + """ sort_code: NotRequired["str|None"] + """ + 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 ModifyParamsPaymentMethodDataAlipay(TypedDict): pass @@ -1419,43 +2634,144 @@ class ModifyParamsPaymentMethodDataAffirm(TypedDict): 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|None"] + """ + The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class VerifyMicrodepositsParams(RequestOptions): amounts: NotRequired["List[int]|None"] + """ + Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + """ descriptor_code: NotRequired["str|None"] + """ + A six-character code starting with SM present in the microdeposit sent to the bank account. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ application: Optional[ExpandableField["Application"]] + """ + ID of the Connect application that created the SetupIntent. + """ attach_to_self: Optional[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: Optional[StripeObject] + """ + Settings for dynamic payment methods compatible with this Setup Intent + """ cancellation_reason: Optional[ Literal["abandoned", "duplicate", "requested_by_customer"] ] + """ + Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. + """ client_secret: Optional[str] + """ + The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. + + The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ customer: Optional[ExpandableField["Customer"]] + """ + 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: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ flow_directions: Optional[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. + """ id: str + """ + Unique identifier for the object. + """ last_setup_error: Optional[StripeObject] + """ + The error encountered in the previous SetupIntent confirmation. + """ latest_attempt: Optional[ExpandableField["SetupAttempt"]] + """ + The most recent SetupAttempt for this SetupIntent. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ mandate: Optional[ExpandableField["Mandate"]] + """ + ID of the multi use Mandate generated by the SetupIntent. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ next_action: Optional[StripeObject] + """ + If present, this property tells you what actions you need to take in order for your customer to continue payment setup. + """ object: Literal["setup_intent"] + """ + String representing the object's type. Objects of the same type share the same value. + """ on_behalf_of: Optional[ExpandableField["Account"]] + """ + The account (if any) for which the setup is intended. + """ payment_method: Optional[ExpandableField["PaymentMethod"]] + """ + ID of the payment method used with this SetupIntent. + """ payment_method_configuration_details: Optional[StripeObject] + """ + Information about the payment method configuration used for this Setup Intent. + """ payment_method_options: Optional[StripeObject] + """ + Payment method-specific configuration for this SetupIntent. + """ payment_method_types: List[str] + """ + The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. + """ single_use_mandate: Optional[ExpandableField["Mandate"]] + """ + ID of the single_use Mandate generated by the SetupIntent. + """ status: Literal[ "canceled", "processing", @@ -1464,7 +2780,15 @@ class VerifyMicrodepositsParams(RequestOptions): "requires_payment_method", "succeeded", ] + """ + [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. + """ usage: str + """ + Indicates how the payment method is intended to be used in the future. + + Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. + """ @classmethod def _cls_cancel( diff --git a/stripe/api_resources/shipping_rate.py b/stripe/api_resources/shipping_rate.py index 80b70be3b..42859aecc 100644 --- a/stripe/api_resources/shipping_rate.py +++ b/stripe/api_resources/shipping_rate.py @@ -40,99 +40,249 @@ class CreateParams(RequestOptions): delivery_estimate: NotRequired[ "ShippingRate.CreateParamsDeliveryEstimate|None" ] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ fixed_amount: NotRequired[ "ShippingRate.CreateParamsFixedAmount|None" ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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']|None" ] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ tax_code: NotRequired["str|None"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ type: NotRequired["Literal['fixed_amount']|None"] + """ + 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]|None" ] + """ + 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']|None" ] + """ + 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|None" ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ minimum: NotRequired[ "ShippingRate.CreateParamsDeliveryEstimateMinimum|None" ] + """ + 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 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|None"] + """ + Only return shipping rates that are active or inactive. + """ created: NotRequired["ShippingRate.ListParamsCreated|int|None"] + """ + 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|None"] + """ + Only return shipping rates for the given currency. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): active: NotRequired["bool|None"] + """ + Whether the shipping rate can be used for new purchases. Defaults to `true`. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ fixed_amount: NotRequired[ "ShippingRate.ModifyParamsFixedAmount|None" ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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']|None" ] + """ + 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]|None" ] + """ + 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|None"] + """ + A non-negative integer in cents representing how much to charge. + """ tax_behavior: NotRequired[ "Literal['exclusive', 'inclusive', 'unspecified']|None" ] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ active: bool + """ + Whether the shipping rate can be used for new purchases. Defaults to `true`. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ delivery_estimate: Optional[StripeObject] + """ + The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ display_name: Optional[str] + """ + The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ fixed_amount: Optional[StripeObject] id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["shipping_rate"] + """ + String representing the object's type. Objects of the same type share the same value. + """ tax_behavior: Optional[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: Optional[ExpandableField["TaxCode"]] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ type: Literal["fixed_amount"] + """ + The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + """ @classmethod def create( diff --git a/stripe/api_resources/sigma/scheduled_query_run.py b/stripe/api_resources/sigma/scheduled_query_run.py index 7f67119b9..a1ebac5ca 100644 --- a/stripe/api_resources/sigma/scheduled_query_run.py +++ b/stripe/api_resources/sigma/scheduled_query_run.py @@ -26,24 +26,69 @@ class ScheduledQueryRun(ListableAPIResource["ScheduledQueryRun"]): class ListParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ data_load_time: int + """ + When the query was run, Sigma contained a snapshot of your Stripe data at this time. + """ error: Optional[StripeObject] file: Optional["File"] + """ + The file object representing the results of the query. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["scheduled_query_run"] + """ + String representing the object's type. Objects of the same type share the same value. + """ result_available_until: int + """ + Time at which the result expires and is no longer available for download. + """ sql: str + """ + SQL for the query. + """ status: str + """ + The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. + """ title: str + """ + Title of the query. + """ @classmethod def list( diff --git a/stripe/api_resources/source.py b/stripe/api_resources/source.py index 0c58de3d7..7590f65dc 100644 --- a/stripe/api_resources/source.py +++ b/stripe/api_resources/source.py @@ -43,237 +43,606 @@ class Source(CreateableAPIResource["Source"], UpdateableAPIResource["Source"]): class CreateParams(RequestOptions): amount: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ flow: NotRequired[ "Literal['code_verification', 'none', 'receiver', 'redirect']|None" ] + """ + 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|None"] + """ + 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]|None"] original_source: NotRequired["str|None"] + """ + The source to share. + """ owner: NotRequired["Source.CreateParamsOwner|None"] + """ + Information about the owner of the payment instrument that may be used or required by particular source types. + """ receiver: NotRequired["Source.CreateParamsReceiver|None"] + """ + Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). + """ redirect: NotRequired["Source.CreateParamsRedirect|None"] + """ + Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). + """ source_order: NotRequired["Source.CreateParamsSourceOrder|None"] + """ + 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|None"] + """ + 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|None"] + """ + An optional token used to create the source. When passed, token properties will override source parameters. + """ type: NotRequired["str|None"] + """ + 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']|None"] class CreateParamsSourceOrder(TypedDict): items: NotRequired["List[Source.CreateParamsSourceOrderItem]|None"] + """ + List of items constituting the order. + """ shipping: NotRequired[ "Source.CreateParamsSourceOrderShipping|None" ] + """ + 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|None"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ name: NotRequired["str|None"] + """ + Recipient name. + """ phone: NotRequired["str|None"] + """ + Recipient phone (including extension). + """ tracking_number: NotRequired["str|None"] + """ + 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|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + 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|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreateParamsSourceOrderItem(TypedDict): amount: NotRequired["int|None"] currency: NotRequired["str|None"] description: NotRequired["str|None"] parent: NotRequired["str|None"] + """ + The ID of the SKU being ordered. + """ quantity: NotRequired["int|None"] + """ + 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']|None" ] 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']|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|None"] + """ + Owner's address. + """ email: NotRequired["str|None"] + """ + Owner's email address. + """ name: NotRequired["str|None"] + """ + Owner's full name. + """ phone: NotRequired["str|None"] + """ + Owner's phone number. + """ class CreateParamsOwnerAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreateParamsMandate(TypedDict): acceptance: NotRequired[ "Source.CreateParamsMandateAcceptance|None" ] + """ + The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. + """ amount: NotRequired["Literal['']|int|None"] + """ + The amount specified by the mandate. (Leave null for a mandate covering all amounts) + """ currency: NotRequired["str|None"] + """ + The currency specified by the mandate. (Must match `currency` of the source) + """ interval: NotRequired[ "Literal['one_time', 'scheduled', 'variable']|None" ] + """ + 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']|None" ] + """ + 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|None"] + """ + The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + """ ip: NotRequired["str|None"] + """ + The IP address from which the mandate was accepted or refused by the customer. + """ offline: NotRequired[ "Source.CreateParamsMandateAcceptanceOffline|None" ] + """ + The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` + """ online: NotRequired[ "Source.CreateParamsMandateAcceptanceOnline|None" ] + """ + 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']|None"] + """ + The type of acceptance information included with the mandate. Either `online` or `offline` + """ user_agent: NotRequired["str|None"] + """ + The user agent of the browser from which the mandate was accepted or refused by the customer. + """ class CreateParamsMandateAcceptanceOnline(TypedDict): date: NotRequired["int|None"] + """ + The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + """ ip: NotRequired["str|None"] + """ + The IP address from which the mandate was accepted or refused by the customer. + """ user_agent: NotRequired["str|None"] + """ + 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 ListSourceTransactionsParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Amount associated with the source. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ mandate: NotRequired["Source.ModifyParamsMandate|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + Information about the owner of the payment instrument that may be used or required by particular source types. + """ source_order: NotRequired["Source.ModifyParamsSourceOrder|None"] + """ + 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]|None"] + """ + List of items constituting the order. + """ shipping: NotRequired[ "Source.ModifyParamsSourceOrderShipping|None" ] + """ + 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|None"] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ name: NotRequired["str|None"] + """ + Recipient name. + """ phone: NotRequired["str|None"] + """ + Recipient phone (including extension). + """ tracking_number: NotRequired["str|None"] + """ + 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|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + 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|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class ModifyParamsSourceOrderItem(TypedDict): amount: NotRequired["int|None"] currency: NotRequired["str|None"] description: NotRequired["str|None"] parent: NotRequired["str|None"] + """ + The ID of the SKU being ordered. + """ quantity: NotRequired["int|None"] + """ + 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']|None" ] class ModifyParamsOwner(TypedDict): address: NotRequired["Source.ModifyParamsOwnerAddress|None"] + """ + Owner's address. + """ email: NotRequired["str|None"] + """ + Owner's email address. + """ name: NotRequired["str|None"] + """ + Owner's full name. + """ phone: NotRequired["str|None"] + """ + Owner's phone number. + """ class ModifyParamsOwnerAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class ModifyParamsMandate(TypedDict): acceptance: NotRequired[ "Source.ModifyParamsMandateAcceptance|None" ] + """ + The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. + """ amount: NotRequired["Literal['']|int|None"] + """ + The amount specified by the mandate. (Leave null for a mandate covering all amounts) + """ currency: NotRequired["str|None"] + """ + The currency specified by the mandate. (Must match `currency` of the source) + """ interval: NotRequired[ "Literal['one_time', 'scheduled', 'variable']|None" ] + """ + 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']|None" ] + """ + 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|None"] + """ + The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + """ ip: NotRequired["str|None"] + """ + The IP address from which the mandate was accepted or refused by the customer. + """ offline: NotRequired[ "Source.ModifyParamsMandateAcceptanceOffline|None" ] + """ + The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` + """ online: NotRequired[ "Source.ModifyParamsMandateAcceptanceOnline|None" ] + """ + 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']|None"] + """ + The type of acceptance information included with the mandate. Either `online` or `offline` + """ user_agent: NotRequired["str|None"] + """ + The user agent of the browser from which the mandate was accepted or refused by the customer. + """ class ModifyParamsMandateAcceptanceOnline(TypedDict): date: NotRequired["int|None"] + """ + The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + """ ip: NotRequired["str|None"] + """ + The IP address from which the mandate was accepted or refused by the customer. + """ user_agent: NotRequired["str|None"] + """ + 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 RetrieveParams(RequestOptions): client_secret: NotRequired["str|None"] + """ + The client secret of the source. Required if a publishable key is used to retrieve the source. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class VerifyParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ values: List[str] + """ + The values needed to verify the source. + """ ach_credit_transfer: Optional[StripeObject] ach_debit: Optional[StripeObject] acss_debit: Optional[StripeObject] alipay: Optional[StripeObject] amount: Optional[int] + """ + A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. + """ au_becs_debit: Optional[StripeObject] bancontact: Optional[StripeObject] card: Optional[StripeObject] card_present: Optional[StripeObject] client_secret: str + """ + The client secret of the source. Used for client-side retrieval using a publishable key. + """ code_verification: Optional[StripeObject] created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ currency: Optional[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. Required for `single_use` sources. + """ customer: Optional[str] + """ + The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. + """ eps: Optional[StripeObject] flow: str + """ + The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. + """ giropay: Optional[StripeObject] id: str + """ + Unique identifier for the object. + """ ideal: Optional[StripeObject] klarna: Optional[StripeObject] livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ multibanco: Optional[StripeObject] object: Literal["source"] + """ + String representing the object's type. Objects of the same type share the same value. + """ owner: Optional[StripeObject] + """ + Information about the owner of the payment instrument that may be used or required by particular source types. + """ p24: Optional[StripeObject] receiver: Optional[StripeObject] redirect: Optional[StripeObject] @@ -282,7 +651,13 @@ class VerifyParams(RequestOptions): sofort: Optional[StripeObject] source_order: Optional[StripeObject] statement_descriptor: Optional[str] + """ + Extra information about a source. This will appear on your customer's statement every time you charge the source. + """ status: str + """ + The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. + """ three_d_secure: Optional[StripeObject] type: Literal[ "ach_credit_transfer", @@ -305,7 +680,13 @@ class VerifyParams(RequestOptions): "three_d_secure", "wechat", ] + """ + The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. + """ usage: Optional[str] + """ + Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. + """ wechat: Optional[StripeObject] @classmethod diff --git a/stripe/api_resources/source_mandate_notification.py b/stripe/api_resources/source_mandate_notification.py index 80f1ea26d..08185ee7e 100644 --- a/stripe/api_resources/source_mandate_notification.py +++ b/stripe/api_resources/source_mandate_notification.py @@ -20,13 +20,49 @@ class SourceMandateNotification(StripeObject): ] = "source_mandate_notification" acss_debit: Optional[StripeObject] amount: Optional[int] + """ + A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`. + """ bacs_debit: Optional[StripeObject] created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["source_mandate_notification"] + """ + String representing the object's type. Objects of the same type share the same value. + """ reason: str + """ + The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. + """ sepa_debit: Optional[StripeObject] source: "Source" + """ + `Source` objects allow you to accept a variety of payment methods. They + represent a customer's payment instrument, and can be used with the Stripe API + just like a `Card` object: once chargeable, they can be charged, or can be + attached to customers. + + Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources). + We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods). + This newer API provides access to our latest features and payment method types. + + Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). + """ status: str + """ + The status of the mandate notification. Valid statuses are `pending` or `submitted`. + """ type: str + """ + The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`. + """ diff --git a/stripe/api_resources/source_transaction.py b/stripe/api_resources/source_transaction.py index 0ceac7faa..8be226f36 100644 --- a/stripe/api_resources/source_transaction.py +++ b/stripe/api_resources/source_transaction.py @@ -16,17 +16,41 @@ class SourceTransaction(StripeObject): OBJECT_NAME: ClassVar[Literal["source_transaction"]] = "source_transaction" ach_credit_transfer: Optional[StripeObject] amount: int + """ + A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. + """ chf_credit_transfer: Optional[StripeObject] created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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). + """ gbp_credit_transfer: Optional[StripeObject] id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["source_transaction"] + """ + String representing the object's type. Objects of the same type share the same value. + """ paper_check: Optional[StripeObject] sepa_credit_transfer: Optional[StripeObject] source: str + """ + The ID of the source this transaction is attached to. + """ status: str + """ + The status of the transaction, one of `succeeded`, `pending`, or `failed`. + """ type: Literal[ "ach_credit_transfer", "ach_debit", @@ -45,3 +69,6 @@ class SourceTransaction(StripeObject): "three_d_secure", "wechat", ] + """ + The type of source this transaction is attached to. + """ diff --git a/stripe/api_resources/subscription.py b/stripe/api_resources/subscription.py index 807918bfa..5368de495 100644 --- a/stripe/api_resources/subscription.py +++ b/stripe/api_resources/subscription.py @@ -70,116 +70,285 @@ class CancelParams(RequestOptions): cancellation_details: NotRequired[ "Subscription.CancelParamsCancellationDetails|None" ] + """ + Details about why this subscription was cancelled + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ invoice_now: NotRequired["bool|None"] + """ + Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. + """ prorate: NotRequired["bool|None"] + """ + Will generate a proration invoice item that credits remaining unused time until the subscription period end. + """ class CancelParamsCancellationDetails(TypedDict): comment: NotRequired["Literal['']|str|None"] + """ + 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']|None" ] + """ + 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]|None" ] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + Boolean indicating whether this subscription should cancel at the end of the current period. + """ collection_method: NotRequired[ "Literal['charge_automatically', 'send_invoice']|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + 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|None"] + """ + 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. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ items: NotRequired["List[Subscription.CreateParamsItem]|None"] + """ + A list of up to 20 subscription items, each with an attached price. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + Indicates if a customer is on or off-session while an invoice payment is attempted. + """ on_behalf_of: NotRequired["Literal['']|str|None"] + """ + 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']|None" ] + """ + 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. + + `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. + + Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first invoice status. + """ payment_settings: NotRequired[ "Subscription.CreateParamsPaymentSettings|None" ] + """ + Payment settings to pass to invoices created by the subscription. + """ pending_invoice_item_interval: NotRequired[ "Literal['']|Subscription.CreateParamsPendingInvoiceItemInterval|None" ] + """ + 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|None"] + """ + 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']|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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + Settings related to subscription trials. + """ class CreateParamsTrialSettings(TypedDict): end_behavior: "Subscription.CreateParamsTrialSettingsEndBehavior" + """ + Defines how the subscription should behave when the user's free trial ends. + """ 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 CreateParamsTransferData(TypedDict): amount_percent: NotRequired["float|None"] + """ + 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 CreateParamsPendingInvoiceItemInterval(TypedDict): interval: Literal["day", "month", "week", "year"] + """ + Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + """ interval_count: NotRequired["int|None"] + """ + 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 CreateParamsPaymentSettings(TypedDict): payment_method_options: NotRequired[ "Subscription.CreateParamsPaymentSettingsPaymentMethodOptions|None" ] + """ + 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']]|None" ] + """ + 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']|None" ] + """ + 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|None" ] + """ + 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|None" ] + """ + This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. + """ card: NotRequired[ "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCard|None" ] + """ + This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. + """ customer_balance: NotRequired[ "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance|None" ] + """ + This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. + """ konbini: NotRequired[ "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsKonbini|None" ] + """ + 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|None" ] + """ + This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. + """ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( TypedDict, @@ -187,9 +356,15 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( financial_connections: NotRequired[ "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections|None" ] + """ + Additional fields for Financial Connections Session creation + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, @@ -197,7 +372,13 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne permissions: NotRequired[ "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]|None" ] + """ + 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']]|None"] + """ + List of data features that you would like to retrieve upon account creation. + """ class CreateParamsPaymentSettingsPaymentMethodOptionsKonbini( TypedDict @@ -210,7 +391,13 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( bank_transfer: NotRequired[ "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer|None" ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ funding_type: NotRequired["str|None"] + """ + 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, @@ -218,30 +405,57 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer eu_bank_transfer: NotRequired[ "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer|None" ] + """ + Configuration for eu_bank_transfer funding type. + """ type: NotRequired["str|None"] + """ + 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 CreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions|None" ] + """ + 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']|None" ] + """ + 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']|None" ] + """ + 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 CreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions( TypedDict, ): amount: NotRequired["int|None"] + """ + Amount to be charged for future payments. + """ amount_type: NotRequired["Literal['fixed', 'maximum']|None"] + """ + 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|None"] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ class CreateParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict, @@ -249,6 +463,9 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsBancontact( preferred_language: NotRequired[ "Literal['de', 'en', 'fr', 'nl']|None" ] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( TypedDict, @@ -256,9 +473,15 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( mandate_options: NotRequired[ "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions|None" ] + """ + Additional fields for Mandate creation + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, @@ -266,60 +489,147 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( transaction_type: NotRequired[ "Literal['business', 'personal']|None" ] + """ + Transaction type of the mandate. + """ class CreateParamsItem(TypedDict): billing_thresholds: NotRequired[ "Literal['']|Subscription.CreateParamsItemBillingThresholds|None" ] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + Plan ID for this item, as a string. + """ price: NotRequired["str|None"] + """ + The ID of the price object. + """ price_data: NotRequired[ "Subscription.CreateParamsItemPriceData|None" ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ quantity: NotRequired["int|None"] + """ + Quantity for this item. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + 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 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']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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 CreateParamsItemPriceDataRecurring(TypedDict): interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ interval_count: NotRequired["int|None"] + """ + 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 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 CreateParamsBillingThresholds(TypedDict): amount_gte: NotRequired["int|None"] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ reset_billing_cycle_anchor: NotRequired["bool|None"] + """ + 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 CreateParamsAutomaticTax(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|None"] + """ + The ID of the price object. + """ price_data: NotRequired[ "Subscription.CreateParamsAddInvoiceItemPriceData|None" ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ quantity: NotRequired["int|None"] + """ + Quantity for this item. Defaults to 1. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + """ 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']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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 @@ -328,9 +638,15 @@ class ListParams(RequestOptions): automatic_tax: NotRequired[ "Subscription.ListParamsAutomaticTax|None" ] + """ + Filter subscriptions by their automatic tax settings. + """ collection_method: NotRequired[ "Literal['charge_automatically', 'send_invoice']|None" ] + """ + The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. + """ created: NotRequired["Subscription.ListParamsCreated|int|None"] current_period_end: NotRequired[ "Subscription.ListParamsCurrentPeriodEnd|int|None" @@ -339,143 +655,353 @@ class ListParams(RequestOptions): "Subscription.ListParamsCurrentPeriodStart|int|None" ] customer: NotRequired["str|None"] + """ + The ID of the customer whose subscriptions will be retrieved. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + The ID of the plan whose subscriptions will be retrieved. + """ price: NotRequired["str|None"] + """ + Filter for subscriptions that contain this recurring price ID. + """ starting_after: NotRequired["str|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + 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 ListParamsCurrentPeriodStart(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ListParamsCurrentPeriodEnd(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ListParamsAutomaticTax(TypedDict): enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ class ModifyParams(RequestOptions): add_invoice_items: NotRequired[ "List[Subscription.ModifyParamsAddInvoiceItem]|None" ] + """ + 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|None"] + """ + 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|None" ] + """ + 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']|None" ] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + Boolean indicating whether this subscription should cancel at the end of the current period. + """ cancellation_details: NotRequired[ "Subscription.ModifyParamsCancellationDetails|None" ] + """ + Details about why this subscription was cancelled + """ collection_method: NotRequired[ "Literal['charge_automatically', 'send_invoice']|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + 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|None"] + """ + 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. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ items: NotRequired["List[Subscription.ModifyParamsItem]|None"] + """ + A list of up to 20 subscription items, each with an attached price. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + Indicates if a customer is on or off-session while an invoice payment is attempted. + """ on_behalf_of: NotRequired["Literal['']|str|None"] + """ + The account on behalf of which to charge, for each of the subscription's invoices. + """ pause_collection: NotRequired[ "Literal['']|Subscription.ModifyParamsPauseCollection|None" ] + """ + If specified, payment collection for this subscription will be paused. + """ payment_behavior: NotRequired[ "Literal['allow_incomplete', 'default_incomplete', 'error_if_incomplete', 'pending_if_incomplete']|None" ] + """ + 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. + """ payment_settings: NotRequired[ "Subscription.ModifyParamsPaymentSettings|None" ] + """ + Payment settings to pass to invoices created by the subscription. + """ pending_invoice_item_interval: NotRequired[ "Literal['']|Subscription.ModifyParamsPendingInvoiceItemInterval|None" ] + """ + 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|None"] + """ + 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']|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|None"] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + Settings related to subscription trials. + """ class ModifyParamsTrialSettings(TypedDict): end_behavior: "Subscription.ModifyParamsTrialSettingsEndBehavior" + """ + Defines how the subscription should behave when the user's free trial ends. + """ 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 ModifyParamsTransferData(TypedDict): amount_percent: NotRequired["float|None"] + """ + 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 ModifyParamsPendingInvoiceItemInterval(TypedDict): interval: Literal["day", "month", "week", "year"] + """ + Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + """ interval_count: NotRequired["int|None"] + """ + 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 ModifyParamsPaymentSettings(TypedDict): payment_method_options: NotRequired[ "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptions|None" ] + """ + 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']]|None" ] + """ + 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']|None" ] + """ + Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. + """ class ModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): acss_debit: NotRequired[ "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit|None" ] + """ + 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|None" ] + """ + This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. + """ card: NotRequired[ "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCard|None" ] + """ + This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. + """ customer_balance: NotRequired[ "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance|None" ] + """ + This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. + """ konbini: NotRequired[ "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsKonbini|None" ] + """ + 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|None" ] + """ + This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. + """ class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( TypedDict, @@ -483,9 +1009,15 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( financial_connections: NotRequired[ "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections|None" ] + """ + Additional fields for Financial Connections Session creation + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( TypedDict, @@ -493,7 +1025,13 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne permissions: NotRequired[ "List[Literal['balances', 'ownership', 'payment_method', 'transactions']]|None" ] + """ + 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']]|None"] + """ + List of data features that you would like to retrieve upon account creation. + """ class ModifyParamsPaymentSettingsPaymentMethodOptionsKonbini( TypedDict @@ -506,7 +1044,13 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( bank_transfer: NotRequired[ "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer|None" ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ funding_type: NotRequired["str|None"] + """ + 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, @@ -514,30 +1058,57 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer eu_bank_transfer: NotRequired[ "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer|None" ] + """ + Configuration for eu_bank_transfer funding type. + """ type: NotRequired["str|None"] + """ + 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 ModifyParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions|None" ] + """ + 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']|None" ] + """ + 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']|None" ] + """ + 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 ModifyParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions( TypedDict, ): amount: NotRequired["int|None"] + """ + Amount to be charged for future payments. + """ amount_type: NotRequired["Literal['fixed', 'maximum']|None"] + """ + 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|None"] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ class ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict, @@ -545,6 +1116,9 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( preferred_language: NotRequired[ "Literal['de', 'en', 'fr', 'nl']|None" ] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit( TypedDict, @@ -552,9 +1126,15 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit( mandate_options: NotRequired[ "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions|None" ] + """ + Additional fields for Mandate creation + """ verification_method: NotRequired[ "Literal['automatic', 'instant', 'microdeposits']|None" ] + """ + Verification method for the intent + """ class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, @@ -562,132 +1142,375 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( transaction_type: NotRequired[ "Literal['business', 'personal']|None" ] + """ + Transaction type of the mandate. + """ 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|None"] + """ + The time after which the subscription will resume collecting payments. + """ class ModifyParamsItem(TypedDict): billing_thresholds: NotRequired[ "Literal['']|Subscription.ModifyParamsItemBillingThresholds|None" ] + """ + 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|None"] + """ + 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|None"] + """ + A flag that, if set to `true`, will delete the specified item. + """ id: NotRequired["str|None"] + """ + Subscription item to update. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + Plan ID for this item, as a string. + """ price: NotRequired["str|None"] + """ + 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|None" ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ quantity: NotRequired["int|None"] + """ + Quantity for this item. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + 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 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']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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 ModifyParamsItemPriceDataRecurring(TypedDict): interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ interval_count: NotRequired["int|None"] + """ + 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 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 ModifyParamsCancellationDetails(TypedDict): comment: NotRequired["Literal['']|str|None"] + """ + 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']|None" ] + """ + The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + """ class ModifyParamsBillingThresholds(TypedDict): amount_gte: NotRequired["int|None"] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ reset_billing_cycle_anchor: NotRequired["bool|None"] + """ + 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 ModifyParamsAutomaticTax(TypedDict): enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ class ModifyParamsAddInvoiceItem(TypedDict): price: NotRequired["str|None"] + """ + The ID of the price object. + """ price_data: NotRequired[ "Subscription.ModifyParamsAddInvoiceItemPriceData|None" ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ quantity: NotRequired["int|None"] + """ + Quantity for this item. Defaults to 1. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + """ 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']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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 ResumeParams(RequestOptions): billing_cycle_anchor: NotRequired[ "Literal['now', 'unchanged']|None" ] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ proration_behavior: NotRequired[ "Literal['always_invoice', 'create_prorations', 'none']|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|None"] + """ + 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 RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class SearchParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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"]] + """ + ID of the Connect Application that created the subscription. + """ application_fee_percent: Optional[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. + """ automatic_tax: StripeObject billing_cycle_anchor: int + """ + Determines 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: Optional[StripeObject] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + """ cancel_at: Optional[int] + """ + A date in the future at which the subscription will automatically get canceled + """ cancel_at_period_end: bool + """ + If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period. + """ canceled_at: Optional[int] + """ + If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. + """ cancellation_details: Optional[StripeObject] + """ + Details about why this subscription was cancelled + """ collection_method: 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`. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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). + """ current_period_end: int + """ + End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. + """ current_period_start: int + """ + Start of the current period that the subscription has been invoiced for. + """ customer: ExpandableField["Customer"] + """ + ID of the customer who owns the subscription. + """ days_until_due: Optional[int] + """ + Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. + """ default_payment_method: Optional[ExpandableField["PaymentMethod"]] + """ + 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: Optional[ ExpandableField[Union["Account", "BankAccount", "Card", "Source"]] ] + """ + 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: Optional[List["TaxRate"]] + """ + 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: Optional[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. + """ discount: Optional["Discount"] + """ + Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. + """ ended_at: Optional[int] + """ + If the subscription has ended, the date the subscription ended. + """ id: str + """ + Unique identifier for the object. + """ items: ListObject["SubscriptionItem"] + """ + List of subscription items, each with an attached price. + """ latest_invoice: Optional[ExpandableField["Invoice"]] + """ + The most recent invoice this subscription has generated. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ next_pending_invoice_item_invoice: Optional[int] + """ + Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. + """ object: Literal["subscription"] + """ + String representing the object's type. Objects of the same type share the same value. + """ on_behalf_of: Optional[ExpandableField["Account"]] + """ + The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. + """ pause_collection: Optional[StripeObject] + """ + If specified, payment collection for this subscription will be paused. + """ payment_settings: Optional[StripeObject] + """ + Payment settings passed on to invoices created by the subscription. + """ pending_invoice_item_interval: Optional[StripeObject] + """ + 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. + """ pending_setup_intent: Optional[ExpandableField["SetupIntent"]] + """ + You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). + """ pending_update: Optional[StripeObject] + """ + If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. + """ schedule: Optional[ExpandableField["SubscriptionSchedule"]] + """ + The schedule attached to the subscription + """ start_date: int + """ + Date when the subscription was first created. The date might differ from the `created` date due to backdating. + """ status: Literal[ "active", "canceled", @@ -698,11 +1521,37 @@ class SearchParams(RequestOptions): "trialing", "unpaid", ] + """ + Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. + + For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, the open invoice will be voided and no further invoices will be generated. + + A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. + + If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). + + If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. + """ test_clock: Optional[ExpandableField["TestClock"]] + """ + ID of the test clock this subscription belongs to. + """ transfer_data: Optional[StripeObject] + """ + The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + """ trial_end: Optional[int] + """ + If the subscription has a trial, the end of that trial. + """ trial_settings: Optional[StripeObject] + """ + Settings related to subscription trials. + """ trial_start: Optional[int] + """ + If the subscription has a trial, the beginning of that trial. + """ @classmethod def _cls_cancel( diff --git a/stripe/api_resources/subscription_item.py b/stripe/api_resources/subscription_item.py index cfb93877b..f76a40a27 100644 --- a/stripe/api_resources/subscription_item.py +++ b/stripe/api_resources/subscription_item.py @@ -50,120 +50,354 @@ class CreateParams(RequestOptions): billing_thresholds: NotRequired[ "Literal['']|SubscriptionItem.CreateParamsBillingThresholds|None" ] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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']|None" ] + """ + 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|None"] + """ + The identifier of the plan to add to the subscription. + """ price: NotRequired["str|None"] + """ + The ID of the price object. + """ price_data: NotRequired[ "SubscriptionItem.CreateParamsPriceData|None" ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ proration_behavior: NotRequired[ "Literal['always_invoice', 'create_prorations', 'none']|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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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']|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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + The identifier of the new plan for this subscription item. + """ price: NotRequired["str|None"] + """ + 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|None" ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ proration_behavior: NotRequired[ "Literal['always_invoice', 'create_prorations', 'none']|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|None"] + """ + 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|None"] + """ + The quantity you'd like to apply to the subscription item you're creating. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class CreateUsageRecordParams(RequestOptions): action: NotRequired["Literal['increment', 'set']|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ quantity: int + """ + The usage quantity for the specified timestamp. + """ timestamp: NotRequired["Literal['now']|int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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[StripeObject] + """ + Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ id: str + """ + Unique identifier for the object. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["subscription_item"] + """ + String representing the object's type. Objects of the same type share the same value. + """ plan: "Plan" + """ + You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + + Plans define the base price, currency, and billing cycle for recurring purchases of products. + [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. + + For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. + + Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). + """ price: "Price" + """ + Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. + [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + + For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. + + Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). + """ quantity: Optional[int] + """ + The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. + """ subscription: str + """ + The `subscription` this `subscription_item` belongs to. + """ tax_rates: Optional[List["TaxRate"]] + """ + The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def create( diff --git a/stripe/api_resources/subscription_schedule.py b/stripe/api_resources/subscription_schedule.py index 7bc7bc4b6..c457acad8 100644 --- a/stripe/api_resources/subscription_schedule.py +++ b/stripe/api_resources/subscription_schedule.py @@ -46,389 +46,989 @@ class SubscriptionSchedule( class CancelParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ invoice_now: NotRequired["bool|None"] + """ + 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|None"] + """ + If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. + """ class CreateParams(RequestOptions): customer: NotRequired["str|None"] + """ + The identifier of the customer to create the subscription schedule for. + """ default_settings: NotRequired[ "SubscriptionSchedule.CreateParamsDefaultSettings|None" ] + """ + Object representing the subscription schedule's default settings. + """ end_behavior: NotRequired[ "Literal['cancel', 'none', 'release', 'renew']|None" ] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ from_subscription: NotRequired["str|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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]|None" ] + """ + 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']|None"] + """ + 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]|None" ] + """ + 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|None"] + """ + 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|None" ] + """ + Automatic tax settings for this phase. + """ billing_cycle_anchor: NotRequired[ "Literal['automatic', 'phase_start']|None" ] + """ + 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|None" ] + """ + 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']|None" ] + """ + 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|None"] + """ + The identifier of the coupon to apply to this phase of the subscription schedule. + """ currency: NotRequired["str|None"] + """ + 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|None"] + """ + 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]|None"] + """ + 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|None"] + """ + Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + """ end_date: NotRequired["int|None"] + """ + The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + """ invoice_settings: NotRequired[ "SubscriptionSchedule.CreateParamsPhaseInvoiceSettings|None" ] + """ + 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|None"] + """ + 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]|None"] + """ + 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|None"] + """ + 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']|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|None" ] + """ + The data with which to automatically create a Transfer for each of the associated subscription's invoices. + """ trial: NotRequired["bool|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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]|None"] + """ + 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|None"] + """ + The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + """ price: NotRequired["str|None"] + """ + The ID of the price object. + """ price_data: NotRequired[ "SubscriptionSchedule.CreateParamsPhaseItemPriceData|None" ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ quantity: NotRequired["int|None"] + """ + 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]|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + 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 CreateParamsPhaseInvoiceSettings(TypedDict): days_until_due: NotRequired["int|None"] + """ + 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|None"] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ reset_billing_cycle_anchor: NotRequired["bool|None"] + """ + 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 CreateParamsPhaseAddInvoiceItem(TypedDict): price: NotRequired["str|None"] + """ + The ID of the price object. + """ price_data: NotRequired[ "SubscriptionSchedule.CreateParamsPhaseAddInvoiceItemPriceData|None" ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ quantity: NotRequired["int|None"] + """ + Quantity for this item. Defaults to 1. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None" ] + """ + Default settings for automatic tax computation. + """ billing_cycle_anchor: NotRequired[ "Literal['automatic', 'phase_start']|None" ] + """ + 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|None" ] + """ + 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']|None" ] + """ + 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|None"] + """ + 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|None"] + """ + Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + """ invoice_settings: NotRequired[ "SubscriptionSchedule.CreateParamsDefaultSettingsInvoiceSettings|None" ] + """ + All invoices will be billed using the specified settings. + """ on_behalf_of: NotRequired["Literal['']|str|None"] + """ + The account on behalf of which to charge, for each of the associated subscription's invoices. + """ transfer_data: NotRequired[ "Literal['']|SubscriptionSchedule.CreateParamsDefaultSettingsTransferData|None" ] + """ + The data with which to automatically create a Transfer for each of the associated subscription's invoices. + """ class CreateParamsDefaultSettingsTransferData(TypedDict): amount_percent: NotRequired["float|None"] + """ + 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|None"] + """ + 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|None"] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ reset_billing_cycle_anchor: NotRequired["bool|None"] + """ + 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 ListParams(RequestOptions): canceled_at: NotRequired[ "SubscriptionSchedule.ListParamsCanceledAt|int|None" ] + """ + Only return subscription schedules that were created canceled the given date interval. + """ completed_at: NotRequired[ "SubscriptionSchedule.ListParamsCompletedAt|int|None" ] + """ + Only return subscription schedules that completed during the given date interval. + """ created: NotRequired[ "SubscriptionSchedule.ListParamsCreated|int|None" ] + """ + Only return subscription schedules that were created during the given date interval. + """ customer: NotRequired["str|None"] + """ + Only return subscription schedules for the given customer. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None" ] + """ + Only return subscription schedules that were released during the given date interval. + """ scheduled: NotRequired["bool|None"] + """ + Only return subscription schedules that have not started yet. + """ starting_after: NotRequired["str|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ListParamsCompletedAt(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ListParamsCanceledAt(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): default_settings: NotRequired[ "SubscriptionSchedule.ModifyParamsDefaultSettings|None" ] + """ + Object representing the subscription schedule's default settings. + """ end_behavior: NotRequired[ "Literal['cancel', 'none', 'release', 'renew']|None" ] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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]|None" ] + """ + 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']|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]|None" ] + """ + 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|None"] + """ + 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|None" ] + """ + Automatic tax settings for this phase. + """ billing_cycle_anchor: NotRequired[ "Literal['automatic', 'phase_start']|None" ] + """ + 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|None" ] + """ + 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']|None" ] + """ + 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|None"] + """ + The identifier of the coupon to apply to this phase of the subscription schedule. + """ currency: NotRequired["str|None"] + """ + 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|None"] + """ + 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]|None"] + """ + 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|None"] + """ + Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + """ end_date: NotRequired["int|Literal['now']|None"] + """ + The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + """ invoice_settings: NotRequired[ "SubscriptionSchedule.ModifyParamsPhaseInvoiceSettings|None" ] + """ + 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|None"] + """ + 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]|None"] + """ + 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|None"] + """ + 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']|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']|None"] + """ + 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|None" ] + """ + The data with which to automatically create a Transfer for each of the associated subscription's invoices. + """ trial: NotRequired["bool|None"] + """ + 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']|None"] + """ + 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|None"] + """ + 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|None" ] + """ + 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]|None"] + """ + 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|None"] + """ + The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + """ price: NotRequired["str|None"] + """ + The ID of the price object. + """ price_data: NotRequired[ "SubscriptionSchedule.ModifyParamsPhaseItemPriceData|None" ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ quantity: NotRequired["int|None"] + """ + 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]|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + 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 ModifyParamsPhaseInvoiceSettings(TypedDict): days_until_due: NotRequired["int|None"] + """ + 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|None"] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ reset_billing_cycle_anchor: NotRequired["bool|None"] + """ + 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 ModifyParamsPhaseAddInvoiceItem(TypedDict): price: NotRequired["str|None"] + """ + The ID of the price object. + """ price_data: NotRequired[ "SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItemPriceData|None" ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ quantity: NotRequired["int|None"] + """ + Quantity for this item. Defaults to 1. + """ tax_rates: NotRequired["Literal['']|List[str]|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ unit_amount_decimal: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None" ] + """ + Default settings for automatic tax computation. + """ billing_cycle_anchor: NotRequired[ "Literal['automatic', 'phase_start']|None" ] + """ + 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|None" ] + """ + 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']|None" ] + """ + 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|None"] + """ + 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|None"] + """ + Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. + """ invoice_settings: NotRequired[ "SubscriptionSchedule.ModifyParamsDefaultSettingsInvoiceSettings|None" ] + """ + All invoices will be billed using the specified settings. + """ on_behalf_of: NotRequired["Literal['']|str|None"] + """ + The account on behalf of which to charge, for each of the associated subscription's invoices. + """ transfer_data: NotRequired[ "Literal['']|SubscriptionSchedule.ModifyParamsDefaultSettingsTransferData|None" ] + """ + The data with which to automatically create a Transfer for each of the associated subscription's invoices. + """ class ModifyParamsDefaultSettingsTransferData(TypedDict): amount_percent: NotRequired["float|None"] + """ + 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|None"] + """ + 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|None"] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ reset_billing_cycle_anchor: NotRequired["bool|None"] + """ + 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 ReleaseParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ preserve_cancel_date: NotRequired["bool|None"] + """ + Keep any cancellation on the subscription that the schedule has set + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ application: Optional[ExpandableField["Application"]] + """ + ID of the Connect Application that created the schedule. + """ canceled_at: Optional[int] + """ + Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. + """ completed_at: Optional[int] + """ + Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ current_phase: Optional[StripeObject] + """ + Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. + """ customer: ExpandableField["Customer"] + """ + ID of the customer who owns the subscription schedule. + """ default_settings: StripeObject end_behavior: 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. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["subscription_schedule"] + """ + String representing the object's type. Objects of the same type share the same value. + """ phases: List[StripeObject] + """ + Configuration for the subscription schedule's phases. + """ released_at: Optional[int] + """ + Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + """ released_subscription: Optional[str] + """ + ID of the subscription once managed by the subscription schedule (if it is released). + """ status: Literal[ "active", "canceled", "completed", "not_started", "released" ] + """ + The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + """ subscription: Optional[ExpandableField["Subscription"]] + """ + ID of the subscription managed by the subscription schedule. + """ test_clock: Optional[ExpandableField["TestClock"]] + """ + ID of the test clock this subscription schedule belongs to. + """ @classmethod def _cls_cancel( diff --git a/stripe/api_resources/tax/calculation.py b/stripe/api_resources/tax/calculation.py index 9f0f063c3..d61c88d5f 100644 --- a/stripe/api_resources/tax/calculation.py +++ b/stripe/api_resources/tax/calculation.py @@ -33,43 +33,109 @@ class Calculation(CreateableAPIResource["Calculation"]): 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|None"] + """ + 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|None" ] + """ + Details about the customer, including address and tax IDs. + """ expand: NotRequired["List[str]|None"] + """ + 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|None" ] + """ + Shipping cost details to be used for the calculation. + """ tax_date: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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']|None"] + """ + Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`. + """ tax_code: NotRequired["str|None"] + """ + 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|None"] + """ + If provided, the product's `tax_code` will be used as the line item's `tax_code`. + """ quantity: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None"] + """ + Specifies whether the `amount` includes taxes. Defaults to `exclusive`. + """ tax_code: NotRequired["str|None"] + """ + 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|None" ] + """ + The customer's postal address (for example, home or business location). + """ address_source: NotRequired["Literal['billing', 'shipping']|None"] + """ + The type of customer address provided. + """ ip_address: NotRequired["str|None"] + """ + The customer's IP address (IPv4 or IPv6). + """ tax_ids: NotRequired[ "List[Calculation.CreateParamsCustomerDetailsTaxId]|None" ] + """ + The customer's tax IDs. + """ taxability_override: NotRequired[ "Literal['customer_exempt', 'none', 'reverse_charge']|None" ] + """ + 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[ @@ -140,36 +206,111 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "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|None"] + """ + 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|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["Literal['']|str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["Literal['']|str|None"] + """ + ZIP or postal code. + """ state: NotRequired["Literal['']|str|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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 + """ + Total after taxes. + """ 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: Optional[str] + """ + The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. + """ customer_details: StripeObject expires_at: Optional[int] + """ + Timestamp of date at which the tax calculation will expire. + """ id: Optional[str] + """ + Unique identifier for the calculation. + """ line_items: Optional[ListObject["CalculationLineItem"]] + """ + The list of items the customer is purchasing. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["tax.calculation"] + """ + String representing the object's type. Objects of the same type share the same value. + """ shipping_cost: Optional[StripeObject] + """ + The shipping cost details for the calculation. + """ tax_amount_exclusive: int + """ + The amount of tax to be collected on top of the line item prices. + """ tax_amount_inclusive: int + """ + The amount of tax already included in the line item prices. + """ tax_breakdown: List[StripeObject] + """ + Breakdown of individual tax amounts that add up to the total. + """ tax_date: int + """ + Timestamp of date at which the tax rules and rates in effect applies for the calculation. + """ @classmethod def create( diff --git a/stripe/api_resources/tax/calculation_line_item.py b/stripe/api_resources/tax/calculation_line_item.py index 1d267a300..29b81b93e 100644 --- a/stripe/api_resources/tax/calculation_line_item.py +++ b/stripe/api_resources/tax/calculation_line_item.py @@ -10,13 +10,46 @@ class CalculationLineItem(StripeObject): Literal["tax.calculation_line_item"] ] = "tax.calculation_line_item" amount: int + """ + The line item amount in integer cents. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + """ amount_tax: int + """ + The amount of tax calculated for this line item, in integer cents. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["tax.calculation_line_item"] + """ + String representing the object's type. Objects of the same type share the same value. + """ product: Optional[str] + """ + The ID of an existing [Product](https://stripe.com/docs/api/products/object). + """ quantity: int + """ + The number of units of the item being purchased. For reversals, this is the quantity reversed. + """ reference: Optional[str] + """ + A custom identifier for this line item. + """ tax_behavior: Literal["exclusive", "inclusive"] + """ + Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + """ tax_breakdown: Optional[List[StripeObject]] + """ + Detailed account of taxes relevant to this line item. + """ tax_code: str + """ + The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. + """ diff --git a/stripe/api_resources/tax/settings.py b/stripe/api_resources/tax/settings.py index 98f831941..8c3f1ae28 100644 --- a/stripe/api_resources/tax/settings.py +++ b/stripe/api_resources/tax/settings.py @@ -32,34 +32,85 @@ class Settings( class ModifyParams(RequestOptions): defaults: NotRequired["Settings.ModifyParamsDefaults|None"] + """ + Default configuration to be used on Stripe Tax calculations. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ head_office: NotRequired["Settings.ModifyParamsHeadOffice|None"] + """ + The place where your business is located. + """ class ModifyParamsHeadOffice(TypedDict): address: "Settings.ModifyParamsHeadOfficeAddress" + """ + The location of the business for tax purposes. + """ class ModifyParamsHeadOfficeAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ defaults: StripeObject head_office: Optional[StripeObject] + """ + The place where your business is located. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["tax.settings"] + """ + String representing the object's type. Objects of the same type share the same value. + """ status: Literal["active", "pending"] + """ + The `active` status indicates you have all required settings to calculate tax. A status can transition out of `active` when new required settings are introduced. + """ status_details: StripeObject @classmethod diff --git a/stripe/api_resources/tax/transaction.py b/stripe/api_resources/tax/transaction.py index e55892f35..710531520 100644 --- a/stripe/api_resources/tax/transaction.py +++ b/stripe/api_resources/tax/transaction.py @@ -33,59 +33,173 @@ class Transaction(APIResource["Transaction"]): class CreateFromCalculationParams(RequestOptions): calculation: str + """ + Tax Calculation ID to be used as input when creating the transaction. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ flat_amount: NotRequired["int|None"] + """ + 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]|None" ] + """ + The line item amounts to reverse. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + 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 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/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|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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: Optional[str] + """ + The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. + """ customer_details: StripeObject id: str + """ + Unique identifier for the transaction. + """ line_items: Optional[ListObject["TransactionLineItem"]] + """ + The tax collected or refunded, by line item. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["tax.transaction"] + """ + String representing the object's type. Objects of the same type share the same value. + """ reference: str + """ + A custom unique identifier, such as 'myOrder_123'. + """ reversal: Optional[StripeObject] + """ + If `type=reversal`, contains information about what was reversed. + """ shipping_cost: Optional[StripeObject] + """ + The shipping cost details for the transaction. + """ tax_date: int + """ + Timestamp of date at which the tax rules and rates in effect applies for the calculation. + """ type: Literal["reversal", "transaction"] + """ + If `reversal`, this transaction reverses an earlier transaction. + """ @classmethod def create_from_calculation( diff --git a/stripe/api_resources/tax/transaction_line_item.py b/stripe/api_resources/tax/transaction_line_item.py index 3dbcb13fa..80bb97fc8 100644 --- a/stripe/api_resources/tax/transaction_line_item.py +++ b/stripe/api_resources/tax/transaction_line_item.py @@ -10,15 +10,54 @@ class TransactionLineItem(StripeObject): Literal["tax.transaction_line_item"] ] = "tax.transaction_line_item" amount: int + """ + The line item amount in integer cents. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + """ amount_tax: int + """ + The amount of tax calculated for this line item, in integer cents. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["tax.transaction_line_item"] + """ + String representing the object's type. Objects of the same type share the same value. + """ product: Optional[str] + """ + The ID of an existing [Product](https://stripe.com/docs/api/products/object). + """ quantity: int + """ + The number of units of the item being purchased. For reversals, this is the quantity reversed. + """ reference: str + """ + A custom identifier for this line item in the transaction. + """ reversal: Optional[StripeObject] + """ + If `type=reversal`, contains information about what was reversed. + """ tax_behavior: Literal["exclusive", "inclusive"] + """ + Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + """ tax_code: str + """ + The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. + """ type: Literal["reversal", "transaction"] + """ + If `reversal`, this line item reverses an earlier transaction. + """ diff --git a/stripe/api_resources/tax_code.py b/stripe/api_resources/tax_code.py index b36a107cb..118b97941 100644 --- a/stripe/api_resources/tax_code.py +++ b/stripe/api_resources/tax_code.py @@ -17,17 +17,44 @@ class TaxCode(ListableAPIResource["TaxCode"]): class ListParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ description: str + """ + A detailed description of which types of products the tax code represents. + """ id: str + """ + Unique identifier for the object. + """ name: str + """ + A short name for the tax code. + """ object: Literal["tax_code"] + """ + String representing the object's type. Objects of the same type share the same value. + """ @classmethod def list( diff --git a/stripe/api_resources/tax_deducted_at_source.py b/stripe/api_resources/tax_deducted_at_source.py index 92fc2451d..547292560 100644 --- a/stripe/api_resources/tax_deducted_at_source.py +++ b/stripe/api_resources/tax_deducted_at_source.py @@ -10,7 +10,22 @@ class TaxDeductedAtSource(StripeObject): Literal["tax_deducted_at_source"] ] = "tax_deducted_at_source" id: str + """ + Unique identifier for the object. + """ object: Literal["tax_deducted_at_source"] + """ + String representing the object's type. Objects of the same type share the same value. + """ period_end: int + """ + The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + """ period_start: int + """ + The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + """ tax_deduction_account_number: str + """ + The TAN that was supplied to Stripe when TDS was assessed + """ diff --git a/stripe/api_resources/tax_id.py b/stripe/api_resources/tax_id.py index 00c47c78a..9060d471e 100644 --- a/stripe/api_resources/tax_id.py +++ b/stripe/api_resources/tax_id.py @@ -19,11 +19,29 @@ class TaxId(APIResource["TaxId"]): OBJECT_NAME: ClassVar[Literal["tax_id"]] = "tax_id" country: Optional[str] + """ + Two-letter ISO code representing the country of the tax ID. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ customer: Optional[ExpandableField["Customer"]] + """ + ID of the customer. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["tax_id"] + """ + String representing the object's type. Objects of the same type share the same value. + """ type: Literal[ "ad_nrt", "ae_trn", @@ -93,9 +111,21 @@ class TaxId(APIResource["TaxId"]): "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`. Note that some legacy tax IDs have type `unknown` + """ value: str + """ + Value of the tax ID. + """ verification: Optional[StripeObject] + """ + Tax ID verification information. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ def instance_url(self): token = self.id diff --git a/stripe/api_resources/tax_rate.py b/stripe/api_resources/tax_rate.py index dde858fb7..bf61438c6 100644 --- a/stripe/api_resources/tax_rate.py +++ b/stripe/api_resources/tax_rate.py @@ -34,64 +34,204 @@ class TaxRate( class CreateParams(RequestOptions): active: NotRequired["bool|None"] + """ + 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|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ description: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ inclusive: bool + """ + This specifies if the tax rate is inclusive or exclusive. + """ jurisdiction: NotRequired["str|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + [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']|None" ] + """ + The high-level tax type, such as `vat` or `sales_tax`. + """ class ListParams(RequestOptions): active: NotRequired["bool|None"] + """ + Optional flag to filter by tax rates that are either active or inactive (archived). + """ created: NotRequired["TaxRate.ListParamsCreated|int|None"] + """ + Optional range for filtering created date. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ inclusive: NotRequired["bool|None"] + """ + Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): active: NotRequired["bool|None"] + """ + 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|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ description: NotRequired["str|None"] + """ + 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|None"] + """ + The display name of the tax rate, which will be shown to users. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ jurisdiction: NotRequired["str|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + [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']|None" ] + """ + The high-level tax type, such as `vat` or `sales_tax`. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ active: bool + """ + Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + """ country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ description: Optional[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 rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. + """ effective_percentage: Optional[float] + """ + Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, + this percentage reflects the rate actually used to calculate tax based on the product's taxability + and whether the user is registered to collect taxes in the corresponding jurisdiction. + """ id: str + """ + Unique identifier for the object. + """ inclusive: bool + """ + This specifies if the tax rate is inclusive or exclusive. + """ jurisdiction: Optional[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. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["tax_rate"] + """ + String representing the object's type. Objects of the same type share the same value. + """ percentage: float + """ + Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. + """ state: Optional[str] + """ + [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + """ tax_type: Optional[ Literal[ "amusement_tax", @@ -109,6 +249,9 @@ class RetrieveParams(RequestOptions): "vat", ] ] + """ + The high-level tax type, such as `vat` or `sales_tax`. + """ @classmethod def create( diff --git a/stripe/api_resources/terminal/configuration.py b/stripe/api_resources/terminal/configuration.py index a827ef1f7..fe55bc698 100644 --- a/stripe/api_resources/terminal/configuration.py +++ b/stripe/api_resources/terminal/configuration.py @@ -40,244 +40,661 @@ class CreateParams(RequestOptions): bbpos_wisepos_e: NotRequired[ "Configuration.CreateParamsBbposWiseposE|None" ] + """ + An object containing device type specific settings for BBPOS WisePOS E readers + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ offline: NotRequired[ "Literal['']|Configuration.CreateParamsOffline|None" ] + """ + Configurations for collecting transactions offline. + """ tipping: NotRequired[ "Literal['']|Configuration.CreateParamsTipping|None" ] + """ + Tipping configurations for readers supporting on-reader tips + """ verifone_p400: NotRequired[ "Configuration.CreateParamsVerifoneP400|None" ] + """ + An object containing device type specific settings for Verifone P400 readers + """ class CreateParamsVerifoneP400(TypedDict): splashscreen: NotRequired["Literal['']|str|None"] + """ + A File ID representing an image you would like displayed on the reader. + """ class CreateParamsTipping(TypedDict): aud: NotRequired["Configuration.CreateParamsTippingAud|None"] + """ + Tipping configuration for AUD + """ cad: NotRequired["Configuration.CreateParamsTippingCad|None"] + """ + Tipping configuration for CAD + """ chf: NotRequired["Configuration.CreateParamsTippingChf|None"] + """ + Tipping configuration for CHF + """ czk: NotRequired["Configuration.CreateParamsTippingCzk|None"] + """ + Tipping configuration for CZK + """ dkk: NotRequired["Configuration.CreateParamsTippingDkk|None"] + """ + Tipping configuration for DKK + """ eur: NotRequired["Configuration.CreateParamsTippingEur|None"] + """ + Tipping configuration for EUR + """ gbp: NotRequired["Configuration.CreateParamsTippingGbp|None"] + """ + Tipping configuration for GBP + """ hkd: NotRequired["Configuration.CreateParamsTippingHkd|None"] + """ + Tipping configuration for HKD + """ myr: NotRequired["Configuration.CreateParamsTippingMyr|None"] + """ + Tipping configuration for MYR + """ nok: NotRequired["Configuration.CreateParamsTippingNok|None"] + """ + Tipping configuration for NOK + """ nzd: NotRequired["Configuration.CreateParamsTippingNzd|None"] + """ + Tipping configuration for NZD + """ sek: NotRequired["Configuration.CreateParamsTippingSek|None"] + """ + Tipping configuration for SEK + """ sgd: NotRequired["Configuration.CreateParamsTippingSgd|None"] + """ + Tipping configuration for SGD + """ usd: NotRequired["Configuration.CreateParamsTippingUsd|None"] + """ + Tipping configuration for USD + """ class CreateParamsTippingUsd(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class CreateParamsTippingSgd(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class CreateParamsTippingSek(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class CreateParamsTippingNzd(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class CreateParamsTippingNok(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class CreateParamsTippingMyr(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class CreateParamsTippingHkd(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class CreateParamsTippingGbp(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class CreateParamsTippingEur(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class CreateParamsTippingDkk(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class CreateParamsTippingCzk(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class CreateParamsTippingChf(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class CreateParamsTippingCad(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class CreateParamsTippingAud(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + 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 CreateParamsBbposWiseposE(TypedDict): splashscreen: NotRequired["Literal['']|str|None"] + """ + A File ID representing an image you would like displayed on the reader. + """ class DeleteParams(RequestOptions): pass class ListParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ is_account_default: NotRequired["bool|None"] + """ + if present, only return the account default or non-default configurations. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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): bbpos_wisepos_e: NotRequired[ "Literal['']|Configuration.ModifyParamsBbposWiseposE|None" ] + """ + An object containing device type specific settings for BBPOS WisePOS E readers + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ offline: NotRequired[ "Literal['']|Configuration.ModifyParamsOffline|None" ] + """ + Configurations for collecting transactions offline. + """ tipping: NotRequired[ "Literal['']|Configuration.ModifyParamsTipping|None" ] + """ + Tipping configurations for readers supporting on-reader tips + """ verifone_p400: NotRequired[ "Literal['']|Configuration.ModifyParamsVerifoneP400|None" ] + """ + An object containing device type specific settings for Verifone P400 readers + """ class ModifyParamsVerifoneP400(TypedDict): splashscreen: NotRequired["Literal['']|str|None"] + """ + A File ID representing an image you would like displayed on the reader. + """ class ModifyParamsTipping(TypedDict): aud: NotRequired["Configuration.ModifyParamsTippingAud|None"] + """ + Tipping configuration for AUD + """ cad: NotRequired["Configuration.ModifyParamsTippingCad|None"] + """ + Tipping configuration for CAD + """ chf: NotRequired["Configuration.ModifyParamsTippingChf|None"] + """ + Tipping configuration for CHF + """ czk: NotRequired["Configuration.ModifyParamsTippingCzk|None"] + """ + Tipping configuration for CZK + """ dkk: NotRequired["Configuration.ModifyParamsTippingDkk|None"] + """ + Tipping configuration for DKK + """ eur: NotRequired["Configuration.ModifyParamsTippingEur|None"] + """ + Tipping configuration for EUR + """ gbp: NotRequired["Configuration.ModifyParamsTippingGbp|None"] + """ + Tipping configuration for GBP + """ hkd: NotRequired["Configuration.ModifyParamsTippingHkd|None"] + """ + Tipping configuration for HKD + """ myr: NotRequired["Configuration.ModifyParamsTippingMyr|None"] + """ + Tipping configuration for MYR + """ nok: NotRequired["Configuration.ModifyParamsTippingNok|None"] + """ + Tipping configuration for NOK + """ nzd: NotRequired["Configuration.ModifyParamsTippingNzd|None"] + """ + Tipping configuration for NZD + """ sek: NotRequired["Configuration.ModifyParamsTippingSek|None"] + """ + Tipping configuration for SEK + """ sgd: NotRequired["Configuration.ModifyParamsTippingSgd|None"] + """ + Tipping configuration for SGD + """ usd: NotRequired["Configuration.ModifyParamsTippingUsd|None"] + """ + Tipping configuration for USD + """ class ModifyParamsTippingUsd(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class ModifyParamsTippingSgd(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class ModifyParamsTippingSek(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class ModifyParamsTippingNzd(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class ModifyParamsTippingNok(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class ModifyParamsTippingMyr(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class ModifyParamsTippingHkd(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class ModifyParamsTippingGbp(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class ModifyParamsTippingEur(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class ModifyParamsTippingDkk(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class ModifyParamsTippingCzk(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class ModifyParamsTippingChf(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class ModifyParamsTippingCad(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ class ModifyParamsTippingAud(TypedDict): fixed_amounts: NotRequired["List[int]|None"] + """ + Fixed amounts displayed when collecting a tip + """ percentages: NotRequired["List[int]|None"] + """ + Percentages displayed when collecting a tip + """ smart_tip_threshold: NotRequired["int|None"] + """ + 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 ModifyParamsBbposWiseposE(TypedDict): splashscreen: NotRequired["Literal['']|str|None"] + """ + A File ID representing an image you would like displayed on the reader. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ bbpos_wisepos_e: Optional[StripeObject] id: str + """ + Unique identifier for the object. + """ is_account_default: Optional[bool] + """ + Whether this Configuration is the default for your account + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["terminal.configuration"] + """ + String representing the object's type. Objects of the same type share the same value. + """ offline: Optional[StripeObject] tipping: Optional[StripeObject] verifone_p400: Optional[StripeObject] deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def create( diff --git a/stripe/api_resources/terminal/connection_token.py b/stripe/api_resources/terminal/connection_token.py index 8fb87f504..257374a5d 100644 --- a/stripe/api_resources/terminal/connection_token.py +++ b/stripe/api_resources/terminal/connection_token.py @@ -20,11 +20,26 @@ class ConnectionToken(CreateableAPIResource["ConnectionToken"]): class CreateParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ location: NotRequired["str|None"] + """ + 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] + """ + The id of the location that this connection token is scoped to. 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). + """ object: Literal["terminal.connection_token"] + """ + String representing the object's type. Objects of the same type share the same value. + """ secret: str + """ + Your application should pass this token to the Stripe Terminal SDK. + """ @classmethod def create( diff --git a/stripe/api_resources/terminal/location.py b/stripe/api_resources/terminal/location.py index d1bf1abf4..1d9439fcc 100644 --- a/stripe/api_resources/terminal/location.py +++ b/stripe/api_resources/terminal/location.py @@ -38,54 +38,156 @@ class Location( class CreateParams(RequestOptions): address: "Location.CreateParamsAddress" + """ + The full address of the location. + """ configuration_overrides: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class DeleteParams(RequestOptions): pass class ListParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + The full address of the location. + """ configuration_overrides: NotRequired["Literal['']|str|None"] + """ + The ID of a configuration that will be used to customize all readers in this location. + """ display_name: NotRequired["str|None"] + """ + A name for the location. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ address: StripeObject configuration_overrides: Optional[str] + """ + The ID of a configuration that will be used to customize all readers in this location. + """ display_name: str + """ + The display name of the location. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["terminal.location"] + """ + String representing the object's type. Objects of the same type share the same value. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def create( diff --git a/stripe/api_resources/terminal/reader.py b/stripe/api_resources/terminal/reader.py index 786fbfb5c..bbe4afa7d 100644 --- a/stripe/api_resources/terminal/reader.py +++ b/stripe/api_resources/terminal/reader.py @@ -45,13 +45,31 @@ class Reader( class CancelActionParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class CreateParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ label: NotRequired["str|None"] + """ + Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. + """ location: NotRequired["str|None"] + """ + The location to assign the reader to. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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 @@ -60,95 +78,239 @@ class ListParams(RequestOptions): device_type: NotRequired[ "Literal['bbpos_chipper2x', 'bbpos_wisepad3', 'bbpos_wisepos_e', 'simulated_wisepos_e', 'stripe_m2', 'verifone_P400']|None" ] + """ + Filters readers by device type + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + A location ID to filter the response list to only readers at the specific location + """ serial_number: NotRequired["str|None"] + """ + Filters readers by serial number + """ starting_after: NotRequired["str|None"] + """ + 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']|None"] + """ + A status filter to filter readers to only offline or online readers + """ class ModifyParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ label: NotRequired["Literal['']|str|None"] + """ + The new label of the reader. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ payment_intent: str + """ + PaymentIntent ID + """ process_config: NotRequired[ "Reader.ProcessPaymentIntentParamsProcessConfig|None" ] + """ + Configuration overrides + """ class ProcessPaymentIntentParamsProcessConfig(TypedDict): skip_tipping: NotRequired["bool|None"] + """ + Override showing a tipping selection screen on this transaction. + """ tipping: NotRequired[ "Reader.ProcessPaymentIntentParamsProcessConfigTipping|None" ] + """ + Tipping configuration for this transaction. + """ class ProcessPaymentIntentParamsProcessConfigTipping(TypedDict): amount_eligible: NotRequired["int|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ process_config: NotRequired[ "Reader.ProcessSetupIntentParamsProcessConfig|None" ] + """ + Configuration overrides + """ setup_intent: str + """ + SetupIntent ID + """ class ProcessSetupIntentParamsProcessConfig(TypedDict): pass class RefundPaymentParams(RequestOptions): amount: NotRequired["int|None"] + """ + A positive integer in __cents__ representing how much of this charge to refund. + """ charge: NotRequired["str|None"] + """ + ID of the Charge to refund. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + ID of the PaymentIntent to refund. + """ refund_application_fee: NotRequired["bool|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class SetReaderDisplayParams(RequestOptions): cart: NotRequired["Reader.SetReaderDisplayParamsCart|None"] + """ + Cart + """ expand: NotRequired["List[str]|None"] + """ + 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|None"] + """ + 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 PresentPaymentMethodParams(RequestOptions): amount_tip: NotRequired["int|None"] + """ + Simulated on-reader tip amount. + """ card_present: NotRequired[ "Reader.PresentPaymentMethodParamsCardPresent|None" ] + """ + Simulated data for the card_present payment method. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ interac_present: NotRequired[ "Reader.PresentPaymentMethodParamsInteracPresent|None" ] + """ + Simulated data for the interac_present payment method. + """ type: NotRequired[ "Literal['card_present', 'interac_present']|None" ] + """ + Simulated payment type. + """ class PresentPaymentMethodParamsInteracPresent(TypedDict): number: NotRequired["str|None"] + """ + Card Number + """ class PresentPaymentMethodParamsCardPresent(TypedDict): number: NotRequired["str|None"] + """ + The card number, as a string without any separators. + """ action: Optional[StripeObject] + """ + The most recent action performed by the reader. + """ device_sw_version: Optional[str] + """ + The current software version of the reader. + """ device_type: Literal[ "bbpos_chipper2x", "bbpos_wisepad3", @@ -157,16 +319,49 @@ class PresentPaymentMethodParamsCardPresent(TypedDict): "stripe_m2", "verifone_P400", ] + """ + Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, or `simulated_wisepos_e`. + """ id: str + """ + Unique identifier for the object. + """ ip_address: Optional[str] + """ + The local IP address of the reader. + """ label: str + """ + Custom label given to the reader for easier identification. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ location: Optional[ExpandableField["Location"]] + """ + The location identifier of the reader. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["terminal.reader"] + """ + String representing the object's type. Objects of the same type share the same value. + """ serial_number: str + """ + Serial number of the reader. + """ status: Optional[str] + """ + The networking status of the reader. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def _cls_cancel_action( diff --git a/stripe/api_resources/test_helpers/test_clock.py b/stripe/api_resources/test_helpers/test_clock.py index 10ad83535..bc28bcbcb 100644 --- a/stripe/api_resources/test_helpers/test_clock.py +++ b/stripe/api_resources/test_helpers/test_clock.py @@ -32,34 +32,91 @@ class TestClock( class AdvanceParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ frozen_time: int + """ + The initial frozen time for this test clock. + """ name: NotRequired["str|None"] + """ + The name for this test clock. + """ class DeleteParams(RequestOptions): pass class ListParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ deletes_after: int + """ + Time at which this clock is scheduled to auto delete. + """ frozen_time: int + """ + Time at which all objects belonging to this clock are frozen. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ name: Optional[str] + """ + The custom name supplied at creation. + """ object: Literal["test_helpers.test_clock"] + """ + String representing the object's type. Objects of the same type share the same value. + """ status: Literal["advancing", "internal_failure", "ready"] + """ + The status of the Test Clock. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def _cls_advance( diff --git a/stripe/api_resources/token.py b/stripe/api_resources/token.py index 75aeb8fdf..f863cf0c7 100644 --- a/stripe/api_resources/token.py +++ b/stripe/api_resources/token.py @@ -45,366 +45,1048 @@ class Token(CreateableAPIResource["Token"]): class CreateParams(RequestOptions): account: NotRequired["Token.CreateParamsAccount|None"] + """ + Information for the account this token represents. + """ bank_account: NotRequired["Token.CreateParamsBankAccount|None"] + """ + The bank account this token will represent. + """ card: NotRequired["Token.CreateParamsCard|str|None"] + """ + 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|None"] + """ + 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|None"] + """ + The updated CVC value this token represents. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ person: NotRequired["Token.CreateParamsPerson|None"] + """ + Information for the person this token represents. + """ pii: NotRequired["Token.CreateParamsPii|None"] + """ + The PII this token represents. + """ class CreateParamsPii(TypedDict): id_number: NotRequired["str|None"] + """ + The `id_number` for the PII, in string form. + """ class CreateParamsPerson(TypedDict): additional_tos_acceptances: NotRequired[ "Token.CreateParamsPersonAdditionalTosAcceptances|None" ] + """ + Details on the legal guardian's acceptance of the required Stripe agreements. + """ address: NotRequired["Token.CreateParamsPersonAddress|None"] + """ + The person's address. + """ address_kana: NotRequired[ "Token.CreateParamsPersonAddressKana|None" ] + """ + The Kana variation of the person's address (Japan only). + """ address_kanji: NotRequired[ "Token.CreateParamsPersonAddressKanji|None" ] + """ + The Kanji variation of the person's address (Japan only). + """ dob: NotRequired["Literal['']|Token.CreateParamsPersonDob|None"] + """ + The person's date of birth. + """ documents: NotRequired["Token.CreateParamsPersonDocuments|None"] + """ + Documents that may be submitted to satisfy various informational requests. + """ email: NotRequired["str|None"] + """ + The person's email address. + """ first_name: NotRequired["str|None"] + """ + The person's first name. + """ first_name_kana: NotRequired["str|None"] + """ + The Kana variation of the person's first name (Japan only). + """ first_name_kanji: NotRequired["str|None"] + """ + The Kanji variation of the person's first name (Japan only). + """ full_name_aliases: NotRequired["Literal['']|List[str]|None"] + """ + A list of alternate names or aliases that the person is known by. + """ gender: NotRequired["str|None"] + """ + The person's gender (International regulations require either "male" or "female"). + """ id_number: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + The person's last name. + """ last_name_kana: NotRequired["str|None"] + """ + The Kana variation of the person's last name (Japan only). + """ last_name_kanji: NotRequired["str|None"] + """ + The Kanji variation of the person's last name (Japan only). + """ maiden_name: NotRequired["str|None"] + """ + The person's maiden name. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + The person's phone number. + """ political_exposure: NotRequired["str|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.CreateParamsPersonRegisteredAddress|None" ] + """ + The person's registered address. + """ relationship: NotRequired[ "Token.CreateParamsPersonRelationship|None" ] + """ + The relationship that this person has with the account's legal entity. + """ ssn_last_4: NotRequired["str|None"] + """ + The last four digits of the person's Social Security number (U.S. only). + """ verification: NotRequired[ "Token.CreateParamsPersonVerification|None" ] + """ + The person's verification status. + """ class CreateParamsPersonVerification(TypedDict): additional_document: NotRequired[ "Token.CreateParamsPersonVerificationAdditionalDocument|None" ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ document: NotRequired[ "Token.CreateParamsPersonVerificationDocument|None" ] + """ + An identifying document, either a passport or local ID card. + """ class CreateParamsPersonVerificationDocument(TypedDict): back: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ legal_guardian: NotRequired["bool|None"] + """ + Whether the person is the legal guardian of the account's representative. + """ owner: NotRequired["bool|None"] + """ + Whether the person is an owner of the account's legal entity. + """ percent_ownership: NotRequired["Literal['']|float|None"] + """ + The percent owned by the person of the account's legal entity. + """ representative: NotRequired["bool|None"] + """ + 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|None"] + """ + The person's title (e.g., CEO, Support Engineer). + """ class CreateParamsPersonRegisteredAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreateParamsPersonDocuments(TypedDict): company_authorization: NotRequired[ "Token.CreateParamsPersonDocumentsCompanyAuthorization|None" ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ passport: NotRequired[ "Token.CreateParamsPersonDocumentsPassport|None" ] + """ + One or more documents showing the person's passport page with photo and personal data. + """ visa: NotRequired["Token.CreateParamsPersonDocumentsVisa|None"] + """ + 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]|None"] + """ + 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]|None"] + """ + 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]|None"] + """ + 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 CreateParamsPersonAddressKanji(TypedDict): city: NotRequired["str|None"] + """ + City or ward. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Block or building number. + """ line2: NotRequired["str|None"] + """ + Building details. + """ postal_code: NotRequired["str|None"] + """ + Postal code. + """ state: NotRequired["str|None"] + """ + Prefecture. + """ town: NotRequired["str|None"] + """ + Town or cho-me. + """ class CreateParamsPersonAddressKana(TypedDict): city: NotRequired["str|None"] + """ + City or ward. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Block or building number. + """ line2: NotRequired["str|None"] + """ + Building details. + """ postal_code: NotRequired["str|None"] + """ + Postal code. + """ state: NotRequired["str|None"] + """ + Prefecture. + """ town: NotRequired["str|None"] + """ + Town or cho-me. + """ class CreateParamsPersonAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreateParamsPersonAdditionalTosAcceptances(TypedDict): account: NotRequired[ "Token.CreateParamsPersonAdditionalTosAcceptancesAccount|None" ] + """ + Details on the legal guardian's acceptance of the main Stripe service agreement. + """ class CreateParamsPersonAdditionalTosAcceptancesAccount(TypedDict): date: NotRequired["int|None"] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ ip: NotRequired["str|None"] + """ + The IP address from which the account representative accepted the service agreement. + """ user_agent: NotRequired["Literal['']|str|None"] + """ + 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 CreateParamsCard(TypedDict): address_city: NotRequired["str|None"] + """ + City / District / Suburb / Town / Village. + """ address_country: NotRequired["str|None"] + """ + Billing address country, if provided. + """ address_line1: NotRequired["str|None"] + """ + Address line 1 (Street address / PO Box / Company name). + """ address_line2: NotRequired["str|None"] + """ + Address line 2 (Apartment / Suite / Unit / Building). + """ address_state: NotRequired["str|None"] + """ + State / County / Province / Region. + """ address_zip: NotRequired["str|None"] + """ + ZIP or postal code. + """ currency: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + Cardholder's full name. + """ number: str + """ + The card number, as a string without any separators. + """ class CreateParamsBankAccount(TypedDict): account_holder_name: NotRequired["str|None"] + """ + 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']|None" ] + """ + 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']|None" ] + """ + 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|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + The business type. + """ company: NotRequired["Token.CreateParamsAccountCompany|None"] + """ + Information about the company or business. + """ individual: NotRequired["Token.CreateParamsAccountIndividual|None"] + """ + Information about the person represented by the account. + """ tos_shown_and_accepted: NotRequired["bool|None"] + """ + 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|None" ] + """ + The individual's primary address. + """ address_kana: NotRequired[ "Token.CreateParamsAccountIndividualAddressKana|None" ] + """ + The Kana variation of the the individual's primary address (Japan only). + """ address_kanji: NotRequired[ "Token.CreateParamsAccountIndividualAddressKanji|None" ] + """ + The Kanji variation of the the individual's primary address (Japan only). + """ dob: NotRequired[ "Literal['']|Token.CreateParamsAccountIndividualDob|None" ] + """ + The individual's date of birth. + """ email: NotRequired["str|None"] + """ + The individual's email address. + """ first_name: NotRequired["str|None"] + """ + The individual's first name. + """ first_name_kana: NotRequired["str|None"] + """ + The Kana variation of the the individual's first name (Japan only). + """ first_name_kanji: NotRequired["str|None"] + """ + The Kanji variation of the individual's first name (Japan only). + """ full_name_aliases: NotRequired["Literal['']|List[str]|None"] + """ + A list of alternate names or aliases that the individual is known by. + """ gender: NotRequired["str|None"] + """ + The individual's gender (International regulations require either "male" or "female"). + """ id_number: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + The individual's last name. + """ last_name_kana: NotRequired["str|None"] + """ + The Kana variation of the individual's last name (Japan only). + """ last_name_kanji: NotRequired["str|None"] + """ + The Kanji variation of the individual's last name (Japan only). + """ maiden_name: NotRequired["str|None"] + """ + The individual's maiden name. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The individual's phone number. + """ political_exposure: NotRequired["Literal['existing', 'none']|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|None" ] + """ + The individual's registered address. + """ ssn_last_4: NotRequired["str|None"] + """ + The last four digits of the individual's Social Security Number (U.S. only). + """ verification: NotRequired[ "Token.CreateParamsAccountIndividualVerification|None" ] + """ + The individual's verification document information. + """ class CreateParamsAccountIndividualVerification(TypedDict): additional_document: NotRequired[ "Token.CreateParamsAccountIndividualVerificationAdditionalDocument|None" ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ document: NotRequired[ "Token.CreateParamsAccountIndividualVerificationDocument|None" ] + """ + An identifying document, either a passport or local ID card. + """ class CreateParamsAccountIndividualVerificationDocument(TypedDict): back: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + 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|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + 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 CreateParamsAccountIndividualAddressKanji(TypedDict): city: NotRequired["str|None"] + """ + City or ward. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Block or building number. + """ line2: NotRequired["str|None"] + """ + Building details. + """ postal_code: NotRequired["str|None"] + """ + Postal code. + """ state: NotRequired["str|None"] + """ + Prefecture. + """ town: NotRequired["str|None"] + """ + Town or cho-me. + """ class CreateParamsAccountIndividualAddressKana(TypedDict): city: NotRequired["str|None"] + """ + City or ward. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Block or building number. + """ line2: NotRequired["str|None"] + """ + Building details. + """ postal_code: NotRequired["str|None"] + """ + Postal code. + """ state: NotRequired["str|None"] + """ + Prefecture. + """ town: NotRequired["str|None"] + """ + Town or cho-me. + """ class CreateParamsAccountIndividualAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class CreateParamsAccountCompany(TypedDict): address: NotRequired[ "Token.CreateParamsAccountCompanyAddress|None" ] + """ + The company's primary address. + """ address_kana: NotRequired[ "Token.CreateParamsAccountCompanyAddressKana|None" ] + """ + The Kana variation of the company's primary address (Japan only). + """ address_kanji: NotRequired[ "Token.CreateParamsAccountCompanyAddressKanji|None" ] + """ + The Kanji variation of the company's primary address (Japan only). + """ directors_provided: NotRequired["bool|None"] + """ + 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|None"] + """ + 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|None"] + """ + The export license ID number of the company, also referred as Import Export Code (India only). + """ export_purpose_code: NotRequired["str|None"] + """ + The purpose code to use for export transactions (India only). + """ name: NotRequired["str|None"] + """ + The company's legal name. + """ name_kana: NotRequired["str|None"] + """ + The Kana variation of the company's legal name (Japan only). + """ name_kanji: NotRequired["str|None"] + """ + The Kanji variation of the company's legal name (Japan only). + """ owners_provided: NotRequired["bool|None"] + """ + 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|None" ] + """ + 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|None"] + """ + 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|None"] + """ + The company's phone number (used for verification). + """ registration_number: NotRequired["str|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + 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|None"] + """ + The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + """ vat_id: NotRequired["str|None"] + """ + The VAT number of the company. + """ verification: NotRequired[ "Token.CreateParamsAccountCompanyVerification|None" ] + """ + Information on the verification state of the company. + """ class CreateParamsAccountCompanyVerification(TypedDict): document: NotRequired[ "Token.CreateParamsAccountCompanyVerificationDocument|None" ] + """ + A document verifying the business. + """ class CreateParamsAccountCompanyVerificationDocument(TypedDict): back: NotRequired["str|None"] + """ + 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|None"] + """ + 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|None"] + """ + The Unix timestamp marking when the beneficial owner attestation was made. + """ ip: NotRequired["str|None"] + """ + The IP address from which the beneficial owner attestation was made. + """ user_agent: NotRequired["str|None"] + """ + The user agent of the browser from which the beneficial owner attestation was made. + """ class CreateParamsAccountCompanyAddressKanji(TypedDict): city: NotRequired["str|None"] + """ + City or ward. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Block or building number. + """ line2: NotRequired["str|None"] + """ + Building details. + """ postal_code: NotRequired["str|None"] + """ + Postal code. + """ state: NotRequired["str|None"] + """ + Prefecture. + """ town: NotRequired["str|None"] + """ + Town or cho-me. + """ class CreateParamsAccountCompanyAddressKana(TypedDict): city: NotRequired["str|None"] + """ + City or ward. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Block or building number. + """ line2: NotRequired["str|None"] + """ + Building details. + """ postal_code: NotRequired["str|None"] + """ + Postal code. + """ state: NotRequired["str|None"] + """ + Prefecture. + """ town: NotRequired["str|None"] + """ + Town or cho-me. + """ class CreateParamsAccountCompanyAddress(TypedDict): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ bank_account: Optional["BankAccount"] + """ + These bank accounts are payment methods on `Customer` objects. + + On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer + destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts). + They can be bank accounts or debit cards as well, and are documented in the links above. + + Related guide: [Bank debits and transfers](https://stripe.com/docs/payments/bank-debits-transfers) + """ card: Optional["Card"] + """ + You can store multiple cards on a customer in order to charge the customer + later. You can also store multiple debit cards on a recipient in order to + transfer to those cards later. + + Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) + """ client_ip: Optional[str] + """ + IP address of the client that generates the token. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["token"] + """ + String representing the object's type. Objects of the same type share the same value. + """ type: str + """ + Type of the token: `account`, `bank_account`, `card`, or `pii`. + """ used: bool + """ + Determines if you have already used this token (you can only use tokens once). + """ @classmethod def create( diff --git a/stripe/api_resources/topup.py b/stripe/api_resources/topup.py index f713677db..524b5106d 100644 --- a/stripe/api_resources/topup.py +++ b/stripe/api_resources/topup.py @@ -43,64 +43,196 @@ class Topup( class CancelParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + 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|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. + """ transfer_group: NotRequired["str|None"] + """ + A string that identifies this top-up as part of a group. + """ class ListParams(RequestOptions): amount: NotRequired["Topup.ListParamsAmount|int|None"] + """ + A positive integer representing how much to transfer. + """ created: NotRequired["Topup.ListParamsCreated|int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ListParamsAmount(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): description: NotRequired["str|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ amount: int + """ + Amount transferred. + """ balance_transaction: Optional[ExpandableField["BalanceTransaction"]] + """ + ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ expected_availability_date: Optional[int] + """ + Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. + """ failure_code: Optional[str] + """ + Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). + """ failure_message: Optional[str] + """ + Message to user further explaining reason for top-up failure if available. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["topup"] + """ + String representing the object's type. Objects of the same type share the same value. + """ 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. + """ statement_descriptor: Optional[str] + """ + Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. + """ status: Literal["canceled", "failed", "pending", "reversed", "succeeded"] + """ + The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. + """ transfer_group: Optional[str] + """ + A string that identifies this top-up as part of a group. + """ @classmethod def _cls_cancel( diff --git a/stripe/api_resources/transfer.py b/stripe/api_resources/transfer.py index 4b93574ca..4d5a4b836 100644 --- a/stripe/api_resources/transfer.py +++ b/stripe/api_resources/transfer.py @@ -51,77 +51,233 @@ class Transfer( class CreateParams(RequestOptions): amount: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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']|None" ] + """ + 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|None"] + """ + 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|None"] destination: NotRequired["str|None"] + """ + Only return transfers for the destination specified by this account ID. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + Only return transfers with the specified transfer group. + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): description: NotRequired["str|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class CreateReversalParams(RequestOptions): amount: NotRequired["int|None"] + """ + 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ModifyReversalParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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 + """ + Amount in cents (or local equivalent) to be transferred. + """ amount_reversed: int + """ + Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). + """ balance_transaction: Optional[ExpandableField["BalanceTransaction"]] + """ + Balance transaction that describes the impact of this transfer on your account balance. + """ created: int + """ + Time that this record of the transfer was first created. + """ 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: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ destination: Optional[ExpandableField["Account"]] + """ + ID of the Stripe account the transfer was sent to. + """ destination_payment: Optional[ExpandableField["Charge"]] + """ + If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["transfer"] + """ + String representing the object's type. Objects of the same type share the same value. + """ reversals: ListObject["Reversal"] + """ + A list of reversals that have been applied to the transfer. + """ reversed: bool + """ + Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. + """ source_transaction: Optional[ExpandableField["Charge"]] + """ + ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. + """ source_type: Optional[str] + """ + The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. + """ transfer_group: Optional[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. + """ @classmethod def create( diff --git a/stripe/api_resources/treasury/credit_reversal.py b/stripe/api_resources/treasury/credit_reversal.py index 8101d8ff0..cdcd6d9e6 100644 --- a/stripe/api_resources/treasury/credit_reversal.py +++ b/stripe/api_resources/treasury/credit_reversal.py @@ -30,37 +30,109 @@ class CreditReversal( class CreateParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + Only return CreditReversals for the ReceivedCredit ID. + """ starting_after: NotRequired["str|None"] + """ + 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']|None" ] + """ + Only return CreditReversals for a given status. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ amount: int + """ + Amount (in cents) transferred. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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). + """ financial_account: str + """ + The FinancialAccount to reverse funds from. + """ hosted_regulatory_receipt_url: Optional[str] + """ + A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ network: Literal["ach", "stripe"] + """ + The rails used to reverse the funds. + """ object: Literal["treasury.credit_reversal"] + """ + String representing the object's type. Objects of the same type share the same value. + """ received_credit: str + """ + The ReceivedCredit being reversed. + """ status: Literal["canceled", "posted", "processing"] + """ + Status of the CreditReversal + """ status_transitions: StripeObject transaction: Optional[ExpandableField["Transaction"]] + """ + The Transaction associated with this object. + """ @classmethod def create( diff --git a/stripe/api_resources/treasury/debit_reversal.py b/stripe/api_resources/treasury/debit_reversal.py index e740de746..8060bf1bf 100644 --- a/stripe/api_resources/treasury/debit_reversal.py +++ b/stripe/api_resources/treasury/debit_reversal.py @@ -30,39 +30,117 @@ class DebitReversal( class CreateParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + Only return DebitReversals for the ReceivedDebit ID. + """ resolution: NotRequired["Literal['lost', 'won']|None"] + """ + Only return DebitReversals for a given resolution. + """ starting_after: NotRequired["str|None"] + """ + 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']|None" ] + """ + Only return DebitReversals for a given status. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ amount: int + """ + Amount (in cents) transferred. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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). + """ financial_account: Optional[str] + """ + The FinancialAccount to reverse funds from. + """ hosted_regulatory_receipt_url: Optional[str] + """ + A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + """ id: str + """ + Unique identifier for the object. + """ linked_flows: Optional[StripeObject] + """ + Other flows linked to a DebitReversal. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ network: Literal["ach", "card"] + """ + The rails used to reverse the funds. + """ object: Literal["treasury.debit_reversal"] + """ + String representing the object's type. Objects of the same type share the same value. + """ received_debit: str + """ + The ReceivedDebit being reversed. + """ status: Literal["failed", "processing", "succeeded"] + """ + Status of the DebitReversal + """ status_transitions: StripeObject transaction: Optional[ExpandableField["Transaction"]] + """ + The Transaction associated with this object. + """ @classmethod def create( diff --git a/stripe/api_resources/treasury/financial_account.py b/stripe/api_resources/treasury/financial_account.py index 873e2140d..44e537c23 100644 --- a/stripe/api_resources/treasury/financial_account.py +++ b/stripe/api_resources/treasury/financial_account.py @@ -43,284 +43,554 @@ class FinancialAccount( class CreateParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ features: NotRequired["FinancialAccount.CreateParamsFeatures|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + 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']|None" ] + """ + Restricts all inbound money movement. + """ outbound_flows: NotRequired[ "Literal['restricted', 'unrestricted']|None" ] + """ + Restricts all outbound money movement. + """ class CreateParamsFeatures(TypedDict): card_issuing: NotRequired[ "FinancialAccount.CreateParamsFeaturesCardIssuing|None" ] + """ + 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|None" ] + """ + Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + """ financial_addresses: NotRequired[ "FinancialAccount.CreateParamsFeaturesFinancialAddresses|None" ] + """ + Contains Features that add FinancialAddresses to the FinancialAccount. + """ inbound_transfers: NotRequired[ "FinancialAccount.CreateParamsFeaturesInboundTransfers|None" ] + """ + Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + """ intra_stripe_flows: NotRequired[ "FinancialAccount.CreateParamsFeaturesIntraStripeFlows|None" ] + """ + 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|None" ] + """ + Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + """ outbound_transfers: NotRequired[ "FinancialAccount.CreateParamsFeaturesOutboundTransfers|None" ] + """ + 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|None" ] + """ + Enables ACH transfers via the OutboundTransfers API. + """ us_domestic_wire: NotRequired[ "FinancialAccount.CreateParamsFeaturesOutboundTransfersUsDomesticWire|None" ] + """ + Enables US domestic wire transfers via the OutboundTransfers API. + """ 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 CreateParamsFeaturesOutboundPayments(TypedDict): ach: NotRequired[ "FinancialAccount.CreateParamsFeaturesOutboundPaymentsAch|None" ] + """ + Enables ACH transfers via the OutboundPayments API. + """ us_domestic_wire: NotRequired[ "FinancialAccount.CreateParamsFeaturesOutboundPaymentsUsDomesticWire|None" ] + """ + Enables US domestic wire transfers via the OutboundPayments API. + """ 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 CreateParamsFeaturesIntraStripeFlows(TypedDict): requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ class CreateParamsFeaturesInboundTransfers(TypedDict): ach: NotRequired[ "FinancialAccount.CreateParamsFeaturesInboundTransfersAch|None" ] + """ + Enables ACH Debits via the InboundTransfers API. + """ class CreateParamsFeaturesInboundTransfersAch(TypedDict): requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ class CreateParamsFeaturesFinancialAddresses(TypedDict): aba: NotRequired[ "FinancialAccount.CreateParamsFeaturesFinancialAddressesAba|None" ] + """ + Adds an ABA FinancialAddress to the FinancialAccount. + """ 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 CreateParamsFeaturesCardIssuing(TypedDict): requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ class ListParams(RequestOptions): created: NotRequired["FinancialAccount.ListParamsCreated|int|None"] ending_before: NotRequired["str|None"] + """ + An object ID cursor for use in pagination. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + A limit ranging from 1 to 100 (defaults to 10). + """ starting_after: NotRequired["str|None"] + """ + An object ID cursor for use in pagination. + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ModifyParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ features: NotRequired["FinancialAccount.ModifyParamsFeatures|None"] + """ + 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]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + The set of functionalities that the platform can restrict on the FinancialAccount. + """ class ModifyParamsPlatformRestrictions(TypedDict): inbound_flows: NotRequired[ "Literal['restricted', 'unrestricted']|None" ] + """ + Restricts all inbound money movement. + """ outbound_flows: NotRequired[ "Literal['restricted', 'unrestricted']|None" ] + """ + Restricts all outbound money movement. + """ class ModifyParamsFeatures(TypedDict): card_issuing: NotRequired[ "FinancialAccount.ModifyParamsFeaturesCardIssuing|None" ] + """ + 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|None" ] + """ + Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + """ financial_addresses: NotRequired[ "FinancialAccount.ModifyParamsFeaturesFinancialAddresses|None" ] + """ + Contains Features that add FinancialAddresses to the FinancialAccount. + """ inbound_transfers: NotRequired[ "FinancialAccount.ModifyParamsFeaturesInboundTransfers|None" ] + """ + Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + """ intra_stripe_flows: NotRequired[ "FinancialAccount.ModifyParamsFeaturesIntraStripeFlows|None" ] + """ + 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|None" ] + """ + Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + """ outbound_transfers: NotRequired[ "FinancialAccount.ModifyParamsFeaturesOutboundTransfers|None" ] + """ + 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|None" ] + """ + Enables ACH transfers via the OutboundTransfers API. + """ us_domestic_wire: NotRequired[ "FinancialAccount.ModifyParamsFeaturesOutboundTransfersUsDomesticWire|None" ] + """ + Enables US domestic wire transfers via the OutboundTransfers API. + """ 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 ModifyParamsFeaturesOutboundPayments(TypedDict): ach: NotRequired[ "FinancialAccount.ModifyParamsFeaturesOutboundPaymentsAch|None" ] + """ + Enables ACH transfers via the OutboundPayments API. + """ us_domestic_wire: NotRequired[ "FinancialAccount.ModifyParamsFeaturesOutboundPaymentsUsDomesticWire|None" ] + """ + Enables US domestic wire transfers via the OutboundPayments API. + """ 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 ModifyParamsFeaturesIntraStripeFlows(TypedDict): requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ class ModifyParamsFeaturesInboundTransfers(TypedDict): ach: NotRequired[ "FinancialAccount.ModifyParamsFeaturesInboundTransfersAch|None" ] + """ + Enables ACH Debits via the InboundTransfers API. + """ class ModifyParamsFeaturesInboundTransfersAch(TypedDict): requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ class ModifyParamsFeaturesFinancialAddresses(TypedDict): aba: NotRequired[ "FinancialAccount.ModifyParamsFeaturesFinancialAddressesAba|None" ] + """ + Adds an ABA FinancialAddress to the FinancialAccount. + """ 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 ModifyParamsFeaturesCardIssuing(TypedDict): requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class RetrieveFeaturesParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class UpdateFeaturesParams(RequestOptions): card_issuing: NotRequired[ "FinancialAccount.UpdateFeaturesParamsCardIssuing|None" ] + """ + 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|None" ] + """ + Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ financial_addresses: NotRequired[ "FinancialAccount.UpdateFeaturesParamsFinancialAddresses|None" ] + """ + Contains Features that add FinancialAddresses to the FinancialAccount. + """ inbound_transfers: NotRequired[ "FinancialAccount.UpdateFeaturesParamsInboundTransfers|None" ] + """ + Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + """ intra_stripe_flows: NotRequired[ "FinancialAccount.UpdateFeaturesParamsIntraStripeFlows|None" ] + """ + 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|None" ] + """ + Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + """ outbound_transfers: NotRequired[ "FinancialAccount.UpdateFeaturesParamsOutboundTransfers|None" ] + """ + 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|None" ] + """ + Enables ACH transfers via the OutboundTransfers API. + """ us_domestic_wire: NotRequired[ "FinancialAccount.UpdateFeaturesParamsOutboundTransfersUsDomesticWire|None" ] + """ + Enables US domestic wire transfers via the OutboundTransfers API. + """ 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 UpdateFeaturesParamsOutboundPayments(TypedDict): ach: NotRequired[ "FinancialAccount.UpdateFeaturesParamsOutboundPaymentsAch|None" ] + """ + Enables ACH transfers via the OutboundPayments API. + """ us_domestic_wire: NotRequired[ "FinancialAccount.UpdateFeaturesParamsOutboundPaymentsUsDomesticWire|None" ] + """ + Enables US domestic wire transfers via the OutboundPayments API. + """ 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 UpdateFeaturesParamsIntraStripeFlows(TypedDict): requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ class UpdateFeaturesParamsInboundTransfers(TypedDict): ach: NotRequired[ "FinancialAccount.UpdateFeaturesParamsInboundTransfersAch|None" ] + """ + Enables ACH Debits via the InboundTransfers API. + """ class UpdateFeaturesParamsInboundTransfersAch(TypedDict): requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ class UpdateFeaturesParamsFinancialAddresses(TypedDict): aba: NotRequired[ "FinancialAccount.UpdateFeaturesParamsFinancialAddressesAba|None" ] + """ + Adds an ABA FinancialAddress to the FinancialAccount. + """ 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 UpdateFeaturesParamsCardIssuing(TypedDict): requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ active_features: Optional[ List[ @@ -338,15 +608,46 @@ class UpdateFeaturesParamsCardIssuing(TypedDict): ] ] ] + """ + The array of paths to active Features in the Features hash. + """ balance: StripeObject + """ + Balance information for the FinancialAccount + """ country: str + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ features: Optional["FinancialAccountFeatures"] + """ + Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + Stripe or the platform can control Features via the requested field. + """ financial_addresses: List[StripeObject] + """ + The set of credentials that resolve to a FinancialAccount. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["treasury.financial_account"] + """ + String representing the object's type. Objects of the same type share the same value. + """ pending_features: Optional[ List[ Literal[ @@ -363,7 +664,13 @@ class UpdateFeaturesParamsCardIssuing(TypedDict): ] ] ] + """ + The array of paths to pending Features in the Features hash. + """ platform_restrictions: Optional[StripeObject] + """ + The set of functionalities that the platform can restrict on the FinancialAccount. + """ restricted_features: Optional[ List[ Literal[ @@ -380,9 +687,18 @@ class UpdateFeaturesParamsCardIssuing(TypedDict): ] ] ] + """ + The array of paths to restricted Features in the Features hash. + """ status: Literal["closed", "open"] + """ + The enum specifying what state the account is in. + """ status_details: StripeObject supported_currencies: List[str] + """ + The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + """ @classmethod def create( diff --git a/stripe/api_resources/treasury/financial_account_features.py b/stripe/api_resources/treasury/financial_account_features.py index beff84238..59e3bc32f 100644 --- a/stripe/api_resources/treasury/financial_account_features.py +++ b/stripe/api_resources/treasury/financial_account_features.py @@ -15,10 +15,34 @@ class FinancialAccountFeatures(StripeObject): Literal["treasury.financial_account_features"] ] = "treasury.financial_account_features" card_issuing: Optional[StripeObject] + """ + Toggle settings for enabling/disabling a feature + """ deposit_insurance: Optional[StripeObject] + """ + Toggle settings for enabling/disabling a feature + """ financial_addresses: Optional[StripeObject] + """ + Settings related to Financial Addresses features on a Financial Account + """ inbound_transfers: Optional[StripeObject] + """ + InboundTransfers contains inbound transfers features for a FinancialAccount. + """ intra_stripe_flows: Optional[StripeObject] + """ + Toggle settings for enabling/disabling a feature + """ object: Literal["treasury.financial_account_features"] + """ + String representing the object's type. Objects of the same type share the same value. + """ outbound_payments: Optional[StripeObject] + """ + Settings related to Outbound Payments features on a Financial Account + """ outbound_transfers: Optional[StripeObject] + """ + OutboundTransfers contains outbound transfers features for a FinancialAccount. + """ diff --git a/stripe/api_resources/treasury/inbound_transfer.py b/stripe/api_resources/treasury/inbound_transfer.py index f4476cf55..0f8d2c1c0 100644 --- a/stripe/api_resources/treasury/inbound_transfer.py +++ b/stripe/api_resources/treasury/inbound_transfer.py @@ -40,67 +40,184 @@ class InboundTransfer( class CancelParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + 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|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ financial_account: str + """ + The FinancialAccount to send funds to. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The complete description that appears on your customers' statements. Maximum 10 characters. + """ class ListParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class FailParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ failure_details: NotRequired[ "InboundTransfer.FailParamsFailureDetails|None" ] + """ + 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']|None" ] + """ + Reason for the failure. + """ class ReturnInboundTransferParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class SucceedParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ amount: int + """ + Amount (in cents) transferred. + """ cancelable: bool + """ + Returns `true` if the InboundTransfer is able to be canceled. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ failure_details: Optional[StripeObject] + """ + Details about this InboundTransfer's failure. Only set when status is `failed`. + """ financial_account: str + """ + The FinancialAccount that received the funds. + """ hosted_regulatory_receipt_url: Optional[str] + """ + A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + """ id: str + """ + Unique identifier for the object. + """ linked_flows: StripeObject livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["treasury.inbound_transfer"] + """ + String representing the object's type. Objects of the same type share the same value. + """ origin_payment_method: str + """ + The origin payment method to be debited for an InboundTransfer. + """ origin_payment_method_details: Optional[StripeObject] + """ + Details about the PaymentMethod for an InboundTransfer. + """ returned: Optional[bool] + """ + Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. + """ statement_descriptor: str + """ + Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. + """ status: Literal["canceled", "failed", "processing", "succeeded"] + """ + Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. + """ status_transitions: StripeObject transaction: Optional[ExpandableField["Transaction"]] + """ + The Transaction associated with this object. + """ @classmethod def _cls_cancel( diff --git a/stripe/api_resources/treasury/outbound_payment.py b/stripe/api_resources/treasury/outbound_payment.py index 2924ac3a8..112ad7ebb 100644 --- a/stripe/api_resources/treasury/outbound_payment.py +++ b/stripe/api_resources/treasury/outbound_payment.py @@ -42,60 +42,141 @@ class OutboundPayment( class CancelParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + 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|None"] + """ + 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|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ destination_payment_method: NotRequired["str|None"] + """ + The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. + """ destination_payment_method_data: NotRequired[ "OutboundPayment.CreateParamsDestinationPaymentMethodData|None" ] + """ + Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. + """ destination_payment_method_options: NotRequired[ "OutboundPayment.CreateParamsDestinationPaymentMethodOptions|None" ] + """ + Payment method-specific configuration for this OutboundPayment. + """ end_user_details: NotRequired[ "OutboundPayment.CreateParamsEndUserDetails|None" ] + """ + End user details. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ financial_account: str + """ + The FinancialAccount to pull funds from. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None"] + """ + 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|None" ] + """ + Optional fields for `us_bank_account`. + """ class CreateParamsDestinationPaymentMethodOptionsUsBankAccount( TypedDict, ): network: NotRequired["Literal['ach', 'us_domestic_wire']|None"] + """ + 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|None" ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ financial_account: NotRequired["str|None"] + """ + Required if type is set to `financial_account`. The FinancialAccount ID to send funds to. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None" ] + """ + Required hash if type is set to `us_bank_account`. + """ class CreateParamsDestinationPaymentMethodDataUsBankAccount(TypedDict): account_holder_type: NotRequired[ "Literal['company', 'individual']|None" ] + """ + Account holder type: individual or company. + """ account_number: NotRequired["str|None"] + """ + Account number of the bank account. + """ account_type: NotRequired["Literal['checking', 'savings']|None"] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ financial_connections_account: NotRequired["str|None"] + """ + The ID of a Financial Connections Account to use as a payment method. + """ routing_number: NotRequired["str|None"] + """ + Routing number of the bank account. + """ class CreateParamsDestinationPaymentMethodDataBillingDetails( TypedDict @@ -103,72 +184,201 @@ class CreateParamsDestinationPaymentMethodDataBillingDetails( address: NotRequired[ "Literal['']|OutboundPayment.CreateParamsDestinationPaymentMethodDataBillingDetailsAddress|None" ] + """ + Billing address. + """ email: NotRequired["Literal['']|str|None"] + """ + Email address. + """ name: NotRequired["Literal['']|str|None"] + """ + Full name. + """ phone: NotRequired["Literal['']|str|None"] + """ + Billing phone number (including extension). + """ class CreateParamsDestinationPaymentMethodDataBillingDetailsAddress( TypedDict, ): city: NotRequired["str|None"] + """ + City, district, suburb, town, or village. + """ country: NotRequired["str|None"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ line1: NotRequired["str|None"] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ line2: NotRequired["str|None"] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ postal_code: NotRequired["str|None"] + """ + ZIP or postal code. + """ state: NotRequired["str|None"] + """ + State, county, province, or region. + """ class ListParams(RequestOptions): customer: NotRequired["str|None"] + """ + Only return OutboundPayments sent to this customer. + """ ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class FailParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class PostParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ReturnOutboundPaymentParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ returned_details: NotRequired[ "OutboundPayment.ReturnOutboundPaymentParamsReturnedDetails|None" ] + """ + 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']|None" ] + """ + The return code to be set on the OutboundPayment object. + """ amount: int + """ + Amount (in cents) transferred. + """ cancelable: bool + """ + Returns `true` if the object can be canceled, and `false` otherwise. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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: Optional[str] + """ + ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. + """ description: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ destination_payment_method: Optional[str] + """ + The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. + """ destination_payment_method_details: Optional[StripeObject] + """ + Details about the PaymentMethod for an OutboundPayment. + """ end_user_details: Optional[StripeObject] + """ + Details about the end user. + """ expected_arrival_date: int + """ + The date when funds are expected to arrive in the destination account. + """ financial_account: str + """ + The FinancialAccount that funds were pulled from. + """ hosted_regulatory_receipt_url: Optional[str] + """ + A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["treasury.outbound_payment"] + """ + String representing the object's type. Objects of the same type share the same value. + """ returned_details: Optional[StripeObject] + """ + Details about a returned OutboundPayment. Only set when the status is `returned`. + """ statement_descriptor: str + """ + The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). + """ status: Literal["canceled", "failed", "posted", "processing", "returned"] + """ + Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. + """ status_transitions: StripeObject transaction: ExpandableField["Transaction"] + """ + The Transaction associated with this object. + """ @classmethod def _cls_cancel( diff --git a/stripe/api_resources/treasury/outbound_transfer.py b/stripe/api_resources/treasury/outbound_transfer.py index 4b80ff60c..61b907ea4 100644 --- a/stripe/api_resources/treasury/outbound_transfer.py +++ b/stripe/api_resources/treasury/outbound_transfer.py @@ -42,79 +42,202 @@ class OutboundTransfer( class CancelParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + 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|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ destination_payment_method: NotRequired["str|None"] + """ + The PaymentMethod to use as the payment instrument for the OutboundTransfer. + """ destination_payment_method_options: NotRequired[ "OutboundTransfer.CreateParamsDestinationPaymentMethodOptions|None" ] + """ + Hash describing payment method configuration details. + """ expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ financial_account: str + """ + The FinancialAccount to pull funds from. + """ metadata: NotRequired["Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + 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|None" ] + """ + Optional fields for `us_bank_account`. + """ class CreateParamsDestinationPaymentMethodOptionsUsBankAccount( TypedDict, ): network: NotRequired["Literal['ach', 'us_domestic_wire']|None"] + """ + Designate the OutboundTransfer as using a US bank account network configuration. + """ class ListParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None" ] + """ + Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class FailParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class PostParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ class ReturnOutboundTransferParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ returned_details: NotRequired[ "OutboundTransfer.ReturnOutboundTransferParamsReturnedDetails|None" ] + """ + 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']|None" ] + """ + Reason for the return. + """ amount: int + """ + Amount (in cents) transferred. + """ cancelable: bool + """ + Returns `true` if the object can be canceled, and `false` otherwise. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ destination_payment_method: Optional[str] + """ + The PaymentMethod used as the payment instrument for an OutboundTransfer. + """ destination_payment_method_details: StripeObject expected_arrival_date: int + """ + The date when funds are expected to arrive in the destination account. + """ financial_account: str + """ + The FinancialAccount that funds were pulled from. + """ hosted_regulatory_receipt_url: Optional[str] + """ + A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["treasury.outbound_transfer"] + """ + String representing the object's type. Objects of the same type share the same value. + """ returned_details: Optional[StripeObject] + """ + Details about a returned OutboundTransfer. Only set when the status is `returned`. + """ statement_descriptor: str + """ + Information about the OutboundTransfer to be sent to the recipient account. + """ status: Literal["canceled", "failed", "posted", "processing", "returned"] + """ + Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. + """ status_transitions: StripeObject transaction: ExpandableField["Transaction"] + """ + The Transaction associated with this object. + """ @classmethod def _cls_cancel( diff --git a/stripe/api_resources/treasury/received_credit.py b/stripe/api_resources/treasury/received_credit.py index ab6a81426..f0cba9efe 100644 --- a/stripe/api_resources/treasury/received_credit.py +++ b/stripe/api_resources/treasury/received_credit.py @@ -34,65 +34,170 @@ class ReceivedCredit(ListableAPIResource["ReceivedCredit"]): class ListParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ financial_account: str + """ + The FinancialAccount that received the funds. + """ limit: NotRequired["int|None"] + """ + 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|None" ] + """ + Only return ReceivedCredits described by the flow. + """ starting_after: NotRequired["str|None"] + """ + 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']|None"] + """ + 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 RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + 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|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ expand: NotRequired["List[str]|None"] + """ + 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|None" ] + """ + 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|None" ] + """ + Optional fields for `us_bank_account`. + """ class CreateParamsInitiatingPaymentMethodDetailsUsBankAccount( TypedDict, ): account_holder_name: NotRequired["str|None"] + """ + The bank account holder's name. + """ account_number: NotRequired["str|None"] + """ + The bank account number. + """ routing_number: NotRequired["str|None"] + """ + The bank account's routing number. + """ amount: int + """ + Amount (in cents) transferred. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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: str + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ failure_code: Optional[ Literal["account_closed", "account_frozen", "other"] ] + """ + Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. + """ financial_account: Optional[str] + """ + The FinancialAccount that received the funds. + """ hosted_regulatory_receipt_url: Optional[str] + """ + A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + """ id: str + """ + Unique identifier for the object. + """ initiating_payment_method_details: StripeObject linked_flows: StripeObject livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ network: Literal["ach", "card", "stripe", "us_domestic_wire"] + """ + The rails used to send the funds. + """ object: Literal["treasury.received_credit"] + """ + String representing the object's type. Objects of the same type share the same value. + """ reversal_details: Optional[StripeObject] + """ + Details describing when a ReceivedCredit may be reversed. + """ status: Literal["failed", "succeeded"] + """ + Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. + """ transaction: Optional[ExpandableField["Transaction"]] + """ + The Transaction associated with this object. + """ @classmethod def list( diff --git a/stripe/api_resources/treasury/received_debit.py b/stripe/api_resources/treasury/received_debit.py index d2dbaf4af..1e419e002 100644 --- a/stripe/api_resources/treasury/received_debit.py +++ b/stripe/api_resources/treasury/received_debit.py @@ -34,59 +34,158 @@ class ReceivedDebit(ListableAPIResource["ReceivedDebit"]): class ListParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ financial_account: str + """ + The FinancialAccount that funds were pulled from. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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']|None"] + """ + Only return ReceivedDebits that have the given status: `succeeded` or `failed`. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + 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|None"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ expand: NotRequired["List[str]|None"] + """ + 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|None" ] + """ + 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|None" ] + """ + Optional fields for `us_bank_account`. + """ class CreateParamsInitiatingPaymentMethodDetailsUsBankAccount( TypedDict, ): account_holder_name: NotRequired["str|None"] + """ + The bank account holder's name. + """ account_number: NotRequired["str|None"] + """ + The bank account number. + """ routing_number: NotRequired["str|None"] + """ + The bank account's routing number. + """ amount: int + """ + Amount (in cents) transferred. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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: str + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ failure_code: Optional[ Literal[ "account_closed", "account_frozen", "insufficient_funds", "other" ] ] + """ + Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. + """ financial_account: Optional[str] + """ + The FinancialAccount that funds were pulled from. + """ hosted_regulatory_receipt_url: Optional[str] + """ + A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + """ id: str + """ + Unique identifier for the object. + """ initiating_payment_method_details: Optional[StripeObject] linked_flows: StripeObject livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ network: Literal["ach", "card", "stripe"] + """ + The network used for the ReceivedDebit. + """ object: Literal["treasury.received_debit"] + """ + String representing the object's type. Objects of the same type share the same value. + """ reversal_details: Optional[StripeObject] + """ + Details describing when a ReceivedDebit might be reversed. + """ status: Literal["failed", "succeeded"] + """ + Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. + """ transaction: Optional[ExpandableField["Transaction"]] + """ + The Transaction associated with this object. + """ @classmethod def list( diff --git a/stripe/api_resources/treasury/transaction.py b/stripe/api_resources/treasury/transaction.py index b94fa0ac4..2656a1664 100644 --- a/stripe/api_resources/treasury/transaction.py +++ b/stripe/api_resources/treasury/transaction.py @@ -32,45 +32,126 @@ class Transaction(ListableAPIResource["Transaction"]): class ListParams(RequestOptions): created: NotRequired["Transaction.ListParamsCreated|int|None"] ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ limit: NotRequired["int|None"] + """ + 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']|None"] + """ + The results are in reverse chronological order by `created` or `posted_at`. The default is `created`. + """ starting_after: NotRequired["str|None"] + """ + 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']|None"] + """ + Only return Transactions that have the given status: `open`, `posted`, or `void`. + """ status_transitions: NotRequired[ "Transaction.ListParamsStatusTransitions|None" ] + """ + 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|None" ] + """ + Returns Transactions with `posted_at` within the specified range. + """ class ListParamsStatusTransitionsPostedAt(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ amount: int + """ + Amount (in cents) transferred. + """ balance_impact: StripeObject + """ + Change to a FinancialAccount's balance + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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: str + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ entries: Optional[ListObject["TransactionEntry"]] + """ + A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. + """ financial_account: str + """ + The FinancialAccount associated with this object. + """ flow: Optional[str] + """ + ID of the flow that created the Transaction. + """ flow_details: Optional[StripeObject] + """ + Details of the flow that created the Transaction. + """ flow_type: Literal[ "credit_reversal", "debit_reversal", @@ -82,10 +163,25 @@ class RetrieveParams(RequestOptions): "received_credit", "received_debit", ] + """ + Type of the flow that created the Transaction. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["treasury.transaction"] + """ + String representing the object's type. Objects of the same type share the same value. + """ status: Literal["open", "posted", "void"] + """ + Status of the Transaction. + """ status_transitions: StripeObject @classmethod diff --git a/stripe/api_resources/treasury/transaction_entry.py b/stripe/api_resources/treasury/transaction_entry.py index 8f3c74ac1..20a859bf9 100644 --- a/stripe/api_resources/treasury/transaction_entry.py +++ b/stripe/api_resources/treasury/transaction_entry.py @@ -34,35 +34,104 @@ class ListParams(RequestOptions): "TransactionEntry.ListParamsEffectiveAt|int|None" ] ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ limit: NotRequired["int|None"] + """ + 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']|None"] + """ + The results are in reverse chronological order by `created` or `effective_at`. The default is `created`. + """ starting_after: NotRequired["str|None"] + """ + 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|None"] + """ + Only return TransactionEntries associated with this Transaction. + """ class ListParamsEffectiveAt(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class ListParamsCreated(TypedDict): gt: NotRequired["int|None"] + """ + Minimum value to filter by (exclusive) + """ gte: NotRequired["int|None"] + """ + Minimum value to filter by (inclusive) + """ lt: NotRequired["int|None"] + """ + Maximum value to filter by (exclusive) + """ lte: NotRequired["int|None"] + """ + Maximum value to filter by (inclusive) + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ balance_impact: StripeObject + """ + Change to a FinancialAccount's balance + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ 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). + """ effective_at: int + """ + When the TransactionEntry will impact the FinancialAccount's balance. + """ financial_account: str + """ + The FinancialAccount associated with this object. + """ flow: Optional[str] + """ + Token of the flow associated with the TransactionEntry. + """ flow_details: Optional[StripeObject] + """ + Details of the flow associated with the TransactionEntry. + """ flow_type: Literal[ "credit_reversal", "debit_reversal", @@ -74,10 +143,25 @@ class RetrieveParams(RequestOptions): "received_credit", "received_debit", ] + """ + Type of the flow associated with the TransactionEntry. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["treasury.transaction_entry"] + """ + String representing the object's type. Objects of the same type share the same value. + """ transaction: ExpandableField["Transaction"] + """ + The Transaction associated with this object. + """ type: Literal[ "credit_reversal", "credit_reversal_posting", @@ -100,6 +184,9 @@ class RetrieveParams(RequestOptions): "received_credit", "received_debit", ] + """ + The specific money movement that generated the TransactionEntry. + """ @classmethod def list( diff --git a/stripe/api_resources/usage_record.py b/stripe/api_resources/usage_record.py index eb3528301..0db24e1ef 100644 --- a/stripe/api_resources/usage_record.py +++ b/stripe/api_resources/usage_record.py @@ -16,11 +16,29 @@ class UsageRecord(APIResource["UsageRecord"]): OBJECT_NAME: ClassVar[Literal["usage_record"]] = "usage_record" id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["usage_record"] + """ + String representing the object's type. Objects of the same type share the same value. + """ quantity: int + """ + The usage quantity for the specified date. + """ subscription_item: str + """ + The ID of the subscription item this usage record contains data for. + """ timestamp: int + """ + The timestamp when this usage occurred. + """ @classmethod def create( diff --git a/stripe/api_resources/usage_record_summary.py b/stripe/api_resources/usage_record_summary.py index d361c1a8d..10b654bc5 100644 --- a/stripe/api_resources/usage_record_summary.py +++ b/stripe/api_resources/usage_record_summary.py @@ -10,9 +10,27 @@ class UsageRecordSummary(StripeObject): Literal["usage_record_summary"] ] = "usage_record_summary" id: str + """ + Unique identifier for the object. + """ invoice: Optional[str] + """ + The invoice in which this usage period has been billed for. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["usage_record_summary"] + """ + String representing the object's type. Objects of the same type share the same value. + """ period: StripeObject subscription_item: str + """ + The ID of the subscription item this summary is describing. + """ total_usage: int + """ + The total usage within this usage period. + """ diff --git a/stripe/api_resources/webhook_endpoint.py b/stripe/api_resources/webhook_endpoint.py index f339bdae4..b8b642256 100644 --- a/stripe/api_resources/webhook_endpoint.py +++ b/stripe/api_resources/webhook_endpoint.py @@ -37,8 +37,17 @@ 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']|None" ] + """ + Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. + """ connect: NotRequired["bool|None"] + """ + Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. + """ description: NotRequired["Literal['']|str|None"] + """ + An optional description of what the webhook is used for. + """ enabled_events: List[ Literal[ "*", @@ -269,45 +278,129 @@ class CreateParams(RequestOptions): "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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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 ListParams(RequestOptions): ending_before: NotRequired["str|None"] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ limit: NotRequired["int|None"] + """ + 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|None"] + """ + 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|None"] + """ + An optional description of what the webhook is used for. + """ disabled: NotRequired["bool|None"] + """ + 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']]|None" ] + """ + 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]|None"] + """ + Specifies which fields in the response should be expanded. + """ metadata: NotRequired["Literal['']|Dict[str, str]|None"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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|None"] + """ + The URL of the webhook endpoint. + """ class RetrieveParams(RequestOptions): expand: NotRequired["List[str]|None"] + """ + Specifies which fields in the response should be expanded. + """ api_version: Optional[str] + """ + The API version events are rendered as for this webhook endpoint. + """ application: Optional[str] + """ + The ID of the associated Connect application. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ description: Optional[str] + """ + An optional description of what the webhook is used for. + """ enabled_events: List[str] + """ + The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. + """ id: str + """ + Unique identifier for the object. + """ livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Dict[str, str] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ object: Literal["webhook_endpoint"] + """ + String representing the object's type. Objects of the same type share the same value. + """ secret: Optional[str] + """ + The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation. + """ status: str + """ + The status of the webhook. It can be `enabled` or `disabled`. + """ url: str + """ + The URL of the webhook endpoint. + """ deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ @classmethod def create( From 6372caa75857294a352bf1412e7476d46bb80841 Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Thu, 26 Oct 2023 08:15:58 -0700 Subject: [PATCH 2/3] Fix backslashes --- stripe/api_resources/plan.py | 2 +- stripe/api_resources/price.py | 2 +- stripe/api_resources/product.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stripe/api_resources/plan.py b/stripe/api_resources/plan.py index 5b81e495c..915fb6a5a 100644 --- a/stripe/api_resources/plan.py +++ b/stripe/api_resources/plan.py @@ -173,7 +173,7 @@ class CreateParamsProduct(TypedDict): """ 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. + 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|None"] """ diff --git a/stripe/api_resources/price.py b/stripe/api_resources/price.py index 078326008..56b87e58a 100644 --- a/stripe/api_resources/price.py +++ b/stripe/api_resources/price.py @@ -206,7 +206,7 @@ class CreateParamsProductData(TypedDict): """ 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. + 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|None"] """ diff --git a/stripe/api_resources/product.py b/stripe/api_resources/product.py index d28b8eaab..f1a1288a8 100644 --- a/stripe/api_resources/product.py +++ b/stripe/api_resources/product.py @@ -111,7 +111,7 @@ class CreateParams(RequestOptions): """ 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. + 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|None"] @@ -379,7 +379,7 @@ class ModifyParams(RequestOptions): """ 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. + 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|None"] From df9fad1ea8aa0c602f1e911cf41b5db6969c3954 Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Thu, 26 Oct 2023 08:17:15 -0700 Subject: [PATCH 3/3] Not yet, soon --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7464eb739..7a3fc3ff4 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ license="MIT", keywords="stripe api payments", packages=find_packages(exclude=["tests", "tests.*"]), - package_data={"stripe": ["data/ca-certificates.crt", "py.typed"]}, + package_data={"stripe": ["data/ca-certificates.crt"]}, zip_safe=False, install_requires=[ 'typing_extensions <= 4.2.0, > 3.7.2; python_version < "3.7"',