import {z} from 'zod' export type Currency = 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL'; export type RoutableConnectors = 'absa_sanlam' | 'authipay' | 'adyenplatform' | 'stripe_billing_test' | 'phonypay' | 'fauxpay' | 'pretendpay' | 'stripe_test' | 'adyen_test' | 'checkout_test' | 'paypal_test' | 'aci' | 'adyen' | 'affirm' | 'airwallex' | 'amazonpay' | 'archipel' | 'authorizedotnet' | 'bankofamerica' | 'barclaycard' | 'billwerk' | 'bitpay' | 'bambora' | 'blackhawknetwork' | 'bamboraapac' | 'bluesnap' | 'calida' | 'boku' | 'braintree' | 'breadpay' | 'cashtocode' | 'celero' | 'chargebee' | 'custombilling' | 'checkbook' | 'checkout' | 'coinbase' | 'coingate' | 'cryptopay' | 'cybersource' | 'cybersourcedecisionmanager' | 'datatrans' | 'deutschebank' | 'digitalvirgo' | 'dlocal' | 'dwolla' | 'ebanx' | 'elavon' | 'envoy' | 'facilitapay' | 'finix' | 'fiserv' | 'fiservemea' | 'fiservcommercehub' | 'fiuu' | 'flexiti' | 'forte' | 'getnet' | 'gigadat' | 'givepayments' | 'globalpay' | 'globepay' | 'gocardless' | 'hipay' | 'helcim' | 'hyperpg' | 'iatapay' | 'imerchantsolutions' | 'inespay' | 'interpayments' | 'itaubank' | 'jpmorgan' | 'klarna' | 'loonio' | 'mifinity' | 'mollie' | 'moneris' | 'multisafepay' | 'nexinets' | 'nexixpay' | 'nmi' | 'nomupay' | 'noon' | 'nordea' | 'novalnet' | 'nuvei' | 'opennode' | 'paybox' | 'payme' | 'payload' | 'payone' | 'paypal' | 'paysafe' | 'paystack' | 'paytm' | 'payconex' | 'payu' | 'peachpayments' | 'payjustnow' | 'payjustnowinstore' | 'phonepe' | 'placetopay' | 'powertranz' | 'prophetpay' | 'rapyd' | 'razorpay' | 'recurly' | 'redsys' | 'revolv3' | 'riskified' | 'santander' | 'shift4' | 'signifyd' | 'silverflow' | 'square' | 'stax' | 'stripe' | 'stripebilling' | 'tesouro' | 'truelayer' | 'trustly' | 'trustpay' | 'trustpayments' | 'tokenio' | 'tsys' | 'tsys_transit' | 'volt' | 'wellsfargo' | 'wise' | 'worldline' | 'worldpay' | 'worldpaymodular' | 'worldpayvantiv' | 'worldpayxml' | 'xendit' | 'zen' | 'zift' | 'plaid' | 'zsl' | 'juspaythreedsserver' | 'ctp_mastercard' | 'ctp_visa' | 'netcetera' | 'cardinal' | 'threedsecureio'; export type RoutableConnectorChoice = {connector: RoutableConnectors, merchant_connector_id?: (string | null) | undefined}; export type ConnectorVolumeSplit = {connector: RoutableConnectorChoice, split: number}; export type StraightThroughAlgorithm = {type: 'single', data: RoutableConnectorChoice} | {type: 'priority', data: Array} | {type: 'volume_split', data: Array}; export type Connector = 'absa_sanlam' | 'authipay' | 'adyenplatform' | 'stripe_billing_test' | 'phonypay' | 'fauxpay' | 'pretendpay' | 'stripe_test' | 'adyen_test' | 'checkout_test' | 'paypal_test' | 'aci' | 'adyen' | 'affirm' | 'airwallex' | 'amazonpay' | 'archipel' | 'authorizedotnet' | 'bambora' | 'bamboraapac' | 'bankofamerica' | 'barclaycard' | 'billwerk' | 'bitpay' | 'bluesnap' | 'blackhawknetwork' | 'calida' | 'boku' | 'braintree' | 'breadpay' | 'cardinal' | 'cashtocode' | 'celero' | 'chargebee' | 'checkbook' | 'checkout' | 'coinbase' | 'coingate' | 'custombilling' | 'cryptopay' | 'ctp_mastercard' | 'ctp_visa' | 'cybersource' | 'cybersourcedecisionmanager' | 'datatrans' | 'deutschebank' | 'digitalvirgo' | 'dlocal' | 'dwolla' | 'ebanx' | 'envoy' | 'elavon' | 'facilitapay' | 'finix' | 'fiserv' | 'fiservemea' | 'fiservcommercehub' | 'fiuu' | 'flexiti' | 'forte' | 'getnet' | 'gigadat' | 'givepayments' | 'globalpay' | 'globepay' | 'gocardless' | 'gpayments' | 'hipay' | 'helcim' | 'hyperpg' | 'hyperswitch_vault' | 'interpayments' | 'inespay' | 'iatapay' | 'imerchantsolutions' | 'itaubank' | 'jpmorgan' | 'juspaythreedsserver' | 'klarna' | 'loonio' | 'mifinity' | 'mollie' | 'moneris' | 'multisafepay' | 'netcetera' | 'nexinets' | 'nexixpay' | 'nmi' | 'nomupay' | 'noon' | 'nordea' | 'novalnet' | 'nuvei' | 'opennode' | 'paybox' | 'payload' | 'payme' | 'payone' | 'paypal' | 'paysafe' | 'paystack' | 'paytm' | 'payconex' | 'payu' | 'peachpayments' | 'payjustnow' | 'payjustnowinstore' | 'phonepe' | 'placetopay' | 'powertranz' | 'prophetpay' | 'rapyd' | 'razorpay' | 'recurly' | 'redsys' | 'revolv3' | 'santander' | 'shift4' | 'silverflow' | 'square' | 'stax' | 'stripe' | 'stripebilling' | 'taxjar' | 'threedsecureio' | 'tesouro' | 'tokenex' | 'tokenio' | 'trustly' | 'truelayer' | 'trustpay' | 'trustpayments' | 'tsys' | 'tsys_transit' | 'vgs' | 'volt' | 'wellsfargo' | 'wise' | 'worldline' | 'worldpay' | 'worldpayvantiv' | 'worldpayxml' | 'worldpaymodular' | 'signifyd' | 'plaid' | 'riskified' | 'xendit' | 'zen' | 'zift' | 'zsl'; export type CaptureMethod = 'automatic' | 'manual' | 'manual_multiple' | 'scheduled' | 'sequential_automatic'; export type AuthenticationType = 'three_ds' | 'no_three_ds'; export type CountryAlpha2 = 'AF' | 'AX' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BQ' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CW' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GG' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IM' | 'IL' | 'IT' | 'JM' | 'JP' | 'JE' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MK' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'ME' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MP' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'BL' | 'SH' | 'KN' | 'LC' | 'MF' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'RS' | 'SC' | 'SL' | 'SG' | 'SX' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'SS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SZ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' | 'US'; export type AddressDetails = {city?: (string | null) | undefined, country?: (CountryAlpha2 | null) | undefined, line1?: (string | null) | undefined, line2?: (string | null) | undefined, line3?: (string | null) | undefined, zip?: (string | null) | undefined, state?: (string | null) | undefined, first_name?: (string | null) | undefined, last_name?: (string | null) | undefined, origin_zip?: (string | null) | undefined}; export type PhoneDetails = {number?: (string | null) | undefined, country_code?: (string | null) | undefined}; export type Address = {address?: (AddressDetails | null) | undefined, phone?: (PhoneDetails | null) | undefined, email?: (string | null) | undefined}; export type DocumentKind = 'cpf' | 'cnpj' | 'psn' | 'other'; export type CustomerDocumentDetails = {document_type: DocumentKind, document_number: string}; export type CustomerDetails = {id?: (string | null) | undefined, name?: (string | null) | undefined, email?: (string | null) | undefined, phone?: (string | null) | undefined, phone_country_code?: (string | null) | undefined, tax_registration_id?: (string | null) | undefined, document_details?: (CustomerDocumentDetails | null) | undefined}; export type FutureUsage = 'off_session' | 'on_session'; export type CardNetwork = 'Visa' | 'Mastercard' | 'AmericanExpress' | 'JCB' | 'DinersClub' | 'Discover' | 'CartesBancaires' | 'UnionPay' | 'Interac' | 'RuPay' | 'Maestro' | 'Star' | 'Pulse' | 'Accel' | 'Nyce' | 'Prop' | 'PrivateLabel' | 'Dinacard'; export type Card = {card_number: string, card_exp_month: string, card_exp_year: string, card_holder_name: string, card_cvc: string, card_issuer?: (string | null) | undefined, card_network?: (CardNetwork | null) | undefined, card_type?: (string | null) | undefined, card_issuing_country?: (string | null) | undefined, card_issuing_country_code?: (string | null) | undefined, bank_code?: (string | null) | undefined, nick_name?: (string | null) | undefined}; export type CardWithNoCVC = {card_number: string, card_exp_month: string, card_exp_year: string, card_holder_name: string, card_issuer?: (string | null) | undefined, card_network?: (CardNetwork | null) | undefined, card_type?: (string | null) | undefined, card_issuing_country?: (string | null) | undefined, card_issuing_country_code?: (string | null) | undefined, bank_code?: (string | null) | undefined, nick_name?: (string | null) | undefined}; export type CardRedirectData = {knet: Record} | {benefit: Record} | {momo_atm: Record} | {card_redirect: Record}; export type AliPayHkRedirection = Record; export type AliPayQr = Record; export type AliPayRedirection = Record; export type AmazonPayWalletData = {checkout_session_id: string}; export type AmazonPayRedirectData = Record; export type ApplePayCryptogramData = {online_payment_cryptogram: string, eci_indicator: string}; export type ApplePayPredecryptData = {application_primary_account_number: string, application_expiration_month: string, application_expiration_year: string, payment_data: ApplePayCryptogramData}; export type ApplePayPaymentData = ApplePayPredecryptData | string; export type ApplepayPaymentMethod = {display_name: string, network: string, type: string, card_exp_month?: (string | null) | undefined, card_exp_year?: (string | null) | undefined, auth_code?: (string | null) | undefined}; export type ApplePayWalletData = {payment_data: ApplePayPaymentData, payment_method: ApplepayPaymentMethod, transaction_identifier: string}; export type ApplePayRedirectData = Record; export type ApplePayThirdPartySdkData = {token?: (string | null) | undefined}; export type CashappQr = Record; export type GcashRedirection = Record; export type GoPayRedirection = Record; export type GooglePayAssuranceDetails = {card_holder_authenticated: boolean, account_verified: boolean}; export type GooglePayCardFundingSource = 'CREDIT' | 'DEBIT' | 'PREPAID' | 'UNKNOWN'; export type GooglePayPaymentMethodInfo = {card_network: string, card_details: string, assurance_details?: (GooglePayAssuranceDetails | null) | undefined, card_funding_source?: (GooglePayCardFundingSource | null) | undefined}; export type GPayPredecryptData = {card_exp_month: string, card_exp_year: string, application_primary_account_number: string, cryptogram: string, eci_indicator: string}; export type GpayEcryptedTokenizationData = {type: string, token: string}; export type GpayTokenizationData = GPayPredecryptData | GpayEcryptedTokenizationData; export type GooglePayWalletData = {type: string, description: string, info: GooglePayPaymentMethodInfo, tokenization_data: GpayTokenizationData}; export type GooglePayRedirectData = Record; export type GooglePayThirdPartySdkData = {token?: (string | null) | undefined}; export type KakaoPayRedirection = Record; export type MbWayRedirection = {telephone_number: string}; export type MifinityData = {date_of_birth: string, language_preference?: (string | null) | undefined}; export type MobilePayRedirection = Record; export type MomoRedirection = Record; export type PaypalRedirection = {email?: (string | null) | undefined}; export type PayPalWalletData = {token: string}; export type PayseraData = Record; export type PazeWalletData = {complete_response: string}; export type RevolutPayData = Record; export type SamsungPayCardBrand = 'visa' | 'mastercard' | 'amex' | 'discover' | 'unknown'; export type SamsungPayTokenData = {type?: (string | null) | undefined, version: string, data: string}; export type SamsungPayWebWalletData = {method?: (string | null) | undefined, recurring_payment?: (boolean | null) | undefined, card_brand: SamsungPayCardBrand, card_last4digits: string, '3_d_s': SamsungPayTokenData}; export type SamsungPayAppWalletData = {'3_d_s': SamsungPayTokenData, payment_card_brand: SamsungPayCardBrand, payment_currency_type: string, payment_last4_dpan?: (string | null) | undefined, payment_last4_fpan: string, merchant_ref?: (string | null) | undefined, method?: (string | null) | undefined, recurring_payment?: (boolean | null) | undefined}; export type SamsungPayWalletCredentials = SamsungPayWebWalletData | SamsungPayAppWalletData; export type SamsungPayWalletData = {payment_credential: SamsungPayWalletCredentials}; export type SkrillData = Record; export type SwishQrData = Record; export type TouchNGoRedirection = Record; export type WeChatPayQr = Record; export type WeChatPayRedirection = Record; export type WalletData = {ali_pay_hk_redirect: AliPayHkRedirection} | {ali_pay_qr: AliPayQr} | {ali_pay_redirect: AliPayRedirection} | {amazon_pay: AmazonPayWalletData} | {amazon_pay_redirect: AmazonPayRedirectData} | {apple_pay: ApplePayWalletData} | {apple_pay_redirect: ApplePayRedirectData} | {apple_pay_third_party_sdk: ApplePayThirdPartySdkData} | {bluecode_redirect: Record} | {cashapp_qr: CashappQr} | {dana_redirect: Record} | {gcash_redirect: GcashRedirection} | {go_pay_redirect: GoPayRedirection} | {google_pay: GooglePayWalletData} | {google_pay_redirect: GooglePayRedirectData} | {google_pay_third_party_sdk: GooglePayThirdPartySdkData} | {kakao_pay_redirect: KakaoPayRedirection} | {mb_way_redirect: MbWayRedirection} | {mifinity: MifinityData} | {mobile_pay_redirect: MobilePayRedirection} | {momo_redirect: MomoRedirection} | {paypal_redirect: PaypalRedirection} | {paypal_sdk: PayPalWalletData} | {paysera: PayseraData} | {paze: PazeWalletData} | {revolut_pay: RevolutPayData} | {samsung_pay: SamsungPayWalletData} | {skrill: SkrillData} | {swish_qr: SwishQrData} | {touch_n_go_redirect: TouchNGoRedirection} | {twint_redirect: Record} | {vipps_redirect: Record} | {we_chat_pay_qr: WeChatPayQr} | {we_chat_pay_redirect: WeChatPayRedirection}; export type PayLaterData = {klarna_redirect: {billing_email?: (string | null) | undefined, billing_country?: (CountryAlpha2 | null) | undefined}} | {klarna_sdk: {token: string}} | {affirm_redirect: Record} | {afterpay_clearpay_redirect: {billing_email?: (string | null) | undefined, billing_name?: (string | null) | undefined}} | {pay_bright_redirect: Record} | {flexiti_redirect: Record} | {walley_redirect: Record} | {alma_redirect: Record} | {atome_redirect: Record} | {breadpay_redirect: Record} | {payjustnow_redirect: Record}; export type BankRedirectBilling = {billing_name: string, email: string}; export type BankNames = 'absa' | 'american_express' | 'affin_bank' | 'agro_bank' | 'alliance_bank' | 'am_bank' | 'bank_of_america' | 'bank_of_china' | 'bank_islam' | 'bank_muamalat' | 'bank_rakyat' | 'bank_simpanan_nasional' | 'barclays' | 'blik_p_s_p' | 'capital_one' | 'chase' | 'citi' | 'cimb_bank' | 'discover' | 'navy_federal_credit_union' | 'pentagon_federal_credit_union' | 'synchrony_bank' | 'wells_fargo' | 'abn_amro' | 'asn_bank' | 'bunq' | 'handelsbanken' | 'hong_leong_bank' | 'hsbc_bank' | 'ing' | 'knab' | 'kuwait_finance_house' | 'moneyou' | 'rabobank' | 'regiobank' | 'revolut' | 'sns_bank' | 'triodos_bank' | 'van_lanschot' | 'arzte_und_apotheker_bank' | 'austrian_anadi_bank_ag' | 'bank_austria' | 'bank99_ag' | 'bankhaus_carl_spangler' | 'bankhaus_schelhammer_und_schattera_ag' | 'bank_millennium' | 'bank_p_e_k_a_o_s_a' | 'bawag_psk_ag' | 'bks_bank_ag' | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' | 'ceska_sporitelna' | 'dolomitenbank' | 'easybank_ag' | 'e_platby_v_u_b' | 'erste_bank_und_sparkassen' | 'friesland_bank' | 'hypo_alpeadriabank_international_ag' | 'hypo_noe_lb_fur_niederosterreich_u_wien' | 'hypo_oberosterreich_salzburg_steiermark' | 'hypo_tirol_bank_ag' | 'hypo_vorarlberg_bank_ag' | 'hypo_bank_burgenland_aktiengesellschaft' | 'komercni_banka' | 'm_bank' | 'marchfelder_bank' | 'maybank' | 'oberbank_ag' | 'osterreichische_arzte_und_apothekerbank' | 'ocbc_bank' | 'pay_with_i_n_g' | 'place_z_i_p_k_o' | 'platnosc_online_karta_platnicza' | 'posojilnica_bank_e_gen' | 'postova_banka' | 'public_bank' | 'raiffeisen_bankengruppe_osterreich' | 'rhb_bank' | 'schelhammer_capital_bank_ag' | 'standard_chartered_bank' | 'schoellerbank_ag' | 'sparda_bank_wien' | 'sporo_pay' | 'santander_przelew24' | 'tatra_pay' | 'viamo' | 'volksbank_gruppe' | 'volkskreditbank_ag' | 'vr_bank_braunau' | 'uob_bank' | 'pay_with_alior_bank' | 'banki_spoldzielcze' | 'pay_with_inteligo' | 'b_n_p_paribas_poland' | 'bank_nowy_s_a' | 'credit_agricole' | 'pay_with_b_o_s' | 'pay_with_citi_handlowy' | 'pay_with_plus_bank' | 'toyota_bank' | 'velo_bank' | 'e_transfer_pocztowy24' | 'plus_bank' | 'etransfer_pocztowy24' | 'banki_spbdzielcze' | 'bank_nowy_bfg_sa' | 'getin_bank' | 'blik' | 'noble_pay' | 'idea_bank' | 'envelo_bank' | 'nest_przelew' | 'mbank_mtransfer' | 'inteligo' | 'pbac_z_ipko' | 'bnp_paribas' | 'bank_pekao_sa' | 'volkswagen_bank' | 'alior_bank' | 'boz' | 'bangkok_bank' | 'krungsri_bank' | 'krung_thai_bank' | 'the_siam_commercial_bank' | 'kasikorn_bank' | 'open_bank_success' | 'open_bank_failure' | 'open_bank_cancelled' | 'aib' | 'bank_of_scotland' | 'danske_bank' | 'first_direct' | 'first_trust' | 'halifax' | 'lloyds' | 'monzo' | 'nat_west' | 'nationwide_bank' | 'royal_bank_of_scotland' | 'starling' | 'tsb_bank' | 'tesco_bank' | 'ulster_bank' | 'yoursafe' | 'n26' | 'nationale_nederlanden'; export type BankRedirectData = {bancontact_card: {card_number: string, card_exp_month: string, card_exp_year: string, card_holder_name: string, billing_details?: (BankRedirectBilling | null) | undefined}} | {bizum: Record} | {blik: {blik_code?: (string | null) | undefined}} | {eps: {billing_details?: (BankRedirectBilling | null) | undefined, bank_name: BankNames, country: CountryAlpha2}} | {giropay: {billing_details?: (BankRedirectBilling | null) | undefined, bank_account_bic?: (string | null) | undefined, bank_account_iban?: (string | null) | undefined, country: CountryAlpha2}} | {ideal: {billing_details?: (BankRedirectBilling | null) | undefined, bank_name: BankNames, country: CountryAlpha2}} | {interac: {country?: (CountryAlpha2 | null) | undefined, email?: (string | null) | undefined}} | {online_banking_czech_republic: {issuer: BankNames}} | {online_banking_finland: {email?: (string | null) | undefined}} | {online_banking_poland: {issuer: BankNames}} | {online_banking_slovakia: {issuer: BankNames}} | {open_banking_uk: {issuer: BankNames, country: CountryAlpha2}} | {przelewy24: {bank_name?: (BankNames | null) | undefined, billing_details?: (BankRedirectBilling | null) | undefined}} | {sofort: {billing_details?: (BankRedirectBilling | null) | undefined, country: CountryAlpha2, preferred_language?: (string | null) | undefined}} | {trustly: {country?: (CountryAlpha2 | null) | undefined}} | {online_banking_fpx: {issuer: BankNames}} | {online_banking_thailand: {issuer: BankNames}} | {local_bank_redirect: Record} | {eft: {provider: string}} | {open_banking: Record}; export type BankDebitBilling = {name?: (string | null) | undefined, email?: (string | null) | undefined, address?: (AddressDetails | null) | undefined}; export type BankType = 'checking' | 'savings'; export type BankDebitData = {ach_bank_debit: {billing_details?: (BankDebitBilling | null) | undefined, account_number: string, routing_number: string, bank_account_holder_name: string, bank_name: string, bank_type: string, bank_holder_type: string}} | {sepa_bank_debit: {billing_details?: (BankDebitBilling | null) | undefined, iban: string, bank_account_holder_name: string}} | {sepa_guarenteed_bank_debit: {billing_details?: (BankDebitBilling | null) | undefined, iban: string, bank_account_holder_name: string}} | {becs_bank_debit: {billing_details?: (BankDebitBilling | null) | undefined, account_number: string, bsb_number: string, bank_account_holder_name?: (string | null) | undefined}} | {bacs_bank_debit: {billing_details?: (BankDebitBilling | null) | undefined, account_number: string, sort_code: string, bank_account_holder_name: string}} | {eft_debit_order: {billing_details?: (BankDebitBilling | null) | undefined, account_number: string, branch_code?: (string | null) | undefined, bank_account_holder_name?: (string | null) | undefined, bank_name?: (BankNames | null) | undefined, bank_type?: (BankType | null) | undefined}}; export type AchBillingDetails = {email?: (string | null) | undefined}; export type SepaAndBacsBillingDetails = {email?: (string | null) | undefined, name?: (string | null) | undefined}; export type MultibancoBillingDetails = {email?: (string | null) | undefined}; export type DokuBillingDetails = {first_name?: (string | null) | undefined, last_name?: (string | null) | undefined, email?: (string | null) | undefined}; export type BankTransferData = {ach_bank_transfer: {billing_details?: (AchBillingDetails | null) | undefined}} | {sepa_bank_transfer: {billing_details?: (SepaAndBacsBillingDetails | null) | undefined, country: CountryAlpha2}} | {bacs_bank_transfer: {billing_details?: (SepaAndBacsBillingDetails | null) | undefined}} | {multibanco_bank_transfer: {billing_details?: (MultibancoBillingDetails | null) | undefined}} | {permata_bank_transfer: {billing_details?: (DokuBillingDetails | null) | undefined}} | {bca_bank_transfer: {billing_details?: (DokuBillingDetails | null) | undefined}} | {bni_va_bank_transfer: {billing_details?: (DokuBillingDetails | null) | undefined}} | {bri_va_bank_transfer: {billing_details?: (DokuBillingDetails | null) | undefined}} | {cimb_va_bank_transfer: {billing_details?: (DokuBillingDetails | null) | undefined}} | {danamon_va_bank_transfer: {billing_details?: (DokuBillingDetails | null) | undefined}} | {mandiri_va_bank_transfer: {billing_details?: (DokuBillingDetails | null) | undefined}} | {pix: {pix_key?: (string | null) | undefined, cpf?: (string | null) | undefined, cnpj?: (string | null) | undefined, source_bank_account_id?: (string | null) | undefined, destination_bank_account_id?: (string | null) | undefined, expiry_date?: (string | null) | undefined}} | {pix_emv: Record} | {pix_qr: Record} | {pix_automatico_qr: Record} | {pix_automatico_push: {account_number?: (string | null) | undefined, branch_code?: (string | null) | undefined, bank_identifier?: (string | null) | undefined}} | {pse: Record} | {local_bank_transfer: {bank_code?: (string | null) | undefined}} | {instant_bank_transfer: Record} | {instant_bank_transfer_finland: Record} | {instant_bank_transfer_poland: Record} | {indonesian_bank_transfer: {bank_name?: (BankNames | null) | undefined}}; export type RealTimePaymentData = {fps: Record} | {duit_now: Record} | {prompt_pay: Record} | {viet_qr: Record} | {qris: Record}; export type CryptoData = {pay_currency?: (string | null) | undefined, network?: (string | null) | undefined}; export type UpiSource = 'UPI_CC' | 'UPI_CL' | 'UPI_ACCOUNT' | 'UPI_CC_CL' | 'UPI_PPI' | 'UPI_VOUCHER'; export type UpiCollectData = {vpa_id?: (string | null) | undefined, upi_source?: (UpiSource | null) | undefined}; export type UpiIntentData = {upi_source?: (UpiSource | null) | undefined, app_name?: (string | null) | undefined}; export type UpiQrData = {upi_source?: (UpiSource | null) | undefined}; export type UpiData = {upi_collect: UpiCollectData} | {upi_intent: UpiIntentData} | {upi_qr: UpiQrData}; export type BoletoVoucherData = {social_security_number?: (string | null) | undefined, bank_number?: (string | null) | undefined, document_type?: (DocumentKind | null) | undefined, fine_percentage?: (string | null) | undefined, fine_quantity_days?: (string | null) | undefined, interest_percentage?: (string | null) | undefined, write_off_quantity_days?: (string | null) | undefined, messages?: (Array | null) | undefined, due_date?: (string | null) | undefined}; export type AlfamartVoucherData = {first_name?: (string | null) | undefined, last_name?: (string | null) | undefined, email?: (string | null) | undefined}; export type IndomaretVoucherData = {first_name?: (string | null) | undefined, last_name?: (string | null) | undefined, email?: (string | null) | undefined}; export type JCSVoucherData = {first_name?: (string | null) | undefined, last_name?: (string | null) | undefined, email?: (string | null) | undefined, phone_number?: (string | null) | undefined}; export type VoucherData = {boleto: BoletoVoucherData} | 'efecty' | 'pago_efectivo' | 'red_compra' | 'red_pagos' | {alfamart: AlfamartVoucherData} | {indomaret: IndomaretVoucherData} | 'oxxo' | {seven_eleven: JCSVoucherData} | {lawson: JCSVoucherData} | {mini_stop: JCSVoucherData} | {family_mart: JCSVoucherData} | {seicomart: JCSVoucherData} | {pay_easy: JCSVoucherData}; export type GiftCardDetails = {number: string, cvc: string}; export type BHNGiftCardDetails = {account_number: string, pin: string, cvv2: string, expiration_date: string}; export type GiftCardData = {givex: GiftCardDetails} | {pay_safe_card: Record} | {bhn_card_network: BHNGiftCardDetails}; export type CardToken = {card_holder_name: string, card_cvc?: (string | null) | undefined, card_cvc_token?: (string | null) | undefined}; export type OpenBankingData = {open_banking_pis: Record}; export type MobilePaymentData = {direct_carrier_billing: {msisdn: string, client_uid?: (string | null) | undefined}}; export type NetworkTokenData = {network_token: string, token_exp_month: string, token_exp_year: string, token_cryptogram: string, card_network?: (CardNetwork | null) | undefined, card_type?: (string | null) | undefined, card_issuing_country?: (string | null) | undefined, bank_code?: (string | null) | undefined, card_holder_name: string, card_issuer?: (string | null) | undefined, nick_name?: (string | null) | undefined, eci?: (string | null) | undefined, par?: (string | null) | undefined}; export type ProxyCardData = {card_number: string, card_exp_month: string, card_exp_year: string, card_holder_name: string, card_cvc: string, card_issuer?: (string | null) | undefined, card_network?: (CardNetwork | null) | undefined, card_type?: (string | null) | undefined, card_issuing_country?: (string | null) | undefined, bank_code?: (string | null) | undefined, nick_name?: (string | null) | undefined, bin_number: string, last_four: string}; export type VaultCardToken = {card_holder_name: string, card_cvc?: (string | null) | undefined}; export type PaymentMethodDataRequest = {card: Card, billing?: (Address | null) | undefined} | null | {card_with_no_cvc: CardWithNoCVC, billing?: (Address | null) | undefined} | null | {card_redirect: CardRedirectData, billing?: (Address | null) | undefined} | null | {wallet: WalletData, billing?: (Address | null) | undefined} | null | {pay_later: PayLaterData, billing?: (Address | null) | undefined} | null | {bank_redirect: BankRedirectData, billing?: (Address | null) | undefined} | null | {bank_debit: BankDebitData, billing?: (Address | null) | undefined} | null | {bank_transfer: BankTransferData, billing?: (Address | null) | undefined} | null | {real_time_payment: RealTimePaymentData, billing?: (Address | null) | undefined} | null | {crypto: CryptoData, billing?: (Address | null) | undefined} | null | {upi: UpiData, billing?: (Address | null) | undefined} | null | {voucher: VoucherData, billing?: (Address | null) | undefined} | null | {gift_card: GiftCardData, billing?: (Address | null) | undefined} | null | {card_token: CardToken, billing?: (Address | null) | undefined} | null | {open_banking: OpenBankingData, billing?: (Address | null) | undefined} | null | {mobile_payment: MobilePaymentData, billing?: (Address | null) | undefined} | null | {network_token: NetworkTokenData, billing?: (Address | null) | undefined} | null | {vault_data_card: ProxyCardData, billing?: (Address | null) | undefined} | null | {vault_card_token_data: VaultCardToken, billing?: (Address | null) | undefined} | null; export type PaymentMethod = 'card' | 'card_redirect' | 'pay_later' | 'wallet' | 'bank_redirect' | 'bank_transfer' | 'crypto' | 'bank_debit' | 'reward' | 'real_time_payment' | 'upi' | 'voucher' | 'gift_card' | 'open_banking' | 'mobile_payment' | 'network_token'; export type ProductType = 'physical' | 'digital' | 'travel' | 'ride' | 'event' | 'accommodation'; export type OrderDetailsWithAmount = {product_name: string, quantity: number, amount: number, tax_rate?: (number | null) | undefined, total_tax_amount?: (number | null) | undefined, requires_shipping?: (boolean | null) | undefined, product_img_link?: (string | null) | undefined, product_id?: (string | null) | undefined, category?: (string | null) | undefined, sub_category?: (string | null) | undefined, brand?: (string | null) | undefined, product_type?: (ProductType | null) | undefined, product_tax_code?: (string | null) | undefined, description?: (string | null) | undefined, sku?: (string | null) | undefined, upc?: (string | null) | undefined, commodity_code?: (string | null) | undefined, unit_of_measure?: (string | null) | undefined, total_amount?: (number | null) | undefined, unit_discount_amount?: (number | null) | undefined}; export type AcceptanceType = 'online' | 'offline'; export type OnlineMandate = {ip_address: string, user_agent: string}; export type CustomerAcceptance = {acceptance_type: AcceptanceType, accepted_at?: (string | null) | undefined, online?: (OnlineMandate | null) | undefined}; export type MandateAmountData = {amount: number, currency: Currency, start_date?: (string | null) | undefined, end_date?: (string | null) | undefined, metadata?: (Record | null) | undefined}; export type MandateType = {single_use: MandateAmountData} | {multi_use: MandateAmountData | null}; export type MandateData = {update_mandate_id?: (string | null) | undefined, customer_acceptance?: (CustomerAcceptance | null) | undefined, mandate_type?: (MandateType | null) | undefined}; export type BrowserInformation = {color_depth?: (number | null) | undefined, java_enabled?: (boolean | null) | undefined, java_script_enabled?: (boolean | null) | undefined, language?: (string | null) | undefined, screen_height?: (number | null) | undefined, screen_width?: (number | null) | undefined, time_zone?: (number | null) | undefined, ip_address?: (string | null) | undefined, accept_header?: (string | null) | undefined, user_agent?: (string | null) | undefined, os_type?: (string | null) | undefined, os_version?: (string | null) | undefined, device_model?: (string | null) | undefined, accept_language?: (string | null) | undefined, referer?: (string | null) | undefined}; export type PaymentExperience = 'redirect_to_url' | 'invoke_sdk_client' | 'display_qr_code' | 'one_click' | 'link_wallet' | 'invoke_payment_app' | 'display_wait_screen' | 'collect_otp'; export type PaymentMethodType = 'ach' | 'affirm' | 'afterpay_clearpay' | 'alfamart' | 'ali_pay' | 'ali_pay_hk' | 'alma' | 'amazon_pay' | 'paysera' | 'apple_pay' | 'atome' | 'bacs' | 'bancontact_card' | 'becs' | 'benefit' | 'bizum' | 'blik' | 'bluecode' | 'boleto' | 'bca_bank_transfer' | 'bni_va' | 'breadpay' | 'bri_va' | 'bhn_card_network' | 'card_redirect' | 'cimb_va' | 'classic' | 'credit' | 'crypto_currency' | 'cashapp' | 'dana' | 'danamon_va' | 'debit' | 'duit_now' | 'efecty' | 'eft' | 'eft_debit_order' | 'eps' | 'flexiti' | 'fps' | 'evoucher' | 'giropay' | 'givex' | 'google_pay' | 'go_pay' | 'gcash' | 'ideal' | 'interac' | 'indomaret' | 'klarna' | 'kakao_pay' | 'local_bank_redirect' | 'mandiri_va' | 'knet' | 'mb_way' | 'mobile_pay' | 'momo' | 'momo_atm' | 'multibanco' | 'online_banking_thailand' | 'online_banking_czech_republic' | 'online_banking_finland' | 'online_banking_fpx' | 'online_banking_poland' | 'online_banking_slovakia' | 'oxxo' | 'pago_efectivo' | 'permata_bank_transfer' | 'open_banking_uk' | 'pay_bright' | 'payjustnow' | 'paypal' | 'paze' | 'pix' | 'pix_key' | 'pix_emv' | 'pix_qr' | 'pix_automatico_qr' | 'pix_automatico_push' | 'pay_safe_card' | 'przelewy24' | 'prompt_pay' | 'pse' | 'qris' | 'red_compra' | 'red_pagos' | 'samsung_pay' | 'sepa' | 'sepa_bank_transfer' | 'sepa_guarenteed_debit' | 'skrill' | 'sofort' | 'swish' | 'touch_n_go' | 'trustly' | 'twint' | 'upi_collect' | 'upi_intent' | 'upi_qr' | 'vipps' | 'viet_qr' | 'venmo' | 'walley' | 'we_chat_pay' | 'seven_eleven' | 'lawson' | 'mini_stop' | 'family_mart' | 'seicomart' | 'pay_easy' | 'local_bank_transfer' | 'mifinity' | 'open_banking_pis' | 'direct_carrier_billing' | 'instant_bank_transfer' | 'instant_bank_transfer_finland' | 'instant_bank_transfer_poland' | 'revolut_pay' | 'indonesian_bank_transfer' | 'open_banking' | 'network_token'; export type MerchantConnectorDetails = {connector_account_details?: (Record | null) | undefined, metadata?: (Record | null) | undefined}; export type MerchantConnectorDetailsWrap = {creds_identifier: string, encoded_data?: (MerchantConnectorDetails | null) | undefined}; export type ApplepayInitiative = 'web' | 'ios'; export type SessionTokenInfo = {payment_processing_certificate: string, payment_processing_certificate_key: string, payment_processing_details_at: 'Hyperswitch', certificate: string, certificate_keys: string, merchant_identifier: string, display_name: string, initiative: ApplepayInitiative, initiative_context?: (string | null) | undefined, merchant_business_country?: (CountryAlpha2 | null) | undefined} | null | {payment_processing_details_at: 'Connector', certificate: string, certificate_keys: string, merchant_identifier: string, display_name: string, initiative: ApplepayInitiative, initiative_context?: (string | null) | undefined, merchant_business_country?: (CountryAlpha2 | null) | undefined} | null; export type ApplepayConnectorMetadataRequest = {session_token_data?: (SessionTokenInfo | null) | undefined}; export type AirwallexData = {payload?: (string | null) | undefined}; export type NoonData = {order_category?: (string | null) | undefined}; export type BraintreeData = {merchant_account_id: string, merchant_config_currency: string}; export type AdyenTestingData = {holder_name: string}; export type AdyenConnectorMetadata = {testing: AdyenTestingData}; export type PeachpaymentsCardOnFileTransactionType = 'one_off' | 'customer_initiated_transaction' | 'merchant_initiated_mandate' | 'merchant_initiated_transaction'; export type PeachpaymentsData = {rrn?: (string | null) | undefined, card_on_file_transaction_type?: (PeachpaymentsCardOnFileTransactionType | null) | undefined}; export type DiscountType = 'standard' | 'fixed_date' | 'daily_calendar' | 'daily_business'; export type DiscountTier = {amount?: (string | null) | undefined, end_date?: (string | null) | undefined}; export type SantanderPaymentDiscountRules = {discount_type?: (DiscountType | null) | undefined, tiers: Array}; export type PenaltyDetail = {value?: (string | null) | undefined, grace_period_days?: (number | null) | undefined}; export type InterestDetail = {interest_percentage?: (string | null) | undefined, iof_percentage?: (string | null) | undefined}; export type PenaltyRules = {fixed_penalty?: (PenaltyDetail | null) | undefined, interest?: (InterestDetail | null) | undefined}; export type ProtestType = 'disabled' | 'calendar_days' | 'business_days' | 'contract_default'; export type ProtestRules = {protest_type: ProtestType, days_after_due_date: number}; export type CollectionActions = {legal_protest?: (ProtestRules | null) | undefined, auto_write_off_days?: (number | null) | undefined}; export type CalculationType = 'percentage' | 'flat_amount'; export type FlexibleAmountDetails = {min_value?: (string | null) | undefined, max_value?: (string | null) | undefined, value_type?: (CalculationType | null) | undefined}; export type InstallmentDetails = {max_partial_payments?: (number | null) | undefined, value_type?: (CalculationType | null) | undefined}; export type BoletoPaymentTypeConstraints = {type: 'fixed_amount'} | {type: 'flexible_amount', details: FlexibleAmountDetails} | {type: 'installment', details: InstallmentDetails}; export type BeneficiaryDetails = {name?: (string | null) | undefined, document_number?: (string | null) | undefined, document_type?: (DocumentKind | null) | undefined}; export type BoletoDocumentKind = 'commercial_invoice' | 'service_invoice' | 'promissory_note' | 'rural_promissory_note' | 'receipt' | 'insurance_policy' | 'credit_card_invoice' | 'proposal' | 'deposit_or_funding' | 'cheque' | 'direct_promissory_note' | 'other'; export type SantanderBoletoData = {discount_rules?: (SantanderPaymentDiscountRules | null) | undefined, penalties?: (PenaltyRules | null) | undefined, collection_actions?: (CollectionActions | null) | undefined, payment_constraints?: (BoletoPaymentTypeConstraints | null) | undefined, beneficiary?: (BeneficiaryDetails | null) | undefined, document_kind?: (BoletoDocumentKind | null) | undefined}; export type SantanderConnectorMetadataData = {boleto?: (SantanderBoletoData | null) | undefined}; export type ConnectorMetadata = {apple_pay?: (ApplepayConnectorMetadataRequest | null) | undefined, airwallex?: (AirwallexData | null) | undefined, noon?: (NoonData | null) | undefined, braintree?: (BraintreeData | null) | undefined, adyen?: (AdyenConnectorMetadata | null) | undefined, peachpayments?: (PeachpaymentsData | null) | undefined, santander?: (SantanderConnectorMetadataData | null) | undefined}; export type TransactionDetailsUiConfiguration = {position?: (number | null) | undefined, is_key_bold?: (boolean | null) | undefined, is_value_bold?: (boolean | null) | undefined}; export type PaymentLinkTransactionDetails = {key: string, value: string, ui_configuration?: (TransactionDetailsUiConfiguration | null) | undefined}; export type ElementPosition = 'left' | 'top left' | 'top' | 'top right' | 'right' | 'bottom right' | 'bottom' | 'bottom left' | 'center'; export type SizeVariants = 'cover' | 'contain'; export type ElementSize = {Variants: SizeVariants} | {Percentage: number} | {Pixels: number}; export type PaymentLinkBackgroundImageConfig = {url: string, position?: (ElementPosition | null) | undefined, size?: (ElementSize | null) | undefined}; export type PaymentLinkDetailsLayout = 'layout1' | 'layout2'; export type SdkDisplayMode = 'default_sdk_message' | 'custom_message' | 'hidden'; export type CustomMessage = {value: string, display_mode?: SdkDisplayMode | undefined}; export type CustomTerms = {payment_method_type: PaymentMethodType, message: CustomMessage}; export type PaymentMethodConfig = {payment_method: PaymentMethod, payment_method_types: Array}; export type PaymentMethodsConfig = Array; export type PaymentLinkSdkLabelType = 'above' | 'floating' | 'never'; export type PaymentLinkShowSdkTerms = 'always' | 'auto' | 'never'; export type PaymentCreatePaymentLinkConfig = {theme?: (string | null) | undefined, logo?: (string | null) | undefined, seller_name?: (string | null) | undefined, sdk_layout?: (string | null) | undefined, display_sdk_only?: (boolean | null) | undefined, enabled_saved_payment_method?: (boolean | null) | undefined, hide_card_nickname_field?: (boolean | null) | undefined, show_card_form_by_default?: (boolean | null) | undefined, transaction_details?: (Array | null) | undefined, background_image?: (PaymentLinkBackgroundImageConfig | null) | undefined, details_layout?: (PaymentLinkDetailsLayout | null) | undefined, payment_button_text?: (string | null) | undefined, custom_message_for_card_terms?: (string | null) | undefined, custom_message_for_payment_method_types?: (PaymentMethodsConfig | null) | undefined, payment_button_colour?: (string | null) | undefined, skip_status_screen?: (boolean | null) | undefined, payment_button_text_colour?: (string | null) | undefined, background_colour?: (string | null) | undefined, sdk_ui_rules?: ({[key: string]: {[key: string]: string}} | null) | undefined, payment_link_ui_rules?: ({[key: string]: {[key: string]: string}} | null) | undefined, enable_button_only_on_form_ready?: (boolean | null) | undefined, payment_form_header_text?: (string | null) | undefined, payment_form_label_type?: (PaymentLinkSdkLabelType | null) | undefined, show_card_terms?: (PaymentLinkShowSdkTerms | null) | undefined, is_setup_mandate_flow?: (boolean | null) | undefined, color_icon_card_cvc_error?: (string | null) | undefined, show_merchant_name?: (boolean | null) | undefined} | null; export type MinorUnit = number; export type RequestSurchargeDetails = {surcharge_amount: number, tax_amount?: (MinorUnit | null) | undefined}; export type PaymentType = 'normal' | 'new_mandate' | 'setup_mandate' | 'recurring_mandate' | 'installment'; export type Cryptogram = {cavv: {authentication_cryptogram?: (string | null) | undefined}}; export type TransactionStatus = 'Y' | 'N' | 'U' | 'A' | 'R' | 'C' | 'D' | 'I'; export type ExternalThreeDsData = {authentication_cryptogram?: (Cryptogram | null) | undefined, ds_trans_id?: (string | null) | undefined, version?: (string | null) | undefined, eci?: (string | null) | undefined, transaction_status: TransactionStatus}; export type ProcessorPaymentToken = {processor_payment_token: string, merchant_connector_id?: (string | null) | undefined}; export type NetworkTransactionIdAndCardDetails = {card_number: string, card_exp_month: string, card_exp_year: string, card_holder_name: string, card_issuer?: (string | null) | undefined, card_network?: (CardNetwork | null) | undefined, card_type?: (string | null) | undefined, card_issuing_country?: (string | null) | undefined, card_issuing_country_code?: (string | null) | undefined, bank_code?: (string | null) | undefined, nick_name?: (string | null) | undefined, network_transaction_id: string, transaction_link_id?: (string | null) | undefined}; export type NetworkTransactionIdAndNetworkTokenDetails = {network_token: string, token_exp_month: string, token_exp_year: string, card_network?: (CardNetwork | null) | undefined, card_type?: (string | null) | undefined, card_issuing_country?: (string | null) | undefined, bank_code?: (string | null) | undefined, card_holder_name: string, card_issuer?: (string | null) | undefined, nick_name?: (string | null) | undefined, eci?: (string | null) | undefined, network_transaction_id: string, transaction_link_id?: (string | null) | undefined}; export type TokenSource = 'google_pay' | 'apple_pay'; export type NetworkTransactionIdAndDecryptedWalletTokenDetails = {decrypted_token: string, token_exp_month: string, token_exp_year: string, card_holder_name: string, network_transaction_id: string, transaction_link_id?: (string | null) | undefined, eci?: (string | null) | undefined, token_source?: (TokenSource | null) | undefined, card_network?: (CardNetwork | null) | undefined}; export type CardWithLimitedData = {card_number: string, card_exp_month?: (string | null) | undefined, card_exp_year?: (string | null) | undefined, card_holder_name?: (string | null) | undefined, eci?: (string | null) | undefined, network_transaction_id?: (string | null) | undefined, transaction_link_id?: (string | null) | undefined}; export type RecurringDetails = {type: 'mandate_id', data: string} | {type: 'payment_method_id', data: string} | {type: 'processor_payment_token', data: ProcessorPaymentToken} | {type: 'network_transaction_id_and_card_details', data: NetworkTransactionIdAndCardDetails} | {type: 'network_transaction_id_and_network_token_details', data: NetworkTransactionIdAndNetworkTokenDetails} | {type: 'network_transaction_id_and_decrypted_wallet_token_details', data: NetworkTransactionIdAndDecryptedWalletTokenDetails} | {type: 'card_with_limited_data', data: CardWithLimitedData}; export type StripeChargeType = 'direct' | 'destination'; export type PaymentChargeType = {Stripe: StripeChargeType}; export type StripeSplitPaymentRequest = {charge_type: PaymentChargeType, application_fees: number, transfer_account_id: string, on_behalf_of?: (string | null) | undefined}; export type AdyenSplitType = 'BalanceAccount' | 'AcquiringFees' | 'PaymentFee' | 'AdyenFees' | 'AdyenCommission' | 'AdyenMarkup' | 'Interchange' | 'SchemeFee' | 'Commission' | 'TopUp' | 'Vat'; export type AdyenSplitItem = {amount: number, split_type: AdyenSplitType, account?: (string | null) | undefined, reference: string, description?: (string | null) | undefined}; export type AdyenSplitData = {store?: (string | null) | undefined, split_items: Array}; export type XenditSplitRoute = {flat_amount?: (MinorUnit | null) | undefined, percent_amount?: (number | null) | undefined, currency: Currency, destination_account_id: string, reference_id: string}; export type XenditMultipleSplitRequest = {name: string, description: string, for_user_id?: (string | null) | undefined, routes: Array}; export type XenditSplitSubMerchantData = {for_user_id: string}; export type XenditSplitRequest = {multiple_splits: XenditMultipleSplitRequest} | {single_split: XenditSplitSubMerchantData}; export type SplitPaymentsRequest = {stripe_split_payment: StripeSplitPaymentRequest} | {adyen_split_payment: AdyenSplitData} | {xendit_split_payment: XenditSplitRequest}; export type ScaExemptionType = 'low_value' | 'transaction_risk_analysis'; export type CtpServiceProvider = 'visa' | 'mastercard'; export type CtpServiceDetails = {merchant_transaction_id?: (string | null) | undefined, correlation_id?: (string | null) | undefined, x_src_flow_id?: (string | null) | undefined, provider?: (CtpServiceProvider | null) | undefined, encrypted_payload?: (string | null) | undefined}; export type ThreeDsCompletionIndicator = 'Y' | 'N' | 'U'; export type PaymentChannel = 'ecommerce' | 'mail_order' | 'telephone_order' | {other: string}; export type TaxStatus = 'taxable' | 'exempt'; export type MitCategory = 'installment' | 'unscheduled' | 'recurring' | 'resubmission'; export type BillingDescriptor = {name?: (string | null) | undefined, city?: (string | null) | undefined, phone?: (string | null) | undefined, statement_descriptor?: (string | null) | undefined, statement_descriptor_suffix?: (string | null) | undefined, reference?: (string | null) | undefined}; export type Tokenization = 'skip_psp' | 'tokenize_at_psp'; export type PartnerApplicationDetails = {name?: (string | null) | undefined, version?: (string | null) | undefined, integrator?: (string | null) | undefined}; export type MerchantApplicationDetails = {name?: (string | null) | undefined, version?: (string | null) | undefined}; export type PartnerMerchantIdentifierDetails = {partner_details?: (PartnerApplicationDetails | null) | undefined, merchant_details?: (MerchantApplicationDetails | null) | undefined}; export type BillingFrequency = 'month'; export type InstallmentOptionData = {number_of_installments: string, billing_frequency: BillingFrequency, interest_rate: number}; export type InstallmentOption = {payment_method: PaymentMethod, installments: Array}; export type InstallmentRequest = {number_of_installments: number, billing_frequency: BillingFrequency}; export type SurchargeStrategy = 'apply' | 'waive'; export type PaymentsCreateRequest = {amount: number, order_tax_amount?: (number | null) | undefined, currency: Currency, amount_to_capture?: (number | null) | undefined, shipping_cost?: (number | null) | undefined, payment_id?: (string | null) | undefined, routing?: (StraightThroughAlgorithm | null) | undefined, connector?: (Array | null) | undefined, capture_method?: (CaptureMethod | null) | undefined, authentication_type?: (AuthenticationType | null) | undefined, billing?: (Address | null) | undefined, confirm?: (boolean | null) | undefined, customer?: (CustomerDetails | null) | undefined, customer_id?: (string | null) | undefined, off_session?: (boolean | null) | undefined, description?: (string | null) | undefined, return_url?: (string | null) | undefined, setup_future_usage?: (FutureUsage | null) | undefined, payment_method_data?: (PaymentMethodDataRequest | null) | undefined, payment_method?: (PaymentMethod | null) | undefined, payment_token?: (string | null) | undefined, shipping?: (Address | null) | undefined, statement_descriptor_name?: (string | null) | undefined, statement_descriptor_suffix?: (string | null) | undefined, order_details?: (Array | null) | undefined, mandate_data?: (MandateData | null) | undefined, customer_acceptance?: (CustomerAcceptance | null) | undefined, mandate_id?: (string | null) | undefined, browser_info?: (BrowserInformation | null) | undefined, payment_experience?: (PaymentExperience | null) | undefined, payment_method_type?: (PaymentMethodType | null) | undefined, business_country?: (CountryAlpha2 | null) | undefined, business_label?: (string | null) | undefined, merchant_connector_details?: (MerchantConnectorDetailsWrap | null) | undefined, allowed_payment_method_types?: (Array | null) | undefined, metadata?: (Record | null) | undefined, connector_metadata?: (ConnectorMetadata | null) | undefined, payment_link?: (boolean | null) | undefined, payment_link_config?: (PaymentCreatePaymentLinkConfig | null) | undefined, payment_link_config_id?: (string | null) | undefined, profile_id?: (string | null) | undefined, surcharge_details?: (RequestSurchargeDetails | null) | undefined, payment_type?: (PaymentType | null) | undefined, request_incremental_authorization?: (boolean | null) | undefined, session_expiry?: (number | null) | undefined, frm_metadata?: (Record | null) | undefined, request_external_three_ds_authentication?: (boolean | null) | undefined, three_ds_data?: (ExternalThreeDsData | null) | undefined, recurring_details?: (RecurringDetails | null) | undefined, split_payments?: (SplitPaymentsRequest | null) | undefined, request_extended_authorization?: (boolean | null) | undefined, merchant_order_reference_id?: (string | null) | undefined, skip_external_tax_calculation?: (boolean | null) | undefined, psd2_sca_exemption_type?: (ScaExemptionType | null) | undefined, ctp_service_details?: (CtpServiceDetails | null) | undefined, force_3ds_challenge?: (boolean | null) | undefined, threeds_method_comp_ind?: (ThreeDsCompletionIndicator | null) | undefined, is_iframe_redirection_enabled?: (boolean | null) | undefined, all_keys_required?: (boolean | null) | undefined, payment_channel?: (PaymentChannel | null) | undefined, tax_status?: (TaxStatus | null) | undefined, discount_amount?: (number | null) | undefined, shipping_amount_tax?: (MinorUnit | null) | undefined, duty_amount?: (MinorUnit | null) | undefined, order_date?: (string | null) | undefined, enable_partial_authorization?: (boolean | null) | undefined, enable_overcapture?: (boolean | null) | undefined, is_stored_credential?: (boolean | null) | undefined, mit_category?: (MitCategory | null) | undefined, billing_descriptor?: (BillingDescriptor | null) | undefined, tokenization?: (Tokenization | null) | undefined, partner_merchant_identifier_details?: (PartnerMerchantIdentifierDetails | null) | undefined, installment_options?: (Array | null) | undefined, installment_data?: (InstallmentRequest | null) | undefined, profile_acquirer_id?: (string | null) | undefined, external_surcharge_strategy?: (SurchargeStrategy | null) | undefined}; export type CreateApiPaymentsArgs = {body: PaymentsCreateRequest}; export type CreateApiPaymentsOptions = {baseUrl: string, apiKey?: string | undefined, fetch?: typeof fetch | undefined}; export const intentStatus = z.enum(["succeeded", "failed", "cancelled", "cancelled_post_capture", "processing", "requires_customer_action", "requires_merchant_action", "requires_payment_method", "requires_confirmation", "requires_capture", "partially_captured", "partially_captured_and_capturable", "partially_authorized_and_requires_capture", "partially_captured_and_processing", "conflicted", "expired", "review"]); export const initiator = z.enum(["platform", "connected"]); export const minorUnit = z.number().int(); export const postCaptureVoidStatus = z.enum(["succeeded", "pending", "failed"]); export const postCaptureVoidResponse = z.object({status: postCaptureVoidStatus, connector_reference_id: z.string().nullable().optional(), description: z.string().nullable().optional(), updated_at: z.string()}); export const paymentIntentStateMetadata = z.object({total_refunded_amount: minorUnit.nullable().optional(), total_disputed_amount: minorUnit.nullable().optional(), post_capture_void: postCaptureVoidResponse.nullable().optional()}); export const currency = z.enum(["AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", "CAD", "CDF", "CHF", "CLF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLE", "SLL", "SOS", "SRD", "SSP", "STD", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VES", "VND", "VUV", "WST", "XAF", "XCD", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZWL"]); export const refundStatus = z.enum(["succeeded", "failed", "pending", "review"]); export const stripeSplitRefundRequest = z.object({revert_platform_fee: z.boolean().nullable().optional(), revert_transfer: z.boolean().nullable().optional()}); export const adyenSplitType = z.enum(["BalanceAccount", "AcquiringFees", "PaymentFee", "AdyenFees", "AdyenCommission", "AdyenMarkup", "Interchange", "SchemeFee", "Commission", "TopUp", "Vat"]); export const adyenSplitItem = z.object({amount: z.number().int(), split_type: adyenSplitType, account: z.string().nullable().optional(), reference: z.string(), description: z.string().nullable().optional()}); export const adyenSplitData = z.object({store: z.string().nullable().optional(), split_items: z.array(adyenSplitItem)}); export const xenditSplitSubMerchantData = z.object({for_user_id: z.string()}); export const splitRefund = z.union([z.object({stripe_split_refund: stripeSplitRefundRequest}), z.object({adyen_split_refund: adyenSplitData}), z.object({xendit_split_refund: xenditSplitSubMerchantData})]); export const refundResponse = z.object({refund_id: z.string(), payment_id: z.string(), amount: z.number().int().gte(100), currency: z.string(), status: refundStatus, reason: z.string().nullable().optional(), metadata: z.object({}).nullable().optional(), error_message: z.string().nullable().optional(), error_code: z.string().nullable().optional(), unified_code: z.string().nullable().optional(), unified_message: z.string().nullable().optional(), created_at: z.string().nullable().optional(), updated_at: z.string().nullable().optional(), connector: z.string(), profile_id: z.string().nullable().optional(), merchant_connector_id: z.string().nullable().optional(), split_refunds: splitRefund.nullable().optional(), issuer_error_code: z.string().nullable().optional(), issuer_error_message: z.string().nullable().optional(), raw_connector_response: z.string().nullable().optional(), connector_refund_id: z.string().nullable().optional()}); export const stringMinorUnit = z.string(); export const disputeStage = z.enum(["pre_dispute", "dispute", "pre_arbitration", "arbitration", "dispute_reversal"]); export const disputeStatus = z.enum(["dispute_opened", "dispute_expired", "dispute_accepted", "dispute_cancelled", "dispute_challenged", "dispute_won", "dispute_lost"]); export const disputeResponsePaymentsRetrieve = z.object({dispute_id: z.string(), amount: stringMinorUnit, dispute_stage: disputeStage, dispute_status: disputeStatus, connector_status: z.string(), connector_dispute_id: z.string(), connector_reason: z.string().nullable().optional(), connector_reason_code: z.string().nullable().optional(), challenge_required_by: z.string().nullable().optional(), connector_created_at: z.string().nullable().optional(), connector_updated_at: z.string().nullable().optional(), created_at: z.string()}); export const attemptStatus = z.enum(["started", "authentication_failed", "router_declined", "authentication_pending", "authentication_successful", "authorized", "authorization_failed", "charged", "authorizing", "cod_initiated", "voided", "voided_post_charge", "void_initiated", "capture_initiated", "capture_failed", "void_failed", "auto_refunded", "partial_charged", "partially_authorized", "partial_charged_and_chargeable", "unresolved", "pending", "failure", "payment_method_awaited", "confirmation_awaited", "device_data_collection_pending", "integrity_failure", "expired", "capture_review"]); export const paymentMethod = z.enum(["card", "card_redirect", "pay_later", "wallet", "bank_redirect", "bank_transfer", "crypto", "bank_debit", "reward", "real_time_payment", "upi", "voucher", "gift_card", "open_banking", "mobile_payment", "network_token"]); export const captureMethod = z.enum(["automatic", "manual", "manual_multiple", "scheduled", "sequential_automatic"]); export const authenticationType = z.enum(["three_ds", "no_three_ds"]); export const paymentExperience = z.enum(["redirect_to_url", "invoke_sdk_client", "display_qr_code", "one_click", "link_wallet", "invoke_payment_app", "display_wait_screen", "collect_otp"]); export const paymentMethodType = z.enum(["ach", "affirm", "afterpay_clearpay", "alfamart", "ali_pay", "ali_pay_hk", "alma", "amazon_pay", "paysera", "apple_pay", "atome", "bacs", "bancontact_card", "becs", "benefit", "bizum", "blik", "bluecode", "boleto", "bca_bank_transfer", "bni_va", "breadpay", "bri_va", "bhn_card_network", "card_redirect", "cimb_va", "classic", "credit", "crypto_currency", "cashapp", "dana", "danamon_va", "debit", "duit_now", "efecty", "eft", "eft_debit_order", "eps", "flexiti", "fps", "evoucher", "giropay", "givex", "google_pay", "go_pay", "gcash", "ideal", "interac", "indomaret", "klarna", "kakao_pay", "local_bank_redirect", "mandiri_va", "knet", "mb_way", "mobile_pay", "momo", "momo_atm", "multibanco", "online_banking_thailand", "online_banking_czech_republic", "online_banking_finland", "online_banking_fpx", "online_banking_poland", "online_banking_slovakia", "oxxo", "pago_efectivo", "permata_bank_transfer", "open_banking_uk", "pay_bright", "payjustnow", "paypal", "paze", "pix", "pix_key", "pix_emv", "pix_qr", "pix_automatico_qr", "pix_automatico_push", "pay_safe_card", "przelewy24", "prompt_pay", "pse", "qris", "red_compra", "red_pagos", "samsung_pay", "sepa", "sepa_bank_transfer", "sepa_guarenteed_debit", "skrill", "sofort", "swish", "touch_n_go", "trustly", "twint", "upi_collect", "upi_intent", "upi_qr", "vipps", "viet_qr", "venmo", "walley", "we_chat_pay", "seven_eleven", "lawson", "mini_stop", "family_mart", "seicomart", "pay_easy", "local_bank_transfer", "mifinity", "open_banking_pis", "direct_carrier_billing", "instant_bank_transfer", "instant_bank_transfer_finland", "instant_bank_transfer_poland", "revolut_pay", "indonesian_bank_transfer", "open_banking", "network_token"]); export const unifiedCode = z.enum(["UE_1000", "UE_2000", "UE_3000", "UE_4000", "UE_9000"]); export const standardisedCode = z.enum(["account_closed_or_invalid", "authentication_failed", "authentication_required", "authorization_missing_or_revoked", "card_lost_or_stolen", "card_not_supported_restricted", "cfg_pm_not_enabled_or_misconfigured", "compliance_or_sanctions_restriction", "configuration_issue", "credit_limit_exceeded", "currency_or_corridor_not_enabled", "do_not_honor", "downstream_technical_issue", "duplicate_request", "generic_unknown_error", "incorrect_authentication_code", "insufficient_funds", "integ_cryptographic_issue", "integration_issue", "invalid_card_number", "invalid_credentials", "invalid_cvv", "invalid_expiry_date", "invalid_state", "issuer_unavailable", "merchant_inactive", "missing_or_invalid_param", "operation_not_allowed", "payment_cancelled_by_user", "payment_method_issue", "payment_session_timeout", "pm_address_mismatch", "psp_acquirer_error", "psp_fraud_engine_decline", "rate_limit", "stored_credential_or_mit_not_enabled", "subscription_plan_inactive", "suspected_fraud", "three_ds_authentication_service_issue", "three_ds_configuration_issue", "three_ds_data_or_protocol_invalid", "transaction_not_permitted", "transaction_timed_out", "velocity_limit_exceeded", "wallet_or_token_config_issue"]); export const recommendedAction = z.enum(["do_not_retry", "retry_after_10_days", "retry_after_1_hour", "retry_after_24_hours", "retry_after_2_days", "retry_after_4_days", "retry_after_6_days", "retry_after_8_days", "retry_after_instrument_update", "retry_later", "retry_with_different_payment_method_data", "stop_recurring"]); export const apiUnifiedErrorDetails = z.object({category: unifiedCode.nullable().optional(), message: z.string().nullable().optional(), standardised_code: standardisedCode.nullable().optional(), description: z.string().nullable().optional(), user_guidance_message: z.string().nullable().optional(), recommended_action: recommendedAction.nullable().optional()}); export const cardNetwork = z.enum(["Visa", "Mastercard", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay", "Interac", "RuPay", "Maestro", "Star", "Pulse", "Accel", "Nyce", "Prop", "PrivateLabel", "Dinacard"]); export const apiNetworkErrorDetails = z.object({name: cardNetwork.nullable().optional(), advice_code: z.string().nullable().optional(), advice_message: z.string().nullable().optional()}); export const apiIssuerErrorDetails = z.object({code: z.string().nullable().optional(), message: z.string().nullable().optional(), network_details: apiNetworkErrorDetails.nullable().optional()}); export const apiConnectorErrorDetails = z.object({code: z.string().nullable().optional(), message: z.string().nullable().optional(), reason: z.string().nullable().optional()}); export const paymentErrorDetails = z.object({unified_details: apiUnifiedErrorDetails.nullable().optional(), issuer_details: apiIssuerErrorDetails.nullable().optional(), connector_details: apiConnectorErrorDetails.nullable().optional()}); export const paymentAttemptResponse = z.object({attempt_id: z.string(), status: attemptStatus, amount: z.number().int(), order_tax_amount: z.number().int().nullable().optional(), currency: currency.nullable().optional(), connector: z.string().nullable().optional(), error_message: z.string().nullable().optional(), payment_method: paymentMethod.nullable().optional(), connector_transaction_id: z.string().nullable().optional(), capture_method: captureMethod.nullable().optional(), authentication_type: authenticationType.nullable().optional(), created_at: z.string(), modified_at: z.string(), cancellation_reason: z.string().nullable().optional(), mandate_id: z.string().nullable().optional(), error_code: z.string().nullable().optional(), payment_token: z.string().nullable().optional(), connector_metadata: z.unknown(), payment_experience: paymentExperience.nullable().optional(), payment_method_type: paymentMethodType.nullable().optional(), reference_id: z.string().nullable().optional(), unified_code: z.string().nullable().optional(), unified_message: z.string().nullable().optional(), client_source: z.string().nullable().optional(), client_version: z.string().nullable().optional(), error_details: paymentErrorDetails.nullable().optional()}); export const captureStatus = z.enum(["started", "charged", "pending", "failed"]); export const captureResponse = z.object({capture_id: z.string(), status: captureStatus, amount: z.number().int(), currency: currency.nullable().optional(), connector: z.string(), authorized_attempt_id: z.string(), connector_capture_id: z.string().nullable().optional(), capture_sequence: z.number().int(), error_message: z.string().nullable().optional(), error_code: z.string().nullable().optional(), error_reason: z.string().nullable().optional(), reference_id: z.string().nullable().optional()}); export const acceptanceType = z.enum(["online", "offline"]); export const onlineMandate = z.object({ip_address: z.string(), user_agent: z.string()}); export const customerAcceptance = z.object({acceptance_type: acceptanceType, accepted_at: z.string().nullable().optional(), online: onlineMandate.nullable().optional()}); export const mandateAmountData = z.object({amount: z.number().int(), currency: currency, start_date: z.string().nullable().optional(), end_date: z.string().nullable().optional(), metadata: z.object({}).nullable().optional()}); export const mandateType = z.union([z.object({single_use: mandateAmountData}), z.object({multi_use: mandateAmountData.nullable()})]); export const mandateData = z.object({update_mandate_id: z.string().nullable().optional(), customer_acceptance: customerAcceptance.nullable().optional(), mandate_type: mandateType.nullable().optional()}); export const futureUsage = z.enum(["off_session", "on_session"]); export const cardResponse = z.object({last4: z.string().nullable().optional(), card_type: z.string().nullable().optional(), card_network: cardNetwork.nullable().optional(), card_issuer: z.string().nullable().optional(), card_issuing_country: z.string().nullable().optional(), card_isin: z.string().nullable().optional(), card_extended_bin: z.string().nullable().optional(), card_exp_month: z.string().nullable().optional(), card_exp_year: z.string().nullable().optional(), card_holder_name: z.string().nullable().optional(), payment_checks: z.unknown(), authentication_data: z.unknown(), auth_code: z.string().nullable().optional()}); export const countryAlpha2 = z.enum(["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW", "US"]); export const addressDetails = z.object({city: z.string().max(50).nullable().optional(), country: countryAlpha2.nullable().optional(), line1: z.string().max(200).nullable().optional(), line2: z.string().max(50).nullable().optional(), line3: z.string().max(50).nullable().optional(), zip: z.string().max(50).nullable().optional(), state: z.string().nullable().optional(), first_name: z.string().max(255).nullable().optional(), last_name: z.string().max(255).nullable().optional(), origin_zip: z.string().max(50).nullable().optional()}); export const phoneDetails = z.object({number: z.string().nullable().optional(), country_code: z.string().nullable().optional()}); export const address = z.object({address: addressDetails.nullable().optional(), phone: phoneDetails.nullable().optional(), email: z.string().nullable().optional()}); export const sepaBankTransferPaymentAdditionalData = z.object({debitor_iban: z.string().nullable().optional(), debitor_bic: z.string().nullable().optional(), debitor_name: z.string().nullable().optional(), debitor_email: z.string().nullable().optional()}); export const pixBankTransferAdditionalData = z.object({pix_key: z.string().nullable().optional(), cpf: z.string().nullable().optional(), cnpj: z.string().nullable().optional(), source_bank_account_id: z.string().nullable().optional(), destination_bank_account_id: z.string().nullable().optional(), expiry_date: z.string().nullable().optional()}); export const pixAutomaticoPushAdditionalData = z.object({account_number: z.string().nullable().optional(), branch_code: z.string().nullable().optional(), bank_identifier: z.string().nullable().optional()}); export const localBankTransferAdditionalData = z.object({bank_code: z.string().nullable().optional()}); export const bankNames = z.enum(["absa", "american_express", "affin_bank", "agro_bank", "alliance_bank", "am_bank", "bank_of_america", "bank_of_china", "bank_islam", "bank_muamalat", "bank_rakyat", "bank_simpanan_nasional", "barclays", "blik_p_s_p", "capital_one", "chase", "citi", "cimb_bank", "discover", "navy_federal_credit_union", "pentagon_federal_credit_union", "synchrony_bank", "wells_fargo", "abn_amro", "asn_bank", "bunq", "handelsbanken", "hong_leong_bank", "hsbc_bank", "ing", "knab", "kuwait_finance_house", "moneyou", "rabobank", "regiobank", "revolut", "sns_bank", "triodos_bank", "van_lanschot", "arzte_und_apotheker_bank", "austrian_anadi_bank_ag", "bank_austria", "bank99_ag", "bankhaus_carl_spangler", "bankhaus_schelhammer_und_schattera_ag", "bank_millennium", "bank_p_e_k_a_o_s_a", "bawag_psk_ag", "bks_bank_ag", "brull_kallmus_bank_ag", "btv_vier_lander_bank", "capital_bank_grawe_gruppe_ag", "ceska_sporitelna", "dolomitenbank", "easybank_ag", "e_platby_v_u_b", "erste_bank_und_sparkassen", "friesland_bank", "hypo_alpeadriabank_international_ag", "hypo_noe_lb_fur_niederosterreich_u_wien", "hypo_oberosterreich_salzburg_steiermark", "hypo_tirol_bank_ag", "hypo_vorarlberg_bank_ag", "hypo_bank_burgenland_aktiengesellschaft", "komercni_banka", "m_bank", "marchfelder_bank", "maybank", "oberbank_ag", "osterreichische_arzte_und_apothekerbank", "ocbc_bank", "pay_with_i_n_g", "place_z_i_p_k_o", "platnosc_online_karta_platnicza", "posojilnica_bank_e_gen", "postova_banka", "public_bank", "raiffeisen_bankengruppe_osterreich", "rhb_bank", "schelhammer_capital_bank_ag", "standard_chartered_bank", "schoellerbank_ag", "sparda_bank_wien", "sporo_pay", "santander_przelew24", "tatra_pay", "viamo", "volksbank_gruppe", "volkskreditbank_ag", "vr_bank_braunau", "uob_bank", "pay_with_alior_bank", "banki_spoldzielcze", "pay_with_inteligo", "b_n_p_paribas_poland", "bank_nowy_s_a", "credit_agricole", "pay_with_b_o_s", "pay_with_citi_handlowy", "pay_with_plus_bank", "toyota_bank", "velo_bank", "e_transfer_pocztowy24", "plus_bank", "etransfer_pocztowy24", "banki_spbdzielcze", "bank_nowy_bfg_sa", "getin_bank", "blik", "noble_pay", "idea_bank", "envelo_bank", "nest_przelew", "mbank_mtransfer", "inteligo", "pbac_z_ipko", "bnp_paribas", "bank_pekao_sa", "volkswagen_bank", "alior_bank", "boz", "bangkok_bank", "krungsri_bank", "krung_thai_bank", "the_siam_commercial_bank", "kasikorn_bank", "open_bank_success", "open_bank_failure", "open_bank_cancelled", "aib", "bank_of_scotland", "danske_bank", "first_direct", "first_trust", "halifax", "lloyds", "monzo", "nat_west", "nationwide_bank", "royal_bank_of_scotland", "starling", "tsb_bank", "tesco_bank", "ulster_bank", "yoursafe", "n26", "nationale_nederlanden"]); export const bankTransferResponse = z.union([z.object({ach: z.object({})}).nullable(), z.object({sepa: sepaBankTransferPaymentAdditionalData}).nullable(), z.object({bacs: z.object({})}).nullable(), z.object({multibanco: z.object({})}).nullable(), z.object({permata: z.object({})}).nullable(), z.object({bca: z.object({})}).nullable(), z.object({bni_va: z.object({})}).nullable(), z.object({bri_va: z.object({})}).nullable(), z.object({cimb_va: z.object({})}).nullable(), z.object({danamon_va: z.object({})}).nullable(), z.object({mandiri_va: z.object({})}).nullable(), z.object({pix: pixBankTransferAdditionalData}).nullable(), z.object({pix_emv: z.object({})}).nullable(), z.object({pix_qr: z.object({})}).nullable(), z.object({pix_automatico_push: pixAutomaticoPushAdditionalData}).nullable(), z.object({pix_automatico_qr: z.object({})}).nullable(), z.object({pse: z.object({})}).nullable(), z.object({local_bank_transfer: localBankTransferAdditionalData}).nullable(), z.object({instant_bank_transfer: z.object({})}).nullable(), z.object({instant_bank_transfer_finland: z.object({})}).nullable(), z.object({instant_bank_transfer_poland: z.object({})}).nullable(), z.object({indonesian_bank_transfer: z.object({bank_name: bankNames.nullable().optional()})}).nullable()]); export const walletAdditionalDataForCard = z.object({last4: z.string().nullable().optional(), card_network: z.string().nullable().optional(), type: z.string().nullable().optional(), card_exp_month: z.string().nullable().optional(), card_exp_year: z.string().nullable().optional(), auth_code: z.string().nullable().optional(), email: z.string().nullable().optional()}); export const walletResponse = z.union([z.object({apple_pay: walletAdditionalDataForCard}).nullable(), z.object({google_pay: walletAdditionalDataForCard}).nullable(), z.object({samsung_pay: walletAdditionalDataForCard}).nullable()]); export const klarnaSdkPaymentMethodResponse = z.object({payment_type: z.string().nullable().optional()}); export const paylaterResponse = z.object({klarna_sdk: klarnaSdkPaymentMethodResponse.nullable().optional()}); export const bancontactBankRedirectAdditionalData = z.object({last4: z.string().nullable().optional(), card_exp_month: z.string().nullable().optional(), card_exp_year: z.string().nullable().optional(), card_holder_name: z.string().nullable().optional()}); export const interacPaymentMethod = z.object({customer_info: z.object({}).nullable().optional()}); export const blikBankRedirectAdditionalData = z.object({blik_code: z.string().nullable().optional()}); export const giropayBankRedirectAdditionalData = z.object({bic: z.string().nullable().optional(), iban: z.string().nullable().optional(), country: countryAlpha2.nullable().optional()}); export const bankRedirectResponse = z.union([z.object({BancontactCard: bancontactBankRedirectAdditionalData, bank_name: bankNames.nullable().optional(), interac: interacPaymentMethod.nullable().optional()}).nullable(), z.object({Blik: blikBankRedirectAdditionalData, bank_name: bankNames.nullable().optional(), interac: interacPaymentMethod.nullable().optional()}).nullable(), z.object({Giropay: giropayBankRedirectAdditionalData, bank_name: bankNames.nullable().optional(), interac: interacPaymentMethod.nullable().optional()}).nullable()]); export const cryptoResponse = z.object({pay_currency: z.string().nullable().optional(), network: z.string().nullable().optional()}).nullable(); export const bankType = z.enum(["checking", "savings"]); export const bankHolderType = z.enum(["personal", "business"]); export const achBankDebitAdditionalData = z.object({account_number: z.string(), routing_number: z.string(), bank_account_holder_name: z.string().nullable().optional(), bank_name: bankNames.nullable().optional(), bank_type: bankType.nullable().optional(), bank_holder_type: bankHolderType.nullable().optional()}); export const bacsBankDebitAdditionalData = z.object({account_number: z.string(), sort_code: z.string(), bank_account_holder_name: z.string().nullable().optional()}); export const becsBankDebitAdditionalData = z.object({account_number: z.string(), bsb_number: z.string(), bank_account_holder_name: z.string().nullable().optional()}); export const sepaBankDebitAdditionalData = z.object({iban: z.string(), bank_account_holder_name: z.string().nullable().optional()}); export const eftDebitOrderAdditionalData = z.object({account_number: z.string(), branch_code: z.string().nullable().optional(), bank_account_holder_name: z.string().nullable().optional(), bank_name: bankNames.nullable().optional(), bank_type: bankType.nullable().optional()}); export const bankDebitResponse = z.union([z.object({ach: achBankDebitAdditionalData}).nullable(), z.object({bacs: bacsBankDebitAdditionalData}).nullable(), z.object({becs: becsBankDebitAdditionalData}).nullable(), z.object({sepa: sepaBankDebitAdditionalData}).nullable(), z.object({sepa_guarenteed_debit: sepaBankDebitAdditionalData}).nullable(), z.object({eft_debit_order: eftDebitOrderAdditionalData}).nullable()]); export const realTimePaymentDataResponse = z.union([z.object({fps: z.object({})}).nullable(), z.object({duit_now: z.object({})}).nullable(), z.object({prompt_pay: z.object({})}).nullable(), z.object({viet_qr: z.object({})}).nullable(), z.object({qris: z.object({})}).nullable()]); export const upiSource = z.enum(["UPI_CC", "UPI_CL", "UPI_ACCOUNT", "UPI_CC_CL", "UPI_PPI", "UPI_VOUCHER"]); export const upiCollectAdditionalData = z.object({vpa_id: z.string().nullable().optional(), upi_source: upiSource.nullable().optional()}); export const upiIntentData = z.object({upi_source: upiSource.nullable().optional(), app_name: z.string().nullable().optional()}); export const upiQrData = z.object({upi_source: upiSource.nullable().optional()}); export const upiResponse = z.union([z.object({upi_collect: upiCollectAdditionalData}).nullable(), z.object({upi_intent: upiIntentData}).nullable(), z.object({upi_qr: upiQrData}).nullable()]); export const documentKind = z.enum(["cpf", "cnpj", "psn", "other"]); export const boletoVoucherData = z.object({social_security_number: z.string().nullable().optional(), bank_number: z.string().nullable().optional(), document_type: documentKind.nullable().optional(), fine_percentage: z.string().nullable().optional(), fine_quantity_days: z.string().nullable().optional(), interest_percentage: z.string().nullable().optional(), write_off_quantity_days: z.string().nullable().optional(), messages: z.array(z.string()).nullable().optional(), due_date: z.string().nullable().optional()}); export const alfamartVoucherData = z.object({first_name: z.string().nullable().optional(), last_name: z.string().nullable().optional(), email: z.string().nullable().optional()}); export const indomaretVoucherData = z.object({first_name: z.string().nullable().optional(), last_name: z.string().nullable().optional(), email: z.string().nullable().optional()}); export const jCSVoucherData = z.object({first_name: z.string().nullable().optional(), last_name: z.string().nullable().optional(), email: z.string().nullable().optional(), phone_number: z.string().nullable().optional()}); export const voucherResponse = z.union([z.object({boleto: boletoVoucherData}).nullable(), z.object({alfamart: alfamartVoucherData}).nullable(), z.object({indomaret: indomaretVoucherData}).nullable(), z.object({seven_eleven: jCSVoucherData}).nullable(), z.object({lawson: jCSVoucherData}).nullable(), z.object({mini_stop: jCSVoucherData}).nullable(), z.object({family_mart: jCSVoucherData}).nullable(), z.object({seicomart: jCSVoucherData}).nullable(), z.object({pay_easy: jCSVoucherData}).nullable()]); export const givexGiftCardAdditionalData = z.object({last4: z.string()}); export const giftCardResponse = z.union([z.object({givex: givexGiftCardAdditionalData}).nullable(), z.object({pay_safe_card: z.object({})}).nullable(), z.object({bhn_card_network: z.object({})}).nullable()]); export const cardRedirectResponse = z.union([z.object({knet: z.object({})}).nullable(), z.object({benefit: z.object({})}).nullable(), z.object({momo_atm: z.object({})}).nullable(), z.object({card_redirect: z.object({})}).nullable()]); export const cardTokenResponse = z.object({card_holder_name: z.string()}).nullable(); export const openBankingResponse = z.object({open_banking_pis: z.object({})}).nullable(); export const mobilePaymentResponse = z.object({direct_carrier_billing: z.object({msisdn: z.string(), client_uid: z.string().nullable().optional()})}).nullable(); export const networkTokenDetailsPaymentMethod = z.object({last4_digits: z.string().nullable().optional(), issuer_country: countryAlpha2.nullable().optional(), network_token_expiry_month: z.string().nullable().optional(), network_token_expiry_year: z.string().nullable().optional(), nick_name: z.string().nullable().optional(), card_holder_name: z.string().nullable().optional(), card_isin: z.string().nullable().optional(), card_issuer: z.string().nullable().optional(), card_network: cardNetwork.nullable().optional(), card_type: z.string().nullable().optional(), saved_to_locker: z.boolean().optional(), par: z.string().nullable().optional()}); export const networkTokenResponse = z.object({payment_method_data: networkTokenDetailsPaymentMethod}); export const paymentMethodDataResponseWithBilling = z.union([z.object({card: cardResponse, billing: address.nullable().optional()}).nullable(), z.object({bank_transfer: bankTransferResponse, billing: address.nullable().optional()}).nullable(), z.object({wallet: walletResponse, billing: address.nullable().optional()}).nullable(), z.object({pay_later: paylaterResponse, billing: address.nullable().optional()}).nullable(), z.object({bank_redirect: bankRedirectResponse, billing: address.nullable().optional()}).nullable(), z.object({crypto: cryptoResponse, billing: address.nullable().optional()}).nullable(), z.object({bank_debit: bankDebitResponse, billing: address.nullable().optional()}).nullable(), z.object({mandate_payment: z.object({}), billing: address.nullable().optional()}).nullable(), z.object({reward: z.object({}), billing: address.nullable().optional()}).nullable(), z.object({real_time_payment: realTimePaymentDataResponse, billing: address.nullable().optional()}).nullable(), z.object({upi: upiResponse, billing: address.nullable().optional()}).nullable(), z.object({voucher: voucherResponse, billing: address.nullable().optional()}).nullable(), z.object({gift_card: giftCardResponse, billing: address.nullable().optional()}).nullable(), z.object({card_redirect: cardRedirectResponse, billing: address.nullable().optional()}).nullable(), z.object({card_token: cardTokenResponse, billing: address.nullable().optional()}).nullable(), z.object({open_banking: openBankingResponse, billing: address.nullable().optional()}).nullable(), z.object({mobile_payment: mobilePaymentResponse, billing: address.nullable().optional()}).nullable(), z.object({network_token: networkTokenResponse, billing: address.nullable().optional()}).nullable()]); export const productType = z.enum(["physical", "digital", "travel", "ride", "event", "accommodation"]); export const orderDetailsWithAmount = z.object({product_name: z.string().max(255), quantity: z.number().int().gte(0), amount: z.number().int(), tax_rate: z.number().nullable().optional(), total_tax_amount: z.number().int().nullable().optional(), requires_shipping: z.boolean().nullable().optional(), product_img_link: z.string().nullable().optional(), product_id: z.string().nullable().optional(), category: z.string().nullable().optional(), sub_category: z.string().nullable().optional(), brand: z.string().nullable().optional(), product_type: productType.nullable().optional(), product_tax_code: z.string().nullable().optional(), description: z.string().nullable().optional(), sku: z.string().nullable().optional(), upc: z.string().nullable().optional(), commodity_code: z.string().nullable().optional(), unit_of_measure: z.string().nullable().optional(), total_amount: z.number().int().nullable().optional(), unit_discount_amount: z.number().int().nullable().optional()}); export const dokuBankTransferInstructions = z.object({expires_at: z.string(), reference: z.string(), instructions_url: z.string()}); export const receiverDetails = z.object({amount_received: z.number().int(), amount_charged: z.number().int().nullable().optional(), amount_remaining: z.number().int().nullable().optional()}); export const achTransfer = z.object({account_number: z.string(), bank_name: z.string(), routing_number: z.string(), swift_code: z.string()}); export const sepaBankTransferInstructions = z.object({account_holder_name: z.string(), bic: z.string(), country: z.string(), iban: z.string(), reference: z.string()}); export const bacsBankTransferInstructions = z.object({account_holder_name: z.string(), account_number: z.string(), sort_code: z.string()}); export const multibancoTransferInstructions = z.object({reference: z.string(), entity: z.string()}); export const bankTransferNextStepsData = z.union([z.object({doku_bank_transfer_instructions: dokuBankTransferInstructions, receiver: receiverDetails.nullable().optional()}), z.object({ach_credit_transfer: achTransfer, receiver: receiverDetails.nullable().optional()}), z.object({sepa_bank_instructions: sepaBankTransferInstructions, receiver: receiverDetails.nullable().optional()}), z.object({bacs_bank_instructions: bacsBankTransferInstructions, receiver: receiverDetails.nullable().optional()}), z.object({multibanco: multibancoTransferInstructions, receiver: receiverDetails.nullable().optional()})]); export const nextActionCall = z.union([z.literal("post_session_tokens"), z.literal("confirm"), z.literal("sync"), z.literal("complete_authorize"), z.literal("await_merchant_callback"), z.object({deny: z.object({message: z.string()})}), z.literal("eligibility_check")]); export const sdkNextAction = z.object({next_action: nextActionCall, should_block_confirm: z.boolean().nullable().optional()}); export const gpayMerchantInfo = z.object({merchant_id: z.string().nullable().optional(), merchant_name: z.string()}); export const gpayShippingAddressParameters = z.object({phone_number_required: z.boolean()}); export const gpayBillingAddressFormat = z.enum(["FULL", "MIN"]); export const gpayBillingAddressParameters = z.object({phone_number_required: z.boolean(), format: gpayBillingAddressFormat}); export const gpayAllowedMethodsParameters = z.object({allowed_auth_methods: z.array(z.string()), allowed_card_networks: z.array(z.string()), billing_address_required: z.boolean().nullable().optional(), billing_address_parameters: gpayBillingAddressParameters.nullable().optional(), assurance_details_required: z.boolean().nullable().optional(), allow_credit_cards: z.boolean().nullable().optional()}); export const gpayTokenParameters = z.object({gateway: z.string().nullable().optional(), gateway_merchant_id: z.string().nullable().optional(), "stripe:version": z.string().nullable().optional(), "stripe:publishableKey": z.string().nullable().optional(), protocol_version: z.string().nullable().optional(), public_key: z.string().nullable().optional()}); export const gpayTokenizationSpecification = z.object({type: z.string(), parameters: gpayTokenParameters}); export const gpayAllowedPaymentMethods = z.object({type: z.string(), parameters: gpayAllowedMethodsParameters, tokenization_specification: gpayTokenizationSpecification}); export const gpayTransactionInfo = z.object({country_code: countryAlpha2, currency_code: currency, total_price_status: z.string(), total_price: z.string()}); export const secretInfoToInitiateSdk = z.object({display: z.string(), payment: z.string()}); export const samsungPayMerchantPaymentInformation = z.object({name: z.string(), url: z.string().nullable().optional(), country_code: countryAlpha2}); export const samsungPayAmountFormat = z.enum(["FORMAT_TOTAL_PRICE_ONLY", "FORMAT_TOTAL_ESTIMATED_AMOUNT"]); export const samsungPayAmountDetails = z.object({option: samsungPayAmountFormat, currency_code: currency, total: z.string()}); export const samsungPayProtocolType = z.literal("PROTOCOL3DS"); export const paypalFlow = z.literal("checkout"); export const paypalTransactionInfo = z.object({flow: paypalFlow, currency_code: currency, total_price: z.string()}); export const paypalCaptureMethod = z.enum(["capture", "authorize"]); export const thirdPartySdkSessionResponse = z.object({secrets: secretInfoToInitiateSdk}); export const nullObject = z.unknown(); export const applePaySessionResponse = z.union([thirdPartySdkSessionResponse, z.unknown(), nullObject]); export const amountInfo = z.object({label: z.string(), type: z.string().nullable().optional(), amount: z.string()}); export const applePayAddressParameters = z.enum(["postalAddress", "phone", "email"]); export const applePayBillingContactFields = z.array(applePayAddressParameters); export const applePayShippingContactFields = z.array(applePayAddressParameters); export const applePayPaymentTiming = z.enum(["immediate", "recurring"]); export const recurringPaymentIntervalUnit = z.enum(["year", "month", "day", "hour", "minute"]); export const applePayRegularBillingRequest = z.object({amount: z.string(), label: z.string(), payment_timing: applePayPaymentTiming, recurring_payment_start_date: z.string().nullable().optional(), recurring_payment_end_date: z.string().nullable().optional(), recurring_payment_interval_unit: recurringPaymentIntervalUnit.nullable().optional(), recurring_payment_interval_count: z.number().int().nullable().optional()}); export const applePayRecurringPaymentRequest = z.object({payment_description: z.string(), regular_billing: applePayRegularBillingRequest, billing_agreement: z.string().nullable().optional(), management_u_r_l: z.string()}); export const applePayPaymentRequest = z.object({country_code: countryAlpha2, currency_code: currency, total: amountInfo, merchant_capabilities: z.array(z.string()).nullable().optional(), supported_networks: z.array(z.string()).nullable().optional(), merchant_identifier: z.string().nullable().optional(), required_billing_contact_fields: applePayBillingContactFields.nullable().optional(), required_shipping_contact_fields: applePayShippingContactFields.nullable().optional(), recurring_payment_request: applePayRecurringPaymentRequest.nullable().optional()}); export const ctpServiceProvider = z.enum(["visa", "mastercard"]); export const amazonPayPaymentIntent = z.enum(["Confirm", "Authorize", "AuthorizeWithCapture"]); export const amazonPayDeliveryPrice = z.object({amount: minorUnit, currency_code: currency}); export const amazonPayShippingMethod = z.object({shipping_method_name: z.string(), shipping_method_code: z.string()}); export const amazonPayDeliveryOptions = z.object({id: z.string(), price: amazonPayDeliveryPrice, shipping_method: amazonPayShippingMethod, is_default: z.boolean()}); export const sessionToken = z.discriminatedUnion("wallet_name", [z.object({delayed_session_token: z.boolean(), connector: z.string(), sdk_next_action: sdkNextAction, wallet_name: z.literal("google_pay")}), z.object({merchant_info: gpayMerchantInfo, shipping_address_required: z.boolean(), email_required: z.boolean(), shipping_address_parameters: gpayShippingAddressParameters, allowed_payment_methods: z.array(gpayAllowedPaymentMethods), transaction_info: gpayTransactionInfo, delayed_session_token: z.boolean(), connector: z.string(), sdk_next_action: sdkNextAction, secrets: secretInfoToInitiateSdk.nullable().optional(), wallet_name: z.literal("google_pay")}), z.object({version: z.string(), service_id: z.string(), order_number: z.string(), merchant: samsungPayMerchantPaymentInformation, amount: samsungPayAmountDetails, protocol: samsungPayProtocolType, allowed_brands: z.array(z.string()), billing_address_required: z.boolean(), shipping_address_required: z.boolean(), wallet_name: z.literal("samsung_pay")}), z.object({session_token: z.string(), session_id: z.string(), wallet_name: z.literal("klarna")}), z.object({connector: z.string(), session_token: z.string(), sdk_next_action: sdkNextAction, client_token: z.string().nullable().optional(), transaction_info: paypalTransactionInfo.nullable().optional(), data_user_id_token: z.string().nullable().optional(), currency: currency.nullable().optional(), intent: paypalCaptureMethod.nullable().optional(), wallet_name: z.literal("paypal")}), z.object({session_token_data: applePaySessionResponse.nullable().optional(), payment_request_data: applePayPaymentRequest.nullable().optional(), connector: z.string(), delayed_session_token: z.boolean(), sdk_next_action: sdkNextAction, connector_reference_id: z.string().nullable().optional(), connector_sdk_public_key: z.string().nullable().optional(), connector_merchant_id: z.string().nullable().optional(), wallet_name: z.literal("apple_pay")}), z.object({open_banking_session_token: z.string(), wallet_name: z.literal("open_banking")}), z.object({client_id: z.string(), client_name: z.string(), client_profile_id: z.string(), transaction_currency_code: currency, transaction_amount: z.string(), email_address: z.string().max(255).nullable().optional(), wallet_name: z.literal("paze")}), z.object({dpa_id: z.string(), dpa_name: z.string(), locale: z.string(), card_brands: z.array(cardNetwork), acquirer_bin: z.string(), acquirer_merchant_id: z.string(), merchant_category_code: z.string().nullable().optional(), merchant_country_code: z.string(), transaction_amount: z.string(), transaction_currency_code: currency, phone_number: z.string().max(255).nullable().optional(), email: z.string().max(255).nullable().optional(), phone_country_code: z.string().nullable().optional(), provider: ctpServiceProvider.nullable().optional(), dpa_client_id: z.string().nullable().optional(), wallet_name: z.literal("click_to_pay")}), z.object({merchant_id: z.string(), ledger_currency: currency, store_id: z.string(), payment_intent: amazonPayPaymentIntent, total_shipping_amount: z.string(), total_tax_amount: z.string(), total_base_amount: z.string(), delivery_options: z.array(amazonPayDeliveryOptions), wallet_name: z.literal("amazon_pay")}), z.object({wallet_name: z.literal("no_session_token_received")})]); export const pollConfig = z.object({delay_in_secs: z.number().int().gte(0), frequency: z.number().int().gte(0)}); export const threeDsMethodKey = z.enum(["threeDSMethodData", "JWT"]); export const threeDsMethodData = z.object({three_ds_method_data_submission: z.boolean(), three_ds_method_data: z.string().nullable().optional(), three_ds_method_url: z.string().nullable().optional(), three_ds_method_key: threeDsMethodKey.nullable().optional(), consume_post_message_for_three_ds_method_completion: z.boolean()}); export const pollConfigResponse = z.object({poll_id: z.string(), delay_in_secs: z.number().int(), frequency: z.number().int()}); export const threeDsData = z.object({three_ds_authentication_url: z.string(), three_ds_authorize_url: z.string(), three_ds_method_details: threeDsMethodData, poll_config: pollConfigResponse, message_version: z.string().nullable().optional(), directory_server_id: z.string().nullable().optional(), card_network: cardNetwork.nullable().optional(), three_ds_connector: z.string().nullable().optional()}); export const sdkNextActionData = z.object({next_action: nextActionCall, order_id: z.string().nullable().optional()}); export const mobilePaymentConsent = z.enum(["consent_required", "consent_not_required", "consent_optional"]); export const iframeData = z.object({three_ds_method_url: z.string(), three_ds_method_data_submission: z.boolean(), three_ds_method_data: z.string().nullable().optional(), directory_server_id: z.string(), message_version: z.string().nullable().optional(), method_key: z.literal("threeDSMethodData")}); export const dDCData = z.object({iframe_url: z.string(), timeout_ms: z.number().int().nullable().optional()}); export const nextActionData = z.discriminatedUnion("type", [z.object({redirect_to_url: z.string(), type: z.literal("redirect_to_url")}), z.object({bank_transfer_steps_and_charges_details: bankTransferNextStepsData, type: z.literal("display_bank_transfer_information")}), z.object({session_token: sessionToken.nullable().optional(), type: z.literal("third_party_sdk_session_token")}), z.object({image_data_url: z.string(), display_to_timestamp: z.number().int().nullable().optional(), qr_code_url: z.string(), display_text: z.string().nullable().optional(), border_color: z.string().nullable().optional(), raw_qr_data: z.string().nullable().optional(), type: z.literal("qr_code_information")}), z.object({qr_code_fetch_url: z.string(), type: z.literal("fetch_qr_code_information")}), z.object({sdk_uri: z.string(), display_from_timestamp: z.number().int(), display_to_timestamp: z.number().int().nullable().optional(), poll_config: pollConfig.nullable().optional(), type: z.literal("invoke_upi_intent_sdk")}), z.object({qr_code_url: z.string(), display_from_timestamp: z.number().int(), display_to_timestamp: z.number().int().nullable().optional(), poll_config: pollConfig.nullable().optional(), type: z.literal("invoke_upi_qr_flow")}), z.object({voucher_details: z.string(), type: z.literal("display_voucher_information")}), z.object({display_from_timestamp: z.number().int(), display_to_timestamp: z.number().int().nullable().optional(), poll_config: pollConfig.nullable().optional(), type: z.literal("wait_screen_information")}), z.object({three_ds_data: threeDsData, type: z.literal("three_ds_invoke")}), z.object({next_action_data: sdkNextActionData, type: z.literal("invoke_sdk_client")}), z.object({consent_data_required: mobilePaymentConsent, type: z.literal("collect_otp")}), z.object({iframe_data: iframeData, type: z.literal("invoke_hidden_iframe")}), z.object({ddc_data: dDCData, type: z.literal("invoke_ddc")})]); export const frmMessage = z.object({frm_name: z.string(), frm_transaction_id: z.string().nullable().optional(), frm_transaction_type: z.string().nullable().optional(), frm_status: z.string().nullable().optional(), frm_score: z.number().int().nullable().optional(), frm_reason: z.unknown(), frm_error: z.string().nullable().optional()}); export const applepayInitiative = z.enum(["web", "ios"]); export const sessionTokenInfo = z.union([z.object({payment_processing_certificate: z.string(), payment_processing_certificate_key: z.string(), payment_processing_details_at: z.literal("Hyperswitch"), certificate: z.string(), certificate_keys: z.string(), merchant_identifier: z.string(), display_name: z.string(), initiative: applepayInitiative, initiative_context: z.string().nullable().optional(), merchant_business_country: countryAlpha2.nullable().optional()}).nullable(), z.object({payment_processing_details_at: z.literal("Connector"), certificate: z.string(), certificate_keys: z.string(), merchant_identifier: z.string(), display_name: z.string(), initiative: applepayInitiative, initiative_context: z.string().nullable().optional(), merchant_business_country: countryAlpha2.nullable().optional()}).nullable()]); export const applepayConnectorMetadataRequest = z.object({session_token_data: sessionTokenInfo.nullable().optional()}); export const airwallexData = z.object({payload: z.string().nullable().optional()}); export const noonData = z.object({order_category: z.string().nullable().optional()}); export const braintreeData = z.object({merchant_account_id: z.string(), merchant_config_currency: z.string()}); export const adyenTestingData = z.object({holder_name: z.string()}); export const adyenConnectorMetadata = z.object({testing: adyenTestingData}); export const peachpaymentsCardOnFileTransactionType = z.enum(["one_off", "customer_initiated_transaction", "merchant_initiated_mandate", "merchant_initiated_transaction"]); export const peachpaymentsData = z.object({rrn: z.string().nullable().optional(), card_on_file_transaction_type: peachpaymentsCardOnFileTransactionType.nullable().optional()}); export const discountType = z.enum(["standard", "fixed_date", "daily_calendar", "daily_business"]); export const discountTier = z.object({amount: z.string().nullable().optional(), end_date: z.string().nullable().optional()}); export const santanderPaymentDiscountRules = z.object({discount_type: discountType.nullable().optional(), tiers: z.array(discountTier)}); export const penaltyDetail = z.object({value: z.string().nullable().optional(), grace_period_days: z.number().int().gte(0).nullable().optional()}); export const interestDetail = z.object({interest_percentage: z.string().nullable().optional(), iof_percentage: z.string().nullable().optional()}); export const penaltyRules = z.object({fixed_penalty: penaltyDetail.nullable().optional(), interest: interestDetail.nullable().optional()}); export const protestType = z.enum(["disabled", "calendar_days", "business_days", "contract_default"]); export const protestRules = z.object({protest_type: protestType, days_after_due_date: z.number().int().gte(0)}); export const collectionActions = z.object({legal_protest: protestRules.nullable().optional(), auto_write_off_days: z.number().int().gte(0).nullable().optional()}); export const calculationType = z.enum(["percentage", "flat_amount"]); export const flexibleAmountDetails = z.object({min_value: z.string().nullable().optional(), max_value: z.string().nullable().optional(), value_type: calculationType.nullable().optional()}); export const installmentDetails = z.object({max_partial_payments: z.number().int().gte(0).nullable().optional(), value_type: calculationType.nullable().optional()}); export const boletoPaymentTypeConstraints = z.discriminatedUnion("type", [z.object({type: z.literal("fixed_amount")}), z.object({type: z.literal("flexible_amount"), details: flexibleAmountDetails}), z.object({type: z.literal("installment"), details: installmentDetails})]); export const beneficiaryDetails = z.object({name: z.string().nullable().optional(), document_number: z.string().nullable().optional(), document_type: documentKind.nullable().optional()}); export const boletoDocumentKind = z.enum(["commercial_invoice", "service_invoice", "promissory_note", "rural_promissory_note", "receipt", "insurance_policy", "credit_card_invoice", "proposal", "deposit_or_funding", "cheque", "direct_promissory_note", "other"]); export const santanderBoletoData = z.object({discount_rules: santanderPaymentDiscountRules.nullable().optional(), penalties: penaltyRules.nullable().optional(), collection_actions: collectionActions.nullable().optional(), payment_constraints: boletoPaymentTypeConstraints.nullable().optional(), beneficiary: beneficiaryDetails.nullable().optional(), document_kind: boletoDocumentKind.nullable().optional()}); export const santanderConnectorMetadataData = z.object({boleto: santanderBoletoData.nullable().optional()}); export const connectorMetadata = z.object({apple_pay: applepayConnectorMetadataRequest.nullable().optional(), airwallex: airwallexData.nullable().optional(), noon: noonData.nullable().optional(), braintree: braintreeData.nullable().optional(), adyen: adyenConnectorMetadata.nullable().optional(), peachpayments: peachpaymentsData.nullable().optional(), santander: santanderConnectorMetadataData.nullable().optional()}); export const santanderData = z.object({end_to_end_id: z.string().nullable().optional()}); export const connectorMetadataResponse = z.object({santander: santanderData}); export const redirectResponse = z.object({param: z.string().nullable().optional(), json_payload: z.object({}).nullable().optional()}); export const applePayRegularBillingDetails = z.object({label: z.string(), recurring_payment_start_date: z.string().nullable().optional(), recurring_payment_end_date: z.string().nullable().optional(), recurring_payment_interval_unit: recurringPaymentIntervalUnit.nullable().optional(), recurring_payment_interval_count: z.number().int().nullable().optional()}); export const applePayRecurringDetails = z.object({payment_description: z.string(), regular_billing: applePayRegularBillingDetails, billing_agreement: z.string().nullable().optional(), management_url: z.string()}); export const pixKey = z.discriminatedUnion("type", [z.object({type: z.literal("cpf"), value: z.string()}), z.object({type: z.literal("cnpj"), value: z.string()}), z.object({type: z.literal("email"), value: z.string()}), z.object({type: z.literal("phone"), value: z.string()}), z.object({type: z.literal("evp_token"), value: z.string()})]); export const immediateExpirationTime = z.object({time: z.number().int().gte(0), pix_key: pixKey.nullable().optional()}); export const scheduledExpirationTime = z.object({date: z.string(), validity_after_expiration: z.number().int().gte(0).nullable().optional(), pix_key: pixKey.nullable().optional()}); export const pixAdditionalDetails = z.union([z.object({immediate: immediateExpirationTime}), z.object({scheduled: scheduledExpirationTime})]); export const boletoPaymentType = z.enum(["fixed_amount", "flexible_amount", "installment"]); export const boletoAdditionalDetails = z.object({due_date: z.string().nullable().optional(), document_kind: boletoDocumentKind.nullable().optional(), payment_type: boletoPaymentType.nullable().optional(), covenant_code: z.string().nullable().optional(), pix_key: pixKey.nullable().optional(), discount_rules: santanderPaymentDiscountRules.nullable().optional(), penalties: penaltyRules.nullable().optional(), collection_actions: collectionActions.nullable().optional(), payment_constraints: boletoPaymentTypeConstraints.nullable().optional(), beneficiary: beneficiaryDetails.nullable().optional()}); export const santanderMandatePeriodicity = z.enum(["weekly", "monthly", "quarterly", "semiannually", "annually"]); export const santanderMandateDetails = z.object({fixed_recurring_amount: z.number().int().gte(0).nullable().optional(), min_recurring_amount: z.number().int().gte(0).nullable().optional(), start_date: z.string().nullable().optional(), end_date: z.string().nullable().optional(), periodicity: santanderMandatePeriodicity.nullable().optional()}); export const accountType = z.enum(["current", "savings", "payment"]); export const santanderPixAutomaticoReceiverDetails = z.object({branch_code: z.string().nullable().optional(), account_number: z.string().nullable().optional(), account_type: accountType.nullable().optional()}); export const pixAutomaticoAdditionalDetails = z.discriminatedUnion("type", [z.object({time: z.number().int().gte(0), retry_policy: z.boolean().nullable().optional(), mandate_details: santanderMandateDetails.nullable().optional(), type: z.literal("pix_automatico_push")}), z.object({retry_policy: z.boolean().nullable().optional(), mandate_details: santanderMandateDetails.nullable().optional(), type: z.literal("pix_automatico_qr")}), z.object({receiver_details: santanderPixAutomaticoReceiverDetails.nullable().optional(), mandate_execution_date: z.string().nullable().optional(), auto_adjust_date: z.boolean().nullable().optional(), type: z.literal("pix_automatico_mit")})]); export const finixAdditionalDetails = z.object({fraud_session_id: z.string().nullable().optional()}); export const featureMetadata = z.object({redirect_response: redirectResponse.nullable().optional(), search_tags: z.array(z.string()).nullable().optional(), apple_pay_recurring_details: applePayRecurringDetails.nullable().optional(), pix_additional_details: pixAdditionalDetails.nullable().optional(), boleto_additional_details: boletoAdditionalDetails.nullable().optional(), pix_automatico_additional_details: pixAutomaticoAdditionalDetails.nullable().optional(), finix_additional_details: finixAdditionalDetails.nullable().optional()}); export const paymentLinkResponse = z.object({link: z.string(), secure_link: z.string().nullable().optional(), payment_link_id: z.string()}); export const requestSurchargeDetails = z.object({surcharge_amount: z.number().int(), tax_amount: minorUnit.nullable().optional()}); export const authorizationStatus = z.enum(["success", "failure", "processing", "unresolved"]); export const incrementalAuthorizationResponse = z.object({authorization_id: z.string(), amount: z.number().int(), status: authorizationStatus, error_code: z.string().nullable().optional(), error_message: z.string().nullable().optional(), previously_authorized_amount: minorUnit}); export const decoupledAuthenticationType = z.enum(["challenge", "frictionless"]); export const authenticationStatus = z.enum(["started", "pending", "success", "failed"]); export const externalAuthenticationDetailsResponse = z.object({authentication_flow: decoupledAuthenticationType.nullable().optional(), electronic_commerce_indicator: z.string().nullable().optional(), status: authenticationStatus, ds_transaction_id: z.string().nullable().optional(), version: z.string().nullable().optional(), error_code: z.string().nullable().optional(), error_message: z.string().nullable().optional(), challenge_cancel_code: z.string().nullable().optional(), trans_status_reason: z.string().nullable().optional()}); export const browserInformation = z.object({color_depth: z.number().int().gte(0).nullable().optional(), java_enabled: z.boolean().nullable().optional(), java_script_enabled: z.boolean().nullable().optional(), language: z.string().nullable().optional(), screen_height: z.number().int().gte(0).nullable().optional(), screen_width: z.number().int().gte(0).nullable().optional(), time_zone: z.number().int().nullable().optional(), ip_address: z.string().nullable().optional(), accept_header: z.string().nullable().optional(), user_agent: z.string().nullable().optional(), os_type: z.string().nullable().optional(), os_version: z.string().nullable().optional(), device_model: z.string().nullable().optional(), accept_language: z.string().nullable().optional(), referer: z.string().nullable().optional()}); export const paymentChannel = z.union([z.literal("ecommerce"), z.literal("mail_order"), z.literal("telephone_order"), z.object({other: z.string()})]); export const paymentMethodStatus = z.enum(["active", "inactive", "processing", "awaiting_data", "new", "redacted"]); export const stripeChargeType = z.enum(["direct", "destination"]); export const paymentChargeType = z.object({Stripe: stripeChargeType}); export const stripeChargeResponseData = z.object({charge_id: z.string().nullable().optional(), charge_type: paymentChargeType, application_fees: z.number().int(), transfer_account_id: z.string(), on_behalf_of: z.string().nullable().optional()}); export const xenditSplitRoute = z.object({flat_amount: minorUnit.nullable().optional(), percent_amount: z.number().int().nullable().optional(), currency: currency, destination_account_id: z.string(), reference_id: z.string()}); export const xenditMultipleSplitResponse = z.object({split_rule_id: z.string(), for_user_id: z.string().nullable().optional(), name: z.string(), description: z.string(), routes: z.array(xenditSplitRoute)}); export const xenditChargeResponseData = z.union([z.object({multiple_splits: xenditMultipleSplitResponse}), z.object({single_split: xenditSplitSubMerchantData})]); export const connectorChargeResponseData = z.union([z.object({stripe_split_payment: stripeChargeResponseData}), z.object({adyen_split_payment: adyenSplitData}), z.object({xendit_split_payment: xenditChargeResponseData})]); export const cardDiscovery = z.enum(["manual", "saved_card", "click_to_pay"]); export const networkDetails = z.object({network_advice_code: z.string().nullable().optional()}); export const mitCategory = z.enum(["installment", "unscheduled", "recurring", "resubmission"]); export const billingDescriptor = z.object({name: z.string().nullable().optional(), city: z.string().nullable().optional(), phone: z.string().nullable().optional(), statement_descriptor: z.string().nullable().optional(), statement_descriptor_suffix: z.string().nullable().optional(), reference: z.string().nullable().optional()}); export const tokenization = z.enum(["skip_psp", "tokenize_at_psp"]); export const partnerApplicationDetails = z.object({name: z.string().nullable().optional(), version: z.string().nullable().optional(), integrator: z.string().nullable().optional()}); export const merchantApplicationDetails = z.object({name: z.string().nullable().optional(), version: z.string().nullable().optional()}); export const partnerMerchantIdentifierDetails = z.object({partner_details: partnerApplicationDetails.nullable().optional(), merchant_details: merchantApplicationDetails.nullable().optional()}); export const paymentMethodTokenizationDetails = z.object({payment_method_id: z.string(), payment_method_status: paymentMethodStatus.nullable().optional(), psp_tokenization: z.boolean(), network_tokenization: z.boolean(), network_transaction_id: z.string().nullable().optional(), network_transaction_link_id: z.string().nullable().optional(), is_eligible_for_mit_payment: z.boolean()}); export const billingFrequency = z.literal("month"); export const installmentOptionData = z.object({number_of_installments: z.string(), billing_frequency: billingFrequency, interest_rate: z.number()}); export const installmentOption = z.object({payment_method: paymentMethod, installments: z.array(installmentOptionData)}); export const installmentData = z.object({number_of_installments: z.number().int().gte(0), billing_frequency: billingFrequency, installment_interest: minorUnit.nullable().optional()}); export const paymentsCreateResponseOpenApi = z.object({payment_id: z.string().min(30).max(30), merchant_id: z.string().max(255), status: intentStatus, amount: z.number().int(), net_amount: z.number().int(), shipping_cost: z.number().int().nullable().optional(), amount_capturable: z.number().int().gte(100), amount_received: z.number().int().nullable().optional(), processor_merchant_id: z.string().max(255), initiator: initiator.nullable().optional(), sdk_authorization: z.string().nullable().optional(), connector: z.string().nullable().optional(), state_metadata: paymentIntentStateMetadata.nullable().optional(), client_secret: z.string().nullable().optional(), created: z.string().nullable().optional(), modified_at: z.string().nullable().optional(), connector_customer_id: z.string().nullable().optional(), currency: currency, customer_id: z.string().min(1).max(64).nullable().optional(), description: z.string().nullable().optional(), refunds: z.array(refundResponse).nullable().optional(), disputes: z.array(disputeResponsePaymentsRetrieve).nullable().optional(), attempts: z.array(paymentAttemptResponse).nullable().optional(), captures: z.array(captureResponse).nullable().optional(), mandate_id: z.string().max(255).nullable().optional(), mandate_data: mandateData.nullable().optional(), setup_future_usage: futureUsage.nullable().optional(), off_session: z.boolean().nullable().optional(), capture_method: captureMethod.nullable().optional(), payment_method: paymentMethod, payment_method_data: paymentMethodDataResponseWithBilling.nullable().optional(), payment_token: z.string().nullable().optional(), shipping: address.nullable().optional(), billing: address.nullable().optional(), order_details: z.array(orderDetailsWithAmount).nullable().optional(), email: z.string().max(255).nullable().optional(), name: z.string().max(255).nullable().optional(), phone: z.string().max(255).nullable().optional(), return_url: z.string().nullable().optional(), authentication_type: authenticationType.nullable().optional(), statement_descriptor_name: z.string().max(255).nullable().optional(), statement_descriptor_suffix: z.string().max(255).nullable().optional(), next_action: nextActionData.nullable().optional(), cancellation_reason: z.string().nullable().optional(), error_code: z.string().nullable().optional(), error_message: z.string().nullable().optional(), error_details: paymentErrorDetails.nullable().optional(), payment_experience: paymentExperience.nullable().optional(), payment_method_type: paymentMethodType.nullable().optional(), connector_label: z.string().nullable().optional(), business_country: countryAlpha2.nullable().optional(), business_label: z.string().nullable().optional(), business_sub_label: z.string().nullable().optional(), allowed_payment_method_types: z.array(paymentMethodType).nullable().optional(), manual_retry_allowed: z.boolean().nullable().optional(), connector_transaction_id: z.string().nullable().optional(), frm_message: frmMessage.nullable().optional(), metadata: z.object({}).nullable().optional(), connector_metadata: connectorMetadata.nullable().optional(), connector_response_metadata: connectorMetadataResponse.nullable().optional(), feature_metadata: featureMetadata.nullable().optional(), reference_id: z.string().nullable().optional(), payment_link: paymentLinkResponse.nullable().optional(), profile_id: z.string().nullable().optional(), surcharge_details: requestSurchargeDetails.nullable().optional(), attempt_count: z.number().int(), merchant_decision: z.string().nullable().optional(), merchant_connector_id: z.string().nullable().optional(), incremental_authorization_allowed: z.boolean().nullable().optional(), authorization_count: z.number().int().nullable().optional(), incremental_authorizations: z.array(incrementalAuthorizationResponse).nullable().optional(), external_authentication_details: externalAuthenticationDetailsResponse.nullable().optional(), external_3ds_authentication_attempted: z.boolean().nullable().optional(), expires_on: z.string().nullable().optional(), fingerprint: z.string().nullable().optional(), browser_info: browserInformation.nullable().optional(), payment_channel: paymentChannel.nullable().optional(), payment_method_id: z.string().nullable().optional(), network_transaction_id: z.string().nullable().optional(), network_transaction_link_id: z.string().nullable().optional(), payment_method_status: paymentMethodStatus.nullable().optional(), updated: z.string().nullable().optional(), split_payments: connectorChargeResponseData.nullable().optional(), frm_metadata: z.object({}).nullable().optional(), extended_authorization_applied: z.boolean().nullable().optional(), extended_authorization_last_applied_at: z.string().nullable().optional(), request_extended_authorization: z.boolean().nullable().optional(), capture_before: z.string().nullable().optional(), merchant_order_reference_id: z.string().max(255).nullable().optional(), order_tax_amount: minorUnit.nullable().optional(), connector_mandate_id: z.string().nullable().optional(), card_discovery: cardDiscovery.nullable().optional(), force_3ds_challenge: z.boolean().nullable().optional(), force_3ds_challenge_trigger: z.boolean().nullable().optional(), issuer_error_code: z.string().nullable().optional(), issuer_error_message: z.string().nullable().optional(), is_iframe_redirection_enabled: z.boolean().nullable().optional(), whole_connector_response: z.string().nullable().optional(), enable_partial_authorization: z.boolean().nullable().optional(), enable_overcapture: z.boolean().nullable().optional(), is_overcapture_enabled: z.boolean().nullable().optional(), network_details: networkDetails.nullable().optional(), is_stored_credential: z.boolean().nullable().optional(), mit_category: mitCategory.nullable().optional(), billing_descriptor: billingDescriptor.nullable().optional(), tokenization: tokenization.nullable().optional(), partner_merchant_identifier_details: partnerMerchantIdentifierDetails.nullable().optional(), payment_method_tokenization_details: paymentMethodTokenizationDetails.nullable().optional(), installment_options: z.array(installmentOption).nullable().optional(), installment_data: installmentData.nullable().optional(), sender_payment_instrument_id: z.string().max(255).nullable().optional()}); export const validateResponse = async ( schema: { readonly '~standard': { readonly validate: (value: unknown) => ({ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }) | Promise<{ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }> } }, value: unknown ): Promise => { const result = await schema['~standard'].validate(value) if (result.issues !== undefined) { const detail = result.issues .map(({ message, path }) => path?.length ? `${path.map((segment) => String(typeof segment === 'object' ? segment.key : segment)).join('.')}: ${message}` : message ) .join('; ') throw new Error(`Response does not match the schema: ${detail}`, { cause: { issues: result.issues } }) } return result.value }; /** * Payments - Create * * POST /payments */ export const createApiPayments = async (args: CreateApiPaymentsArgs, options: CreateApiPaymentsOptions) => { const {baseUrl, fetch: fetchFn = fetch, apiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (apiKey !== undefined) headers.set("Authorization", apiKey) const url = `${baseUrl.replace(/\/+$/, '')}/payments${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return validateResponse(paymentsCreateResponseOpenApi, await res.json()) };