@stripe/stripe-js 1.48.0 → 1.49.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
CHANGED
package/dist/pure.js
CHANGED
package/dist/stripe.esm.js
CHANGED
package/dist/stripe.js
CHANGED
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@ export type CreatePaymentMethodData =
|
|
|
22
22
|
| CreatePaymentMethodBancontactData
|
|
23
23
|
| CreatePaymentMethodBoletoData
|
|
24
24
|
| CreatePaymentMethodCardData
|
|
25
|
+
| CreatePaymentMethodCashappData
|
|
25
26
|
| CreatePaymentMethodCustomerBalanceData
|
|
26
27
|
| CreatePaymentMethodEpsData
|
|
27
28
|
| CreatePaymentMethodGiropayData
|
|
@@ -122,6 +123,10 @@ export interface CreatePaymentMethodCardData extends PaymentMethodCreateParams {
|
|
|
122
123
|
card: StripeCardElement | StripeCardNumberElement | {token: string};
|
|
123
124
|
}
|
|
124
125
|
|
|
126
|
+
interface CreatePaymentMethodCashappData extends PaymentMethodCreateParams {
|
|
127
|
+
type: 'cashapp';
|
|
128
|
+
}
|
|
129
|
+
|
|
125
130
|
export interface CreatePaymentMethodCustomerBalanceData
|
|
126
131
|
extends PaymentMethodCreateParams {
|
|
127
132
|
/**
|
|
@@ -643,6 +648,36 @@ export interface ConfirmCardPaymentOptions {
|
|
|
643
648
|
handleActions?: boolean;
|
|
644
649
|
}
|
|
645
650
|
|
|
651
|
+
/**
|
|
652
|
+
* Data to be sent with a `stripe.confirmCashappPayment` request.
|
|
653
|
+
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
654
|
+
*/
|
|
655
|
+
interface ConfirmCashappPaymentData extends PaymentIntentConfirmParams {
|
|
656
|
+
/**
|
|
657
|
+
* The `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods).
|
|
658
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent` or a new `PaymentMethod` will be created.
|
|
659
|
+
*
|
|
660
|
+
* @recommended
|
|
661
|
+
*/
|
|
662
|
+
payment_method?: string | Omit<CreatePaymentMethodCashappData, 'type'>;
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* The url your customer will be directed to after they complete authentication.
|
|
666
|
+
*/
|
|
667
|
+
return_url?: string;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* An options object to control the behavior of `stripe.confirmCashappPayment`.
|
|
672
|
+
*/
|
|
673
|
+
interface ConfirmCashappPaymentOptions {
|
|
674
|
+
/**
|
|
675
|
+
* Set this to `false` if you want to [manually handle the authorization QR code or redirect](https://stripe.com/docs/payments/cash-app-pay/accept-a-payment?platform=web&ui=API#handle-redirect).
|
|
676
|
+
* Default is `true`.
|
|
677
|
+
*/
|
|
678
|
+
handleActions?: boolean;
|
|
679
|
+
}
|
|
680
|
+
|
|
646
681
|
/**
|
|
647
682
|
* Data to be sent with a `stripe.confirmCustomerBalancePayment` request.
|
|
648
683
|
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
CreatePaymentMethodAuBecsDebitData,
|
|
6
6
|
CreatePaymentMethodBancontactData,
|
|
7
7
|
CreatePaymentMethodCardData,
|
|
8
|
+
CreatePaymentMethodCashappData,
|
|
8
9
|
CreatePaymentMethodIdealData,
|
|
9
10
|
CreatePaymentMethodSepaDebitData,
|
|
10
11
|
CreatePaymentMethodSofortData,
|
|
@@ -41,6 +42,32 @@ export interface ConfirmCardSetupOptions {
|
|
|
41
42
|
handleActions?: boolean;
|
|
42
43
|
}
|
|
43
44
|
|
|
45
|
+
interface ConfirmCashappSetupData extends SetupIntentConfirmParams {
|
|
46
|
+
/*
|
|
47
|
+
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
48
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
49
|
+
*
|
|
50
|
+
* @recommended
|
|
51
|
+
*/
|
|
52
|
+
payment_method?: string | Omit<CreatePaymentMethodCashappData, 'type'>;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The url your customer will be directed to after they complete authentication.
|
|
56
|
+
*/
|
|
57
|
+
return_url?: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* An options object to control the behavior of `stripe.confirmCashappSetup`.
|
|
62
|
+
*/
|
|
63
|
+
interface ConfirmCashappSetupOptions {
|
|
64
|
+
/*
|
|
65
|
+
* Set this to `false` if you want to [manually handle the authorization QR code or redirect](https://stripe.com/docs/payments/cash-app-pay/set-up-payment?platform=web&ui=API#web-create-setup-intent).
|
|
66
|
+
* Default is `true`.
|
|
67
|
+
*/
|
|
68
|
+
handleActions?: boolean;
|
|
69
|
+
}
|
|
70
|
+
|
|
44
71
|
/**
|
|
45
72
|
* Data to be sent with a `stripe.confirmIdealSetup` request.
|
|
46
73
|
* Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
|
|
@@ -194,6 +194,23 @@ export interface Stripe {
|
|
|
194
194
|
options?: paymentIntents.ConfirmCardPaymentOptions
|
|
195
195
|
): Promise<PaymentIntentResult>;
|
|
196
196
|
|
|
197
|
+
/**
|
|
198
|
+
* Use `stripe.confirmCashappPayment` in the [Cash App Payments](https://stripe.com/docs/payments/cash-app-pay) with Payment Methods flow when the customer submits your payment form.
|
|
199
|
+
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
|
|
200
|
+
* Refer to our [integration guide](https://stripe.com/docs/payments/cash-app-pay) for more details.
|
|
201
|
+
*
|
|
202
|
+
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
|
|
203
|
+
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
|
|
204
|
+
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
|
|
205
|
+
*
|
|
206
|
+
* @docs https://stripe.com/docs/js/payment_intents/confirm_cashapp_payment
|
|
207
|
+
*/
|
|
208
|
+
confirmCashappPayment(
|
|
209
|
+
clientSecret: string,
|
|
210
|
+
data?: paymentIntents.ConfirmCashappPaymentData,
|
|
211
|
+
options?: paymentIntents.ConfirmCashappPaymentOptions
|
|
212
|
+
): Promise<PaymentIntentResult>;
|
|
213
|
+
|
|
197
214
|
/**
|
|
198
215
|
* Requires beta access:
|
|
199
216
|
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
@@ -697,6 +714,23 @@ export interface Stripe {
|
|
|
697
714
|
options?: setupIntents.ConfirmCardSetupOptions
|
|
698
715
|
): Promise<SetupIntentResult>;
|
|
699
716
|
|
|
717
|
+
/**
|
|
718
|
+
* Use `stripe.confirmCashappSetup` in the [Setup Intents API flow](https://stripe.com/docs/payments/save-and-reuse) when the customer submits your payment form.
|
|
719
|
+
* When called, it will confirm the [SetupIntent](https://stripe.com/docs/api/setup_intents) with `data` you provide.
|
|
720
|
+
* Refer to our [integration guide](https://stripe.com/docs/payments/cash-app-pay) for more details..
|
|
721
|
+
*
|
|
722
|
+
* When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
|
|
723
|
+
* In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
|
|
724
|
+
* It can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
|
|
725
|
+
*
|
|
726
|
+
* @docs https://stripe.com/docs/js/payment_intents/confirm_cashapp_setup
|
|
727
|
+
*/
|
|
728
|
+
confirmCashappSetup(
|
|
729
|
+
clientSecret: string,
|
|
730
|
+
data?: setupIntents.ConfirmCashappSetupData,
|
|
731
|
+
options?: setupIntents.ConfirmCashappSetupOptions
|
|
732
|
+
): Promise<SetupIntentResult>;
|
|
733
|
+
|
|
700
734
|
/**
|
|
701
735
|
* Use `stripe.confirmIdealSetup` in the [Set up future payments](https://stripe.com/docs/payments/ideal/set-up-payment) flow to use iDEAL bank details to set up a SEPA Direct Debit payment method for future payments.
|
|
702
736
|
* When called, it will confirm a `SetupIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
|