@stripe/stripe-js 1.51.0 → 1.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pure.esm.js +1 -1
- package/dist/pure.js +1 -1
- package/dist/stripe.esm.js +1 -1
- package/dist/stripe.js +1 -1
- package/package.json +1 -1
- package/types/stripe-js/stripe.d.ts +12 -3
package/dist/pure.esm.js
CHANGED
package/dist/pure.js
CHANGED
package/dist/stripe.esm.js
CHANGED
package/dist/stripe.js
CHANGED
package/package.json
CHANGED
|
@@ -590,8 +590,8 @@ export interface Stripe {
|
|
|
590
590
|
handleCardAction(clientSecret: string): Promise<PaymentIntentResult>;
|
|
591
591
|
|
|
592
592
|
/**
|
|
593
|
-
* Use `stripe.handleNextAction` in the
|
|
594
|
-
* It will throw an error if the `PaymentIntent` has a different status.
|
|
593
|
+
* Use `stripe.handleNextAction` in the [finalizing payments on the server](https://stripe.com/docs/payments/finalize-payments-on-the-server) flow to finish confirmation of a [PaymentIntent](https://stripe.com/docs/api/payment_intents) or [SetupIntent](https://stripe.com/docs/api/setup_intents) with the `requires_action` status.
|
|
594
|
+
* It will throw an error if the `PaymentIntent` or `SetupIntent` has a different status.
|
|
595
595
|
*
|
|
596
596
|
* Note that `stripe.handleNextAction` may take several seconds to complete.
|
|
597
597
|
* During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.
|
|
@@ -605,7 +605,7 @@ export interface Stripe {
|
|
|
605
605
|
*/
|
|
606
606
|
handleNextAction(options: {
|
|
607
607
|
clientSecret: string;
|
|
608
|
-
}): Promise<
|
|
608
|
+
}): Promise<PaymentIntentOrSetupIntentResult>;
|
|
609
609
|
|
|
610
610
|
/**
|
|
611
611
|
* Use `stripe.verifyMicrodepositsForPayment` in the [Accept a Canadian pre-authorized debit payment](https://stripe.com/docs/payments/acss-debit/accept-a-payment) flow
|
|
@@ -1203,6 +1203,15 @@ export type SetupIntentResult =
|
|
|
1203
1203
|
| {setupIntent: api.SetupIntent; error?: undefined}
|
|
1204
1204
|
| {setupIntent?: undefined; error: StripeError};
|
|
1205
1205
|
|
|
1206
|
+
export type PaymentIntentOrSetupIntentResult =
|
|
1207
|
+
| {
|
|
1208
|
+
paymentIntent: api.PaymentIntent;
|
|
1209
|
+
setupIntent?: undefined;
|
|
1210
|
+
error?: undefined;
|
|
1211
|
+
}
|
|
1212
|
+
| {paymentIntent?: undefined; setupIntent: api.SetupIntent; error?: undefined}
|
|
1213
|
+
| {paymentIntent?: undefined; setupIntent?: undefined; error: StripeError};
|
|
1214
|
+
|
|
1206
1215
|
export type ProcessOrderResult =
|
|
1207
1216
|
| {paymentIntent: api.PaymentIntent; order: api.Order; error?: undefined}
|
|
1208
1217
|
| {paymentIntent?: undefined; order: api.Order; error?: undefined}
|