@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
@@ -54,7 +54,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
54
54
 
55
55
  stripe._registerWrapper({
56
56
  name: 'stripe-js',
57
- version: "1.48.0",
57
+ version: "1.49.0",
58
58
  startTime: startTime
59
59
  });
60
60
  };
package/dist/pure.js CHANGED
@@ -58,7 +58,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
58
58
 
59
59
  stripe._registerWrapper({
60
60
  name: 'stripe-js',
61
- version: "1.48.0",
61
+ version: "1.49.0",
62
62
  startTime: startTime
63
63
  });
64
64
  };
@@ -38,7 +38,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
38
38
 
39
39
  stripe._registerWrapper({
40
40
  name: 'stripe-js',
41
- version: "1.48.0",
41
+ version: "1.49.0",
42
42
  startTime: startTime
43
43
  });
44
44
  };
package/dist/stripe.js CHANGED
@@ -42,7 +42,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
42
42
 
43
43
  stripe._registerWrapper({
44
44
  name: 'stripe-js',
45
- version: "1.48.0",
45
+ version: "1.49.0",
46
46
  startTime: startTime
47
47
  });
48
48
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/stripe-js",
3
- "version": "1.48.0",
3
+ "version": "1.49.0",
4
4
  "description": "Stripe.js loading utility",
5
5
  "main": "dist/stripe.js",
6
6
  "module": "dist/stripe.esm.js",
@@ -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.