From 7f9ef75bffd7ea782bfaf98ffd16c1bdcf2fcbb0 Mon Sep 17 00:00:00 2001 From: Tim Bartley Date: Thu, 5 Dec 2019 11:43:27 +1000 Subject: [PATCH] [@types/stripe] Add missing client_secret property to ISetupIntentConfirmOptions (#40812) --- types/stripe/index.d.ts | 5 +++++ types/stripe/stripe-tests.ts | 2 ++ 2 files changed, 7 insertions(+) diff --git a/types/stripe/index.d.ts b/types/stripe/index.d.ts index 26683ce0ed..6adc886793 100644 --- a/types/stripe/index.d.ts +++ b/types/stripe/index.d.ts @@ -7835,6 +7835,11 @@ declare namespace Stripe { } interface ISetupIntentConfirmOptions { + /** + * The client secret of this SetupIntent. Used for client-side confirmation using a publishable key. Please refer to dynamic authentication guide on how client_secret should be handled. + */ + client_secret?: string; + /** * ID of the payment method (a PaymentMethod, Card, BankAccount, or saved Source object) * to attach to this SetupIntent. diff --git a/types/stripe/stripe-tests.ts b/types/stripe/stripe-tests.ts index 401b3f89a9..482342e6e3 100644 --- a/types/stripe/stripe-tests.ts +++ b/types/stripe/stripe-tests.ts @@ -2167,6 +2167,8 @@ stripe.setupIntents.retrieve('seti_123456789').then(intent => {}); stripe.setupIntents.confirm('seti_123456789', {}, (err, intent) => {}); stripe.setupIntents.confirm('seti_123456789', {}).then(intent => {}); +stripe.setupIntents.confirm('seti_123456789', {client_secret: 'seti_987654321'}, (err, intent) => {}); +stripe.setupIntents.confirm('seti_123456789', {client_secret: 'seti_987654321'}).then(intent => {}); stripe.setupIntents.cancel('seti_123456789', (err, intent) => {}); stripe.setupIntents.cancel('seti_123456789').then(intent => {});