@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.
Files changed (53) hide show
  1. package/dist/pure.esm.js +1 -1
  2. package/dist/pure.js +1 -1
  3. package/dist/stripe.esm.js +1 -1
  4. package/dist/stripe.js +1 -1
  5. package/package.json +5 -5
  6. package/src/shared.ts +1 -2
  7. package/types/api/bank-accounts.d.ts +61 -0
  8. package/types/api/cards.d.ts +130 -0
  9. package/types/api/index.d.ts +9 -9
  10. package/types/api/payment-intents.d.ts +330 -0
  11. package/types/api/payment-methods.d.ts +349 -0
  12. package/types/api/setup-intents.d.ts +184 -0
  13. package/types/api/shared.d.ts +124 -126
  14. package/types/api/sources.d.ts +1045 -0
  15. package/types/api/tokens.d.ts +634 -0
  16. package/types/api/verification-sessions.d.ts +9 -0
  17. package/types/index.d.ts +14 -12
  18. package/types/stripe-js/checkout.d.ts +134 -136
  19. package/types/stripe-js/elements/affirm-message.d.ts +59 -61
  20. package/types/stripe-js/elements/afterpay-clearpay-message.d.ts +118 -120
  21. package/types/stripe-js/elements/au-bank-account.d.ts +123 -120
  22. package/types/stripe-js/elements/base.d.ts +263 -263
  23. package/types/stripe-js/elements/card-cvc.d.ts +107 -103
  24. package/types/stripe-js/elements/card-expiry.d.ts +107 -104
  25. package/types/stripe-js/elements/card-number.d.ts +128 -125
  26. package/types/stripe-js/elements/card.d.ts +157 -154
  27. package/types/stripe-js/elements/eps-bank.d.ts +125 -121
  28. package/types/stripe-js/elements/fpx-bank.d.ts +120 -116
  29. package/types/stripe-js/elements/iban.d.ts +134 -131
  30. package/types/stripe-js/elements/ideal-bank.d.ts +125 -121
  31. package/types/stripe-js/elements/index.d.ts +17 -0
  32. package/types/stripe-js/elements/link-authentication.d.ts +92 -94
  33. package/types/stripe-js/elements/p24-bank.d.ts +125 -121
  34. package/types/stripe-js/elements/payment-request-button.d.ts +127 -127
  35. package/types/stripe-js/elements/payment.d.ts +190 -169
  36. package/types/stripe-js/elements/shipping-address.d.ts +123 -125
  37. package/types/stripe-js/elements-group.d.ts +619 -0
  38. package/types/stripe-js/index.d.ts +8 -1057
  39. package/types/stripe-js/payment-intents.d.ts +951 -919
  40. package/types/stripe-js/payment-request.d.ts +503 -503
  41. package/types/stripe-js/setup-intents.d.ts +149 -135
  42. package/types/stripe-js/stripe.d.ts +1070 -0
  43. package/types/stripe-js/token-and-sources.d.ts +80 -80
  44. package/types/utils.d.ts +2 -0
  45. package/types/api/BankAccounts.d.ts +0 -63
  46. package/types/api/Cards.d.ts +0 -130
  47. package/types/api/PaymentIntents.d.ts +0 -329
  48. package/types/api/PaymentMethods.d.ts +0 -349
  49. package/types/api/SetupIntents.d.ts +0 -184
  50. package/types/api/Sources.d.ts +0 -1045
  51. package/types/api/Tokens.d.ts +0 -632
  52. package/types/api/VerificationSessions.d.ts +0 -11
  53. package/types/stripe-js/elements.d.ts +0 -525
@@ -1,1145 +1,1177 @@
1
- declare module '@stripe/stripe-js' {
2
- // Polyfill for TypeScript < 3.5 compatibility
3
- type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
4
-
5
- type CreatePaymentMethodData =
6
- | CreatePaymentMethodAcssDebitData
7
- | CreatePaymentMethodAffirmData
8
- | CreatePaymentMethodAfterpayClearpayData
9
- | CreatePaymentMethodAlipayData
10
- | CreatePaymentMethodAuBecsDebitData
11
- | CreatePaymentMethodBancontactData
12
- | CreatePaymentMethodBoletoData
13
- | CreatePaymentMethodCardData
14
- | CreatePaymentMethodCustomerBalanceData
15
- | CreatePaymentMethodEpsData
16
- | CreatePaymentMethodGiropayData
17
- | CreatePaymentMethodGrabPayData
18
- | CreatePaymentMethodIdealData
19
- | CreatePaymentMethodKlarnaData
20
- | CreatePaymentMethodP24Data
21
- | CreatePaymentMethodPayNowData
22
- | CreatePaymentMethodPromptPayData
23
- | CreatePaymentMethodFpxData
24
- | CreatePaymentMethodSepaDebitData
25
- | CreatePaymentMethodSofortData
26
- | CreatePaymentMethodWechatPayData;
27
-
28
- interface CreatePaymentMethodAlipayData extends PaymentMethodCreateParams {
29
- type: 'alipay';
30
- }
31
-
32
- interface CreatePaymentMethodWechatPayData extends PaymentMethodCreateParams {
33
- /**
34
- * Requires beta access:
35
- * Contact [Stripe support](https://support.stripe.com/) for more information.
36
- */
37
- type: 'wechat_pay';
38
- }
1
+ import {
2
+ StripeIdealBankElement,
3
+ StripeIbanElement,
4
+ StripeP24BankElement,
5
+ StripeEpsBankElement,
6
+ StripeFpxBankElement,
7
+ StripeCardCvcElement,
8
+ StripeCardNumberElement,
9
+ StripeCardElement,
10
+ StripeAuBankAccountElement,
11
+ } from './elements';
12
+ import {PaymentMethodCreateParams, PaymentIntentConfirmParams} from '../api';
13
+ import {Omit} from '../utils';
14
+
15
+ export type CreatePaymentMethodData =
16
+ | CreatePaymentMethodAcssDebitData
17
+ | CreatePaymentMethodAffirmData
18
+ | CreatePaymentMethodAfterpayClearpayData
19
+ | CreatePaymentMethodAlipayData
20
+ | CreatePaymentMethodAuBecsDebitData
21
+ | CreatePaymentMethodBacsDebitData
22
+ | CreatePaymentMethodBancontactData
23
+ | CreatePaymentMethodBoletoData
24
+ | CreatePaymentMethodCardData
25
+ | CreatePaymentMethodCustomerBalanceData
26
+ | CreatePaymentMethodEpsData
27
+ | CreatePaymentMethodGiropayData
28
+ | CreatePaymentMethodGrabPayData
29
+ | CreatePaymentMethodIdealData
30
+ | CreatePaymentMethodKlarnaData
31
+ | CreatePaymentMethodP24Data
32
+ | CreatePaymentMethodPayPalData
33
+ | CreatePaymentMethodPayNowData
34
+ | CreatePaymentMethodPromptPayData
35
+ | CreatePaymentMethodFpxData
36
+ | CreatePaymentMethodSepaDebitData
37
+ | CreatePaymentMethodSofortData
38
+ | CreatePaymentMethodWechatPayData;
39
+
40
+ export interface CreatePaymentMethodAlipayData
41
+ extends PaymentMethodCreateParams {
42
+ type: 'alipay';
43
+ }
39
44
 
40
- interface CreatePaymentMethodAffirmData extends PaymentMethodCreateParams {
41
- type: 'affirm';
45
+ export interface CreatePaymentMethodWechatPayData
46
+ extends PaymentMethodCreateParams {
47
+ /**
48
+ * Requires beta access:
49
+ * Contact [Stripe support](https://support.stripe.com/) for more information.
50
+ */
51
+ type: 'wechat_pay';
52
+ }
42
53
 
43
- /**
44
- * Can be omitted as there are no Affirm-specific fields.
45
- */
46
- affirm?: {}; // eslint-disable-line @typescript-eslint/ban-types
47
- }
54
+ export interface CreatePaymentMethodAffirmData
55
+ extends PaymentMethodCreateParams {
56
+ type: 'affirm';
48
57
 
49
- interface CreatePaymentMethodAfterpayClearpayData
50
- extends PaymentMethodCreateParams {
51
- type: 'afterpay_clearpay';
58
+ /**
59
+ * Can be omitted as there are no Affirm-specific fields.
60
+ */
61
+ affirm?: {}; // eslint-disable-line @typescript-eslint/ban-types
62
+ }
52
63
 
53
- /**
54
- * Can be omitted as there are no AfterpayClearpay-specific fields.
55
- */
56
- afterpay_clearpay?: {}; // eslint-disable-line @typescript-eslint/ban-types
57
- }
64
+ export interface CreatePaymentMethodAfterpayClearpayData
65
+ extends PaymentMethodCreateParams {
66
+ type: 'afterpay_clearpay';
58
67
 
59
- interface CreatePaymentMethodBancontactData
60
- extends PaymentMethodCreateParams {
61
- type: 'bancontact';
68
+ /**
69
+ * Can be omitted as there are no AfterpayClearpay-specific fields.
70
+ */
71
+ afterpay_clearpay?: {}; // eslint-disable-line @typescript-eslint/ban-types
72
+ }
62
73
 
63
- /**
64
- * The customer's billing details.
65
- * `name` is required.
66
- *
67
- * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
68
- */
69
- billing_details: PaymentMethodCreateParams.BillingDetails & {
70
- name: string;
74
+ export interface CreatePaymentMethodBancontactData
75
+ extends PaymentMethodCreateParams {
76
+ type: 'bancontact';
77
+
78
+ /**
79
+ * The customer's billing details.
80
+ * `name` is required.
81
+ *
82
+ * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
83
+ */
84
+ billing_details: PaymentMethodCreateParams.BillingDetails & {
85
+ name: string;
86
+ };
87
+ }
88
+
89
+ export interface CreatePaymentMethodBoletoData
90
+ extends PaymentMethodCreateParams {
91
+ type: 'boleto';
92
+
93
+ /**
94
+ * The customer's billing details.
95
+ * `name`, `email`, and full `address` is required.
96
+ *
97
+ * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
98
+ */
99
+ billing_details: PaymentMethodCreateParams.BillingDetails & {
100
+ email: string;
101
+ name: string;
102
+ address: PaymentMethodCreateParams.BillingDetails.Address & {
103
+ line1: string;
104
+ city: string;
105
+ postal_code: string;
106
+ state: string;
107
+ country: string;
71
108
  };
72
- }
109
+ };
73
110
 
74
- interface CreatePaymentMethodBoletoData extends PaymentMethodCreateParams {
75
- type: 'boleto';
111
+ boleto: {
112
+ tax_id: string;
113
+ };
114
+ }
76
115
 
77
- /**
78
- * The customer's billing details.
79
- * `name`, `email`, and full `address` is required.
80
- *
81
- * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
82
- */
83
- billing_details: PaymentMethodCreateParams.BillingDetails & {
84
- email: string;
85
- name: string;
86
- address: PaymentMethodCreateParams.BillingDetails.Address & {
87
- line1: string;
88
- city: string;
89
- postal_code: string;
90
- state: string;
91
- country: string;
116
+ export interface CreatePaymentMethodCardData extends PaymentMethodCreateParams {
117
+ type: 'card';
118
+
119
+ card: StripeCardElement | StripeCardNumberElement | {token: string};
120
+ }
121
+
122
+ export interface CreatePaymentMethodCustomerBalanceData
123
+ extends PaymentMethodCreateParams {
124
+ /**
125
+ * Requires beta access:
126
+ * Contact [Stripe support](https://support.stripe.com/) for more information.
127
+ */
128
+ customer_balance: Record<string, never>;
129
+ }
130
+
131
+ export interface CreatePaymentMethodEpsData extends PaymentMethodCreateParams {
132
+ type: 'eps';
133
+
134
+ /**
135
+ * The customer's billing details.
136
+ * `name` is required.
137
+ *
138
+ * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
139
+ */
140
+ billing_details: PaymentMethodCreateParams.BillingDetails & {
141
+ name: string;
142
+ };
143
+
144
+ eps:
145
+ | StripeEpsBankElement
146
+ | {
147
+ /**
148
+ * The customer's bank
149
+ */
150
+ bank?: string;
92
151
  };
93
- };
152
+ }
94
153
 
95
- boleto: {
96
- tax_id: string;
97
- };
98
- }
154
+ export interface CreatePaymentMethodFpxData extends PaymentMethodCreateParams {
155
+ type: 'fpx';
99
156
 
100
- interface CreatePaymentMethodCardData extends PaymentMethodCreateParams {
101
- type: 'card';
157
+ fpx:
158
+ | StripeFpxBankElement
159
+ | {
160
+ /**
161
+ * The customer's bank.
162
+ */
163
+ bank: string;
164
+ };
165
+ }
102
166
 
103
- card: StripeCardElement | StripeCardNumberElement | {token: string};
104
- }
167
+ export interface CreatePaymentMethodGiropayData
168
+ extends PaymentMethodCreateParams {
169
+ type: 'giropay';
105
170
 
106
- interface CreatePaymentMethodCustomerBalanceData
107
- extends PaymentMethodCreateParams {
108
- /**
109
- * Requires beta access:
110
- * Contact [Stripe support](https://support.stripe.com/) for more information.
111
- */
112
- customer_balance: Record<string, never>;
113
- }
171
+ /**
172
+ * The customer's billing details.
173
+ * `name` is required.
174
+ *
175
+ * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
176
+ */
177
+ billing_details: PaymentMethodCreateParams.BillingDetails & {
178
+ name: string;
179
+ };
180
+ }
114
181
 
115
- interface CreatePaymentMethodEpsData extends PaymentMethodCreateParams {
116
- type: 'eps';
182
+ export interface CreatePaymentMethodGrabPayData
183
+ extends PaymentMethodCreateParams {
184
+ type: 'grabpay';
117
185
 
118
- /**
119
- * The customer's billing details.
120
- * `name` is required.
121
- *
122
- * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
123
- */
124
- billing_details: PaymentMethodCreateParams.BillingDetails & {
125
- name: string;
126
- };
186
+ /**
187
+ * Can be omitted as there are no GrabPay-specific fields.
188
+ */
189
+ grabpay?: {}; // eslint-disable-line @typescript-eslint/ban-types
190
+ }
127
191
 
128
- eps:
129
- | StripeEpsBankElement
130
- | {
131
- /**
132
- * The customer's bank
133
- */
134
- bank?: string;
135
- };
136
- }
137
-
138
- interface CreatePaymentMethodFpxData extends PaymentMethodCreateParams {
139
- type: 'fpx';
140
-
141
- fpx:
142
- | StripeFpxBankElement
143
- | {
144
- /**
145
- * The customer's bank.
146
- */
147
- bank: string;
148
- };
149
- }
192
+ export interface CreatePaymentMethodIdealData
193
+ extends PaymentMethodCreateParams {
194
+ type: 'ideal';
150
195
 
151
- interface CreatePaymentMethodGiropayData extends PaymentMethodCreateParams {
152
- type: 'giropay';
196
+ ideal:
197
+ | StripeIdealBankElement
198
+ | {
199
+ /**
200
+ * The customer's bank.
201
+ */
202
+ bank?: string;
203
+ };
204
+ }
153
205
 
154
- /**
155
- * The customer's billing details.
156
- * `name` is required.
157
- *
158
- * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
159
- */
160
- billing_details: PaymentMethodCreateParams.BillingDetails & {
161
- name: string;
206
+ export interface CreatePaymentMethodKlarnaData
207
+ extends PaymentMethodCreateParams {
208
+ /**
209
+ * Requires beta access:
210
+ * Contact [Stripe support](https://support.stripe.com/) for more information.
211
+ */
212
+ type: 'klarna';
213
+
214
+ /**
215
+ * The customer's billing details.
216
+ * `address.country` is required.
217
+ *
218
+ * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
219
+ */
220
+ billing_details: PaymentMethodCreateParams.BillingDetails & {
221
+ address: PaymentMethodCreateParams.BillingDetails.Address & {
222
+ country: string;
162
223
  };
163
- }
224
+ };
225
+ }
164
226
 
165
- interface CreatePaymentMethodGrabPayData extends PaymentMethodCreateParams {
166
- type: 'grabpay';
227
+ export interface CreatePaymentMethodOxxoData extends PaymentMethodCreateParams {
228
+ type: 'oxxo';
167
229
 
168
- /**
169
- * Can be omitted as there are no GrabPay-specific fields.
170
- */
171
- grabpay?: {}; // eslint-disable-line @typescript-eslint/ban-types
172
- }
173
-
174
- interface CreatePaymentMethodIdealData extends PaymentMethodCreateParams {
175
- type: 'ideal';
176
-
177
- ideal:
178
- | StripeIdealBankElement
179
- | {
180
- /**
181
- * The customer's bank.
182
- */
183
- bank?: string;
184
- };
185
- }
230
+ /**
231
+ * The customer's billing details.
232
+ * `email` and `name` are required.
233
+ *
234
+ * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
235
+ */
236
+ billing_details: PaymentMethodCreateParams.BillingDetails & {
237
+ email: string;
238
+ name: string;
239
+ };
240
+ }
186
241
 
187
- interface CreatePaymentMethodKlarnaData extends PaymentMethodCreateParams {
188
- /**
189
- * Requires beta access:
190
- * Contact [Stripe support](https://support.stripe.com/) for more information.
191
- */
192
- type: 'klarna';
242
+ export interface CreatePaymentMethodP24Data extends PaymentMethodCreateParams {
243
+ type: 'p24';
193
244
 
194
- /**
195
- * The customer's billing details.
196
- * `address.country` is required.
197
- *
198
- * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
199
- */
200
- billing_details: PaymentMethodCreateParams.BillingDetails & {
201
- address: PaymentMethodCreateParams.BillingDetails.Address & {
202
- country: string;
245
+ /**
246
+ * The customer's billing details.
247
+ * `email` is required.
248
+ *
249
+ * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
250
+ */
251
+ billing_details: PaymentMethodCreateParams.BillingDetails & {
252
+ email: string;
253
+ };
254
+ p24?:
255
+ | StripeP24BankElement
256
+ | {
257
+ /**
258
+ * The customer's bank.
259
+ */
260
+ bank?: string;
203
261
  };
204
- };
205
- }
262
+ }
206
263
 
207
- interface CreatePaymentMethodOxxoData extends PaymentMethodCreateParams {
208
- type: 'oxxo';
264
+ export interface CreatePaymentMethodPayNowData
265
+ extends PaymentMethodCreateParams {
266
+ type: 'paynow';
267
+ }
209
268
 
210
- /**
211
- * The customer's billing details.
212
- * `email` and `name` are required.
213
- *
214
- * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
215
- */
216
- billing_details: PaymentMethodCreateParams.BillingDetails & {
217
- email: string;
218
- name: string;
219
- };
220
- }
269
+ export interface CreatePaymentMethodPayPalData
270
+ extends PaymentMethodCreateParams {
271
+ type: 'paypal';
272
+ }
221
273
 
222
- interface CreatePaymentMethodP24Data extends PaymentMethodCreateParams {
223
- type: 'p24';
274
+ export interface CreatePaymentMethodPromptPayData
275
+ extends PaymentMethodCreateParams {
276
+ type: 'promptpay';
277
+ }
224
278
 
225
- /**
226
- * The customer's billing details.
227
- * `email` is required.
228
- *
229
- * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
230
- */
231
- billing_details: PaymentMethodCreateParams.BillingDetails & {
232
- email: string;
233
- };
234
- p24?:
235
- | StripeP24BankElement
236
- | {
237
- /**
238
- * The customer's bank.
239
- */
240
- bank?: string;
241
- };
242
- }
243
-
244
- interface CreatePaymentMethodPayNowData extends PaymentMethodCreateParams {
245
- type: 'paynow';
246
- }
247
-
248
- interface CreatePaymentMethodPayPalData extends PaymentMethodCreateParams {
249
- type: 'paypal';
250
- }
251
-
252
- interface CreatePaymentMethodPromptPayData extends PaymentMethodCreateParams {
253
- type: 'promptpay';
254
- }
255
-
256
- interface CreatePaymentMethodSepaDebitData extends PaymentMethodCreateParams {
257
- type: 'sepa_debit';
258
-
259
- sepa_debit:
260
- | StripeIbanElement
261
- | {
262
- /**
263
- * An IBAN account number.
264
- */
265
- iban: string;
266
- };
279
+ export interface CreatePaymentMethodSepaDebitData
280
+ extends PaymentMethodCreateParams {
281
+ type: 'sepa_debit';
267
282
 
268
- /**
269
- * The customer's billing details.
270
- * `name` and `email` are required.
271
- *
272
- * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
273
- */
274
- billing_details: PaymentMethodCreateParams.BillingDetails & {
275
- name: string;
276
- email: string;
277
- };
278
- }
283
+ sepa_debit:
284
+ | StripeIbanElement
285
+ | {
286
+ /**
287
+ * An IBAN account number.
288
+ */
289
+ iban: string;
290
+ };
279
291
 
280
- interface CreatePaymentMethodSofortData extends PaymentMethodCreateParams {
281
- type: 'sofort';
292
+ /**
293
+ * The customer's billing details.
294
+ * `name` and `email` are required.
295
+ *
296
+ * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
297
+ */
298
+ billing_details: PaymentMethodCreateParams.BillingDetails & {
299
+ name: string;
300
+ email: string;
301
+ };
302
+ }
282
303
 
283
- sofort: {
284
- /**
285
- * The country code where customer's bank is located.
286
- */
287
- country: string;
288
- };
304
+ export interface CreatePaymentMethodSofortData
305
+ extends PaymentMethodCreateParams {
306
+ type: 'sofort';
289
307
 
308
+ sofort: {
290
309
  /**
291
- * The customer's billing details.
292
- * Required when `setup_future_usage` is set to `off_session`.
293
- *
294
- * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
310
+ * The country code where customer's bank is located.
295
311
  */
296
- billing_details?: PaymentMethodCreateParams.BillingDetails;
297
- }
312
+ country: string;
313
+ };
298
314
 
299
- interface CreatePaymentMethodAuBecsDebitData
300
- extends PaymentMethodCreateParams {
301
- /**
302
- * Requires beta access:
303
- * Contact [Stripe support](https://support.stripe.com/) for more information.
304
- */
305
- type: 'au_becs_debit';
315
+ /**
316
+ * The customer's billing details.
317
+ * Required when `setup_future_usage` is set to `off_session`.
318
+ *
319
+ * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
320
+ */
321
+ billing_details?: PaymentMethodCreateParams.BillingDetails;
322
+ }
306
323
 
307
- /**
308
- * Requires beta access:
309
- * Contact [Stripe support](https://support.stripe.com/) for more information.
310
- */
311
- au_becs_debit:
312
- | StripeAuBankAccountElement
313
- | {
314
- /**
315
- * A BSB number.
316
- */
317
- bsb_number: string;
318
-
319
- /**
320
- * An account number.
321
- */
322
- account_number: string;
323
- };
324
+ export interface CreatePaymentMethodAuBecsDebitData
325
+ extends PaymentMethodCreateParams {
326
+ /**
327
+ * Requires beta access:
328
+ * Contact [Stripe support](https://support.stripe.com/) for more information.
329
+ */
330
+ type: 'au_becs_debit';
324
331
 
325
- /**
326
- * The customer's billing details.
327
- * `name` and `email` are required.
328
- *
329
- * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
330
- */
331
- billing_details: PaymentMethodCreateParams.BillingDetails & {
332
- name: string;
333
- email: string;
334
- };
335
- }
332
+ /**
333
+ * Requires beta access:
334
+ * Contact [Stripe support](https://support.stripe.com/) for more information.
335
+ */
336
+ au_becs_debit:
337
+ | StripeAuBankAccountElement
338
+ | {
339
+ /**
340
+ * A BSB number.
341
+ */
342
+ bsb_number: string;
336
343
 
337
- interface CreatePaymentMethodBacsDebitData extends PaymentMethodCreateParams {
338
- type: 'bacs_debit';
344
+ /**
345
+ * An account number.
346
+ */
347
+ account_number: string;
348
+ };
339
349
 
340
- bacs_debit: {
341
- /**
342
- * A sort code.
343
- */
344
- sort_code: string;
350
+ /**
351
+ * The customer's billing details.
352
+ * `name` and `email` are required.
353
+ *
354
+ * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
355
+ */
356
+ billing_details: PaymentMethodCreateParams.BillingDetails & {
357
+ name: string;
358
+ email: string;
359
+ };
360
+ }
345
361
 
346
- /**
347
- * An account number.
348
- */
349
- account_number: string;
350
- };
362
+ export interface CreatePaymentMethodBacsDebitData
363
+ extends PaymentMethodCreateParams {
364
+ type: 'bacs_debit';
351
365
 
366
+ bacs_debit: {
352
367
  /**
353
- * The customer's billing details.
354
- * `name`, `email`, and `address` are required.
355
- *
356
- * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
368
+ * A sort code.
357
369
  */
358
- billing_details: PaymentMethodCreateParams.BillingDetails & {
359
- name: string;
360
- email: string;
361
- address: PaymentMethodCreateParams.BillingDetails.Address & {
362
- line1: string;
363
- city: string;
364
- country: string;
365
- postal_code: string;
366
- };
367
- };
368
- }
369
- interface CreatePaymentMethodAcssDebitData extends PaymentMethodCreateParams {
370
- type: 'acss_debit';
370
+ sort_code: string;
371
371
 
372
372
  /**
373
- * Can be omitted as Stripe will help to collect bank account details and verification.
374
- * Refer to our [integration guide](https://stripe.com/docs/payments/acss-debit/accept-a-payment) for more details.
373
+ * An account number.
375
374
  */
376
- acss_debit?: {
377
- /**
378
- * Customer’s bank account number.
379
- */
380
- account_number: string;
375
+ account_number: string;
376
+ };
381
377
 
382
- /**
383
- * Institution number of the customers bank.
384
- */
385
- institution_number: string;
386
-
387
- /**
388
- * Transit number of the customer’s bank.
389
- */
390
- transit_number: string;
378
+ /**
379
+ * The customer's billing details.
380
+ * `name`, `email`, and `address` are required.
381
+ *
382
+ * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
383
+ */
384
+ billing_details: PaymentMethodCreateParams.BillingDetails & {
385
+ name: string;
386
+ email: string;
387
+ address: PaymentMethodCreateParams.BillingDetails.Address & {
388
+ line1: string;
389
+ city: string;
390
+ country: string;
391
+ postal_code: string;
391
392
  };
393
+ };
394
+ }
395
+ export interface CreatePaymentMethodAcssDebitData
396
+ extends PaymentMethodCreateParams {
397
+ type: 'acss_debit';
392
398
 
399
+ /**
400
+ * Can be omitted as Stripe will help to collect bank account details and verification.
401
+ * Refer to our [integration guide](https://stripe.com/docs/payments/acss-debit/accept-a-payment) for more details.
402
+ */
403
+ acss_debit?: {
393
404
  /**
394
- * The customer's billing details.
395
- * `name`, `email`, and `address` are required.
396
- *
397
- * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
405
+ * Customer’s bank account number.
398
406
  */
399
- billing_details: PaymentMethodCreateParams.BillingDetails;
400
- }
407
+ account_number: string;
401
408
 
402
- /**
403
- * Data to be sent with a `stripe.confirmBancontactPayment` request.
404
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
405
- */
406
- interface ConfirmBancontactPaymentData extends PaymentIntentConfirmParams {
407
409
  /**
408
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
409
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
410
- *
411
- * @recommended
410
+ * Institution number of the customer’s bank.
412
411
  */
413
- payment_method?: string | Omit<CreatePaymentMethodBancontactData, 'type'>;
412
+ institution_number: string;
414
413
 
415
414
  /**
416
- * The url your customer will be directed to after they complete authentication.
417
- *
418
- * @recommended
415
+ * Transit number of the customer’s bank.
419
416
  */
420
- return_url?: string;
421
- }
417
+ transit_number: string;
418
+ };
422
419
 
423
420
  /**
424
- * Data to be sent with a `stripe.confirmBoletoPayment` request.
425
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
421
+ * The customer's billing details.
422
+ * `name`, `email`, and `address` are required.
423
+ *
424
+ * @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
426
425
  */
427
- interface ConfirmBoletoPaymentData extends PaymentIntentConfirmParams {
428
- /**
429
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
430
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
431
- *
432
- * @recommended
433
- */
434
- payment_method?: string | Omit<CreatePaymentMethodBoletoData, 'type'>;
435
- }
426
+ billing_details: PaymentMethodCreateParams.BillingDetails;
427
+ }
436
428
 
429
+ /**
430
+ * Data to be sent with a `stripe.confirmBancontactPayment` request.
431
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
432
+ */
433
+ export interface ConfirmBancontactPaymentData
434
+ extends PaymentIntentConfirmParams {
437
435
  /**
438
- * An options object to control the behavior of `stripe.confirmBoletoPayment`.
436
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
437
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
438
+ *
439
+ * @recommended
439
440
  */
440
- interface ConfirmBoletoPaymentOptions {
441
- /**
442
- * Set this to `false` if you want to handle next actions yourself. Please refer to our [Stripe Boleto integration guide](https://stripe.com/docs/payments/boleto) for more info. Default is `true`.
443
- */
444
- handleActions?: boolean;
445
- }
441
+ payment_method?: string | Omit<CreatePaymentMethodBancontactData, 'type'>;
446
442
 
447
443
  /**
448
- * Data to be sent with a `stripe.confirmAlipayPayment` request.
449
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
444
+ * The url your customer will be directed to after they complete authentication.
445
+ *
446
+ * @recommended
450
447
  */
451
- interface ConfirmAlipayPaymentData extends PaymentIntentConfirmParams {
452
- /**
453
- * The `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods).
454
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent` or a new `PaymentMethod` will be created.
455
- *
456
- * @recommended
457
- */
458
- payment_method?: string | Omit<CreatePaymentMethodAlipayData, 'type'>;
448
+ return_url?: string;
449
+ }
459
450
 
460
- /**
461
- * The url your customer will be directed to after they complete authentication.
462
- *
463
- * @recommended
464
- */
465
- return_url?: string;
466
- }
451
+ /**
452
+ * Data to be sent with a `stripe.confirmBoletoPayment` request.
453
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
454
+ */
455
+ export interface ConfirmBoletoPaymentData extends PaymentIntentConfirmParams {
456
+ /**
457
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
458
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
459
+ *
460
+ * @recommended
461
+ */
462
+ payment_method?: string | Omit<CreatePaymentMethodBoletoData, 'type'>;
463
+ }
467
464
 
465
+ /**
466
+ * An options object to control the behavior of `stripe.confirmBoletoPayment`.
467
+ */
468
+ export interface ConfirmBoletoPaymentOptions {
468
469
  /**
469
- * An options object to control the behavior of `stripe.confirmAlipayPayment`.
470
+ * Set this to `false` if you want to handle next actions yourself. Please refer to our [Stripe Boleto integration guide](https://stripe.com/docs/payments/boleto) for more info. Default is `true`.
470
471
  */
471
- interface ConfirmAlipayPaymentOptions {
472
- /**
473
- * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/alipay/accept-a-payment#handle-redirect).
474
- * Default is `true`.
475
- */
476
- handleActions?: boolean;
477
- }
472
+ handleActions?: boolean;
473
+ }
478
474
 
475
+ /**
476
+ * Data to be sent with a `stripe.confirmAlipayPayment` request.
477
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
478
+ */
479
+ export interface ConfirmAlipayPaymentData extends PaymentIntentConfirmParams {
479
480
  /**
480
- * An options object to control the behavior of `stripe.confirmBancontactPayment`.
481
+ * The `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods).
482
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent` or a new `PaymentMethod` will be created.
483
+ *
484
+ * @recommended
481
485
  */
482
- interface ConfirmBancontactPaymentOptions {
483
- /**
484
- * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/bancontact#handle-redirect).
485
- * Default is `true`.
486
- */
487
- handleActions?: boolean;
488
- }
486
+ payment_method?: string | Omit<CreatePaymentMethodAlipayData, 'type'>;
489
487
 
490
488
  /**
491
- * Data to be sent with a `stripe.confirmCardPayment` request.
492
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
489
+ * The url your customer will be directed to after they complete authentication.
490
+ *
491
+ * @recommended
493
492
  */
494
- interface ConfirmCardPaymentData extends PaymentIntentConfirmParams {
495
- /**
496
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
497
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
498
- *
499
- * @recommended
500
- */
501
- payment_method?: string | Omit<CreatePaymentMethodCardData, 'type'>;
493
+ return_url?: string;
494
+ }
495
+
496
+ /**
497
+ * An options object to control the behavior of `stripe.confirmAlipayPayment`.
498
+ */
499
+ export interface ConfirmAlipayPaymentOptions {
500
+ /**
501
+ * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/alipay/accept-a-payment#handle-redirect).
502
+ * Default is `true`.
503
+ */
504
+ handleActions?: boolean;
505
+ }
506
+
507
+ /**
508
+ * An options object to control the behavior of `stripe.confirmBancontactPayment`.
509
+ */
510
+ export interface ConfirmBancontactPaymentOptions {
511
+ /**
512
+ * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/bancontact#handle-redirect).
513
+ * Default is `true`.
514
+ */
515
+ handleActions?: boolean;
516
+ }
502
517
 
518
+ /**
519
+ * Data to be sent with a `stripe.confirmCardPayment` request.
520
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
521
+ */
522
+ export interface ConfirmCardPaymentData extends PaymentIntentConfirmParams {
523
+ /**
524
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
525
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
526
+ *
527
+ * @recommended
528
+ */
529
+ payment_method?: string | Omit<CreatePaymentMethodCardData, 'type'>;
530
+
531
+ /**
532
+ * An object containing payment-method-specific configuration to confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with.
533
+ */
534
+ payment_method_options?: {
503
535
  /**
504
- * An object containing payment-method-specific configuration to confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with.
536
+ * Configuration for this card payment.
505
537
  */
506
- payment_method_options?: {
538
+ card: {
507
539
  /**
508
- * Configuration for this card payment.
540
+ * Use the provided `CardCvcElement` when confirming the PaymentIntent with an existing PaymentMethod.
509
541
  */
510
- card: {
511
- /**
512
- * Use the provided `CardCvcElement` when confirming the PaymentIntent with an existing PaymentMethod.
513
- */
514
- cvc?: StripeCardCvcElement;
542
+ cvc?: StripeCardCvcElement;
515
543
 
516
- /**
517
- * Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent.
518
- */
519
- network?: string;
520
- };
544
+ /**
545
+ * Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent.
546
+ */
547
+ network?: string;
521
548
  };
522
- }
549
+ };
550
+ }
523
551
 
552
+ /**
553
+ * An options object to control the behavior of `stripe.confirmCardPayment`.
554
+ */
555
+ export interface ConfirmCardPaymentOptions {
524
556
  /**
525
- * An options object to control the behavior of `stripe.confirmCardPayment`.
557
+ * 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)).
558
+ * Default is `true`.
526
559
  */
527
- interface ConfirmCardPaymentOptions {
528
- /**
529
- * 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)).
530
- * Default is `true`.
531
- */
532
- handleActions?: boolean;
533
- }
560
+ handleActions?: boolean;
561
+ }
534
562
 
563
+ /**
564
+ * Data to be sent with a `stripe.confirmCustomerBalancePayment` request.
565
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
566
+ */
567
+ export interface ConfirmCustomerBalancePaymentData
568
+ extends PaymentIntentConfirmParams {
535
569
  /**
536
- * Data to be sent with a `stripe.confirmCustomerBalancePayment` request.
537
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
570
+ * An object specifying the `customer_balance` type.
538
571
  */
539
- interface ConfirmCustomerBalancePaymentData
540
- extends PaymentIntentConfirmParams {
541
- /**
542
- * An object specifying the `customer_balance` type.
543
- */
544
- payment_method: CreatePaymentMethodCustomerBalanceData;
545
- payment_method_options?: {
546
- customer_balance?: {
547
- funding_type?: 'bank_transfer';
548
- bank_transfer?: {
549
- type:
550
- | 'us_bank_account'
551
- | 'eu_bank_account'
552
- | 'id_bank_account'
553
- | 'gb_bank_account'
554
- | 'jp_bank_account'
555
- | 'mx_bank_account';
556
- eu_bank_account?: {
557
- country: 'ES' | 'FR' | 'IE' | 'NL';
558
- };
559
- id_bank_account?: {
560
- bank: 'bni' | 'bca';
561
- };
562
- requested_address_types?: Array<
563
- | 'aba'
564
- | 'swift'
565
- | 'sort_code'
566
- | 'zengin'
567
- | 'iban'
568
- | 'spei'
569
- | 'id_bban'
570
- | 'sepa'
571
- >;
572
+ payment_method: CreatePaymentMethodCustomerBalanceData;
573
+ payment_method_options?: {
574
+ customer_balance?: {
575
+ funding_type?: 'bank_transfer';
576
+ bank_transfer?: {
577
+ type:
578
+ | 'us_bank_account'
579
+ | 'eu_bank_account'
580
+ | 'id_bank_account'
581
+ | 'gb_bank_account'
582
+ | 'jp_bank_account'
583
+ | 'mx_bank_account';
584
+ eu_bank_account?: {
585
+ country: 'ES' | 'FR' | 'IE' | 'NL';
586
+ };
587
+ id_bank_account?: {
588
+ bank: 'bni' | 'bca';
572
589
  };
590
+ requested_address_types?: Array<
591
+ | 'aba'
592
+ | 'swift'
593
+ | 'sort_code'
594
+ | 'zengin'
595
+ | 'iban'
596
+ | 'spei'
597
+ | 'id_bban'
598
+ | 'sepa'
599
+ >;
573
600
  };
574
601
  };
575
- }
602
+ };
603
+ }
576
604
 
605
+ /**
606
+ * An options object to control the behavior of `stripe.confirmCustomerBalancePayment`.
607
+ */
608
+ export interface ConfirmCustomerBalancePaymentOptions {
577
609
  /**
578
- * An options object to control the behavior of `stripe.confirmCustomerBalancePayment`.
610
+ * This must be set to `false`.
611
+ * The Customer Balance does not handle the next actions for you automatically (e.g. displaying bank transfer details).
612
+ * To make future upgrades easier, this option is required to always be sent.
613
+ * Please refer to our [Stripe Customer Balance integration guide](https://stripe.com/docs/payments/bank-transfers) for more info.
579
614
  */
580
- interface ConfirmCustomerBalancePaymentOptions {
581
- /**
582
- * This must be set to `false`.
583
- * The Customer Balance does not handle the next actions for you automatically (e.g. displaying bank transfer details).
584
- * To make future upgrades easier, this option is required to always be sent.
585
- * Please refer to our [Stripe Customer Balance integration guide](https://stripe.com/docs/payments/bank-transfers) for more info.
586
- */
587
- handleActions: false;
588
- }
615
+ handleActions: false;
616
+ }
589
617
 
618
+ /**
619
+ * Data to be sent with a `stripe.confirmEpsPayment` request.
620
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
621
+ */
622
+ export interface ConfirmEpsPaymentData extends PaymentIntentConfirmParams {
590
623
  /**
591
- * Data to be sent with a `stripe.confirmEpsPayment` request.
592
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
624
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
625
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
626
+ *
627
+ * @recommended
593
628
  */
594
- interface ConfirmEpsPaymentData extends PaymentIntentConfirmParams {
595
- /**
596
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
597
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
598
- *
599
- * @recommended
600
- */
601
- payment_method?: string | Omit<CreatePaymentMethodEpsData, 'type'>;
629
+ payment_method?: string | Omit<CreatePaymentMethodEpsData, 'type'>;
602
630
 
603
- /**
604
- * The url your customer will be directed to after they complete authentication.
605
- *
606
- * @recommended
607
- */
608
- return_url?: string;
609
- }
631
+ /**
632
+ * The url your customer will be directed to after they complete authentication.
633
+ *
634
+ * @recommended
635
+ */
636
+ return_url?: string;
637
+ }
610
638
 
639
+ /**
640
+ * An options object to control the behavior of `stripe.confirmEpsPayment`.
641
+ */
642
+ export interface ConfirmEpsPaymentOptions {
611
643
  /**
612
- * An options object to control the behavior of `stripe.confirmEpsPayment`.
644
+ * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/eps#handle-redirect).
645
+ * Default is `true`.
613
646
  */
614
- interface ConfirmEpsPaymentOptions {
615
- /**
616
- * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/eps#handle-redirect).
617
- * Default is `true`.
618
- */
619
- handleActions?: boolean;
620
- }
647
+ handleActions?: boolean;
648
+ }
621
649
 
650
+ /**
651
+ * Data to be sent with a `stripe.confirmSepaDebitPayment` request.
652
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
653
+ */
654
+ export interface ConfirmSepaDebitPaymentData
655
+ extends PaymentIntentConfirmParams {
622
656
  /**
623
- * Data to be sent with a `stripe.confirmSepaDebitPayment` request.
624
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
657
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
658
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
659
+ *
660
+ * @recommended
625
661
  */
626
- interface ConfirmSepaDebitPaymentData extends PaymentIntentConfirmParams {
627
- /**
628
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
629
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
630
- *
631
- * @recommended
632
- */
633
- payment_method?: string | Omit<CreatePaymentMethodSepaDebitData, 'type'>;
662
+ payment_method?: string | Omit<CreatePaymentMethodSepaDebitData, 'type'>;
634
663
 
635
- /**
636
- * To save the SEPA Direct Debit account for reuse, set this parameter to `off_session`.
637
- * SEPA Direct Debit only accepts an `off_session` value for this parameter.
638
- */
639
- setup_future_usage?: 'off_session';
640
- }
664
+ /**
665
+ * To save the SEPA Direct Debit account for reuse, set this parameter to `off_session`.
666
+ * SEPA Direct Debit only accepts an `off_session` value for this parameter.
667
+ */
668
+ setup_future_usage?: 'off_session';
669
+ }
641
670
 
671
+ /**
672
+ * Data to be sent with a `stripe.confirmFpxPayment` request.
673
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
674
+ */
675
+ export interface ConfirmFpxPaymentData extends PaymentIntentConfirmParams {
642
676
  /**
643
- * Data to be sent with a `stripe.confirmFpxPayment` request.
644
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
677
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
678
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
679
+ *
680
+ * @recommended
645
681
  */
646
- interface ConfirmFpxPaymentData extends PaymentIntentConfirmParams {
647
- /**
648
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
649
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
650
- *
651
- * @recommended
652
- */
653
- payment_method?: string | Omit<CreatePaymentMethodFpxData, 'type'>;
682
+ payment_method?: string | Omit<CreatePaymentMethodFpxData, 'type'>;
654
683
 
655
- /**
656
- * The url your customer will be directed to after they complete authentication.
657
- *
658
- * @recommended
659
- */
660
- return_url?: string;
661
- }
684
+ /**
685
+ * The url your customer will be directed to after they complete authentication.
686
+ *
687
+ * @recommended
688
+ */
689
+ return_url?: string;
690
+ }
662
691
 
692
+ /**
693
+ * An options object to control the behavior of `stripe.confirmFpxPayment`.
694
+ */
695
+ export interface ConfirmFpxPaymentOptions {
663
696
  /**
664
- * An options object to control the behavior of `stripe.confirmFpxPayment`.
697
+ * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/fpx#handle-redirect).
698
+ * Default is `true`.
665
699
  */
666
- interface ConfirmFpxPaymentOptions {
667
- /**
668
- * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/fpx#handle-redirect).
669
- * Default is `true`.
670
- */
671
- handleActions?: boolean;
672
- }
700
+ handleActions?: boolean;
701
+ }
673
702
 
703
+ /**
704
+ * Data to be sent with a `stripe.confirmGiropayPayment` request.
705
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
706
+ */
707
+ export interface ConfirmGiropayPaymentData extends PaymentIntentConfirmParams {
674
708
  /**
675
- * Data to be sent with a `stripe.confirmGiropayPayment` request.
676
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
709
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
710
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
711
+ *
712
+ * @recommended
677
713
  */
678
- interface ConfirmGiropayPaymentData extends PaymentIntentConfirmParams {
679
- /**
680
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
681
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
682
- *
683
- * @recommended
684
- */
685
- payment_method?: string | Omit<CreatePaymentMethodGiropayData, 'type'>;
714
+ payment_method?: string | Omit<CreatePaymentMethodGiropayData, 'type'>;
686
715
 
687
- /**
688
- * The url your customer will be directed to after they complete authentication.
689
- *
690
- * @recommended
691
- */
692
- return_url?: string;
693
- }
716
+ /**
717
+ * The url your customer will be directed to after they complete authentication.
718
+ *
719
+ * @recommended
720
+ */
721
+ return_url?: string;
722
+ }
694
723
 
724
+ /**
725
+ * An options object to control the behavior of `stripe.confirmGiropayPayment`.
726
+ */
727
+ export interface ConfirmGiropayPaymentOptions {
695
728
  /**
696
- * An options object to control the behavior of `stripe.confirmGiropayPayment`.
729
+ * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/giropay#handle-redirect).
730
+ * Default is `true`.
697
731
  */
698
- interface ConfirmGiropayPaymentOptions {
699
- /**
700
- * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/giropay#handle-redirect).
701
- * Default is `true`.
702
- */
703
- handleActions?: boolean;
704
- }
732
+ handleActions?: boolean;
733
+ }
705
734
 
735
+ /**
736
+ * Data to be sent with a `stripe.confirmGrabPayPayment` request.
737
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
738
+ */
739
+ export interface ConfirmGrabPayPaymentData extends PaymentIntentConfirmParams {
706
740
  /**
707
- * Data to be sent with a `stripe.confirmGrabPayPayment` request.
708
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
741
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
742
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
743
+ *
744
+ * @recommended
709
745
  */
710
- interface ConfirmGrabPayPaymentData extends PaymentIntentConfirmParams {
711
- /**
712
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
713
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
714
- *
715
- * @recommended
716
- */
717
- payment_method?: string | Omit<CreatePaymentMethodGrabPayData, 'type'>;
746
+ payment_method?: string | Omit<CreatePaymentMethodGrabPayData, 'type'>;
718
747
 
719
- /**
720
- * The url your customer will be directed to after they complete authentication.
721
- *
722
- * @recommended
723
- */
724
- return_url?: string;
725
- }
748
+ /**
749
+ * The url your customer will be directed to after they complete authentication.
750
+ *
751
+ * @recommended
752
+ */
753
+ return_url?: string;
754
+ }
726
755
 
756
+ /**
757
+ * An options object to control the behavior of `stripe.confirmGrabPayPayment`.
758
+ */
759
+ export interface ConfirmGrabPayPaymentOptions {
727
760
  /**
728
- * An options object to control the behavior of `stripe.confirmGrabPayPayment`.
761
+ * Set this to `false` if you want to handle next actions yourself. Please refer to our [Stripe GrabPay integration guide](https://stripe.com/docs/payments/grabpay/accept-a-payment)
762
+ * for more info. Default is `true`.
729
763
  */
730
- interface ConfirmGrabPayPaymentOptions {
731
- /**
732
- * Set this to `false` if you want to handle next actions yourself. Please refer to our [Stripe GrabPay integration guide](https://stripe.com/docs/payments/grabpay/accept-a-payment)
733
- * for more info. Default is `true`.
734
- */
735
- handleActions?: boolean;
736
- }
764
+ handleActions?: boolean;
765
+ }
737
766
 
767
+ /**
768
+ * Data to be sent with a `stripe.confirmIdealPayment` request.
769
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
770
+ */
771
+ export interface ConfirmIdealPaymentData extends PaymentIntentConfirmParams {
738
772
  /**
739
- * Data to be sent with a `stripe.confirmIdealPayment` request.
740
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
773
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
774
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
775
+ *
776
+ * @recommended
741
777
  */
742
- interface ConfirmIdealPaymentData extends PaymentIntentConfirmParams {
743
- /**
744
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
745
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
746
- *
747
- * @recommended
748
- */
749
- payment_method?: string | Omit<CreatePaymentMethodIdealData, 'type'>;
778
+ payment_method?: string | Omit<CreatePaymentMethodIdealData, 'type'>;
750
779
 
751
- /**
752
- * The url your customer will be directed to after they complete authentication.
753
- *
754
- * @recommended
755
- */
756
- return_url?: string;
757
- }
780
+ /**
781
+ * The url your customer will be directed to after they complete authentication.
782
+ *
783
+ * @recommended
784
+ */
785
+ return_url?: string;
786
+ }
758
787
 
788
+ /**
789
+ * An options object to control the behavior of `stripe.confirmIdealPayment`.
790
+ */
791
+ export interface ConfirmIdealPaymentOptions {
759
792
  /**
760
- * An options object to control the behavior of `stripe.confirmIdealPayment`.
793
+ * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/ideal#handle-redirect).
794
+ * Default is `true`.
761
795
  */
762
- interface ConfirmIdealPaymentOptions {
763
- /**
764
- * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/ideal#handle-redirect).
765
- * Default is `true`.
766
- */
767
- handleActions?: boolean;
768
- }
796
+ handleActions?: boolean;
797
+ }
769
798
 
799
+ /**
800
+ * Data to be sent with a `stripe.confirmKlarnaPayment` request.
801
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
802
+ */
803
+ export interface ConfirmKlarnaPaymentData extends PaymentIntentConfirmParams {
770
804
  /**
771
- * Data to be sent with a `stripe.confirmKlarnaPayment` request.
772
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
805
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
806
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
807
+ *
808
+ * @recommended
773
809
  */
774
- interface ConfirmKlarnaPaymentData extends PaymentIntentConfirmParams {
775
- /**
776
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
777
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
778
- *
779
- * @recommended
780
- */
781
- payment_method?: string | Omit<CreatePaymentMethodKlarnaData, 'type'>;
810
+ payment_method?: string | Omit<CreatePaymentMethodKlarnaData, 'type'>;
782
811
 
783
- /**
784
- * The url your customer will be directed to after they complete authentication.
785
- *
786
- * @recommended
787
- */
788
- return_url?: string;
789
- }
812
+ /**
813
+ * The url your customer will be directed to after they complete authentication.
814
+ *
815
+ * @recommended
816
+ */
817
+ return_url?: string;
818
+ }
790
819
 
820
+ /**
821
+ * An options object to control the behavior of `stripe.confirmKlarnaPayment`.
822
+ */
823
+ export interface ConfirmKlarnaPaymentOptions {
791
824
  /**
792
- * An options object to control the behavior of `stripe.confirmKlarnaPayment`.
825
+ * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/klarna#handle-redirect).
826
+ * Default is `true`.
793
827
  */
794
- interface ConfirmKlarnaPaymentOptions {
795
- /**
796
- * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/klarna#handle-redirect).
797
- * Default is `true`.
798
- */
799
- handleActions?: boolean;
800
- }
828
+ handleActions?: boolean;
829
+ }
801
830
 
831
+ /**
832
+ * Data to be sent with a `stripe.confirmOxxoPayment` request.
833
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
834
+ */
835
+ export interface ConfirmOxxoPaymentData extends PaymentIntentConfirmParams {
802
836
  /**
803
- * Data to be sent with a `stripe.confirmOxxoPayment` request.
804
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
837
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
838
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
839
+ *
840
+ * @recommended
805
841
  */
806
- interface ConfirmOxxoPaymentData extends PaymentIntentConfirmParams {
807
- /**
808
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
809
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
810
- *
811
- * @recommended
812
- */
813
- payment_method?: string | Omit<CreatePaymentMethodOxxoData, 'type'>;
814
- }
842
+ payment_method?: string | Omit<CreatePaymentMethodOxxoData, 'type'>;
843
+ }
815
844
 
845
+ /**
846
+ * An options object to control the behavior of `stripe.confirmOxxoPayment`.
847
+ */
848
+ export interface ConfirmOxxoPaymentOptions {
816
849
  /**
817
- * An options object to control the behavior of `stripe.confirmOxxoPayment`.
850
+ * Set this to `false` if you want to handle next actions yourself. Please refer to our [Stripe OXXO integration guide](https://stripe.com/docs/payments/oxxo) for more info. Default is `true`.
818
851
  */
819
- interface ConfirmOxxoPaymentOptions {
820
- /**
821
- * Set this to `false` if you want to handle next actions yourself. Please refer to our [Stripe OXXO integration guide](https://stripe.com/docs/payments/oxxo) for more info. Default is `true`.
822
- */
823
- handleActions?: boolean;
824
- }
852
+ handleActions?: boolean;
853
+ }
825
854
 
855
+ /**
856
+ * Data to be sent with a `stripe.confirmP24Payment` request.
857
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
858
+ */
859
+ export interface ConfirmP24PaymentData extends PaymentIntentConfirmParams {
826
860
  /**
827
- * Data to be sent with a `stripe.confirmP24Payment` request.
828
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
861
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
862
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
863
+ *
864
+ * @recommended
829
865
  */
830
- interface ConfirmP24PaymentData extends PaymentIntentConfirmParams {
866
+ payment_method?: string | Omit<CreatePaymentMethodP24Data, 'type'>;
867
+
868
+ payment_method_options?: {
831
869
  /**
832
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
833
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
834
- *
835
- * @recommended
870
+ * Configuration for this Przelewy24 payment.
836
871
  */
837
- payment_method?: string | Omit<CreatePaymentMethodP24Data, 'type'>;
838
-
839
- payment_method_options?: {
872
+ p24: {
840
873
  /**
841
- * Configuration for this Przelewy24 payment.
874
+ * Specify that payer has agreed to the Przelewy24 Terms of Service
842
875
  */
843
- p24: {
844
- /**
845
- * Specify that payer has agreed to the Przelewy24 Terms of Service
846
- */
847
- tos_shown_and_accepted?: boolean;
848
- };
876
+ tos_shown_and_accepted?: boolean;
849
877
  };
878
+ };
850
879
 
851
- /**
852
- * The url your customer will be directed to after they complete authentication.
853
- *
854
- * @recommended
855
- */
856
- return_url?: string;
857
- }
880
+ /**
881
+ * The url your customer will be directed to after they complete authentication.
882
+ *
883
+ * @recommended
884
+ */
885
+ return_url?: string;
886
+ }
858
887
 
888
+ /**
889
+ * Data to be sent with a `stripe.confirmPayNowPayment` request.
890
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
891
+ */
892
+ export interface ConfirmPayNowPaymentData extends PaymentIntentConfirmParams {
859
893
  /**
860
- * Data to be sent with a `stripe.confirmPayNowPayment` request.
861
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
894
+ * The `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods).
895
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent` or a new `PaymentMethod` will be created.
896
+ *
897
+ * @recommended
862
898
  */
863
- interface ConfirmPayNowPaymentData extends PaymentIntentConfirmParams {
864
- /**
865
- * The `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods).
866
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent` or a new `PaymentMethod` will be created.
867
- *
868
- * @recommended
869
- */
870
- payment_method?: string | Omit<CreatePaymentMethodPayNowData, 'type'>;
871
- }
899
+ payment_method?: string | Omit<CreatePaymentMethodPayNowData, 'type'>;
900
+ }
872
901
 
902
+ /**
903
+ * An options object to control the behavior of `stripe.confirmPayNowPayment`.
904
+ */
905
+ export interface ConfirmPayNowPaymentOptions {
873
906
  /**
874
- * An options object to control the behavior of `stripe.confirmPayNowPayment`.
907
+ * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/p24#handle-redirect).
908
+ * Default is `true`.
875
909
  */
876
- interface ConfirmPayNowPaymentOptions {
877
- /**
878
- * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/p24#handle-redirect).
879
- * Default is `true`.
880
- */
881
- handleActions?: boolean;
882
- }
910
+ handleActions?: boolean;
911
+ }
883
912
 
913
+ /**
914
+ * Data to be sent with a `stripe.confirmPayPalPayment` request.
915
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
916
+ */
917
+ export interface ConfirmPayPalPaymentData extends PaymentIntentConfirmParams {
884
918
  /**
885
- * Data to be sent with a `stripe.confirmPayPalPayment` request.
886
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
919
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
920
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
921
+ *
922
+ * @recommended
887
923
  */
888
- interface ConfirmPayPalPaymentData extends PaymentIntentConfirmParams {
889
- /**
890
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
891
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
892
- *
893
- * @recommended
894
- */
895
- payment_method?: string | Omit<CreatePaymentMethodPayPalData, 'type'>;
924
+ payment_method?: string | Omit<CreatePaymentMethodPayPalData, 'type'>;
896
925
 
897
- /**
898
- * The required url your customer will be directed to after they complete authentication.
899
- */
900
- return_url: string;
901
- }
926
+ /**
927
+ * The required url your customer will be directed to after they complete authentication.
928
+ */
929
+ return_url: string;
930
+ }
902
931
 
932
+ /**
933
+ * An options object to control the behavior of `stripe.confirmP24Payment`.
934
+ */
935
+ export interface ConfirmP24PaymentOptions {
903
936
  /**
904
- * An options object to control the behavior of `stripe.confirmP24Payment`.
937
+ * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/p24#handle-redirect).
938
+ * Default is `true`.
905
939
  */
906
- interface ConfirmP24PaymentOptions {
907
- /**
908
- * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/p24#handle-redirect).
909
- * Default is `true`.
910
- */
911
- handleActions?: boolean;
912
- }
940
+ handleActions?: boolean;
941
+ }
913
942
 
943
+ /**
944
+ * Data to be sent with a `stripe.confirmPayNowPayment` request.
945
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
946
+ */
947
+ export interface ConfirmPromptPayPaymentData
948
+ extends PaymentIntentConfirmParams {
914
949
  /**
915
- * Data to be sent with a `stripe.confirmPayNowPayment` request.
916
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
950
+ * The `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods).
951
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent` or a new `PaymentMethod` will be created.
952
+ *
953
+ * @recommended
917
954
  */
918
- interface ConfirmPromptPayPaymentData extends PaymentIntentConfirmParams {
919
- /**
920
- * The `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods).
921
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent` or a new `PaymentMethod` will be created.
922
- *
923
- * @recommended
924
- */
925
- payment_method?: string | Omit<CreatePaymentMethodPromptPayData, 'type'>;
926
- }
955
+ payment_method?: string | Omit<CreatePaymentMethodPromptPayData, 'type'>;
956
+ }
927
957
 
958
+ /**
959
+ * An options object to control the behavior of `stripe.confirmPayNowPayment`.
960
+ */
961
+ export interface ConfirmPromptPayPaymentOptions {
928
962
  /**
929
- * An options object to control the behavior of `stripe.confirmPayNowPayment`.
963
+ * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/p24#handle-redirect).
964
+ * Default is `true`.
930
965
  */
931
- interface ConfirmPromptPayPaymentOptions {
932
- /**
933
- * Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/p24#handle-redirect).
934
- * Default is `true`.
935
- */
936
- handleActions?: boolean;
937
- }
966
+ handleActions?: boolean;
967
+ }
938
968
 
969
+ /**
970
+ * Data to be sent with a `stripe.confirmSofortPayment` request.
971
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
972
+ */
973
+ export interface ConfirmSofortPaymentData extends PaymentIntentConfirmParams {
939
974
  /**
940
- * Data to be sent with a `stripe.confirmSofortPayment` request.
941
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
975
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
976
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
977
+ *
978
+ * @recommended
942
979
  */
943
- interface ConfirmSofortPaymentData extends PaymentIntentConfirmParams {
944
- /**
945
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
946
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
947
- *
948
- * @recommended
949
- */
950
- payment_method?: string | Omit<CreatePaymentMethodSofortData, 'type'>;
980
+ payment_method?: string | Omit<CreatePaymentMethodSofortData, 'type'>;
951
981
 
952
- /**
953
- * The url your customer will be directed to after they complete authentication.
954
- *
955
- * @recommended
956
- */
957
- return_url?: string;
982
+ /**
983
+ * The url your customer will be directed to after they complete authentication.
984
+ *
985
+ * @recommended
986
+ */
987
+ return_url?: string;
958
988
 
959
- /**
960
- * To set up a SEPA Direct Debit payment method using the bank details from this SOFORT payment, set this parameter to `off_session`.
961
- * When using this parameter, a `customer` will need to be set on the [PaymentIntent](https://stripe.com/docs/api/payment_intents).
962
- * The newly created SEPA Direct Debit [PaymentMethod](https://stripe.com/docs/api/payment_methods) will be attached to this customer.
963
- */
964
- setup_future_usage?: 'off_session';
965
- }
989
+ /**
990
+ * To set up a SEPA Direct Debit payment method using the bank details from this SOFORT payment, set this parameter to `off_session`.
991
+ * When using this parameter, a `customer` will need to be set on the [PaymentIntent](https://stripe.com/docs/api/payment_intents).
992
+ * The newly created SEPA Direct Debit [PaymentMethod](https://stripe.com/docs/api/payment_methods) will be attached to this customer.
993
+ */
994
+ setup_future_usage?: 'off_session';
995
+ }
966
996
 
997
+ /**
998
+ * Data to be sent with a `stripe.confirmWechatPayPayment` request.
999
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
1000
+ */
1001
+ export interface ConfirmWechatPayPaymentData
1002
+ extends PaymentIntentConfirmParams {
967
1003
  /**
968
- * Data to be sent with a `stripe.confirmWechatPayPayment` request.
969
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
1004
+ * The `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods).
1005
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent` or a new `PaymentMethod` will be created.
1006
+ *
1007
+ * @recommended
970
1008
  */
971
- interface ConfirmWechatPayPaymentData extends PaymentIntentConfirmParams {
972
- /**
973
- * The `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods).
974
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent` or a new `PaymentMethod` will be created.
975
- *
976
- * @recommended
977
- */
978
- payment_method?: string | Omit<CreatePaymentMethodWechatPayData, 'type'>;
1009
+ payment_method?: string | Omit<CreatePaymentMethodWechatPayData, 'type'>;
979
1010
 
1011
+ /**
1012
+ * An object containing payment-method-specific configuration to confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with.
1013
+ */
1014
+ payment_method_options?: {
980
1015
  /**
981
- * An object containing payment-method-specific configuration to confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with.
1016
+ * Configuration for this wechat payment.
982
1017
  */
983
- payment_method_options?: {
984
- /**
985
- * Configuration for this wechat payment.
986
- */
987
- wechat_pay: {
988
- client?: 'web';
989
- };
1018
+ wechat_pay: {
1019
+ client?: 'web';
990
1020
  };
991
- }
1021
+ };
1022
+ }
992
1023
 
1024
+ /**
1025
+ * An options object to control the behavior of `stripe.confirmWechatPayPayment`.
1026
+ */
1027
+ export interface ConfirmWechatPayPaymentOptions {
993
1028
  /**
994
- * An options object to control the behavior of `stripe.confirmWechatPayPayment`.
1029
+ * This must be set to false, and you are responsible for handling the next_action after confirming the PaymentIntent.
995
1030
  */
996
- interface ConfirmWechatPayPaymentOptions {
997
- /**
998
- * This must be set to false, and you are responsible for handling the next_action after confirming the PaymentIntent.
999
- */
1000
- handleActions: boolean;
1001
- }
1031
+ handleActions: boolean;
1032
+ }
1002
1033
 
1034
+ /**
1035
+ * Data to be sent with a `stripe.confirmAuBecsDebitPayment` request.
1036
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
1037
+ */
1038
+ export interface ConfirmAuBecsDebitPaymentData
1039
+ extends PaymentIntentConfirmParams {
1003
1040
  /**
1004
- * Data to be sent with a `stripe.confirmAuBecsDebitPayment` request.
1005
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
1041
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
1042
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
1043
+ *
1044
+ * @recommended
1006
1045
  */
1007
- interface ConfirmAuBecsDebitPaymentData extends PaymentIntentConfirmParams {
1008
- /**
1009
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
1010
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
1011
- *
1012
- * @recommended
1013
- */
1014
- payment_method?: string | Omit<CreatePaymentMethodAuBecsDebitData, 'type'>;
1046
+ payment_method?: string | Omit<CreatePaymentMethodAuBecsDebitData, 'type'>;
1015
1047
 
1016
- /**
1017
- * To save the BECS Direct Debit account for reuse, set this parameter to `off_session`.
1018
- * BECS Direct Debit only accepts an `off_session` value for this parameter.
1019
- */
1020
- setup_future_usage?: 'off_session';
1021
- }
1048
+ /**
1049
+ * To save the BECS Direct Debit account for reuse, set this parameter to `off_session`.
1050
+ * BECS Direct Debit only accepts an `off_session` value for this parameter.
1051
+ */
1052
+ setup_future_usage?: 'off_session';
1053
+ }
1022
1054
 
1055
+ /**
1056
+ * Data to be sent with a `stripe.confirmAffirmPayment` request.
1057
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
1058
+ */
1059
+ export interface ConfirmAffirmPaymentData extends PaymentIntentConfirmParams {
1023
1060
  /**
1024
- * Data to be sent with a `stripe.confirmAffirmPayment` request.
1025
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
1061
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
1062
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
1063
+ *
1064
+ * @recommended
1026
1065
  */
1027
- interface ConfirmAffirmPaymentData extends PaymentIntentConfirmParams {
1028
- /**
1029
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
1030
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
1031
- *
1032
- * @recommended
1033
- */
1034
- payment_method?: string | Omit<CreatePaymentMethodAffirmData, 'type'>;
1066
+ payment_method?: string | Omit<CreatePaymentMethodAffirmData, 'type'>;
1035
1067
 
1036
- /**
1037
- * The url your customer will be directed to after they complete authentication.
1038
- */
1039
- return_url?: string;
1040
- }
1068
+ /**
1069
+ * The url your customer will be directed to after they complete authentication.
1070
+ */
1071
+ return_url?: string;
1072
+ }
1041
1073
 
1074
+ /**
1075
+ * An options object to control the behavior of `stripe.confirmAffirmPayment`.
1076
+ */
1077
+ export interface ConfirmAffirmPaymentOptions {
1042
1078
  /**
1043
- * An options object to control the behavior of `stripe.confirmAffirmPayment`.
1079
+ * Set this to `false` if you want to handle next actions yourself. Please refer to our [Stripe Affirm integration guide](https://stripe.com/docs/payments/affirm/accept-a-payment)
1080
+ * for more info. Default is `true`.
1044
1081
  */
1045
- interface ConfirmAffirmPaymentOptions {
1046
- /**
1047
- * Set this to `false` if you want to handle next actions yourself. Please refer to our [Stripe Affirm integration guide](https://stripe.com/docs/payments/affirm/accept-a-payment)
1048
- * for more info. Default is `true`.
1049
- */
1050
- handleActions?: boolean;
1051
- }
1082
+ handleActions?: boolean;
1083
+ }
1052
1084
 
1085
+ /**
1086
+ * Data to be sent with a `stripe.confirmAfterpayClearpayPayment` request.
1087
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
1088
+ */
1089
+ export interface ConfirmAfterpayClearpayPaymentData
1090
+ extends PaymentIntentConfirmParams {
1053
1091
  /**
1054
- * Data to be sent with a `stripe.confirmAfterpayClearpayPayment` request.
1055
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
1092
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
1093
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
1094
+ *
1095
+ * @recommended
1056
1096
  */
1057
- interface ConfirmAfterpayClearpayPaymentData
1058
- extends PaymentIntentConfirmParams {
1059
- /**
1060
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
1061
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
1062
- *
1063
- * @recommended
1064
- */
1065
- payment_method?:
1066
- | string
1067
- | Omit<CreatePaymentMethodAfterpayClearpayData, 'type'>;
1097
+ payment_method?:
1098
+ | string
1099
+ | Omit<CreatePaymentMethodAfterpayClearpayData, 'type'>;
1068
1100
 
1069
- /**
1070
- * The url your customer will be directed to after they complete authentication.
1071
- */
1072
- return_url?: string;
1073
- }
1101
+ /**
1102
+ * The url your customer will be directed to after they complete authentication.
1103
+ */
1104
+ return_url?: string;
1105
+ }
1074
1106
 
1107
+ /**
1108
+ * An options object to control the behavior of `stripe.confirmAfterpayClearpayPayment`.
1109
+ */
1110
+ export interface ConfirmAfterpayClearpayPaymentOptions {
1075
1111
  /**
1076
- * An options object to control the behavior of `stripe.confirmAfterpayClearpayPayment`.
1112
+ * Set this to `false` if you want to handle next actions yourself. Please refer to our [Stripe Afterpay / Clearpay integration guide](https://stripe.com/docs/payments/afterpay-clearpay/accept-a-payment#handle-redirect)
1113
+ * for more info. Default is `true`.
1077
1114
  */
1078
- interface ConfirmAfterpayClearpayPaymentOptions {
1079
- /**
1080
- * Set this to `false` if you want to handle next actions yourself. Please refer to our [Stripe Afterpay / Clearpay integration guide](https://stripe.com/docs/payments/afterpay-clearpay/accept-a-payment#handle-redirect)
1081
- * for more info. Default is `true`.
1082
- */
1083
- handleActions?: boolean;
1084
- }
1115
+ handleActions?: boolean;
1116
+ }
1085
1117
 
1118
+ /**
1119
+ * Data to be sent with a `stripe.confirmAcssDebitPayment` request.
1120
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
1121
+ */
1122
+ export interface ConfirmAcssDebitPaymentData
1123
+ extends PaymentIntentConfirmParams {
1086
1124
  /**
1087
- * Data to be sent with a `stripe.confirmAcssDebitPayment` request.
1088
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
1125
+ * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
1126
+ * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
1127
+ *
1128
+ * @recommended
1089
1129
  */
1090
- interface ConfirmAcssDebitPaymentData extends PaymentIntentConfirmParams {
1091
- /**
1092
- * Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
1093
- * This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
1094
- *
1095
- * @recommended
1096
- */
1097
- payment_method?: string | Omit<CreatePaymentMethodAcssDebitData, 'type'>;
1098
- }
1130
+ payment_method?: string | Omit<CreatePaymentMethodAcssDebitData, 'type'>;
1131
+ }
1099
1132
 
1133
+ /**
1134
+ * An options object to control the behavior of `stripe.confirmAcssDebitPayment`.
1135
+ */
1136
+ export interface ConfirmAcssDebitPaymentOptions {
1100
1137
  /**
1101
- * An options object to control the behavior of `stripe.confirmAcssDebitPayment`.
1138
+ * Set `skipMandate` to `true` if you want to skip displaying the mandate confirmation screen.
1102
1139
  */
1103
- interface ConfirmAcssDebitPaymentOptions {
1104
- /**
1105
- * Set `skipMandate` to `true` if you want to skip displaying the mandate confirmation screen.
1106
- */
1107
- skipMandate?: boolean;
1108
- }
1140
+ skipMandate?: boolean;
1141
+ }
1109
1142
 
1143
+ /**
1144
+ * Data to be sent with a `stripe.confirmPayment` request.
1145
+ * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
1146
+ */
1147
+ export interface ConfirmPaymentData extends PaymentIntentConfirmParams {
1110
1148
  /**
1111
- * Data to be sent with a `stripe.confirmPayment` request.
1112
- * Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
1149
+ * The url your customer will be directed to after they complete payment.
1113
1150
  */
1114
- interface ConfirmPaymentData extends PaymentIntentConfirmParams {
1115
- /**
1116
- * The url your customer will be directed to after they complete payment.
1117
- */
1118
- return_url: string;
1151
+ return_url: string;
1119
1152
 
1153
+ /**
1154
+ * An object to attach additional billing_details to the PaymentMethod created via Elements.
1155
+ *
1156
+ * @docs https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_data
1157
+ */
1158
+ payment_method_data?: {
1120
1159
  /**
1121
- * An object to attach additional billing_details to the PaymentMethod created via Elements.
1160
+ * The customer's billing details. Details collected by Elements will override values passed here.
1161
+ * Billing fields that are omitted in the Payment Element via the `fields` option required.
1122
1162
  *
1123
- * @docs https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_data
1163
+ * @docs https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_data-billing_details
1124
1164
  */
1125
- payment_method_data?: {
1126
- /**
1127
- * The customer's billing details. Details collected by Elements will override values passed here.
1128
- * Billing fields that are omitted in the Payment Element via the `fields` option required.
1129
- *
1130
- * @docs https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_data-billing_details
1131
- */
1132
- billing_details?: PaymentMethodCreateParams.BillingDetails;
1133
- };
1134
- }
1165
+ billing_details?: PaymentMethodCreateParams.BillingDetails;
1166
+ };
1167
+ }
1135
1168
 
1169
+ /**
1170
+ * Data to be sent with a `stripe.verifyMicrodepositsForPayment` request.
1171
+ */
1172
+ export interface VerifyMicrodepositsForPaymentData {
1136
1173
  /**
1137
- * Data to be sent with a `stripe.verifyMicrodepositsForPayment` request.
1174
+ * An array of two positive integers, in cents, equal to the values of the microdeposits sent to the bank account.
1138
1175
  */
1139
- interface VerifyMicrodepositsForPaymentData {
1140
- /**
1141
- * An array of two positive integers, in cents, equal to the values of the microdeposits sent to the bank account.
1142
- */
1143
- amounts?: Array<number>;
1144
- }
1176
+ amounts?: Array<number>;
1145
1177
  }