-
Notifications
You must be signed in to change notification settings - Fork 159
/
stripe.d.ts
1543 lines (1396 loc) · 81.5 KB
/
stripe.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import * as api from '../api';
import * as paymentIntents from './payment-intents';
import * as setupIntents from './setup-intents';
import * as confirmationTokens from './confirmation-tokens';
import * as orders from './orders';
import * as tokens from './token-and-sources';
import * as elements from './elements';
import * as financialConnections from './financial-connections';
import * as ephemeralKeys from './ephemeral-keys';
import {
StripeElements,
StripeElementsOptionsClientSecret,
StripeElementsOptionsMode,
} from './elements-group';
import {CheckoutLocale, RedirectToCheckoutOptions} from './checkout';
import {PaymentRequestOptions, PaymentRequest} from './payment-request';
import {StripeElement, StripeElementLocale} from './elements-group';
import {
StripeCustomCheckoutOptions,
StripeCustomCheckout,
} from './custom-checkout';
import {
StripeEmbeddedCheckoutOptions,
StripeEmbeddedCheckout,
} from './embedded-checkout';
export interface Stripe {
/////////////////////////////
/// Elements
///
/// https://stripe.com/docs/js/elements_object
/////////////////////////////
/**
* Create an `Elements` instance, which manages a group of elements.
*
* https://stripe.com/docs/js/elements_object/create
*/
elements(options?: StripeElementsOptionsClientSecret): StripeElements;
/**
* Create an `Elements` instance, which manages a group of elements.
*
* https://stripe.com/docs/js/elements_object/create_without_intent
*/
elements(options?: StripeElementsOptionsMode): StripeElements;
/////////////////////////////
/// Checkout
///
/// https://stripe.com/docs/js/checkout
/////////////////////////////
/**
* Use `stripe.redirectToCheckout` to redirect your customers to [Checkout](https://stripe.com/docs/payments/checkout), a Stripe-hosted page to securely collect payment information.
* When the customer completes their purchase, they are redirected back to your website.
*/
redirectToCheckout(
options: RedirectToCheckoutOptions
): Promise<never | {error: StripeError}>;
/////////////////////////////
/// Payment Intents
///
/// https://stripe.com/docs/js/payment_intents
/////////////////////////////
/**
* Use `stripe.confirmPayment` to confirm a PaymentIntent using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
* When called, `stripe.confirmPayment` will attempt to complete any [required actions](https://stripe.com/docs/payments/intents), such as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page.
* Your user will be redirected to the return_url you pass once the confirmation is complete.
*
* By default, `stripe.confirmPayment` will always redirect to your return_url after a successful confirmation.
* If you set `redirect: "if_required"`, then `stripe.confirmPayment` will only redirect if your user chooses a redirect-based payment method.
* Setting `if_required` requires that you handle successful confirmations for redirect-based and non-redirect based payment methods separately.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_payment
*/
confirmPayment(options: {
elements: StripeElements;
confirmParams?: Partial<paymentIntents.ConfirmPaymentData>;
redirect: 'if_required';
}): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmPayment` to confirm a PaymentIntent using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
* When called, `stripe.confirmPayment` will attempt to complete any [required actions](https://stripe.com/docs/payments/intents), such as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page.
* Your user will be redirected to the return_url you pass once the confirmation is complete.
*
* By default, `stripe.confirmPayment` will always redirect to your return_url after a successful confirmation.
* If you set `redirect: "if_required"`, then `stripe.confirmPayment` will only redirect if your user chooses a redirect-based payment method.
* Setting `if_required` requires that you handle successful confirmations for redirect-based and non-redirect based payment methods separately.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_payment
*/
confirmPayment(options: {
elements?: StripeElements;
clientSecret: string;
confirmParams?: Partial<paymentIntents.ConfirmPaymentData>;
redirect: 'if_required';
}): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmPayment` to confirm a PaymentIntent using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
* When called, `stripe.confirmPayment` will attempt to complete any [required actions](https://stripe.com/docs/payments/intents), such as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page.
* Your user will be redirected to the return_url you pass once the confirmation is complete.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_payment
*/
confirmPayment(options: {
elements: StripeElements;
confirmParams: paymentIntents.ConfirmPaymentData;
redirect?: 'always';
}): Promise<never | {error: StripeError}>;
/**
* Use `stripe.confirmPayment` to confirm a PaymentIntent using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
* When called, `stripe.confirmPayment` will attempt to complete any [required actions](https://stripe.com/docs/payments/intents), such as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page.
* Your user will be redirected to the return_url you pass once the confirmation is complete.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_payment
*/
confirmPayment(options: {
elements?: StripeElements;
clientSecret: string;
confirmParams: paymentIntents.ConfirmPaymentData;
redirect?: 'always';
}): Promise<never | {error: StripeError}>;
/**
* Use `stripe.confirmAcssDebitPayment` in the [Accept a Canadian pre-authorized debit payment](https://stripe.com/docs/payments/acss-debit/accept-a-payment) flow when the customer submits your payment form.
* When called, it will automatically pop up a modal to collect bank account details and verification, accept the mandate, and confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) when the user submits the form.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* `stripe.confirmAcssDebitPayment` automatically creates a new `PaymentMethod` for you when your customer completes the modal UI.
* It can also be called with an existing `PaymentMethod` which will load the modal UI to collect a new mandate agreement.
* If you have already attached a `PaymentMethod`, you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_acss_debit_payment
*/
confirmAcssDebitPayment(
clientSecret: string,
data?: paymentIntents.ConfirmAcssDebitPaymentData,
options?: paymentIntents.ConfirmAcssDebitPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmUsBankAccountPayment` in the [Accept a payment](https://stripe.com/docs/payments/ach-debit/accept-a-payment) flow for the [ACH Direct Debit]((https://stripe.com/docs/payments/ach-debit) payment method to record the customer’s authorization for payment.
*
* When you confirm a [PaymentIntent](https://stripe.com/docs/api/payment_intents), it needs to have an attached PaymentMethod.
* Use `stripe.collectBankAccountForPayment` to collect and attach a [PaymentMethod](https://stripe.com/docs/api/payment_methods), or provide bank account details using the `data` parameter if a `PaymentMethod` was not already provided.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_us_bank_account_payment
*/
confirmUsBankAccountPayment(
clientSecret: string,
data?: paymentIntents.ConfirmUsBankAccountPaymentData
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmAlipayPayment` in the [Alipay Payments](https://stripe.com/docs/payments/alipay) with Payment Methods flow when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_alipay_payment
*/
confirmAlipayPayment(
clientSecret: string,
data?: paymentIntents.ConfirmAlipayPaymentData,
options?: paymentIntents.ConfirmAlipayPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*
* Use `stripe.confirmAuBecsDebitPayment` in the [BECS Direct Debit Payments](https://stripe.com/docs/payments/payment-methods/au-becs-debit) with Payment Methods flow when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
* Note that there are some additional requirements to this flow that are not covered in this reference.
* Refer to our [integration guide](https://stripe.com/docs/payments/payment-methods/au-becs-debit-quickstart-payment-intents) for more details.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_au_becs_debit_payment
*/
confirmAuBecsDebitPayment(
clientSecret: string,
data?: paymentIntents.ConfirmAuBecsDebitPaymentData
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmBancontactPayment` in the [Bancontact Payments with Payment Methods](https://stripe.com/docs/payments/bancontact#web) flow when the customer submits your payment form.
* When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_bancontact_payment
*/
confirmBancontactPayment(
clientSecret: string,
data?: paymentIntents.ConfirmBancontactPaymentData,
options?: paymentIntents.ConfirmBancontactPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmBlikPayment` in the [BLIK Payments with Payment Methods](https://stripe.com/docs/payments/blik) flow when the customer submits your payment form.
* When called, it will confirm the PaymentIntent with data you provide, and it will automatically prompt the customer to authorize the transaction.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_blik_payment
*/
confirmBlikPayment(
clientSecret: string,
data: paymentIntents.ConfirmBlikPaymentData,
options?: paymentIntents.ConfirmBlikPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmBoletoPayment` in the [Boleto Payment](https://stripe.com/docs/payments/boleto) with Payment Methods flow when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
* Note that there are some additional requirements to this flow that are not covered in this reference.
* Refer to our [integration guide](https://stripe.com/docs/payments/boleto) for more details.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_boleto_payment
*/
confirmBoletoPayment(
clientSecret: string,
data?: paymentIntents.ConfirmBoletoPaymentData,
options?: paymentIntents.ConfirmBoletoPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmCardPayment` when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide and carry out 3DS or other next actions if they are required.
*
* If you are using [Dynamic 3D Secure](https://stripe.com/docs/payments/3d-secure#three-ds-radar), `stripe.confirmCardPayment` will trigger your Radar rules to execute and may open a dialog for your customer to authenticate their payment.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* It can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_card_payment
*/
confirmCardPayment(
clientSecret: string,
data?: paymentIntents.ConfirmCardPaymentData,
options?: paymentIntents.ConfirmCardPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmCashappPayment` in the [Cash App Payments](https://stripe.com/docs/payments/cash-app-pay) with Payment Methods flow when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
* Refer to our [integration guide](https://stripe.com/docs/payments/cash-app-pay) for more details.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_cashapp_payment
*/
confirmCashappPayment(
clientSecret: string,
data?: paymentIntents.ConfirmCashappPaymentData,
options?: paymentIntents.ConfirmCashappPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*
* Use `stripe.confirmCustomerBalancePayment` when the customer submits your payment form.
*
* When called, it will confirm the PaymentIntent with data you provide.
* Refer to our [integration guide](https://stripe.com/docs/payments/bank-transfers) for more details.
*
* Since the Customer Balance payment method draws from a balance, the attempt will succeed or fail depending on the current balance amount. To collect more funds from the customer when the cash balance is insufficient, use the customer balance with bank transfer funding parameters.
* The confirmation attempt will finish in one of the following result states:
* 1. If the customer balance was enough to pay the amount, the status is succeeded. The funding_type data is effectively ignored.
* 2. If the balance was not enough to pay the amount, and you didn't send the funding_type, the status is requires_payment_method.
* 3. If the balance was not enough to pay the amount, and you did send the funding_type, the status is requires_action. The paymentIntent.next_action.display_bank_transfer_instructions hash contains bank transfer details for funding the Customer Balance.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_customer_balance_payment
*/
confirmCustomerBalancePayment(
clientSecret: string,
data: paymentIntents.ConfirmCustomerBalancePaymentData,
options: paymentIntents.ConfirmCustomerBalancePaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmEpsPayment` in the [EPS Payments with Payment Methods](https://stripe.com/docs/payments/eps#web) flow when the customer submits your payment form.
* When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_eps_payment
*/
confirmEpsPayment(
clientSecret: string,
data?: paymentIntents.ConfirmEpsPaymentData,
options?: paymentIntents.ConfirmEpsPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmFpxPayment` in the [FPX Payments with Payment Methods](https://stripe.com/docs/payments/fpx#web) flow when the customer submits your payment form.
* When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_fpx_payment
*/
confirmFpxPayment(
clientSecret: string,
data?: paymentIntents.ConfirmFpxPaymentData,
options?: paymentIntents.ConfirmFpxPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmGiropayPayment` in the [giropay Payments with Payment Methods](https://stripe.com/docs/payments/giropay#web) flow when the customer submits your payment form.
* When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_giropay_payment
*/
confirmGiropayPayment(
clientSecret: string,
data?: paymentIntents.ConfirmGiropayPaymentData,
options?: paymentIntents.ConfirmGiropayPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmGrabPayPayment` in the [GrabPay payments](https://stripe.com/docs/payments/grabpay) flow when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents).
* Refer to our [integration guide](https://stripe.com/docs/payments/grabpay/accept-a-payment) for more details.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_grabpay_payment
*/
confirmGrabPayPayment(
clientSecret: string,
data?: paymentIntents.ConfirmGrabPayPaymentData,
options?: paymentIntents.ConfirmGrabPayPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmIdealPayment` in the [iDEAL Payments with Payment Methods](https://stripe.com/docs/payments/ideal) flow when the customer submits your payment form.
* When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_ideal_payment
*/
confirmIdealPayment(
clientSecret: string,
data?: paymentIntents.ConfirmIdealPaymentData,
options?: paymentIntents.ConfirmIdealPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*
* Use `stripe.confirmKlarnaPayment` in the [Klarna Payments](https://stripe.com/docs/payments/klarna) with Payment Methods flow when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_klarna_payment
*/
confirmKlarnaPayment(
clientSecret: string,
data?: paymentIntents.ConfirmKlarnaPaymentData,
options?: paymentIntents.ConfirmKlarnaPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmKonbiniPayment` in the [Konbini](https://stripe.com/docs/payments/konbini) payment flow when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
* Note that there are some additional requirements to this flow that are not covered in this reference.
* Refer to our [integration guide](https://stripe.com/docs/payments/konbini/accept-a-payment) for more details.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_konbini_payment
*/
confirmKonbiniPayment(
clientSecret: string,
data?: paymentIntents.ConfirmKonbiniPaymentData,
options?: paymentIntents.ConfirmKonbiniPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmMobilepayPayment` in the [Mobilepay Payments](https://docs.stripe.com/payments/mobilepay) with Payment Methods flow when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
* Refer to our [integration guide](https://docs.stripe.com/payments/mobilepay) for more details.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_mobilepay_payment
*/
confirmMobilepayPayment(
clientSecret: string,
data?: paymentIntents.ConfirmMobilepayPaymentData,
options?: paymentIntents.ConfirmMobilepayPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmMultibancoPayment` in the [Multibanco Payment](https://stripe.com/docs/payments/multibanco) with Payment Methods flow when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
* Note that there are some additional requirements to this flow that are not covered in this reference.
* Refer to our [integration guide](https://stripe.com/docs/payments/multibanco) for more details.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_multibanco_payment
*/
confirmMultibancoPayment(
clientSecret: string,
data?: paymentIntents.ConfirmMultibancoPaymentData,
options?: paymentIntents.ConfirmMultibancoPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmOxxoPayment` in the [OXXO Payment](https://stripe.com/docs/payments/oxxo) with Payment Methods flow when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
* Note that there are some additional requirements to this flow that are not covered in this reference.
* Refer to our [integration guide](https://stripe.com/docs/payments/oxxo) for more details.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_oxxo_payment
*/
confirmOxxoPayment(
clientSecret: string,
data?: paymentIntents.ConfirmOxxoPaymentData,
options?: paymentIntents.ConfirmOxxoPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmP24Payment` in the [Przelewy24 Payments with Payment Methods](https://stripe.com/docs/payments/p24#web) flow when the customer submits your payment form.
* When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_p24_payment
*/
confirmP24Payment(
clientSecret: string,
data?: paymentIntents.ConfirmP24PaymentData,
options?: paymentIntents.ConfirmP24PaymentOptions
): Promise<PaymentIntentResult>;
/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*
* Use `stripe.confirmPayNowPayment` in the [PayNow Payments](https://stripe.com/docs/payments/paynow) with Payment Methods flow when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
* Refer to our [integration guide](https://stripe.com/docs/payments/paynow) for more details.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*/
confirmPayNowPayment(
clientSecret: string,
data?: paymentIntents.ConfirmPayNowPaymentData,
options?: paymentIntents.ConfirmPayNowPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*
* Use `stripe.confirmPayPalPayment` in the [PayPal Payments](https://stripe.com/docs/payments/paypal) with Payment Methods flow when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_paypal_payment
*/
confirmPayPalPayment(
clientSecret: string,
data?: paymentIntents.ConfirmPayPalPaymentData
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmPixPayment` in the [Pix Payments](https://stripe.com/docs/payments/pix) with Payment Methods flow when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
* Refer to our [integration guide](https://stripe.com/docs/payments/pix) for more details.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_pix_payment
*/
confirmPixPayment(
clientSecret: string,
data?: paymentIntents.ConfirmPixPaymentData,
options?: paymentIntents.ConfirmPixPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*
* Use `stripe.confirmPromptPayPayment` in the [PromptPay Payments](https://stripe.com/docs/payments/promptpay) with Payment Methods flow when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
* Refer to our [integration guide](https://stripe.com/docs/payments/promptpay) for more details.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*/
confirmPromptPayPayment(
clientSecret: string,
data?: paymentIntents.ConfirmPromptPayPaymentData,
options?: paymentIntents.ConfirmPromptPayPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmSepaDebitPayment` in the [SEPA Direct Debit Payments](https://stripe.com/docs/payments/sepa-debit) with Payment Methods flow when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
* Note that there are some additional requirements to this flow that are not covered in this reference.
* Refer to our [integration guide](https://stripe.com/docs/payments/sepa-debit) for more details.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_sepa_debit_payment
*/
confirmSepaDebitPayment(
clientSecret: string,
data?: paymentIntents.ConfirmSepaDebitPaymentData
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmSofortPayment` in the [Sofort Payments with Payment Methods](https://stripe.com/docs/payments/sofort) flow when the customer submits your payment form.
* When called, it will confirm the `PaymentIntent` with `data` you provide. It will then automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_sofort_payment
*/
confirmSofortPayment(
clientSecret: string,
data?: paymentIntents.ConfirmSofortPaymentData,
options?: paymentIntents.ConfirmSofortPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.confirmTwintPayment` in the [TWINT Payments with Payment Methods](https://stripe.com/docs/payments/twint) flow when the customer submits your payment form.
* When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_twint_payment
*/
confirmTwintPayment(
clientSecret: string,
data?: paymentIntents.ConfirmTwintPaymentData,
options?: paymentIntents.ConfirmTwintPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*
* Use `stripe.confirmWechatPayPayment` in the [Wechat Pay Payments](https://stripe.com/docs/payments/wechat-pay) with Payment Methods flow when the customer submits your payment form.
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
* Refer to our [integration guide](https://stripe.com/docs/payments/wechat-pay/accept-a-payment) for more details.
*
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_wechat_pay_payment
*/
confirmWechatPayPayment(
clientSecret: string,
data?: paymentIntents.ConfirmWechatPayPaymentData,
options?: paymentIntents.ConfirmWechatPayPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use `stripe.handleCardAction` in the Payment Intents API [manual confirmation](https://stripe.com/docs/payments/payment-intents/web-manual) flow to handle a [PaymentIntent](https://stripe.com/docs/api/payment_intents) with the `requires_action` status.
* It will throw an error if the `PaymentIntent` has a different status.
*
* Note that `stripe.handleCardAction` may take several seconds to complete.
* During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.
* If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator.
*
* Additionally, `stripe.handleCardAction` may trigger a [3D Secure](https://stripe.com/docs/payments/3d-secure) authentication challenge.
* The authentication challenge requires a context switch that can be hard to follow on a screen-reader.
* Ensure that your form is accessible by ensuring that success or error messages are clearly read out.
*
* @docs https://stripe.com/docs/js/payment_intents/handle_card_action
*/
handleCardAction(clientSecret: string): Promise<PaymentIntentResult>;
/**
* Use `stripe.handleNextAction` in the [finalizing payments on the server](https://stripe.com/docs/payments/finalize-payments-on-the-server) flow to finish confirmation of a [PaymentIntent](https://stripe.com/docs/api/payment_intents) or [SetupIntent](https://stripe.com/docs/api/setup_intents) with the `requires_action` status.
* It will throw an error if the `PaymentIntent` or `SetupIntent` has a different status.
*
* Note that `stripe.handleNextAction` may take several seconds to complete.
* During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.
* If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator.
*
* Additionally, `stripe.handleNextAction` may trigger a [3D Secure](https://stripe.com/docs/payments/3d-secure) authentication challenge.
* The authentication challenge requires a context switch that can be hard to follow on a screen-reader.
* Ensure that your form is accessible by ensuring that success or error messages are clearly read out.
*
* @docs https://stripe.com/docs/js/payment_intents/handle_next_action
*/
handleNextAction(options: {
clientSecret: string;
}): Promise<PaymentIntentOrSetupIntentResult>;
/**
* Use `stripe.verifyMicrodepositsForPayment` in the [Accept a Canadian pre-authorized debit payment](https://stripe.com/docs/payments/acss-debit/accept-a-payment) flow
* to verify a customer's bank account with micro-deposits.
*
* @docs https://stripe.com/docs/js/payment_intents/verify_microdeposits_for_payment
*/
verifyMicrodepositsForPayment(
clientSecret: string,
data?: paymentIntents.VerifyMicrodepositsForPaymentData
): Promise<PaymentIntentResult>;
/**
* Use stripe.createRadarSession to create a [Radar Session](https://stripe.com/docs/radar/radar-session) in your checkout flow or when saving card details.
* A Radar Session is a snapshot of the browser metadata and device details that helps Radar make more accurate predictions on your payments.
* This metadata includes information like IP address, browser, screen or device information, and other device characteristics.
* By using Radar Sessions, you can capture critical fraud information without tokenizing on Stripe.
*/
createRadarSession(): Promise<RadarSessionPayload>;
/**
* Use `stripe.collectBankAccountForPayment` in the [Accept a payment flow](https://stripe.com/docs/payments/ach-debit/accept-a-payment) for the [ACH Direct Debit](https://stripe.com/docs/payments/ach-debit)
* payment method to collect the customer’s bank account in your payment form.
*
* @docs https://stripe.com/docs/js/payment_intents/collect_bank_account_for_payment
*/
collectBankAccountForPayment(
options: paymentIntents.CollectBankAccountForPaymentOptions
): Promise<PaymentIntentResult>;
/**
* Use stripe.createPaymentMethod to convert payment information collected by elements into a [PaymentMethod](https://stripe.com/docs/api/payment_methods) object that you safely pass to your server to use in an API call.
*
* @docs https://stripe.com/docs/js/payment_methods/create_payment_method
*/
createPaymentMethod(
paymentMethodData: paymentIntents.CreatePaymentMethodData
): Promise<PaymentMethodResult>;
/**
* Use stripe.createPaymentMethod to convert payment information collected by elements into a [PaymentMethod](https://stripe.com/docs/api/payment_methods) object that you safely pass to your server to use in an API call.
*
* @docs https://stripe.com/docs/js/payment_methods/create_payment_method_elements
*/
createPaymentMethod(
options: paymentIntents.CreatePaymentMethodFromElements
): Promise<PaymentMethodResult>;
/**
* Use stripe.createPaymentMethod to convert payment information collected by elements into a [PaymentMethod](https://stripe.com/docs/api/payment_methods) object that you safely pass to your server to use in an API call.
*
* @docs https://stripe.com/docs/js/payment_methods/create_payment_method_elements
*/
createPaymentMethod(
options: paymentIntents.CreatePaymentMethodFromElement
): Promise<PaymentMethodResult>;
/**
* Use stripe.createConfirmationToken to convert payment information collected by elements into a [ConfirmationToken](https://stripe.com/docs/api/confirmation_tokens) object that you safely pass to your server to use in an API call.
*
* @docs https://stripe.com/docs/js/confirmation_tokens/create_confirmation_token
*/
createConfirmationToken(
options: confirmationTokens.CreateConfirmationToken
): Promise<ConfirmationTokenResult>;
/**
* Retrieve a [PaymentIntent](https://stripe.com/docs/api/payment_intents) using its [client secret](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-client_secret).
*
* @docs https://stripe.com/docs/js/payment_intents/retrieve_payment_intent
*/
retrievePaymentIntent(clientSecret: string): Promise<PaymentIntentResult>;
/////////////////////////////
/// Setup Intents
///
/// https://stripe.com/docs/js/setup_intents
/////////////////////////////
/**
* Use `stripe.confirmSetup` to confirm a SetupIntent using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
* When called, `stripe.confirmSetup` will attempt to complete any [required actions](https://stripe.com/docs/payments/intents), such as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page.
* Your user will be redirected to the return_url you pass once the confirmation is complete.
*
* By default, stripe.`confirmSetup` will always redirect to your return_url after a successful confirmation.
* If you set `redirect: "if_required"`, then `stripe.confirmSetup` will only redirect if your user chooses a redirect-based payment method.
* Setting `if_required` requires that you handle successful confirmations for redirect-based and non-redirect based payment methods separately.
*
* @docs https://stripe.com/docs/js/setup_intents/confirm_setup
*/
confirmSetup(options: {
elements: StripeElements;
confirmParams?: Partial<setupIntents.ConfirmSetupData>;
redirect: 'if_required';
}): Promise<SetupIntentResult>;
/**
* Use `stripe.confirmSetup` to confirm a SetupIntent using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
* When called, `stripe.confirmSetup` will attempt to complete any [required actions](https://stripe.com/docs/payments/intents), such as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page.
* Your user will be redirected to the return_url you pass once the confirmation is complete.
*
* By default, stripe.`confirmSetup` will always redirect to your return_url after a successful confirmation.
* If you set `redirect: "if_required"`, then `stripe.confirmSetup` will only redirect if your user chooses a redirect-based payment method.
* Setting `if_required` requires that you handle successful confirmations for redirect-based and non-redirect based payment methods separately.
*
* @docs https://stripe.com/docs/js/setup_intents/confirm_setup
*/
confirmSetup(options: {
elements?: StripeElements;
clientSecret: string;
confirmParams?: Partial<setupIntents.ConfirmSetupData>;
redirect: 'if_required';
}): Promise<SetupIntentResult>;
/**
* Use `stripe.confirmSetup` to confirm a SetupIntent using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
* When called, `stripe.confirmSetup` will attempt to complete any [required actions](https://stripe.com/docs/payments/intents), such as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page.
* Your user will be redirected to the return_url you pass once the confirmation is complete.
*
* @docs https://stripe.com/docs/js/setup_intents/confirm_setup
*/
confirmSetup(options: {
elements: StripeElements;
confirmParams: setupIntents.ConfirmSetupData;
redirect?: 'always';
}): Promise<never | {error: StripeError}>;
/**
* Use `stripe.confirmSetup` to confirm a SetupIntent using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
* When called, `stripe.confirmSetup` will attempt to complete any [required actions](https://stripe.com/docs/payments/intents), such as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page.
* Your user will be redirected to the return_url you pass once the confirmation is complete.
*
* @docs https://stripe.com/docs/js/setup_intents/confirm_setup
*/
confirmSetup(options: {
elements?: StripeElements;
clientSecret: string;
confirmParams: setupIntents.ConfirmSetupData;
redirect?: 'always';
}): Promise<never | {error: StripeError}>;
/**
* Use `stripe.confirmAcssDebitSetup` to [save details for future payments with pre-authorized debit in Canada](https://stripe.com/docs/payments/acss-debit/set-up-payment).
* When called, it will automatically pop up a modal to collect bank account details and verification, accept the mandate, and confirm the [SetupIntent](https://stripe.com/docs/api/setup_intents) when the user submits the form.
*
* When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* `stripe.confirmAcssDebitSetup` automatically creates a new `PaymentMethod` for you when your customer completes the modal UI.
* It can also be called with an existing `PaymentMethod` which will load the modal UI to collect a new mandate agreement.
* If you have already attached a `PaymentMethod`, you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/setup_intents/confirm_acss_debit_setup
*/
confirmAcssDebitSetup(
clientSecret: string,
data?: setupIntents.ConfirmAcssDebitSetupData,
options?: setupIntents.ConfirmAcssDebitSetupOptions
): Promise<SetupIntentResult>;
/**
* Use `stripe.confirmUsBankAccountSetup` in the [Save bank details](https://stripe.com/docs/payments/ach-debit/set-up-payment) flow for the [ACH Direct Debit payment](https://stripe.com/docs/payments/ach-debit) method to record the customer’s authorization for future payments.
*
* When you confirm a [SetupIntent](https://stripe.com/docs/api/setup_intents), it needs to have an attached PaymentMethod.
* Use `stripe.collectBankAccountForSetup` to collect and attach a [PaymentMethod](https://stripe.com/docs/api/payment_methods), or provide bank account details using the `data` parameter if a `PaymentMethod` was not already provided.
*
* @docs https://stripe.com/docs/js/setup_intents/confirm_us_bank_account_setup
*/
confirmUsBankAccountSetup(
clientSecret: string,
data?: setupIntents.ConfirmUsBankAccountSetupData
): Promise<SetupIntentResult>;
/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*
* Use `stripe.confirmAuBecsDebitSetup` in the [BECS Direct Debit with Setup Intents](https://stripe.com/docs/payments/payment-methods/au-becs-debit-quickstart-setup-intents) flow when the customer submits your payment form.
* When called, it will confirm the `SetupIntent` with `data` you provide.
* Note that there are some additional requirements to this flow that are not covered in this reference.
* Refer to our [integration guide](https://stripe.com/docs/payments/payment-methods/au-becs-debit-quickstart-setup-intents) for more details.
*
* When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* It can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/setup_intents/confirm_au_becs_debit_setup
*/
confirmAuBecsDebitSetup(
clientSecret: string,
data?: setupIntents.ConfirmAuBecsDebitSetupData
): Promise<SetupIntentResult>;
/**
* Use `stripe.confirmBacsDebitSetup` in the [Bacs Direct Debit Payments](https://stripe.com/docs/payments/payment-methods/bacs-debit) flow when the customer submits your payment form.
* When called, it will confirm the [SetupIntent](https://stripe.com/docs/api/setup_intents) with `data` you provide.
* Note that there are some additional requirements to this flow that are not covered in this reference.
* Refer to our [integration guide](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.
*
* When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* It can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/setup_intents/confirm_bacs_debit_setup
*/
confirmBacsDebitSetup(
clientSecret: string,
data?: setupIntents.ConfirmBacsDebitSetupData
): Promise<SetupIntentResult>;
/**
* Use `stripe.confirmBancontactSetup` in the [Set up future payments](https://stripe.com/docs/payments/bancontact/set-up-payment) flow to use Bancontact bank details to set up a SEPA Direct Debit payment method for future payments.
* When called, it will confirm a `SetupIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
* Note that there are some additional requirements to this flow that are not covered in this reference.
* Refer to our [integration guide](https://stripe.com/docs/payments/bancontact/set-up-payment) for more details.
*
* When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* It can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_bancontact_setup
*/
confirmBancontactSetup(
clientSecret: string,
data?: setupIntents.ConfirmBancontactSetupData
): Promise<SetupIntentResult>;
/**
* Use `stripe.confirmCardSetup` in the [Setup Intents API flow](https://stripe.com/docs/payments/save-and-reuse) when the customer submits your payment form.
* When called, it will confirm the [SetupIntent](https://stripe.com/docs/api/setup_intents) with `data` you provide and carry out 3DS or other next actions if they are required.
*
* When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* It can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/setup_intents/confirm_card_setup
*/
confirmCardSetup(
clientSecret: string,
data?: setupIntents.ConfirmCardSetupData,
options?: setupIntents.ConfirmCardSetupOptions
): Promise<SetupIntentResult>;
/**
* Use `stripe.confirmCashappSetup` in the [Setup Intents API flow](https://stripe.com/docs/payments/save-and-reuse) when the customer submits your payment form.
* When called, it will confirm the [SetupIntent](https://stripe.com/docs/api/setup_intents) with `data` you provide.
* Refer to our [integration guide](https://stripe.com/docs/payments/cash-app-pay) for more details..
*
* When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* It can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/payment_intents/confirm_cashapp_setup
*/
confirmCashappSetup(
clientSecret: string,
data?: setupIntents.ConfirmCashappSetupData,
options?: setupIntents.ConfirmCashappSetupOptions
): Promise<SetupIntentResult>;
/**
* Use `stripe.confirmIdealSetup` in the [Set up future payments](https://stripe.com/docs/payments/ideal/set-up-payment) flow to use iDEAL bank details to set up a SEPA Direct Debit payment method for future payments.
* When called, it will confirm a `SetupIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
* Note that there are some additional requirements to this flow that are not covered in this reference.
* Refer to our [integration guide](https://stripe.com/docs/payments/ideal/set-up-payment) for more details.
*
* When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* It can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/setup_intents/confirm_ideal_setup
*/
confirmIdealSetup(
clientSecret: string,
data?: setupIntents.ConfirmIdealSetupData
): Promise<SetupIntentResult>;
/**
* Use `stripe.confirmPayPalSetup` in the [Set up future payments](https://stripe.com/docs/payments/paypal/set-up-future-payments) flow when the customer submits your payment form.
* When called, it will confirm a `SetupIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
* Note that there are some additional requirements to this flow that are not covered in this reference.
* Refer to our [integration guide](https://stripe.com/docs/payments/paypal/set-up-future-payments) for more details.
*
* When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* It can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/setup_intents/confirm_paypal_setup
*/
confirmPayPalSetup(
clientSecret: string,
data?: setupIntents.ConfirmPayPalSetupData
): Promise<SetupIntentResult>;
/**
* Use `stripe.confirmSepaDebitSetup` in the [SEPA Direct Debit with Setup Intents](https://stripe.com/docs/payments/sepa-debit-setup-intents) flow when the customer submits your payment form.
* When called, it will confirm the `SetupIntent` with `data` you provide.
* Note that there are some additional requirements to this flow that are not covered in this reference.
* Refer to our [integration guide](https://stripe.com/docs/payments/sepa-debit-setup-intents) for more details.
*
* When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* It can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*
* @docs https://stripe.com/docs/js/setup_intents/confirm_sepa_debit_setup
*/
confirmSepaDebitSetup(
clientSecret: string,
data?: setupIntents.ConfirmSepaDebitSetupData
): Promise<SetupIntentResult>;
/*
* Use `stripe.confirmSofortSetup` in the [Set up future payments](https://stripe.com/docs/payments/sofort/set-up-payment) flow to use SOFORT bank details to set up a SEPA Direct Debit payment method for future payments.
* When called, it will confirm a `SetupIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
* Note that there are some additional requirements to this flow that are not covered in this reference.
* Refer to our [integration guide](https://stripe.com/docs/payments/sofort/set-up-payment) for more details.
*
* When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
* In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
* It can also be called with an existing `PaymentMethod`, or if you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
*/
confirmSofortSetup(
clientSecret: string,
data?: setupIntents.ConfirmSofortSetupData,
options?: setupIntents.ConfirmSofortSetupOptions
): Promise<SetupIntentResult>;
/**
* Use `stripe.confirmAffirmPayment` in the [Affirm payments](https://stripe.com/docs/payments/affirm) flow when the customer submits your payment form.