@stripe/stripe-js 3.0.7 → 3.0.9
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.
- package/dist/api/bank-accounts.d.mts +61 -0
- package/dist/api/bank-accounts.d.ts +61 -0
- package/dist/api/cards.d.mts +130 -0
- package/dist/api/cards.d.ts +130 -0
- package/dist/api/financial-connections.d.mts +232 -0
- package/dist/api/financial-connections.d.ts +232 -0
- package/dist/api/index.d.mts +11 -0
- package/dist/api/index.d.ts +11 -0
- package/dist/api/orders.d.mts +122 -0
- package/dist/api/orders.d.ts +122 -0
- package/dist/api/payment-intents.d.mts +330 -0
- package/dist/api/payment-intents.d.ts +330 -0
- package/dist/api/payment-methods.d.mts +452 -0
- package/dist/api/payment-methods.d.ts +452 -0
- package/dist/api/setup-intents.d.mts +184 -0
- package/dist/api/setup-intents.d.ts +184 -0
- package/dist/api/shared.d.mts +125 -0
- package/dist/api/shared.d.ts +125 -0
- package/dist/api/sources.d.mts +1045 -0
- package/dist/api/sources.d.ts +1045 -0
- package/dist/api/tokens.d.mts +639 -0
- package/dist/api/tokens.d.ts +639 -0
- package/dist/api/verification-sessions.d.mts +9 -0
- package/dist/api/verification-sessions.d.ts +9 -0
- package/dist/index.d.mts +4 -12782
- package/dist/index.d.ts +4 -12782
- package/dist/{stripe.js → index.js} +1 -1
- package/dist/{stripe.mjs → index.mjs} +1 -1
- package/dist/pure.d.mts +5 -0
- package/dist/pure.d.ts +5 -0
- package/dist/pure.js +204 -0
- package/dist/pure.mjs +200 -0
- package/dist/shared.d.mts +6 -0
- package/dist/shared.d.ts +6 -0
- package/dist/stripe-js/checkout.d.mts +153 -0
- package/dist/stripe-js/checkout.d.ts +153 -0
- package/dist/stripe-js/custom-checkout.d.mts +402 -0
- package/dist/stripe-js/custom-checkout.d.ts +402 -0
- package/dist/stripe-js/elements/address.d.mts +261 -0
- package/dist/stripe-js/elements/address.d.ts +261 -0
- package/dist/stripe-js/elements/affirm-message.d.mts +65 -0
- package/dist/stripe-js/elements/affirm-message.d.ts +65 -0
- package/dist/stripe-js/elements/afterpay-clearpay-message.d.mts +119 -0
- package/dist/stripe-js/elements/afterpay-clearpay-message.d.ts +119 -0
- package/dist/stripe-js/elements/apple-pay.d.mts +156 -0
- package/dist/stripe-js/elements/apple-pay.d.ts +156 -0
- package/dist/stripe-js/elements/au-bank-account.d.mts +138 -0
- package/dist/stripe-js/elements/au-bank-account.d.ts +138 -0
- package/dist/stripe-js/elements/base.d.mts +264 -0
- package/dist/stripe-js/elements/base.d.ts +264 -0
- package/dist/stripe-js/elements/card-cvc.d.mts +119 -0
- package/dist/stripe-js/elements/card-cvc.d.ts +119 -0
- package/dist/stripe-js/elements/card-expiry.d.mts +119 -0
- package/dist/stripe-js/elements/card-expiry.d.ts +119 -0
- package/dist/stripe-js/elements/card-number.d.mts +200 -0
- package/dist/stripe-js/elements/card-number.d.ts +200 -0
- package/dist/stripe-js/elements/card.d.mts +226 -0
- package/dist/stripe-js/elements/card.d.ts +226 -0
- package/dist/stripe-js/elements/cart.d.mts +224 -0
- package/dist/stripe-js/elements/cart.d.ts +224 -0
- package/dist/stripe-js/elements/eps-bank.d.mts +140 -0
- package/dist/stripe-js/elements/eps-bank.d.ts +140 -0
- package/dist/stripe-js/elements/express-checkout.d.mts +446 -0
- package/dist/stripe-js/elements/express-checkout.d.ts +446 -0
- package/dist/stripe-js/elements/fpx-bank.d.mts +134 -0
- package/dist/stripe-js/elements/fpx-bank.d.ts +134 -0
- package/dist/stripe-js/elements/iban.d.mts +135 -0
- package/dist/stripe-js/elements/iban.d.ts +135 -0
- package/dist/stripe-js/elements/ideal-bank.d.mts +140 -0
- package/dist/stripe-js/elements/ideal-bank.d.ts +140 -0
- package/dist/stripe-js/elements/index.d.mts +22 -0
- package/dist/stripe-js/elements/index.d.ts +22 -0
- package/dist/stripe-js/elements/issuing/index.d.mts +5 -0
- package/dist/stripe-js/elements/issuing/index.d.ts +5 -0
- package/dist/stripe-js/elements/issuing/issuing-card-copy-button.d.mts +37 -0
- package/dist/stripe-js/elements/issuing/issuing-card-copy-button.d.ts +37 -0
- package/dist/stripe-js/elements/issuing/issuing-card-cvc-display.d.mts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-cvc-display.d.ts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-expiry-display.d.mts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-expiry-display.d.ts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-number-display.d.mts +40 -0
- package/dist/stripe-js/elements/issuing/issuing-card-number-display.d.ts +40 -0
- package/dist/stripe-js/elements/issuing/issuing-card-pin-display.d.mts +32 -0
- package/dist/stripe-js/elements/issuing/issuing-card-pin-display.d.ts +32 -0
- package/dist/stripe-js/elements/link-authentication.d.mts +158 -0
- package/dist/stripe-js/elements/link-authentication.d.ts +158 -0
- package/dist/stripe-js/elements/p24-bank.d.mts +140 -0
- package/dist/stripe-js/elements/p24-bank.d.ts +140 -0
- package/dist/stripe-js/elements/payment-method-messaging.d.mts +98 -0
- package/dist/stripe-js/elements/payment-method-messaging.d.ts +98 -0
- package/dist/stripe-js/elements/payment-request-button.d.mts +151 -0
- package/dist/stripe-js/elements/payment-request-button.d.ts +151 -0
- package/dist/stripe-js/elements/payment.d.mts +275 -0
- package/dist/stripe-js/elements/payment.d.ts +275 -0
- package/dist/stripe-js/elements/shipping-address.d.mts +215 -0
- package/dist/stripe-js/elements/shipping-address.d.ts +215 -0
- package/dist/stripe-js/elements-group.d.mts +1129 -0
- package/dist/stripe-js/elements-group.d.ts +1129 -0
- package/dist/stripe-js/embedded-checkout.d.mts +35 -0
- package/dist/stripe-js/embedded-checkout.d.ts +35 -0
- package/dist/stripe-js/ephemeral-keys.d.mts +3 -0
- package/dist/stripe-js/ephemeral-keys.d.ts +3 -0
- package/dist/stripe-js/financial-connections.d.mts +19 -0
- package/dist/stripe-js/financial-connections.d.ts +19 -0
- package/dist/stripe-js/index.d.mts +13 -0
- package/dist/stripe-js/index.d.ts +13 -0
- package/dist/stripe-js/orders.d.mts +9 -0
- package/dist/stripe-js/orders.d.ts +9 -0
- package/dist/stripe-js/payment-intents.d.mts +1470 -0
- package/dist/stripe-js/payment-intents.d.ts +1470 -0
- package/dist/stripe-js/payment-request.d.mts +529 -0
- package/dist/stripe-js/payment-request.d.ts +529 -0
- package/dist/stripe-js/setup-intents.d.mts +250 -0
- package/dist/stripe-js/setup-intents.d.ts +250 -0
- package/dist/stripe-js/stripe.d.mts +1472 -0
- package/dist/stripe-js/stripe.d.ts +1472 -0
- package/dist/stripe-js/token-and-sources.d.mts +110 -0
- package/dist/stripe-js/token-and-sources.d.ts +110 -0
- package/dist/utils.d.mts +2 -0
- package/dist/utils.d.ts +2 -0
- package/lib/index.d.mts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/lib/index.mjs +1 -0
- package/package.json +11 -10
- package/pure/index.d.mts +1 -12761
- package/pure/index.d.ts +1 -12761
- package/pure/index.js +1 -204
- package/pure/index.mjs +1 -200
|
@@ -0,0 +1,1129 @@
|
|
|
1
|
+
import {
|
|
2
|
+
StripeAddressElement,
|
|
3
|
+
StripeAddressElementOptions,
|
|
4
|
+
StripeShippingAddressElement,
|
|
5
|
+
StripeShippingAddressElementOptions,
|
|
6
|
+
StripePaymentRequestButtonElement,
|
|
7
|
+
StripePaymentRequestButtonElementOptions,
|
|
8
|
+
StripePaymentElement,
|
|
9
|
+
StripePaymentElementOptions,
|
|
10
|
+
StripeLinkAuthenticationElement,
|
|
11
|
+
StripeLinkAuthenticationElementOptions,
|
|
12
|
+
StripeIdealBankElement,
|
|
13
|
+
StripeIdealBankElementOptions,
|
|
14
|
+
StripeIbanElement,
|
|
15
|
+
StripeIbanElementOptions,
|
|
16
|
+
StripeP24BankElement,
|
|
17
|
+
StripeP24BankElementOptions,
|
|
18
|
+
StripeEpsBankElement,
|
|
19
|
+
StripeEpsBankElementOptions,
|
|
20
|
+
StripeFpxBankElement,
|
|
21
|
+
StripeFpxBankElementOptions,
|
|
22
|
+
StripeCardCvcElement,
|
|
23
|
+
StripeCardCvcElementOptions,
|
|
24
|
+
StripeCardExpiryElement,
|
|
25
|
+
StripeCardExpiryElementOptions,
|
|
26
|
+
StripeCardNumberElement,
|
|
27
|
+
StripeCardNumberElementOptions,
|
|
28
|
+
StripeCardElement,
|
|
29
|
+
StripeCardElementOptions,
|
|
30
|
+
StripeCartElement,
|
|
31
|
+
StripeCartElementOptions,
|
|
32
|
+
StripeAuBankAccountElement,
|
|
33
|
+
StripeAfterpayClearpayMessageElementOptions,
|
|
34
|
+
StripeAffirmMessageElement,
|
|
35
|
+
StripeAffirmMessageElementOptions,
|
|
36
|
+
StripePaymentMethodMessagingElementOptions,
|
|
37
|
+
StripePaymentMethodMessagingElement,
|
|
38
|
+
StripeAfterpayClearpayMessageElement,
|
|
39
|
+
StripeAuBankAccountElementOptions,
|
|
40
|
+
StripeIssuingCardNumberDisplayElement,
|
|
41
|
+
StripeIssuingCardNumberDisplayElementOptions,
|
|
42
|
+
StripeIssuingCardCvcDisplayElement,
|
|
43
|
+
StripeIssuingCardCvcDisplayElementOptions,
|
|
44
|
+
StripeIssuingCardExpiryDisplayElement,
|
|
45
|
+
StripeIssuingCardExpiryDisplayElementOptions,
|
|
46
|
+
StripeIssuingCardPinDisplayElement,
|
|
47
|
+
StripeIssuingCardPinDisplayElementOptions,
|
|
48
|
+
StripeIssuingCardCopyButtonElement,
|
|
49
|
+
StripeIssuingCardCopyButtonElementOptions,
|
|
50
|
+
StripeExpressCheckoutElement,
|
|
51
|
+
StripeExpressCheckoutElementOptions,
|
|
52
|
+
} from './elements';
|
|
53
|
+
import {StripeError} from './stripe';
|
|
54
|
+
|
|
55
|
+
export interface StripeElements {
|
|
56
|
+
/**
|
|
57
|
+
* Updates the options that `Elements` was initialized with.
|
|
58
|
+
* Updates are shallowly merged into the existing configuration.
|
|
59
|
+
*/
|
|
60
|
+
update(options: StripeElementsUpdateOptions): void;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Fetches updates from the associated PaymentIntent or SetupIntent on an existing
|
|
64
|
+
* instance of Elements, and reflects these updates in the Payment Element.
|
|
65
|
+
*/
|
|
66
|
+
fetchUpdates(): Promise<{error?: {message: string; status?: string}}>;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Before confirming payment, call elements.submit() to validate the state of the
|
|
70
|
+
* Payment Element and collect any data required for wallets.
|
|
71
|
+
*/
|
|
72
|
+
submit(): Promise<{error?: StripeError}>;
|
|
73
|
+
|
|
74
|
+
/////////////////////////////
|
|
75
|
+
/// address
|
|
76
|
+
/////////////////////////////
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Creates an `AddressElement`.
|
|
80
|
+
*/
|
|
81
|
+
create(
|
|
82
|
+
elementType: 'address',
|
|
83
|
+
options: StripeAddressElementOptions
|
|
84
|
+
): StripeAddressElement;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Looks up a previously created `Element` by its type.
|
|
88
|
+
*/
|
|
89
|
+
getElement(elementType: 'address'): StripeAddressElement | null;
|
|
90
|
+
|
|
91
|
+
/////////////////////////////
|
|
92
|
+
/// paymentMethodMessaging
|
|
93
|
+
/////////////////////////////
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Creates an `paymentMethodMessagingElement`.
|
|
97
|
+
*/
|
|
98
|
+
create(
|
|
99
|
+
elementType: 'paymentMethodMessaging',
|
|
100
|
+
options: StripePaymentMethodMessagingElementOptions
|
|
101
|
+
): StripePaymentMethodMessagingElement;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Looks up a previously created `Element` by its type.
|
|
105
|
+
*/
|
|
106
|
+
getElement(
|
|
107
|
+
elementType: 'paymentMethodMessaging'
|
|
108
|
+
): StripePaymentMethodMessagingElement | null;
|
|
109
|
+
|
|
110
|
+
/////////////////////////////
|
|
111
|
+
/// affirmMessage
|
|
112
|
+
/////////////////////////////
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Creates an `AffirmMessageElement`.
|
|
116
|
+
*/
|
|
117
|
+
create(
|
|
118
|
+
elementType: 'affirmMessage',
|
|
119
|
+
options: StripeAffirmMessageElementOptions
|
|
120
|
+
): StripeAffirmMessageElement;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Looks up a previously created `Element` by its type.
|
|
124
|
+
*/
|
|
125
|
+
getElement(elementType: 'affirmMessage'): StripeAffirmMessageElement | null;
|
|
126
|
+
|
|
127
|
+
/////////////////////////////
|
|
128
|
+
/// afterpayClearpayMessage
|
|
129
|
+
/////////////////////////////
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Creates an `AfterpayClearpayMessageElement`.
|
|
133
|
+
*/
|
|
134
|
+
create(
|
|
135
|
+
elementType: 'afterpayClearpayMessage',
|
|
136
|
+
options: StripeAfterpayClearpayMessageElementOptions
|
|
137
|
+
): StripeAfterpayClearpayMessageElement;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Looks up a previously created `Element` by its type.
|
|
141
|
+
*/
|
|
142
|
+
getElement(
|
|
143
|
+
elementType: 'afterpayClearpayMessage'
|
|
144
|
+
): StripeAfterpayClearpayMessageElement | null;
|
|
145
|
+
|
|
146
|
+
/////////////////////////////
|
|
147
|
+
/// auBankAccount
|
|
148
|
+
/////////////////////////////
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Requires beta access:
|
|
152
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
153
|
+
*
|
|
154
|
+
* Creates an `AuBankAccountElement`.
|
|
155
|
+
*/
|
|
156
|
+
create(
|
|
157
|
+
elementType: 'auBankAccount',
|
|
158
|
+
options?: StripeAuBankAccountElementOptions
|
|
159
|
+
): StripeAuBankAccountElement;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Requires beta access:
|
|
163
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
164
|
+
*
|
|
165
|
+
* Looks up a previously created `Element` by its type.
|
|
166
|
+
*/
|
|
167
|
+
getElement(elementType: 'auBankAccount'): StripeAuBankAccountElement | null;
|
|
168
|
+
|
|
169
|
+
/////////////////////////////
|
|
170
|
+
/// card
|
|
171
|
+
/////////////////////////////
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Creates a `CardElement`.
|
|
175
|
+
*/
|
|
176
|
+
create(
|
|
177
|
+
elementType: 'card',
|
|
178
|
+
options?: StripeCardElementOptions
|
|
179
|
+
): StripeCardElement;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Looks up a previously created `Element` by its type.
|
|
183
|
+
*/
|
|
184
|
+
getElement(elementType: 'card'): StripeCardElement | null;
|
|
185
|
+
|
|
186
|
+
/////////////////////////////
|
|
187
|
+
/// cardNumber
|
|
188
|
+
/////////////////////////////
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Creates a `CardNumberElement`.
|
|
192
|
+
*/
|
|
193
|
+
create(
|
|
194
|
+
elementType: 'cardNumber',
|
|
195
|
+
options?: StripeCardNumberElementOptions
|
|
196
|
+
): StripeCardNumberElement;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Looks up a previously created `Element` by its type.
|
|
200
|
+
*/
|
|
201
|
+
getElement(elementType: 'cardNumber'): StripeCardNumberElement | null;
|
|
202
|
+
|
|
203
|
+
/////////////////////////////
|
|
204
|
+
/// cardExpiry
|
|
205
|
+
/////////////////////////////
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Creates a `CardExpiryElement`.
|
|
209
|
+
*/
|
|
210
|
+
create(
|
|
211
|
+
elementType: 'cardExpiry',
|
|
212
|
+
options?: StripeCardExpiryElementOptions
|
|
213
|
+
): StripeCardExpiryElement;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Looks up a previously created `Element` by its type.
|
|
217
|
+
*/
|
|
218
|
+
getElement(elementType: 'cardExpiry'): StripeCardExpiryElement | null;
|
|
219
|
+
|
|
220
|
+
/////////////////////////////
|
|
221
|
+
/// cardCvc
|
|
222
|
+
/////////////////////////////
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Creates a `CardCvcElement`.
|
|
226
|
+
*/
|
|
227
|
+
create(
|
|
228
|
+
elementType: 'cardCvc',
|
|
229
|
+
options?: StripeCardCvcElementOptions
|
|
230
|
+
): StripeCardCvcElement;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Looks up a previously created `Element` by its type.
|
|
234
|
+
*/
|
|
235
|
+
getElement(elementType: 'cardCvc'): StripeCardCvcElement | null;
|
|
236
|
+
|
|
237
|
+
/////////////////////////////
|
|
238
|
+
/// cart
|
|
239
|
+
/////////////////////////////
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Requires beta access:
|
|
243
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
244
|
+
*
|
|
245
|
+
* Creates a `CartElement`.
|
|
246
|
+
*/
|
|
247
|
+
create(
|
|
248
|
+
elementType: 'cart',
|
|
249
|
+
options: StripeCartElementOptions
|
|
250
|
+
): StripeCartElement;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Requires beta access:
|
|
254
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
255
|
+
*
|
|
256
|
+
* Looks up a previously created `Element` by its type.
|
|
257
|
+
*/
|
|
258
|
+
getElement(elementType: 'cart'): StripeCartElement | null;
|
|
259
|
+
|
|
260
|
+
/////////////////////////////
|
|
261
|
+
/// fpxBank
|
|
262
|
+
/////////////////////////////
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Creates an `FpxBankElement`.
|
|
266
|
+
*/
|
|
267
|
+
create(
|
|
268
|
+
elementType: 'fpxBank',
|
|
269
|
+
options: StripeFpxBankElementOptions
|
|
270
|
+
): StripeFpxBankElement;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Looks up a previously created `Element` by its type.
|
|
274
|
+
*/
|
|
275
|
+
getElement(elementType: 'fpxBank'): StripeFpxBankElement | null;
|
|
276
|
+
|
|
277
|
+
/////////////////////////////
|
|
278
|
+
/// epsBank
|
|
279
|
+
/////////////////////////////
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
*
|
|
283
|
+
* Creates an `EpsBankElement`.
|
|
284
|
+
*/
|
|
285
|
+
create(
|
|
286
|
+
elementType: 'epsBank',
|
|
287
|
+
options: StripeEpsBankElementOptions
|
|
288
|
+
): StripeEpsBankElement;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Requires beta access:
|
|
292
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
293
|
+
*
|
|
294
|
+
* Looks up a previously created `Element` by its type.
|
|
295
|
+
*/
|
|
296
|
+
getElement(elementType: 'epsBank'): StripeEpsBankElement | null;
|
|
297
|
+
|
|
298
|
+
/////////////////////////////
|
|
299
|
+
/// p24Bank
|
|
300
|
+
/////////////////////////////
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
*
|
|
304
|
+
* Creates an `P24BankElement`.
|
|
305
|
+
*/
|
|
306
|
+
create(
|
|
307
|
+
elementType: 'p24Bank',
|
|
308
|
+
options: StripeP24BankElementOptions
|
|
309
|
+
): StripeP24BankElement;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
*
|
|
313
|
+
* Looks up a previously created `Element` by its type.
|
|
314
|
+
*/
|
|
315
|
+
getElement(elementType: 'p24Bank'): StripeP24BankElement | null;
|
|
316
|
+
|
|
317
|
+
/////////////////////////////
|
|
318
|
+
/// iban
|
|
319
|
+
/////////////////////////////
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Creates an `IbanElement`.
|
|
323
|
+
*/
|
|
324
|
+
create(
|
|
325
|
+
elementType: 'iban',
|
|
326
|
+
options?: StripeIbanElementOptions
|
|
327
|
+
): StripeIbanElement;
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Looks up a previously created `Element` by its type.
|
|
331
|
+
*/
|
|
332
|
+
getElement(elementType: 'iban'): StripeIbanElement | null;
|
|
333
|
+
|
|
334
|
+
/////////////////////////////
|
|
335
|
+
/// idealBank
|
|
336
|
+
/////////////////////////////
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Creates an `IdealBankElement`.
|
|
340
|
+
*/
|
|
341
|
+
create(
|
|
342
|
+
elementType: 'idealBank',
|
|
343
|
+
options?: StripeIdealBankElementOptions
|
|
344
|
+
): StripeIdealBankElement;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Looks up a previously created `Element` by its type.
|
|
348
|
+
*/
|
|
349
|
+
getElement(elementType: 'idealBank'): StripeIdealBankElement | null;
|
|
350
|
+
|
|
351
|
+
/////////////////////////////
|
|
352
|
+
/// linkAuthentication
|
|
353
|
+
/////////////////////////////
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Requires beta access:
|
|
357
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
358
|
+
*
|
|
359
|
+
* Creates a `LinkAuthenticationElement`.
|
|
360
|
+
*/
|
|
361
|
+
create(
|
|
362
|
+
elementType: 'linkAuthentication',
|
|
363
|
+
options?: StripeLinkAuthenticationElementOptions
|
|
364
|
+
): StripeLinkAuthenticationElement;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Requires beta access:
|
|
368
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
369
|
+
*
|
|
370
|
+
* Looks up a previously created `Element` by its type.
|
|
371
|
+
*/
|
|
372
|
+
getElement(
|
|
373
|
+
elementType: 'linkAuthentication'
|
|
374
|
+
): StripeLinkAuthenticationElement | null;
|
|
375
|
+
|
|
376
|
+
/////////////////////////////
|
|
377
|
+
/// expressCheckout
|
|
378
|
+
/////////////////////////////
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Creates an `ExpressCheckoutElement`.
|
|
382
|
+
*/
|
|
383
|
+
create(
|
|
384
|
+
elementType: 'expressCheckout',
|
|
385
|
+
options?: StripeExpressCheckoutElementOptions
|
|
386
|
+
): StripeExpressCheckoutElement;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Looks up a previously created `Element` by its type.
|
|
390
|
+
*/
|
|
391
|
+
getElement(
|
|
392
|
+
elementType: 'expressCheckout'
|
|
393
|
+
): StripeExpressCheckoutElement | null;
|
|
394
|
+
|
|
395
|
+
/////////////////////////////
|
|
396
|
+
/// payment
|
|
397
|
+
/////////////////////////////
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Creates a `PaymentElement`.
|
|
401
|
+
*
|
|
402
|
+
* @docs https://stripe.com/docs/payments/payment-element
|
|
403
|
+
*/
|
|
404
|
+
create(
|
|
405
|
+
elementType: 'payment',
|
|
406
|
+
options?: StripePaymentElementOptions
|
|
407
|
+
): StripePaymentElement;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Looks up a previously created `Element` by its type.
|
|
411
|
+
*/
|
|
412
|
+
getElement(elementType: 'payment'): StripePaymentElement | null;
|
|
413
|
+
|
|
414
|
+
/////////////////////////////
|
|
415
|
+
/// paymentRequestButton
|
|
416
|
+
/////////////////////////////
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Creates a `PaymentRequestButtonElement`.
|
|
420
|
+
*
|
|
421
|
+
* @docs https://stripe.com/docs/stripe-js/elements/payment-request-button
|
|
422
|
+
*/
|
|
423
|
+
create(
|
|
424
|
+
elementType: 'paymentRequestButton',
|
|
425
|
+
options: StripePaymentRequestButtonElementOptions
|
|
426
|
+
): StripePaymentRequestButtonElement;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Looks up a previously created `Element` by its type.
|
|
430
|
+
*/
|
|
431
|
+
getElement(
|
|
432
|
+
elementType: 'paymentRequestButton'
|
|
433
|
+
): StripePaymentRequestButtonElement | null;
|
|
434
|
+
|
|
435
|
+
/////////////////////////////
|
|
436
|
+
/// shippingAddress
|
|
437
|
+
/////////////////////////////
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* @deprecated
|
|
441
|
+
* Use `Address` element instead.
|
|
442
|
+
*
|
|
443
|
+
* Creates a `ShippingAddressElement`.
|
|
444
|
+
*/
|
|
445
|
+
create(
|
|
446
|
+
elementType: 'shippingAddress',
|
|
447
|
+
options?: StripeShippingAddressElementOptions
|
|
448
|
+
): StripeShippingAddressElement;
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* @deprecated
|
|
452
|
+
* Use `Address` element instead.
|
|
453
|
+
*
|
|
454
|
+
* Looks up a previously created `Element` by its type.
|
|
455
|
+
*/
|
|
456
|
+
getElement(
|
|
457
|
+
elementType: 'shippingAddress'
|
|
458
|
+
): StripeShippingAddressElement | null;
|
|
459
|
+
|
|
460
|
+
/////////////////////////////
|
|
461
|
+
/// issuing
|
|
462
|
+
/////////////////////////////
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Creates an `issuingCardNumberDisplay` Element
|
|
466
|
+
*
|
|
467
|
+
* @docs https://stripe.com/docs/js/issuing_elements/create?type=issuingCardNumberDisplay
|
|
468
|
+
*/
|
|
469
|
+
create(
|
|
470
|
+
elementType: 'issuingCardNumberDisplay',
|
|
471
|
+
options: StripeIssuingCardNumberDisplayElementOptions
|
|
472
|
+
): StripeIssuingCardNumberDisplayElement;
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Creates an `issuingCardCvcDisplay` Element
|
|
476
|
+
*
|
|
477
|
+
* @docs https://stripe.com/docs/js/issuing_elements/create?type=issuingCardCvcDisplay
|
|
478
|
+
*/
|
|
479
|
+
create(
|
|
480
|
+
elementType: 'issuingCardCvcDisplay',
|
|
481
|
+
options: StripeIssuingCardCvcDisplayElementOptions
|
|
482
|
+
): StripeIssuingCardCvcDisplayElement;
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Creates an `issuingCardExpiryDisplay` Element
|
|
486
|
+
*
|
|
487
|
+
* @docs https://stripe.com/docs/js/issuing_elements/create?type=issuingCardExpiryDisplay
|
|
488
|
+
*/
|
|
489
|
+
create(
|
|
490
|
+
elementType: 'issuingCardExpiryDisplay',
|
|
491
|
+
options: StripeIssuingCardExpiryDisplayElementOptions
|
|
492
|
+
): StripeIssuingCardExpiryDisplayElement;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Creates an `issuingCardPinDisplay` Element
|
|
496
|
+
*
|
|
497
|
+
* @docs https://stripe.com/docs/js/issuing_elements/create?type=issuingCardPinDisplay
|
|
498
|
+
*/
|
|
499
|
+
create(
|
|
500
|
+
elementType: 'issuingCardPinDisplay',
|
|
501
|
+
options: StripeIssuingCardPinDisplayElementOptions
|
|
502
|
+
): StripeIssuingCardPinDisplayElement;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Creates an `issuingCardCopyButton` Element
|
|
506
|
+
*
|
|
507
|
+
* @docs https://stripe.com/docs/js/issuing_elements/create?type=issuingCardCopyButton
|
|
508
|
+
*/
|
|
509
|
+
create(
|
|
510
|
+
elementType: 'issuingCardCopyButton',
|
|
511
|
+
options: StripeIssuingCardCopyButtonElementOptions
|
|
512
|
+
): StripeIssuingCardCopyButtonElement;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
export type StripeElementType =
|
|
516
|
+
| 'address'
|
|
517
|
+
| 'affirmMessage'
|
|
518
|
+
| 'afterpayClearpayMessage'
|
|
519
|
+
| 'auBankAccount'
|
|
520
|
+
| 'card'
|
|
521
|
+
| 'cardNumber'
|
|
522
|
+
| 'cardExpiry'
|
|
523
|
+
| 'cardCvc'
|
|
524
|
+
| 'cart'
|
|
525
|
+
| 'epsBank'
|
|
526
|
+
| 'expressCheckout'
|
|
527
|
+
| 'fpxBank'
|
|
528
|
+
| 'iban'
|
|
529
|
+
| 'idealBank'
|
|
530
|
+
| 'p24Bank'
|
|
531
|
+
| 'payment'
|
|
532
|
+
| 'paymentMethodMessaging'
|
|
533
|
+
| 'paymentRequestButton'
|
|
534
|
+
| 'linkAuthentication'
|
|
535
|
+
| 'shippingAddress'
|
|
536
|
+
| 'issuingCardNumberDisplay'
|
|
537
|
+
| 'issuingCardCvcDisplay'
|
|
538
|
+
| 'issuingCardExpiryDisplay'
|
|
539
|
+
| 'issuingCardPinDisplay'
|
|
540
|
+
| 'issuingCardCopyButton';
|
|
541
|
+
|
|
542
|
+
export type StripeElement =
|
|
543
|
+
| StripeAddressElement
|
|
544
|
+
| StripeAffirmMessageElement
|
|
545
|
+
| StripeAfterpayClearpayMessageElement
|
|
546
|
+
| StripeAuBankAccountElement
|
|
547
|
+
| StripeCardElement
|
|
548
|
+
| StripeCardNumberElement
|
|
549
|
+
| StripeCardExpiryElement
|
|
550
|
+
| StripeCardCvcElement
|
|
551
|
+
| StripeCartElement
|
|
552
|
+
| StripeEpsBankElement
|
|
553
|
+
| StripeFpxBankElement
|
|
554
|
+
| StripeIbanElement
|
|
555
|
+
| StripeIdealBankElement
|
|
556
|
+
| StripeP24BankElement
|
|
557
|
+
| StripeExpressCheckoutElement
|
|
558
|
+
| StripePaymentElement
|
|
559
|
+
| StripePaymentMethodMessagingElement
|
|
560
|
+
| StripePaymentRequestButtonElement
|
|
561
|
+
| StripeIssuingCardNumberDisplayElement
|
|
562
|
+
| StripeIssuingCardCvcDisplayElement
|
|
563
|
+
| StripeIssuingCardExpiryDisplayElement
|
|
564
|
+
| StripeIssuingCardPinDisplayElement
|
|
565
|
+
| StripeIssuingCardCopyButtonElement
|
|
566
|
+
| StripeShippingAddressElement;
|
|
567
|
+
|
|
568
|
+
export type StripeElementLocale =
|
|
569
|
+
| 'auto'
|
|
570
|
+
| 'ar'
|
|
571
|
+
| 'bg'
|
|
572
|
+
| 'cs'
|
|
573
|
+
| 'da'
|
|
574
|
+
| 'de'
|
|
575
|
+
| 'el'
|
|
576
|
+
| 'en'
|
|
577
|
+
| 'en-AU'
|
|
578
|
+
| 'en-CA'
|
|
579
|
+
| 'en-NZ'
|
|
580
|
+
| 'en-GB'
|
|
581
|
+
| 'es'
|
|
582
|
+
| 'es-ES'
|
|
583
|
+
| 'es-419'
|
|
584
|
+
| 'et'
|
|
585
|
+
| 'fi'
|
|
586
|
+
| 'fil'
|
|
587
|
+
| 'fr'
|
|
588
|
+
| 'fr-CA'
|
|
589
|
+
| 'fr-FR'
|
|
590
|
+
| 'he'
|
|
591
|
+
| 'hu'
|
|
592
|
+
| 'hr'
|
|
593
|
+
| 'id'
|
|
594
|
+
| 'it'
|
|
595
|
+
| 'it-IT'
|
|
596
|
+
| 'ja'
|
|
597
|
+
| 'ko'
|
|
598
|
+
| 'lt'
|
|
599
|
+
| 'lv'
|
|
600
|
+
| 'ms'
|
|
601
|
+
| 'mt'
|
|
602
|
+
| 'nb'
|
|
603
|
+
| 'nl'
|
|
604
|
+
| 'no'
|
|
605
|
+
| 'pl'
|
|
606
|
+
| 'pt'
|
|
607
|
+
| 'pt-BR'
|
|
608
|
+
| 'ro'
|
|
609
|
+
| 'ru'
|
|
610
|
+
| 'sk'
|
|
611
|
+
| 'sl'
|
|
612
|
+
| 'sv'
|
|
613
|
+
| 'th'
|
|
614
|
+
| 'tr'
|
|
615
|
+
| 'vi'
|
|
616
|
+
| 'zh'
|
|
617
|
+
| 'zh-HK'
|
|
618
|
+
| 'zh-TW';
|
|
619
|
+
|
|
620
|
+
export type CardNetworkBrand =
|
|
621
|
+
| 'accel'
|
|
622
|
+
| 'amex'
|
|
623
|
+
| 'carnet'
|
|
624
|
+
| 'cartes_bancaires'
|
|
625
|
+
| 'diners'
|
|
626
|
+
| 'discover'
|
|
627
|
+
| 'eftpos_au'
|
|
628
|
+
| 'elo'
|
|
629
|
+
| 'girocard'
|
|
630
|
+
| 'interac'
|
|
631
|
+
| 'jcb'
|
|
632
|
+
| 'mastercard'
|
|
633
|
+
| 'nyce'
|
|
634
|
+
| 'pulse'
|
|
635
|
+
| 'rupay'
|
|
636
|
+
| 'star'
|
|
637
|
+
| 'unionpay'
|
|
638
|
+
| 'visa';
|
|
639
|
+
|
|
640
|
+
type PaymentMethodOptions = {
|
|
641
|
+
card?: {require_cvc_recollection?: boolean};
|
|
642
|
+
us_bank_account?: {
|
|
643
|
+
financial_connections?: {
|
|
644
|
+
permissions?: Array<
|
|
645
|
+
'balances' | 'ownership' | 'payment_method' | 'transactions'
|
|
646
|
+
>;
|
|
647
|
+
};
|
|
648
|
+
verification_method?: 'automatic' | 'instant';
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* Options to create an `Elements` instance with.
|
|
654
|
+
*/
|
|
655
|
+
interface BaseStripeElementsOptions {
|
|
656
|
+
/**
|
|
657
|
+
* An array of custom fonts, which elements created from the `Elements` object can use.
|
|
658
|
+
*/
|
|
659
|
+
fonts?: Array<CssFontSource | CustomFontSource>;
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* The [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) of the locale to display placeholders and error strings in.
|
|
663
|
+
* Default is `auto` (Stripe detects the locale of the browser).
|
|
664
|
+
* Setting the locale does not affect the behavior of postal code validation—a valid postal code for the billing country of the card is still required.
|
|
665
|
+
*/
|
|
666
|
+
locale?: StripeElementLocale;
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* Match the Payment Element with the design of your site with the appearance option.
|
|
670
|
+
* The layout of the Payment Element stays consistent, but you can modify colors, fonts, borders, padding, and more.
|
|
671
|
+
*
|
|
672
|
+
* @docs https://stripe.com/docs/stripe-js/appearance-api
|
|
673
|
+
*/
|
|
674
|
+
appearance?: Appearance;
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Display skeleton loader UI while waiting for Elements to be fully loaded, after they are mounted.
|
|
678
|
+
* Supported for the `payment`, `shippingAddress`, and `linkAuthentication` Elements.
|
|
679
|
+
* Default is `'auto'` (Stripe determines if a loader UI should be shown).
|
|
680
|
+
*/
|
|
681
|
+
loader?: 'auto' | 'always' | 'never';
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* Requires beta access:
|
|
685
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
686
|
+
*
|
|
687
|
+
* Display saved PaymentMethods and Customer information.
|
|
688
|
+
* Supported for the `payment`, `shippingAddress`, and `linkAuthentication` Elements.
|
|
689
|
+
*/
|
|
690
|
+
customerOptions?: CustomerOptions;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export interface StripeElementsOptionsClientSecret
|
|
694
|
+
extends BaseStripeElementsOptions {
|
|
695
|
+
/**
|
|
696
|
+
* The client secret for a PaymentIntent or SetupIntent used by the Payment Element.
|
|
697
|
+
*
|
|
698
|
+
* @docs https://stripe.com/docs/api/payment_intents/object#payment_intent_object-client_secret
|
|
699
|
+
*/
|
|
700
|
+
clientSecret?: string;
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* Either use mode or clientSecret when creating an Elements group
|
|
704
|
+
*/
|
|
705
|
+
mode?: never;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
export interface StripeElementsOptionsMode extends BaseStripeElementsOptions {
|
|
709
|
+
/**
|
|
710
|
+
* Whether the Payment Element will be used to create a PaymentIntent, SetupIntent, or Subscription.
|
|
711
|
+
*/
|
|
712
|
+
mode?: 'payment' | 'setup' | 'subscription';
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Three character currency code (e.g., usd).
|
|
716
|
+
*/
|
|
717
|
+
currency?: string;
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* The amount to be charged. Shown in Apple Pay, Google Pay, or Buy now pay later UIs, and influences available payment methods.
|
|
721
|
+
*/
|
|
722
|
+
amount?: number;
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Indicates that you intend to make future payments with this PaymentIntent’s payment method.
|
|
726
|
+
*
|
|
727
|
+
* @docs https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage
|
|
728
|
+
*/
|
|
729
|
+
setupFutureUsage?: 'off_session' | 'on_session' | null;
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Indicates that you intend to make future payments with this PaymentIntent’s payment method.
|
|
733
|
+
*
|
|
734
|
+
* @docs https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage
|
|
735
|
+
*/
|
|
736
|
+
setup_future_usage?: 'off_session' | 'on_session' | null;
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Controls when the funds will be captured from the customer’s account.
|
|
740
|
+
*
|
|
741
|
+
* @docs https://stripe.com/docs/api/payment_intents/create#create_payment_intent-capture_method
|
|
742
|
+
*/
|
|
743
|
+
captureMethod?: 'manual' | 'automatic';
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* Controls when the funds will be captured from the customer’s account.
|
|
747
|
+
*
|
|
748
|
+
* @docs https://stripe.com/docs/api/payment_intents/create#create_payment_intent-capture_method
|
|
749
|
+
*/
|
|
750
|
+
capture_method?: 'manual' | 'automatic';
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* The Stripe account ID which is the business of record.
|
|
754
|
+
*
|
|
755
|
+
* @docs https://stripe.com/docs/js/elements_object/create_without_intent#stripe_elements_no_intent-options-onBehalfOf
|
|
756
|
+
*/
|
|
757
|
+
onBehalfOf?: string;
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* The Stripe account ID which is the business of record.
|
|
761
|
+
*
|
|
762
|
+
* @docs https://stripe.com/docs/js/elements_object/create_without_intent#stripe_elements_no_intent-options-onBehalfOf
|
|
763
|
+
*/
|
|
764
|
+
on_behalf_of?: string;
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Instead of using automatic payment methods, declare specific payment methods to enable.
|
|
768
|
+
*
|
|
769
|
+
* @docs https://stripe.com/docs/payments/payment-methods/overview
|
|
770
|
+
*/
|
|
771
|
+
paymentMethodTypes?: string[];
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Instead of using automatic payment methods, declare specific payment methods to enable.
|
|
775
|
+
*
|
|
776
|
+
* @docs https://stripe.com/docs/payments/payment-methods/overview
|
|
777
|
+
*/
|
|
778
|
+
payment_method_types?: string[];
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* When using automatic payment methods (omitting paymentMethodTypes), provide a
|
|
782
|
+
* payment method configuration ID for deriving payment methods.
|
|
783
|
+
*
|
|
784
|
+
* @docs https://stripe.com/docs/connect/payment-method-configurations
|
|
785
|
+
*/
|
|
786
|
+
paymentMethodConfiguration?: string;
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* When using automatic payment methods (omitting payment_method_types), provide a
|
|
790
|
+
* payment method configuration ID for deriving payment methods.
|
|
791
|
+
*
|
|
792
|
+
* @docs https://stripe.com/docs/connect/payment-method-configurations
|
|
793
|
+
*/
|
|
794
|
+
payment_method_configuration?: string;
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Allows PaymentMethods to be created from the Elements instance.
|
|
798
|
+
*/
|
|
799
|
+
paymentMethodCreation?: 'manual';
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Additional payment-method-specific options for configuring Payment Element behavior.
|
|
803
|
+
*
|
|
804
|
+
* @docs https://stripe.com/docs/js/elements_object/create_without_intent#stripe_elements_no_intent-options-paymentMethodOptions
|
|
805
|
+
*/
|
|
806
|
+
paymentMethodOptions?: PaymentMethodOptions;
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Additional payment-method-specific options for configuring Payment Element behavior.
|
|
810
|
+
*
|
|
811
|
+
* @docs https://stripe.com/docs/js/elements_object/create_without_intent#stripe_elements_no_intent-options-paymentMethodOptions
|
|
812
|
+
*/
|
|
813
|
+
payment_method_options?: PaymentMethodOptions;
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* Either use mode or clientSecret when creating an Elements group
|
|
817
|
+
*/
|
|
818
|
+
clientSecret?: never;
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* The external payment methods to be displayed in the Payment Element that you are already integrated with.
|
|
822
|
+
*
|
|
823
|
+
* @docs https://stripe.com/docs/js/elements_object/create#stripe_elements-options-externalPaymentMethodTypes
|
|
824
|
+
*/
|
|
825
|
+
externalPaymentMethodTypes?: string[];
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
export type StripeElementsOptions =
|
|
829
|
+
| StripeElementsOptionsClientSecret
|
|
830
|
+
| StripeElementsOptionsMode;
|
|
831
|
+
|
|
832
|
+
/*
|
|
833
|
+
* Updatable options for an `Elements` instance
|
|
834
|
+
*/
|
|
835
|
+
export interface StripeElementsUpdateOptions {
|
|
836
|
+
/**
|
|
837
|
+
* The [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) of the locale to display placeholders and error strings in.
|
|
838
|
+
* Default is `auto` (Stripe detects the locale of the browser).
|
|
839
|
+
* Setting the locale does not affect the behavior of postal code validation—a valid postal code for the billing country of the card is still required.
|
|
840
|
+
*/
|
|
841
|
+
locale?: StripeElementLocale;
|
|
842
|
+
|
|
843
|
+
/**
|
|
844
|
+
* Match the design of your site with the appearance option.
|
|
845
|
+
* The layout of each Element stays consistent, but you can modify colors, fonts, borders, padding, and more.
|
|
846
|
+
*
|
|
847
|
+
* @docs https://stripe.com/docs/stripe-js/appearance-api
|
|
848
|
+
*/
|
|
849
|
+
appearance?: Appearance;
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Whether the Payment Element will be used to create a PaymentIntent, SetupIntent, or Subscription.
|
|
853
|
+
*/
|
|
854
|
+
mode?: 'payment' | 'setup' | 'subscription';
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* Three character currency code (e.g., usd).
|
|
858
|
+
*/
|
|
859
|
+
currency?: string;
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* The amount to be charged. Shown in Apple Pay, Google Pay, or Buy now pay later UIs, and influences available payment methods.
|
|
863
|
+
*/
|
|
864
|
+
amount?: number;
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* Indicates that you intend to make future payments with this PaymentIntent’s payment method.
|
|
868
|
+
*
|
|
869
|
+
* @docs https://stripe.com/docs/api/payment_intents/update#update_payment_intent-setup_future_usage
|
|
870
|
+
*/
|
|
871
|
+
setupFutureUsage?: 'off_session' | 'on_session' | null;
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* Indicates that you intend to make future payments with this PaymentIntent’s payment method.
|
|
875
|
+
*
|
|
876
|
+
* @docs https://stripe.com/docs/api/payment_intents/update#update_payment_intent-setup_future_usage
|
|
877
|
+
*/
|
|
878
|
+
setup_future_usage?: 'off_session' | 'on_session' | null;
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* Controls when the funds will be captured from the customer’s account.
|
|
882
|
+
*
|
|
883
|
+
* @docs https://stripe.com/docs/api/payment_intents/create#create_payment_intent-capture_method
|
|
884
|
+
*/
|
|
885
|
+
captureMethod?: 'manual' | 'automatic';
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* Controls when the funds will be captured from the customer’s account.
|
|
889
|
+
*
|
|
890
|
+
* @docs https://stripe.com/docs/api/payment_intents/create#create_payment_intent-capture_method
|
|
891
|
+
*/
|
|
892
|
+
capture_method?: 'manual' | 'automatic';
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* Instead of using automatic payment methods, declare specific payment methods to enable.
|
|
896
|
+
*
|
|
897
|
+
* @docs https://stripe.com/docs/payments/payment-methods/overview
|
|
898
|
+
*/
|
|
899
|
+
payment_method_types?: string[];
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* Instead of using automatic payment methods, declare specific payment methods to enable.
|
|
903
|
+
*
|
|
904
|
+
* @docs https://stripe.com/docs/payments/payment-methods/overview
|
|
905
|
+
*/
|
|
906
|
+
paymentMethodTypes?: string[];
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
/*
|
|
910
|
+
* Use a `CssFontSource` to pass custom fonts via a stylesheet URL when creating an `Elements` object.
|
|
911
|
+
*/
|
|
912
|
+
export interface CssFontSource {
|
|
913
|
+
/**
|
|
914
|
+
* A relative or absolute URL pointing to a CSS file with [@font-face](https://developer.mozilla.org/en/docs/Web/CSS/@font-face) definitions, for example:
|
|
915
|
+
*
|
|
916
|
+
* https://fonts.googleapis.com/css?family=Open+Sans
|
|
917
|
+
*
|
|
918
|
+
* Note that if you are using a [content security policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) (CSP), [additional directives](https://stripe.com/docs/security#content-security-policy) may be necessary.
|
|
919
|
+
*/
|
|
920
|
+
cssSrc: string;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/*
|
|
924
|
+
* Use a `CustomFontSource` to pass custom fonts when creating an `Elements` object.
|
|
925
|
+
*/
|
|
926
|
+
export interface CustomFontSource {
|
|
927
|
+
/**
|
|
928
|
+
* The name to give the font
|
|
929
|
+
*/
|
|
930
|
+
family: string;
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* A valid [src](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src) value pointing to your custom font file.
|
|
934
|
+
* This is usually (though not always) a link to a file with a `.woff` , `.otf`, or `.svg` suffix.
|
|
935
|
+
*/
|
|
936
|
+
src: string;
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* A valid [font-display](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display) value.
|
|
940
|
+
*/
|
|
941
|
+
display?: string;
|
|
942
|
+
|
|
943
|
+
/**
|
|
944
|
+
* Defaults to `normal`.
|
|
945
|
+
*/
|
|
946
|
+
style?: 'normal' | 'italic' | 'oblique';
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* A valid [unicode-range](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range) value.
|
|
950
|
+
*/
|
|
951
|
+
unicodeRange?: string;
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* A valid [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight), as a string.
|
|
955
|
+
*/
|
|
956
|
+
weight?: string;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
/*
|
|
960
|
+
* @docs https://stripe.com/docs/stripe-js/appearance-api
|
|
961
|
+
*/
|
|
962
|
+
export interface Appearance {
|
|
963
|
+
disableAnimations?: boolean;
|
|
964
|
+
|
|
965
|
+
theme?: 'stripe' | 'night' | 'flat';
|
|
966
|
+
|
|
967
|
+
variables?: {
|
|
968
|
+
// General font styles
|
|
969
|
+
fontFamily?: string;
|
|
970
|
+
fontSmooth?: string;
|
|
971
|
+
fontVariantLigatures?: string;
|
|
972
|
+
fontVariationSettings?: string;
|
|
973
|
+
fontLineHeight?: string;
|
|
974
|
+
|
|
975
|
+
// Font sizes
|
|
976
|
+
fontSizeBase?: string;
|
|
977
|
+
fontSizeSm?: string;
|
|
978
|
+
fontSizeXs?: string;
|
|
979
|
+
fontSize2Xs?: string;
|
|
980
|
+
fontSize3Xs?: string;
|
|
981
|
+
fontSizeLg?: string;
|
|
982
|
+
fontSizeXl?: string;
|
|
983
|
+
|
|
984
|
+
// Font weights
|
|
985
|
+
fontWeightLight?: string;
|
|
986
|
+
fontWeightNormal?: string;
|
|
987
|
+
fontWeightMedium?: string;
|
|
988
|
+
fontWeightBold?: string;
|
|
989
|
+
|
|
990
|
+
// Spacing
|
|
991
|
+
spacingUnit?: string;
|
|
992
|
+
gridRowSpacing?: string;
|
|
993
|
+
gridColumnSpacing?: string;
|
|
994
|
+
tabSpacing?: string;
|
|
995
|
+
accordionItemSpacing?: string;
|
|
996
|
+
/** @deprecated Use gridRowSpacing instead. */
|
|
997
|
+
spacingGridRow?: string;
|
|
998
|
+
/** @deprecated Use gridColumnSpacing instead. */
|
|
999
|
+
spacingGridColumn?: string;
|
|
1000
|
+
/** @deprecated Use tabSpacing instead. */
|
|
1001
|
+
spacingTab?: string;
|
|
1002
|
+
/** @deprecated Use accordionItemSpacing instead. */
|
|
1003
|
+
spacingAccordionItem?: string;
|
|
1004
|
+
|
|
1005
|
+
// Colors
|
|
1006
|
+
colorPrimary?: string;
|
|
1007
|
+
colorBackground?: string;
|
|
1008
|
+
colorText?: string;
|
|
1009
|
+
colorSuccess?: string;
|
|
1010
|
+
colorDanger?: string;
|
|
1011
|
+
colorWarning?: string;
|
|
1012
|
+
|
|
1013
|
+
// Text variations
|
|
1014
|
+
colorTextSecondary?: string;
|
|
1015
|
+
colorTextPlaceholder?: string;
|
|
1016
|
+
|
|
1017
|
+
// Accessible text
|
|
1018
|
+
accessibleColorOnColorPrimary?: string;
|
|
1019
|
+
accessibleColorOnColorBackground?: string;
|
|
1020
|
+
accessibleColorOnColorSuccess?: string;
|
|
1021
|
+
accessibleColorOnColorDanger?: string;
|
|
1022
|
+
accessibleColorOnColorWarning?: string;
|
|
1023
|
+
/** @deprecated Use accessibleColorOnColorPrimary instead. */
|
|
1024
|
+
colorPrimaryText?: string;
|
|
1025
|
+
/** @deprecated Use accessibleColorOnColorBackground instead. */
|
|
1026
|
+
colorBackgroundText?: string;
|
|
1027
|
+
/** @deprecated Use accessibleColorOnColorSuccess instead. */
|
|
1028
|
+
colorSuccessText?: string;
|
|
1029
|
+
/** @deprecated Use accessibleColorOnColorDanger instead. */
|
|
1030
|
+
colorDangerText?: string;
|
|
1031
|
+
/** @deprecated Use accessibleColorOnColorWarning instead. */
|
|
1032
|
+
colorWarningText?: string;
|
|
1033
|
+
|
|
1034
|
+
// Icons
|
|
1035
|
+
iconColor?: string;
|
|
1036
|
+
iconHoverColor?: string;
|
|
1037
|
+
iconCardErrorColor?: string;
|
|
1038
|
+
iconCardCvcColor?: string;
|
|
1039
|
+
iconCardCvcErrorColor?: string;
|
|
1040
|
+
iconCheckmarkColor?: string;
|
|
1041
|
+
iconChevronDownColor?: string;
|
|
1042
|
+
iconChevronDownHoverColor?: string;
|
|
1043
|
+
iconCloseColor?: string;
|
|
1044
|
+
iconCloseHoverColor?: string;
|
|
1045
|
+
iconLoadingIndicatorColor?: string;
|
|
1046
|
+
iconMenuColor?: string;
|
|
1047
|
+
iconMenuHoverColor?: string;
|
|
1048
|
+
iconPasscodeDeviceColor?: string;
|
|
1049
|
+
iconPasscodeDeviceHoverColor?: string;
|
|
1050
|
+
iconPasscodeDeviceNotificationColor?: string;
|
|
1051
|
+
iconRedirectColor?: string;
|
|
1052
|
+
/** @deprecated Use iconColor instead. */
|
|
1053
|
+
colorIcon?: string;
|
|
1054
|
+
/** @deprecated Use iconHoverColor instead. */
|
|
1055
|
+
colorIconHover?: string;
|
|
1056
|
+
/** @deprecated Use iconCardErrorColor instead. */
|
|
1057
|
+
colorIconCardError?: string;
|
|
1058
|
+
/** @deprecated Use iconCardCvcColor instead. */
|
|
1059
|
+
colorIconCardCvc?: string;
|
|
1060
|
+
/** @deprecated Use iconCardCvcErrorColor instead. */
|
|
1061
|
+
colorIconCardCvcError?: string;
|
|
1062
|
+
/** @deprecated Use iconCheckmarkColor instead. */
|
|
1063
|
+
colorIconCheckmark?: string;
|
|
1064
|
+
/** @deprecated Use iconChevronDownColor instead. */
|
|
1065
|
+
colorIconChevronDown?: string;
|
|
1066
|
+
/** @deprecated Use iconChevronDownHoverColor instead. */
|
|
1067
|
+
colorIconChevronDownHover?: string;
|
|
1068
|
+
/** @deprecated Use iconRedirectColor instead. */
|
|
1069
|
+
colorIconRedirect?: string;
|
|
1070
|
+
|
|
1071
|
+
// TabIcons
|
|
1072
|
+
tabIconColor?: string;
|
|
1073
|
+
tabIconHoverColor?: string;
|
|
1074
|
+
tabIconSelectedColor?: string;
|
|
1075
|
+
tabIconMoreColor?: string;
|
|
1076
|
+
tabIconMoreHoverColor?: string;
|
|
1077
|
+
/** @deprecated Use tabIconColor instead. */
|
|
1078
|
+
colorIconTab?: string;
|
|
1079
|
+
/** @deprecated Use tabIconHoverColor instead. */
|
|
1080
|
+
colorIconTabHover?: string;
|
|
1081
|
+
/** @deprecated Use tabIconHoverColor instead. */
|
|
1082
|
+
colorIconTabSelected?: string;
|
|
1083
|
+
/** @deprecated Use tabIconMoreColor instead. */
|
|
1084
|
+
colorIconTabMore?: string;
|
|
1085
|
+
/** @deprecated Use tabIconMoreHoverColor instead. */
|
|
1086
|
+
colorIconTabMoreHover?: string;
|
|
1087
|
+
|
|
1088
|
+
// Logos
|
|
1089
|
+
logoColor?: string;
|
|
1090
|
+
tabLogoColor?: string;
|
|
1091
|
+
tabLogoSelectedColor?: string;
|
|
1092
|
+
blockLogoColor?: string;
|
|
1093
|
+
/** @deprecated Use logoColor instead. */
|
|
1094
|
+
colorLogo?: string;
|
|
1095
|
+
/** @deprecated Use tabLogoColor instead. */
|
|
1096
|
+
colorLogoTab?: string;
|
|
1097
|
+
/** @deprecated Use tabLogoSelectedColor instead. */
|
|
1098
|
+
colorLogoTabSelected?: string;
|
|
1099
|
+
/** @deprecated Use blockLogoColor instead. */
|
|
1100
|
+
colorLogoBlock?: string;
|
|
1101
|
+
|
|
1102
|
+
// Focus
|
|
1103
|
+
focusBoxShadow?: string;
|
|
1104
|
+
focusOutline?: string;
|
|
1105
|
+
|
|
1106
|
+
// Radius
|
|
1107
|
+
borderRadius?: string;
|
|
1108
|
+
};
|
|
1109
|
+
|
|
1110
|
+
rules?: {
|
|
1111
|
+
[selector: string]: {
|
|
1112
|
+
[cssPropertyName: string]: string;
|
|
1113
|
+
};
|
|
1114
|
+
};
|
|
1115
|
+
|
|
1116
|
+
labels?: 'above' | 'floating';
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
export interface CustomerOptions {
|
|
1120
|
+
/**
|
|
1121
|
+
* The Customer id.
|
|
1122
|
+
*/
|
|
1123
|
+
customer: string;
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
* The ephemeral key for a Customer that grants temporary access to Customer data.
|
|
1127
|
+
*/
|
|
1128
|
+
ephemeralKey: string;
|
|
1129
|
+
}
|