UNPKG

expresspayments

Version:
1,041 lines (861 loc) 89 kB
// File generated from our OpenAPI spec declare module 'expresspayments' { namespace ExpressPayments { namespace Checkout { /** * A Checkout Session represents your customer's session as they pay for * one-time purchases or subscriptions through [Checkout](https://docs.epayments.network/payments/checkout) * or [Payment Links](https://docs.epayments.network/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://docs.epayments.network/api/customers), and either the successful * [PaymentIntent](https://docs.epayments.network/api/payment_intents) or an active * [Subscription](https://docs.epayments.network/api/subscriptions). * * You can create a Checkout Session on your server and redirect to its URL * to begin Checkout. * * Related guide: [Checkout quickstart](https://docs.epayments.network/checkout/quickstart) */ interface Session { /** * Unique identifier for the object. */ 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; /** * If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. */ cancel_url: string | null; /** * 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://docs.epayments.network/currencies). */ currency: string | null; /** * Currency conversion details for automatic currency conversion sessions */ currency_conversion: Session.CurrencyConversion | null; /** * Collect additional information from your customer using custom fields. Up to 2 fields are supported. */ custom_fields: Array<Session.CustomField>; 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 | ExpressPayments.Customer | ExpressPayments.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; /** * ID of the invoice created by the Checkout Session, if it exists. */ invoice: string | ExpressPayments.Invoice | null; /** * Details on the state of invoice creation for the Checkout Session. */ invoice_creation: Session.InvoiceCreation | null; /** * The line items purchased by the customer. */ line_items?: ApiList<ExpressPayments.LineItem>; /** * 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://docs.epayments.network/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: ExpressPayments.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 | ExpressPayments.PaymentIntent | null; /** * The ID of the Payment Link that created this Session. */ payment_link: string | ExpressPayments.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<string>; /** * 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 | ExpressPayments.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<Session.ShippingOption>; /** * 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 | ExpressPayments.Subscription | null; /** * The URL the customer will be directed to after the payment or * subscription creation is successful. */ success_url: string | null; 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://docs.epayments.network/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it'll use `checkout.epayments.network` or our country-specific domain for your account location. This value is only present when the session is active. * 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'; } interface CurrencyConversion { /** * Total of all items in source currency before discounts or taxes are applied. */ amount_subtotal: number; /** * Total of all items in source currency after discounts and taxes are applied. */ amount_total: number; /** * Exchange rate used to convert source currency amounts to customer currency amounts */ fx_rate: string; /** * Creation currency of the CheckoutSession before localization */ source_currency: string; } 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: ExpressPayments.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<CustomerDetails.TaxId> | 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 CustomField { /** * Configuration for `type=dropdown` fields. */ dropdown: CustomField.Dropdown | null; /** * String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. */ key: string; label: CustomField.Label; /** * Configuration for `type=numeric` fields. */ numeric: CustomField.Numeric | null; /** * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. */ optional: boolean; /** * Configuration for `type=text` fields. */ text: CustomField.Text | null; /** * The type of the field. */ type: CustomField.Type; } namespace CustomField { interface Dropdown { /** * The options available for the customer to select. Up to 200 options allowed. */ options: Array<Dropdown.Option>; /** * The option selected by the customer. This will be the `value` for the option. */ value: string | null; } namespace Dropdown { interface Option { /** * The label for the option, displayed to the customer. Up to 100 characters. */ label: string; /** * The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. */ value: string; } } interface Label { /** * Custom text for the label, displayed to the customer. Up to 50 characters. */ custom: string | null; /** * The type of the label. */ type: 'custom'; } interface Numeric { /** * The maximum character length constraint for the customer's input. */ maximum_length: number | null; /** * The minimum character length requirement for the customer's input. */ minimum_length: number | null; /** * The value entered by the customer, containing only digits. */ value: string | null; } interface Text { /** * The maximum character length constraint for the customer's input. */ maximum_length: number | null; /** * The minimum character length requirement for the customer's input. */ minimum_length: number | null; /** * The value entered by the customer. */ value: string | null; } type Type = 'dropdown' | 'numeric' | 'text'; } 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 1000 characters in length. */ message: string; } interface Submit { /** * Text may be up to 1000 characters in length. */ message: string; } } interface InvoiceCreation { /** * Indicates whether invoice creation is enabled for the Checkout Session. */ enabled: boolean; invoice_data: InvoiceCreation.InvoiceData; } namespace InvoiceCreation { interface InvoiceData { /** * The account tax IDs associated with the invoice. */ account_tax_ids: Array< | string | ExpressPayments.TaxId | ExpressPayments.DeletedTaxId > | null; /** * Custom fields displayed on the invoice. */ custom_fields: Array<InvoiceData.CustomField> | null; /** * An arbitrary string attached to the object. Often useful for displaying to users. */ description: string | null; /** * Footer displayed on the invoice. */ footer: string | null; /** * Set of [key-value pairs](https://docs.epayments.network/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: ExpressPayments.Metadata | null; /** * Options for invoice PDF rendering. */ rendering_options: InvoiceData.RenderingOptions | null; } namespace InvoiceData { interface CustomField { /** * The name of the custom field. */ name: string; /** * The value of the custom field. */ value: string; } interface RenderingOptions { /** * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. */ amount_tax_display: string | null; } } } 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; cashapp?: PaymentMethodOptions.Cashapp; 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; link?: PaymentMethodOptions.Link; 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://docs.epayments.network/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://docs.epayments.network/api/payment_methods/attach) to a Customer after the transaction completes. * * When processing card payments, ExpressPayments also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://docs.epayments.network/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 ExpressPayments products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. */ default_for?: Array<MandateOptions.DefaultFor>; /** * 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://docs.epayments.network/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://docs.epayments.network/api/payment_methods/attach) to a Customer after the transaction completes. * * When processing card payments, ExpressPayments also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://docs.epayments.network/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://docs.epayments.network/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://docs.epayments.network/api/payment_methods/attach) to a Customer after the transaction completes. * * When processing card payments, ExpressPayments also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://docs.epayments.network/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://docs.epayments.network/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://docs.epayments.network/api/payment_methods/attach) to a Customer after the transaction completes. * * When processing card payments, ExpressPayments also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://docs.epayments.network/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://docs.epayments.network/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://docs.epayments.network/api/payment_methods/attach) to a Customer after the transaction completes. * * When processing card payments, ExpressPayments also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://docs.epayments.network/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://docs.epayments.network/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://docs.epayments.network/api/payment_methods/attach) to a Customer after the transaction completes. * * When processing card payments, ExpressPayments also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://docs.epayments.network/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://docs.epayments.network/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://docs.epayments.network/api/payment_methods/attach) to a Customer after the transaction completes. * * When processing card payments, ExpressPayments also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://docs.epayments.network/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://docs.epayments.network/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://docs.epayments.network/api/payment_methods/attach) to a Customer after the transaction completes. * * When processing card payments, ExpressPayments also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://docs.epayments.network/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://docs.epayments.network/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://docs.epayments.network/api/payment_methods/attach) to a Customer after the transaction completes. * * When processing card payments, ExpressPayments also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://docs.epayments.network/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 Cashapp { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * * Providing this parameter will [attach the payment method](https://docs.epayments.network/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://docs.epayments.network/api/payment_methods/attach) to a Customer after the transaction completes. * * When processing card payments, ExpressPayments also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://docs.epayments.network/strong-customer-authentication). */ setup_future_usage?: 'none'; } 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://docs.epayments.network/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://docs.epayments.network/api/payment_methods/attach) to a Customer after the transaction completes. * * When processing card payments, ExpressPayments also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://docs.epayments.network/strong-customer-authentication). */