From b68ed1ca7c01f83123ae6ffa7d18630a47f50c8b Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 15 Mar 2023 15:22:34 +0000 Subject: [PATCH 1/2] Update generated code (new) (#1710) Update generated code for v257 Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- .../resources/generated_examples_test.spec.js | 2 +- types/Accounts.d.ts | 7 + types/AccountsResource.d.ts | 24 ++++ types/Charges.d.ts | 4 + types/Checkout/Sessions.d.ts | 13 ++ types/Checkout/SessionsResource.d.ts | 21 +++ types/CustomersResource.d.ts | 1 + types/Invoices.d.ts | 1 + types/InvoicesResource.d.ts | 2 + types/Mandates.d.ts | 4 + types/PaymentIntents.d.ts | 62 ++++++++ types/PaymentIntentsResource.d.ts | 132 ++++++++++++++++++ types/PaymentLinks.d.ts | 3 +- types/PaymentLinksResource.d.ts | 2 + types/PaymentMethods.d.ts | 5 + types/PaymentMethodsResource.d.ts | 16 +++ types/Products.d.ts | 2 +- types/SetupAttempts.d.ts | 4 + types/SetupIntents.d.ts | 35 +++++ types/SetupIntentsResource.d.ts | 24 ++++ types/Subscriptions.d.ts | 1 + types/SubscriptionsResource.d.ts | 2 + types/WebhookEndpointsResource.d.ts | 2 + 23 files changed, 366 insertions(+), 3 deletions(-) diff --git a/test/resources/generated_examples_test.spec.js b/test/resources/generated_examples_test.spec.js index 6e4fc84d74..242c533840 100644 --- a/test/resources/generated_examples_test.spec.js +++ b/test/resources/generated_examples_test.spec.js @@ -200,7 +200,7 @@ describe('Accounts', function() { method: 'GET', path: '/v1/accounts/acc_123', response: - '{"business_profile":{"mcc":"mcc","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","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","sepa_debit_payments":"inactive","sofort_payments":"active","tax_reporting_us_1099_k":"inactive","tax_reporting_us_1099_misc":"pending","transfers":"inactive","treasury":"pending","us_bank_account_ach_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,"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":"sole_establishment","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":"verification_document_failed_copy","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"id":"obj_123","individual":{"account":"account","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":"verification_document_failed_copy","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,"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":"verification_document_failed_copy","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":"verification_document_failed_copy","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"settings":{"bacs_debit_payments":{"display_name":"display_name"},"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"},"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":{"mcc":"mcc","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","sepa_debit_payments":"inactive","sofort_payments":"active","tax_reporting_us_1099_k":"inactive","tax_reporting_us_1099_misc":"pending","transfers":"inactive","treasury":"pending","us_bank_account_ach_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,"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":"sole_establishment","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":"verification_document_failed_copy","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"id":"obj_123","individual":{"account":"account","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":"verification_document_failed_copy","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,"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":"verification_document_failed_copy","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":"verification_document_failed_copy","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"settings":{"bacs_debit_payments":{"display_name":"display_name"},"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"},"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 a92c212a91..ba1ac83c54 100644 --- a/types/Accounts.d.ts +++ b/types/Accounts.d.ts @@ -223,6 +223,11 @@ declare module 'stripe' { */ cartes_bancaires_payments?: Capabilities.CartesBancairesPayments; + /** + * The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments. + */ + cashapp_payments?: Capabilities.CashappPayments; + /** * The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. */ @@ -359,6 +364,8 @@ declare module 'stripe' { type CartesBancairesPayments = 'active' | 'inactive' | 'pending'; + type CashappPayments = 'active' | 'inactive' | 'pending'; + type EpsPayments = 'active' | 'inactive' | 'pending'; type FpxPayments = 'active' | 'inactive' | 'pending'; diff --git a/types/AccountsResource.d.ts b/types/AccountsResource.d.ts index 1b00289dcc..98660a0e03 100644 --- a/types/AccountsResource.d.ts +++ b/types/AccountsResource.d.ts @@ -196,6 +196,11 @@ declare module 'stripe' { */ cartes_bancaires_payments?: Capabilities.CartesBancairesPayments; + /** + * The cashapp_payments capability. + */ + cashapp_payments?: Capabilities.CashappPayments; + /** * The eps_payments capability. */ @@ -392,6 +397,13 @@ declare module 'stripe' { requested?: boolean; } + interface CashappPayments { + /** + * 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 EpsPayments { /** * 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. @@ -1423,6 +1435,11 @@ declare module 'stripe' { */ cartes_bancaires_payments?: Capabilities.CartesBancairesPayments; + /** + * The cashapp_payments capability. + */ + cashapp_payments?: Capabilities.CashappPayments; + /** * The eps_payments capability. */ @@ -1619,6 +1636,13 @@ declare module 'stripe' { requested?: boolean; } + interface CashappPayments { + /** + * 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 EpsPayments { /** * 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 cfcff6451c..b21caaf2b6 100644 --- a/types/Charges.d.ts +++ b/types/Charges.d.ts @@ -417,6 +417,8 @@ declare module 'stripe' { card_present?: PaymentMethodDetails.CardPresent; + cashapp?: PaymentMethodDetails.Cashapp; + customer_balance?: PaymentMethodDetails.CustomerBalance; eps?: PaymentMethodDetails.Eps; @@ -1123,6 +1125,8 @@ declare module 'stripe' { } } + interface Cashapp {} + interface CustomerBalance {} interface Eps { diff --git a/types/Checkout/Sessions.d.ts b/types/Checkout/Sessions.d.ts index bc526635f4..9392fc2c64 100644 --- a/types/Checkout/Sessions.d.ts +++ b/types/Checkout/Sessions.d.ts @@ -712,6 +712,8 @@ declare module 'stripe' { card?: PaymentMethodOptions.Card; + cashapp?: PaymentMethodOptions.Cashapp; + customer_balance?: PaymentMethodOptions.CustomerBalance; eps?: PaymentMethodOptions.Eps; @@ -934,6 +936,17 @@ declare module 'stripe' { type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; } + interface Cashapp { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://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 CustomerBalance { bank_transfer?: CustomerBalance.BankTransfer; diff --git a/types/Checkout/SessionsResource.d.ts b/types/Checkout/SessionsResource.d.ts index fd5ae47117..d09a9b8fbd 100644 --- a/types/Checkout/SessionsResource.d.ts +++ b/types/Checkout/SessionsResource.d.ts @@ -855,6 +855,11 @@ declare module 'stripe' { */ card?: PaymentMethodOptions.Card; + /** + * contains details about the Cashapp Pay payment method options. + */ + cashapp?: PaymentMethodOptions.Cashapp; + /** * contains details about the Customer Balance payment method options. */ @@ -1136,6 +1141,21 @@ declare module 'stripe' { type SetupFutureUsage = 'off_session' | 'on_session'; } + interface Cashapp { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://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?: Cashapp.SetupFutureUsage; + } + + namespace Cashapp { + type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; + } + interface CustomerBalance { /** * Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. @@ -1439,6 +1459,7 @@ declare module 'stripe' { | 'blik' | 'boleto' | 'card' + | 'cashapp' | 'customer_balance' | 'eps' | 'fpx' diff --git a/types/CustomersResource.d.ts b/types/CustomersResource.d.ts index 72624ba8ec..ccf478bf91 100644 --- a/types/CustomersResource.d.ts +++ b/types/CustomersResource.d.ts @@ -714,6 +714,7 @@ declare module 'stripe' { | 'boleto' | 'card' | 'card_present' + | 'cashapp' | 'customer_balance' | 'eps' | 'fpx' diff --git a/types/Invoices.d.ts b/types/Invoices.d.ts index 2a29671cd4..34cb042c7e 100644 --- a/types/Invoices.d.ts +++ b/types/Invoices.d.ts @@ -861,6 +861,7 @@ declare module 'stripe' { | 'bancontact' | 'boleto' | 'card' + | 'cashapp' | 'customer_balance' | 'fpx' | 'giropay' diff --git a/types/InvoicesResource.d.ts b/types/InvoicesResource.d.ts index 60cb945cbb..6d2774550f 100644 --- a/types/InvoicesResource.d.ts +++ b/types/InvoicesResource.d.ts @@ -416,6 +416,7 @@ declare module 'stripe' { | 'bancontact' | 'boleto' | 'card' + | 'cashapp' | 'customer_balance' | 'fpx' | 'giropay' @@ -1002,6 +1003,7 @@ declare module 'stripe' { | 'bancontact' | 'boleto' | 'card' + | 'cashapp' | 'customer_balance' | 'fpx' | 'giropay' diff --git a/types/Mandates.d.ts b/types/Mandates.d.ts index 35857a315e..39f90cece7 100644 --- a/types/Mandates.d.ts +++ b/types/Mandates.d.ts @@ -93,6 +93,8 @@ declare module 'stripe' { card?: PaymentMethodDetails.Card; + cashapp?: PaymentMethodDetails.Cashapp; + link?: PaymentMethodDetails.Link; sepa_debit?: PaymentMethodDetails.SepaDebit; @@ -210,6 +212,8 @@ declare module 'stripe' { interface Card {} + interface Cashapp {} + interface Link {} interface SepaDebit { diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts index 7462033985..c1c9a17b53 100644 --- a/types/PaymentIntents.d.ts +++ b/types/PaymentIntents.d.ts @@ -371,6 +371,8 @@ declare module 'stripe' { card_await_notification?: NextAction.CardAwaitNotification; + cashapp_handle_redirect_or_display_qr_code?: NextAction.CashappHandleRedirectOrDisplayQrCode; + display_bank_transfer_instructions?: NextAction.DisplayBankTransferInstructions; konbini_display_details?: NextAction.KonbiniDisplayDetails; @@ -461,6 +463,39 @@ declare module 'stripe' { customer_approval_required: boolean | null; } + interface CashappHandleRedirectOrDisplayQrCode { + /** + * The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. + */ + hosted_instructions_url: string; + + /** + * The url for mobile redirect based auth + */ + mobile_auth_url: string; + + qr_code: CashappHandleRedirectOrDisplayQrCode.QrCode; + } + + namespace CashappHandleRedirectOrDisplayQrCode { + interface QrCode { + /** + * The date (unix timestamp) when the QR code expires. + */ + expires_at: number; + + /** + * The image_url_png string used to render QR code + */ + image_url_png: string; + + /** + * The image_url_svg string used to render QR code + */ + image_url_svg: string; + } + } + interface DisplayBankTransferInstructions { /** * The remaining amount that needs to be transferred to complete the payment. @@ -940,6 +975,8 @@ declare module 'stripe' { card_present?: PaymentMethodOptions.CardPresent; + cashapp?: PaymentMethodOptions.Cashapp; + customer_balance?: PaymentMethodOptions.CustomerBalance; eps?: PaymentMethodOptions.Eps; @@ -1038,6 +1075,11 @@ declare module 'stripe' { */ capture_method?: 'manual'; + /** + * Preferred language of the Affirm authorization page that the customer is redirected to. + */ + preferred_locale?: string; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -1345,6 +1387,26 @@ declare module 'stripe' { request_incremental_authorization_support: boolean | null; } + interface Cashapp { + /** + * 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?: Cashapp.SetupFutureUsage; + } + + namespace Cashapp { + type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; + } + interface CustomerBalance { bank_transfer?: CustomerBalance.BankTransfer; diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index d7246eefc0..2c8c72aed6 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -278,6 +278,11 @@ declare module 'stripe' { */ 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. */ @@ -470,6 +475,8 @@ declare module 'stripe' { tax_id: string; } + interface Cashapp {} + interface CustomerBalance {} interface Eps { @@ -691,6 +698,7 @@ declare module 'stripe' { | 'bancontact' | 'blik' | 'boleto' + | 'cashapp' | 'customer_balance' | 'eps' | 'fpx' @@ -804,6 +812,11 @@ declare module 'stripe' { */ card_present?: Stripe.Emptyable; + /** + * If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + */ + cashapp?: Stripe.Emptyable; + /** * If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. */ @@ -972,6 +985,11 @@ declare module 'stripe' { */ capture_method?: Stripe.Emptyable<'manual'>; + /** + * Preferred language of the Affirm authorization page that the customer is redirected to. + */ + preferred_locale?: string; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -1300,6 +1318,32 @@ declare module 'stripe' { request_incremental_authorization_support?: boolean; } + interface Cashapp { + /** + * 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?: Stripe.Emptyable; + } + + namespace Cashapp { + type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; + } + interface CustomerBalance { /** * Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. @@ -2044,6 +2088,11 @@ declare module 'stripe' { */ 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. */ @@ -2236,6 +2285,8 @@ declare module 'stripe' { tax_id: string; } + interface Cashapp {} + interface CustomerBalance {} interface Eps { @@ -2457,6 +2508,7 @@ declare module 'stripe' { | 'bancontact' | 'blik' | 'boleto' + | 'cashapp' | 'customer_balance' | 'eps' | 'fpx' @@ -2570,6 +2622,11 @@ declare module 'stripe' { */ card_present?: Stripe.Emptyable; + /** + * If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + */ + cashapp?: Stripe.Emptyable; + /** * If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. */ @@ -2738,6 +2795,11 @@ declare module 'stripe' { */ capture_method?: Stripe.Emptyable<'manual'>; + /** + * Preferred language of the Affirm authorization page that the customer is redirected to. + */ + preferred_locale?: string; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -3066,6 +3128,32 @@ declare module 'stripe' { request_incremental_authorization_support?: boolean; } + interface Cashapp { + /** + * 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?: Stripe.Emptyable; + } + + namespace Cashapp { + type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; + } + interface CustomerBalance { /** * Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. @@ -3945,6 +4033,11 @@ declare module 'stripe' { */ 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. */ @@ -4137,6 +4230,8 @@ declare module 'stripe' { tax_id: string; } + interface Cashapp {} + interface CustomerBalance {} interface Eps { @@ -4358,6 +4453,7 @@ declare module 'stripe' { | 'bancontact' | 'blik' | 'boleto' + | 'cashapp' | 'customer_balance' | 'eps' | 'fpx' @@ -4471,6 +4567,11 @@ declare module 'stripe' { */ card_present?: Stripe.Emptyable; + /** + * If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + */ + cashapp?: Stripe.Emptyable; + /** * If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. */ @@ -4639,6 +4740,11 @@ declare module 'stripe' { */ capture_method?: Stripe.Emptyable<'manual'>; + /** + * Preferred language of the Affirm authorization page that the customer is redirected to. + */ + preferred_locale?: string; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -4967,6 +5073,32 @@ declare module 'stripe' { request_incremental_authorization_support?: boolean; } + interface Cashapp { + /** + * 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?: Stripe.Emptyable; + } + + namespace Cashapp { + type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; + } + interface CustomerBalance { /** * Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. diff --git a/types/PaymentLinks.d.ts b/types/PaymentLinks.d.ts index 1ee44b3cb7..994767731e 100644 --- a/types/PaymentLinks.d.ts +++ b/types/PaymentLinks.d.ts @@ -7,7 +7,7 @@ declare module 'stripe' { * * When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links. * - * Related guide: [Payment Links API](https://stripe.com/docs/payments/payment-links/api) + * Related guide: [Payment Links API](https://stripe.com/docs/payment-links) */ interface PaymentLink { /** @@ -393,6 +393,7 @@ declare module 'stripe' { | 'blik' | 'boleto' | 'card' + | 'cashapp' | 'eps' | 'fpx' | 'giropay' diff --git a/types/PaymentLinksResource.d.ts b/types/PaymentLinksResource.d.ts index 824428b707..cec8e54ee5 100644 --- a/types/PaymentLinksResource.d.ts +++ b/types/PaymentLinksResource.d.ts @@ -449,6 +449,7 @@ declare module 'stripe' { | 'blik' | 'boleto' | 'card' + | 'cashapp' | 'eps' | 'fpx' | 'giropay' @@ -1120,6 +1121,7 @@ declare module 'stripe' { | 'blik' | 'boleto' | 'card' + | 'cashapp' | 'eps' | 'fpx' | 'giropay' diff --git a/types/PaymentMethods.d.ts b/types/PaymentMethods.d.ts index f1464d0229..3bf4f14a1f 100644 --- a/types/PaymentMethods.d.ts +++ b/types/PaymentMethods.d.ts @@ -44,6 +44,8 @@ declare module 'stripe' { card_present?: PaymentMethod.CardPresent; + cashapp?: PaymentMethod.Cashapp; + /** * Time at which the object was created. Measured in seconds since the Unix epoch. */ @@ -414,6 +416,8 @@ declare module 'stripe' { interface CardPresent {} + interface Cashapp {} + interface CustomerBalance {} interface Eps { @@ -703,6 +707,7 @@ declare module 'stripe' { | 'boleto' | 'card' | 'card_present' + | 'cashapp' | 'customer_balance' | 'eps' | 'fpx' diff --git a/types/PaymentMethodsResource.d.ts b/types/PaymentMethodsResource.d.ts index 2896d1d119..4ab9cbee0b 100644 --- a/types/PaymentMethodsResource.d.ts +++ b/types/PaymentMethodsResource.d.ts @@ -58,6 +58,11 @@ declare module 'stripe' { */ card?: PaymentMethodCreateParams.Card1 | PaymentMethodCreateParams.Card2; + /** + * If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + */ + cashapp?: PaymentMethodCreateParams.Cashapp; + /** * The `Customer` to whom the original PaymentMethod is attached. */ @@ -291,6 +296,8 @@ declare module 'stripe' { token: string; } + interface Cashapp {} + interface CustomerBalance {} interface Eps { @@ -513,6 +520,7 @@ declare module 'stripe' { | 'blik' | 'boleto' | 'card' + | 'cashapp' | 'customer_balance' | 'eps' | 'fpx' @@ -611,6 +619,11 @@ declare module 'stripe' { */ card?: PaymentMethodUpdateParams.Card; + /** + * This is a legacy parameter that will be removed in the future. It is a hash that does not accept any keys. + */ + cashapp?: PaymentMethodUpdateParams.Cashapp; + /** * Specifies which fields in the response should be expanded. */ @@ -682,6 +695,8 @@ declare module 'stripe' { exp_year?: number; } + interface Cashapp {} + interface Link {} interface SepaDebit {} @@ -728,6 +743,7 @@ declare module 'stripe' { | 'boleto' | 'card' | 'card_present' + | 'cashapp' | 'customer_balance' | 'eps' | 'fpx' diff --git a/types/Products.d.ts b/types/Products.d.ts index ff71a3a0c2..b63205a7e5 100644 --- a/types/Products.d.ts +++ b/types/Products.d.ts @@ -8,7 +8,7 @@ declare module 'stripe' { * They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions. * * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), - * [share a Payment Link](https://stripe.com/docs/payments/payment-links/overview), + * [share a Payment Link](https://stripe.com/docs/payment-links), * [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), * and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) */ diff --git a/types/SetupAttempts.d.ts b/types/SetupAttempts.d.ts index 5cb881a2a8..e0ab817e99 100644 --- a/types/SetupAttempts.d.ts +++ b/types/SetupAttempts.d.ts @@ -106,6 +106,8 @@ declare module 'stripe' { card_present?: PaymentMethodDetails.CardPresent; + cashapp?: PaymentMethodDetails.Cashapp; + ideal?: PaymentMethodDetails.Ideal; klarna?: PaymentMethodDetails.Klarna; @@ -246,6 +248,8 @@ declare module 'stripe' { generated_card: string | Stripe.PaymentMethod | null; } + interface Cashapp {} + interface Ideal { /** * The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. diff --git a/types/SetupIntents.d.ts b/types/SetupIntents.d.ts index c4795c1881..c91cb03a6f 100644 --- a/types/SetupIntents.d.ts +++ b/types/SetupIntents.d.ts @@ -269,6 +269,8 @@ declare module 'stripe' { } interface NextAction { + cashapp_handle_redirect_or_display_qr_code?: NextAction.CashappHandleRedirectOrDisplayQrCode; + redirect_to_url?: NextAction.RedirectToUrl; /** @@ -285,6 +287,39 @@ declare module 'stripe' { } namespace NextAction { + interface CashappHandleRedirectOrDisplayQrCode { + /** + * The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. + */ + hosted_instructions_url: string; + + /** + * The url for mobile redirect based auth + */ + mobile_auth_url: string; + + qr_code: CashappHandleRedirectOrDisplayQrCode.QrCode; + } + + namespace CashappHandleRedirectOrDisplayQrCode { + interface QrCode { + /** + * The date (unix timestamp) when the QR code expires. + */ + expires_at: number; + + /** + * The image_url_png string used to render QR code + */ + image_url_png: string; + + /** + * The image_url_svg string used to render QR code + */ + image_url_svg: string; + } + } + interface RedirectToUrl { /** * If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. diff --git a/types/SetupIntentsResource.d.ts b/types/SetupIntentsResource.d.ts index c84a855a74..49de853b21 100644 --- a/types/SetupIntentsResource.d.ts +++ b/types/SetupIntentsResource.d.ts @@ -194,6 +194,11 @@ declare module 'stripe' { */ 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. */ @@ -386,6 +391,8 @@ declare module 'stripe' { tax_id: string; } + interface Cashapp {} + interface CustomerBalance {} interface Eps { @@ -607,6 +614,7 @@ declare module 'stripe' { | 'bancontact' | 'blik' | 'boleto' + | 'cashapp' | 'customer_balance' | 'eps' | 'fpx' @@ -1071,6 +1079,11 @@ declare module 'stripe' { */ 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. */ @@ -1263,6 +1276,8 @@ declare module 'stripe' { tax_id: string; } + interface Cashapp {} + interface CustomerBalance {} interface Eps { @@ -1484,6 +1499,7 @@ declare module 'stripe' { | 'bancontact' | 'blik' | 'boleto' + | 'cashapp' | 'customer_balance' | 'eps' | 'fpx' @@ -2030,6 +2046,11 @@ declare module 'stripe' { */ 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. */ @@ -2222,6 +2243,8 @@ declare module 'stripe' { tax_id: string; } + interface Cashapp {} + interface CustomerBalance {} interface Eps { @@ -2443,6 +2466,7 @@ declare module 'stripe' { | 'bancontact' | 'blik' | 'boleto' + | 'cashapp' | 'customer_balance' | 'eps' | 'fpx' diff --git a/types/Subscriptions.d.ts b/types/Subscriptions.d.ts index 18968a3839..7bbe81e3dc 100644 --- a/types/Subscriptions.d.ts +++ b/types/Subscriptions.d.ts @@ -511,6 +511,7 @@ declare module 'stripe' { | 'bancontact' | 'boleto' | 'card' + | 'cashapp' | 'customer_balance' | 'fpx' | 'giropay' diff --git a/types/SubscriptionsResource.d.ts b/types/SubscriptionsResource.d.ts index 2d13384a2b..e0763ac584 100644 --- a/types/SubscriptionsResource.d.ts +++ b/types/SubscriptionsResource.d.ts @@ -586,6 +586,7 @@ declare module 'stripe' { | 'bancontact' | 'boleto' | 'card' + | 'cashapp' | 'customer_balance' | 'fpx' | 'giropay' @@ -1296,6 +1297,7 @@ declare module 'stripe' { | 'bancontact' | 'boleto' | 'card' + | 'cashapp' | 'customer_balance' | 'fpx' | 'giropay' diff --git a/types/WebhookEndpointsResource.d.ts b/types/WebhookEndpointsResource.d.ts index 1e1e9e83bb..e690d722bd 100644 --- a/types/WebhookEndpointsResource.d.ts +++ b/types/WebhookEndpointsResource.d.ts @@ -264,6 +264,7 @@ declare module 'stripe' { | 'payout.created' | 'payout.failed' | 'payout.paid' + | 'payout.reconciliation_completed' | 'payout.updated' | 'person.created' | 'person.deleted' @@ -529,6 +530,7 @@ declare module 'stripe' { | 'payout.created' | 'payout.failed' | 'payout.paid' + | 'payout.reconciliation_completed' | 'payout.updated' | 'person.created' | 'person.deleted' From 50f541a9e0f2f1604a8b2c9109a9e251631c0219 Mon Sep 17 00:00:00 2001 From: anniel-stripe <97691964+anniel-stripe@users.noreply.github.com> Date: Wed, 15 Mar 2023 13:34:57 -0700 Subject: [PATCH 2/2] Add ES module package entry point (#1709) Separate ESM entry point --- cjs/package.json | 1 + esm/package.json | 1 + package.json | 19 ++++++++++++++----- 3 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 cjs/package.json create mode 100644 esm/package.json diff --git a/cjs/package.json b/cjs/package.json new file mode 100644 index 0000000000..729ac4d93b --- /dev/null +++ b/cjs/package.json @@ -0,0 +1 @@ +{"type":"commonjs"} diff --git a/esm/package.json b/esm/package.json new file mode 100644 index 0000000000..089153bcb5 --- /dev/null +++ b/esm/package.json @@ -0,0 +1 @@ +{"type":"module"} diff --git a/package.json b/package.json index ad23f44887..91d6c02224 100644 --- a/package.json +++ b/package.json @@ -60,8 +60,8 @@ "license": "MIT", "scripts": { "build": "yarn build-esm && yarn build-cjs", - "build-esm": "mkdir -p esm && tsc -p tsconfig.esm.json", - "build-cjs": "mkdir -p cjs && tsc -p tsconfig.json", + "build-esm": "mkdir -p esm && tsc -p tsconfig.esm.json && echo '{\"type\":\"module\"}' > esm/package.json", + "build-cjs": "mkdir -p cjs && tsc -p tsconfig.json && echo '{\"type\":\"commonjs\"}' > cjs/package.json", "clean": "rm -rf ./.nyc_output ./node_modules/.cache ./coverage ./esm ./cjs", "prepack": "yarn install && yarn build", "mocha": "nyc mocha", @@ -75,8 +75,17 @@ }, "exports": { "types": "./types/index.d.ts", - "browser": "./cjs/stripe.cjs.worker.js", - "worker": "./cjs/stripe.cjs.worker.js", - "default": "./cjs/stripe.cjs.node.js" + "browser": { + "import": "./esm/stripe.esm.worker.js", + "require": "./cjs/stripe.cjs.worker.js" + }, + "worker": { + "import": "./esm/stripe.esm.worker.js", + "require": "./cjs/stripe.cjs.worker.js" + }, + "default": { + "import": "./esm/stripe.esm.node.js", + "require": "./cjs/stripe.cjs.node.js" + } } }