@stripe/stripe-js 3.0.10 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/dist/api/bank-accounts.d.mts +61 -0
  2. package/dist/api/bank-accounts.d.ts +61 -0
  3. package/dist/api/cards.d.mts +130 -0
  4. package/dist/api/cards.d.ts +130 -0
  5. package/dist/api/confirmation-tokens.d.mts +183 -0
  6. package/dist/api/confirmation-tokens.d.ts +183 -0
  7. package/dist/api/financial-connections.d.mts +232 -0
  8. package/dist/api/financial-connections.d.ts +232 -0
  9. package/dist/api/index.d.mts +12 -0
  10. package/dist/api/index.d.ts +12 -0
  11. package/dist/api/orders.d.mts +122 -0
  12. package/dist/api/orders.d.ts +122 -0
  13. package/dist/api/payment-intents.d.mts +330 -0
  14. package/dist/api/payment-intents.d.ts +330 -0
  15. package/dist/api/payment-methods.d.mts +452 -0
  16. package/dist/api/payment-methods.d.ts +452 -0
  17. package/dist/api/setup-intents.d.mts +184 -0
  18. package/dist/api/setup-intents.d.ts +184 -0
  19. package/dist/api/shared.d.mts +125 -0
  20. package/dist/api/shared.d.ts +125 -0
  21. package/dist/api/sources.d.mts +1045 -0
  22. package/dist/api/sources.d.ts +1045 -0
  23. package/dist/api/tokens.d.mts +639 -0
  24. package/dist/api/tokens.d.ts +639 -0
  25. package/dist/api/verification-sessions.d.mts +9 -0
  26. package/dist/api/verification-sessions.d.ts +9 -0
  27. package/dist/index.d.mts +4 -12792
  28. package/dist/index.d.ts +4 -12792
  29. package/dist/{stripe.js → index.js} +1 -1
  30. package/dist/{stripe.mjs → index.mjs} +1 -1
  31. package/dist/pure.d.mts +5 -0
  32. package/dist/pure.d.ts +5 -0
  33. package/dist/pure.js +204 -0
  34. package/dist/pure.mjs +200 -0
  35. package/dist/shared.d.mts +6 -0
  36. package/dist/shared.d.ts +6 -0
  37. package/dist/stripe-js/checkout.d.mts +153 -0
  38. package/dist/stripe-js/checkout.d.ts +153 -0
  39. package/dist/stripe-js/confirmation-tokens.d.mts +1 -0
  40. package/dist/stripe-js/confirmation-tokens.d.ts +1 -0
  41. package/dist/stripe-js/custom-checkout.d.mts +402 -0
  42. package/dist/stripe-js/custom-checkout.d.ts +402 -0
  43. package/dist/stripe-js/elements/address.d.mts +261 -0
  44. package/dist/stripe-js/elements/address.d.ts +261 -0
  45. package/dist/stripe-js/elements/affirm-message.d.mts +65 -0
  46. package/dist/stripe-js/elements/affirm-message.d.ts +65 -0
  47. package/dist/stripe-js/elements/afterpay-clearpay-message.d.mts +119 -0
  48. package/dist/stripe-js/elements/afterpay-clearpay-message.d.ts +119 -0
  49. package/dist/stripe-js/elements/apple-pay.d.mts +156 -0
  50. package/dist/stripe-js/elements/apple-pay.d.ts +156 -0
  51. package/dist/stripe-js/elements/au-bank-account.d.mts +138 -0
  52. package/dist/stripe-js/elements/au-bank-account.d.ts +138 -0
  53. package/dist/stripe-js/elements/base.d.mts +264 -0
  54. package/dist/stripe-js/elements/base.d.ts +264 -0
  55. package/dist/stripe-js/elements/card-cvc.d.mts +119 -0
  56. package/dist/stripe-js/elements/card-cvc.d.ts +119 -0
  57. package/dist/stripe-js/elements/card-expiry.d.mts +119 -0
  58. package/dist/stripe-js/elements/card-expiry.d.ts +119 -0
  59. package/dist/stripe-js/elements/card-number.d.mts +200 -0
  60. package/dist/stripe-js/elements/card-number.d.ts +200 -0
  61. package/dist/stripe-js/elements/card.d.mts +226 -0
  62. package/dist/stripe-js/elements/card.d.ts +226 -0
  63. package/dist/stripe-js/elements/cart.d.mts +224 -0
  64. package/dist/stripe-js/elements/cart.d.ts +224 -0
  65. package/dist/stripe-js/elements/eps-bank.d.mts +140 -0
  66. package/dist/stripe-js/elements/eps-bank.d.ts +140 -0
  67. package/dist/stripe-js/elements/express-checkout.d.mts +446 -0
  68. package/dist/stripe-js/elements/express-checkout.d.ts +446 -0
  69. package/dist/stripe-js/elements/fpx-bank.d.mts +134 -0
  70. package/dist/stripe-js/elements/fpx-bank.d.ts +134 -0
  71. package/dist/stripe-js/elements/iban.d.mts +135 -0
  72. package/dist/stripe-js/elements/iban.d.ts +135 -0
  73. package/dist/stripe-js/elements/ideal-bank.d.mts +140 -0
  74. package/dist/stripe-js/elements/ideal-bank.d.ts +140 -0
  75. package/dist/stripe-js/elements/index.d.mts +22 -0
  76. package/dist/stripe-js/elements/index.d.ts +22 -0
  77. package/dist/stripe-js/elements/issuing/index.d.mts +5 -0
  78. package/dist/stripe-js/elements/issuing/index.d.ts +5 -0
  79. package/dist/stripe-js/elements/issuing/issuing-card-copy-button.d.mts +37 -0
  80. package/dist/stripe-js/elements/issuing/issuing-card-copy-button.d.ts +37 -0
  81. package/dist/stripe-js/elements/issuing/issuing-card-cvc-display.d.mts +32 -0
  82. package/dist/stripe-js/elements/issuing/issuing-card-cvc-display.d.ts +32 -0
  83. package/dist/stripe-js/elements/issuing/issuing-card-expiry-display.d.mts +32 -0
  84. package/dist/stripe-js/elements/issuing/issuing-card-expiry-display.d.ts +32 -0
  85. package/dist/stripe-js/elements/issuing/issuing-card-number-display.d.mts +40 -0
  86. package/dist/stripe-js/elements/issuing/issuing-card-number-display.d.ts +40 -0
  87. package/dist/stripe-js/elements/issuing/issuing-card-pin-display.d.mts +32 -0
  88. package/dist/stripe-js/elements/issuing/issuing-card-pin-display.d.ts +32 -0
  89. package/dist/stripe-js/elements/link-authentication.d.mts +158 -0
  90. package/dist/stripe-js/elements/link-authentication.d.ts +158 -0
  91. package/dist/stripe-js/elements/p24-bank.d.mts +140 -0
  92. package/dist/stripe-js/elements/p24-bank.d.ts +140 -0
  93. package/dist/stripe-js/elements/payment-method-messaging.d.mts +98 -0
  94. package/dist/stripe-js/elements/payment-method-messaging.d.ts +98 -0
  95. package/dist/stripe-js/elements/payment-request-button.d.mts +151 -0
  96. package/dist/stripe-js/elements/payment-request-button.d.ts +151 -0
  97. package/dist/stripe-js/elements/payment.d.mts +275 -0
  98. package/dist/stripe-js/elements/payment.d.ts +275 -0
  99. package/dist/stripe-js/elements/shipping-address.d.mts +215 -0
  100. package/dist/stripe-js/elements/shipping-address.d.ts +215 -0
  101. package/dist/stripe-js/elements-group.d.mts +1129 -0
  102. package/dist/stripe-js/elements-group.d.ts +1129 -0
  103. package/dist/stripe-js/embedded-checkout.d.mts +35 -0
  104. package/dist/stripe-js/embedded-checkout.d.ts +35 -0
  105. package/dist/stripe-js/ephemeral-keys.d.mts +3 -0
  106. package/dist/stripe-js/ephemeral-keys.d.ts +3 -0
  107. package/dist/stripe-js/financial-connections.d.mts +19 -0
  108. package/dist/stripe-js/financial-connections.d.ts +19 -0
  109. package/dist/stripe-js/index.d.mts +13 -0
  110. package/dist/stripe-js/index.d.ts +13 -0
  111. package/dist/stripe-js/orders.d.mts +9 -0
  112. package/dist/stripe-js/orders.d.ts +9 -0
  113. package/dist/stripe-js/payment-intents.d.mts +1470 -0
  114. package/dist/stripe-js/payment-intents.d.ts +1470 -0
  115. package/dist/stripe-js/payment-request.d.mts +529 -0
  116. package/dist/stripe-js/payment-request.d.ts +529 -0
  117. package/dist/stripe-js/setup-intents.d.mts +250 -0
  118. package/dist/stripe-js/setup-intents.d.ts +250 -0
  119. package/dist/stripe-js/stripe.d.mts +1486 -0
  120. package/dist/stripe-js/stripe.d.ts +1486 -0
  121. package/dist/stripe-js/token-and-sources.d.mts +110 -0
  122. package/dist/stripe-js/token-and-sources.d.ts +110 -0
  123. package/dist/utils.d.mts +2 -0
  124. package/dist/utils.d.ts +2 -0
  125. package/lib/index.d.mts +1 -0
  126. package/lib/index.d.ts +1 -0
  127. package/lib/index.js +2 -0
  128. package/lib/index.mjs +1 -0
  129. package/package.json +11 -10
  130. package/pure/index.d.mts +1 -12771
  131. package/pure/index.d.ts +1 -12771
  132. package/pure/index.js +1 -204
  133. package/pure/index.mjs +1 -200
@@ -0,0 +1,1486 @@
1
+ import * as api from '../api';
2
+ import * as paymentIntents from './payment-intents';
3
+ import * as setupIntents from './setup-intents';
4
+ import * as confirmationTokens from './confirmation-tokens';
5
+ import * as orders from './orders';
6
+ import * as tokens from './token-and-sources';
7
+ import * as elements from './elements';
8
+ import * as financialConnections from './financial-connections';
9
+ import * as ephemeralKeys from './ephemeral-keys';
10
+
11
+ import {
12
+ StripeElements,
13
+ StripeElementsOptionsClientSecret,
14
+ StripeElementsOptionsMode,
15
+ } from './elements-group';
16
+ import {CheckoutLocale, RedirectToCheckoutOptions} from './checkout';
17
+ import {PaymentRequestOptions, PaymentRequest} from './payment-request';
18
+ import {StripeElement, StripeElementLocale} from './elements-group';
19
+ import {
20
+ StripeCustomCheckoutOptions,
21
+ StripeCustomCheckout,
22
+ } from './custom-checkout';
23
+ import {
24
+ StripeEmbeddedCheckoutOptions,
25
+ StripeEmbeddedCheckout,
26
+ } from './embedded-checkout';
27
+
28
+ export interface Stripe {
29
+ /////////////////////////////
30
+ /// Elements
31
+ ///
32
+ /// https://stripe.com/docs/js/elements_object
33
+ /////////////////////////////
34
+
35
+ /**
36
+ * Create an `Elements` instance, which manages a group of elements.
37
+ *
38
+ * https://stripe.com/docs/js/elements_object/create
39
+ */
40
+ elements(options?: StripeElementsOptionsClientSecret): StripeElements;
41
+
42
+ /**
43
+ * Create an `Elements` instance, which manages a group of elements.
44
+ *
45
+ * https://stripe.com/docs/js/elements_object/create_without_intent
46
+ */
47
+ elements(options?: StripeElementsOptionsMode): StripeElements;
48
+
49
+ /////////////////////////////
50
+ /// Checkout
51
+ ///
52
+ /// https://stripe.com/docs/js/checkout
53
+ /////////////////////////////
54
+
55
+ /**
56
+ * Use `stripe.redirectToCheckout` to redirect your customers to [Checkout](https://stripe.com/docs/payments/checkout), a Stripe-hosted page to securely collect payment information.
57
+ * When the customer completes their purchase, they are redirected back to your website.
58
+ */
59
+ redirectToCheckout(
60
+ options: RedirectToCheckoutOptions
61
+ ): Promise<never | {error: StripeError}>;
62
+
63
+ /////////////////////////////
64
+ /// Payment Intents
65
+ ///
66
+ /// https://stripe.com/docs/js/payment_intents
67
+ /////////////////////////////
68
+
69
+ /**
70
+ * Use `stripe.confirmPayment` to confirm a PaymentIntent using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
71
+ * 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.
72
+ * Your user will be redirected to the return_url you pass once the confirmation is complete.
73
+ *
74
+ * By default, `stripe.confirmPayment` will always redirect to your return_url after a successful confirmation.
75
+ * If you set `redirect: "if_required"`, then `stripe.confirmPayment` will only redirect if your user chooses a redirect-based payment method.
76
+ * Setting `if_required` requires that you handle successful confirmations for redirect-based and non-redirect based payment methods separately.
77
+ *
78
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_payment
79
+ */
80
+ confirmPayment(options: {
81
+ elements: StripeElements;
82
+ confirmParams?: Partial<paymentIntents.ConfirmPaymentData>;
83
+ redirect: 'if_required';
84
+ }): Promise<PaymentIntentResult>;
85
+
86
+ /**
87
+ * Use `stripe.confirmPayment` to confirm a PaymentIntent using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
88
+ * 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.
89
+ * Your user will be redirected to the return_url you pass once the confirmation is complete.
90
+ *
91
+ * By default, `stripe.confirmPayment` will always redirect to your return_url after a successful confirmation.
92
+ * If you set `redirect: "if_required"`, then `stripe.confirmPayment` will only redirect if your user chooses a redirect-based payment method.
93
+ * Setting `if_required` requires that you handle successful confirmations for redirect-based and non-redirect based payment methods separately.
94
+ *
95
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_payment
96
+ */
97
+ confirmPayment(options: {
98
+ elements?: StripeElements;
99
+ clientSecret: string;
100
+ confirmParams?: Partial<paymentIntents.ConfirmPaymentData>;
101
+ redirect: 'if_required';
102
+ }): Promise<PaymentIntentResult>;
103
+
104
+ /**
105
+ * Use `stripe.confirmPayment` to confirm a PaymentIntent using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
106
+ * 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.
107
+ * Your user will be redirected to the return_url you pass once the confirmation is complete.
108
+ *
109
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_payment
110
+ */
111
+ confirmPayment(options: {
112
+ elements: StripeElements;
113
+ confirmParams: paymentIntents.ConfirmPaymentData;
114
+ redirect?: 'always';
115
+ }): Promise<never | {error: StripeError}>;
116
+
117
+ /**
118
+ * Use `stripe.confirmPayment` to confirm a PaymentIntent using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
119
+ * 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.
120
+ * Your user will be redirected to the return_url you pass once the confirmation is complete.
121
+ *
122
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_payment
123
+ */
124
+ confirmPayment(options: {
125
+ elements?: StripeElements;
126
+ clientSecret: string;
127
+ confirmParams: paymentIntents.ConfirmPaymentData;
128
+ redirect?: 'always';
129
+ }): Promise<never | {error: StripeError}>;
130
+
131
+ /**
132
+ * 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.
133
+ * 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.
134
+ *
135
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
136
+ * `stripe.confirmAcssDebitPayment` automatically creates a new `PaymentMethod` for you when your customer completes the modal UI.
137
+ * It can also be called with an existing `PaymentMethod` which will load the modal UI to collect a new mandate agreement.
138
+ * If you have already attached a `PaymentMethod`, you can call this method without needing to provide any additional data.
139
+ *
140
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_acss_debit_payment
141
+ */
142
+ confirmAcssDebitPayment(
143
+ clientSecret: string,
144
+ data?: paymentIntents.ConfirmAcssDebitPaymentData,
145
+ options?: paymentIntents.ConfirmAcssDebitPaymentOptions
146
+ ): Promise<PaymentIntentResult>;
147
+
148
+ /**
149
+ * 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.
150
+ *
151
+ * When you confirm a [PaymentIntent](https://stripe.com/docs/api/payment_intents), it needs to have an attached PaymentMethod.
152
+ * 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.
153
+ *
154
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_us_bank_account_payment
155
+ */
156
+ confirmUsBankAccountPayment(
157
+ clientSecret: string,
158
+ data?: paymentIntents.ConfirmUsBankAccountPaymentData
159
+ ): Promise<PaymentIntentResult>;
160
+
161
+ /**
162
+ * Use `stripe.confirmAlipayPayment` in the [Alipay Payments](https://stripe.com/docs/payments/alipay) with Payment Methods flow when the customer submits your payment form.
163
+ * 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.
164
+ * Once authorization is complete, the customer will be redirected back to your specified `return_url`.
165
+ *
166
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
167
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
168
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
169
+ *
170
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_alipay_payment
171
+ */
172
+ confirmAlipayPayment(
173
+ clientSecret: string,
174
+ data?: paymentIntents.ConfirmAlipayPaymentData,
175
+ options?: paymentIntents.ConfirmAlipayPaymentOptions
176
+ ): Promise<PaymentIntentResult>;
177
+
178
+ /**
179
+ * Requires beta access:
180
+ * Contact [Stripe support](https://support.stripe.com/) for more information.
181
+ *
182
+ * 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.
183
+ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
184
+ * Note that there are some additional requirements to this flow that are not covered in this reference.
185
+ * Refer to our [integration guide](https://stripe.com/docs/payments/payment-methods/au-becs-debit-quickstart-payment-intents) for more details.
186
+ *
187
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
188
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
189
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
190
+ *
191
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_au_becs_debit_payment
192
+ */
193
+ confirmAuBecsDebitPayment(
194
+ clientSecret: string,
195
+ data?: paymentIntents.ConfirmAuBecsDebitPaymentData
196
+ ): Promise<PaymentIntentResult>;
197
+
198
+ /**
199
+ * 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.
200
+ * When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
201
+ * Once authorization is complete, the customer will be redirected back to your specified `return_url`.
202
+ *
203
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
204
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
205
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
206
+ *
207
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_bancontact_payment
208
+ */
209
+ confirmBancontactPayment(
210
+ clientSecret: string,
211
+ data?: paymentIntents.ConfirmBancontactPaymentData,
212
+ options?: paymentIntents.ConfirmBancontactPaymentOptions
213
+ ): Promise<PaymentIntentResult>;
214
+
215
+ /**
216
+ * Use `stripe.confirmBlikPayment` in the [BLIK Payments with Payment Methods](https://stripe.com/docs/payments/blik) flow when the customer submits your payment form.
217
+ * When called, it will confirm the PaymentIntent with data you provide, and it will automatically prompt the customer to authorize the transaction.
218
+ *
219
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_blik_payment
220
+ */
221
+ confirmBlikPayment(
222
+ clientSecret: string,
223
+ data: paymentIntents.ConfirmBlikPaymentData,
224
+ options?: paymentIntents.ConfirmBlikPaymentOptions
225
+ ): Promise<PaymentIntentResult>;
226
+
227
+ /**
228
+ * Use `stripe.confirmBoletoPayment` in the [Boleto Payment](https://stripe.com/docs/payments/boleto) with Payment Methods flow when the customer submits your payment form.
229
+ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
230
+ * Note that there are some additional requirements to this flow that are not covered in this reference.
231
+ * Refer to our [integration guide](https://stripe.com/docs/payments/boleto) for more details.
232
+ *
233
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
234
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
235
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
236
+ *
237
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_boleto_payment
238
+ */
239
+ confirmBoletoPayment(
240
+ clientSecret: string,
241
+ data?: paymentIntents.ConfirmBoletoPaymentData,
242
+ options?: paymentIntents.ConfirmBoletoPaymentOptions
243
+ ): Promise<PaymentIntentResult>;
244
+
245
+ /**
246
+ * Use `stripe.confirmCardPayment` when the customer submits your payment form.
247
+ * 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.
248
+ *
249
+ * 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.
250
+ *
251
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
252
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
253
+ * 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.
254
+ *
255
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_card_payment
256
+ */
257
+ confirmCardPayment(
258
+ clientSecret: string,
259
+ data?: paymentIntents.ConfirmCardPaymentData,
260
+ options?: paymentIntents.ConfirmCardPaymentOptions
261
+ ): Promise<PaymentIntentResult>;
262
+
263
+ /**
264
+ * 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.
265
+ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
266
+ * Refer to our [integration guide](https://stripe.com/docs/payments/cash-app-pay) for more details.
267
+ *
268
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
269
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
270
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
271
+ *
272
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_cashapp_payment
273
+ */
274
+ confirmCashappPayment(
275
+ clientSecret: string,
276
+ data?: paymentIntents.ConfirmCashappPaymentData,
277
+ options?: paymentIntents.ConfirmCashappPaymentOptions
278
+ ): Promise<PaymentIntentResult>;
279
+
280
+ /**
281
+ * Requires beta access:
282
+ * Contact [Stripe support](https://support.stripe.com/) for more information.
283
+ *
284
+ * Use `stripe.confirmCustomerBalancePayment` when the customer submits your payment form.
285
+ *
286
+ * When called, it will confirm the PaymentIntent with data you provide.
287
+ * Refer to our [integration guide](https://stripe.com/docs/payments/bank-transfers) for more details.
288
+ *
289
+ * 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.
290
+ * The confirmation attempt will finish in one of the following result states:
291
+ * 1. If the customer balance was enough to pay the amount, the status is succeeded. The funding_type data is effectively ignored.
292
+ * 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.
293
+ * 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.
294
+ *
295
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_customer_balance_payment
296
+ */
297
+ confirmCustomerBalancePayment(
298
+ clientSecret: string,
299
+ data: paymentIntents.ConfirmCustomerBalancePaymentData,
300
+ options: paymentIntents.ConfirmCustomerBalancePaymentOptions
301
+ ): Promise<PaymentIntentResult>;
302
+
303
+ /**
304
+ * 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.
305
+ * When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
306
+ * Once authorization is complete, the customer will be redirected back to your specified `return_url`.
307
+ *
308
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
309
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
310
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
311
+ *
312
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_eps_payment
313
+ */
314
+ confirmEpsPayment(
315
+ clientSecret: string,
316
+ data?: paymentIntents.ConfirmEpsPaymentData,
317
+ options?: paymentIntents.ConfirmEpsPaymentOptions
318
+ ): Promise<PaymentIntentResult>;
319
+
320
+ /**
321
+ * 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.
322
+ * When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
323
+ * Once authorization is complete, the customer will be redirected back to your specified `return_url`.
324
+ *
325
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
326
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
327
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
328
+ *
329
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_fpx_payment
330
+ */
331
+ confirmFpxPayment(
332
+ clientSecret: string,
333
+ data?: paymentIntents.ConfirmFpxPaymentData,
334
+ options?: paymentIntents.ConfirmFpxPaymentOptions
335
+ ): Promise<PaymentIntentResult>;
336
+
337
+ /**
338
+ * 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.
339
+ * When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
340
+ * Once authorization is complete, the customer will be redirected back to your specified `return_url`.
341
+ *
342
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
343
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
344
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
345
+ *
346
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_giropay_payment
347
+ */
348
+ confirmGiropayPayment(
349
+ clientSecret: string,
350
+ data?: paymentIntents.ConfirmGiropayPaymentData,
351
+ options?: paymentIntents.ConfirmGiropayPaymentOptions
352
+ ): Promise<PaymentIntentResult>;
353
+
354
+ /**
355
+ * Use `stripe.confirmGrabPayPayment` in the [GrabPay payments](https://stripe.com/docs/payments/grabpay) flow when the customer submits your payment form.
356
+ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents).
357
+ * Refer to our [integration guide](https://stripe.com/docs/payments/grabpay/accept-a-payment) for more details.
358
+ *
359
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_grabpay_payment
360
+ */
361
+
362
+ confirmGrabPayPayment(
363
+ clientSecret: string,
364
+ data?: paymentIntents.ConfirmGrabPayPaymentData,
365
+ options?: paymentIntents.ConfirmGrabPayPaymentOptions
366
+ ): Promise<PaymentIntentResult>;
367
+
368
+ /**
369
+ * Use `stripe.confirmIdealPayment` in the [iDEAL Payments with Payment Methods](https://stripe.com/docs/payments/ideal) flow when the customer submits your payment form.
370
+ * When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
371
+ * Once authorization is complete, the customer will be redirected back to your specified `return_url`.
372
+ *
373
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
374
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
375
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
376
+ *
377
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_ideal_payment
378
+ */
379
+ confirmIdealPayment(
380
+ clientSecret: string,
381
+ data?: paymentIntents.ConfirmIdealPaymentData,
382
+ options?: paymentIntents.ConfirmIdealPaymentOptions
383
+ ): Promise<PaymentIntentResult>;
384
+
385
+ /**
386
+ * Requires beta access:
387
+ * Contact [Stripe support](https://support.stripe.com/) for more information.
388
+ *
389
+ * Use `stripe.confirmKlarnaPayment` in the [Klarna Payments](https://stripe.com/docs/payments/klarna) with Payment Methods flow when the customer submits your payment form.
390
+ * 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.
391
+ * Once authorization is complete, the customer will be redirected back to your specified `return_url`.
392
+ *
393
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
394
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
395
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
396
+ *
397
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_klarna_payment
398
+ */
399
+ confirmKlarnaPayment(
400
+ clientSecret: string,
401
+ data?: paymentIntents.ConfirmKlarnaPaymentData,
402
+ options?: paymentIntents.ConfirmKlarnaPaymentOptions
403
+ ): Promise<PaymentIntentResult>;
404
+
405
+ /**
406
+ * Use `stripe.confirmKonbiniPayment` in the [Konbini](https://stripe.com/docs/payments/konbini) payment flow when the customer submits your payment form.
407
+ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
408
+ * Note that there are some additional requirements to this flow that are not covered in this reference.
409
+ * Refer to our [integration guide](https://stripe.com/docs/payments/konbini/accept-a-payment) for more details.
410
+ *
411
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
412
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
413
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
414
+ *
415
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_konbini_payment
416
+ */
417
+ confirmKonbiniPayment(
418
+ clientSecret: string,
419
+ data?: paymentIntents.ConfirmKonbiniPaymentData,
420
+ options?: paymentIntents.ConfirmKonbiniPaymentOptions
421
+ ): Promise<PaymentIntentResult>;
422
+
423
+ /**
424
+ * Use `stripe.confirmOxxoPayment` in the [OXXO Payment](https://stripe.com/docs/payments/oxxo) with Payment Methods flow when the customer submits your payment form.
425
+ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
426
+ * Note that there are some additional requirements to this flow that are not covered in this reference.
427
+ * Refer to our [integration guide](https://stripe.com/docs/payments/oxxo) for more details.
428
+ *
429
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
430
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
431
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
432
+ *
433
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_oxxo_payment
434
+ */
435
+ confirmOxxoPayment(
436
+ clientSecret: string,
437
+ data?: paymentIntents.ConfirmOxxoPaymentData,
438
+ options?: paymentIntents.ConfirmOxxoPaymentOptions
439
+ ): Promise<PaymentIntentResult>;
440
+
441
+ /**
442
+ * 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.
443
+ * When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
444
+ * Once authorization is complete, the customer will be redirected back to your specified `return_url`.
445
+ *
446
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
447
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
448
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
449
+ *
450
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_p24_payment
451
+ */
452
+ confirmP24Payment(
453
+ clientSecret: string,
454
+ data?: paymentIntents.ConfirmP24PaymentData,
455
+ options?: paymentIntents.ConfirmP24PaymentOptions
456
+ ): Promise<PaymentIntentResult>;
457
+
458
+ /**
459
+ * Requires beta access:
460
+ * Contact [Stripe support](https://support.stripe.com/) for more information.
461
+ *
462
+ * Use `stripe.confirmPayNowPayment` in the [PayNow Payments](https://stripe.com/docs/payments/paynow) with Payment Methods flow when the customer submits your payment form.
463
+ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
464
+ * Refer to our [integration guide](https://stripe.com/docs/payments/paynow) for more details.
465
+ *
466
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
467
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
468
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
469
+ */
470
+ confirmPayNowPayment(
471
+ clientSecret: string,
472
+ data?: paymentIntents.ConfirmPayNowPaymentData,
473
+ options?: paymentIntents.ConfirmPayNowPaymentOptions
474
+ ): Promise<PaymentIntentResult>;
475
+
476
+ /**
477
+ * Requires beta access:
478
+ * Contact [Stripe support](https://support.stripe.com/) for more information.
479
+ *
480
+ * Use `stripe.confirmPayPalPayment` in the [PayPal Payments](https://stripe.com/docs/payments/paypal) with Payment Methods flow when the customer submits your payment form.
481
+ * 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.
482
+ * Once authorization is complete, the customer will be redirected back to your specified `return_url`.
483
+ *
484
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
485
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
486
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
487
+ *
488
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_paypal_payment
489
+ */
490
+ confirmPayPalPayment(
491
+ clientSecret: string,
492
+ data?: paymentIntents.ConfirmPayPalPaymentData
493
+ ): Promise<PaymentIntentResult>;
494
+
495
+ /**
496
+
497
+ * Use `stripe.confirmPixPayment` in the [Pix Payments](https://stripe.com/docs/payments/pix) with Payment Methods flow when the customer submits your payment form.
498
+ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
499
+ * Refer to our [integration guide](https://stripe.com/docs/payments/pix) for more details.
500
+ *
501
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
502
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
503
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
504
+ *
505
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_pix_payment
506
+ */
507
+ confirmPixPayment(
508
+ clientSecret: string,
509
+ data?: paymentIntents.ConfirmPixPaymentData,
510
+ options?: paymentIntents.ConfirmPixPaymentOptions
511
+ ): Promise<PaymentIntentResult>;
512
+
513
+ /**
514
+ * Requires beta access:
515
+ * Contact [Stripe support](https://support.stripe.com/) for more information.
516
+ *
517
+ * Use `stripe.confirmPromptPayPayment` in the [PromptPay Payments](https://stripe.com/docs/payments/promptpay) with Payment Methods flow when the customer submits your payment form.
518
+ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
519
+ * Refer to our [integration guide](https://stripe.com/docs/payments/promptpay) for more details.
520
+ *
521
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
522
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
523
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
524
+ */
525
+ confirmPromptPayPayment(
526
+ clientSecret: string,
527
+ data?: paymentIntents.ConfirmPromptPayPaymentData,
528
+ options?: paymentIntents.ConfirmPromptPayPaymentOptions
529
+ ): Promise<PaymentIntentResult>;
530
+
531
+ /**
532
+ * 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.
533
+ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
534
+ * Note that there are some additional requirements to this flow that are not covered in this reference.
535
+ * Refer to our [integration guide](https://stripe.com/docs/payments/sepa-debit) for more details.
536
+ *
537
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
538
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
539
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
540
+ *
541
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_sepa_debit_payment
542
+ */
543
+ confirmSepaDebitPayment(
544
+ clientSecret: string,
545
+ data?: paymentIntents.ConfirmSepaDebitPaymentData
546
+ ): Promise<PaymentIntentResult>;
547
+
548
+ /**
549
+ * Use `stripe.confirmSofortPayment` in the [Sofort Payments with Payment Methods](https://stripe.com/docs/payments/sofort) flow when the customer submits your payment form.
550
+ * When called, it will confirm the `PaymentIntent` with `data` you provide. It will then automatically redirect the customer to authorize the transaction.
551
+ * Once authorization is complete, the customer will be redirected back to your specified `return_url`.
552
+ *
553
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
554
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
555
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
556
+ *
557
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_sofort_payment
558
+ */
559
+ confirmSofortPayment(
560
+ clientSecret: string,
561
+ data?: paymentIntents.ConfirmSofortPaymentData,
562
+ options?: paymentIntents.ConfirmSofortPaymentOptions
563
+ ): Promise<PaymentIntentResult>;
564
+
565
+ /**
566
+ * Requires beta access:
567
+ * Contact [Stripe support](https://support.stripe.com/) for more information.
568
+ *
569
+ * 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.
570
+ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
571
+ * Refer to our [integration guide](https://stripe.com/docs/payments/wechat-pay/accept-a-payment) for more details.
572
+ *
573
+ * When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
574
+ * In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
575
+ * If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
576
+ *
577
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_wechat_pay_payment
578
+ */
579
+ confirmWechatPayPayment(
580
+ clientSecret: string,
581
+ data?: paymentIntents.ConfirmWechatPayPaymentData,
582
+ options?: paymentIntents.ConfirmWechatPayPaymentOptions
583
+ ): Promise<PaymentIntentResult>;
584
+
585
+ /**
586
+ * 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.
587
+ * It will throw an error if the `PaymentIntent` has a different status.
588
+ *
589
+ * Note that `stripe.handleCardAction` may take several seconds to complete.
590
+ * During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.
591
+ * 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.
592
+ *
593
+ * Additionally, `stripe.handleCardAction` may trigger a [3D Secure](https://stripe.com/docs/payments/3d-secure) authentication challenge.
594
+ * The authentication challenge requires a context switch that can be hard to follow on a screen-reader.
595
+ * Ensure that your form is accessible by ensuring that success or error messages are clearly read out.
596
+ *
597
+ * @docs https://stripe.com/docs/js/payment_intents/handle_card_action
598
+ */
599
+ handleCardAction(clientSecret: string): Promise<PaymentIntentResult>;
600
+
601
+ /**
602
+ * 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.
603
+ * It will throw an error if the `PaymentIntent` or `SetupIntent` has a different status.
604
+ *
605
+ * Note that `stripe.handleNextAction` may take several seconds to complete.
606
+ * During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner.
607
+ * 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.
608
+ *
609
+ * Additionally, `stripe.handleNextAction` may trigger a [3D Secure](https://stripe.com/docs/payments/3d-secure) authentication challenge.
610
+ * The authentication challenge requires a context switch that can be hard to follow on a screen-reader.
611
+ * Ensure that your form is accessible by ensuring that success or error messages are clearly read out.
612
+ *
613
+ * @docs https://stripe.com/docs/js/payment_intents/handle_next_action
614
+ */
615
+ handleNextAction(options: {
616
+ clientSecret: string;
617
+ }): Promise<PaymentIntentOrSetupIntentResult>;
618
+
619
+ /**
620
+ * Use `stripe.verifyMicrodepositsForPayment` in the [Accept a Canadian pre-authorized debit payment](https://stripe.com/docs/payments/acss-debit/accept-a-payment) flow
621
+ * to verify a customer's bank account with micro-deposits.
622
+ *
623
+ * @docs https://stripe.com/docs/js/payment_intents/verify_microdeposits_for_payment
624
+ */
625
+ verifyMicrodepositsForPayment(
626
+ clientSecret: string,
627
+ data?: paymentIntents.VerifyMicrodepositsForPaymentData
628
+ ): Promise<PaymentIntentResult>;
629
+
630
+ /**
631
+ * Use stripe.createRadarSession to create a [Radar Session](https://stripe.com/docs/radar/radar-session) in your checkout flow or when saving card details.
632
+ * A Radar Session is a snapshot of the browser metadata and device details that helps Radar make more accurate predictions on your payments.
633
+ * This metadata includes information like IP address, browser, screen or device information, and other device characteristics.
634
+ * By using Radar Sessions, you can capture critical fraud information without tokenizing on Stripe.
635
+ */
636
+ createRadarSession(): Promise<RadarSessionPayload>;
637
+
638
+ /**
639
+ * 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)
640
+ * payment method to collect the customer’s bank account in your payment form.
641
+ *
642
+ * @docs https://stripe.com/docs/js/payment_intents/collect_bank_account_for_payment
643
+ */
644
+ collectBankAccountForPayment(
645
+ options: paymentIntents.CollectBankAccountForPaymentOptions
646
+ ): Promise<PaymentIntentResult>;
647
+
648
+ /**
649
+ * 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.
650
+ *
651
+ * @docs https://stripe.com/docs/js/payment_methods/create_payment_method
652
+ */
653
+ createPaymentMethod(
654
+ paymentMethodData: paymentIntents.CreatePaymentMethodData
655
+ ): Promise<PaymentMethodResult>;
656
+
657
+ /**
658
+ * 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.
659
+ *
660
+ * @docs https://stripe.com/docs/js/payment_methods/create_payment_method_elements
661
+ */
662
+ createPaymentMethod(
663
+ options: paymentIntents.CreatePaymentMethodFromElements
664
+ ): Promise<PaymentMethodResult>;
665
+
666
+ /**
667
+ * 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.
668
+ *
669
+ * @docs https://stripe.com/docs/js/payment_methods/create_payment_method_elements
670
+ */
671
+ createPaymentMethod(
672
+ options: paymentIntents.CreatePaymentMethodFromElement
673
+ ): Promise<PaymentMethodResult>;
674
+
675
+ /**
676
+ * 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.
677
+ *
678
+ * @docs https://stripe.com/docs/js/confirmation_tokens/create_confirmation_token
679
+ */
680
+ createConfirmationToken(
681
+ options: confirmationTokens.CreateConfirmationToken
682
+ ): Promise<ConfirmationTokenResult>;
683
+
684
+ /**
685
+ * 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).
686
+ *
687
+ * @docs https://stripe.com/docs/js/payment_intents/retrieve_payment_intent
688
+ */
689
+ retrievePaymentIntent(clientSecret: string): Promise<PaymentIntentResult>;
690
+
691
+ /////////////////////////////
692
+ /// Setup Intents
693
+ ///
694
+ /// https://stripe.com/docs/js/setup_intents
695
+ /////////////////////////////
696
+
697
+ /**
698
+ * Use `stripe.confirmSetup` to confirm a SetupIntent using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
699
+ * 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.
700
+ * Your user will be redirected to the return_url you pass once the confirmation is complete.
701
+ *
702
+ * By default, stripe.`confirmSetup` will always redirect to your return_url after a successful confirmation.
703
+ * If you set `redirect: "if_required"`, then `stripe.confirmSetup` will only redirect if your user chooses a redirect-based payment method.
704
+ * Setting `if_required` requires that you handle successful confirmations for redirect-based and non-redirect based payment methods separately.
705
+ *
706
+ * @docs https://stripe.com/docs/js/setup_intents/confirm_setup
707
+ */
708
+ confirmSetup(options: {
709
+ elements: StripeElements;
710
+ confirmParams?: Partial<paymentIntents.ConfirmPaymentData>;
711
+ redirect: 'if_required';
712
+ }): Promise<SetupIntentResult>;
713
+
714
+ /**
715
+ * Use `stripe.confirmSetup` to confirm a SetupIntent using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
716
+ * 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.
717
+ * Your user will be redirected to the return_url you pass once the confirmation is complete.
718
+ *
719
+ * By default, stripe.`confirmSetup` will always redirect to your return_url after a successful confirmation.
720
+ * If you set `redirect: "if_required"`, then `stripe.confirmSetup` will only redirect if your user chooses a redirect-based payment method.
721
+ * Setting `if_required` requires that you handle successful confirmations for redirect-based and non-redirect based payment methods separately.
722
+ *
723
+ * @docs https://stripe.com/docs/js/setup_intents/confirm_setup
724
+ */
725
+ confirmSetup(options: {
726
+ elements?: StripeElements;
727
+ clientSecret: string;
728
+ confirmParams?: Partial<paymentIntents.ConfirmPaymentData>;
729
+ redirect: 'if_required';
730
+ }): Promise<SetupIntentResult>;
731
+
732
+ /**
733
+ * Use `stripe.confirmSetup` to confirm a SetupIntent using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
734
+ * 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.
735
+ * Your user will be redirected to the return_url you pass once the confirmation is complete.
736
+ *
737
+ * @docs https://stripe.com/docs/js/setup_intents/confirm_setup
738
+ */
739
+ confirmSetup(options: {
740
+ elements: StripeElements;
741
+ confirmParams: paymentIntents.ConfirmPaymentData;
742
+ redirect?: 'always';
743
+ }): Promise<never | {error: StripeError}>;
744
+
745
+ /**
746
+ * Use `stripe.confirmSetup` to confirm a SetupIntent using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
747
+ * 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.
748
+ * Your user will be redirected to the return_url you pass once the confirmation is complete.
749
+ *
750
+ * @docs https://stripe.com/docs/js/setup_intents/confirm_setup
751
+ */
752
+ confirmSetup(options: {
753
+ elements?: StripeElements;
754
+ clientSecret: string;
755
+ confirmParams: paymentIntents.ConfirmPaymentData;
756
+ redirect?: 'always';
757
+ }): Promise<never | {error: StripeError}>;
758
+
759
+ /**
760
+ * 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).
761
+ * 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.
762
+ *
763
+ * When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
764
+ * `stripe.confirmAcssDebitSetup` automatically creates a new `PaymentMethod` for you when your customer completes the modal UI.
765
+ * It can also be called with an existing `PaymentMethod` which will load the modal UI to collect a new mandate agreement.
766
+ * If you have already attached a `PaymentMethod`, you can call this method without needing to provide any additional data.
767
+ *
768
+ * @docs https://stripe.com/docs/js/setup_intents/confirm_acss_debit_setup
769
+ */
770
+ confirmAcssDebitSetup(
771
+ clientSecret: string,
772
+ data?: setupIntents.ConfirmAcssDebitSetupData,
773
+ options?: setupIntents.ConfirmAcssDebitSetupOptions
774
+ ): Promise<SetupIntentResult>;
775
+
776
+ /**
777
+ * 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.
778
+ *
779
+ * When you confirm a [SetupIntent](https://stripe.com/docs/api/setup_intents), it needs to have an attached PaymentMethod.
780
+ * 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.
781
+ *
782
+ * @docs https://stripe.com/docs/js/setup_intents/confirm_us_bank_account_setup
783
+ */
784
+ confirmUsBankAccountSetup(
785
+ clientSecret: string,
786
+ data?: setupIntents.ConfirmUsBankAccountSetupData
787
+ ): Promise<SetupIntentResult>;
788
+
789
+ /**
790
+ * Requires beta access:
791
+ * Contact [Stripe support](https://support.stripe.com/) for more information.
792
+ *
793
+ * 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.
794
+ * When called, it will confirm the `SetupIntent` with `data` you provide.
795
+ * Note that there are some additional requirements to this flow that are not covered in this reference.
796
+ * Refer to our [integration guide](https://stripe.com/docs/payments/payment-methods/au-becs-debit-quickstart-setup-intents) for more details.
797
+ *
798
+ * When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
799
+ * In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
800
+ * 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.
801
+ *
802
+ * @docs https://stripe.com/docs/js/setup_intents/confirm_au_becs_debit_setup
803
+ */
804
+ confirmAuBecsDebitSetup(
805
+ clientSecret: string,
806
+ data?: setupIntents.ConfirmAuBecsDebitSetupData
807
+ ): Promise<SetupIntentResult>;
808
+
809
+ /**
810
+ * 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.
811
+ * When called, it will confirm the [SetupIntent](https://stripe.com/docs/api/setup_intents) with `data` you provide.
812
+ * Note that there are some additional requirements to this flow that are not covered in this reference.
813
+ * Refer to our [integration guide](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.
814
+ *
815
+ * When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
816
+ * In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
817
+ * 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.
818
+ *
819
+ * @docs https://stripe.com/docs/js/setup_intents/confirm_bacs_debit_setup
820
+ */
821
+ confirmBacsDebitSetup(
822
+ clientSecret: string,
823
+ data?: setupIntents.ConfirmBacsDebitSetupData
824
+ ): Promise<SetupIntentResult>;
825
+
826
+ /**
827
+ * 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.
828
+ * When called, it will confirm a `SetupIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
829
+ * Once authorization is complete, the customer will be redirected back to your specified `return_url`.
830
+ * Note that there are some additional requirements to this flow that are not covered in this reference.
831
+ * Refer to our [integration guide](https://stripe.com/docs/payments/bancontact/set-up-payment) for more details.
832
+ *
833
+ * When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
834
+ * In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
835
+ * 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.
836
+ *
837
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_bancontact_setup
838
+ */
839
+ confirmBancontactSetup(
840
+ clientSecret: string,
841
+ data?: setupIntents.ConfirmBancontactSetupData
842
+ ): Promise<SetupIntentResult>;
843
+
844
+ /**
845
+ * Use `stripe.confirmCardSetup` in the [Setup Intents API flow](https://stripe.com/docs/payments/save-and-reuse) when the customer submits your payment form.
846
+ * 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.
847
+ *
848
+ * When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
849
+ * In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
850
+ * 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.
851
+ *
852
+ * @docs https://stripe.com/docs/js/setup_intents/confirm_card_setup
853
+ */
854
+ confirmCardSetup(
855
+ clientSecret: string,
856
+ data?: setupIntents.ConfirmCardSetupData,
857
+ options?: setupIntents.ConfirmCardSetupOptions
858
+ ): Promise<SetupIntentResult>;
859
+
860
+ /**
861
+ * Use `stripe.confirmCashappSetup` in the [Setup Intents API flow](https://stripe.com/docs/payments/save-and-reuse) when the customer submits your payment form.
862
+ * When called, it will confirm the [SetupIntent](https://stripe.com/docs/api/setup_intents) with `data` you provide.
863
+ * Refer to our [integration guide](https://stripe.com/docs/payments/cash-app-pay) for more details..
864
+ *
865
+ * When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
866
+ * In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
867
+ * 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.
868
+ *
869
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_cashapp_setup
870
+ */
871
+ confirmCashappSetup(
872
+ clientSecret: string,
873
+ data?: setupIntents.ConfirmCashappSetupData,
874
+ options?: setupIntents.ConfirmCashappSetupOptions
875
+ ): Promise<SetupIntentResult>;
876
+
877
+ /**
878
+ * 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.
879
+ * When called, it will confirm a `SetupIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
880
+ * Once authorization is complete, the customer will be redirected back to your specified `return_url`.
881
+ * Note that there are some additional requirements to this flow that are not covered in this reference.
882
+ * Refer to our [integration guide](https://stripe.com/docs/payments/ideal/set-up-payment) for more details.
883
+ *
884
+ * When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
885
+ * In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
886
+ * 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.
887
+ *
888
+ * @docs https://stripe.com/docs/js/setup_intents/confirm_ideal_setup
889
+ */
890
+ confirmIdealSetup(
891
+ clientSecret: string,
892
+ data?: setupIntents.ConfirmIdealSetupData
893
+ ): Promise<SetupIntentResult>;
894
+
895
+ /**
896
+ * 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.
897
+ * When called, it will confirm a `SetupIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
898
+ * Once authorization is complete, the customer will be redirected back to your specified `return_url`.
899
+ * Note that there are some additional requirements to this flow that are not covered in this reference.
900
+ * Refer to our [integration guide](https://stripe.com/docs/payments/paypal/set-up-future-payments) for more details.
901
+ *
902
+ * When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
903
+ * In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
904
+ * 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.
905
+ *
906
+ * @docs https://stripe.com/docs/js/setup_intents/confirm_paypal_setup
907
+ */
908
+ confirmPayPalSetup(
909
+ clientSecret: string,
910
+ data?: setupIntents.ConfirmPayPalSetupData
911
+ ): Promise<SetupIntentResult>;
912
+
913
+ /**
914
+ * 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.
915
+ * When called, it will confirm the `SetupIntent` with `data` you provide.
916
+ * Note that there are some additional requirements to this flow that are not covered in this reference.
917
+ * Refer to our [integration guide](https://stripe.com/docs/payments/sepa-debit-setup-intents) for more details.
918
+ *
919
+ * When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
920
+ * In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
921
+ * 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.
922
+ *
923
+ * @docs https://stripe.com/docs/js/setup_intents/confirm_sepa_debit_setup
924
+ */
925
+ confirmSepaDebitSetup(
926
+ clientSecret: string,
927
+ data?: setupIntents.ConfirmSepaDebitSetupData
928
+ ): Promise<SetupIntentResult>;
929
+
930
+ /*
931
+ * 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.
932
+ * When called, it will confirm a `SetupIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
933
+ * Once authorization is complete, the customer will be redirected back to your specified `return_url`.
934
+ * Note that there are some additional requirements to this flow that are not covered in this reference.
935
+ * Refer to our [integration guide](https://stripe.com/docs/payments/sofort/set-up-payment) for more details.
936
+ *
937
+ * When you confirm a `SetupIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
938
+ * In addition to confirming the `SetupIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
939
+ * 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.
940
+ */
941
+ confirmSofortSetup(
942
+ clientSecret: string,
943
+ data?: setupIntents.ConfirmSofortSetupData,
944
+ options?: setupIntents.ConfirmSofortSetupOptions
945
+ ): Promise<SetupIntentResult>;
946
+
947
+ /**
948
+ * Use `stripe.confirmAffirmPayment` in the [Affirm payments](https://stripe.com/docs/payments/affirm) flow when the customer submits your payment form.
949
+ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents).
950
+ * Refer to our [integration guide](https://stripe.com/docs/payments/affirm/accept-a-payment) for more details.
951
+ *
952
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_affirm_payment
953
+ */
954
+
955
+ confirmAffirmPayment(
956
+ clientSecret: string,
957
+ data?: paymentIntents.ConfirmAffirmPaymentData,
958
+ options?: paymentIntents.ConfirmAffirmPaymentOptions
959
+ ): Promise<PaymentIntentResult>;
960
+
961
+ /**
962
+ * Use `stripe.confirmAfterpayClearpayPayment` in the [Afterpay / Clearpay payments](https://stripe.com/docs/payments/afterpay-clearpay) flow when the customer submits your payment form.
963
+ * When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents).
964
+ * Refer to our [integration guide](https://stripe.com/docs/payments/afterpay-clearpay/accept-a-payment) for more details.
965
+ *
966
+ * @docs https://stripe.com/docs/js/payment_intents/confirm_afterpay_clearpay_payment
967
+ */
968
+
969
+ confirmAfterpayClearpayPayment(
970
+ clientSecret: string,
971
+ data?: paymentIntents.ConfirmAfterpayClearpayPaymentData,
972
+ options?: paymentIntents.ConfirmAfterpayClearpayPaymentOptions
973
+ ): Promise<PaymentIntentResult>;
974
+
975
+ /**
976
+ * Use `stripe.verifyMicrodepositsForSetup` in the [Save details for future payments with pre-authorized debit in Canada](https://stripe.com/docs/payments/acss-debit/set-up-payment) flow
977
+ * to verify customer's bank account with micro-deposits.
978
+ *
979
+ * @docs https://stripe.com/docs/js/payment_intents/verify_microdeposits_for_setup
980
+ */
981
+ verifyMicrodepositsForSetup(
982
+ clientSecret: string,
983
+ data?: setupIntents.VerifyMicrodepositsForSetupData
984
+ ): Promise<SetupIntentResult>;
985
+
986
+ /**
987
+ * Use `stripe.collectBankAccountForSetup` in the [Save bank details](https://stripe.com/docs/payments/ach-debit/set-up-payment) flow for the [ACH Direct Debit](https://stripe.com/docs/payments/ach-debit)
988
+ * payment method to collect the customer’s bank account in your payment form.
989
+ *
990
+ * @docs https://stripe.com/docs/js/setup_intents/collect_bank_account_for_setup
991
+ */
992
+ collectBankAccountForSetup(
993
+ options: setupIntents.CollectBankAccountForSetupOptions
994
+ ): Promise<SetupIntentResult>;
995
+
996
+ /**
997
+ * Retrieve a [SetupIntent](https://stripe.com/docs/api/setup_intents) using its client secret.
998
+ *
999
+ * @docs https://stripe.com/docs/js/setup_intents/retrieve_setup_intent
1000
+ */
1001
+ retrieveSetupIntent(clientSecret: string): Promise<SetupIntentResult>;
1002
+
1003
+ /////////////////////////////
1004
+ /// Orders
1005
+ ///
1006
+ /// https://stripe.com/docs/js/orders
1007
+ /////////////////////////////
1008
+
1009
+ /**
1010
+ * Use `stripe.processOrder` to submit and confirm payment for an [Order](https://stripe.com/docs/api/orders_v2) using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
1011
+ * When called, `stripe.processOrder` will attempt to complete any required actions, such as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page.
1012
+ * Your user will be redirected to the return_url you pass once the confirmation is complete.
1013
+ *
1014
+ * By default, `stripe.processOrder` will always redirect to your return_url after a successful confirmation.
1015
+ * If you set `redirect: "if_required"`, then `stripe.processOrder` will only redirect if your user chooses a redirect-based method.
1016
+ * Setting `if_required` requires that you handle successful confirmations for redirect-based and non-redirect based payment methods separately.
1017
+ *
1018
+ * @docs https://stripe.com/docs/js/orders/process_order
1019
+ */
1020
+ processOrder(options: {
1021
+ elements: StripeElements;
1022
+ confirmParams?: Partial<orders.ProcessOrderParams>;
1023
+ redirect: 'if_required';
1024
+ }): Promise<ProcessOrderResult>;
1025
+
1026
+ /**
1027
+ * Use `stripe.processOrder` to submit and confirm payment for an [Order](https://stripe.com/docs/api/orders_v2) using data collected by the [Payment Element](https://stripe.com/docs/js/element/payment_element).
1028
+ * When called, `stripe.processOrder` will attempt to complete any required actions, such as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page.
1029
+ * Your user will be redirected to the return_url you pass once the confirmation is complete.
1030
+ *
1031
+ * @docs https://stripe.com/docs/js/orders/process_order
1032
+ */
1033
+ processOrder(options: {
1034
+ elements: StripeElements;
1035
+ confirmParams: orders.ProcessOrderParams;
1036
+ redirect?: 'always';
1037
+ }): Promise<never | {error: StripeError}>;
1038
+
1039
+ /**
1040
+ * Retrieve an [Order](https://stripe.com/docs/api/orders_v2) using its [client secret](https://stripe.com/docs/api/orders_v2/object#order_v2_object-client_secret).
1041
+ *
1042
+ * @docs https://stripe.com/docs/js/orders/retrieve_order
1043
+ */
1044
+ retrieveOrder(clientSecret: string): Promise<RetrieveOrderResult>;
1045
+
1046
+ /////////////////////////////
1047
+ /// Payment Request
1048
+ ///
1049
+ /// https://stripe.com/docs/js/payment_request
1050
+ /////////////////////////////
1051
+
1052
+ /**
1053
+ * Use `stripe.paymentRequest` to create a `PaymentRequest` object.
1054
+ * Creating a `PaymentRequest` requires that you configure it with an `options` object.
1055
+ *
1056
+ * In Safari, `stripe.paymentRequest` uses Apple Pay, and in other browsers it uses the [Payment Request API standard](https://www.w3.org/TR/payment-request/).
1057
+ */
1058
+ paymentRequest(options: PaymentRequestOptions): PaymentRequest;
1059
+
1060
+ /////////////////////////////
1061
+ /// Token and Sources
1062
+ ///
1063
+ /// https://stripe.com/docs/js/tokens_sources
1064
+ /////////////////////////////
1065
+
1066
+ /**
1067
+ * Use `stripe.createToken` to convert information collected by an `IbanElement` into a single-use [Token](https://stripe.com/docs/api#tokens) that you safely pass to your server to use in an API call.
1068
+ *
1069
+ * @docs https://stripe.com/docs/js/tokens_sources/create_token?type=ibanElement
1070
+ */
1071
+ createToken(
1072
+ tokenType: elements.StripeIbanElement,
1073
+ data: tokens.CreateTokenIbanData
1074
+ ): Promise<TokenResult>;
1075
+
1076
+ /**
1077
+ * Use `stripe.createToken` to convert information collected by card elements into a single-use [Token](https://stripe.com/docs/api#tokens) that you safely pass to your server to use in an API call.
1078
+ *
1079
+ * @docs https://stripe.com/docs/js/tokens_sources/create_token?type=cardElement
1080
+ */
1081
+ createToken(
1082
+ tokenType: elements.StripeCardElement | elements.StripeCardNumberElement,
1083
+ data?: tokens.CreateTokenCardData
1084
+ ): Promise<TokenResult>;
1085
+
1086
+ /**
1087
+ * Use `stripe.createToken` to convert personally identifiable information (PII) into a single-use [Token](https://stripe.com/docs/api#tokens) for account identity verification.
1088
+ *
1089
+ * @docs https://stripe.com/docs/js/tokens_sources/create_token?type=pii
1090
+ */
1091
+ createToken(
1092
+ tokenType: 'pii',
1093
+ data: tokens.CreateTokenPiiData
1094
+ ): Promise<TokenResult>;
1095
+
1096
+ /**
1097
+ * Use `stripe.createToken` to convert bank account information into a single-use token that you safely pass to your server to use in an API call.
1098
+ *
1099
+ * @docs https://stripe.com/docs/js/tokens_sources/create_token?type=bank_account
1100
+ */
1101
+ createToken(
1102
+ tokenType: 'bank_account',
1103
+ data: tokens.CreateTokenBankAccountData
1104
+ ): Promise<TokenResult>;
1105
+
1106
+ /**
1107
+ * Use `stripe.createToken` to tokenize the recollected CVC for a saved card.
1108
+
1109
+ * First, render a `CardCvcElement` to collect the data.
1110
+ * Then pass the `CardCvcElement` to `stripe.createToken` to tokenize the collected data.
1111
+ *
1112
+ * @docs https://stripe.com/docs/js/tokens_sources/create_token?type=cvc_update
1113
+ */
1114
+ createToken(
1115
+ tokenType: 'cvc_update',
1116
+ element: elements.StripeCardCvcElement
1117
+ ): Promise<TokenResult>;
1118
+
1119
+ /**
1120
+ * Use `stripe.createToken` to create a single-use token that wraps a user’s legal entity information.
1121
+ * Use this when creating or updating a Connect account.
1122
+ * See the [account tokens documentation](https://stripe.com/docs/connect/account-tokens) to learn more.
1123
+ */
1124
+ createToken(
1125
+ tokenType: 'account',
1126
+ data: api.TokenCreateParams.Account
1127
+ ): Promise<TokenResult>;
1128
+
1129
+ /**
1130
+ * Use `stripe.createToken` to create a single-use token that represents the details for a person.
1131
+ * Use this when creating or updating persons associated with a Connect account.
1132
+ * See the [documentation](https://stripe.com/docs/connect/account-tokens) to learn more.
1133
+ */
1134
+ createToken(
1135
+ tokenType: 'person',
1136
+ data: api.TokenCreateParams.Person
1137
+ ): Promise<TokenResult>;
1138
+
1139
+ /**
1140
+ * Use `stripe.createSource` to convert payment information collected by elements into a `Source` object that you safely pass to your server to use in an API call.
1141
+ * See the [Sources documentation](https://stripe.com/docs/sources) for more information about sources.
1142
+ */
1143
+ createSource(
1144
+ element: StripeElement,
1145
+ sourceData: tokens.CreateSourceData
1146
+ ): Promise<SourceResult>;
1147
+
1148
+ /**
1149
+ * Use `stripe.createSource` to convert raw payment information into a `Source` object that you safely pass to your server to use in an API call.
1150
+ * See the [Sources documentation](https://stripe.com/docs/sources) for more information about sources.
1151
+ */
1152
+ createSource(sourceData: tokens.CreateSourceData): Promise<SourceResult>;
1153
+
1154
+ /**
1155
+ * Retrieve a [Source](https://stripe.com/docs/api#sources) using its unique ID and client secret.
1156
+ *
1157
+ * @docs https://stripe.com/docs/js/tokens_sources/retrieve_source
1158
+ */
1159
+ retrieveSource(source: tokens.RetrieveSourceParam): Promise<SourceResult>;
1160
+
1161
+ /////////////////////////////
1162
+ /// Analytics
1163
+ ///
1164
+ /////////////////////////////
1165
+
1166
+ /**
1167
+ * Use `stripe.registerAppInfo` to register a frontend open source library.
1168
+ */
1169
+ registerAppInfo(wrapperLibrary: WrapperLibrary): void;
1170
+
1171
+ /////////////////////////////
1172
+ /// Identity
1173
+ ///
1174
+ /////////////////////////////
1175
+
1176
+ /**
1177
+ * Use `stripe.verifyIdentity` to display an [Identity](https://stripe.com/docs/identity) modal that securely collects verification information.
1178
+ *
1179
+ * * @docs https://stripe.com/docs/js/identity/modal
1180
+ */
1181
+ verifyIdentity(clientSecret: string): Promise<VerificationSessionResult>;
1182
+
1183
+ /////////////////////////////
1184
+ /// Financial Connections
1185
+ ///
1186
+ /////////////////////////////
1187
+
1188
+ /**
1189
+ * Use `stripe.collectFinancialConnectionsAccounts` to display a [Financial Connections](https://stripe.com/docs/financial-connections) modal that lets you securely collect financial accounts.
1190
+ *
1191
+ * * @docs https://stripe.com/docs/js/financial_connections/collect_financial_connections_accounts
1192
+ */
1193
+ collectFinancialConnectionsAccounts(
1194
+ options: financialConnections.CollectFinancialConnectionsAccountsOptions
1195
+ ): Promise<FinancialConnectionsSessionResult>;
1196
+
1197
+ /**
1198
+ * Use `stripe.collectBankAccountToken` to display a [Financial Connections](https://stripe.com/docs/financial-connections) modal that lets you securely collect a [Bank Account Token](https://stripe.com/docs/api/tokens/object).
1199
+ *
1200
+ * * @docs https://stripe.com/docs/js/financial_connections/collect_bank_account_token
1201
+ */
1202
+ collectBankAccountToken(
1203
+ options: financialConnections.CollectBankAccountTokenOptions
1204
+ ): Promise<CollectBankAccountTokenResult>;
1205
+
1206
+ /**
1207
+ * Use `stripe.createEphemeralKeyNonce` to create an ephemeral key nonce that lets you securely create ephemeral keys
1208
+ *
1209
+ * * @docs https://stripe.com/docs/js/issuing/create_ephemeral_key_nonce
1210
+ */
1211
+ createEphemeralKeyNonce(
1212
+ options: ephemeralKeys.EphemeralKeyNonceOptions
1213
+ ): Promise<EphemeralKeyNonceResult>;
1214
+
1215
+ /**
1216
+ * Requires beta access:
1217
+ * Contact [Stripe support](https://support.stripe.com/) for more information.
1218
+ */
1219
+ initCustomCheckout(
1220
+ options: StripeCustomCheckoutOptions
1221
+ ): Promise<StripeCustomCheckout>;
1222
+
1223
+ /**
1224
+ * Use `stripe.initEmbeddedCheckout` to initialize an embedded Checkout instance
1225
+ *
1226
+ * * @docs https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=embedded-checkout
1227
+ */
1228
+ initEmbeddedCheckout(
1229
+ options: StripeEmbeddedCheckoutOptions
1230
+ ): Promise<StripeEmbeddedCheckout>;
1231
+ }
1232
+
1233
+ export type PaymentIntentResult =
1234
+ | {paymentIntent: api.PaymentIntent; error?: undefined}
1235
+ | {paymentIntent?: undefined; error: StripeError};
1236
+
1237
+ export type SetupIntentResult =
1238
+ | {setupIntent: api.SetupIntent; error?: undefined}
1239
+ | {setupIntent?: undefined; error: StripeError};
1240
+
1241
+ export type PaymentIntentOrSetupIntentResult =
1242
+ | {
1243
+ paymentIntent: api.PaymentIntent;
1244
+ setupIntent?: undefined;
1245
+ error?: undefined;
1246
+ }
1247
+ | {paymentIntent?: undefined; setupIntent: api.SetupIntent; error?: undefined}
1248
+ | {paymentIntent?: undefined; setupIntent?: undefined; error: StripeError};
1249
+
1250
+ export type ProcessOrderResult =
1251
+ | {paymentIntent: api.PaymentIntent; order: api.Order; error?: undefined}
1252
+ | {paymentIntent?: undefined; order: api.Order; error?: undefined}
1253
+ | {paymentIntent?: undefined; order?: undefined; error: StripeError};
1254
+
1255
+ export type RetrieveOrderResult =
1256
+ | {order: api.Order; error?: undefined}
1257
+ | {order?: undefined; error: StripeError};
1258
+
1259
+ export type PaymentMethodResult =
1260
+ | {paymentMethod: api.PaymentMethod; error?: undefined}
1261
+ | {paymentMethod?: undefined; error: StripeError};
1262
+
1263
+ export type ConfirmationTokenResult =
1264
+ | {confirmationToken: api.ConfirmationToken; error?: undefined}
1265
+ | {confirmationToken?: undefined; error: StripeError};
1266
+
1267
+ export type SourceResult =
1268
+ | {source: api.Source; error?: undefined}
1269
+ | {source?: undefined; error: StripeError};
1270
+
1271
+ export type TokenResult =
1272
+ | {token: api.Token; error?: undefined}
1273
+ | {token?: undefined; error: StripeError};
1274
+
1275
+ export type VerificationSessionResult =
1276
+ | {verificationSession: api.VerificationSession; error?: undefined}
1277
+ | {verificationSession?: undefined; error: StripeError};
1278
+
1279
+ export type FinancialConnectionsSessionResult =
1280
+ | {
1281
+ financialConnectionsSession: api.FinancialConnectionsSession;
1282
+ error?: undefined;
1283
+ }
1284
+ | {financialConnectionsSession: undefined; error: StripeError};
1285
+
1286
+ export type CollectBankAccountTokenResult =
1287
+ | {
1288
+ financialConnectionsSession: api.FinancialConnectionsSession;
1289
+ token: api.BankAccountToken;
1290
+ error?: undefined;
1291
+ }
1292
+ | {
1293
+ financialConnectionsSession: undefined;
1294
+ token: undefined;
1295
+ error: StripeError;
1296
+ };
1297
+
1298
+ export type EphemeralKeyNonceResult =
1299
+ | {nonce: string; error?: undefined}
1300
+ | {nonce?: undefined; error: StripeError};
1301
+
1302
+ /* A Radar Session is a snapshot of the browser metadata and device details that helps Radar make more accurate predictions on your payments.
1303
+ This metadata includes information like IP address, browser, screen or device information, and other device characteristics.
1304
+ You can find more details about how Radar uses this data by reading about how Radar performs [advanced fraud detection](https://stripe.com/docs/disputes/prevention/advanced-fraud-detection).
1305
+ */
1306
+ export type RadarSessionPayload =
1307
+ | {radarSession: Record<any, any>; error?: undefined}
1308
+ | {radarSession?: undefined; error: StripeError};
1309
+
1310
+ export interface WrapperLibrary {
1311
+ /**
1312
+ * Your library’s name, maximum length is 30
1313
+ */
1314
+ name: string;
1315
+
1316
+ /**
1317
+ * Required for Stripe Verified Partners, optional otherwise
1318
+ * Your Partner ID from the Partners section of the Dashboard
1319
+ */
1320
+ partner_id?: string;
1321
+
1322
+ /**
1323
+ * Your library's version, in the format of x.x.x
1324
+ */
1325
+ version?: string;
1326
+
1327
+ /**
1328
+ * The URL for your library's website with your contact details
1329
+ */
1330
+ url?: string;
1331
+ }
1332
+
1333
+ /**
1334
+ * Use `Stripe(publishableKey, options?)` to create an instance of the `Stripe` object.
1335
+ * The Stripe object is your entrypoint to the rest of the Stripe.js SDK.
1336
+ *
1337
+ * Your Stripe publishable [API key](https://stripe.com/docs/keys) is required when calling this function, as it identifies your website to Stripe.
1338
+ *
1339
+ * When you’re ready to accept live payments, replace the test key with your live key in production.
1340
+ * Learn more about how API keys work in [test mode and live mode](https://stripe.com/docs/dashboard#viewing-test-data).
1341
+ */
1342
+ export interface StripeConstructor {
1343
+ (
1344
+ /**
1345
+ * Your publishable key.
1346
+ */
1347
+ publishableKey: string,
1348
+
1349
+ /**
1350
+ * Initialization options.
1351
+ */
1352
+ options?: StripeConstructorOptions
1353
+ ): Stripe;
1354
+ }
1355
+
1356
+ export interface StripeConstructorOptions {
1357
+ /**
1358
+ * For usage with [Connect](https://stripe.com/docs/connect) only.
1359
+ * Specifying a connected account ID (e.g., `acct_24BFMpJ1svR5A89k`) allows you to perform actions on behalf of that account.
1360
+ */
1361
+ stripeAccount?: string;
1362
+
1363
+ /**
1364
+ * Override your account's [API version](https://stripe.com/docs/api/versioning).
1365
+ */
1366
+ apiVersion?: string;
1367
+
1368
+ /**
1369
+ * The [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) used to globally configure localization in Stripe.js.
1370
+ * Setting the locale here will localize error strings for all Stripe.js methods.
1371
+ * It will also configure the locale for [Elements](#element_mount) and [Checkout](https://stripe.com/docs/js/checkout/redirect_to_checkout). Default is `auto` (Stripe detects the locale of the browser).
1372
+ *
1373
+ * Supported values depend on which features you are using.
1374
+ * Checkout supports a slightly different set of locales than the rest of Stripe.js.
1375
+ * If you are planning on using Checkout, make sure to use a [value](#checkout_redirect_to_checkout-options-locale) that it supports.
1376
+ */
1377
+ locale?: StripeElementLocale | CheckoutLocale;
1378
+
1379
+ /**
1380
+ * Opt-in to prerelease Stripe.js features by passing `betas` when instantiating a `Stripe` object.
1381
+ *
1382
+ * Supported values for the `betas` option can be found in integration guides for prerelease features.
1383
+ * Most users of Stripe.js do not pass this option.
1384
+ */
1385
+ betas?: string[];
1386
+ }
1387
+
1388
+ export type StripeErrorType =
1389
+ /**
1390
+ * Failure to connect to Stripe's API.
1391
+ */
1392
+ | 'api_connection_error'
1393
+
1394
+ /**
1395
+ * API errors cover any other type of problem (e.g., a temporary problem with Stripe's servers), and are extremely uncommon.
1396
+ */
1397
+ | 'api_error'
1398
+
1399
+ /**
1400
+ * Failure to properly authenticate yourself in the request.
1401
+ */
1402
+ | 'authentication_error'
1403
+
1404
+ /**
1405
+ * Card errors are the most common type of error you should expect to handle.
1406
+ * They result when the user enters a card that can't be charged for some reason.
1407
+ */
1408
+ | 'card_error'
1409
+
1410
+ /**
1411
+ * Idempotency errors occur when an `Idempotency-Key` is re-used on a request that does not match the first request's API endpoint and parameters.
1412
+ */
1413
+ | 'idempotency_error'
1414
+
1415
+ /**
1416
+ * Invalid request errors arise when your request has invalid parameters.
1417
+ */
1418
+ | 'invalid_request_error'
1419
+
1420
+ /**
1421
+ * Too many requests hit the API too quickly.
1422
+ */
1423
+ | 'rate_limit_error'
1424
+
1425
+ /**
1426
+ * Errors triggered by our client-side libraries when failing to validate fields (e.g., when a card number or expiration date is invalid or incomplete).
1427
+ */
1428
+ | 'validation_error';
1429
+
1430
+ export interface StripeError {
1431
+ /**
1432
+ * The type of error.
1433
+ */
1434
+ type: StripeErrorType;
1435
+
1436
+ /**
1437
+ * For card errors, the ID of the failed charge
1438
+ */
1439
+ charge?: string;
1440
+
1441
+ /**
1442
+ * For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
1443
+ */
1444
+ code?: string;
1445
+
1446
+ /**
1447
+ * For card errors resulting from a card issuer decline, a short string indicating the [card issuer’s reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
1448
+ */
1449
+ decline_code?: string;
1450
+
1451
+ /**
1452
+ * A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
1453
+ */
1454
+ doc_url?: string;
1455
+
1456
+ /**
1457
+ * A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
1458
+ */
1459
+ message?: string;
1460
+
1461
+ /**
1462
+ * If the error is parameter-specific, the parameter related to the error.
1463
+ * For example, you can use this to display a message near the correct form field.
1464
+ */
1465
+ param?: string;
1466
+
1467
+ /**
1468
+ * The `PaymentIntent` object for errors returned on a request involving a `PaymentIntent`.
1469
+ */
1470
+ payment_intent?: api.PaymentIntent;
1471
+
1472
+ /**
1473
+ * The `PaymentMethod` object for errors returned on a request involving a `PaymentMethod`.
1474
+ */
1475
+ payment_method?: api.PaymentMethod;
1476
+
1477
+ /**
1478
+ * The `SetupIntent` object for errors returned on a request involving a `SetupIntent`.
1479
+ */
1480
+ setup_intent?: api.SetupIntent;
1481
+
1482
+ /**
1483
+ * The `Source` object for errors returned on a request involving a `Source`.
1484
+ */
1485
+ source?: api.Source;
1486
+ }