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