diff --git a/types/stripe/index.d.ts b/types/stripe/index.d.ts index d7d198d746..d747fc6de9 100644 --- a/types/stripe/index.d.ts +++ b/types/stripe/index.d.ts @@ -7337,6 +7337,11 @@ declare namespace Stripe { options: HeaderOptions, response?: IResponseFn, ): Promise; + cancel( + paymentIntentId: string, + options: HeaderOptions, + response?: IResponseFn, + ): Promise; cancel( paymentIntentId: string, data: { @@ -7344,6 +7349,10 @@ declare namespace Stripe { }, response?: IResponseFn, ): Promise; + cancel( + paymentIntentId: string, + response?: IResponseFn, + ): Promise; } class Payouts extends StripeResource { diff --git a/types/stripe/stripe-tests.ts b/types/stripe/stripe-tests.ts index 6fc4a5ac25..bffadadb23 100644 --- a/types/stripe/stripe-tests.ts +++ b/types/stripe/stripe-tests.ts @@ -1057,6 +1057,8 @@ stripe.paymentIntents.confirm("pi_Aabcxyz01aDfoo", {}).then((intent) => {}); stripe.paymentIntents.capture("pi_Aabcxyz01aDfoo", {}, (err, intent) => {}); stripe.paymentIntents.capture("pi_Aabcxyz01aDfoo", {}).then((intent) => {}); +stripe.paymentIntents.cancel("pi_Aabcxyz01aDfoo", (err, intent) => {}); +stripe.paymentIntents.cancel("pi_Aabcxyz01aDfoo").then((intent) => {}); stripe.paymentIntents.cancel("pi_Aabcxyz01aDfoo", {}, (err, intent) => {}); stripe.paymentIntents.cancel("pi_Aabcxyz01aDfoo", {}).then((intent) => {}); stripe.paymentIntents.cancel("pi_Aabcxyz01aDfoo", { cancellation_reason: 'duplicate' }, (err, intent) => {});