@stripe/stripe-js 3.0.2 → 3.0.4

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 (70) hide show
  1. package/README.md +11 -3
  2. package/dist/index.d.mts +12626 -0
  3. package/dist/index.d.ts +12626 -0
  4. package/dist/stripe.js +1 -1
  5. package/dist/stripe.mjs +1 -1
  6. package/package.json +5 -26
  7. package/pure/index.d.mts +12626 -0
  8. package/pure/index.d.ts +12626 -0
  9. package/{dist/pure.js → pure/index.js} +1 -1
  10. package/{dist/pure.mjs → pure/index.mjs} +1 -1
  11. package/types/.eslintrc.yml +0 -3
  12. package/types/api/bank-accounts.d.ts +0 -61
  13. package/types/api/cards.d.ts +0 -130
  14. package/types/api/financial-connections.d.ts +0 -232
  15. package/types/api/index.d.ts +0 -11
  16. package/types/api/orders.d.ts +0 -122
  17. package/types/api/payment-intents.d.ts +0 -330
  18. package/types/api/payment-methods.d.ts +0 -452
  19. package/types/api/setup-intents.d.ts +0 -184
  20. package/types/api/shared.d.ts +0 -125
  21. package/types/api/sources.d.ts +0 -1045
  22. package/types/api/tokens.d.ts +0 -639
  23. package/types/api/verification-sessions.d.ts +0 -9
  24. package/types/index.d.mts +0 -17
  25. package/types/index.d.ts +0 -17
  26. package/types/pure.d.mts +0 -5
  27. package/types/pure.d.ts +0 -5
  28. package/types/stripe-js/checkout.d.ts +0 -153
  29. package/types/stripe-js/custom-checkout.d.ts +0 -220
  30. package/types/stripe-js/elements/address.d.ts +0 -261
  31. package/types/stripe-js/elements/affirm-message.d.ts +0 -65
  32. package/types/stripe-js/elements/afterpay-clearpay-message.d.ts +0 -119
  33. package/types/stripe-js/elements/apple-pay.d.ts +0 -156
  34. package/types/stripe-js/elements/au-bank-account.d.ts +0 -138
  35. package/types/stripe-js/elements/base.d.ts +0 -264
  36. package/types/stripe-js/elements/card-cvc.d.ts +0 -119
  37. package/types/stripe-js/elements/card-expiry.d.ts +0 -119
  38. package/types/stripe-js/elements/card-number.d.ts +0 -200
  39. package/types/stripe-js/elements/card.d.ts +0 -226
  40. package/types/stripe-js/elements/cart.d.ts +0 -224
  41. package/types/stripe-js/elements/eps-bank.d.ts +0 -140
  42. package/types/stripe-js/elements/express-checkout.d.ts +0 -446
  43. package/types/stripe-js/elements/fpx-bank.d.ts +0 -134
  44. package/types/stripe-js/elements/iban.d.ts +0 -135
  45. package/types/stripe-js/elements/ideal-bank.d.ts +0 -140
  46. package/types/stripe-js/elements/index.d.ts +0 -22
  47. package/types/stripe-js/elements/issuing/index.d.ts +0 -5
  48. package/types/stripe-js/elements/issuing/issuing-card-copy-button.d.ts +0 -37
  49. package/types/stripe-js/elements/issuing/issuing-card-cvc-display.d.ts +0 -32
  50. package/types/stripe-js/elements/issuing/issuing-card-expiry-display.d.ts +0 -32
  51. package/types/stripe-js/elements/issuing/issuing-card-number-display.d.ts +0 -40
  52. package/types/stripe-js/elements/issuing/issuing-card-pin-display.d.ts +0 -32
  53. package/types/stripe-js/elements/link-authentication.d.ts +0 -158
  54. package/types/stripe-js/elements/p24-bank.d.ts +0 -140
  55. package/types/stripe-js/elements/payment-method-messaging.d.ts +0 -98
  56. package/types/stripe-js/elements/payment-request-button.d.ts +0 -151
  57. package/types/stripe-js/elements/payment.d.ts +0 -275
  58. package/types/stripe-js/elements/shipping-address.d.ts +0 -215
  59. package/types/stripe-js/elements-group.d.ts +0 -1129
  60. package/types/stripe-js/embedded-checkout.d.ts +0 -30
  61. package/types/stripe-js/ephemeral-keys.d.ts +0 -3
  62. package/types/stripe-js/financial-connections.d.ts +0 -19
  63. package/types/stripe-js/index.d.ts +0 -13
  64. package/types/stripe-js/orders.d.ts +0 -9
  65. package/types/stripe-js/payment-intents.d.ts +0 -1465
  66. package/types/stripe-js/payment-request.d.ts +0 -529
  67. package/types/stripe-js/setup-intents.d.ts +0 -250
  68. package/types/stripe-js/stripe.d.ts +0 -1472
  69. package/types/stripe-js/token-and-sources.d.ts +0 -110
  70. package/types/utils.d.ts +0 -2
@@ -1,446 +0,0 @@
1
- import {StripeElementBase} from './base';
2
- import {StripeError} from '../stripe';
3
- import {ApplePayOption, ApplePayUpdateOption} from './apple-pay';
4
-
5
- export type StripeExpressCheckoutElement = StripeElementBase & {
6
- /**
7
- * Triggered when the element is fully rendered and can accept `element.focus` calls.
8
- */
9
- on(
10
- eventType: 'ready',
11
- handler: (event: StripeExpressCheckoutElementReadyEvent) => any
12
- ): StripeExpressCheckoutElement;
13
- once(
14
- eventType: 'ready',
15
- handler: (event: StripeExpressCheckoutElementReadyEvent) => any
16
- ): StripeExpressCheckoutElement;
17
- off(
18
- eventType: 'ready',
19
- handler?: (event: StripeExpressCheckoutElementReadyEvent) => any
20
- ): StripeExpressCheckoutElement;
21
-
22
- /**
23
- * Triggered when a button on the element is clicked.
24
- */
25
- on(
26
- eventType: 'click',
27
- handler: (event: StripeExpressCheckoutElementClickEvent) => any
28
- ): StripeExpressCheckoutElement;
29
- once(
30
- eventType: 'click',
31
- handler: (event: StripeExpressCheckoutElementClickEvent) => any
32
- ): StripeExpressCheckoutElement;
33
- off(
34
- eventType: 'click',
35
- handler?: (event: StripeExpressCheckoutElementClickEvent) => any
36
- ): StripeExpressCheckoutElement;
37
-
38
- /**
39
- * Triggered when the element gains focus.
40
- */
41
- on(
42
- eventType: 'focus',
43
- handler: (event: {elementType: 'expressCheckout'}) => any
44
- ): StripeExpressCheckoutElement;
45
- once(
46
- eventType: 'focus',
47
- handler: (event: {elementType: 'expressCheckout'}) => any
48
- ): StripeExpressCheckoutElement;
49
- off(
50
- eventType: 'focus',
51
- handler?: (event: {elementType: 'expressCheckout'}) => any
52
- ): StripeExpressCheckoutElement;
53
-
54
- /**
55
- * Triggered when the element loses focus.
56
- */
57
- on(
58
- eventType: 'blur',
59
- handler: (event: {elementType: 'expressCheckout'}) => any
60
- ): StripeExpressCheckoutElement;
61
- once(
62
- eventType: 'blur',
63
- handler: (event: {elementType: 'expressCheckout'}) => any
64
- ): StripeExpressCheckoutElement;
65
- off(
66
- eventType: 'blur',
67
- handler?: (event: {elementType: 'expressCheckout'}) => any
68
- ): StripeExpressCheckoutElement;
69
-
70
- /**
71
- * Triggered when the escape key is pressed within the element.
72
- */
73
- on(
74
- eventType: 'escape',
75
- handler: (event: {elementType: 'expressCheckout'}) => any
76
- ): StripeExpressCheckoutElement;
77
- once(
78
- eventType: 'escape',
79
- handler: (event: {elementType: 'expressCheckout'}) => any
80
- ): StripeExpressCheckoutElement;
81
- off(
82
- eventType: 'escape',
83
- handler?: (event: {elementType: 'expressCheckout'}) => any
84
- ): StripeExpressCheckoutElement;
85
-
86
- /**
87
- * Triggered when the element fails to load.
88
- */
89
- on(
90
- eventType: 'loaderror',
91
- handler: (event: {
92
- elementType: 'expressCheckout';
93
- error: StripeError;
94
- }) => any
95
- ): StripeExpressCheckoutElement;
96
- once(
97
- eventType: 'loaderror',
98
- handler: (event: {
99
- elementType: 'expressCheckout';
100
- error: StripeError;
101
- }) => any
102
- ): StripeExpressCheckoutElement;
103
- off(
104
- eventType: 'loaderror',
105
- handler?: (event: {
106
- elementType: 'expressCheckout';
107
- error: StripeError;
108
- }) => any
109
- ): StripeExpressCheckoutElement;
110
-
111
- /**
112
- * Triggered when a buyer authorizes a payment within a supported payment method.
113
- */
114
- on(
115
- eventType: 'confirm',
116
- handler: (event: StripeExpressCheckoutElementConfirmEvent) => any
117
- ): StripeExpressCheckoutElement;
118
- once(
119
- eventType: 'confirm',
120
- handler: (event: StripeExpressCheckoutElementConfirmEvent) => any
121
- ): StripeExpressCheckoutElement;
122
- off(
123
- eventType: 'confirm',
124
- handler?: (event: StripeExpressCheckoutElementConfirmEvent) => any
125
- ): StripeExpressCheckoutElement;
126
-
127
- /**
128
- * Triggered when a payment interface is dismissed (e.g., a buyer closes the payment interface)
129
- */
130
- on(
131
- eventType: 'cancel',
132
- handler: (event: {elementType: 'expressCheckout'}) => any
133
- ): StripeExpressCheckoutElement;
134
- once(
135
- eventType: 'cancel',
136
- handler: (event: {elementType: 'expressCheckout'}) => any
137
- ): StripeExpressCheckoutElement;
138
- off(
139
- eventType: 'cancel',
140
- handler?: (event: {elementType: 'expressCheckout'}) => any
141
- ): StripeExpressCheckoutElement;
142
-
143
- /**
144
- * Triggered when a buyer selects a different shipping address.
145
- */
146
- on(
147
- eventType: 'shippingaddresschange',
148
- handler: (
149
- event: StripeExpressCheckoutElementShippingAddressChangeEvent
150
- ) => any
151
- ): StripeExpressCheckoutElement;
152
- once(
153
- eventType: 'shippingaddresschange',
154
- handler: (
155
- event: StripeExpressCheckoutElementShippingAddressChangeEvent
156
- ) => any
157
- ): StripeExpressCheckoutElement;
158
- off(
159
- eventType: 'shippingaddresschange',
160
- handler?: (
161
- event: StripeExpressCheckoutElementShippingAddressChangeEvent
162
- ) => any
163
- ): StripeExpressCheckoutElement;
164
-
165
- /**
166
- * Triggered when a buyer selects a different shipping rate.
167
- */
168
- on(
169
- eventType: 'shippingratechange',
170
- handler: (event: StripeExpressCheckoutElementShippingRateChangeEvent) => any
171
- ): StripeExpressCheckoutElement;
172
- once(
173
- eventType: 'shippingratechange',
174
- handler: (event: StripeExpressCheckoutElementShippingRateChangeEvent) => any
175
- ): StripeExpressCheckoutElement;
176
- off(
177
- eventType: 'shippingratechange',
178
- handler?: (
179
- event: StripeExpressCheckoutElementShippingRateChangeEvent
180
- ) => any
181
- ): StripeExpressCheckoutElement;
182
-
183
- /**
184
- * Updates the options the `ExpressCheckoutElement` was initialized with.
185
- * Updates are merged into the existing configuration.
186
- */
187
- update(
188
- options: StripeExpressCheckoutElementUpdateOptions
189
- ): StripeExpressCheckoutElement;
190
- };
191
-
192
- export type ExpressPaymentType = 'google_pay' | 'apple_pay' | 'link' | 'paypal';
193
-
194
- export type ExpressCheckoutPartialAddress = {
195
- city: string;
196
- state: string;
197
- postal_code: string;
198
- country: string;
199
- };
200
-
201
- export type ExpressCheckoutAddress = ExpressCheckoutPartialAddress & {
202
- line1: string;
203
- line2: string | null;
204
- };
205
-
206
- export type BillingDetails = {
207
- name: string;
208
- email?: string;
209
- phone?: string;
210
- address: ExpressCheckoutAddress;
211
- };
212
-
213
- export type ShippingAddress = {
214
- name: string;
215
- address: ExpressCheckoutAddress;
216
- };
217
-
218
- export type LineItem = {
219
- name: string;
220
- amount: number;
221
- };
222
-
223
- export type DeliveryUnit = 'hour' | 'day' | 'business_day' | 'week' | 'month';
224
-
225
- export type DeliveryEstimate = {
226
- unit: DeliveryUnit;
227
- value: number;
228
- };
229
-
230
- export type ShippingRate = {
231
- id: string;
232
- amount: number;
233
- displayName: string;
234
- deliveryEstimate?:
235
- | string
236
- | {
237
- maximum?: DeliveryEstimate;
238
- minimum?: DeliveryEstimate;
239
- };
240
- };
241
-
242
- export type LayoutOption = {
243
- maxColumns?: number;
244
- maxRows?: number;
245
- overflow?: 'auto' | 'never';
246
- };
247
-
248
- export type ExpressCheckoutWalletOption = 'always' | 'auto' | 'never';
249
-
250
- export type ExpressCheckoutWalletsOption = {
251
- applePay?: ExpressCheckoutWalletOption;
252
- googlePay?: ExpressCheckoutWalletOption;
253
- };
254
-
255
- export type ApplePayButtonTheme = 'black' | 'white' | 'white-outline';
256
-
257
- export type GooglePayButtonTheme = 'black' | 'white';
258
-
259
- export type ButtonThemeOption = {
260
- applePay?: ApplePayButtonTheme;
261
- googlePay?: GooglePayButtonTheme;
262
- };
263
-
264
- export type ApplePayButtonType =
265
- | 'add-money'
266
- | 'book'
267
- | 'buy'
268
- | 'check-out'
269
- | 'contribute'
270
- | 'donate'
271
- | 'order'
272
- | 'plain'
273
- | 'reload'
274
- | 'rent'
275
- | 'subscribe'
276
- | 'support'
277
- | 'tip'
278
- | 'top-up';
279
-
280
- export type GooglePayButtonType =
281
- | 'book'
282
- | 'buy'
283
- | 'checkout'
284
- | 'donate'
285
- | 'order'
286
- | 'pay'
287
- | 'plain'
288
- | 'subscribe';
289
-
290
- export type ButtonTypeOption = {
291
- applePay?: ApplePayButtonType;
292
- googlePay?: GooglePayButtonType;
293
- };
294
-
295
- export interface StripeExpressCheckoutElementOptions {
296
- /**
297
- * Manually sets the height of the buttons shown.
298
- */
299
- buttonHeight?: number;
300
-
301
- /**
302
- * Controls the color of each button.
303
- */
304
- buttonTheme?: ButtonThemeOption;
305
-
306
- /**
307
- * Specifies the type of each button.
308
- */
309
- buttonType?: ButtonTypeOption;
310
-
311
- /**
312
- * Specifies how buttons should be laid out in relation to each other.
313
- */
314
- layout?: LayoutOption;
315
-
316
- /**
317
- * Override the order in which payment methods are displayed in the Express Checkout Element.
318
- * By default, the Express Checkout Element will use a dynamic ordering that optimizes payment method display for each user.
319
- */
320
- paymentMethodOrder?: string[];
321
-
322
- /**
323
- * Control wallets display in the Express Checkout Element.
324
- */
325
- wallets?: ExpressCheckoutWalletsOption;
326
- }
327
-
328
- /*
329
- * Updatable options for an `Elements` instance
330
- */
331
- export interface StripeExpressCheckoutElementUpdateOptions {
332
- /**
333
- * Manually sets the height of the buttons shown.
334
- */
335
- buttonHeight?: number;
336
-
337
- /**
338
- * Specifies how buttons should be laid out in relation to each other.
339
- */
340
- layout?: LayoutOption;
341
-
342
- /**
343
- * Override the order in which payment methods are displayed in the Pay Button Element.
344
- * By default, the Express Checkout Element will use a dynamic ordering that optimizes payment method display for each user.
345
- */
346
- paymentMethodOrder?: string[];
347
- }
348
-
349
- export type AvailablePaymentMethods = {
350
- applePay: boolean;
351
- googlePay: boolean;
352
- };
353
-
354
- export interface StripeExpressCheckoutElementReadyEvent {
355
- /**
356
- * The type of element that emitted this event.
357
- */
358
- elementType: 'expressCheckout';
359
-
360
- /**
361
- * The list of payment methods that could possibly show in the element, or undefined if no payment methods can show.
362
- */
363
- availablePaymentMethods: undefined | AvailablePaymentMethods;
364
- }
365
-
366
- export type ClickResolveDetails = {
367
- /**
368
- * An array of two-letter ISO country codes representing which countries
369
- * are eligible shipping locations.
370
- */
371
- allowedShippingCountries?: string[];
372
-
373
- billingAddressRequired?: boolean;
374
-
375
- /**
376
- * Provide information about your business that will be displayed in the payment interface.
377
- * This information will be retrieved from your Stripe account if not provided.
378
- */
379
- business?: {name: string};
380
-
381
- emailRequired?: boolean;
382
-
383
- lineItems?: Array<LineItem>;
384
-
385
- phoneNumberRequired?: boolean;
386
-
387
- shippingAddressRequired?: boolean;
388
-
389
- shippingRates?: Array<ShippingRate>;
390
-
391
- applePay?: ApplePayOption;
392
- };
393
-
394
- export interface StripeExpressCheckoutElementClickEvent {
395
- /**
396
- * The type of element that emitted this event.
397
- */
398
- elementType: 'expressCheckout';
399
-
400
- /**
401
- * The payment method associated with the button that was clicked.
402
- */
403
- expressPaymentType: ExpressPaymentType;
404
-
405
- /**
406
- * Callback to configure the details shown on a payment interface, including which fields to collect.
407
- * This must be called within 1 second of the 'click' event being emitted.
408
- */
409
- resolve: (resolveDetails?: ClickResolveDetails) => void;
410
- }
411
-
412
- export interface StripeExpressCheckoutElementConfirmEvent {
413
- /**
414
- * Callback when a payment is unsuccessful. Optionally, specifying a reason will show a more detailed error in the payment interface.
415
- */
416
- paymentFailed: (payload?: {
417
- reason?: 'fail' | 'invalid_shipping_address';
418
- }) => void;
419
-
420
- billingDetails?: BillingDetails;
421
-
422
- shippingAddress?: ShippingAddress;
423
-
424
- shippingRate?: ShippingRate;
425
-
426
- expressPaymentType: ExpressPaymentType;
427
- }
428
-
429
- export type ChangeResolveDetails = {
430
- lineItems?: Array<LineItem>;
431
- shippingRates?: Array<ShippingRate>;
432
- applePay?: ApplePayUpdateOption;
433
- };
434
-
435
- export interface StripeExpressCheckoutElementShippingAddressChangeEvent {
436
- name: string;
437
- address: ExpressCheckoutPartialAddress;
438
- resolve: (resolveDetails?: ChangeResolveDetails) => void;
439
- reject: () => void;
440
- }
441
-
442
- export interface StripeExpressCheckoutElementShippingRateChangeEvent {
443
- shippingRate: ShippingRate;
444
- resolve: (resolveDetails?: ChangeResolveDetails) => void;
445
- reject: () => void;
446
- }
@@ -1,134 +0,0 @@
1
- import {
2
- StripeElementBase,
3
- StripeElementStyle,
4
- StripeElementClasses,
5
- StripeElementChangeEvent,
6
- } from './base';
7
-
8
- export type StripeFpxBankElement = StripeElementBase & {
9
- /**
10
- * The change event is triggered when the `Element`'s value changes.
11
- */
12
- on(
13
- eventType: 'change',
14
- handler: (event: StripeFpxBankElementChangeEvent) => any
15
- ): StripeFpxBankElement;
16
- once(
17
- eventType: 'change',
18
- handler: (event: StripeFpxBankElementChangeEvent) => any
19
- ): StripeFpxBankElement;
20
- off(
21
- eventType: 'change',
22
- handler?: (event: StripeFpxBankElementChangeEvent) => any
23
- ): StripeFpxBankElement;
24
-
25
- /**
26
- * Triggered when the element is fully rendered and can accept `element.focus` calls.
27
- */
28
- on(
29
- eventType: 'ready',
30
- handler: (event: {elementType: 'fpxBank'}) => any
31
- ): StripeFpxBankElement;
32
- once(
33
- eventType: 'ready',
34
- handler: (event: {elementType: 'fpxBank'}) => any
35
- ): StripeFpxBankElement;
36
- off(
37
- eventType: 'ready',
38
- handler?: (event: {elementType: 'fpxBank'}) => any
39
- ): StripeFpxBankElement;
40
-
41
- /**
42
- * Triggered when the element gains focus.
43
- */
44
- on(
45
- eventType: 'focus',
46
- handler: (event: {elementType: 'fpxBank'}) => any
47
- ): StripeFpxBankElement;
48
- once(
49
- eventType: 'focus',
50
- handler: (event: {elementType: 'fpxBank'}) => any
51
- ): StripeFpxBankElement;
52
- off(
53
- eventType: 'focus',
54
- handler?: (event: {elementType: 'fpxBank'}) => any
55
- ): StripeFpxBankElement;
56
-
57
- /**
58
- * Triggered when the element loses focus.
59
- */
60
- on(
61
- eventType: 'blur',
62
- handler: (event: {elementType: 'fpxBank'}) => any
63
- ): StripeFpxBankElement;
64
- once(
65
- eventType: 'blur',
66
- handler: (event: {elementType: 'fpxBank'}) => any
67
- ): StripeFpxBankElement;
68
- off(
69
- eventType: 'blur',
70
- handler?: (event: {elementType: 'fpxBank'}) => any
71
- ): StripeFpxBankElement;
72
-
73
- /**
74
- * Triggered when the escape key is pressed within the element.
75
- */
76
- on(
77
- eventType: 'escape',
78
- handler: (event: {elementType: 'fpxBank'}) => any
79
- ): StripeFpxBankElement;
80
- once(
81
- eventType: 'escape',
82
- handler: (event: {elementType: 'fpxBank'}) => any
83
- ): StripeFpxBankElement;
84
- off(
85
- eventType: 'escape',
86
- handler?: (event: {elementType: 'fpxBank'}) => any
87
- ): StripeFpxBankElement;
88
-
89
- /**
90
- * Updates the options the `FpxBankElement` was initialized with.
91
- * Updates are merged into the existing configuration.
92
- *
93
- * The styles of an `FpxBankElement` can be dynamically changed using `element.update`.
94
- * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
95
- */
96
- update(options: Partial<StripeFpxBankElementOptions>): void;
97
- };
98
-
99
- export interface StripeFpxBankElementOptions {
100
- classes?: StripeElementClasses;
101
-
102
- style?: StripeElementStyle;
103
-
104
- /**
105
- * A pre-filled value for the Element.
106
- * Can be one of the banks listed in the [FPX guide](https://stripe.com/docs/payments/fpx#bank-reference) (e.g., `affin_bank`).
107
- */
108
- value?: string;
109
-
110
- /**
111
- * The type of the FPX accountholder.
112
- */
113
- accountHolderType: 'individual' | 'company';
114
-
115
- /**
116
- * Applies a disabled state to the Element such that user input is not accepted.
117
- * Default is false.
118
- */
119
- disabled?: boolean;
120
- }
121
-
122
- export interface StripeFpxBankElementChangeEvent
123
- extends StripeElementChangeEvent {
124
- /**
125
- * The type of element that emitted this event.
126
- */
127
- elementType: 'fpxBank';
128
-
129
- /**
130
- * The selected bank.
131
- * Can be one of the banks listed in the [FPX guide](https://stripe.com/docs/payments/fpx#bank-reference).
132
- */
133
- value: string;
134
- }
@@ -1,135 +0,0 @@
1
- import {
2
- StripeElementBase,
3
- StripeElementStyle,
4
- StripeElementClasses,
5
- StripeElementChangeEvent,
6
- } from './base';
7
-
8
- export type StripeIbanElement = StripeElementBase & {
9
- /**
10
- * The change event is triggered when the `Element`'s value changes.
11
- */
12
- on(
13
- eventType: 'change',
14
- handler: (event: StripeIbanElementChangeEvent) => any
15
- ): StripeIbanElement;
16
- once(
17
- eventType: 'change',
18
- handler: (event: StripeIbanElementChangeEvent) => any
19
- ): StripeIbanElement;
20
- off(
21
- eventType: 'change',
22
- handler?: (event: StripeIbanElementChangeEvent) => any
23
- ): StripeIbanElement;
24
-
25
- /**
26
- * Triggered when the element is fully rendered and can accept `element.focus` calls.
27
- */
28
- on(
29
- eventType: 'ready',
30
- handler: (event: {elementType: 'iban'}) => any
31
- ): StripeIbanElement;
32
- once(
33
- eventType: 'ready',
34
- handler: (event: {elementType: 'iban'}) => any
35
- ): StripeIbanElement;
36
- off(
37
- eventType: 'ready',
38
- handler?: (event: {elementType: 'iban'}) => any
39
- ): StripeIbanElement;
40
-
41
- /**
42
- * Triggered when the element gains focus.
43
- */
44
- on(
45
- eventType: 'focus',
46
- handler: (event: {elementType: 'iban'}) => any
47
- ): StripeIbanElement;
48
- once(
49
- eventType: 'focus',
50
- handler: (event: {elementType: 'iban'}) => any
51
- ): StripeIbanElement;
52
- off(
53
- eventType: 'focus',
54
- handler?: (event: {elementType: 'iban'}) => any
55
- ): StripeIbanElement;
56
-
57
- /**
58
- * Triggered when the element loses focus.
59
- */
60
- on(
61
- eventType: 'blur',
62
- handler: (event: {elementType: 'iban'}) => any
63
- ): StripeIbanElement;
64
- once(
65
- eventType: 'blur',
66
- handler: (event: {elementType: 'iban'}) => any
67
- ): StripeIbanElement;
68
- off(
69
- eventType: 'blur',
70
- handler?: (event: {elementType: 'iban'}) => any
71
- ): StripeIbanElement;
72
-
73
- /**
74
- * Triggered when the escape key is pressed within the element.
75
- */
76
- on(
77
- eventType: 'escape',
78
- handler: (event: {elementType: 'iban'}) => any
79
- ): StripeIbanElement;
80
- once(
81
- eventType: 'escape',
82
- handler: (event: {elementType: 'iban'}) => any
83
- ): StripeIbanElement;
84
- off(
85
- eventType: 'escape',
86
- handler?: (event: {elementType: 'iban'}) => any
87
- ): StripeIbanElement;
88
-
89
- /**
90
- * Updates the options the `IbanElement` was initialized with.
91
- * Updates are merged into the existing configuration.
92
- *
93
- * The styles of an `IbanElement` can be dynamically changed using `element.update`.
94
- * This method can be used to simulate CSS media queries that automatically adjust the size of elements when viewed on different devices.
95
- */
96
- update(options: Partial<StripeIbanElementOptions>): void;
97
- };
98
-
99
- export interface StripeIbanElementOptions {
100
- classes?: StripeElementClasses;
101
-
102
- style?: StripeElementStyle;
103
-
104
- supportedCountries?: string[];
105
-
106
- placeholderCountry?: string;
107
-
108
- /**
109
- * Appearance of the icon in the Element.
110
- */
111
- iconStyle?: 'default' | 'solid';
112
-
113
- /**
114
- * Hides the icon in the Element.
115
- * Default is `false`.
116
- */
117
- hideIcon?: boolean;
118
-
119
- /**
120
- * Applies a disabled state to the Element such that user input is not accepted.
121
- * Default is false.
122
- */
123
- disabled?: boolean;
124
- }
125
-
126
- export interface StripeIbanElementChangeEvent extends StripeElementChangeEvent {
127
- /**
128
- * The type of element that emitted this event.
129
- */
130
- elementType: 'iban';
131
-
132
- country: string;
133
-
134
- bankName: string;
135
- }