@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 +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/elements/affirm-message.d.ts +5 -0
- package/types/stripe-js/elements/link-authentication.d.ts +16 -0
- package/types/stripe-js/elements/payment.d.ts +6 -0
- package/types/stripe-js/elements-group.d.ts +9 -1
- package/types/stripe-js/payment-intents.d.ts +67 -0
- package/types/stripe-js/setup-intents.d.ts +11 -0
- package/types/stripe-js/stripe.d.ts +22 -2
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
|
@@ -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(
|
|
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
|
/**
|