@stripe/stripe-js 4.7.0 → 4.9.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/api/confirmation-tokens.d.mts +0 -3
- package/dist/api/confirmation-tokens.d.ts +0 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/pure.js +1 -1
- package/dist/pure.mjs +1 -1
- package/dist/stripe-js/custom-checkout.d.mts +22 -3
- package/dist/stripe-js/custom-checkout.d.ts +22 -3
- package/dist/stripe-js/elements/currency-selector.d.mts +93 -0
- package/dist/stripe-js/elements/currency-selector.d.ts +93 -0
- package/dist/stripe-js/elements/index.d.mts +1 -0
- package/dist/stripe-js/elements/index.d.ts +1 -0
- package/dist/stripe-js/elements/payment.d.mts +135 -0
- package/dist/stripe-js/elements/payment.d.ts +135 -0
- package/dist/stripe-js/elements-group.d.mts +3 -6
- package/dist/stripe-js/elements-group.d.ts +3 -6
- package/dist/stripe-js/embedded-checkout.d.mts +30 -0
- package/dist/stripe-js/embedded-checkout.d.ts +30 -0
- package/dist/stripe-js/payment-intents.d.mts +79 -3
- package/dist/stripe-js/payment-intents.d.ts +79 -3
- package/dist/stripe-js/setup-intents.d.mts +0 -3
- package/dist/stripe-js/setup-intents.d.ts +0 -3
- package/dist/stripe-js/stripe.d.mts +35 -0
- package/dist/stripe-js/stripe.d.ts +35 -0
- package/package.json +1 -1
|
@@ -84,9 +84,6 @@ export interface ConfirmationTokenCreateParams {
|
|
|
84
84
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
|
-
* Requires beta access:
|
|
88
|
-
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
89
|
-
*
|
|
90
87
|
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature
|
|
91
88
|
*/
|
|
92
89
|
allow_redisplay?: 'always' | 'limited' | 'unspecified';
|
|
@@ -84,9 +84,6 @@ export interface ConfirmationTokenCreateParams {
|
|
|
84
84
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
|
-
* Requires beta access:
|
|
88
|
-
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
89
|
-
*
|
|
90
87
|
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature
|
|
91
88
|
*/
|
|
92
89
|
allow_redisplay?: 'always' | 'limited' | 'unspecified';
|
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
package/dist/pure.js
CHANGED
package/dist/pure.mjs
CHANGED
|
@@ -12,6 +12,8 @@ import {
|
|
|
12
12
|
import {Appearance, CssFontSource, CustomFontSource} from './elements-group';
|
|
13
13
|
import {StripeError} from './stripe';
|
|
14
14
|
import {
|
|
15
|
+
StripeCurrencySelectorElement,
|
|
16
|
+
FieldsOption,
|
|
15
17
|
StripeElementBase,
|
|
16
18
|
StripeExpressCheckoutElement,
|
|
17
19
|
StripeExpressCheckoutElementConfirmEvent,
|
|
@@ -151,6 +153,7 @@ export type StripeCustomCheckoutLineItem = {
|
|
|
151
153
|
usageType: 'metered' | 'licensed';
|
|
152
154
|
} | null;
|
|
153
155
|
adjustableQuantity: StripeCustomCheckoutAdjustableQuantity | null;
|
|
156
|
+
images: string[];
|
|
154
157
|
};
|
|
155
158
|
|
|
156
159
|
export type StripeCustomCheckoutRecurring = {
|
|
@@ -202,6 +205,12 @@ export type StripeCustomCheckoutTrial = {
|
|
|
202
205
|
trialPeriodDays: number;
|
|
203
206
|
};
|
|
204
207
|
|
|
208
|
+
export type StripeCustomCheckoutCurrencyOption = {
|
|
209
|
+
unitAmount: number;
|
|
210
|
+
currency: string;
|
|
211
|
+
currencyConversion?: {fxRate: number; sourceCurrency: string};
|
|
212
|
+
};
|
|
213
|
+
|
|
205
214
|
/* Custom Checkout session */
|
|
206
215
|
export interface StripeCustomCheckoutSession {
|
|
207
216
|
billingAddress: StripeCustomCheckoutContact | null;
|
|
@@ -209,6 +218,7 @@ export interface StripeCustomCheckoutSession {
|
|
|
209
218
|
canConfirm: boolean;
|
|
210
219
|
confirmationRequirements: StripeCustomCheckoutConfirmationRequirement[];
|
|
211
220
|
currency: string;
|
|
221
|
+
currencyOptions: Array<StripeCustomCheckoutCurrencyOption> | null;
|
|
212
222
|
discountAmounts: Array<StripeCustomCheckoutDiscountAmount> | null;
|
|
213
223
|
email: string | null;
|
|
214
224
|
id: string;
|
|
@@ -236,6 +246,7 @@ export type StripeCustomCheckoutPaymentElementOptions = {
|
|
|
236
246
|
paymentMethodOrder?: Array<string>;
|
|
237
247
|
readonly?: boolean;
|
|
238
248
|
terms?: TermsOption;
|
|
249
|
+
fields?: FieldsOption;
|
|
239
250
|
};
|
|
240
251
|
|
|
241
252
|
export type StripeCustomCheckoutAddressElementOptions = {
|
|
@@ -252,6 +263,7 @@ export type StripeCustomCheckoutExpressCheckoutElementOptions = {
|
|
|
252
263
|
buttonType: StripeExpressCheckoutElementOptions['buttonType'];
|
|
253
264
|
layout: StripeExpressCheckoutElementOptions['layout'];
|
|
254
265
|
paymentMethodOrder: StripeExpressCheckoutElementOptions['paymentMethodOrder'];
|
|
266
|
+
paymentMethods: StripeExpressCheckoutElementOptions['paymentMethods'];
|
|
255
267
|
};
|
|
256
268
|
|
|
257
269
|
export type StripeCustomCheckoutUpdateHandler = (
|
|
@@ -393,8 +405,10 @@ export interface StripeCustomCheckout {
|
|
|
393
405
|
updateBillingAddress: (
|
|
394
406
|
billingAddress: StripeCustomCheckoutContact | null
|
|
395
407
|
) => Promise<StripeCustomCheckoutResult>;
|
|
396
|
-
updatePhoneNumber: (
|
|
397
|
-
|
|
408
|
+
updatePhoneNumber: (
|
|
409
|
+
phoneNumber: string
|
|
410
|
+
) => Promise<StripeCustomCheckoutResult>;
|
|
411
|
+
updateEmail: (email: string) => Promise<StripeCustomCheckoutResult>;
|
|
398
412
|
updateLineItemQuantity: (args: {
|
|
399
413
|
lineItem: string;
|
|
400
414
|
quantity: number;
|
|
@@ -403,7 +417,6 @@ export interface StripeCustomCheckout {
|
|
|
403
417
|
shippingOption: string
|
|
404
418
|
) => Promise<StripeCustomCheckoutResult>;
|
|
405
419
|
confirm: (args?: {
|
|
406
|
-
return_url?: string;
|
|
407
420
|
returnUrl?: string;
|
|
408
421
|
redirect?: StripeCustomCheckoutRedirectBehavior;
|
|
409
422
|
paymentMethod?: string;
|
|
@@ -422,6 +435,10 @@ export interface StripeCustomCheckout {
|
|
|
422
435
|
getElement(
|
|
423
436
|
elementType: 'expressCheckout'
|
|
424
437
|
): StripeCustomCheckoutExpressCheckoutElement | null;
|
|
438
|
+
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
439
|
+
getElement(
|
|
440
|
+
elementType: 'currencySelector'
|
|
441
|
+
): StripeCurrencySelectorElement | null;
|
|
425
442
|
createElement(
|
|
426
443
|
elementType: 'payment',
|
|
427
444
|
options?: StripeCustomCheckoutPaymentElementOptions
|
|
@@ -434,4 +451,6 @@ export interface StripeCustomCheckout {
|
|
|
434
451
|
elementType: 'expressCheckout',
|
|
435
452
|
options: StripeCustomCheckoutExpressCheckoutElementOptions
|
|
436
453
|
): StripeCustomCheckoutExpressCheckoutElement;
|
|
454
|
+
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
455
|
+
createElement(elementType: 'currencySelector'): StripeCurrencySelectorElement;
|
|
437
456
|
}
|
|
@@ -12,6 +12,8 @@ import {
|
|
|
12
12
|
import {Appearance, CssFontSource, CustomFontSource} from './elements-group';
|
|
13
13
|
import {StripeError} from './stripe';
|
|
14
14
|
import {
|
|
15
|
+
StripeCurrencySelectorElement,
|
|
16
|
+
FieldsOption,
|
|
15
17
|
StripeElementBase,
|
|
16
18
|
StripeExpressCheckoutElement,
|
|
17
19
|
StripeExpressCheckoutElementConfirmEvent,
|
|
@@ -151,6 +153,7 @@ export type StripeCustomCheckoutLineItem = {
|
|
|
151
153
|
usageType: 'metered' | 'licensed';
|
|
152
154
|
} | null;
|
|
153
155
|
adjustableQuantity: StripeCustomCheckoutAdjustableQuantity | null;
|
|
156
|
+
images: string[];
|
|
154
157
|
};
|
|
155
158
|
|
|
156
159
|
export type StripeCustomCheckoutRecurring = {
|
|
@@ -202,6 +205,12 @@ export type StripeCustomCheckoutTrial = {
|
|
|
202
205
|
trialPeriodDays: number;
|
|
203
206
|
};
|
|
204
207
|
|
|
208
|
+
export type StripeCustomCheckoutCurrencyOption = {
|
|
209
|
+
unitAmount: number;
|
|
210
|
+
currency: string;
|
|
211
|
+
currencyConversion?: {fxRate: number; sourceCurrency: string};
|
|
212
|
+
};
|
|
213
|
+
|
|
205
214
|
/* Custom Checkout session */
|
|
206
215
|
export interface StripeCustomCheckoutSession {
|
|
207
216
|
billingAddress: StripeCustomCheckoutContact | null;
|
|
@@ -209,6 +218,7 @@ export interface StripeCustomCheckoutSession {
|
|
|
209
218
|
canConfirm: boolean;
|
|
210
219
|
confirmationRequirements: StripeCustomCheckoutConfirmationRequirement[];
|
|
211
220
|
currency: string;
|
|
221
|
+
currencyOptions: Array<StripeCustomCheckoutCurrencyOption> | null;
|
|
212
222
|
discountAmounts: Array<StripeCustomCheckoutDiscountAmount> | null;
|
|
213
223
|
email: string | null;
|
|
214
224
|
id: string;
|
|
@@ -236,6 +246,7 @@ export type StripeCustomCheckoutPaymentElementOptions = {
|
|
|
236
246
|
paymentMethodOrder?: Array<string>;
|
|
237
247
|
readonly?: boolean;
|
|
238
248
|
terms?: TermsOption;
|
|
249
|
+
fields?: FieldsOption;
|
|
239
250
|
};
|
|
240
251
|
|
|
241
252
|
export type StripeCustomCheckoutAddressElementOptions = {
|
|
@@ -252,6 +263,7 @@ export type StripeCustomCheckoutExpressCheckoutElementOptions = {
|
|
|
252
263
|
buttonType: StripeExpressCheckoutElementOptions['buttonType'];
|
|
253
264
|
layout: StripeExpressCheckoutElementOptions['layout'];
|
|
254
265
|
paymentMethodOrder: StripeExpressCheckoutElementOptions['paymentMethodOrder'];
|
|
266
|
+
paymentMethods: StripeExpressCheckoutElementOptions['paymentMethods'];
|
|
255
267
|
};
|
|
256
268
|
|
|
257
269
|
export type StripeCustomCheckoutUpdateHandler = (
|
|
@@ -393,8 +405,10 @@ export interface StripeCustomCheckout {
|
|
|
393
405
|
updateBillingAddress: (
|
|
394
406
|
billingAddress: StripeCustomCheckoutContact | null
|
|
395
407
|
) => Promise<StripeCustomCheckoutResult>;
|
|
396
|
-
updatePhoneNumber: (
|
|
397
|
-
|
|
408
|
+
updatePhoneNumber: (
|
|
409
|
+
phoneNumber: string
|
|
410
|
+
) => Promise<StripeCustomCheckoutResult>;
|
|
411
|
+
updateEmail: (email: string) => Promise<StripeCustomCheckoutResult>;
|
|
398
412
|
updateLineItemQuantity: (args: {
|
|
399
413
|
lineItem: string;
|
|
400
414
|
quantity: number;
|
|
@@ -403,7 +417,6 @@ export interface StripeCustomCheckout {
|
|
|
403
417
|
shippingOption: string
|
|
404
418
|
) => Promise<StripeCustomCheckoutResult>;
|
|
405
419
|
confirm: (args?: {
|
|
406
|
-
return_url?: string;
|
|
407
420
|
returnUrl?: string;
|
|
408
421
|
redirect?: StripeCustomCheckoutRedirectBehavior;
|
|
409
422
|
paymentMethod?: string;
|
|
@@ -422,6 +435,10 @@ export interface StripeCustomCheckout {
|
|
|
422
435
|
getElement(
|
|
423
436
|
elementType: 'expressCheckout'
|
|
424
437
|
): StripeCustomCheckoutExpressCheckoutElement | null;
|
|
438
|
+
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
439
|
+
getElement(
|
|
440
|
+
elementType: 'currencySelector'
|
|
441
|
+
): StripeCurrencySelectorElement | null;
|
|
425
442
|
createElement(
|
|
426
443
|
elementType: 'payment',
|
|
427
444
|
options?: StripeCustomCheckoutPaymentElementOptions
|
|
@@ -434,4 +451,6 @@ export interface StripeCustomCheckout {
|
|
|
434
451
|
elementType: 'expressCheckout',
|
|
435
452
|
options: StripeCustomCheckoutExpressCheckoutElementOptions
|
|
436
453
|
): StripeCustomCheckoutExpressCheckoutElement;
|
|
454
|
+
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
455
|
+
createElement(elementType: 'currencySelector'): StripeCurrencySelectorElement;
|
|
437
456
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import {StripeElementBase} from './base';
|
|
2
|
+
import {StripeError} from '../stripe';
|
|
3
|
+
|
|
4
|
+
export type StripeCurrencySelectorElement = StripeElementBase & {
|
|
5
|
+
/**
|
|
6
|
+
* Triggered when the element is fully rendered and can accept `element.focus` calls.
|
|
7
|
+
*/
|
|
8
|
+
on(
|
|
9
|
+
eventType: 'ready',
|
|
10
|
+
handler: (event: {elementType: 'currencySelector'}) => any
|
|
11
|
+
): StripeCurrencySelectorElement;
|
|
12
|
+
once(
|
|
13
|
+
eventType: 'ready',
|
|
14
|
+
handler: (event: {elementType: 'currencySelector'}) => any
|
|
15
|
+
): StripeCurrencySelectorElement;
|
|
16
|
+
off(
|
|
17
|
+
eventType: 'ready',
|
|
18
|
+
handler?: (event: {elementType: 'currencySelector'}) => any
|
|
19
|
+
): StripeCurrencySelectorElement;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Triggered when the element gains focus.
|
|
23
|
+
*/
|
|
24
|
+
on(
|
|
25
|
+
eventType: 'focus',
|
|
26
|
+
handler: (event: {elementType: 'currencySelector'}) => any
|
|
27
|
+
): StripeCurrencySelectorElement;
|
|
28
|
+
once(
|
|
29
|
+
eventType: 'focus',
|
|
30
|
+
handler: (event: {elementType: 'currencySelector'}) => any
|
|
31
|
+
): StripeCurrencySelectorElement;
|
|
32
|
+
off(
|
|
33
|
+
eventType: 'focus',
|
|
34
|
+
handler?: (event: {elementType: 'currencySelector'}) => any
|
|
35
|
+
): StripeCurrencySelectorElement;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Triggered when the element loses focus.
|
|
39
|
+
*/
|
|
40
|
+
on(
|
|
41
|
+
eventType: 'blur',
|
|
42
|
+
handler: (event: {elementType: 'currencySelector'}) => any
|
|
43
|
+
): StripeCurrencySelectorElement;
|
|
44
|
+
once(
|
|
45
|
+
eventType: 'blur',
|
|
46
|
+
handler: (event: {elementType: 'currencySelector'}) => any
|
|
47
|
+
): StripeCurrencySelectorElement;
|
|
48
|
+
off(
|
|
49
|
+
eventType: 'blur',
|
|
50
|
+
handler?: (event: {elementType: 'currencySelector'}) => any
|
|
51
|
+
): StripeCurrencySelectorElement;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Triggered when the escape key is pressed within the element.
|
|
55
|
+
*/
|
|
56
|
+
on(
|
|
57
|
+
eventType: 'escape',
|
|
58
|
+
handler: (event: {elementType: 'currencySelector'}) => any
|
|
59
|
+
): StripeCurrencySelectorElement;
|
|
60
|
+
once(
|
|
61
|
+
eventType: 'escape',
|
|
62
|
+
handler: (event: {elementType: 'currencySelector'}) => any
|
|
63
|
+
): StripeCurrencySelectorElement;
|
|
64
|
+
off(
|
|
65
|
+
eventType: 'escape',
|
|
66
|
+
handler?: (event: {elementType: 'currencySelector'}) => any
|
|
67
|
+
): StripeCurrencySelectorElement;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Triggered when the element fails to load.
|
|
71
|
+
*/
|
|
72
|
+
on(
|
|
73
|
+
eventType: 'loaderror',
|
|
74
|
+
handler: (event: {
|
|
75
|
+
elementType: 'currencySelector';
|
|
76
|
+
error: StripeError;
|
|
77
|
+
}) => any
|
|
78
|
+
): StripeCurrencySelectorElement;
|
|
79
|
+
once(
|
|
80
|
+
eventType: 'loaderror',
|
|
81
|
+
handler: (event: {
|
|
82
|
+
elementType: 'currencySelector';
|
|
83
|
+
error: StripeError;
|
|
84
|
+
}) => any
|
|
85
|
+
): StripeCurrencySelectorElement;
|
|
86
|
+
off(
|
|
87
|
+
eventType: 'loaderror',
|
|
88
|
+
handler?: (event: {
|
|
89
|
+
elementType: 'currencySelector';
|
|
90
|
+
error: StripeError;
|
|
91
|
+
}) => any
|
|
92
|
+
): StripeCurrencySelectorElement;
|
|
93
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import {StripeElementBase} from './base';
|
|
2
|
+
import {StripeError} from '../stripe';
|
|
3
|
+
|
|
4
|
+
export type StripeCurrencySelectorElement = StripeElementBase & {
|
|
5
|
+
/**
|
|
6
|
+
* Triggered when the element is fully rendered and can accept `element.focus` calls.
|
|
7
|
+
*/
|
|
8
|
+
on(
|
|
9
|
+
eventType: 'ready',
|
|
10
|
+
handler: (event: {elementType: 'currencySelector'}) => any
|
|
11
|
+
): StripeCurrencySelectorElement;
|
|
12
|
+
once(
|
|
13
|
+
eventType: 'ready',
|
|
14
|
+
handler: (event: {elementType: 'currencySelector'}) => any
|
|
15
|
+
): StripeCurrencySelectorElement;
|
|
16
|
+
off(
|
|
17
|
+
eventType: 'ready',
|
|
18
|
+
handler?: (event: {elementType: 'currencySelector'}) => any
|
|
19
|
+
): StripeCurrencySelectorElement;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Triggered when the element gains focus.
|
|
23
|
+
*/
|
|
24
|
+
on(
|
|
25
|
+
eventType: 'focus',
|
|
26
|
+
handler: (event: {elementType: 'currencySelector'}) => any
|
|
27
|
+
): StripeCurrencySelectorElement;
|
|
28
|
+
once(
|
|
29
|
+
eventType: 'focus',
|
|
30
|
+
handler: (event: {elementType: 'currencySelector'}) => any
|
|
31
|
+
): StripeCurrencySelectorElement;
|
|
32
|
+
off(
|
|
33
|
+
eventType: 'focus',
|
|
34
|
+
handler?: (event: {elementType: 'currencySelector'}) => any
|
|
35
|
+
): StripeCurrencySelectorElement;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Triggered when the element loses focus.
|
|
39
|
+
*/
|
|
40
|
+
on(
|
|
41
|
+
eventType: 'blur',
|
|
42
|
+
handler: (event: {elementType: 'currencySelector'}) => any
|
|
43
|
+
): StripeCurrencySelectorElement;
|
|
44
|
+
once(
|
|
45
|
+
eventType: 'blur',
|
|
46
|
+
handler: (event: {elementType: 'currencySelector'}) => any
|
|
47
|
+
): StripeCurrencySelectorElement;
|
|
48
|
+
off(
|
|
49
|
+
eventType: 'blur',
|
|
50
|
+
handler?: (event: {elementType: 'currencySelector'}) => any
|
|
51
|
+
): StripeCurrencySelectorElement;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Triggered when the escape key is pressed within the element.
|
|
55
|
+
*/
|
|
56
|
+
on(
|
|
57
|
+
eventType: 'escape',
|
|
58
|
+
handler: (event: {elementType: 'currencySelector'}) => any
|
|
59
|
+
): StripeCurrencySelectorElement;
|
|
60
|
+
once(
|
|
61
|
+
eventType: 'escape',
|
|
62
|
+
handler: (event: {elementType: 'currencySelector'}) => any
|
|
63
|
+
): StripeCurrencySelectorElement;
|
|
64
|
+
off(
|
|
65
|
+
eventType: 'escape',
|
|
66
|
+
handler?: (event: {elementType: 'currencySelector'}) => any
|
|
67
|
+
): StripeCurrencySelectorElement;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Triggered when the element fails to load.
|
|
71
|
+
*/
|
|
72
|
+
on(
|
|
73
|
+
eventType: 'loaderror',
|
|
74
|
+
handler: (event: {
|
|
75
|
+
elementType: 'currencySelector';
|
|
76
|
+
error: StripeError;
|
|
77
|
+
}) => any
|
|
78
|
+
): StripeCurrencySelectorElement;
|
|
79
|
+
once(
|
|
80
|
+
eventType: 'loaderror',
|
|
81
|
+
handler: (event: {
|
|
82
|
+
elementType: 'currencySelector';
|
|
83
|
+
error: StripeError;
|
|
84
|
+
}) => any
|
|
85
|
+
): StripeCurrencySelectorElement;
|
|
86
|
+
off(
|
|
87
|
+
eventType: 'loaderror',
|
|
88
|
+
handler?: (event: {
|
|
89
|
+
elementType: 'currencySelector';
|
|
90
|
+
error: StripeError;
|
|
91
|
+
}) => any
|
|
92
|
+
): StripeCurrencySelectorElement;
|
|
93
|
+
};
|
|
@@ -116,6 +116,31 @@ export type StripePaymentElement = StripeElementBase & {
|
|
|
116
116
|
handler?: (event: {elementType: 'payment'}) => any
|
|
117
117
|
): StripePaymentElement;
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* The change event is triggered when the `Element`'s value changes.
|
|
121
|
+
* Represents the details of a selected Card payment method.
|
|
122
|
+
*/
|
|
123
|
+
on(
|
|
124
|
+
eventType: 'carddetailschange',
|
|
125
|
+
handler: (event: StripePaymentElementCardDetailsChangeEvent) => any
|
|
126
|
+
): StripePaymentElement;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Triggered when a Saved Payment Method is updated.
|
|
130
|
+
*/
|
|
131
|
+
on(
|
|
132
|
+
eventType: 'savedpaymentmethodupdate',
|
|
133
|
+
handler: (event: StripePaymentElementSavedPaymentMethodUpdateEvent) => any
|
|
134
|
+
): StripePaymentElement;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Triggered when a Saved Payment Method is removed.
|
|
138
|
+
*/
|
|
139
|
+
on(
|
|
140
|
+
eventType: 'savedpaymentmethodremove',
|
|
141
|
+
handler: (event: StripePaymentElementSavedPaymentMethodRemoveEvent) => any
|
|
142
|
+
): StripePaymentElement;
|
|
143
|
+
|
|
119
144
|
/**
|
|
120
145
|
* Updates the options the `PaymentElement` was initialized with.
|
|
121
146
|
* Updates are merged into the existing configuration.
|
|
@@ -158,6 +183,7 @@ export interface FieldsOption {
|
|
|
158
183
|
phone?: FieldOption;
|
|
159
184
|
address?:
|
|
160
185
|
| FieldOption
|
|
186
|
+
| 'if_required'
|
|
161
187
|
| {
|
|
162
188
|
country?: FieldOption;
|
|
163
189
|
postalCode?: FieldOption;
|
|
@@ -297,3 +323,112 @@ export interface StripePaymentElementChangeEvent {
|
|
|
297
323
|
};
|
|
298
324
|
};
|
|
299
325
|
}
|
|
326
|
+
|
|
327
|
+
type CardBrand =
|
|
328
|
+
| 'amex'
|
|
329
|
+
| 'diners'
|
|
330
|
+
| 'discover'
|
|
331
|
+
| 'eftpos_au'
|
|
332
|
+
| 'jcb'
|
|
333
|
+
| 'mastercard'
|
|
334
|
+
| 'unionpay'
|
|
335
|
+
| 'visa'
|
|
336
|
+
| 'unknown';
|
|
337
|
+
type CardFunding = 'credit' | 'debit' | 'prepaid' | 'unknown';
|
|
338
|
+
|
|
339
|
+
export interface StripePaymentElementCardDetailsChangeEvent {
|
|
340
|
+
/**
|
|
341
|
+
* The type of element that emitted this event.
|
|
342
|
+
*/
|
|
343
|
+
elementType: 'payment';
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* `true` when the card details are loading.
|
|
347
|
+
*/
|
|
348
|
+
loading: boolean;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* The card details for the selected payment method.
|
|
352
|
+
* Undefined while loading and for non card payment methods.
|
|
353
|
+
*/
|
|
354
|
+
details?: {
|
|
355
|
+
brands: CardBrand[] | null;
|
|
356
|
+
funding: CardFunding | null;
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export interface StripePaymentElementSavedPaymentMethodUpdateEvent {
|
|
361
|
+
/**
|
|
362
|
+
* The type of element that emitted this event.
|
|
363
|
+
*/
|
|
364
|
+
elementType: 'payment';
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* `true` when the saved payment method is successfully updated.
|
|
368
|
+
*/
|
|
369
|
+
success: boolean;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Error message if the saved payment method update fails.
|
|
373
|
+
*/
|
|
374
|
+
error?: string;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* The updated saved payment method.
|
|
378
|
+
*/
|
|
379
|
+
payment_method: {
|
|
380
|
+
id: string;
|
|
381
|
+
type: string;
|
|
382
|
+
billing_details: {
|
|
383
|
+
address: {
|
|
384
|
+
city: null | string;
|
|
385
|
+
country: null | string;
|
|
386
|
+
line1: null | string;
|
|
387
|
+
line2: null | string;
|
|
388
|
+
postal_code: null | string;
|
|
389
|
+
state: null | string;
|
|
390
|
+
};
|
|
391
|
+
name: null | string;
|
|
392
|
+
email: null | string;
|
|
393
|
+
phone: null | string;
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export interface StripePaymentElementSavedPaymentMethodRemoveEvent {
|
|
399
|
+
/**
|
|
400
|
+
* The type of element that emitted this event.
|
|
401
|
+
*/
|
|
402
|
+
elementType: 'payment';
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* `true` when the saved payment method is successfully removed.
|
|
406
|
+
*/
|
|
407
|
+
success: boolean;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Error message if the saved payment method removal fails.
|
|
411
|
+
*/
|
|
412
|
+
error?: string;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* The removed saved payment method.
|
|
416
|
+
*/
|
|
417
|
+
payment_method: {
|
|
418
|
+
id: string;
|
|
419
|
+
type: string;
|
|
420
|
+
billing_details: {
|
|
421
|
+
address: {
|
|
422
|
+
city: null | string;
|
|
423
|
+
country: null | string;
|
|
424
|
+
line1: null | string;
|
|
425
|
+
line2: null | string;
|
|
426
|
+
postal_code: null | string;
|
|
427
|
+
state: null | string;
|
|
428
|
+
};
|
|
429
|
+
name: null | string;
|
|
430
|
+
email: null | string;
|
|
431
|
+
phone: null | string;
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
}
|
|
@@ -116,6 +116,31 @@ export type StripePaymentElement = StripeElementBase & {
|
|
|
116
116
|
handler?: (event: {elementType: 'payment'}) => any
|
|
117
117
|
): StripePaymentElement;
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* The change event is triggered when the `Element`'s value changes.
|
|
121
|
+
* Represents the details of a selected Card payment method.
|
|
122
|
+
*/
|
|
123
|
+
on(
|
|
124
|
+
eventType: 'carddetailschange',
|
|
125
|
+
handler: (event: StripePaymentElementCardDetailsChangeEvent) => any
|
|
126
|
+
): StripePaymentElement;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Triggered when a Saved Payment Method is updated.
|
|
130
|
+
*/
|
|
131
|
+
on(
|
|
132
|
+
eventType: 'savedpaymentmethodupdate',
|
|
133
|
+
handler: (event: StripePaymentElementSavedPaymentMethodUpdateEvent) => any
|
|
134
|
+
): StripePaymentElement;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Triggered when a Saved Payment Method is removed.
|
|
138
|
+
*/
|
|
139
|
+
on(
|
|
140
|
+
eventType: 'savedpaymentmethodremove',
|
|
141
|
+
handler: (event: StripePaymentElementSavedPaymentMethodRemoveEvent) => any
|
|
142
|
+
): StripePaymentElement;
|
|
143
|
+
|
|
119
144
|
/**
|
|
120
145
|
* Updates the options the `PaymentElement` was initialized with.
|
|
121
146
|
* Updates are merged into the existing configuration.
|
|
@@ -158,6 +183,7 @@ export interface FieldsOption {
|
|
|
158
183
|
phone?: FieldOption;
|
|
159
184
|
address?:
|
|
160
185
|
| FieldOption
|
|
186
|
+
| 'if_required'
|
|
161
187
|
| {
|
|
162
188
|
country?: FieldOption;
|
|
163
189
|
postalCode?: FieldOption;
|
|
@@ -297,3 +323,112 @@ export interface StripePaymentElementChangeEvent {
|
|
|
297
323
|
};
|
|
298
324
|
};
|
|
299
325
|
}
|
|
326
|
+
|
|
327
|
+
type CardBrand =
|
|
328
|
+
| 'amex'
|
|
329
|
+
| 'diners'
|
|
330
|
+
| 'discover'
|
|
331
|
+
| 'eftpos_au'
|
|
332
|
+
| 'jcb'
|
|
333
|
+
| 'mastercard'
|
|
334
|
+
| 'unionpay'
|
|
335
|
+
| 'visa'
|
|
336
|
+
| 'unknown';
|
|
337
|
+
type CardFunding = 'credit' | 'debit' | 'prepaid' | 'unknown';
|
|
338
|
+
|
|
339
|
+
export interface StripePaymentElementCardDetailsChangeEvent {
|
|
340
|
+
/**
|
|
341
|
+
* The type of element that emitted this event.
|
|
342
|
+
*/
|
|
343
|
+
elementType: 'payment';
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* `true` when the card details are loading.
|
|
347
|
+
*/
|
|
348
|
+
loading: boolean;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* The card details for the selected payment method.
|
|
352
|
+
* Undefined while loading and for non card payment methods.
|
|
353
|
+
*/
|
|
354
|
+
details?: {
|
|
355
|
+
brands: CardBrand[] | null;
|
|
356
|
+
funding: CardFunding | null;
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export interface StripePaymentElementSavedPaymentMethodUpdateEvent {
|
|
361
|
+
/**
|
|
362
|
+
* The type of element that emitted this event.
|
|
363
|
+
*/
|
|
364
|
+
elementType: 'payment';
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* `true` when the saved payment method is successfully updated.
|
|
368
|
+
*/
|
|
369
|
+
success: boolean;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Error message if the saved payment method update fails.
|
|
373
|
+
*/
|
|
374
|
+
error?: string;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* The updated saved payment method.
|
|
378
|
+
*/
|
|
379
|
+
payment_method: {
|
|
380
|
+
id: string;
|
|
381
|
+
type: string;
|
|
382
|
+
billing_details: {
|
|
383
|
+
address: {
|
|
384
|
+
city: null | string;
|
|
385
|
+
country: null | string;
|
|
386
|
+
line1: null | string;
|
|
387
|
+
line2: null | string;
|
|
388
|
+
postal_code: null | string;
|
|
389
|
+
state: null | string;
|
|
390
|
+
};
|
|
391
|
+
name: null | string;
|
|
392
|
+
email: null | string;
|
|
393
|
+
phone: null | string;
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export interface StripePaymentElementSavedPaymentMethodRemoveEvent {
|
|
399
|
+
/**
|
|
400
|
+
* The type of element that emitted this event.
|
|
401
|
+
*/
|
|
402
|
+
elementType: 'payment';
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* `true` when the saved payment method is successfully removed.
|
|
406
|
+
*/
|
|
407
|
+
success: boolean;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Error message if the saved payment method removal fails.
|
|
411
|
+
*/
|
|
412
|
+
error?: string;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* The removed saved payment method.
|
|
416
|
+
*/
|
|
417
|
+
payment_method: {
|
|
418
|
+
id: string;
|
|
419
|
+
type: string;
|
|
420
|
+
billing_details: {
|
|
421
|
+
address: {
|
|
422
|
+
city: null | string;
|
|
423
|
+
country: null | string;
|
|
424
|
+
line1: null | string;
|
|
425
|
+
line2: null | string;
|
|
426
|
+
postal_code: null | string;
|
|
427
|
+
state: null | string;
|
|
428
|
+
};
|
|
429
|
+
name: null | string;
|
|
430
|
+
email: null | string;
|
|
431
|
+
phone: null | string;
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StripeAddressElement,
|
|
3
3
|
StripeAddressElementOptions,
|
|
4
|
+
StripeCurrencySelectorElement,
|
|
4
5
|
StripeShippingAddressElement,
|
|
5
6
|
StripeShippingAddressElementOptions,
|
|
6
7
|
StripePaymentRequestButtonElement,
|
|
@@ -332,9 +333,6 @@ export interface StripeElements {
|
|
|
332
333
|
/////////////////////////////
|
|
333
334
|
|
|
334
335
|
/**
|
|
335
|
-
* Requires beta access:
|
|
336
|
-
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
337
|
-
*
|
|
338
336
|
* Creates a `LinkAuthenticationElement`.
|
|
339
337
|
*/
|
|
340
338
|
create(
|
|
@@ -343,9 +341,6 @@ export interface StripeElements {
|
|
|
343
341
|
): StripeLinkAuthenticationElement;
|
|
344
342
|
|
|
345
343
|
/**
|
|
346
|
-
* Requires beta access:
|
|
347
|
-
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
348
|
-
*
|
|
349
344
|
* Looks up a previously created `Element` by its type.
|
|
350
345
|
*/
|
|
351
346
|
getElement(
|
|
@@ -500,6 +495,7 @@ export type StripeElementType =
|
|
|
500
495
|
| 'cardNumber'
|
|
501
496
|
| 'cardExpiry'
|
|
502
497
|
| 'cardCvc'
|
|
498
|
+
| 'currencySelector'
|
|
503
499
|
| 'epsBank'
|
|
504
500
|
| 'expressCheckout'
|
|
505
501
|
| 'fpxBank'
|
|
@@ -531,6 +527,7 @@ export type StripeElement =
|
|
|
531
527
|
| StripeIbanElement
|
|
532
528
|
| StripeIdealBankElement
|
|
533
529
|
| StripeP24BankElement
|
|
530
|
+
| StripeCurrencySelectorElement
|
|
534
531
|
| StripeExpressCheckoutElement
|
|
535
532
|
| StripePaymentElement
|
|
536
533
|
| StripePaymentMethodMessagingElement
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StripeAddressElement,
|
|
3
3
|
StripeAddressElementOptions,
|
|
4
|
+
StripeCurrencySelectorElement,
|
|
4
5
|
StripeShippingAddressElement,
|
|
5
6
|
StripeShippingAddressElementOptions,
|
|
6
7
|
StripePaymentRequestButtonElement,
|
|
@@ -332,9 +333,6 @@ export interface StripeElements {
|
|
|
332
333
|
/////////////////////////////
|
|
333
334
|
|
|
334
335
|
/**
|
|
335
|
-
* Requires beta access:
|
|
336
|
-
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
337
|
-
*
|
|
338
336
|
* Creates a `LinkAuthenticationElement`.
|
|
339
337
|
*/
|
|
340
338
|
create(
|
|
@@ -343,9 +341,6 @@ export interface StripeElements {
|
|
|
343
341
|
): StripeLinkAuthenticationElement;
|
|
344
342
|
|
|
345
343
|
/**
|
|
346
|
-
* Requires beta access:
|
|
347
|
-
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
348
|
-
*
|
|
349
344
|
* Looks up a previously created `Element` by its type.
|
|
350
345
|
*/
|
|
351
346
|
getElement(
|
|
@@ -500,6 +495,7 @@ export type StripeElementType =
|
|
|
500
495
|
| 'cardNumber'
|
|
501
496
|
| 'cardExpiry'
|
|
502
497
|
| 'cardCvc'
|
|
498
|
+
| 'currencySelector'
|
|
503
499
|
| 'epsBank'
|
|
504
500
|
| 'expressCheckout'
|
|
505
501
|
| 'fpxBank'
|
|
@@ -531,6 +527,7 @@ export type StripeElement =
|
|
|
531
527
|
| StripeIbanElement
|
|
532
528
|
| StripeIdealBankElement
|
|
533
529
|
| StripeP24BankElement
|
|
530
|
+
| StripeCurrencySelectorElement
|
|
534
531
|
| StripeExpressCheckoutElement
|
|
535
532
|
| StripePaymentElement
|
|
536
533
|
| StripePaymentMethodMessagingElement
|
|
@@ -17,6 +17,29 @@ export type StripeEmbeddedCheckoutShippingDetailsChangeEvent = {
|
|
|
17
17
|
shippingDetails: StripeEmbeddedCheckoutShippingDetails;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
export type StripeEmbeddedCheckoutLineItem = {
|
|
21
|
+
id?: string;
|
|
22
|
+
quantity?: number;
|
|
23
|
+
price?: string;
|
|
24
|
+
display?: {
|
|
25
|
+
name?: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
images?: string[];
|
|
28
|
+
};
|
|
29
|
+
pricingSpec?: {
|
|
30
|
+
unitAmount?: number;
|
|
31
|
+
unitAmountDecimal?: string;
|
|
32
|
+
currency?: string;
|
|
33
|
+
taxBehavior?: 'inclusive' | 'exclusive' | 'unspecified';
|
|
34
|
+
taxCode?: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type StripeEmbeddedCheckoutLineItemsChangeEvent = {
|
|
39
|
+
checkoutSessionId: string;
|
|
40
|
+
lineItems: StripeEmbeddedCheckoutLineItem[];
|
|
41
|
+
};
|
|
42
|
+
|
|
20
43
|
export type ResultAction =
|
|
21
44
|
| {type: 'accept'}
|
|
22
45
|
| {type: 'reject'; errorMessage?: string};
|
|
@@ -45,6 +68,13 @@ export interface StripeEmbeddedCheckoutOptions {
|
|
|
45
68
|
onShippingDetailsChange?: (
|
|
46
69
|
event: StripeEmbeddedCheckoutShippingDetailsChangeEvent
|
|
47
70
|
) => Promise<ResultAction>;
|
|
71
|
+
/**
|
|
72
|
+
* onLineItemsChange is called when the customer adds, removes, or modifies a line item.
|
|
73
|
+
* The callback is required when [permissions.update.line_items](https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-permissions-update-line_items) is set to `server_only`.
|
|
74
|
+
*/
|
|
75
|
+
onLineItemsChange?: (
|
|
76
|
+
event: StripeEmbeddedCheckoutLineItemsChangeEvent
|
|
77
|
+
) => Promise<ResultAction>;
|
|
48
78
|
}
|
|
49
79
|
|
|
50
80
|
export interface StripeEmbeddedCheckout {
|
|
@@ -17,6 +17,29 @@ export type StripeEmbeddedCheckoutShippingDetailsChangeEvent = {
|
|
|
17
17
|
shippingDetails: StripeEmbeddedCheckoutShippingDetails;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
export type StripeEmbeddedCheckoutLineItem = {
|
|
21
|
+
id?: string;
|
|
22
|
+
quantity?: number;
|
|
23
|
+
price?: string;
|
|
24
|
+
display?: {
|
|
25
|
+
name?: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
images?: string[];
|
|
28
|
+
};
|
|
29
|
+
pricingSpec?: {
|
|
30
|
+
unitAmount?: number;
|
|
31
|
+
unitAmountDecimal?: string;
|
|
32
|
+
currency?: string;
|
|
33
|
+
taxBehavior?: 'inclusive' | 'exclusive' | 'unspecified';
|
|
34
|
+
taxCode?: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type StripeEmbeddedCheckoutLineItemsChangeEvent = {
|
|
39
|
+
checkoutSessionId: string;
|
|
40
|
+
lineItems: StripeEmbeddedCheckoutLineItem[];
|
|
41
|
+
};
|
|
42
|
+
|
|
20
43
|
export type ResultAction =
|
|
21
44
|
| {type: 'accept'}
|
|
22
45
|
| {type: 'reject'; errorMessage?: string};
|
|
@@ -45,6 +68,13 @@ export interface StripeEmbeddedCheckoutOptions {
|
|
|
45
68
|
onShippingDetailsChange?: (
|
|
46
69
|
event: StripeEmbeddedCheckoutShippingDetailsChangeEvent
|
|
47
70
|
) => Promise<ResultAction>;
|
|
71
|
+
/**
|
|
72
|
+
* onLineItemsChange is called when the customer adds, removes, or modifies a line item.
|
|
73
|
+
* The callback is required when [permissions.update.line_items](https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-permissions-update-line_items) is set to `server_only`.
|
|
74
|
+
*/
|
|
75
|
+
onLineItemsChange?: (
|
|
76
|
+
event: StripeEmbeddedCheckoutLineItemsChangeEvent
|
|
77
|
+
) => Promise<ResultAction>;
|
|
48
78
|
}
|
|
49
79
|
|
|
50
80
|
export interface StripeEmbeddedCheckout {
|
|
@@ -269,6 +269,21 @@ export interface CreatePaymentMethodMobilepayData
|
|
|
269
269
|
type: 'mobilepay';
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
+
export interface CreatePaymentMethodMultibancoData
|
|
273
|
+
extends PaymentMethodCreateParams {
|
|
274
|
+
type: 'multibanco';
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* The customer's billing details.
|
|
278
|
+
* `email` is required.
|
|
279
|
+
*
|
|
280
|
+
* @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
|
|
281
|
+
*/
|
|
282
|
+
billing_details: PaymentMethodCreateParams.BillingDetails & {
|
|
283
|
+
email: string;
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
|
|
272
287
|
export interface CreatePaymentMethodOxxoData extends PaymentMethodCreateParams {
|
|
273
288
|
type: 'oxxo';
|
|
274
289
|
|
|
@@ -370,6 +385,11 @@ export interface CreatePaymentMethodSofortData
|
|
|
370
385
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
371
386
|
}
|
|
372
387
|
|
|
388
|
+
export interface CreatePaymentMethodTwintData
|
|
389
|
+
extends PaymentMethodCreateParams {
|
|
390
|
+
type: 'twint';
|
|
391
|
+
}
|
|
392
|
+
|
|
373
393
|
export interface CreatePaymentMethodAuBecsDebitData
|
|
374
394
|
extends PaymentMethodCreateParams {
|
|
375
395
|
/**
|
|
@@ -1076,6 +1096,36 @@ export interface ConfirmMobilepayPaymentOptions {
|
|
|
1076
1096
|
handleActions?: boolean;
|
|
1077
1097
|
}
|
|
1078
1098
|
|
|
1099
|
+
/**
|
|
1100
|
+
* Data to be sent with a `stripe.confirmMultibancoPayment` request.
|
|
1101
|
+
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
1102
|
+
*/
|
|
1103
|
+
export interface ConfirmMultibancoPaymentData
|
|
1104
|
+
extends PaymentIntentConfirmParams {
|
|
1105
|
+
/**
|
|
1106
|
+
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
1107
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
|
|
1108
|
+
*
|
|
1109
|
+
* @recommended
|
|
1110
|
+
*/
|
|
1111
|
+
payment_method?: string | Omit<CreatePaymentMethodMultibancoData, 'type'>;
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* The url your customer will be directed to after they complete authentication.
|
|
1115
|
+
*
|
|
1116
|
+
* @recommended
|
|
1117
|
+
*/
|
|
1118
|
+
return_url?: string;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
export interface ConfirmMultibancoPaymentOptions {
|
|
1122
|
+
/**
|
|
1123
|
+
* 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).
|
|
1124
|
+
* Default is `true`.
|
|
1125
|
+
*/
|
|
1126
|
+
handleActions?: boolean;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1079
1129
|
/**
|
|
1080
1130
|
* Data to be sent with a `stripe.confirmOxxoPayment` request.
|
|
1081
1131
|
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
@@ -1278,6 +1328,35 @@ export interface ConfirmSofortPaymentOptions {
|
|
|
1278
1328
|
handleActions?: boolean;
|
|
1279
1329
|
}
|
|
1280
1330
|
|
|
1331
|
+
/**
|
|
1332
|
+
* Data to be sent with a `stripe.confirmTwintPayment` request.
|
|
1333
|
+
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
1334
|
+
*/
|
|
1335
|
+
export interface ConfirmTwintPaymentData extends PaymentIntentConfirmParams {
|
|
1336
|
+
/**
|
|
1337
|
+
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
1338
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
|
|
1339
|
+
*
|
|
1340
|
+
* @recommended
|
|
1341
|
+
*/
|
|
1342
|
+
payment_method?: string | Omit<CreatePaymentMethodTwintData, 'type'>;
|
|
1343
|
+
|
|
1344
|
+
/**
|
|
1345
|
+
* The url your customer will be directed to after they complete authentication.
|
|
1346
|
+
*
|
|
1347
|
+
* @recommended
|
|
1348
|
+
*/
|
|
1349
|
+
return_url?: string;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
export interface ConfirmTwintPaymentOptions {
|
|
1353
|
+
/**
|
|
1354
|
+
* 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).
|
|
1355
|
+
* Default is `true`.
|
|
1356
|
+
*/
|
|
1357
|
+
handleActions?: boolean;
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1281
1360
|
/**
|
|
1282
1361
|
* Data to be sent with a `stripe.confirmWechatPayPayment` request.
|
|
1283
1362
|
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
@@ -1460,9 +1539,6 @@ export interface ConfirmPaymentData extends PaymentIntentConfirmParams {
|
|
|
1460
1539
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
1461
1540
|
|
|
1462
1541
|
/**
|
|
1463
|
-
* Requires beta access:
|
|
1464
|
-
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
1465
|
-
*
|
|
1466
1542
|
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature
|
|
1467
1543
|
*/
|
|
1468
1544
|
allow_redisplay?: 'always' | 'limited' | 'unspecified';
|
|
@@ -269,6 +269,21 @@ export interface CreatePaymentMethodMobilepayData
|
|
|
269
269
|
type: 'mobilepay';
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
+
export interface CreatePaymentMethodMultibancoData
|
|
273
|
+
extends PaymentMethodCreateParams {
|
|
274
|
+
type: 'multibanco';
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* The customer's billing details.
|
|
278
|
+
* `email` is required.
|
|
279
|
+
*
|
|
280
|
+
* @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
|
|
281
|
+
*/
|
|
282
|
+
billing_details: PaymentMethodCreateParams.BillingDetails & {
|
|
283
|
+
email: string;
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
|
|
272
287
|
export interface CreatePaymentMethodOxxoData extends PaymentMethodCreateParams {
|
|
273
288
|
type: 'oxxo';
|
|
274
289
|
|
|
@@ -370,6 +385,11 @@ export interface CreatePaymentMethodSofortData
|
|
|
370
385
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
371
386
|
}
|
|
372
387
|
|
|
388
|
+
export interface CreatePaymentMethodTwintData
|
|
389
|
+
extends PaymentMethodCreateParams {
|
|
390
|
+
type: 'twint';
|
|
391
|
+
}
|
|
392
|
+
|
|
373
393
|
export interface CreatePaymentMethodAuBecsDebitData
|
|
374
394
|
extends PaymentMethodCreateParams {
|
|
375
395
|
/**
|
|
@@ -1076,6 +1096,36 @@ export interface ConfirmMobilepayPaymentOptions {
|
|
|
1076
1096
|
handleActions?: boolean;
|
|
1077
1097
|
}
|
|
1078
1098
|
|
|
1099
|
+
/**
|
|
1100
|
+
* Data to be sent with a `stripe.confirmMultibancoPayment` request.
|
|
1101
|
+
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
1102
|
+
*/
|
|
1103
|
+
export interface ConfirmMultibancoPaymentData
|
|
1104
|
+
extends PaymentIntentConfirmParams {
|
|
1105
|
+
/**
|
|
1106
|
+
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
1107
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
|
|
1108
|
+
*
|
|
1109
|
+
* @recommended
|
|
1110
|
+
*/
|
|
1111
|
+
payment_method?: string | Omit<CreatePaymentMethodMultibancoData, 'type'>;
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* The url your customer will be directed to after they complete authentication.
|
|
1115
|
+
*
|
|
1116
|
+
* @recommended
|
|
1117
|
+
*/
|
|
1118
|
+
return_url?: string;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
export interface ConfirmMultibancoPaymentOptions {
|
|
1122
|
+
/**
|
|
1123
|
+
* 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).
|
|
1124
|
+
* Default is `true`.
|
|
1125
|
+
*/
|
|
1126
|
+
handleActions?: boolean;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1079
1129
|
/**
|
|
1080
1130
|
* Data to be sent with a `stripe.confirmOxxoPayment` request.
|
|
1081
1131
|
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
@@ -1278,6 +1328,35 @@ export interface ConfirmSofortPaymentOptions {
|
|
|
1278
1328
|
handleActions?: boolean;
|
|
1279
1329
|
}
|
|
1280
1330
|
|
|
1331
|
+
/**
|
|
1332
|
+
* Data to be sent with a `stripe.confirmTwintPayment` request.
|
|
1333
|
+
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
1334
|
+
*/
|
|
1335
|
+
export interface ConfirmTwintPaymentData extends PaymentIntentConfirmParams {
|
|
1336
|
+
/**
|
|
1337
|
+
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
1338
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
|
|
1339
|
+
*
|
|
1340
|
+
* @recommended
|
|
1341
|
+
*/
|
|
1342
|
+
payment_method?: string | Omit<CreatePaymentMethodTwintData, 'type'>;
|
|
1343
|
+
|
|
1344
|
+
/**
|
|
1345
|
+
* The url your customer will be directed to after they complete authentication.
|
|
1346
|
+
*
|
|
1347
|
+
* @recommended
|
|
1348
|
+
*/
|
|
1349
|
+
return_url?: string;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
export interface ConfirmTwintPaymentOptions {
|
|
1353
|
+
/**
|
|
1354
|
+
* 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).
|
|
1355
|
+
* Default is `true`.
|
|
1356
|
+
*/
|
|
1357
|
+
handleActions?: boolean;
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1281
1360
|
/**
|
|
1282
1361
|
* Data to be sent with a `stripe.confirmWechatPayPayment` request.
|
|
1283
1362
|
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
@@ -1460,9 +1539,6 @@ export interface ConfirmPaymentData extends PaymentIntentConfirmParams {
|
|
|
1460
1539
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
1461
1540
|
|
|
1462
1541
|
/**
|
|
1463
|
-
* Requires beta access:
|
|
1464
|
-
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
1465
|
-
*
|
|
1466
1542
|
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature
|
|
1467
1543
|
*/
|
|
1468
1544
|
allow_redisplay?: 'always' | 'limited' | 'unspecified';
|
|
@@ -42,9 +42,6 @@ export interface ConfirmSetupData extends SetupIntentConfirmParams {
|
|
|
42
42
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
* Requires beta access:
|
|
46
|
-
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
47
|
-
*
|
|
48
45
|
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature
|
|
49
46
|
*/
|
|
50
47
|
allow_redisplay?: 'always' | 'limited' | 'unspecified';
|
|
@@ -42,9 +42,6 @@ export interface ConfirmSetupData extends SetupIntentConfirmParams {
|
|
|
42
42
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
* Requires beta access:
|
|
46
|
-
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
47
|
-
*
|
|
48
45
|
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature
|
|
49
46
|
*/
|
|
50
47
|
allow_redisplay?: 'always' | 'limited' | 'unspecified';
|
|
@@ -437,6 +437,24 @@ export interface Stripe {
|
|
|
437
437
|
options?: paymentIntents.ConfirmMobilepayPaymentOptions
|
|
438
438
|
): Promise<PaymentIntentResult>;
|
|
439
439
|
|
|
440
|
+
/**
|
|
441
|
+
* Use `stripe.confirmMultibancoPayment` in the [Multibanco Payment](https://stripe.com/docs/payments/multibanco) with Payment Methods flow when the customer submits your payment form.
|
|
442
|
+
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
|
|
443
|
+
* Note that there are some additional requirements to this flow that are not covered in this reference.
|
|
444
|
+
* Refer to our [integration guide](https://stripe.com/docs/payments/multibanco) for more details.
|
|
445
|
+
*
|
|
446
|
+
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
|
|
447
|
+
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
|
|
448
|
+
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
|
|
449
|
+
*
|
|
450
|
+
* @docs https://stripe.com/docs/js/payment_intents/confirm_multibanco_payment
|
|
451
|
+
*/
|
|
452
|
+
confirmMultibancoPayment(
|
|
453
|
+
clientSecret: string,
|
|
454
|
+
data?: paymentIntents.ConfirmMultibancoPaymentData,
|
|
455
|
+
options?: paymentIntents.ConfirmMultibancoPaymentOptions
|
|
456
|
+
): Promise<PaymentIntentResult>;
|
|
457
|
+
|
|
440
458
|
/**
|
|
441
459
|
* Use `stripe.confirmOxxoPayment` in the [OXXO Payment](https://stripe.com/docs/payments/oxxo) with Payment Methods flow when the customer submits your payment form.
|
|
442
460
|
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
|
|
@@ -579,6 +597,23 @@ export interface Stripe {
|
|
|
579
597
|
options?: paymentIntents.ConfirmSofortPaymentOptions
|
|
580
598
|
): Promise<PaymentIntentResult>;
|
|
581
599
|
|
|
600
|
+
/**
|
|
601
|
+
* Use `stripe.confirmTwintPayment` in the [TWINT Payments with Payment Methods](https://stripe.com/docs/payments/twint) flow when the customer submits your payment form.
|
|
602
|
+
* When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
|
|
603
|
+
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
|
|
604
|
+
*
|
|
605
|
+
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
|
|
606
|
+
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
|
|
607
|
+
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
|
|
608
|
+
*
|
|
609
|
+
* @docs https://stripe.com/docs/js/payment_intents/confirm_twint_payment
|
|
610
|
+
*/
|
|
611
|
+
confirmTwintPayment(
|
|
612
|
+
clientSecret: string,
|
|
613
|
+
data?: paymentIntents.ConfirmTwintPaymentData,
|
|
614
|
+
options?: paymentIntents.ConfirmTwintPaymentOptions
|
|
615
|
+
): Promise<PaymentIntentResult>;
|
|
616
|
+
|
|
582
617
|
/**
|
|
583
618
|
* Requires beta access:
|
|
584
619
|
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
@@ -437,6 +437,24 @@ export interface Stripe {
|
|
|
437
437
|
options?: paymentIntents.ConfirmMobilepayPaymentOptions
|
|
438
438
|
): Promise<PaymentIntentResult>;
|
|
439
439
|
|
|
440
|
+
/**
|
|
441
|
+
* Use `stripe.confirmMultibancoPayment` in the [Multibanco Payment](https://stripe.com/docs/payments/multibanco) with Payment Methods flow when the customer submits your payment form.
|
|
442
|
+
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
|
|
443
|
+
* Note that there are some additional requirements to this flow that are not covered in this reference.
|
|
444
|
+
* Refer to our [integration guide](https://stripe.com/docs/payments/multibanco) for more details.
|
|
445
|
+
*
|
|
446
|
+
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
|
|
447
|
+
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
|
|
448
|
+
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
|
|
449
|
+
*
|
|
450
|
+
* @docs https://stripe.com/docs/js/payment_intents/confirm_multibanco_payment
|
|
451
|
+
*/
|
|
452
|
+
confirmMultibancoPayment(
|
|
453
|
+
clientSecret: string,
|
|
454
|
+
data?: paymentIntents.ConfirmMultibancoPaymentData,
|
|
455
|
+
options?: paymentIntents.ConfirmMultibancoPaymentOptions
|
|
456
|
+
): Promise<PaymentIntentResult>;
|
|
457
|
+
|
|
440
458
|
/**
|
|
441
459
|
* Use `stripe.confirmOxxoPayment` in the [OXXO Payment](https://stripe.com/docs/payments/oxxo) with Payment Methods flow when the customer submits your payment form.
|
|
442
460
|
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
|
|
@@ -579,6 +597,23 @@ export interface Stripe {
|
|
|
579
597
|
options?: paymentIntents.ConfirmSofortPaymentOptions
|
|
580
598
|
): Promise<PaymentIntentResult>;
|
|
581
599
|
|
|
600
|
+
/**
|
|
601
|
+
* Use `stripe.confirmTwintPayment` in the [TWINT Payments with Payment Methods](https://stripe.com/docs/payments/twint) flow when the customer submits your payment form.
|
|
602
|
+
* When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
|
|
603
|
+
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
|
|
604
|
+
*
|
|
605
|
+
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
|
|
606
|
+
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
|
|
607
|
+
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
|
|
608
|
+
*
|
|
609
|
+
* @docs https://stripe.com/docs/js/payment_intents/confirm_twint_payment
|
|
610
|
+
*/
|
|
611
|
+
confirmTwintPayment(
|
|
612
|
+
clientSecret: string,
|
|
613
|
+
data?: paymentIntents.ConfirmTwintPaymentData,
|
|
614
|
+
options?: paymentIntents.ConfirmTwintPaymentOptions
|
|
615
|
+
): Promise<PaymentIntentResult>;
|
|
616
|
+
|
|
582
617
|
/**
|
|
583
618
|
* Requires beta access:
|
|
584
619
|
* Contact [Stripe support](https://support.stripe.com/) for more information.
|