From ce54afe348a30e5ee892f58b4843f5be289b8445 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 21 Mar 2024 21:10:09 +0000 Subject: [PATCH 1/3] Update generated code (#2040) * Update generated code for v881 * Update generated code for v883 * Update generated code for v884 * Update generated code for v888 * Update generated code for v889 * Update generated code for v890 * Update generated code for v890 * Update generated code for v891 * Update generated code for v894 * Update generated code for v895 * Update generated code for v896 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- src/resources.ts | 7 + src/resources/ConfirmationTokens.ts | 10 + src/resources/Forwarding/Requests.ts | 16 + .../TestHelpers/ConfirmationTokens.ts | 10 + .../resources/generated_examples_test.spec.js | 2 +- types/Accounts.d.ts | 7 + types/AccountsResource.d.ts | 24 + types/Charges.d.ts | 40 + types/ConfirmationTokens.d.ts | 1168 +++++++++++++++++ types/ConfirmationTokensResource.d.ts | 27 + types/CustomersResource.d.ts | 1 + types/Forwarding/Requests.d.ts | 162 +++ types/Forwarding/RequestsResource.d.ts | 126 ++ types/Invoices.d.ts | 4 + types/PaymentIntents.d.ts | 22 + types/PaymentIntentsResource.d.ts | 119 ++ types/PaymentMethods.d.ts | 5 + types/PaymentMethodsResource.d.ts | 9 + types/Products.d.ts | 4 +- types/ProductsResource.d.ts | 8 +- types/QuotesResource.d.ts | 2 +- types/SetupAttempts.d.ts | 4 + types/SetupIntents.d.ts | 4 + types/SetupIntentsResource.d.ts | 38 + types/Subscriptions.d.ts | 8 +- types/SubscriptionsResource.d.ts | 2 +- types/Terminal/Configurations.d.ts | 5 + types/Terminal/ConfigurationsResource.d.ts | 10 + .../ConfirmationTokensResource.d.ts | 645 +++++++++ types/Treasury/ReceivedDebits.d.ts | 5 + types/index.d.ts | 10 + 32 files changed, 2493 insertions(+), 13 deletions(-) create mode 100644 src/resources/ConfirmationTokens.ts create mode 100644 src/resources/Forwarding/Requests.ts create mode 100644 src/resources/TestHelpers/ConfirmationTokens.ts create mode 100644 types/ConfirmationTokens.d.ts create mode 100644 types/ConfirmationTokensResource.d.ts create mode 100644 types/Forwarding/Requests.d.ts create mode 100644 types/Forwarding/RequestsResource.d.ts create mode 100644 types/TestHelpers/ConfirmationTokensResource.d.ts diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0963e32fcd..62a99e0ea9 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v878 \ No newline at end of file +v896 \ No newline at end of file diff --git a/src/resources.ts b/src/resources.ts index 62948b68e1..5c3abd6cd7 100644 --- a/src/resources.ts +++ b/src/resources.ts @@ -10,6 +10,7 @@ import {Cards as TestHelpersIssuingCards} from './resources/TestHelpers/Issuing/ import {Cards as IssuingCards} from './resources/Issuing/Cards.js'; import {Configurations as BillingPortalConfigurations} from './resources/BillingPortal/Configurations.js'; import {Configurations as TerminalConfigurations} from './resources/Terminal/Configurations.js'; +import {ConfirmationTokens as TestHelpersConfirmationTokens} from './resources/TestHelpers/ConfirmationTokens.js'; import {ConnectionTokens as TerminalConnectionTokens} from './resources/Terminal/ConnectionTokens.js'; import {CreditReversals as TreasuryCreditReversals} from './resources/Treasury/CreditReversals.js'; import {Customers as TestHelpersCustomers} from './resources/TestHelpers/Customers.js'; @@ -39,6 +40,7 @@ import {Refunds as TestHelpersRefunds} from './resources/TestHelpers/Refunds.js' import {Registrations as TaxRegistrations} from './resources/Tax/Registrations.js'; import {ReportRuns as ReportingReportRuns} from './resources/Reporting/ReportRuns.js'; import {ReportTypes as ReportingReportTypes} from './resources/Reporting/ReportTypes.js'; +import {Requests as ForwardingRequests} from './resources/Forwarding/Requests.js'; import {ScheduledQueryRuns as SigmaScheduledQueryRuns} from './resources/Sigma/ScheduledQueryRuns.js'; import {Secrets as AppsSecrets} from './resources/Apps/Secrets.js'; import {Sessions as BillingPortalSessions} from './resources/BillingPortal/Sessions.js'; @@ -67,6 +69,7 @@ export {ApplicationFees} from './resources/ApplicationFees.js'; export {Balance} from './resources/Balance.js'; export {BalanceTransactions} from './resources/BalanceTransactions.js'; export {Charges} from './resources/Charges.js'; +export {ConfirmationTokens} from './resources/ConfirmationTokens.js'; export {CountrySpecs} from './resources/CountrySpecs.js'; export {Coupons} from './resources/Coupons.js'; export {CreditNotes} from './resources/CreditNotes.js'; @@ -127,6 +130,9 @@ export const FinancialConnections = resourceNamespace('financialConnections', { Sessions: FinancialConnectionsSessions, Transactions: FinancialConnectionsTransactions, }); +export const Forwarding = resourceNamespace('forwarding', { + Requests: ForwardingRequests, +}); export const Identity = resourceNamespace('identity', { VerificationReports: IdentityVerificationReports, VerificationSessions: IdentityVerificationSessions, @@ -166,6 +172,7 @@ export const Terminal = resourceNamespace('terminal', { Readers: TerminalReaders, }); export const TestHelpers = resourceNamespace('testHelpers', { + ConfirmationTokens: TestHelpersConfirmationTokens, Customers: TestHelpersCustomers, Refunds: TestHelpersRefunds, TestClocks: TestHelpersTestClocks, diff --git a/src/resources/ConfirmationTokens.ts b/src/resources/ConfirmationTokens.ts new file mode 100644 index 0000000000..6be25b7133 --- /dev/null +++ b/src/resources/ConfirmationTokens.ts @@ -0,0 +1,10 @@ +// File generated from our OpenAPI spec + +import {StripeResource} from '../StripeResource.js'; +const stripeMethod = StripeResource.method; +export const ConfirmationTokens = StripeResource.extend({ + retrieve: stripeMethod({ + method: 'GET', + fullPath: '/v1/confirmation_tokens/{confirmation_token}', + }), +}); diff --git a/src/resources/Forwarding/Requests.ts b/src/resources/Forwarding/Requests.ts new file mode 100644 index 0000000000..4ccb69aa9f --- /dev/null +++ b/src/resources/Forwarding/Requests.ts @@ -0,0 +1,16 @@ +// File generated from our OpenAPI spec + +import {StripeResource} from '../../StripeResource.js'; +const stripeMethod = StripeResource.method; +export const Requests = StripeResource.extend({ + create: stripeMethod({method: 'POST', fullPath: '/v1/forwarding/requests'}), + retrieve: stripeMethod({ + method: 'GET', + fullPath: '/v1/forwarding/requests/{id}', + }), + list: stripeMethod({ + method: 'GET', + fullPath: '/v1/forwarding/requests', + methodType: 'list', + }), +}); diff --git a/src/resources/TestHelpers/ConfirmationTokens.ts b/src/resources/TestHelpers/ConfirmationTokens.ts new file mode 100644 index 0000000000..4fe539aaaa --- /dev/null +++ b/src/resources/TestHelpers/ConfirmationTokens.ts @@ -0,0 +1,10 @@ +// File generated from our OpenAPI spec + +import {StripeResource} from '../../StripeResource.js'; +const stripeMethod = StripeResource.method; +export const ConfirmationTokens = StripeResource.extend({ + create: stripeMethod({ + method: 'POST', + fullPath: '/v1/test_helpers/confirmation_tokens', + }), +}); diff --git a/test/resources/generated_examples_test.spec.js b/test/resources/generated_examples_test.spec.js index ba5d878761..a6d33604b0 100644 --- a/test/resources/generated_examples_test.spec.js +++ b/test/resources/generated_examples_test.spec.js @@ -176,7 +176,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v1/accounts/acc_123', response: - '{"business_profile":{"annual_revenue":{"amount":1413853096,"currency":"currency","fiscal_year_end":"fiscal_year_end"},"estimated_worker_count":884794319,"mcc":"mcc","monthly_estimated_revenue":{"amount":1413853096,"currency":"currency"},"name":"name","product_description":"product_description","support_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"support_email":"support_email","support_phone":"support_phone","support_url":"support_url","url":"url"},"business_type":"government_entity","capabilities":{"acss_debit_payments":"inactive","affirm_payments":"pending","afterpay_clearpay_payments":"inactive","au_becs_debit_payments":"active","bacs_debit_payments":"active","bancontact_payments":"inactive","bank_transfer_payments":"pending","blik_payments":"inactive","boleto_payments":"inactive","card_issuing":"active","card_payments":"active","cartes_bancaires_payments":"active","cashapp_payments":"active","eps_payments":"inactive","fpx_payments":"active","giropay_payments":"active","grabpay_payments":"pending","ideal_payments":"inactive","india_international_payments":"inactive","jcb_payments":"inactive","klarna_payments":"active","konbini_payments":"active","legacy_payments":"active","link_payments":"inactive","oxxo_payments":"pending","p24_payments":"inactive","paynow_payments":"active","promptpay_payments":"active","revolut_pay_payments":"inactive","sepa_debit_payments":"inactive","sofort_payments":"active","swish_payments":"inactive","tax_reporting_us_1099_k":"inactive","tax_reporting_us_1099_misc":"pending","transfers":"inactive","treasury":"pending","us_bank_account_ach_payments":"pending","zip_payments":"pending"},"charges_enabled":true,"company":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"address_kana":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"address_kanji":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"directors_provided":true,"executives_provided":true,"export_license_id":"export_license_id","export_purpose_code":"export_purpose_code","name":"name","name_kana":"name_kana","name_kanji":"name_kanji","owners_provided":true,"ownership_declaration":{"date":"3076014","ip":"ip","user_agent":"user_agent"},"phone":"phone","structure":"single_member_llc","tax_id_provided":true,"tax_id_registrar":"tax_id_registrar","vat_id_provided":true,"verification":{"document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}}}},"controller":{"is_controller":true,"type":"account"},"country":"country","created":"1028554472","default_currency":"default_currency","details_submitted":true,"email":"email","external_accounts":null,"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"invalid_address_city_state_postal_code","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"id":"obj_123","individual":{"account":"account","additional_tos_acceptances":{"account":{"date":"3076014","ip":"ip","user_agent":"user_agent"}},"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"address_kana":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"address_kanji":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"created":"1028554472","dob":{"day":99228,"month":104080000,"year":3704893},"email":"email","first_name":"first_name","first_name_kana":"first_name_kana","first_name_kanji":"first_name_kanji","full_name_aliases":["full_name_aliases"],"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"currently_due":["currently_due"],"errors":[{"code":"invalid_address_city_state_postal_code","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"gender":"gender","id":"obj_123","id_number_provided":true,"id_number_secondary_provided":true,"last_name":"last_name","last_name_kana":"last_name_kana","last_name_kanji":"last_name_kanji","maiden_name":"maiden_name","metadata":{"undefined":"metadata"},"nationality":"nationality","object":"person","phone":"phone","political_exposure":"none","registered_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"relationship":{"director":true,"executive":true,"legal_guardian":true,"owner":true,"percent_ownership":760989685,"representative":true,"title":"title"},"requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"currently_due":["currently_due"],"errors":[{"code":"invalid_address_city_state_postal_code","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"ssn_last_4_provided":true,"verification":{"additional_document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}},"details":"details","details_code":"details_code","document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}},"status":"status"}},"metadata":{"undefined":"metadata"},"object":"account","payouts_enabled":true,"requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"invalid_address_city_state_postal_code","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"settings":{"bacs_debit_payments":{"display_name":"display_name","service_user_number":"service_user_number"},"branding":{"icon":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"logo":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"primary_color":"primary_color","secondary_color":"secondary_color"},"card_issuing":{"tos_acceptance":{"date":3076014,"ip":"ip","user_agent":"user_agent"}},"card_payments":{"decline_on":{"avs_failure":true,"cvc_failure":true},"statement_descriptor_prefix":"statement_descriptor_prefix","statement_descriptor_prefix_kana":"statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji":"statement_descriptor_prefix_kanji"},"dashboard":{"display_name":"display_name","timezone":"timezone"},"invoices":{"default_account_tax_ids":[{"country":"country","created":"1028554472","customer":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"balance":339185956,"cash_balance":{"available":{"undefined":733902135},"customer":"customer","livemode":true,"object":"cash_balance","settings":{"reconciliation_mode":"manual","using_merchant_default":true}},"created":"1028554472","currency":"currency","default_source":null,"delinquent":true,"description":"description","discount":{"checkout_session":"checkout_session","coupon":null,"customer":null,"end":"100571","id":"obj_123","invoice":"invoice","invoice_item":"invoice_item","object":"discount","promotion_code":null,"start":"109757538","subscription":"subscription"},"email":"email","id":"obj_123","invoice_credit_balance":{"undefined":1267696360},"invoice_prefix":"invoice_prefix","invoice_settings":{"custom_fields":[{"name":"name","value":"value"}],"default_payment_method":{"acss_debit":{"bank_name":"bank_name","fingerprint":"fingerprint","institution_number":"institution_number","last4":"last4","transit_number":"transit_number"},"affirm":{},"afterpay_clearpay":{},"alipay":{},"au_becs_debit":{"bsb_number":"bsb_number","fingerprint":"fingerprint","last4":"last4"},"bacs_debit":{"fingerprint":"fingerprint","last4":"last4","sort_code":"sort_code"},"bancontact":{},"billing_details":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","phone":"phone"},"blik":{},"boleto":{"tax_id":"tax_id"},"card":{"brand":"brand","checks":{"address_line1_check":"address_line1_check","address_postal_code_check":"address_postal_code_check","cvc_check":"cvc_check"},"country":"country","description":"description","display_brand":"display_brand","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"three_d_secure_usage":{"supported":true},"wallet":{"amex_express_checkout":{},"apple_pay":{},"dynamic_last4":"dynamic_last4","google_pay":{},"link":{},"masterpass":{"billing_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","shipping_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"}},"samsung_pay":{},"type":"link","visa_checkout":{"billing_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","shipping_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"}}}},"card_present":{"brand":"brand","cardholder_name":"cardholder_name","country":"country","description":"description","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"read_method":"magnetic_stripe_track2"},"cashapp":{"buyer_id":"buyer_id","cashtag":"cashtag"},"created":"1028554472","customer":null,"customer_balance":{},"eps":{"bank":"btv_vier_lander_bank"},"fpx":{"account_holder_type":"individual","bank":"bsn"},"giropay":{},"grabpay":{},"id":"obj_123","ideal":{"bank":"sns_bank","bic":"BUNQNL2A"},"interac_present":{"brand":"brand","cardholder_name":"cardholder_name","country":"country","description":"description","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"preferred_locales":["preferred_locales"],"read_method":"magnetic_stripe_track2"},"klarna":{"dob":{"day":99228,"month":104080000,"year":3704893}},"konbini":{},"link":{"email":"email","persistent_token":"persistent_token"},"livemode":true,"metadata":{"undefined":"metadata"},"object":"payment_method","oxxo":{},"p24":{"bank":"noble_pay"},"paynow":{},"paypal":{"payer_email":"payer_email","payer_id":"payer_id"},"pix":{},"promptpay":{},"radar_options":{"session":"session"},"revolut_pay":{},"sepa_debit":{"bank_code":"bank_code","branch_code":"branch_code","country":"country","fingerprint":"fingerprint","generated_from":{"charge":null,"setup_attempt":null},"last4":"last4"},"sofort":{"country":"country"},"swish":{},"type":"card_present","us_bank_account":{"account_holder_type":"individual","account_type":"checking","bank_name":"bank_name","financial_connections_account":"financial_connections_account","fingerprint":"fingerprint","last4":"last4","networks":{"preferred":"preferred","supported":["ach"]},"routing_number":"routing_number","status_details":{"blocked":{"network_code":"R29","reason":"bank_account_unusable"}}},"wechat_pay":{},"zip":{}},"footer":"footer","rendering_options":{"amount_tax_display":"amount_tax_display"}},"livemode":true,"metadata":{"undefined":"metadata"},"name":"name","next_invoice_sequence":1356358751,"object":"customer","phone":"phone","preferred_locales":["preferred_locales"],"shipping":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"carrier":"carrier","name":"name","phone":"phone","tracking_number":"tracking_number"},"sources":null,"subscriptions":null,"tax":{"automatic_tax":"unrecognized_location","ip_address":"ip_address","location":{"country":"country","source":"ip_address","state":"state"}},"tax_exempt":"reverse","tax_ids":null,"test_clock":{"created":"1028554472","deletes_after":"73213179","frozen_time":"2033541876","id":"obj_123","livemode":true,"name":"name","object":"test_helpers.test_clock","status":"advancing"}},"id":"obj_123","livemode":true,"object":"tax_id","owner":{"account":{"business_profile":{"annual_revenue":{"amount":1413853096,"currency":"currency","fiscal_year_end":"fiscal_year_end"},"estimated_worker_count":884794319,"mcc":"mcc","monthly_estimated_revenue":{"amount":1413853096,"currency":"currency"},"name":"name","product_description":"product_description","support_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"support_email":"support_email","support_phone":"support_phone","support_url":"support_url","url":"url"},"business_type":"government_entity","capabilities":{"acss_debit_payments":"inactive","affirm_payments":"pending","afterpay_clearpay_payments":"inactive","au_becs_debit_payments":"active","bacs_debit_payments":"active","bancontact_payments":"inactive","bank_transfer_payments":"pending","blik_payments":"inactive","boleto_payments":"inactive","card_issuing":"active","card_payments":"active","cartes_bancaires_payments":"active","cashapp_payments":"active","eps_payments":"inactive","fpx_payments":"active","giropay_payments":"active","grabpay_payments":"pending","ideal_payments":"inactive","india_international_payments":"inactive","jcb_payments":"inactive","klarna_payments":"active","konbini_payments":"active","legacy_payments":"active","link_payments":"inactive","oxxo_payments":"pending","p24_payments":"inactive","paynow_payments":"active","promptpay_payments":"active","revolut_pay_payments":"inactive","sepa_debit_payments":"inactive","sofort_payments":"active","swish_payments":"inactive","tax_reporting_us_1099_k":"inactive","tax_reporting_us_1099_misc":"pending","transfers":"inactive","treasury":"pending","us_bank_account_ach_payments":"pending","zip_payments":"pending"},"charges_enabled":true,"company":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"address_kana":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"address_kanji":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"directors_provided":true,"executives_provided":true,"export_license_id":"export_license_id","export_purpose_code":"export_purpose_code","name":"name","name_kana":"name_kana","name_kanji":"name_kanji","owners_provided":true,"ownership_declaration":{"date":"3076014","ip":"ip","user_agent":"user_agent"},"phone":"phone","structure":"single_member_llc","tax_id_provided":true,"tax_id_registrar":"tax_id_registrar","vat_id_provided":true,"verification":{"document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}}}},"controller":{"is_controller":true,"type":"account"},"country":"country","created":"1028554472","default_currency":"default_currency","details_submitted":true,"email":"email","external_accounts":null,"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"invalid_address_city_state_postal_code","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"id":"obj_123","individual":{"account":"account","additional_tos_acceptances":{"account":{"date":"3076014","ip":"ip","user_agent":"user_agent"}},"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"address_kana":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"address_kanji":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"created":"1028554472","dob":{"day":99228,"month":104080000,"year":3704893},"email":"email","first_name":"first_name","first_name_kana":"first_name_kana","first_name_kanji":"first_name_kanji","full_name_aliases":["full_name_aliases"],"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"currently_due":["currently_due"],"errors":[{"code":"invalid_address_city_state_postal_code","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"gender":"gender","id":"obj_123","id_number_provided":true,"id_number_secondary_provided":true,"last_name":"last_name","last_name_kana":"last_name_kana","last_name_kanji":"last_name_kanji","maiden_name":"maiden_name","metadata":{"undefined":"metadata"},"nationality":"nationality","object":"person","phone":"phone","political_exposure":"none","registered_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"relationship":{"director":true,"executive":true,"legal_guardian":true,"owner":true,"percent_ownership":760989685,"representative":true,"title":"title"},"requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"currently_due":["currently_due"],"errors":[{"code":"invalid_address_city_state_postal_code","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"ssn_last_4_provided":true,"verification":{"additional_document":{"back":null,"details":"details","details_code":"details_code","front":null},"details":"details","details_code":"details_code","document":{"back":null,"details":"details","details_code":"details_code","front":null},"status":"status"}},"metadata":{"undefined":"metadata"},"object":"account","payouts_enabled":true,"requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"invalid_address_city_state_postal_code","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"settings":{"bacs_debit_payments":{"display_name":"display_name","service_user_number":"service_user_number"},"branding":{"icon":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"logo":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"primary_color":"primary_color","secondary_color":"secondary_color"},"card_issuing":{"tos_acceptance":{"date":3076014,"ip":"ip","user_agent":"user_agent"}},"card_payments":{"decline_on":{"avs_failure":true,"cvc_failure":true},"statement_descriptor_prefix":"statement_descriptor_prefix","statement_descriptor_prefix_kana":"statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji":"statement_descriptor_prefix_kanji"},"dashboard":{"display_name":"display_name","timezone":"timezone"},"invoices":{"default_account_tax_ids":[{"country":"country","created":"1028554472","customer":null,"id":"obj_123","livemode":true,"object":"tax_id","owner":{"account":null,"application":null,"customer":null,"type":"customer"},"type":"jp_cn","value":"value","verification":{"status":"unverified","verified_address":"verified_address","verified_name":"verified_name"}}]},"payments":{"statement_descriptor":"statement_descriptor","statement_descriptor_kana":"statement_descriptor_kana","statement_descriptor_kanji":"statement_descriptor_kanji","statement_descriptor_prefix_kana":"statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji":"statement_descriptor_prefix_kanji"},"payouts":{"debit_negative_balances":true,"schedule":{"delay_days":1647351405,"interval":"interval","monthly_anchor":1920305369,"weekly_anchor":"weekly_anchor"},"statement_descriptor":"statement_descriptor"},"sepa_debit_payments":{"creditor_id":"creditor_id"},"treasury":{"tos_acceptance":{"date":3076014,"ip":"ip","user_agent":"user_agent"}}},"tos_acceptance":{"date":"3076014","ip":"ip","service_agreement":"service_agreement","user_agent":"user_agent"},"type":"custom"},"application":{"id":"obj_123","name":"name","object":"application"},"customer":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"balance":339185956,"cash_balance":{"available":{"undefined":733902135},"customer":"customer","livemode":true,"object":"cash_balance","settings":{"reconciliation_mode":"manual","using_merchant_default":true}},"created":"1028554472","currency":"currency","default_source":null,"delinquent":true,"description":"description","discount":{"checkout_session":"checkout_session","coupon":null,"customer":null,"end":"100571","id":"obj_123","invoice":"invoice","invoice_item":"invoice_item","object":"discount","promotion_code":null,"start":"109757538","subscription":"subscription"},"email":"email","id":"obj_123","invoice_credit_balance":{"undefined":1267696360},"invoice_prefix":"invoice_prefix","invoice_settings":{"custom_fields":[{"name":"name","value":"value"}],"default_payment_method":{"acss_debit":{"bank_name":"bank_name","fingerprint":"fingerprint","institution_number":"institution_number","last4":"last4","transit_number":"transit_number"},"affirm":{},"afterpay_clearpay":{},"alipay":{},"au_becs_debit":{"bsb_number":"bsb_number","fingerprint":"fingerprint","last4":"last4"},"bacs_debit":{"fingerprint":"fingerprint","last4":"last4","sort_code":"sort_code"},"bancontact":{},"billing_details":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","phone":"phone"},"blik":{},"boleto":{"tax_id":"tax_id"},"card":{"brand":"brand","checks":{"address_line1_check":"address_line1_check","address_postal_code_check":"address_postal_code_check","cvc_check":"cvc_check"},"country":"country","description":"description","display_brand":"display_brand","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"three_d_secure_usage":{"supported":true},"wallet":{"amex_express_checkout":{},"apple_pay":{},"dynamic_last4":"dynamic_last4","google_pay":{},"link":{},"masterpass":{"billing_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","shipping_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"}},"samsung_pay":{},"type":"link","visa_checkout":{"billing_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","shipping_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"}}}},"card_present":{"brand":"brand","cardholder_name":"cardholder_name","country":"country","description":"description","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"read_method":"magnetic_stripe_track2"},"cashapp":{"buyer_id":"buyer_id","cashtag":"cashtag"},"created":"1028554472","customer":null,"customer_balance":{},"eps":{"bank":"btv_vier_lander_bank"},"fpx":{"account_holder_type":"individual","bank":"bsn"},"giropay":{},"grabpay":{},"id":"obj_123","ideal":{"bank":"sns_bank","bic":"BUNQNL2A"},"interac_present":{"brand":"brand","cardholder_name":"cardholder_name","country":"country","description":"description","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"preferred_locales":["preferred_locales"],"read_method":"magnetic_stripe_track2"},"klarna":{"dob":{"day":99228,"month":104080000,"year":3704893}},"konbini":{},"link":{"email":"email","persistent_token":"persistent_token"},"livemode":true,"metadata":{"undefined":"metadata"},"object":"payment_method","oxxo":{},"p24":{"bank":"noble_pay"},"paynow":{},"paypal":{"payer_email":"payer_email","payer_id":"payer_id"},"pix":{},"promptpay":{},"radar_options":{"session":"session"},"revolut_pay":{},"sepa_debit":{"bank_code":"bank_code","branch_code":"branch_code","country":"country","fingerprint":"fingerprint","generated_from":{"charge":null,"setup_attempt":null},"last4":"last4"},"sofort":{"country":"country"},"swish":{},"type":"card_present","us_bank_account":{"account_holder_type":"individual","account_type":"checking","bank_name":"bank_name","financial_connections_account":"financial_connections_account","fingerprint":"fingerprint","last4":"last4","networks":{"preferred":"preferred","supported":["ach"]},"routing_number":"routing_number","status_details":{"blocked":{"network_code":"R29","reason":"bank_account_unusable"}}},"wechat_pay":{},"zip":{}},"footer":"footer","rendering_options":{"amount_tax_display":"amount_tax_display"}},"livemode":true,"metadata":{"undefined":"metadata"},"name":"name","next_invoice_sequence":1356358751,"object":"customer","phone":"phone","preferred_locales":["preferred_locales"],"shipping":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"carrier":"carrier","name":"name","phone":"phone","tracking_number":"tracking_number"},"sources":null,"subscriptions":null,"tax":{"automatic_tax":"unrecognized_location","ip_address":"ip_address","location":{"country":"country","source":"ip_address","state":"state"}},"tax_exempt":"reverse","tax_ids":null,"test_clock":{"created":"1028554472","deletes_after":"73213179","frozen_time":"2033541876","id":"obj_123","livemode":true,"name":"name","object":"test_helpers.test_clock","status":"advancing"}},"type":"customer"},"type":"jp_cn","value":"value","verification":{"status":"unverified","verified_address":"verified_address","verified_name":"verified_name"}}]},"payments":{"statement_descriptor":"statement_descriptor","statement_descriptor_kana":"statement_descriptor_kana","statement_descriptor_kanji":"statement_descriptor_kanji","statement_descriptor_prefix_kana":"statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji":"statement_descriptor_prefix_kanji"},"payouts":{"debit_negative_balances":true,"schedule":{"delay_days":1647351405,"interval":"interval","monthly_anchor":1920305369,"weekly_anchor":"weekly_anchor"},"statement_descriptor":"statement_descriptor"},"sepa_debit_payments":{"creditor_id":"creditor_id"},"treasury":{"tos_acceptance":{"date":3076014,"ip":"ip","user_agent":"user_agent"}}},"tos_acceptance":{"date":"3076014","ip":"ip","service_agreement":"service_agreement","user_agent":"user_agent"},"type":"custom"}', + '{"business_profile":{"annual_revenue":{"amount":1413853096,"currency":"currency","fiscal_year_end":"fiscal_year_end"},"estimated_worker_count":884794319,"mcc":"mcc","monthly_estimated_revenue":{"amount":1413853096,"currency":"currency"},"name":"name","product_description":"product_description","support_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"support_email":"support_email","support_phone":"support_phone","support_url":"support_url","url":"url"},"business_type":"government_entity","capabilities":{"acss_debit_payments":"inactive","affirm_payments":"pending","afterpay_clearpay_payments":"inactive","au_becs_debit_payments":"active","bacs_debit_payments":"active","bancontact_payments":"inactive","bank_transfer_payments":"pending","blik_payments":"inactive","boleto_payments":"inactive","card_issuing":"active","card_payments":"active","cartes_bancaires_payments":"active","cashapp_payments":"active","eps_payments":"inactive","fpx_payments":"active","giropay_payments":"active","grabpay_payments":"pending","ideal_payments":"inactive","india_international_payments":"inactive","jcb_payments":"inactive","klarna_payments":"active","konbini_payments":"active","legacy_payments":"active","link_payments":"inactive","mobilepay_payments":"pending","oxxo_payments":"pending","p24_payments":"inactive","paynow_payments":"active","promptpay_payments":"active","revolut_pay_payments":"inactive","sepa_debit_payments":"inactive","sofort_payments":"active","swish_payments":"inactive","tax_reporting_us_1099_k":"inactive","tax_reporting_us_1099_misc":"pending","transfers":"inactive","treasury":"pending","us_bank_account_ach_payments":"pending","zip_payments":"pending"},"charges_enabled":true,"company":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"address_kana":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"address_kanji":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"directors_provided":true,"executives_provided":true,"export_license_id":"export_license_id","export_purpose_code":"export_purpose_code","name":"name","name_kana":"name_kana","name_kanji":"name_kanji","owners_provided":true,"ownership_declaration":{"date":"3076014","ip":"ip","user_agent":"user_agent"},"phone":"phone","structure":"single_member_llc","tax_id_provided":true,"tax_id_registrar":"tax_id_registrar","vat_id_provided":true,"verification":{"document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}}}},"controller":{"is_controller":true,"type":"account"},"country":"country","created":"1028554472","default_currency":"default_currency","details_submitted":true,"email":"email","external_accounts":null,"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"invalid_address_city_state_postal_code","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"id":"obj_123","individual":{"account":"account","additional_tos_acceptances":{"account":{"date":"3076014","ip":"ip","user_agent":"user_agent"}},"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"address_kana":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"address_kanji":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"created":"1028554472","dob":{"day":99228,"month":104080000,"year":3704893},"email":"email","first_name":"first_name","first_name_kana":"first_name_kana","first_name_kanji":"first_name_kanji","full_name_aliases":["full_name_aliases"],"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"currently_due":["currently_due"],"errors":[{"code":"invalid_address_city_state_postal_code","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"gender":"gender","id":"obj_123","id_number_provided":true,"id_number_secondary_provided":true,"last_name":"last_name","last_name_kana":"last_name_kana","last_name_kanji":"last_name_kanji","maiden_name":"maiden_name","metadata":{"undefined":"metadata"},"nationality":"nationality","object":"person","phone":"phone","political_exposure":"none","registered_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"relationship":{"director":true,"executive":true,"legal_guardian":true,"owner":true,"percent_ownership":760989685,"representative":true,"title":"title"},"requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"currently_due":["currently_due"],"errors":[{"code":"invalid_address_city_state_postal_code","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"ssn_last_4_provided":true,"verification":{"additional_document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}},"details":"details","details_code":"details_code","document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}},"status":"status"}},"metadata":{"undefined":"metadata"},"object":"account","payouts_enabled":true,"requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"invalid_address_city_state_postal_code","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"settings":{"bacs_debit_payments":{"display_name":"display_name","service_user_number":"service_user_number"},"branding":{"icon":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"logo":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"primary_color":"primary_color","secondary_color":"secondary_color"},"card_issuing":{"tos_acceptance":{"date":3076014,"ip":"ip","user_agent":"user_agent"}},"card_payments":{"decline_on":{"avs_failure":true,"cvc_failure":true},"statement_descriptor_prefix":"statement_descriptor_prefix","statement_descriptor_prefix_kana":"statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji":"statement_descriptor_prefix_kanji"},"dashboard":{"display_name":"display_name","timezone":"timezone"},"invoices":{"default_account_tax_ids":[{"country":"country","created":"1028554472","customer":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"balance":339185956,"cash_balance":{"available":{"undefined":733902135},"customer":"customer","livemode":true,"object":"cash_balance","settings":{"reconciliation_mode":"manual","using_merchant_default":true}},"created":"1028554472","currency":"currency","default_source":null,"delinquent":true,"description":"description","discount":{"checkout_session":"checkout_session","coupon":null,"customer":null,"end":"100571","id":"obj_123","invoice":"invoice","invoice_item":"invoice_item","object":"discount","promotion_code":null,"start":"109757538","subscription":"subscription"},"email":"email","id":"obj_123","invoice_credit_balance":{"undefined":1267696360},"invoice_prefix":"invoice_prefix","invoice_settings":{"custom_fields":[{"name":"name","value":"value"}],"default_payment_method":{"acss_debit":{"bank_name":"bank_name","fingerprint":"fingerprint","institution_number":"institution_number","last4":"last4","transit_number":"transit_number"},"affirm":{},"afterpay_clearpay":{},"alipay":{},"au_becs_debit":{"bsb_number":"bsb_number","fingerprint":"fingerprint","last4":"last4"},"bacs_debit":{"fingerprint":"fingerprint","last4":"last4","sort_code":"sort_code"},"bancontact":{},"billing_details":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","phone":"phone"},"blik":{},"boleto":{"tax_id":"tax_id"},"card":{"brand":"brand","checks":{"address_line1_check":"address_line1_check","address_postal_code_check":"address_postal_code_check","cvc_check":"cvc_check"},"country":"country","description":"description","display_brand":"display_brand","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"three_d_secure_usage":{"supported":true},"wallet":{"amex_express_checkout":{},"apple_pay":{},"dynamic_last4":"dynamic_last4","google_pay":{},"link":{},"masterpass":{"billing_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","shipping_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"}},"samsung_pay":{},"type":"link","visa_checkout":{"billing_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","shipping_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"}}}},"card_present":{"brand":"brand","cardholder_name":"cardholder_name","country":"country","description":"description","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"read_method":"magnetic_stripe_track2"},"cashapp":{"buyer_id":"buyer_id","cashtag":"cashtag"},"created":"1028554472","customer":null,"customer_balance":{},"eps":{"bank":"btv_vier_lander_bank"},"fpx":{"account_holder_type":"individual","bank":"bsn"},"giropay":{},"grabpay":{},"id":"obj_123","ideal":{"bank":"sns_bank","bic":"BUNQNL2A"},"interac_present":{"brand":"brand","cardholder_name":"cardholder_name","country":"country","description":"description","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"preferred_locales":["preferred_locales"],"read_method":"magnetic_stripe_track2"},"klarna":{"dob":{"day":99228,"month":104080000,"year":3704893}},"konbini":{},"link":{"email":"email","persistent_token":"persistent_token"},"livemode":true,"metadata":{"undefined":"metadata"},"mobilepay":{},"object":"payment_method","oxxo":{},"p24":{"bank":"noble_pay"},"paynow":{},"paypal":{"payer_email":"payer_email","payer_id":"payer_id"},"pix":{},"promptpay":{},"radar_options":{"session":"session"},"revolut_pay":{},"sepa_debit":{"bank_code":"bank_code","branch_code":"branch_code","country":"country","fingerprint":"fingerprint","generated_from":{"charge":null,"setup_attempt":null},"last4":"last4"},"sofort":{"country":"country"},"swish":{},"type":"interac_present","us_bank_account":{"account_holder_type":"individual","account_type":"checking","bank_name":"bank_name","financial_connections_account":"financial_connections_account","fingerprint":"fingerprint","last4":"last4","networks":{"preferred":"preferred","supported":["ach"]},"routing_number":"routing_number","status_details":{"blocked":{"network_code":"R29","reason":"bank_account_unusable"}}},"wechat_pay":{},"zip":{}},"footer":"footer","rendering_options":{"amount_tax_display":"amount_tax_display"}},"livemode":true,"metadata":{"undefined":"metadata"},"name":"name","next_invoice_sequence":1356358751,"object":"customer","phone":"phone","preferred_locales":["preferred_locales"],"shipping":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"carrier":"carrier","name":"name","phone":"phone","tracking_number":"tracking_number"},"sources":null,"subscriptions":null,"tax":{"automatic_tax":"unrecognized_location","ip_address":"ip_address","location":{"country":"country","source":"ip_address","state":"state"}},"tax_exempt":"reverse","tax_ids":null,"test_clock":{"created":"1028554472","deletes_after":"73213179","frozen_time":"2033541876","id":"obj_123","livemode":true,"name":"name","object":"test_helpers.test_clock","status":"advancing"}},"id":"obj_123","livemode":true,"object":"tax_id","owner":{"account":{"business_profile":{"annual_revenue":{"amount":1413853096,"currency":"currency","fiscal_year_end":"fiscal_year_end"},"estimated_worker_count":884794319,"mcc":"mcc","monthly_estimated_revenue":{"amount":1413853096,"currency":"currency"},"name":"name","product_description":"product_description","support_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"support_email":"support_email","support_phone":"support_phone","support_url":"support_url","url":"url"},"business_type":"government_entity","capabilities":{"acss_debit_payments":"inactive","affirm_payments":"pending","afterpay_clearpay_payments":"inactive","au_becs_debit_payments":"active","bacs_debit_payments":"active","bancontact_payments":"inactive","bank_transfer_payments":"pending","blik_payments":"inactive","boleto_payments":"inactive","card_issuing":"active","card_payments":"active","cartes_bancaires_payments":"active","cashapp_payments":"active","eps_payments":"inactive","fpx_payments":"active","giropay_payments":"active","grabpay_payments":"pending","ideal_payments":"inactive","india_international_payments":"inactive","jcb_payments":"inactive","klarna_payments":"active","konbini_payments":"active","legacy_payments":"active","link_payments":"inactive","mobilepay_payments":"pending","oxxo_payments":"pending","p24_payments":"inactive","paynow_payments":"active","promptpay_payments":"active","revolut_pay_payments":"inactive","sepa_debit_payments":"inactive","sofort_payments":"active","swish_payments":"inactive","tax_reporting_us_1099_k":"inactive","tax_reporting_us_1099_misc":"pending","transfers":"inactive","treasury":"pending","us_bank_account_ach_payments":"pending","zip_payments":"pending"},"charges_enabled":true,"company":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"address_kana":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"address_kanji":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"directors_provided":true,"executives_provided":true,"export_license_id":"export_license_id","export_purpose_code":"export_purpose_code","name":"name","name_kana":"name_kana","name_kanji":"name_kanji","owners_provided":true,"ownership_declaration":{"date":"3076014","ip":"ip","user_agent":"user_agent"},"phone":"phone","structure":"single_member_llc","tax_id_provided":true,"tax_id_registrar":"tax_id_registrar","vat_id_provided":true,"verification":{"document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}}}},"controller":{"is_controller":true,"type":"account"},"country":"country","created":"1028554472","default_currency":"default_currency","details_submitted":true,"email":"email","external_accounts":null,"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"invalid_address_city_state_postal_code","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"id":"obj_123","individual":{"account":"account","additional_tos_acceptances":{"account":{"date":"3076014","ip":"ip","user_agent":"user_agent"}},"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"address_kana":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"address_kanji":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"created":"1028554472","dob":{"day":99228,"month":104080000,"year":3704893},"email":"email","first_name":"first_name","first_name_kana":"first_name_kana","first_name_kanji":"first_name_kanji","full_name_aliases":["full_name_aliases"],"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"currently_due":["currently_due"],"errors":[{"code":"invalid_address_city_state_postal_code","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"gender":"gender","id":"obj_123","id_number_provided":true,"id_number_secondary_provided":true,"last_name":"last_name","last_name_kana":"last_name_kana","last_name_kanji":"last_name_kanji","maiden_name":"maiden_name","metadata":{"undefined":"metadata"},"nationality":"nationality","object":"person","phone":"phone","political_exposure":"none","registered_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"relationship":{"director":true,"executive":true,"legal_guardian":true,"owner":true,"percent_ownership":760989685,"representative":true,"title":"title"},"requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"currently_due":["currently_due"],"errors":[{"code":"invalid_address_city_state_postal_code","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"ssn_last_4_provided":true,"verification":{"additional_document":{"back":null,"details":"details","details_code":"details_code","front":null},"details":"details","details_code":"details_code","document":{"back":null,"details":"details","details_code":"details_code","front":null},"status":"status"}},"metadata":{"undefined":"metadata"},"object":"account","payouts_enabled":true,"requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"invalid_address_city_state_postal_code","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"settings":{"bacs_debit_payments":{"display_name":"display_name","service_user_number":"service_user_number"},"branding":{"icon":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"logo":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"primary_color":"primary_color","secondary_color":"secondary_color"},"card_issuing":{"tos_acceptance":{"date":3076014,"ip":"ip","user_agent":"user_agent"}},"card_payments":{"decline_on":{"avs_failure":true,"cvc_failure":true},"statement_descriptor_prefix":"statement_descriptor_prefix","statement_descriptor_prefix_kana":"statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji":"statement_descriptor_prefix_kanji"},"dashboard":{"display_name":"display_name","timezone":"timezone"},"invoices":{"default_account_tax_ids":[{"country":"country","created":"1028554472","customer":null,"id":"obj_123","livemode":true,"object":"tax_id","owner":{"account":null,"application":null,"customer":null,"type":"customer"},"type":"jp_cn","value":"value","verification":{"status":"unverified","verified_address":"verified_address","verified_name":"verified_name"}}]},"payments":{"statement_descriptor":"statement_descriptor","statement_descriptor_kana":"statement_descriptor_kana","statement_descriptor_kanji":"statement_descriptor_kanji","statement_descriptor_prefix_kana":"statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji":"statement_descriptor_prefix_kanji"},"payouts":{"debit_negative_balances":true,"schedule":{"delay_days":1647351405,"interval":"interval","monthly_anchor":1920305369,"weekly_anchor":"weekly_anchor"},"statement_descriptor":"statement_descriptor"},"sepa_debit_payments":{"creditor_id":"creditor_id"},"treasury":{"tos_acceptance":{"date":3076014,"ip":"ip","user_agent":"user_agent"}}},"tos_acceptance":{"date":"3076014","ip":"ip","service_agreement":"service_agreement","user_agent":"user_agent"},"type":"custom"},"application":{"id":"obj_123","name":"name","object":"application"},"customer":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"balance":339185956,"cash_balance":{"available":{"undefined":733902135},"customer":"customer","livemode":true,"object":"cash_balance","settings":{"reconciliation_mode":"manual","using_merchant_default":true}},"created":"1028554472","currency":"currency","default_source":null,"delinquent":true,"description":"description","discount":{"checkout_session":"checkout_session","coupon":null,"customer":null,"end":"100571","id":"obj_123","invoice":"invoice","invoice_item":"invoice_item","object":"discount","promotion_code":null,"start":"109757538","subscription":"subscription"},"email":"email","id":"obj_123","invoice_credit_balance":{"undefined":1267696360},"invoice_prefix":"invoice_prefix","invoice_settings":{"custom_fields":[{"name":"name","value":"value"}],"default_payment_method":{"acss_debit":{"bank_name":"bank_name","fingerprint":"fingerprint","institution_number":"institution_number","last4":"last4","transit_number":"transit_number"},"affirm":{},"afterpay_clearpay":{},"alipay":{},"au_becs_debit":{"bsb_number":"bsb_number","fingerprint":"fingerprint","last4":"last4"},"bacs_debit":{"fingerprint":"fingerprint","last4":"last4","sort_code":"sort_code"},"bancontact":{},"billing_details":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","phone":"phone"},"blik":{},"boleto":{"tax_id":"tax_id"},"card":{"brand":"brand","checks":{"address_line1_check":"address_line1_check","address_postal_code_check":"address_postal_code_check","cvc_check":"cvc_check"},"country":"country","description":"description","display_brand":"display_brand","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"three_d_secure_usage":{"supported":true},"wallet":{"amex_express_checkout":{},"apple_pay":{},"dynamic_last4":"dynamic_last4","google_pay":{},"link":{},"masterpass":{"billing_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","shipping_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"}},"samsung_pay":{},"type":"link","visa_checkout":{"billing_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","shipping_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"}}}},"card_present":{"brand":"brand","cardholder_name":"cardholder_name","country":"country","description":"description","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"read_method":"magnetic_stripe_track2"},"cashapp":{"buyer_id":"buyer_id","cashtag":"cashtag"},"created":"1028554472","customer":null,"customer_balance":{},"eps":{"bank":"btv_vier_lander_bank"},"fpx":{"account_holder_type":"individual","bank":"bsn"},"giropay":{},"grabpay":{},"id":"obj_123","ideal":{"bank":"sns_bank","bic":"BUNQNL2A"},"interac_present":{"brand":"brand","cardholder_name":"cardholder_name","country":"country","description":"description","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"preferred_locales":["preferred_locales"],"read_method":"magnetic_stripe_track2"},"klarna":{"dob":{"day":99228,"month":104080000,"year":3704893}},"konbini":{},"link":{"email":"email","persistent_token":"persistent_token"},"livemode":true,"metadata":{"undefined":"metadata"},"mobilepay":{},"object":"payment_method","oxxo":{},"p24":{"bank":"noble_pay"},"paynow":{},"paypal":{"payer_email":"payer_email","payer_id":"payer_id"},"pix":{},"promptpay":{},"radar_options":{"session":"session"},"revolut_pay":{},"sepa_debit":{"bank_code":"bank_code","branch_code":"branch_code","country":"country","fingerprint":"fingerprint","generated_from":{"charge":null,"setup_attempt":null},"last4":"last4"},"sofort":{"country":"country"},"swish":{},"type":"interac_present","us_bank_account":{"account_holder_type":"individual","account_type":"checking","bank_name":"bank_name","financial_connections_account":"financial_connections_account","fingerprint":"fingerprint","last4":"last4","networks":{"preferred":"preferred","supported":["ach"]},"routing_number":"routing_number","status_details":{"blocked":{"network_code":"R29","reason":"bank_account_unusable"}}},"wechat_pay":{},"zip":{}},"footer":"footer","rendering_options":{"amount_tax_display":"amount_tax_display"}},"livemode":true,"metadata":{"undefined":"metadata"},"name":"name","next_invoice_sequence":1356358751,"object":"customer","phone":"phone","preferred_locales":["preferred_locales"],"shipping":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"carrier":"carrier","name":"name","phone":"phone","tracking_number":"tracking_number"},"sources":null,"subscriptions":null,"tax":{"automatic_tax":"unrecognized_location","ip_address":"ip_address","location":{"country":"country","source":"ip_address","state":"state"}},"tax_exempt":"reverse","tax_ids":null,"test_clock":{"created":"1028554472","deletes_after":"73213179","frozen_time":"2033541876","id":"obj_123","livemode":true,"name":"name","object":"test_helpers.test_clock","status":"advancing"}},"type":"customer"},"type":"jp_cn","value":"value","verification":{"status":"unverified","verified_address":"verified_address","verified_name":"verified_name"}}]},"payments":{"statement_descriptor":"statement_descriptor","statement_descriptor_kana":"statement_descriptor_kana","statement_descriptor_kanji":"statement_descriptor_kanji","statement_descriptor_prefix_kana":"statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji":"statement_descriptor_prefix_kanji"},"payouts":{"debit_negative_balances":true,"schedule":{"delay_days":1647351405,"interval":"interval","monthly_anchor":1920305369,"weekly_anchor":"weekly_anchor"},"statement_descriptor":"statement_descriptor"},"sepa_debit_payments":{"creditor_id":"creditor_id"},"treasury":{"tos_acceptance":{"date":3076014,"ip":"ip","user_agent":"user_agent"}}},"tos_acceptance":{"date":"3076014","ip":"ip","service_agreement":"service_agreement","user_agent":"user_agent"},"type":"custom"}', }, ]); const account = await stripe.accounts.retrieve('acc_123'); diff --git a/types/Accounts.d.ts b/types/Accounts.d.ts index 0f36f28007..ff3d612e60 100644 --- a/types/Accounts.d.ts +++ b/types/Accounts.d.ts @@ -328,6 +328,11 @@ declare module 'stripe' { */ link_payments?: Capabilities.LinkPayments; + /** + * The status of the MobilepPay capability of the account, or whether the account can directly process MobilePay charges. + */ + mobilepay_payments?: Capabilities.MobilepayPayments; + /** * The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. */ @@ -448,6 +453,8 @@ declare module 'stripe' { type LinkPayments = 'active' | 'inactive' | 'pending'; + type MobilepayPayments = 'active' | 'inactive' | 'pending'; + type OxxoPayments = 'active' | 'inactive' | 'pending'; type P24Payments = 'active' | 'inactive' | 'pending'; diff --git a/types/AccountsResource.d.ts b/types/AccountsResource.d.ts index 01349c1433..a131b6de6d 100644 --- a/types/AccountsResource.d.ts +++ b/types/AccountsResource.d.ts @@ -302,6 +302,11 @@ declare module 'stripe' { */ link_payments?: Capabilities.LinkPayments; + /** + * The mobilepay_payments capability. + */ + mobilepay_payments?: Capabilities.MobilepayPayments; + /** * The oxxo_payments capability. */ @@ -542,6 +547,13 @@ declare module 'stripe' { requested?: boolean; } + interface MobilepayPayments { + /** + * Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + */ + requested?: boolean; + } + interface OxxoPayments { /** * Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. @@ -1723,6 +1735,11 @@ declare module 'stripe' { */ link_payments?: Capabilities.LinkPayments; + /** + * The mobilepay_payments capability. + */ + mobilepay_payments?: Capabilities.MobilepayPayments; + /** * The oxxo_payments capability. */ @@ -1963,6 +1980,13 @@ declare module 'stripe' { requested?: boolean; } + interface MobilepayPayments { + /** + * Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + */ + requested?: boolean; + } + interface OxxoPayments { /** * Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. diff --git a/types/Charges.d.ts b/types/Charges.d.ts index 795df07ea1..db473234a8 100644 --- a/types/Charges.d.ts +++ b/types/Charges.d.ts @@ -414,6 +414,8 @@ declare module 'stripe' { link?: PaymentMethodDetails.Link; + mobilepay?: PaymentMethodDetails.Mobilepay; + multibanco?: PaymentMethodDetails.Multibanco; oxxo?: PaymentMethodDetails.Oxxo; @@ -1635,6 +1637,39 @@ declare module 'stripe' { country: string | null; } + interface Mobilepay { + card: Mobilepay.Card | null; + } + + namespace Mobilepay { + interface Card { + /** + * Brand of the card used in the transaction + */ + brand: string | null; + + /** + * Two-letter ISO code representing the country of the card + */ + country: string | null; + + /** + * Two digit number representing the card's expiration month + */ + exp_month: number | null; + + /** + * Two digit number representing the card's expiration year + */ + exp_year: number | null; + + /** + * The last 4 digits of the card + */ + last4: string | null; + } + } + interface Multibanco { /** * Entity number associated with this Multibanco payment. @@ -1929,6 +1964,11 @@ declare module 'stripe' { */ last4: string | null; + /** + * Reference number to locate ACH payments with customer's bank. + */ + payment_reference?: string | null; + /** * Routing number of the bank account. */ diff --git a/types/ConfirmationTokens.d.ts b/types/ConfirmationTokens.d.ts new file mode 100644 index 0000000000..10eea8358e --- /dev/null +++ b/types/ConfirmationTokens.d.ts @@ -0,0 +1,1168 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + /** + * ConfirmationTokens help transport client side data collected by Stripe JS over + * to your server for confirming a PaymentIntent or SetupIntent. If the confirmation + * is successful, values present on the ConfirmationToken are written onto the Intent. + * + * To learn more or request access, visit the related guided: [Finalize payments on the server using Confirmation Tokens](https://stripe.com/docs/payments/finalize-payments-on-the-server-confirmation-tokens). + */ + interface ConfirmationToken { + /** + * Unique identifier for the object. + */ + id: string; + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'confirmation_token'; + + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + + /** + * Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. This is set to null once this ConfirmationToken has been used. + */ + expires_at: number | null; + + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean; + + /** + * Data used for generating a Mandate. + */ + mandate_data?: ConfirmationToken.MandateData | null; + + /** + * ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + */ + payment_intent: string | null; + + /** + * Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. + */ + payment_method_preview: ConfirmationToken.PaymentMethodPreview | null; + + /** + * Return URL used to confirm the Intent. + */ + return_url: string | null; + + /** + * Indicates that you intend to make future payments with this ConfirmationToken's payment method. + * + * The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + */ + setup_future_usage: ConfirmationToken.SetupFutureUsage | null; + + /** + * ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + */ + setup_intent: string | null; + + /** + * Shipping information collected on this ConfirmationToken. + */ + shipping: ConfirmationToken.Shipping | null; + + /** + * Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken. + */ + use_stripe_sdk: boolean; + } + + namespace ConfirmationToken { + interface MandateData { + /** + * This hash contains details about the customer acceptance of the Mandate. + */ + customer_acceptance: MandateData.CustomerAcceptance; + } + + namespace MandateData { + interface CustomerAcceptance { + /** + * If this is a Mandate accepted online, this hash contains details about the online acceptance. + */ + online: CustomerAcceptance.Online | null; + + /** + * The type of customer acceptance information included with the Mandate. + */ + type: string; + } + + namespace CustomerAcceptance { + interface Online { + /** + * The IP address from which the Mandate was accepted by the customer. + */ + ip_address: string | null; + + /** + * The user agent of the browser from which the Mandate was accepted by the customer. + */ + user_agent: string | null; + } + } + } + + interface PaymentMethodPreview { + acss_debit?: PaymentMethodPreview.AcssDebit; + + affirm?: PaymentMethodPreview.Affirm; + + afterpay_clearpay?: PaymentMethodPreview.AfterpayClearpay; + + alipay?: PaymentMethodPreview.Alipay; + + au_becs_debit?: PaymentMethodPreview.AuBecsDebit; + + bacs_debit?: PaymentMethodPreview.BacsDebit; + + bancontact?: PaymentMethodPreview.Bancontact; + + billing_details: PaymentMethodPreview.BillingDetails; + + blik?: PaymentMethodPreview.Blik; + + boleto?: PaymentMethodPreview.Boleto; + + card?: PaymentMethodPreview.Card; + + card_present?: PaymentMethodPreview.CardPresent; + + cashapp?: PaymentMethodPreview.Cashapp; + + customer_balance?: PaymentMethodPreview.CustomerBalance; + + eps?: PaymentMethodPreview.Eps; + + fpx?: PaymentMethodPreview.Fpx; + + giropay?: PaymentMethodPreview.Giropay; + + grabpay?: PaymentMethodPreview.Grabpay; + + ideal?: PaymentMethodPreview.Ideal; + + interac_present?: PaymentMethodPreview.InteracPresent; + + klarna?: PaymentMethodPreview.Klarna; + + konbini?: PaymentMethodPreview.Konbini; + + link?: PaymentMethodPreview.Link; + + mobilepay?: PaymentMethodPreview.Mobilepay; + + oxxo?: PaymentMethodPreview.Oxxo; + + p24?: PaymentMethodPreview.P24; + + paynow?: PaymentMethodPreview.Paynow; + + paypal?: PaymentMethodPreview.Paypal; + + pix?: PaymentMethodPreview.Pix; + + promptpay?: PaymentMethodPreview.Promptpay; + + revolut_pay?: PaymentMethodPreview.RevolutPay; + + sepa_debit?: PaymentMethodPreview.SepaDebit; + + sofort?: PaymentMethodPreview.Sofort; + + swish?: PaymentMethodPreview.Swish; + + /** + * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + */ + type: PaymentMethodPreview.Type; + + us_bank_account?: PaymentMethodPreview.UsBankAccount; + + wechat_pay?: PaymentMethodPreview.WechatPay; + + zip?: PaymentMethodPreview.Zip; + } + + namespace PaymentMethodPreview { + interface AcssDebit { + /** + * Name of the bank associated with the bank account. + */ + bank_name: string | null; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Institution number of the bank account. + */ + institution_number: string | null; + + /** + * Last four digits of the bank account number. + */ + last4: string | null; + + /** + * Transit number of the bank account. + */ + transit_number: string | null; + } + + interface Affirm {} + + interface AfterpayClearpay {} + + interface Alipay {} + + interface AuBecsDebit { + /** + * Six-digit number identifying bank and branch associated with this bank account. + */ + bsb_number: string | null; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Last four digits of the bank account number. + */ + last4: string | null; + } + + interface BacsDebit { + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Last four digits of the bank account number. + */ + last4: string | null; + + /** + * Sort code of the bank account. (e.g., `10-20-30`) + */ + sort_code: string | null; + } + + interface Bancontact {} + + interface BillingDetails { + /** + * Billing address. + */ + address: Stripe.Address | null; + + /** + * Email address. + */ + email: string | null; + + /** + * Full name. + */ + name: string | null; + + /** + * Billing phone number (including extension). + */ + phone: string | null; + } + + interface Blik {} + + interface Boleto { + /** + * Uniquely identifies the customer tax id (CNPJ or CPF) + */ + tax_id: string; + } + + interface Card { + /** + * Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + brand: string; + + /** + * Checks on Card address and CVC if provided. + */ + checks: Card.Checks | null; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ + country: string | null; + + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ + description?: string | null; + + /** + * The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. + */ + display_brand: string | null; + + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number; + + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ + fingerprint?: string | null; + + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ + funding: string; + + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ + iin?: string | null; + + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ + issuer?: string | null; + + /** + * The last four digits of the card. + */ + last4: string; + + /** + * Contains information about card networks that can be used to process the payment. + */ + networks: Card.Networks | null; + + /** + * Contains details on how this Card may be used for 3D Secure authentication. + */ + three_d_secure_usage: Card.ThreeDSecureUsage | null; + + /** + * If this Card is part of a card wallet, this contains the details of the card wallet. + */ + wallet: Card.Wallet | null; + } + + namespace Card { + interface Checks { + /** + * If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ + address_line1_check: string | null; + + /** + * If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ + address_postal_code_check: string | null; + + /** + * If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + */ + cvc_check: string | null; + } + + interface Networks { + /** + * All available networks for the card. + */ + available: Array; + + /** + * The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. + */ + preferred: string | null; + } + + interface ThreeDSecureUsage { + /** + * Whether 3D Secure is supported on this card. + */ + supported: boolean; + } + + interface Wallet { + amex_express_checkout?: Wallet.AmexExpressCheckout; + + apple_pay?: Wallet.ApplePay; + + /** + * (For tokenized numbers only.) The last four digits of the device account number. + */ + dynamic_last4: string | null; + + google_pay?: Wallet.GooglePay; + + link?: Wallet.Link; + + masterpass?: Wallet.Masterpass; + + samsung_pay?: Wallet.SamsungPay; + + /** + * The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + */ + type: Wallet.Type; + + visa_checkout?: Wallet.VisaCheckout; + } + + namespace Wallet { + interface AmexExpressCheckout {} + + interface ApplePay {} + + interface GooglePay {} + + interface Link {} + + interface Masterpass { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + billing_address: Stripe.Address | null; + + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + email: string | null; + + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + name: string | null; + + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + shipping_address: Stripe.Address | null; + } + + interface SamsungPay {} + + type Type = + | 'amex_express_checkout' + | 'apple_pay' + | 'google_pay' + | 'link' + | 'masterpass' + | 'samsung_pay' + | 'visa_checkout'; + + interface VisaCheckout { + /** + * Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + billing_address: Stripe.Address | null; + + /** + * Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + email: string | null; + + /** + * Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + name: string | null; + + /** + * Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + shipping_address: Stripe.Address | null; + } + } + } + + interface CardPresent { + /** + * Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + */ + brand: string | null; + + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ + cardholder_name: string | null; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ + country: string | null; + + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ + description?: string | null; + + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number; + + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ + fingerprint: string | null; + + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ + funding: string | null; + + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ + iin?: string | null; + + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ + issuer?: string | null; + + /** + * The last four digits of the card. + */ + last4: string | null; + + /** + * Contains information about card networks that can be used to process the payment. + */ + networks: CardPresent.Networks | null; + + /** + * How card details were read in this transaction. + */ + read_method: CardPresent.ReadMethod | null; + } + + namespace CardPresent { + interface Networks { + /** + * All available networks for the card. + */ + available: Array; + + /** + * The preferred network for the card. + */ + preferred: string | null; + } + + type ReadMethod = + | 'contact_emv' + | 'contactless_emv' + | 'contactless_magstripe_mode' + | 'magnetic_stripe_fallback' + | 'magnetic_stripe_track2'; + } + + interface Cashapp { + /** + * A unique and immutable identifier assigned by Cash App to every buyer. + */ + buyer_id: string | null; + + /** + * A public identifier for buyers using Cash App. + */ + cashtag: string | null; + } + + interface CustomerBalance {} + + interface Eps { + /** + * The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + */ + bank: Eps.Bank | null; + } + + namespace Eps { + type Bank = + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau'; + } + + interface Fpx { + /** + * Account holder type, if provided. Can be one of `individual` or `company`. + */ + account_holder_type: Fpx.AccountHolderType | null; + + /** + * The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + */ + bank: Fpx.Bank; + } + + namespace Fpx { + type AccountHolderType = 'company' | 'individual'; + + type Bank = + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_of_china' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob'; + } + + interface Giropay {} + + interface Grabpay {} + + interface Ideal { + /** + * The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + */ + bank: Ideal.Bank | null; + + /** + * The Bank Identifier Code of the customer's bank, if the bank was provided. + */ + bic: Ideal.Bic | null; + } + + namespace Ideal { + type Bank = + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'n26' + | 'nn' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + | 'yoursafe'; + + type Bic = + | 'ABNANL2A' + | 'ASNBNL21' + | 'BITSNL2A' + | 'BUNQNL2A' + | 'FVLBNL22' + | 'HANDNL2A' + | 'INGBNL2A' + | 'KNABNL2H' + | 'MOYONL21' + | 'NNBANL2G' + | 'NTSBDEB1' + | 'RABONL2U' + | 'RBRBNL21' + | 'REVOIE23' + | 'REVOLT21' + | 'SNSBNL2A' + | 'TRIONL2U'; + } + + interface InteracPresent { + /** + * Card brand. Can be `interac`, `mastercard` or `visa`. + */ + brand: string | null; + + /** + * The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + */ + cardholder_name: string | null; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + */ + country: string | null; + + /** + * A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + */ + description?: string | null; + + /** + * Two-digit number representing the card's expiration month. + */ + exp_month: number; + + /** + * Four-digit number representing the card's expiration year. + */ + exp_year: number; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + */ + fingerprint: string | null; + + /** + * Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + */ + funding: string | null; + + /** + * Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + */ + iin?: string | null; + + /** + * The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + */ + issuer?: string | null; + + /** + * The last four digits of the card. + */ + last4: string | null; + + /** + * Contains information about card networks that can be used to process the payment. + */ + networks: InteracPresent.Networks | null; + + /** + * EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + */ + preferred_locales: Array | null; + + /** + * How card details were read in this transaction. + */ + read_method: InteracPresent.ReadMethod | null; + } + + namespace InteracPresent { + interface Networks { + /** + * All available networks for the card. + */ + available: Array; + + /** + * The preferred network for the card. + */ + preferred: string | null; + } + + type ReadMethod = + | 'contact_emv' + | 'contactless_emv' + | 'contactless_magstripe_mode' + | 'magnetic_stripe_fallback' + | 'magnetic_stripe_track2'; + } + + interface Klarna { + /** + * The customer's date of birth, if provided. + */ + dob: Klarna.Dob | null; + } + + namespace Klarna { + interface Dob { + /** + * The day of birth, between 1 and 31. + */ + day: number | null; + + /** + * The month of birth, between 1 and 12. + */ + month: number | null; + + /** + * The four-digit year of birth. + */ + year: number | null; + } + } + + interface Konbini {} + + interface Link { + /** + * Account owner's email address. + */ + email: string | null; + + /** + * [Deprecated] This is a legacy parameter that no longer has any function. + */ + persistent_token?: string; + } + + interface Mobilepay {} + + interface Oxxo {} + + interface P24 { + /** + * The customer's bank, if provided. + */ + bank: P24.Bank | null; + } + + namespace P24 { + type Bank = + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'velobank' + | 'volkswagen_bank'; + } + + interface Paynow {} + + interface Paypal { + /** + * Owner's email. Values are provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + payer_email: string | null; + + /** + * PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + */ + payer_id: string | null; + } + + interface Pix {} + + interface Promptpay {} + + interface RevolutPay {} + + interface SepaDebit { + /** + * Bank code of bank associated with the bank account. + */ + bank_code: string | null; + + /** + * Branch code of bank associated with the bank account. + */ + branch_code: string | null; + + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country: string | null; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Information about the object that generated this PaymentMethod. + */ + generated_from: SepaDebit.GeneratedFrom | null; + + /** + * Last four characters of the IBAN. + */ + last4: string | null; + } + + namespace SepaDebit { + interface GeneratedFrom { + /** + * The ID of the Charge that generated this PaymentMethod, if any. + */ + charge: string | Stripe.Charge | null; + + /** + * The ID of the SetupAttempt that generated this PaymentMethod, if any. + */ + setup_attempt: string | Stripe.SetupAttempt | null; + } + } + + interface Sofort { + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country: string | null; + } + + interface Swish {} + + type Type = + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'card_present' + | 'cashapp' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'interac_present' + | 'klarna' + | 'konbini' + | 'link' + | 'mobilepay' + | 'oxxo' + | 'p24' + | 'paynow' + | 'paypal' + | 'pix' + | 'promptpay' + | 'revolut_pay' + | 'sepa_debit' + | 'sofort' + | 'swish' + | 'us_bank_account' + | 'wechat_pay' + | 'zip'; + + interface UsBankAccount { + /** + * Account holder type: individual or company. + */ + account_holder_type: UsBankAccount.AccountHolderType | null; + + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ + account_type: UsBankAccount.AccountType | null; + + /** + * The name of the bank. + */ + bank_name: string | null; + + /** + * The ID of the Financial Connections Account used to create the payment method. + */ + financial_connections_account: string | null; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + */ + fingerprint: string | null; + + /** + * Last four digits of the bank account number. + */ + last4: string | null; + + /** + * Contains information about US bank account networks that can be used. + */ + networks: UsBankAccount.Networks | null; + + /** + * Routing number of the bank account. + */ + routing_number: string | null; + + /** + * Contains information about the future reusability of this PaymentMethod. + */ + status_details: UsBankAccount.StatusDetails | null; + } + + namespace UsBankAccount { + type AccountHolderType = 'company' | 'individual'; + + type AccountType = 'checking' | 'savings'; + + interface Networks { + /** + * The preferred network. + */ + preferred: string | null; + + /** + * All supported networks. + */ + supported: Array; + } + + namespace Networks { + type Supported = 'ach' | 'us_domestic_wire'; + } + + interface StatusDetails { + blocked?: StatusDetails.Blocked; + } + + namespace StatusDetails { + interface Blocked { + /** + * The ACH network code that resulted in this block. + */ + network_code: Blocked.NetworkCode | null; + + /** + * The reason why this PaymentMethod's fingerprint has been blocked + */ + reason: Blocked.Reason | null; + } + + namespace Blocked { + type NetworkCode = + | 'R02' + | 'R03' + | 'R04' + | 'R05' + | 'R07' + | 'R08' + | 'R10' + | 'R11' + | 'R16' + | 'R20' + | 'R29' + | 'R31'; + + type Reason = + | 'bank_account_closed' + | 'bank_account_frozen' + | 'bank_account_invalid_details' + | 'bank_account_restricted' + | 'bank_account_unusable' + | 'debit_not_authorized'; + } + } + } + + interface WechatPay {} + + interface Zip {} + } + + type SetupFutureUsage = 'off_session' | 'on_session'; + + interface Shipping { + address: Stripe.Address; + + /** + * Recipient name. + */ + name: string; + + /** + * Recipient phone (including extension). + */ + phone: string | null; + } + } + } +} diff --git a/types/ConfirmationTokensResource.d.ts b/types/ConfirmationTokensResource.d.ts new file mode 100644 index 0000000000..c4c2d38fd9 --- /dev/null +++ b/types/ConfirmationTokensResource.d.ts @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + interface ConfirmationTokenRetrieveParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + class ConfirmationTokensResource { + /** + * Retrieves an existing ConfirmationToken object + */ + retrieve( + id: string, + params?: ConfirmationTokenRetrieveParams, + options?: RequestOptions + ): Promise>; + retrieve( + id: string, + options?: RequestOptions + ): Promise>; + } + } +} diff --git a/types/CustomersResource.d.ts b/types/CustomersResource.d.ts index 1e8b141fa5..e667f3bd8b 100644 --- a/types/CustomersResource.d.ts +++ b/types/CustomersResource.d.ts @@ -792,6 +792,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'mobilepay' | 'oxxo' | 'p24' | 'paynow' diff --git a/types/Forwarding/Requests.d.ts b/types/Forwarding/Requests.d.ts new file mode 100644 index 0000000000..2a73b0cce7 --- /dev/null +++ b/types/Forwarding/Requests.d.ts @@ -0,0 +1,162 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Forwarding { + /** + * Instructs Stripe to make a request on your behalf using the destination URL and HTTP method in the config. + * A config is set up for each destination URL by Stripe at the time of onboarding. Stripe verifies requests with + * your credentials in the config, and injects card details from the payment_method into the request. + * + * Stripe redacts all sensitive fields and headers, including authentication credentials and card numbers, + * before storing the request and response data in the forwarding Request object, which are subject to a + * 30-day retention period. + * + * You can provide a Stripe idempotency key to make sure that requests with the same key result in only one + * outbound request. The Stripe idempotency key provided should be unique and different from any idempotency + * keys provided on the underlying third-party request. + * + * Forwarding Requests are synchronous requests that return a response or time out according to + * Stripe's limits. + */ + interface Request { + /** + * Unique identifier for the object. + */ + id: string; + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'forwarding.request'; + + /** + * The Forwarding Config used when making the forwarded request. The config specifes the HTTP method, merchant credentials, connection settings, and supported destination URLs. + */ + config: string; + + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean; + + /** + * The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. + */ + payment_method: string; + + /** + * The field kinds to be replaced in the forwarded request. + */ + replacements: Array; + + /** + * Context about the request from Stripe's servers to the destination endpoint. + */ + request_context: Request.RequestContext | null; + + /** + * The request that was sent to the destination endpoint. We redact any sensitive fields. + */ + request_details: Request.RequestDetails | null; + + /** + * The response that the destination endpoint returned to us. We redact any sensitive fields. + */ + response_details: Request.ResponseDetails | null; + + /** + * The destination URL for the forwarded request. Must be supported by the config. + */ + url: string | null; + } + + namespace Request { + type Replacement = + | 'card_cvc' + | 'card_expiry' + | 'card_number' + | 'cardholder_name'; + + interface RequestContext { + /** + * The time it took in milliseconds for the destination endpoint to respond. + */ + destination_duration: number; + + /** + * The IP address of the destination. + */ + destination_ip_address: string; + } + + interface RequestDetails { + /** + * The body payload to send to the destination endpoint. + */ + body: string; + + /** + * The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. + */ + headers: Array; + + /** + * The HTTP method used to call the destination endpoint. + */ + http_method: 'POST'; + } + + namespace RequestDetails { + interface Header { + /** + * The header name. + */ + name: string; + + /** + * The header value. + */ + value: string; + } + } + + interface ResponseDetails { + /** + * The response body from the destination endpoint to Stripe. + */ + body: string; + + /** + * HTTP headers that the destination endpoint returned. + */ + headers: Array; + + /** + * The HTTP status code that the destination endpoint returned. + */ + status: number; + } + + namespace ResponseDetails { + interface Header { + /** + * The header name. + */ + name: string; + + /** + * The header value. + */ + value: string; + } + } + } + } + } +} diff --git a/types/Forwarding/RequestsResource.d.ts b/types/Forwarding/RequestsResource.d.ts new file mode 100644 index 0000000000..bb0042df5e --- /dev/null +++ b/types/Forwarding/RequestsResource.d.ts @@ -0,0 +1,126 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Forwarding { + interface RequestCreateParams { + /** + * The Forwarding Config used when making the forwarded request. The config specifes the HTTP method, merchant credentials, connection settings, and supported destination URLs. + */ + config: string; + + /** + * The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. + */ + payment_method: string; + + /** + * The field kinds to be replaced in the forwarded request. + */ + replacements: Array; + + /** + * The request body and headers to be sent to the destination endpoint. + */ + request: RequestCreateParams.Request; + + /** + * The destination URL for the forwarded request. Must be supported by the config. + */ + url: string; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + namespace RequestCreateParams { + type Replacement = + | 'card_cvc' + | 'card_expiry' + | 'card_number' + | 'cardholder_name'; + + interface Request { + /** + * The body payload to send to the destination endpoint. + */ + body?: string; + + /** + * The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. + */ + headers?: Array; + } + + namespace Request { + interface Header { + /** + * The header name. + */ + name: string; + + /** + * The header value. + */ + value: string; + } + } + } + + interface RequestRetrieveParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface RequestListParams extends PaginationParams { + /** + * Similar to other List endpoints, filters results based on created timestamp. You can pass gt, gte, lt, and lte timestamp values. + */ + created?: Stripe.RangeQueryParam; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + class RequestsResource { + /** + * Creates a ForwardingRequest object. + */ + create( + params: RequestCreateParams, + options?: RequestOptions + ): Promise>; + + /** + * Retrieves a ForwardingRequest object. + */ + retrieve( + id: string, + params?: RequestRetrieveParams, + options?: RequestOptions + ): Promise>; + retrieve( + id: string, + options?: RequestOptions + ): Promise>; + + /** + * Lists all ForwardingRequest objects. + */ + list( + params?: RequestListParams, + options?: RequestOptions + ): ApiListPromise; + list( + options?: RequestOptions + ): ApiListPromise; + } + } + } +} diff --git a/types/Invoices.d.ts b/types/Invoices.d.ts index cc88fb2b43..962f56a4a9 100644 --- a/types/Invoices.d.ts +++ b/types/Invoices.d.ts @@ -828,6 +828,10 @@ declare module 'stripe' { | 'expired_card' | 'financial_connections_account_inactive' | 'financial_connections_no_successful_transaction_refresh' + | 'forwarding_api_inactive' + | 'forwarding_api_invalid_parameter' + | 'forwarding_api_upstream_connection_error' + | 'forwarding_api_upstream_connection_timeout' | 'idempotency_key_in_use' | 'incorrect_address' | 'incorrect_cvc' diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts index 543d870490..e98dade248 100644 --- a/types/PaymentIntents.d.ts +++ b/types/PaymentIntents.d.ts @@ -423,6 +423,10 @@ declare module 'stripe' { | 'expired_card' | 'financial_connections_account_inactive' | 'financial_connections_no_successful_transaction_refresh' + | 'forwarding_api_inactive' + | 'forwarding_api_invalid_parameter' + | 'forwarding_api_upstream_connection_error' + | 'forwarding_api_upstream_connection_timeout' | 'idempotency_key_in_use' | 'incorrect_address' | 'incorrect_cvc' @@ -1285,6 +1289,8 @@ declare module 'stripe' { link?: PaymentMethodOptions.Link; + mobilepay?: PaymentMethodOptions.Mobilepay; + oxxo?: PaymentMethodOptions.Oxxo; p24?: PaymentMethodOptions.P24; @@ -1949,6 +1955,22 @@ declare module 'stripe' { type SetupFutureUsage = 'none' | 'off_session'; } + interface Mobilepay { + /** + * Controls when the funds will be captured from the customer's account. + */ + capture_method?: 'manual'; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: 'none'; + } + interface Oxxo { /** * The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index 3ea7f95f46..9961f9da7b 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -38,6 +38,13 @@ declare module 'stripe' { */ confirmation_method?: PaymentIntentCreateParams.ConfirmationMethod; + /** + * ID of the ConfirmationToken used to confirm this PaymentIntent. + * + * If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + */ + confirmation_token?: string; + /** * ID of the Customer this PaymentIntent belongs to, if one exists. * @@ -357,6 +364,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + */ + mobilepay?: PaymentMethodData.Mobilepay; + /** * If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. */ @@ -660,6 +672,8 @@ declare module 'stripe' { interface Link {} + interface Mobilepay {} + interface Oxxo {} interface P24 { @@ -756,6 +770,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'mobilepay' | 'oxxo' | 'p24' | 'paynow' @@ -923,6 +938,11 @@ declare module 'stripe' { */ link?: Stripe.Emptyable; + /** + * If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + */ + mobilepay?: Stripe.Emptyable; + /** * If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. */ @@ -1853,6 +1873,28 @@ declare module 'stripe' { type SetupFutureUsage = 'none' | 'off_session'; } + interface Mobilepay { + /** + * Controls when the funds will be captured from the customer's account. + * + * If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + * + * If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + */ + capture_method?: Stripe.Emptyable<'manual'>; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + */ + setup_future_usage?: 'none'; + } + interface Oxxo { /** * The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. @@ -2520,6 +2562,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + */ + mobilepay?: PaymentMethodData.Mobilepay; + /** * If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. */ @@ -2823,6 +2870,8 @@ declare module 'stripe' { interface Link {} + interface Mobilepay {} + interface Oxxo {} interface P24 { @@ -2919,6 +2968,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'mobilepay' | 'oxxo' | 'p24' | 'paynow' @@ -3086,6 +3136,11 @@ declare module 'stripe' { */ link?: Stripe.Emptyable; + /** + * If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + */ + mobilepay?: Stripe.Emptyable; + /** * If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. */ @@ -4016,6 +4071,28 @@ declare module 'stripe' { type SetupFutureUsage = 'none' | 'off_session'; } + interface Mobilepay { + /** + * Controls when the funds will be captured from the customer's account. + * + * If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + * + * If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + */ + capture_method?: Stripe.Emptyable<'manual'>; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + */ + setup_future_usage?: 'none'; + } + interface Oxxo { /** * The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. @@ -4538,6 +4615,13 @@ declare module 'stripe' { */ capture_method?: PaymentIntentConfirmParams.CaptureMethod; + /** + * ID of the ConfirmationToken used to confirm this PaymentIntent. + * + * If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + */ + confirmation_token?: string; + /** * Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ @@ -4821,6 +4905,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + */ + mobilepay?: PaymentMethodData.Mobilepay; + /** * If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. */ @@ -5124,6 +5213,8 @@ declare module 'stripe' { interface Link {} + interface Mobilepay {} + interface Oxxo {} interface P24 { @@ -5220,6 +5311,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'mobilepay' | 'oxxo' | 'p24' | 'paynow' @@ -5387,6 +5479,11 @@ declare module 'stripe' { */ link?: Stripe.Emptyable; + /** + * If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + */ + mobilepay?: Stripe.Emptyable; + /** * If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. */ @@ -6317,6 +6414,28 @@ declare module 'stripe' { type SetupFutureUsage = 'none' | 'off_session'; } + interface Mobilepay { + /** + * Controls when the funds will be captured from the customer's account. + * + * If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type. + * + * If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + */ + capture_method?: Stripe.Emptyable<'manual'>; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + */ + setup_future_usage?: 'none'; + } + interface Oxxo { /** * The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. diff --git a/types/PaymentMethods.d.ts b/types/PaymentMethods.d.ts index a3a5f626a9..79402422d8 100644 --- a/types/PaymentMethods.d.ts +++ b/types/PaymentMethods.d.ts @@ -86,6 +86,8 @@ declare module 'stripe' { */ metadata: Stripe.Metadata | null; + mobilepay?: PaymentMethod.Mobilepay; + oxxo?: PaymentMethod.Oxxo; p24?: PaymentMethod.P24; @@ -805,6 +807,8 @@ declare module 'stripe' { persistent_token?: string; } + interface Mobilepay {} + interface Oxxo {} interface P24 { @@ -950,6 +954,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'mobilepay' | 'oxxo' | 'p24' | 'paynow' diff --git a/types/PaymentMethodsResource.d.ts b/types/PaymentMethodsResource.d.ts index f4c1fd343d..bcaec99e49 100644 --- a/types/PaymentMethodsResource.d.ts +++ b/types/PaymentMethodsResource.d.ts @@ -128,6 +128,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + */ + mobilepay?: PaymentMethodCreateParams.Mobilepay; + /** * If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. */ @@ -483,6 +488,8 @@ declare module 'stripe' { interface Link {} + interface Mobilepay {} + interface Oxxo {} interface P24 { @@ -580,6 +587,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'mobilepay' | 'oxxo' | 'p24' | 'paynow' @@ -784,6 +792,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'mobilepay' | 'oxxo' | 'p24' | 'paynow' diff --git a/types/Products.d.ts b/types/Products.d.ts index dd15ae24d6..b6b77f7bda 100644 --- a/types/Products.d.ts +++ b/types/Products.d.ts @@ -69,7 +69,7 @@ declare module 'stripe' { description: string | null; /** - * A list of up to 15 features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + * A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). */ features: Array; @@ -137,7 +137,7 @@ declare module 'stripe' { namespace Product { interface Feature { /** - * The feature's name. Up to 80 characters long. + * The marketing feature name. Up to 80 characters long. */ name?: string; } diff --git a/types/ProductsResource.d.ts b/types/ProductsResource.d.ts index 2f08c9a2ed..9f4c8e95ae 100644 --- a/types/ProductsResource.d.ts +++ b/types/ProductsResource.d.ts @@ -29,7 +29,7 @@ declare module 'stripe' { expand?: Array; /** - * A list of up to 15 features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + * A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). */ features?: Array; @@ -224,7 +224,7 @@ declare module 'stripe' { interface Feature { /** - * The feature's name. Up to 80 characters long. + * The marketing feature name. Up to 80 characters long. */ name: string; } @@ -283,7 +283,7 @@ declare module 'stripe' { expand?: Array; /** - * A list of up to 15 features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + * A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). */ features?: Stripe.Emptyable>; @@ -341,7 +341,7 @@ declare module 'stripe' { namespace ProductUpdateParams { interface Feature { /** - * The feature's name. Up to 80 characters long. + * The marketing feature name. Up to 80 characters long. */ name: string; } diff --git a/types/QuotesResource.d.ts b/types/QuotesResource.d.ts index e120b10564..d5017f8952 100644 --- a/types/QuotesResource.d.ts +++ b/types/QuotesResource.d.ts @@ -782,7 +782,7 @@ declare module 'stripe' { ): ApiListPromise; /** - * Download the PDF for a finalized quote + * Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) */ pdf( id: string, diff --git a/types/SetupAttempts.d.ts b/types/SetupAttempts.d.ts index 5feaa1a685..b5118dabe9 100644 --- a/types/SetupAttempts.d.ts +++ b/types/SetupAttempts.d.ts @@ -644,6 +644,10 @@ declare module 'stripe' { | 'expired_card' | 'financial_connections_account_inactive' | 'financial_connections_no_successful_transaction_refresh' + | 'forwarding_api_inactive' + | 'forwarding_api_invalid_parameter' + | 'forwarding_api_upstream_connection_error' + | 'forwarding_api_upstream_connection_timeout' | 'idempotency_key_in_use' | 'incorrect_address' | 'incorrect_cvc' diff --git a/types/SetupIntents.d.ts b/types/SetupIntents.d.ts index 8f2ef06825..f39f30186c 100644 --- a/types/SetupIntents.d.ts +++ b/types/SetupIntents.d.ts @@ -336,6 +336,10 @@ declare module 'stripe' { | 'expired_card' | 'financial_connections_account_inactive' | 'financial_connections_no_successful_transaction_refresh' + | 'forwarding_api_inactive' + | 'forwarding_api_invalid_parameter' + | 'forwarding_api_upstream_connection_error' + | 'forwarding_api_upstream_connection_timeout' | 'idempotency_key_in_use' | 'incorrect_address' | 'incorrect_cvc' diff --git a/types/SetupIntentsResource.d.ts b/types/SetupIntentsResource.d.ts index eabfdb95f8..61fba8a7a3 100644 --- a/types/SetupIntentsResource.d.ts +++ b/types/SetupIntentsResource.d.ts @@ -20,6 +20,13 @@ declare module 'stripe' { */ confirm?: boolean; + /** + * ID of the ConfirmationToken used to confirm this SetupIntent. + * + * If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + */ + confirmation_token?: string; + /** * ID of the Customer this SetupIntent belongs to, if one exists. * @@ -287,6 +294,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + */ + mobilepay?: PaymentMethodData.Mobilepay; + /** * If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. */ @@ -590,6 +602,8 @@ declare module 'stripe' { interface Link {} + interface Mobilepay {} + interface Oxxo {} interface P24 { @@ -686,6 +700,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'mobilepay' | 'oxxo' | 'p24' | 'paynow' @@ -1327,6 +1342,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + */ + mobilepay?: PaymentMethodData.Mobilepay; + /** * If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. */ @@ -1630,6 +1650,8 @@ declare module 'stripe' { interface Link {} + interface Mobilepay {} + interface Oxxo {} interface P24 { @@ -1726,6 +1748,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'mobilepay' | 'oxxo' | 'p24' | 'paynow' @@ -2212,6 +2235,13 @@ declare module 'stripe' { } interface SetupIntentConfirmParams { + /** + * ID of the ConfirmationToken used to confirm this SetupIntent. + * + * If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + */ + confirmation_token?: string; + /** * Specifies which fields in the response should be expanded. */ @@ -2447,6 +2477,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + */ + mobilepay?: PaymentMethodData.Mobilepay; + /** * If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. */ @@ -2750,6 +2785,8 @@ declare module 'stripe' { interface Link {} + interface Mobilepay {} + interface Oxxo {} interface P24 { @@ -2846,6 +2883,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'mobilepay' | 'oxxo' | 'p24' | 'paynow' diff --git a/types/Subscriptions.d.ts b/types/Subscriptions.d.ts index 76b4fdbd13..0cce02a042 100644 --- a/types/Subscriptions.d.ts +++ b/types/Subscriptions.d.ts @@ -165,7 +165,7 @@ declare module 'stripe' { on_behalf_of: string | Stripe.Account | null; /** - * If specified, payment collection for this subscription will be paused. + * If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/billing/subscriptions/pause-payment). */ pause_collection: Subscription.PauseCollection | null; @@ -200,12 +200,14 @@ declare module 'stripe' { start_date: number; /** - * Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. + * Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. * - * For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, the open invoice will be voided and no further invoices will be generated. + * For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated. * * A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. * + * A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/billing/subscriptions/pause-payment), which still generates invoices. + * * If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). * * If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. diff --git a/types/SubscriptionsResource.d.ts b/types/SubscriptionsResource.d.ts index 5a5a55b81c..667f239494 100644 --- a/types/SubscriptionsResource.d.ts +++ b/types/SubscriptionsResource.d.ts @@ -880,7 +880,7 @@ declare module 'stripe' { on_behalf_of?: Stripe.Emptyable; /** - * If specified, payment collection for this subscription will be paused. + * If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/billing/subscriptions/pause-payment). */ pause_collection?: Stripe.Emptyable< SubscriptionUpdateParams.PauseCollection diff --git a/types/Terminal/Configurations.d.ts b/types/Terminal/Configurations.d.ts index f3b6376272..8bcbd9db9b 100644 --- a/types/Terminal/Configurations.d.ts +++ b/types/Terminal/Configurations.d.ts @@ -34,6 +34,11 @@ declare module 'stripe' { */ livemode: boolean; + /** + * String indicating the name of the Configuration object, set by the user + */ + name: string | null; + offline?: Configuration.Offline; tipping?: Configuration.Tipping; diff --git a/types/Terminal/ConfigurationsResource.d.ts b/types/Terminal/ConfigurationsResource.d.ts index 8a6f6e75d1..cd5f04f76f 100644 --- a/types/Terminal/ConfigurationsResource.d.ts +++ b/types/Terminal/ConfigurationsResource.d.ts @@ -14,6 +14,11 @@ declare module 'stripe' { */ expand?: Array; + /** + * Name of the configuration + */ + name?: string; + /** * Configurations for collecting transactions offline. */ @@ -385,6 +390,11 @@ declare module 'stripe' { */ expand?: Array; + /** + * Name of the configuration + */ + name?: string; + /** * Configurations for collecting transactions offline. */ diff --git a/types/TestHelpers/ConfirmationTokensResource.d.ts b/types/TestHelpers/ConfirmationTokensResource.d.ts new file mode 100644 index 0000000000..b79229e8ae --- /dev/null +++ b/types/TestHelpers/ConfirmationTokensResource.d.ts @@ -0,0 +1,645 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace TestHelpers { + interface ConfirmationTokenCreateParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * ID of an existing PaymentMethod. + */ + payment_method?: string; + + /** + * If provided, this hash will be used to create a PaymentMethod. + */ + payment_method_data?: ConfirmationTokenCreateParams.PaymentMethodData; + + /** + * Return URL used to confirm the Intent. + */ + return_url?: string; + + /** + * Indicates that you intend to make future payments with this ConfirmationToken's payment method. + * + * The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + */ + setup_future_usage?: ConfirmationTokenCreateParams.SetupFutureUsage; + + /** + * Shipping information for this ConfirmationToken. + */ + shipping?: ConfirmationTokenCreateParams.Shipping; + } + + namespace ConfirmationTokenCreateParams { + interface PaymentMethodData { + /** + * If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + */ + acss_debit?: PaymentMethodData.AcssDebit; + + /** + * If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + */ + affirm?: PaymentMethodData.Affirm; + + /** + * If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + */ + afterpay_clearpay?: PaymentMethodData.AfterpayClearpay; + + /** + * If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + */ + alipay?: PaymentMethodData.Alipay; + + /** + * If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + */ + au_becs_debit?: PaymentMethodData.AuBecsDebit; + + /** + * If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + */ + bacs_debit?: PaymentMethodData.BacsDebit; + + /** + * If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + */ + bancontact?: PaymentMethodData.Bancontact; + + /** + * Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + billing_details?: PaymentMethodData.BillingDetails; + + /** + * If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + */ + blik?: PaymentMethodData.Blik; + + /** + * If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + */ + boleto?: PaymentMethodData.Boleto; + + /** + * If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + */ + cashapp?: PaymentMethodData.Cashapp; + + /** + * If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + */ + customer_balance?: PaymentMethodData.CustomerBalance; + + /** + * If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + */ + eps?: PaymentMethodData.Eps; + + /** + * If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + */ + fpx?: PaymentMethodData.Fpx; + + /** + * If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + */ + giropay?: PaymentMethodData.Giropay; + + /** + * If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + */ + grabpay?: PaymentMethodData.Grabpay; + + /** + * If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + */ + ideal?: PaymentMethodData.Ideal; + + /** + * If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + */ + interac_present?: PaymentMethodData.InteracPresent; + + /** + * If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + */ + klarna?: PaymentMethodData.Klarna; + + /** + * If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + */ + konbini?: PaymentMethodData.Konbini; + + /** + * If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + */ + link?: PaymentMethodData.Link; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + */ + metadata?: Stripe.MetadataParam; + + /** + * If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + */ + mobilepay?: PaymentMethodData.Mobilepay; + + /** + * If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + */ + oxxo?: PaymentMethodData.Oxxo; + + /** + * If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + */ + p24?: PaymentMethodData.P24; + + /** + * If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + */ + paynow?: PaymentMethodData.Paynow; + + /** + * If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + */ + paypal?: PaymentMethodData.Paypal; + + /** + * If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + */ + pix?: PaymentMethodData.Pix; + + /** + * If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + */ + promptpay?: PaymentMethodData.Promptpay; + + /** + * Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: PaymentMethodData.RadarOptions; + + /** + * If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + */ + revolut_pay?: PaymentMethodData.RevolutPay; + + /** + * If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + */ + sepa_debit?: PaymentMethodData.SepaDebit; + + /** + * If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + */ + sofort?: PaymentMethodData.Sofort; + + /** + * If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + */ + swish?: PaymentMethodData.Swish; + + /** + * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + */ + type: PaymentMethodData.Type; + + /** + * If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + */ + us_bank_account?: PaymentMethodData.UsBankAccount; + + /** + * If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + */ + wechat_pay?: PaymentMethodData.WechatPay; + + /** + * If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + */ + zip?: PaymentMethodData.Zip; + } + + namespace PaymentMethodData { + interface AcssDebit { + /** + * Customer's bank account number. + */ + account_number: string; + + /** + * Institution number of the customer's bank. + */ + institution_number: string; + + /** + * Transit number of the customer's bank. + */ + transit_number: string; + } + + interface Affirm {} + + interface AfterpayClearpay {} + + interface Alipay {} + + interface AuBecsDebit { + /** + * The account number for the bank account. + */ + account_number: string; + + /** + * Bank-State-Branch number of the bank account. + */ + bsb_number: string; + } + + interface BacsDebit { + /** + * Account number of the bank account that the funds will be debited from. + */ + account_number?: string; + + /** + * Sort code of the bank account. (e.g., `10-20-30`) + */ + sort_code?: string; + } + + interface Bancontact {} + + interface BillingDetails { + /** + * Billing address. + */ + address?: Stripe.Emptyable; + + /** + * Email address. + */ + email?: Stripe.Emptyable; + + /** + * Full name. + */ + name?: Stripe.Emptyable; + + /** + * Billing phone number (including extension). + */ + phone?: Stripe.Emptyable; + } + + interface Blik {} + + interface Boleto { + /** + * The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + */ + tax_id: string; + } + + interface Cashapp {} + + interface CustomerBalance {} + + interface Eps { + /** + * The customer's bank. + */ + bank?: Eps.Bank; + } + + namespace Eps { + type Bank = + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau'; + } + + interface Fpx { + /** + * Account holder type for FPX transaction + */ + account_holder_type?: Fpx.AccountHolderType; + + /** + * The customer's bank. + */ + bank: Fpx.Bank; + } + + namespace Fpx { + type AccountHolderType = 'company' | 'individual'; + + type Bank = + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_of_china' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob'; + } + + interface Giropay {} + + interface Grabpay {} + + interface Ideal { + /** + * The customer's bank. + */ + bank?: Ideal.Bank; + } + + namespace Ideal { + type Bank = + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'n26' + | 'nn' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + | 'yoursafe'; + } + + interface InteracPresent {} + + interface Klarna { + /** + * Customer's date of birth + */ + dob?: Klarna.Dob; + } + + namespace Klarna { + interface Dob { + /** + * The day of birth, between 1 and 31. + */ + day: number; + + /** + * The month of birth, between 1 and 12. + */ + month: number; + + /** + * The four-digit year of birth. + */ + year: number; + } + } + + interface Konbini {} + + interface Link {} + + interface Mobilepay {} + + interface Oxxo {} + + interface P24 { + /** + * The customer's bank. + */ + bank?: P24.Bank; + } + + namespace P24 { + type Bank = + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'velobank' + | 'volkswagen_bank'; + } + + interface Paynow {} + + interface Paypal {} + + interface Pix {} + + interface Promptpay {} + + interface RadarOptions { + /** + * A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + */ + session?: string; + } + + interface RevolutPay {} + + interface SepaDebit { + /** + * IBAN of the bank account. + */ + iban: string; + } + + interface Sofort { + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country: Sofort.Country; + } + + namespace Sofort { + type Country = 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL'; + } + + interface Swish {} + + type Type = + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'cashapp' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'mobilepay' + | 'oxxo' + | 'p24' + | 'paynow' + | 'paypal' + | 'pix' + | 'promptpay' + | 'revolut_pay' + | 'sepa_debit' + | 'sofort' + | 'swish' + | 'us_bank_account' + | 'wechat_pay' + | 'zip'; + + interface UsBankAccount { + /** + * Account holder type: individual or company. + */ + account_holder_type?: UsBankAccount.AccountHolderType; + + /** + * Account number of the bank account. + */ + account_number?: string; + + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ + account_type?: UsBankAccount.AccountType; + + /** + * The ID of a Financial Connections Account to use as a payment method. + */ + financial_connections_account?: string; + + /** + * Routing number of the bank account. + */ + routing_number?: string; + } + + namespace UsBankAccount { + type AccountHolderType = 'company' | 'individual'; + + type AccountType = 'checking' | 'savings'; + } + + interface WechatPay {} + + interface Zip {} + } + + type SetupFutureUsage = 'off_session' | 'on_session'; + + interface Shipping { + /** + * Shipping address + */ + address: Stripe.AddressParam; + + /** + * Recipient name. + */ + name: string; + + /** + * Recipient phone (including extension) + */ + phone?: Stripe.Emptyable; + } + } + + class ConfirmationTokensResource { + /** + * Creates a test mode Confirmation Token server side for your integration tests. + */ + create( + params?: ConfirmationTokenCreateParams, + options?: RequestOptions + ): Promise>; + create( + options?: RequestOptions + ): Promise>; + } + } + } +} diff --git a/types/Treasury/ReceivedDebits.d.ts b/types/Treasury/ReceivedDebits.d.ts index 2427efb7cd..50a5a4daf3 100644 --- a/types/Treasury/ReceivedDebits.d.ts +++ b/types/Treasury/ReceivedDebits.d.ts @@ -184,6 +184,11 @@ declare module 'stripe' { * Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. */ issuing_transaction: string | null; + + /** + * Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object. + */ + payout: string | null; } type Network = 'ach' | 'card' | 'stripe'; diff --git a/types/index.d.ts b/types/index.d.ts index 1e0a6bcfc1..069c93d102 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -24,6 +24,7 @@ /// /// /// +/// /// /// /// @@ -38,6 +39,7 @@ /// /// /// +/// /// /// /// @@ -88,6 +90,7 @@ /// /// /// +/// /// /// /// @@ -136,6 +139,7 @@ /// /// /// +/// /// /// /// @@ -160,6 +164,7 @@ /// /// /// +/// /// /// /// @@ -269,6 +274,7 @@ declare module 'stripe' { balance: Stripe.BalanceResource; balanceTransactions: Stripe.BalanceTransactionsResource; charges: Stripe.ChargesResource; + confirmationTokens: Stripe.ConfirmationTokensResource; countrySpecs: Stripe.CountrySpecsResource; coupons: Stripe.CouponsResource; creditNotes: Stripe.CreditNotesResource; @@ -330,6 +336,9 @@ declare module 'stripe' { sessions: Stripe.FinancialConnections.SessionsResource; transactions: Stripe.FinancialConnections.TransactionsResource; }; + forwarding: { + requests: Stripe.Forwarding.RequestsResource; + }; identity: { verificationReports: Stripe.Identity.VerificationReportsResource; verificationSessions: Stripe.Identity.VerificationSessionsResource; @@ -369,6 +378,7 @@ declare module 'stripe' { readers: Stripe.Terminal.ReadersResource; }; testHelpers: { + confirmationTokens: Stripe.TestHelpers.ConfirmationTokensResource; customers: Stripe.TestHelpers.CustomersResource; refunds: Stripe.TestHelpers.RefundsResource; testClocks: Stripe.TestHelpers.TestClocksResource; From e84d7c9724a559bfbda83cf11a6d5368acbc710f Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Thu, 21 Mar 2024 14:11:12 -0700 Subject: [PATCH 2/3] Bump version to 14.22.0 --- CHANGELOG.md | 17 +++++++++++++++++ VERSION | 2 +- package.json | 2 +- src/stripe.core.ts | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2942b1d3d..029b4402d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## 14.22.0 - 2024-03-21 +* [#2040](https://github.com/stripe/stripe-node/pull/2040) Update generated code + * Add support for new resources `ConfirmationToken` and `Forwarding.Request` + * Add support for `retrieve` method on resource `ConfirmationToken` + * Add support for `create`, `list`, and `retrieve` methods on resource `Request` + * Add support for `mobilepay_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities` + * Add support for new values `forwarding_api_inactive`, `forwarding_api_invalid_parameter`, `forwarding_api_upstream_connection_error`, and `forwarding_api_upstream_connection_timeout` on enums `Invoice.last_finalization_error.code`, `PaymentIntent.last_payment_error.code`, `SetupAttempt.setup_error.code`, `SetupIntent.last_setup_error.code`, and `StripeError.code` + * Add support for `mobilepay` on `Charge.payment_method_details`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodCreateParams`, `PaymentMethod`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, and `SetupIntentUpdateParams.payment_method_data` + * Add support for `payment_reference` on `Charge.payment_method_details.us_bank_account` + * Add support for new value `mobilepay` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type` + * Add support for `confirmation_token` on `PaymentIntentConfirmParams`, `PaymentIntentCreateParams`, `SetupIntentConfirmParams`, and `SetupIntentCreateParams` + * Add support for new value `mobilepay` on enums `PaymentIntentConfirmParams.payment_method_data.type`, `PaymentIntentCreateParams.payment_method_data.type`, `PaymentIntentUpdateParams.payment_method_data.type`, `SetupIntentConfirmParams.payment_method_data.type`, `SetupIntentCreateParams.payment_method_data.type`, and `SetupIntentUpdateParams.payment_method_data.type` + * Add support for new value `mobilepay` on enum `PaymentMethod.type` + * Add support for `name` on `Terminal.ConfigurationCreateParams`, `Terminal.ConfigurationUpdateParams`, and `Terminal.Configuration` + * Add support for `payout` on `Treasury.ReceivedDebit.linked_flows` +* [#2043](https://github.com/stripe/stripe-node/pull/2043) Don't mutate error.type during minification + ## 14.21.0 - 2024-03-14 * [#2035](https://github.com/stripe/stripe-node/pull/2035) Update generated code * Add support for new resources `Issuing.PersonalizationDesign` and `Issuing.PhysicalBundle` diff --git a/VERSION b/VERSION index 0edfba1c6f..4dff17b159 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -14.21.0 +14.22.0 diff --git a/package.json b/package.json index f9de73788b..f445e86506 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stripe", - "version": "14.21.0", + "version": "14.22.0", "description": "Stripe API wrapper", "keywords": [ "stripe", diff --git a/src/stripe.core.ts b/src/stripe.core.ts index cf82b561b0..c7518c7e6c 100644 --- a/src/stripe.core.ts +++ b/src/stripe.core.ts @@ -49,7 +49,7 @@ export function createStripe( platformFunctions: PlatformFunctions, requestSender: RequestSenderFactory = defaultRequestSenderFactory ): typeof Stripe { - Stripe.PACKAGE_VERSION = '14.21.0'; + Stripe.PACKAGE_VERSION = '14.22.0'; Stripe.USER_AGENT = { bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', From 7293b69a204c4a25ca00574078f6b6699936b3cf Mon Sep 17 00:00:00 2001 From: anniel-stripe <97691964+anniel-stripe@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:18:00 -0700 Subject: [PATCH 3/3] esbuild test project fixes (#2045) --- testProjects/esbuild/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testProjects/esbuild/index.js b/testProjects/esbuild/index.js index 3ed3c57da2..4840664d5e 100644 --- a/testProjects/esbuild/index.js +++ b/testProjects/esbuild/index.js @@ -2,7 +2,7 @@ import {Stripe} from 'stripe'; import assert from 'assert'; // API key is null to trigger an authentication error -const stripe = new Stripe(null, { +const stripe = new Stripe("i'm not a real key", { host: process.env.STRIPE_MOCK_HOST || 'localhost', port: process.env.STRIPE_MOCK_PORT || 12111, protocol: 'http', @@ -21,6 +21,7 @@ try { async function exampleFunction(args) { try { await stripe.paymentIntents.create(args); + throw new Error('Expected an error'); } catch (e) { assert (e instanceof stripe.errors.StripeAuthenticationError); assert (e.type === 'StripeAuthenticationError');