// File generated from our OpenAPI spec declare module 'stripe' { namespace Stripe { namespace Checkout { /** * A Checkout Session represents your customer's session as they pay for * one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout) * or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a * new Session each time your customer attempts to pay. * * Once payment is successful, the Checkout Session will contain a reference * to the [Customer](https://stripe.com/docs/api/customers), and either the successful * [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active * [Subscription](https://stripe.com/docs/api/subscriptions). * * You can create a Checkout Session on your server and pass its ID to the * client to begin Checkout. * * Related guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart). */ interface Session { /** * Unique identifier for the object. Used to pass to `redirectToCheckout` * in Stripe.js. */ id: string; /** * String representing the object's type. Objects of the same type share the same value. */ object: 'checkout.session'; /** * When set, provides configuration for actions to take if this Checkout Session expires. */ after_expiration: Session.AfterExpiration | null; /** * Enables user redeemable promotion codes. */ allow_promotion_codes: boolean | null; /** * Total of all items before discounts or taxes are applied. */ amount_subtotal: number | null; /** * Total of all items after discounts and taxes are applied. */ amount_total: number | null; automatic_tax: Session.AutomaticTax; /** * Describes whether Checkout should collect the customer's billing address. */ billing_address_collection: Session.BillingAddressCollection | null; /** * The URL the customer will be directed to if they decide to cancel payment and return to your website. */ cancel_url: string; /** * 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_reference_id: string | null; /** * Results of `consent_collection` for this session. */ consent: Session.Consent | null; /** * When set, provides configuration for the Checkout Session to gather active consent from customers. */ consent_collection: Session.ConsentCollection | null; /** * Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** * 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: string | null; custom_text: Session.CustomText; /** * The ID of the customer for this Session. * For Checkout Sessions in `payment` or `subscription` 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: string | Stripe.Customer | Stripe.DeletedCustomer | null; /** * Configure whether a Checkout Session creates a Customer when the Checkout Session completes. */ customer_creation: Session.CustomerCreation | null; /** * 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_details: Session.CustomerDetails | null; /** * 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. */ customer_email: string | null; /** * The timestamp at which the Checkout Session will expire. */ expires_at: number; /** * The line items purchased by the customer. */ line_items?: ApiList; /** * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** * The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. */ locale: Session.Locale | null; /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata: Stripe.Metadata | null; /** * The mode of the Checkout Session. */ mode: Session.Mode; /** * The ID of the PaymentIntent for Checkout Sessions in `payment` mode. */ payment_intent: string | Stripe.PaymentIntent | null; /** * The ID of the Payment Link that created this Session. */ payment_link: string | Stripe.PaymentLink | null; /** * Configure whether a Checkout Session should collect a payment method. */ payment_method_collection: Session.PaymentMethodCollection | null; /** * Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. */ payment_method_options: Session.PaymentMethodOptions | null; /** * A list of the types of payment methods (e.g. card) this Checkout * Session is allowed to accept. */ payment_method_types: Array; /** * 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. */ payment_status: Session.PaymentStatus; phone_number_collection?: Session.PhoneNumberCollection; /** * The ID of the original expired Checkout Session that triggered the recovery flow. */ recovered_from: string | null; /** * The ID of the SetupIntent for Checkout Sessions in `setup` mode. */ setup_intent: string | Stripe.SetupIntent | null; /** * When set, provides configuration for Checkout to collect a shipping address from a customer. */ shipping_address_collection: Session.ShippingAddressCollection | null; /** * The details of the customer cost of shipping, including the customer chosen ShippingRate. */ shipping_cost: Session.ShippingCost | null; /** * Shipping information for this Checkout Session. */ shipping_details: Session.ShippingDetails | null; /** * The shipping rate options applied to this Session. */ shipping_options: Array; /** * The status of the Checkout Session, one of `open`, `complete`, or `expired`. */ status: Session.Status | null; /** * 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. */ submit_type: Session.SubmitType | null; /** * The ID of the subscription for Checkout Sessions in `subscription` mode. */ subscription: string | Stripe.Subscription | null; /** * The URL the customer will be directed to after the payment or * subscription creation is successful. */ success_url: string; tax_id_collection?: Session.TaxIdCollection; /** * Tax and discount details for the computed total amount. */ total_details: Session.TotalDetails | null; /** * 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. */ url: string | null; } namespace Session { interface AfterExpiration { /** * When set, configuration used to recover the Checkout Session on expiry. */ recovery: AfterExpiration.Recovery | null; } namespace AfterExpiration { interface Recovery { /** * Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` */ allow_promotion_codes: boolean; /** * If `true`, a recovery url will be generated to recover this Checkout Session if it * expires before a transaction is completed. It will be attached to the * Checkout Session object upon expiration. */ enabled: boolean; /** * The timestamp at which the recovery URL will expire. */ expires_at: number | null; /** * URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session */ url: string | null; } } interface AutomaticTax { /** * Indicates whether automatic tax is enabled for the session */ enabled: boolean; /** * The status of the most recent automated tax calculation for this session. */ status: AutomaticTax.Status | null; } namespace AutomaticTax { type Status = 'complete' | 'failed' | 'requires_location_inputs'; } type BillingAddressCollection = 'auto' | 'required'; interface Consent { /** * If `opt_in`, the customer consents to receiving promotional communications * from the merchant about this Checkout Session. */ promotions: Consent.Promotions | null; /** * If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. */ terms_of_service: 'accepted' | null; } namespace Consent { type Promotions = 'opt_in' | 'opt_out'; } interface ConsentCollection { /** * 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. */ promotions: ConsentCollection.Promotions | null; /** * If set to `required`, it requires customers to accept the terms of service before being able to pay. */ terms_of_service: ConsentCollection.TermsOfService | null; } namespace ConsentCollection { type Promotions = 'auto' | 'none'; type TermsOfService = 'none' | 'required'; } type CustomerCreation = 'always' | 'if_required'; interface CustomerDetails { /** * The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. */ address: Stripe.Address | null; /** * The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. * Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. */ email: string | null; /** * The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. */ name: string | null; /** * The customer's phone number after a completed Checkout Session. */ phone: string | null; /** * The customer's tax exempt status after a completed Checkout Session. */ tax_exempt: CustomerDetails.TaxExempt | null; /** * The customer's tax IDs after a completed Checkout Session. */ tax_ids: Array | null; } namespace CustomerDetails { type TaxExempt = 'exempt' | 'none' | 'reverse'; interface TaxId { /** * The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown` */ type: TaxId.Type; /** * The value of the tax ID. */ value: string | null; } namespace TaxId { type Type = | 'ae_trn' | 'au_abn' | 'au_arn' | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'ch_vat' | 'cl_tin' | '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' | 'ph_tin' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'th_vat' | 'tr_tin' | 'tw_vat' | 'ua_vat' | 'unknown' | 'us_ein' | 'za_vat'; } } interface CustomText { /** * Custom text that should be displayed alongside shipping address collection. */ shipping_address: CustomText.ShippingAddress | null; /** * Custom text that should be displayed alongside the payment confirmation button. */ submit: CustomText.Submit | null; } namespace CustomText { interface ShippingAddress { /** * Text may be up to 500 characters in length. */ message: string; } interface Submit { /** * Text may be up to 500 characters in length. */ message: string; } } type Locale = | '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'; type Mode = 'payment' | 'setup' | 'subscription'; type PaymentMethodCollection = 'always' | 'if_required'; interface PaymentMethodOptions { acss_debit?: PaymentMethodOptions.AcssDebit; affirm?: PaymentMethodOptions.Affirm; afterpay_clearpay?: PaymentMethodOptions.AfterpayClearpay; alipay?: PaymentMethodOptions.Alipay; au_becs_debit?: PaymentMethodOptions.AuBecsDebit; bacs_debit?: PaymentMethodOptions.BacsDebit; bancontact?: PaymentMethodOptions.Bancontact; boleto?: PaymentMethodOptions.Boleto; card?: PaymentMethodOptions.Card; customer_balance?: PaymentMethodOptions.CustomerBalance; eps?: PaymentMethodOptions.Eps; fpx?: PaymentMethodOptions.Fpx; giropay?: PaymentMethodOptions.Giropay; grabpay?: PaymentMethodOptions.Grabpay; ideal?: PaymentMethodOptions.Ideal; klarna?: PaymentMethodOptions.Klarna; konbini?: PaymentMethodOptions.Konbini; oxxo?: PaymentMethodOptions.Oxxo; p24?: PaymentMethodOptions.P24; paynow?: PaymentMethodOptions.Paynow; pix?: PaymentMethodOptions.Pix; sepa_debit?: PaymentMethodOptions.SepaDebit; sofort?: PaymentMethodOptions.Sofort; us_bank_account?: PaymentMethodOptions.UsBankAccount; } namespace PaymentMethodOptions { interface AcssDebit { /** * Currency supported by the bank account. Returned when the Session is in `setup` mode. */ currency?: AcssDebit.Currency; mandate_options?: AcssDebit.MandateOptions; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: AcssDebit.SetupFutureUsage; /** * Bank account verification method. */ verification_method?: AcssDebit.VerificationMethod; } namespace AcssDebit { type Currency = 'cad' | 'usd'; interface MandateOptions { /** * A URL for custom mandate text */ custom_mandate_url?: string; /** * List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. */ default_for?: Array; /** * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. */ interval_description: string | null; /** * Payment schedule for the mandate. */ payment_schedule: MandateOptions.PaymentSchedule | null; /** * Transaction type of the mandate. */ transaction_type: MandateOptions.TransactionType | null; } namespace MandateOptions { type DefaultFor = 'invoice' | 'subscription'; type PaymentSchedule = 'combined' | 'interval' | 'sporadic'; type TransactionType = 'business' | 'personal'; } type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; type VerificationMethod = 'automatic' | 'instant' | 'microdeposits'; } interface Affirm { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface AfterpayClearpay { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Alipay { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface AuBecsDebit { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface BacsDebit { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: BacsDebit.SetupFutureUsage; } namespace BacsDebit { type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; } interface Bancontact { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Boleto { /** * 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 voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ expires_after_days: number; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: Boleto.SetupFutureUsage; } namespace Boleto { type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; } interface Card { installments?: Card.Installments; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: Card.SetupFutureUsage; /** * 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_kana?: string; /** * 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. */ statement_descriptor_suffix_kanji?: string; } namespace Card { interface Installments { /** * Indicates if installments are enabled */ enabled?: boolean; } type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; } interface CustomerBalance { bank_transfer?: CustomerBalance.BankTransfer; /** * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. */ funding_type: 'bank_transfer' | null; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } namespace CustomerBalance { interface BankTransfer { eu_bank_transfer?: BankTransfer.EuBankTransfer; /** * 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`. */ requested_address_types?: Array< BankTransfer.RequestedAddressType >; /** * The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. */ type: BankTransfer.Type | null; } namespace BankTransfer { interface EuBankTransfer { /** * The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. */ country: EuBankTransfer.Country; } namespace EuBankTransfer { type Country = 'DE' | 'ES' | 'FR' | 'IE' | 'NL'; } type RequestedAddressType = | 'iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin'; type Type = | 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer'; } } interface Eps { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Fpx { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Giropay { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Grabpay { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Ideal { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Klarna { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: Klarna.SetupFutureUsage; } namespace Klarna { type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; } interface Konbini { /** * 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. */ expires_after_days: number | null; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Oxxo { /** * The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ expires_after_days: number; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface P24 { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Paynow { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Pix { /** * The number of seconds after which Pix payment will expire. */ expires_after_seconds: number | null; } interface SepaDebit { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: SepaDebit.SetupFutureUsage; } namespace SepaDebit { type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; } interface Sofort { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface UsBankAccount { financial_connections?: UsBankAccount.FinancialConnections; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: UsBankAccount.SetupFutureUsage; /** * Bank account verification method. */ verification_method?: UsBankAccount.VerificationMethod; } namespace UsBankAccount { interface FinancialConnections { /** * The list of permissions to request. The `payment_method` permission must be included. */ permissions?: Array; /** * 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. */ return_url?: string; } namespace FinancialConnections { type Permission = | 'balances' | 'ownership' | 'payment_method' | 'transactions'; } type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; type VerificationMethod = 'automatic' | 'instant'; } } type PaymentStatus = 'no_payment_required' | 'paid' | 'unpaid'; interface PhoneNumberCollection { /** * Indicates whether phone number collection is enabled for the session */ enabled: boolean; } interface ShippingAddressCollection { /** * 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`. */ allowed_countries: Array; } namespace ShippingAddressCollection { type AllowedCountry = | 'AC' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CV' | 'CW' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SZ' | 'TA' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VN' | 'VU' | 'WF' | 'WS' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW' | 'ZZ'; } interface ShippingCost { /** * Total shipping cost before any discounts or taxes are applied. */ amount_subtotal: number; /** * Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */ amount_tax: number; /** * Total shipping cost after discounts and taxes are applied. */ amount_total: number; /** * The ID of the ShippingRate for this order. */ shipping_rate: string | Stripe.ShippingRate | null; /** * The taxes applied to the shipping rate. */ taxes?: Array; } namespace ShippingCost { interface Tax { /** * Amount of tax applied for this rate. */ amount: number; /** * Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. * * Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates). */ rate: Stripe.TaxRate; } } interface ShippingDetails { address?: Stripe.Address; /** * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ carrier?: string | null; /** * Recipient name. */ name?: string; /** * Recipient phone (including extension). */ phone?: string | null; /** * 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. */ tracking_number?: string | null; } interface ShippingOption { /** * A non-negative integer in cents representing how much to charge. */ shipping_amount: number; /** * The shipping rate. */ shipping_rate: string | Stripe.ShippingRate; } type Status = 'complete' | 'expired' | 'open'; type SubmitType = 'auto' | 'book' | 'donate' | 'pay'; interface TaxIdCollection { /** * Indicates whether tax ID collection is enabled for the session */ enabled: boolean; } interface TotalDetails { /** * This is the sum of all the discounts. */ amount_discount: number; /** * This is the sum of all the shipping amounts. */ amount_shipping: number | null; /** * This is the sum of all the tax amounts. */ amount_tax: number; breakdown?: TotalDetails.Breakdown; } namespace TotalDetails { interface Breakdown { /** * The aggregated discounts. */ discounts: Array; /** * The aggregated tax amounts by rate. */ taxes: Array; } namespace Breakdown { interface Discount { /** * The amount discounted. */ amount: number; /** * A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). * It contains information about when the discount began, when it will end, and what it is applied to. * * Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts). */ discount: Stripe.Discount; } interface Tax { /** * Amount of tax applied for this rate. */ amount: number; /** * Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. * * Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates). */ rate: Stripe.TaxRate; } } } } interface SessionCreateParams { /** * The URL the customer will be directed to if they decide to cancel payment and return to your website. */ cancel_url: string; /** * 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). */ success_url: string; /** * Configure actions after a Checkout Session has expired. */ after_expiration?: SessionCreateParams.AfterExpiration; /** * Enables user redeemable promotion codes. */ allow_promotion_codes?: boolean; /** * Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. */ automatic_tax?: SessionCreateParams.AutomaticTax; /** * Specify whether Checkout should collect the customer's billing address. */ billing_address_collection?: SessionCreateParams.BillingAddressCollection; /** * 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_reference_id?: string; /** * Configure fields for the Checkout Session to gather active consent from customers. */ consent_collection?: SessionCreateParams.ConsentCollection; /** * 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?: string; /** * Display additional text for your customers using custom text. */ custom_text?: SessionCreateParams.CustomText; /** * 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 `payment` or `subscription` 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?: string; /** * 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 create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) * 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_creation?: SessionCreateParams.CustomerCreation; /** * 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_email?: string; /** * Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided. */ customer_update?: SessionCreateParams.CustomerUpdate; /** * The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. */ discounts?: Array; /** * Specifies which fields in the response should be expanded. */ expand?: Array; /** * 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. */ expires_at?: number; /** * 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. */ line_items?: Array; /** * The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. */ locale?: SessionCreateParams.Locale; /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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?: Stripe.MetadataParam; /** * The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item. */ mode?: SessionCreateParams.Mode; /** * A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. */ payment_intent_data?: SessionCreateParams.PaymentIntentData; /** * 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_collection?: SessionCreateParams.PaymentMethodCollection; /** * Payment-method-specific configuration. */ payment_method_options?: SessionCreateParams.PaymentMethodOptions; /** * 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. */ payment_method_types?: Array; /** * 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). */ phone_number_collection?: SessionCreateParams.PhoneNumberCollection; /** * A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. */ setup_intent_data?: SessionCreateParams.SetupIntentData; /** * When set, provides configuration for Checkout to collect a shipping address from a customer. */ shipping_address_collection?: SessionCreateParams.ShippingAddressCollection; /** * The shipping rate options to apply to this Session. */ shipping_options?: Array; /** * [Deprecated] The shipping rate to apply to this Session. Only up to one may be specified. */ shipping_rates?: Array; /** * 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. */ submit_type?: SessionCreateParams.SubmitType; /** * A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. */ subscription_data?: SessionCreateParams.SubscriptionData; /** * Controls tax ID collection settings for the session. */ tax_id_collection?: SessionCreateParams.TaxIdCollection; } namespace SessionCreateParams { interface AfterExpiration { /** * Configure a Checkout Session that can be used to recover an expired session. */ recovery?: AfterExpiration.Recovery; } namespace AfterExpiration { interface Recovery { /** * Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` */ allow_promotion_codes?: boolean; /** * 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. */ enabled: boolean; } } interface AutomaticTax { /** * Set to true to enable automatic taxes. */ enabled: boolean; } type BillingAddressCollection = 'auto' | 'required'; interface ConsentCollection { /** * 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. */ promotions?: ConsentCollection.Promotions; /** * 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). */ terms_of_service?: ConsentCollection.TermsOfService; } namespace ConsentCollection { type Promotions = 'auto' | 'none'; type TermsOfService = 'none' | 'required'; } type CustomerCreation = 'always' | 'if_required'; interface CustomerUpdate { /** * Describes whether Checkout saves the billing address onto `customer.address`. * To always collect a full billing address, use `billing_address_collection`. Defaults to `never`. */ address?: CustomerUpdate.Address; /** * Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`. */ name?: CustomerUpdate.Name; /** * Describes whether Checkout saves shipping information onto `customer.shipping`. * To collect shipping information, use `shipping_address_collection`. Defaults to `never`. */ shipping?: CustomerUpdate.Shipping; } namespace CustomerUpdate { type Address = 'auto' | 'never'; type Name = 'auto' | 'never'; type Shipping = 'auto' | 'never'; } interface CustomText { /** * Custom text that should be displayed alongside shipping address collection. */ shipping_address?: Stripe.Emptyable; /** * Custom text that should be displayed alongside the payment confirmation button. */ submit?: Stripe.Emptyable; } namespace CustomText { interface ShippingAddress { /** * Text may be up to 500 characters in length. */ message: string; } interface Submit { /** * Text may be up to 500 characters in length. */ message: string; } } interface Discount { /** * The ID of the coupon to apply to this Session. */ coupon?: string; /** * The ID of a promotion code to apply to this Session. */ promotion_code?: string; } interface LineItem { /** * When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout. */ adjustable_quantity?: LineItem.AdjustableQuantity; /** * 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. */ dynamic_tax_rates?: Array; /** * 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?: string; /** * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. */ price_data?: LineItem.PriceData; /** * The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`. */ quantity?: number; /** * The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. */ tax_rates?: Array; } namespace LineItem { interface AdjustableQuantity { /** * 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. */ enabled: boolean; /** * 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. */ maximum?: number; /** * The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. */ minimum?: number; } interface PriceData { /** * 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: string; /** * The ID of the product that this price will belong to. One of `product` or `product_data` is required. */ product?: string; /** * Data used to generate a new product object inline. One of `product` or `product_data` is required. */ product_data?: PriceData.ProductData; /** * The recurring components of a price such as `interval` and `interval_count`. */ recurring?: PriceData.Recurring; /** * 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_behavior?: PriceData.TaxBehavior; /** * 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?: number; /** * 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. */ unit_amount_decimal?: string; } namespace PriceData { interface ProductData { /** * 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. */ description?: string; /** * A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ images?: Array; /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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?: Stripe.MetadataParam; /** * The product's name, meant to be displayable to the customer. */ name: string; /** * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ tax_code?: string; } interface Recurring { /** * Specifies billing frequency. Either `day`, `week`, `month` or `year`. */ interval: Recurring.Interval; /** * 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). */ interval_count?: number; } namespace Recurring { type Interval = 'day' | 'month' | 'week' | 'year'; } type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified'; } } type Locale = | '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'; type Mode = 'payment' | 'setup' | 'subscription'; interface PaymentIntentData { /** * 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). */ application_fee_amount?: number; /** * Controls when the funds will be captured from the customer's account. */ capture_method?: PaymentIntentData.CaptureMethod; /** * An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string; /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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?: Stripe.MetadataParam; /** * 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). */ on_behalf_of?: string; /** * 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). */ receipt_email?: string; /** * 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. */ setup_future_usage?: PaymentIntentData.SetupFutureUsage; /** * Shipping information for this payment. */ shipping?: PaymentIntentData.Shipping; /** * Extra information about the payment. This will appear on your * customer's statement when this payment succeeds in creating a charge. */ statement_descriptor?: string; /** * 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. */ statement_descriptor_suffix?: string; /** * 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_data?: PaymentIntentData.TransferData; /** * A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ transfer_group?: string; } namespace PaymentIntentData { type CaptureMethod = 'automatic' | 'manual'; type SetupFutureUsage = 'off_session' | 'on_session'; interface Shipping { /** * Shipping address. */ address: Stripe.ShippingAddressParam; /** * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ carrier?: string; /** * Recipient name. */ name: string; /** * Recipient phone (including extension). */ phone?: string; /** * 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. */ tracking_number?: string; } interface TransferData { /** * The amount that will be transferred automatically when a charge succeeds. */ amount?: number; /** * 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. */ destination: string; } } type PaymentMethodCollection = 'always' | 'if_required'; interface PaymentMethodOptions { /** * contains details about the ACSS Debit payment method options. */ acss_debit?: PaymentMethodOptions.AcssDebit; /** * contains details about the Affirm payment method options. */ affirm?: PaymentMethodOptions.Affirm; /** * contains details about the Afterpay Clearpay payment method options. */ afterpay_clearpay?: PaymentMethodOptions.AfterpayClearpay; /** * contains details about the Alipay payment method options. */ alipay?: PaymentMethodOptions.Alipay; /** * contains details about the AU Becs Debit payment method options. */ au_becs_debit?: PaymentMethodOptions.AuBecsDebit; /** * contains details about the Bacs Debit payment method options. */ bacs_debit?: PaymentMethodOptions.BacsDebit; /** * contains details about the Bancontact payment method options. */ bancontact?: PaymentMethodOptions.Bancontact; /** * contains details about the Boleto payment method options. */ boleto?: PaymentMethodOptions.Boleto; /** * contains details about the Card payment method options. */ card?: PaymentMethodOptions.Card; /** * contains details about the Customer Balance payment method options. */ customer_balance?: PaymentMethodOptions.CustomerBalance; /** * contains details about the EPS payment method options. */ eps?: PaymentMethodOptions.Eps; /** * contains details about the FPX payment method options. */ fpx?: PaymentMethodOptions.Fpx; /** * contains details about the Giropay payment method options. */ giropay?: PaymentMethodOptions.Giropay; /** * contains details about the Grabpay payment method options. */ grabpay?: PaymentMethodOptions.Grabpay; /** * contains details about the Ideal payment method options. */ ideal?: PaymentMethodOptions.Ideal; /** * contains details about the Klarna payment method options. */ klarna?: PaymentMethodOptions.Klarna; /** * contains details about the Konbini payment method options. */ konbini?: PaymentMethodOptions.Konbini; /** * contains details about the OXXO payment method options. */ oxxo?: PaymentMethodOptions.Oxxo; /** * contains details about the P24 payment method options. */ p24?: PaymentMethodOptions.P24; /** * contains details about the PayNow payment method options. */ paynow?: PaymentMethodOptions.Paynow; /** * contains details about the Pix payment method options. */ pix?: PaymentMethodOptions.Pix; /** * contains details about the Sepa Debit payment method options. */ sepa_debit?: PaymentMethodOptions.SepaDebit; /** * contains details about the Sofort payment method options. */ sofort?: PaymentMethodOptions.Sofort; /** * contains details about the Us Bank Account payment method options. */ us_bank_account?: PaymentMethodOptions.UsBankAccount; /** * contains details about the WeChat Pay payment method options. */ wechat_pay?: PaymentMethodOptions.WechatPay; } namespace PaymentMethodOptions { interface AcssDebit { /** * 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. */ currency?: AcssDebit.Currency; /** * Additional fields for Mandate creation */ mandate_options?: AcssDebit.MandateOptions; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: AcssDebit.SetupFutureUsage; /** * Verification method for the intent */ verification_method?: AcssDebit.VerificationMethod; } namespace AcssDebit { type Currency = 'cad' | 'usd'; interface MandateOptions { /** * 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. */ custom_mandate_url?: Stripe.Emptyable; /** * List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode. */ default_for?: Array; /** * Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. */ interval_description?: string; /** * Payment schedule for the mandate. */ payment_schedule?: MandateOptions.PaymentSchedule; /** * Transaction type of the mandate. */ transaction_type?: MandateOptions.TransactionType; } namespace MandateOptions { type DefaultFor = 'invoice' | 'subscription'; type PaymentSchedule = 'combined' | 'interval' | 'sporadic'; type TransactionType = 'business' | 'personal'; } type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; type VerificationMethod = 'automatic' | 'instant' | 'microdeposits'; } interface Affirm { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface AfterpayClearpay { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Alipay { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface AuBecsDebit { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface BacsDebit { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: BacsDebit.SetupFutureUsage; } namespace BacsDebit { type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; } interface Bancontact { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Boleto { /** * 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. */ expires_after_days?: number; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: Boleto.SetupFutureUsage; } namespace Boleto { type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; } interface Card { /** * Installment options for card payments */ installments?: Card.Installments; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: Card.SetupFutureUsage; /** * 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_kana?: string; /** * 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. */ statement_descriptor_suffix_kanji?: string; } namespace Card { interface Installments { /** * Setting to true enables installments for this Checkout Session. * Setting to false will prevent any installment plan from applying to a payment. */ enabled?: boolean; } type SetupFutureUsage = 'off_session' | 'on_session'; } interface CustomerBalance { /** * Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. */ bank_transfer?: CustomerBalance.BankTransfer; /** * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. */ funding_type?: 'bank_transfer'; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } namespace CustomerBalance { interface BankTransfer { /** * Configuration for eu_bank_transfer funding type. */ eu_bank_transfer?: BankTransfer.EuBankTransfer; /** * 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`. */ requested_address_types?: Array< BankTransfer.RequestedAddressType >; /** * The list of bank transfer types that this PaymentIntent is allowed to use for funding. Permitted values include: `us_bank_account`, `eu_bank_account`, `id_bank_account`, `gb_bank_account`, `jp_bank_account`, `mx_bank_account`, `eu_bank_transfer`, `gb_bank_transfer`, `id_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. */ type: BankTransfer.Type; } namespace BankTransfer { interface EuBankTransfer { /** * The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. */ country: string; } type RequestedAddressType = | 'iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin'; type Type = | 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer'; } } interface Eps { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Fpx { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Giropay { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Grabpay { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Ideal { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Klarna { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Konbini { /** * 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_after_days?: number; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Oxxo { /** * 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. */ expires_after_days?: number; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface P24 { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; /** * Confirm that the payer has accepted the P24 terms and conditions. */ tos_shown_and_accepted?: boolean; } interface Paynow { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface Pix { /** * The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. */ expires_after_seconds?: number; } interface SepaDebit { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: SepaDebit.SetupFutureUsage; } namespace SepaDebit { type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; } interface Sofort { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } interface UsBankAccount { /** * Additional fields for Financial Connections Session creation */ financial_connections?: UsBankAccount.FinancialConnections; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: UsBankAccount.SetupFutureUsage; /** * Verification method for the intent */ verification_method?: UsBankAccount.VerificationMethod; } namespace UsBankAccount { interface FinancialConnections { /** * 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`. */ permissions?: Array; } namespace FinancialConnections { type Permission = | 'balances' | 'ownership' | 'payment_method' | 'transactions'; } type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; type VerificationMethod = 'automatic' | 'instant'; } interface WechatPay { /** * The app ID registered with WeChat Pay. Only required when client is ios or android. */ app_id?: string; /** * The client type that the end customer will pay from */ client: WechatPay.Client; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer 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). */ setup_future_usage?: 'none'; } namespace WechatPay { type Client = 'android' | 'ios' | 'web'; } } type PaymentMethodType = | 'acss_debit' | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'blik' | 'boleto' | 'card' | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'klarna' | 'konbini' | 'oxxo' | 'p24' | 'paynow' | 'pix' | 'promptpay' | 'sepa_debit' | 'sofort' | 'us_bank_account' | 'wechat_pay'; interface PhoneNumberCollection { /** * Set to `true` to enable phone number collection. */ enabled: boolean; } interface SetupIntentData { /** * An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string; /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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?: Stripe.MetadataParam; /** * The Stripe account for which the setup is intended. */ on_behalf_of?: string; } interface ShippingAddressCollection { /** * 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`. */ allowed_countries: Array; } namespace ShippingAddressCollection { type AllowedCountry = | 'AC' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CV' | 'CW' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SZ' | 'TA' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VN' | 'VU' | 'WF' | 'WS' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW' | 'ZZ'; } interface ShippingOption { /** * The ID of the Shipping Rate to use for this shipping option. */ shipping_rate?: string; /** * Parameters to be passed to Shipping Rate creation for this shipping option */ shipping_rate_data?: ShippingOption.ShippingRateData; } namespace ShippingOption { interface ShippingRateData { /** * The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. */ delivery_estimate?: ShippingRateData.DeliveryEstimate; /** * The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ display_name: string; /** * Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. */ fixed_amount?: ShippingRateData.FixedAmount; /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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?: Stripe.MetadataParam; /** * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. */ tax_behavior?: ShippingRateData.TaxBehavior; /** * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ tax_code?: string; /** * The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. */ type?: 'fixed_amount'; } namespace ShippingRateData { interface DeliveryEstimate { /** * The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. */ maximum?: DeliveryEstimate.Maximum; /** * The lower bound of the estimated range. If empty, represents no lower bound. */ minimum?: DeliveryEstimate.Minimum; } namespace DeliveryEstimate { interface Maximum { /** * A unit of time. */ unit: Maximum.Unit; /** * Must be greater than 0. */ value: number; } namespace Maximum { type Unit = 'business_day' | 'day' | 'hour' | 'month' | 'week'; } interface Minimum { /** * A unit of time. */ unit: Minimum.Unit; /** * Must be greater than 0. */ value: number; } namespace Minimum { type Unit = 'business_day' | 'day' | 'hour' | 'month' | 'week'; } } interface FixedAmount { /** * A non-negative integer in cents representing how much to charge. */ amount: number; /** * 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: string; /** * 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). */ currency_options?: { [key: string]: FixedAmount.CurrencyOptions; }; } namespace FixedAmount { interface CurrencyOptions { /** * A non-negative integer in cents representing how much to charge. */ amount: number; /** * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. */ tax_behavior?: CurrencyOptions.TaxBehavior; } namespace CurrencyOptions { type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified'; } } type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified'; } } type SubmitType = 'auto' | 'book' | 'donate' | 'pay'; interface SubscriptionData { /** * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal 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). */ application_fee_percent?: number; /** * 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. */ coupon?: string; /** * 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. */ default_tax_rates?: Array; /** * 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 hosted surfaces. */ description?: string; /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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?: Stripe.MetadataParam; /** * The account on behalf of which to charge, for each of the subscription's invoices. */ on_behalf_of?: string; /** * 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. */ transfer_data?: SubscriptionData.TransferData; /** * 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_end?: number; /** * Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` on `subscription_data` is preferred. Defaults to `false`. */ trial_from_plan?: boolean; /** * Integer representing the number of trial period days before the * customer is charged for the first time. Has to be at least 1. */ trial_period_days?: number; } namespace SubscriptionData { interface TransferData { /** * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination. */ amount_percent?: number; /** * ID of an existing, connected Stripe account. */ destination: string; } } interface TaxIdCollection { /** * Set to true to enable Tax ID collection. */ enabled: boolean; } } interface SessionRetrieveParams { /** * Specifies which fields in the response should be expanded. */ expand?: Array; } interface SessionListParams extends PaginationParams { /** * Only return the Checkout Sessions for the Customer specified. */ customer?: string; /** * Only return the Checkout Sessions for the Customer details specified. */ customer_details?: SessionListParams.CustomerDetails; /** * Specifies which fields in the response should be expanded. */ expand?: Array; /** * Only return the Checkout Session for the PaymentIntent specified. */ payment_intent?: string; /** * Only return the Checkout Session for the subscription specified. */ subscription?: string; } namespace SessionListParams { interface CustomerDetails { /** * Customer's email address. */ email: string; } } interface SessionExpireParams { /** * Specifies which fields in the response should be expanded. */ expand?: Array; } interface SessionListLineItemsParams extends PaginationParams { /** * Specifies which fields in the response should be expanded. */ expand?: Array; } class SessionsResource { /** * Creates a Session object. */ create( params: SessionCreateParams, options?: RequestOptions ): Promise>; /** * Retrieves a Session object. */ retrieve( id: string, params?: SessionRetrieveParams, options?: RequestOptions ): Promise>; retrieve( id: string, options?: RequestOptions ): Promise>; /** * Returns a list of Checkout Sessions. */ list( params?: SessionListParams, options?: RequestOptions ): ApiListPromise; list(options?: RequestOptions): ApiListPromise; /** * A Session can be expired when it is in one of these statuses: open * * After it expires, a customer can't complete a Session and customers loading the Session see a message saying the Session is expired. */ expire( id: string, params?: SessionExpireParams, options?: RequestOptions ): Promise>; expire( id: string, options?: RequestOptions ): Promise>; /** * When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. */ listLineItems( id: string, params?: SessionListLineItemsParams, options?: RequestOptions ): ApiListPromise; listLineItems( id: string, options?: RequestOptions ): ApiListPromise; } } } }