@stripe/stripe-js 1.20.2 → 1.21.2
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 +5 -5
- package/src/shared.ts +1 -2
- package/types/api/bank-accounts.d.ts +61 -0
- package/types/api/cards.d.ts +130 -0
- package/types/api/index.d.ts +9 -9
- package/types/api/payment-intents.d.ts +330 -0
- package/types/api/payment-methods.d.ts +349 -0
- package/types/api/setup-intents.d.ts +184 -0
- package/types/api/shared.d.ts +124 -126
- package/types/api/sources.d.ts +1045 -0
- package/types/api/tokens.d.ts +634 -0
- package/types/api/verification-sessions.d.ts +9 -0
- package/types/index.d.ts +14 -12
- package/types/stripe-js/checkout.d.ts +134 -136
- package/types/stripe-js/elements/affirm-message.d.ts +59 -61
- package/types/stripe-js/elements/afterpay-clearpay-message.d.ts +118 -120
- package/types/stripe-js/elements/au-bank-account.d.ts +123 -120
- package/types/stripe-js/elements/base.d.ts +263 -263
- package/types/stripe-js/elements/card-cvc.d.ts +107 -103
- package/types/stripe-js/elements/card-expiry.d.ts +107 -104
- package/types/stripe-js/elements/card-number.d.ts +128 -125
- package/types/stripe-js/elements/card.d.ts +157 -154
- package/types/stripe-js/elements/eps-bank.d.ts +125 -121
- package/types/stripe-js/elements/fpx-bank.d.ts +120 -116
- package/types/stripe-js/elements/iban.d.ts +134 -131
- package/types/stripe-js/elements/ideal-bank.d.ts +125 -121
- package/types/stripe-js/elements/index.d.ts +17 -0
- package/types/stripe-js/elements/link-authentication.d.ts +92 -94
- package/types/stripe-js/elements/p24-bank.d.ts +125 -121
- package/types/stripe-js/elements/payment-request-button.d.ts +127 -127
- package/types/stripe-js/elements/payment.d.ts +190 -169
- package/types/stripe-js/elements/shipping-address.d.ts +123 -125
- package/types/stripe-js/elements-group.d.ts +619 -0
- package/types/stripe-js/index.d.ts +8 -1057
- package/types/stripe-js/payment-intents.d.ts +951 -919
- package/types/stripe-js/payment-request.d.ts +503 -503
- package/types/stripe-js/setup-intents.d.ts +149 -135
- package/types/stripe-js/stripe.d.ts +1070 -0
- package/types/stripe-js/token-and-sources.d.ts +80 -80
- package/types/utils.d.ts +2 -0
- package/types/api/BankAccounts.d.ts +0 -63
- package/types/api/Cards.d.ts +0 -130
- package/types/api/PaymentIntents.d.ts +0 -329
- package/types/api/PaymentMethods.d.ts +0 -349
- package/types/api/SetupIntents.d.ts +0 -184
- package/types/api/Sources.d.ts +0 -1045
- package/types/api/Tokens.d.ts +0 -632
- package/types/api/VerificationSessions.d.ts +0 -11
- package/types/stripe-js/elements.d.ts +0 -525
|
@@ -1,163 +1,177 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Data to be sent with a `stripe.confirmCardSetup` request.
|
|
4
|
-
* Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
|
|
5
|
-
*/
|
|
6
|
-
interface ConfirmCardSetupData extends SetupIntentConfirmParams {
|
|
7
|
-
/*
|
|
8
|
-
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
9
|
-
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
10
|
-
*
|
|
11
|
-
* @recommended
|
|
12
|
-
*/
|
|
13
|
-
payment_method?: string | Omit<CreatePaymentMethodCardData, 'type'>;
|
|
14
|
-
}
|
|
1
|
+
import {SetupIntentConfirmParams} from '../api';
|
|
15
2
|
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
import {
|
|
4
|
+
CreatePaymentMethodAcssDebitData,
|
|
5
|
+
CreatePaymentMethodAuBecsDebitData,
|
|
6
|
+
CreatePaymentMethodBancontactData,
|
|
7
|
+
CreatePaymentMethodCardData,
|
|
8
|
+
CreatePaymentMethodIdealData,
|
|
9
|
+
CreatePaymentMethodSepaDebitData,
|
|
10
|
+
CreatePaymentMethodSofortData,
|
|
11
|
+
CreatePaymentMethodPayPalData,
|
|
12
|
+
CreatePaymentMethodBacsDebitData,
|
|
13
|
+
} from './payment-intents';
|
|
14
|
+
|
|
15
|
+
import {Omit} from '../utils';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Data to be sent with a `stripe.confirmCardSetup` request.
|
|
19
|
+
* Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
|
|
20
|
+
*/
|
|
21
|
+
export interface ConfirmCardSetupData extends SetupIntentConfirmParams {
|
|
22
|
+
/*
|
|
23
|
+
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
24
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
25
|
+
*
|
|
26
|
+
* @recommended
|
|
18
27
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/stripe-js/elements/payment-request-button#complete-payment-intents)).
|
|
22
|
-
* Default is `true`.
|
|
23
|
-
*/
|
|
24
|
-
handleActions?: boolean;
|
|
25
|
-
}
|
|
28
|
+
payment_method?: string | Omit<CreatePaymentMethodCardData, 'type'>;
|
|
29
|
+
}
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
/**
|
|
32
|
+
* An options object to control the behavior of `stripe.confirmCardSetup`.
|
|
33
|
+
*/
|
|
34
|
+
export interface ConfirmCardSetupOptions {
|
|
35
|
+
/*
|
|
36
|
+
* Set this to `false` if you want to [handle next actions yourself](https://stripe.com/docs/payments/payment-intents/verifying-status#next-actions), or if you want to defer next action handling until later (e.g. for use in the [PaymentRequest API](https://stripe.com/docs/stripe-js/elements/payment-request-button#complete-payment-intents)).
|
|
37
|
+
* Default is `true`.
|
|
30
38
|
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
34
|
-
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
35
|
-
*
|
|
36
|
-
* @recommended
|
|
37
|
-
*/
|
|
38
|
-
payment_method?: string | Omit<CreatePaymentMethodIdealData, 'type'>;
|
|
39
|
-
}
|
|
39
|
+
handleActions?: boolean;
|
|
40
|
+
}
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Data to be sent with a `stripe.confirmIdealSetup` request.
|
|
44
|
+
* Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
|
|
45
|
+
*/
|
|
46
|
+
export interface ConfirmIdealSetupData extends SetupIntentConfirmParams {
|
|
47
|
+
/*
|
|
48
|
+
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
49
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
50
|
+
*
|
|
51
|
+
* @recommended
|
|
44
52
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
48
|
-
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
49
|
-
*
|
|
50
|
-
* @recommended
|
|
51
|
-
*/
|
|
52
|
-
payment_method?: string | Omit<CreatePaymentMethodPayPalData, 'type'>;
|
|
53
|
+
payment_method?: string | Omit<CreatePaymentMethodIdealData, 'type'>;
|
|
54
|
+
}
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Data to be sent with a `stripe.confirmIdealSetup` request.
|
|
58
|
+
* Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
|
|
59
|
+
*/
|
|
60
|
+
export interface ConfirmPayPalSetupData extends SetupIntentConfirmParams {
|
|
61
|
+
/*
|
|
62
|
+
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
63
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
64
|
+
*
|
|
65
|
+
* @recommended
|
|
66
|
+
*/
|
|
67
|
+
payment_method?: string | Omit<CreatePaymentMethodPayPalData, 'type'>;
|
|
59
68
|
|
|
60
69
|
/**
|
|
61
|
-
*
|
|
62
|
-
* Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
|
|
70
|
+
* The required url your customer will be directed to after they complete authentication.
|
|
63
71
|
*/
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
67
|
-
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
68
|
-
*
|
|
69
|
-
* @recommended
|
|
70
|
-
*/
|
|
71
|
-
payment_method?: string | Omit<CreatePaymentMethodSepaDebitData, 'type'>;
|
|
72
|
-
}
|
|
72
|
+
return_url: string;
|
|
73
|
+
}
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
/**
|
|
76
|
+
* Data to be sent with a `stripe.confirmSepaDebitSetup` request.
|
|
77
|
+
* Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
|
|
78
|
+
*/
|
|
79
|
+
export interface ConfirmSepaDebitSetupData extends SetupIntentConfirmParams {
|
|
80
|
+
/*
|
|
81
|
+
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
82
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
83
|
+
*
|
|
84
|
+
* @recommended
|
|
77
85
|
*/
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
81
|
-
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
82
|
-
*
|
|
83
|
-
* @recommended
|
|
84
|
-
*/
|
|
85
|
-
payment_method?: string | Omit<CreatePaymentMethodSofortData, 'type'>;
|
|
86
|
-
}
|
|
86
|
+
payment_method?: string | Omit<CreatePaymentMethodSepaDebitData, 'type'>;
|
|
87
|
+
}
|
|
87
88
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Data to be sent with a `stripe.confirmSofortSetup` request.
|
|
91
|
+
* Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
|
|
92
|
+
*/
|
|
93
|
+
export interface ConfirmSofortSetupData extends SetupIntentConfirmParams {
|
|
94
|
+
/*
|
|
95
|
+
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
96
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
97
|
+
*
|
|
98
|
+
* @recommended
|
|
91
99
|
*/
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
95
|
-
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
96
|
-
*
|
|
97
|
-
* @recommended
|
|
98
|
-
*/
|
|
99
|
-
payment_method?: string | Omit<CreatePaymentMethodAuBecsDebitData, 'type'>;
|
|
100
|
-
}
|
|
100
|
+
payment_method?: string | Omit<CreatePaymentMethodSofortData, 'type'>;
|
|
101
|
+
}
|
|
101
102
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
/**
|
|
104
|
+
* Data to be sent with a `stripe.confirmAuBecsDebitSetup` request.
|
|
105
|
+
* Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
|
|
106
|
+
*/
|
|
107
|
+
export interface ConfirmAuBecsDebitSetupData extends SetupIntentConfirmParams {
|
|
108
|
+
/*
|
|
109
|
+
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
110
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
111
|
+
*
|
|
112
|
+
* @recommended
|
|
105
113
|
*/
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
109
|
-
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
110
|
-
*
|
|
111
|
-
* @recommended
|
|
112
|
-
*/
|
|
113
|
-
payment_method?: string | Omit<CreatePaymentMethodBacsDebitData, 'type'>;
|
|
114
|
-
}
|
|
114
|
+
payment_method?: string | Omit<CreatePaymentMethodAuBecsDebitData, 'type'>;
|
|
115
|
+
}
|
|
115
116
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Data to be sent with a `stripe.confirmBacsDebitSetup` request.
|
|
119
|
+
* Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
|
|
120
|
+
*/
|
|
121
|
+
export interface ConfirmBacsDebitSetupData extends SetupIntentConfirmParams {
|
|
122
|
+
/*
|
|
123
|
+
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
124
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
125
|
+
*
|
|
126
|
+
* @recommended
|
|
119
127
|
*/
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
128
|
+
payment_method?: string | Omit<CreatePaymentMethodBacsDebitData, 'type'>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Data to be sent with a `stripe.confirmBancontactSetup` request.
|
|
133
|
+
* Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
|
|
134
|
+
*/
|
|
135
|
+
export interface ConfirmBancontactSetupData extends SetupIntentConfirmParams {
|
|
136
|
+
/*
|
|
137
|
+
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
138
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
139
|
+
*
|
|
140
|
+
* @recommended
|
|
141
|
+
*/
|
|
142
|
+
payment_method?: string | Omit<CreatePaymentMethodBancontactData, 'type'>;
|
|
143
|
+
}
|
|
129
144
|
|
|
145
|
+
/**
|
|
146
|
+
* Data to be sent with a `stripe.confirmAcssDebitSetup` request.
|
|
147
|
+
* Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
|
|
148
|
+
*/
|
|
149
|
+
export interface ConfirmAcssDebitSetupData extends SetupIntentConfirmParams {
|
|
130
150
|
/**
|
|
131
|
-
*
|
|
132
|
-
*
|
|
151
|
+
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
152
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
153
|
+
*
|
|
154
|
+
* @recommended
|
|
133
155
|
*/
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
137
|
-
* This field is optional if a `PaymentMethod` has already been attached to this `SetupIntent`.
|
|
138
|
-
*
|
|
139
|
-
* @recommended
|
|
140
|
-
*/
|
|
141
|
-
payment_method?: string | Omit<CreatePaymentMethodAcssDebitData, 'type'>;
|
|
142
|
-
}
|
|
156
|
+
payment_method?: string | Omit<CreatePaymentMethodAcssDebitData, 'type'>;
|
|
157
|
+
}
|
|
143
158
|
|
|
159
|
+
/**
|
|
160
|
+
* An options object to control the behavior of `stripe.confirmAcssDebitSetup`.
|
|
161
|
+
*/
|
|
162
|
+
export interface ConfirmAcssDebitSetupOptions {
|
|
144
163
|
/**
|
|
145
|
-
*
|
|
164
|
+
* Set this to true if you want to skip displaying the mandate confirmation.
|
|
146
165
|
*/
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
* Set this to true if you want to skip displaying the mandate confirmation.
|
|
150
|
-
*/
|
|
151
|
-
skipMandate?: boolean;
|
|
152
|
-
}
|
|
166
|
+
skipMandate?: boolean;
|
|
167
|
+
}
|
|
153
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Data to be sent with a `stripe.verifyMicrodepositsForSetup` request.
|
|
171
|
+
*/
|
|
172
|
+
export interface VerifyMicrodepositsForSetupData {
|
|
154
173
|
/**
|
|
155
|
-
*
|
|
174
|
+
* An array of two positive integers, in cents, equal to the values of the microdeposits sent to the bank account.
|
|
156
175
|
*/
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* An array of two positive integers, in cents, equal to the values of the microdeposits sent to the bank account.
|
|
160
|
-
*/
|
|
161
|
-
amounts?: Array<number>;
|
|
162
|
-
}
|
|
176
|
+
amounts?: Array<number>;
|
|
163
177
|
}
|