@stripe/stripe-js 4.10.0 → 5.0.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/checkout.d.mts +462 -126
- package/dist/stripe-js/checkout.d.ts +462 -126
- 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/express-checkout.d.mts +3 -0
- package/dist/stripe-js/elements/express-checkout.d.ts +3 -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 +136 -0
- package/dist/stripe-js/elements/payment.d.ts +136 -0
- package/dist/stripe-js/elements-group.d.mts +37 -7
- package/dist/stripe-js/elements-group.d.ts +37 -7
- package/dist/stripe-js/embedded-checkout.d.mts +30 -0
- package/dist/stripe-js/embedded-checkout.d.ts +30 -0
- package/dist/stripe-js/hosted-checkout.d.mts +153 -0
- package/dist/stripe-js/hosted-checkout.d.ts +153 -0
- package/dist/stripe-js/index.d.mts +1 -1
- package/dist/stripe-js/index.d.ts +1 -1
- 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 +38 -8
- package/dist/stripe-js/stripe.d.ts +38 -8
- package/package.json +1 -1
- package/dist/stripe-js/custom-checkout.d.mts +0 -437
- package/dist/stripe-js/custom-checkout.d.ts +0 -437
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StripeAddressElement,
|
|
3
3
|
StripeAddressElementOptions,
|
|
4
|
+
StripeCurrencySelectorElement,
|
|
4
5
|
StripeShippingAddressElement,
|
|
5
6
|
StripeShippingAddressElementOptions,
|
|
6
7
|
StripePaymentRequestButtonElement,
|
|
@@ -68,7 +69,10 @@ export interface StripeElements {
|
|
|
68
69
|
* Before confirming payment, call elements.submit() to validate the state of the
|
|
69
70
|
* Payment Element and collect any data required for wallets.
|
|
70
71
|
*/
|
|
71
|
-
submit(): Promise<
|
|
72
|
+
submit(): Promise<
|
|
73
|
+
| {error?: StripeError; selectedPaymentMethod?: undefined}
|
|
74
|
+
| {selectedPaymentMethod: string; error?: undefined}
|
|
75
|
+
>;
|
|
72
76
|
|
|
73
77
|
/////////////////////////////
|
|
74
78
|
/// address
|
|
@@ -332,9 +336,6 @@ export interface StripeElements {
|
|
|
332
336
|
/////////////////////////////
|
|
333
337
|
|
|
334
338
|
/**
|
|
335
|
-
* Requires beta access:
|
|
336
|
-
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
337
|
-
*
|
|
338
339
|
* Creates a `LinkAuthenticationElement`.
|
|
339
340
|
*/
|
|
340
341
|
create(
|
|
@@ -343,9 +344,6 @@ export interface StripeElements {
|
|
|
343
344
|
): StripeLinkAuthenticationElement;
|
|
344
345
|
|
|
345
346
|
/**
|
|
346
|
-
* Requires beta access:
|
|
347
|
-
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
348
|
-
*
|
|
349
347
|
* Looks up a previously created `Element` by its type.
|
|
350
348
|
*/
|
|
351
349
|
getElement(
|
|
@@ -500,6 +498,7 @@ export type StripeElementType =
|
|
|
500
498
|
| 'cardNumber'
|
|
501
499
|
| 'cardExpiry'
|
|
502
500
|
| 'cardCvc'
|
|
501
|
+
| 'currencySelector'
|
|
503
502
|
| 'epsBank'
|
|
504
503
|
| 'expressCheckout'
|
|
505
504
|
| 'fpxBank'
|
|
@@ -531,6 +530,7 @@ export type StripeElement =
|
|
|
531
530
|
| StripeIbanElement
|
|
532
531
|
| StripeIdealBankElement
|
|
533
532
|
| StripeP24BankElement
|
|
533
|
+
| StripeCurrencySelectorElement
|
|
534
534
|
| StripeExpressCheckoutElement
|
|
535
535
|
| StripePaymentElement
|
|
536
536
|
| StripePaymentMethodMessagingElement
|
|
@@ -670,6 +670,14 @@ interface BaseStripeElementsOptions {
|
|
|
670
670
|
* Display saved PaymentMethods and Customer information.
|
|
671
671
|
*/
|
|
672
672
|
customerSessionClientSecret?: string;
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Requires beta access:
|
|
676
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
677
|
+
*
|
|
678
|
+
* Display Custom Payment Methods in the Payment Element that you are already registered with.
|
|
679
|
+
*/
|
|
680
|
+
customPaymentMethods?: CustomPaymentMethod[];
|
|
673
681
|
}
|
|
674
682
|
|
|
675
683
|
export interface StripeElementsOptionsClientSecret
|
|
@@ -1128,3 +1136,25 @@ export interface CustomerOptions {
|
|
|
1128
1136
|
*/
|
|
1129
1137
|
ephemeralKey: string;
|
|
1130
1138
|
}
|
|
1139
|
+
|
|
1140
|
+
export interface CustomPaymentMethod {
|
|
1141
|
+
/**
|
|
1142
|
+
* The Custom Payment Method id, prefixed with `cpmt_`.
|
|
1143
|
+
*/
|
|
1144
|
+
id: string;
|
|
1145
|
+
|
|
1146
|
+
/**
|
|
1147
|
+
* Additional options to configure the Custom Payment Method.
|
|
1148
|
+
*/
|
|
1149
|
+
options: {
|
|
1150
|
+
/**
|
|
1151
|
+
* The payment form type.
|
|
1152
|
+
*/
|
|
1153
|
+
type: 'static';
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* Display additional information about the payment method, max 100 characters.
|
|
1157
|
+
*/
|
|
1158
|
+
subtitle?: string;
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
@@ -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 {
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
export interface RedirectToCheckoutServerOptions {
|
|
2
|
+
/**
|
|
3
|
+
* The ID of the [Checkout Session](https://stripe.com/docs/api/checkout/sessions) that is used in [Checkout's server integration](https://stripe.com/docs/payments/checkout/one-time).
|
|
4
|
+
*/
|
|
5
|
+
sessionId: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface RedirectToCheckoutClientOptions {
|
|
9
|
+
/**
|
|
10
|
+
* The URL to which Stripe should send customers when payment is complete.
|
|
11
|
+
* If you’d like access to the Checkout Session for the successful payment, read more about it in our guide on [fulfilling your payments with webhooks](https://stripe.com/docs/payments/checkout/fulfillment#webhooks).
|
|
12
|
+
*/
|
|
13
|
+
successUrl: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The URL to which Stripe should send customers when payment is canceled.
|
|
17
|
+
*/
|
|
18
|
+
cancelUrl: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* An array of objects representing the items that your customer would like to purchase.
|
|
22
|
+
* These items are shown as line items in the Checkout interface and make up the total amount to be collected by Checkout.
|
|
23
|
+
*/
|
|
24
|
+
lineItems?: Array<{
|
|
25
|
+
/**
|
|
26
|
+
* The ID of the price that the customer would like to purchase. SKU or plan IDs may also be used.
|
|
27
|
+
*/
|
|
28
|
+
price?: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The quantity of units for the item.
|
|
32
|
+
*/
|
|
33
|
+
quantity?: number;
|
|
34
|
+
}>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* An array of objects representing the items that your customer would like to purchase.
|
|
38
|
+
* These items are shown as line items in the Checkout interface and make up the total amount to be collected by Checkout.
|
|
39
|
+
*
|
|
40
|
+
* @deprecated
|
|
41
|
+
*/
|
|
42
|
+
items?: Array<{
|
|
43
|
+
/**
|
|
44
|
+
* The ID of the SKU that the customer would like to purchase
|
|
45
|
+
*/
|
|
46
|
+
sku?: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The ID of the plan that the customer would like to subscribe to.
|
|
50
|
+
*/
|
|
51
|
+
plan?: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The quantity of units for the item.
|
|
55
|
+
*/
|
|
56
|
+
quantity?: number;
|
|
57
|
+
}>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The mode of the Checkout Session. Required if using lineItems.
|
|
61
|
+
*/
|
|
62
|
+
mode?: 'payment' | 'subscription';
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* A unique string to reference the Checkout session.
|
|
66
|
+
* This can be a customer ID, a cart ID, or similar.
|
|
67
|
+
* It is included in the `checkout.session.completed` webhook and can be used to fulfill the purchase.
|
|
68
|
+
*/
|
|
69
|
+
clientReferenceId?: string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The email address used to create the customer object.
|
|
73
|
+
* If you already know your customer's email address, use this attribute to prefill it on Checkout.
|
|
74
|
+
*/
|
|
75
|
+
customerEmail?: string;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Specify whether Checkout should collect the customer’s billing address.
|
|
79
|
+
* If set to `required`, Checkout will attempt to collect the customer’s billing address.
|
|
80
|
+
* If not set or set to `auto` Checkout will only attempt to collect the billing address when necessary.
|
|
81
|
+
*/
|
|
82
|
+
billingAddressCollection?: 'auto' | 'required';
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Provides configuration for Checkout to collect a shipping address from a customer.
|
|
86
|
+
*/
|
|
87
|
+
shippingAddressCollection?: {
|
|
88
|
+
/**
|
|
89
|
+
* An array of two-letter ISO country codes representing which countries
|
|
90
|
+
* Checkout should provide as options for shipping locations. The codes are
|
|
91
|
+
* expected to be uppercase. Unsupported country codes: AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI.
|
|
92
|
+
*/
|
|
93
|
+
allowedCountries: string[];
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) of the locale to display Checkout in.
|
|
98
|
+
* Default is `auto` (Stripe detects the locale of the browser).
|
|
99
|
+
*/
|
|
100
|
+
locale?: CheckoutLocale;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the **Submit** button.
|
|
104
|
+
* `submitType` can only be specified when using using line items or SKUs, and not subscriptions.
|
|
105
|
+
* The default is `auto`.
|
|
106
|
+
*/
|
|
107
|
+
submitType?: 'auto' | 'book' | 'donate' | 'pay';
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type RedirectToCheckoutOptions =
|
|
111
|
+
| RedirectToCheckoutServerOptions
|
|
112
|
+
| RedirectToCheckoutClientOptions;
|
|
113
|
+
|
|
114
|
+
export type CheckoutLocale =
|
|
115
|
+
| 'auto'
|
|
116
|
+
| 'bg'
|
|
117
|
+
| 'cs'
|
|
118
|
+
| 'da'
|
|
119
|
+
| 'de'
|
|
120
|
+
| 'el'
|
|
121
|
+
| 'en'
|
|
122
|
+
| 'en-GB'
|
|
123
|
+
| 'es'
|
|
124
|
+
| 'es-419'
|
|
125
|
+
| 'et'
|
|
126
|
+
| 'fi'
|
|
127
|
+
| 'fil'
|
|
128
|
+
| 'fr'
|
|
129
|
+
| 'fr-CA'
|
|
130
|
+
| 'hr'
|
|
131
|
+
| 'hu'
|
|
132
|
+
| 'id'
|
|
133
|
+
| 'it'
|
|
134
|
+
| 'ja'
|
|
135
|
+
| 'lt'
|
|
136
|
+
| 'lv'
|
|
137
|
+
| 'ms'
|
|
138
|
+
| 'mt'
|
|
139
|
+
| 'nb'
|
|
140
|
+
| 'nl'
|
|
141
|
+
| 'pl'
|
|
142
|
+
| 'pt'
|
|
143
|
+
| 'pt-BR'
|
|
144
|
+
| 'ro'
|
|
145
|
+
| 'ru'
|
|
146
|
+
| 'sk'
|
|
147
|
+
| 'sl'
|
|
148
|
+
| 'sv'
|
|
149
|
+
| 'th'
|
|
150
|
+
| 'tr'
|
|
151
|
+
| 'zh'
|
|
152
|
+
| 'zh-HK'
|
|
153
|
+
| 'zh-TW';
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
export interface RedirectToCheckoutServerOptions {
|
|
2
|
+
/**
|
|
3
|
+
* The ID of the [Checkout Session](https://stripe.com/docs/api/checkout/sessions) that is used in [Checkout's server integration](https://stripe.com/docs/payments/checkout/one-time).
|
|
4
|
+
*/
|
|
5
|
+
sessionId: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface RedirectToCheckoutClientOptions {
|
|
9
|
+
/**
|
|
10
|
+
* The URL to which Stripe should send customers when payment is complete.
|
|
11
|
+
* If you’d like access to the Checkout Session for the successful payment, read more about it in our guide on [fulfilling your payments with webhooks](https://stripe.com/docs/payments/checkout/fulfillment#webhooks).
|
|
12
|
+
*/
|
|
13
|
+
successUrl: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The URL to which Stripe should send customers when payment is canceled.
|
|
17
|
+
*/
|
|
18
|
+
cancelUrl: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* An array of objects representing the items that your customer would like to purchase.
|
|
22
|
+
* These items are shown as line items in the Checkout interface and make up the total amount to be collected by Checkout.
|
|
23
|
+
*/
|
|
24
|
+
lineItems?: Array<{
|
|
25
|
+
/**
|
|
26
|
+
* The ID of the price that the customer would like to purchase. SKU or plan IDs may also be used.
|
|
27
|
+
*/
|
|
28
|
+
price?: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The quantity of units for the item.
|
|
32
|
+
*/
|
|
33
|
+
quantity?: number;
|
|
34
|
+
}>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* An array of objects representing the items that your customer would like to purchase.
|
|
38
|
+
* These items are shown as line items in the Checkout interface and make up the total amount to be collected by Checkout.
|
|
39
|
+
*
|
|
40
|
+
* @deprecated
|
|
41
|
+
*/
|
|
42
|
+
items?: Array<{
|
|
43
|
+
/**
|
|
44
|
+
* The ID of the SKU that the customer would like to purchase
|
|
45
|
+
*/
|
|
46
|
+
sku?: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The ID of the plan that the customer would like to subscribe to.
|
|
50
|
+
*/
|
|
51
|
+
plan?: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The quantity of units for the item.
|
|
55
|
+
*/
|
|
56
|
+
quantity?: number;
|
|
57
|
+
}>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The mode of the Checkout Session. Required if using lineItems.
|
|
61
|
+
*/
|
|
62
|
+
mode?: 'payment' | 'subscription';
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* A unique string to reference the Checkout session.
|
|
66
|
+
* This can be a customer ID, a cart ID, or similar.
|
|
67
|
+
* It is included in the `checkout.session.completed` webhook and can be used to fulfill the purchase.
|
|
68
|
+
*/
|
|
69
|
+
clientReferenceId?: string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The email address used to create the customer object.
|
|
73
|
+
* If you already know your customer's email address, use this attribute to prefill it on Checkout.
|
|
74
|
+
*/
|
|
75
|
+
customerEmail?: string;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Specify whether Checkout should collect the customer’s billing address.
|
|
79
|
+
* If set to `required`, Checkout will attempt to collect the customer’s billing address.
|
|
80
|
+
* If not set or set to `auto` Checkout will only attempt to collect the billing address when necessary.
|
|
81
|
+
*/
|
|
82
|
+
billingAddressCollection?: 'auto' | 'required';
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Provides configuration for Checkout to collect a shipping address from a customer.
|
|
86
|
+
*/
|
|
87
|
+
shippingAddressCollection?: {
|
|
88
|
+
/**
|
|
89
|
+
* An array of two-letter ISO country codes representing which countries
|
|
90
|
+
* Checkout should provide as options for shipping locations. The codes are
|
|
91
|
+
* expected to be uppercase. Unsupported country codes: AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI.
|
|
92
|
+
*/
|
|
93
|
+
allowedCountries: string[];
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) of the locale to display Checkout in.
|
|
98
|
+
* Default is `auto` (Stripe detects the locale of the browser).
|
|
99
|
+
*/
|
|
100
|
+
locale?: CheckoutLocale;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the **Submit** button.
|
|
104
|
+
* `submitType` can only be specified when using using line items or SKUs, and not subscriptions.
|
|
105
|
+
* The default is `auto`.
|
|
106
|
+
*/
|
|
107
|
+
submitType?: 'auto' | 'book' | 'donate' | 'pay';
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type RedirectToCheckoutOptions =
|
|
111
|
+
| RedirectToCheckoutServerOptions
|
|
112
|
+
| RedirectToCheckoutClientOptions;
|
|
113
|
+
|
|
114
|
+
export type CheckoutLocale =
|
|
115
|
+
| 'auto'
|
|
116
|
+
| 'bg'
|
|
117
|
+
| 'cs'
|
|
118
|
+
| 'da'
|
|
119
|
+
| 'de'
|
|
120
|
+
| 'el'
|
|
121
|
+
| 'en'
|
|
122
|
+
| 'en-GB'
|
|
123
|
+
| 'es'
|
|
124
|
+
| 'es-419'
|
|
125
|
+
| 'et'
|
|
126
|
+
| 'fi'
|
|
127
|
+
| 'fil'
|
|
128
|
+
| 'fr'
|
|
129
|
+
| 'fr-CA'
|
|
130
|
+
| 'hr'
|
|
131
|
+
| 'hu'
|
|
132
|
+
| 'id'
|
|
133
|
+
| 'it'
|
|
134
|
+
| 'ja'
|
|
135
|
+
| 'lt'
|
|
136
|
+
| 'lv'
|
|
137
|
+
| 'ms'
|
|
138
|
+
| 'mt'
|
|
139
|
+
| 'nb'
|
|
140
|
+
| 'nl'
|
|
141
|
+
| 'pl'
|
|
142
|
+
| 'pt'
|
|
143
|
+
| 'pt-BR'
|
|
144
|
+
| 'ro'
|
|
145
|
+
| 'ru'
|
|
146
|
+
| 'sk'
|
|
147
|
+
| 'sl'
|
|
148
|
+
| 'sv'
|
|
149
|
+
| 'th'
|
|
150
|
+
| 'tr'
|
|
151
|
+
| 'zh'
|
|
152
|
+
| 'zh-HK'
|
|
153
|
+
| 'zh-TW';
|
|
@@ -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';
|