Skip to content

Commit

Permalink
[@types/stripe] Add missing client_secret property to ISetupIntentCon…
Browse files Browse the repository at this point in the history
…firmOptions (DefinitelyTyped#40812)
  • Loading branch information
tbartley authored and rbuckton committed Dec 5, 2019
1 parent d0cb735 commit 7f9ef75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions types/stripe/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions types/stripe/stripe-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {});
Expand Down

0 comments on commit 7f9ef75

Please sign in to comment.