@stripe/stripe-js 1.21.2 → 1.24.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.21.2",
57
+ version: "1.24.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.21.2",
61
+ version: "1.24.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.21.2",
41
+ version: "1.24.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.21.2",
45
+ version: "1.24.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.21.2",
3
+ "version": "1.24.0",
4
4
  "description": "Stripe.js loading utility",
5
5
  "main": "dist/stripe.js",
6
6
  "module": "dist/stripe.esm.js",
@@ -57,4 +57,9 @@ export interface StripeAffirmMessageElementOptions {
57
57
  * The font size of the promotional message.
58
58
  */
59
59
  fontSize?: string;
60
+
61
+ /**
62
+ * The text alignment of the promotional message.
63
+ */
64
+ textAlign?: 'start' | 'end' | 'left' | 'right' | 'center' | 'justify';
60
65
  }
@@ -82,6 +82,15 @@ export type StripeLinkAuthenticationElement = StripeElementBase & {
82
82
  ): StripeLinkAuthenticationElement;
83
83
  };
84
84
 
85
+ export interface StripeLinkAuthenticationElementOptions {
86
+ /**
87
+ * Default value for LinkAuthenticationElement fields
88
+ */
89
+ defaultValues?: {
90
+ email: string;
91
+ };
92
+ }
93
+
85
94
  export interface StripeLinkAuthenticationElementChangeEvent
86
95
  extends StripeElementChangeEvent {
87
96
  /**
@@ -98,4 +107,11 @@ export interface StripeLinkAuthenticationElementChangeEvent
98
107
  * Whether or not the LinkAuthentication Element is complete.
99
108
  */
100
109
  complete: boolean;
110
+
111
+ /**
112
+ * An object containing the current email.
113
+ */
114
+ value: {
115
+ email: string;
116
+ };
101
117
  }
@@ -152,6 +152,12 @@ export interface StripePaymentElementOptions {
152
152
  */
153
153
  fields?: FieldsOption;
154
154
 
155
+ /**
156
+ * Apply a read-only state to the Payment Element so that payment details can’t be changed.
157
+ * Default is false.
158
+ */
159
+ readOnly?: boolean;
160
+
155
161
  /**
156
162
  * Control terms display in the Payment Element.
157
163
  */
@@ -6,6 +6,7 @@ import {
6
6
  StripePaymentElement,
7
7
  StripePaymentElementOptions,
8
8
  StripeLinkAuthenticationElement,
9
+ StripeLinkAuthenticationElementOptions,
9
10
  StripeIdealBankElement,
10
11
  StripeIdealBankElementOptions,
11
12
  StripeIbanElement,
@@ -267,7 +268,10 @@ export interface StripeElements {
267
268
  *
268
269
  * Creates a `LinkAuthenticationElement`.
269
270
  */
270
- create(elementType: 'linkAuthentication'): StripeLinkAuthenticationElement;
271
+ create(
272
+ elementType: 'linkAuthentication',
273
+ options?: StripeLinkAuthenticationElementOptions
274
+ ): StripeLinkAuthenticationElement;
271
275
 
272
276
  /**
273
277
  * Requires beta access:
@@ -533,6 +537,8 @@ export interface CustomFontSource {
533
537
  * @docs https://stripe.com/docs/stripe-js/appearance-api
534
538
  */
535
539
  export interface Appearance {
540
+ disableAnimations?: boolean;
541
+
536
542
  theme?: 'stripe' | 'night' | 'flat' | 'none';
537
543
 
538
544
  variables?: {
@@ -616,4 +622,6 @@ export interface Appearance {
616
622
  [cssPropertyName: string]: string;
617
623
  };
618
624
  };
625
+
626
+ labels?: 'above' | 'floating';
619
627
  }
@@ -28,6 +28,7 @@ export type CreatePaymentMethodData =
28
28
  | CreatePaymentMethodGrabPayData
29
29
  | CreatePaymentMethodIdealData
30
30
  | CreatePaymentMethodKlarnaData
31
+ | CreatePaymentMethodKonbiniData
31
32
  | CreatePaymentMethodP24Data
32
33
  | CreatePaymentMethodPayPalData
33
34
  | CreatePaymentMethodPayNowData
@@ -224,6 +225,22 @@ export interface CreatePaymentMethodKlarnaData
224
225
  };
225
226
  }
226
227
 
228
+ export interface CreatePaymentMethodKonbiniData
229
+ extends PaymentMethodCreateParams {
230
+ type: 'konbini';
231
+
232
+ /**
233
+ * The customer's billing details.
234
+ * `email` and `name` are required.
235
+ *
236
+ * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
237
+ */
238
+ billing_details: PaymentMethodCreateParams.BillingDetails & {
239
+ email: string;
240
+ name: string;
241
+ };
242
+ }
243
+
227
244
  export interface CreatePaymentMethodOxxoData extends PaymentMethodCreateParams {
228
245
  type: 'oxxo';
229
246
 
@@ -828,6 +845,45 @@ export interface ConfirmKlarnaPaymentOptions {
828
845
  handleActions?: boolean;
829
846
  }
830
847
 
848
+ /**
849
+ * Data to be sent with a `stripe.confirmKonbiniPayment` request.
850
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
851
+ */
852
+ export interface ConfirmKonbiniPaymentData extends PaymentIntentConfirmParams {
853
+ /**
854
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
855
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
856
+ *
857
+ * @recommended
858
+ */
859
+ payment_method?: string | Omit<CreatePaymentMethodKonbiniData, 'type'>;
860
+
861
+ /**
862
+ * An object containing payment-method-specific configuration to confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with.
863
+ */
864
+ payment_method_options?: {
865
+ /**
866
+ * Configuration for this Konbini payment.
867
+ */
868
+ konbini: {
869
+ /**
870
+ * An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. May not be all 0 and could be rejected in case of insufficient uniqueness. We recommend to use the customer’s phone number.
871
+ */
872
+ confirmation_number?: string;
873
+ };
874
+ };
875
+ }
876
+
877
+ /**
878
+ * An options object to control the behavior of `stripe.confirmKonbiniPayment`.
879
+ */
880
+ export interface ConfirmKonbiniPaymentOptions {
881
+ /**
882
+ * Set this to `false` if you want to handle next actions yourself. Please refer to our [integration guide](https://stripe.com/docs/payments/konbini/accept-a-payment) for more info. Default is `true`.
883
+ */
884
+ handleActions?: boolean;
885
+ }
886
+
831
887
  /**
832
888
  * Data to be sent with a `stripe.confirmOxxoPayment` request.
833
889
  * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
@@ -994,6 +1050,17 @@ export interface ConfirmSofortPaymentData extends PaymentIntentConfirmParams {
994
1050
  setup_future_usage?: 'off_session';
995
1051
  }
996
1052
 
1053
+ /**
1054
+ * An options object to control the behavior of `stripe.confirmSofortPayment`.
1055
+ */
1056
+ export interface ConfirmSofortPaymentOptions {
1057
+ /**
1058
+ * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/sofort/accept-a-payment?platform=web#handle-redirect).
1059
+ * Default is `true`.
1060
+ */
1061
+ handleActions?: boolean;
1062
+ }
1063
+
997
1064
  /**
998
1065
  * Data to be sent with a `stripe.confirmWechatPayPayment` request.
999
1066
  * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
@@ -100,6 +100,17 @@ export interface ConfirmSofortSetupData extends SetupIntentConfirmParams {
100
100
  payment_method?: string | Omit<CreatePaymentMethodSofortData, 'type'>;
101
101
  }
102
102
 
103
+ /**
104
+ * An options object to control the behavior of `stripe.confirmSofortSetup`.
105
+ */
106
+ export interface ConfirmSofortSetupOptions {
107
+ /**
108
+ * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/sofort/accept-a-payment?platform=web#handle-redirect).
109
+ * Default is `true`.
110
+ */
111
+ handleActions?: boolean;
112
+ }
113
+
103
114
  /**
104
115
  * Data to be sent with a `stripe.confirmAuBecsDebitSetup` request.
105
116
  * Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
@@ -304,6 +304,24 @@ export interface Stripe {
304
304
  options?: paymentIntents.ConfirmKlarnaPaymentOptions
305
305
  ): Promise<PaymentIntentResult>;
306
306
 
307
+ /**
308
+ * Use `stripe.confirmKonbiniPayment` in the [Konbini](https://stripe.com/docs/payments/konbini) payment flow when the customer submits your payment form.
309
+ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
310
+ * Note that there are some additional requirements to this flow that are not covered in this reference.
311
+ * Refer to our [integration guide](https://stripe.com/docs/payments/konbini/accept-a-payment) for more details.
312
+ *
313
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
314
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
315
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
316
+ *
317
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_konbini_payment
318
+ */
319
+ confirmKonbiniPayment(
320
+ clientSecret: string,
321
+ data?: paymentIntents.ConfirmKonbiniPaymentData,
322
+ options?: paymentIntents.ConfirmKonbiniPaymentOptions
323
+ ): Promise<PaymentIntentResult>;
324
+
307
325
  /**
308
326
  * Use `stripe.confirmOxxoPayment` in the [OXXO Payment](https://stripe.com/docs/payments/oxxo) with Payment Methods flow when the customer submits your payment form.
309
327
  * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
@@ -424,7 +442,8 @@ export interface Stripe {
424
442
  */
425
443
  confirmSofortPayment(
426
444
  clientSecret: string,
427
- data?: paymentIntents.ConfirmSofortPaymentData
445
+ data?: paymentIntents.ConfirmSofortPaymentData,
446
+ options?: paymentIntents.ConfirmSofortPaymentOptions
428
447
  ): Promise<PaymentIntentResult>;
429
448
 
430
449
  /**
@@ -680,7 +699,8 @@ export interface Stripe {
680
699
  */
681
700
  confirmSofortSetup(
682
701
  clientSecret: string,
683
- data?: setupIntents.ConfirmSofortSetupData
702
+ data?: setupIntents.ConfirmSofortSetupData,
703
+ options?: setupIntents.ConfirmSofortSetupOptions
684
704
  ): Promise<SetupIntentResult>;
685
705
 
686
706
  /**