@stripe/stripe-js 4.9.0 → 4.10.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.
- package/dist/api/confirmation-tokens.d.mts +3 -0
- package/dist/api/confirmation-tokens.d.ts +3 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/pure.js +1 -1
- package/dist/pure.mjs +1 -1
- package/dist/stripe-js/custom-checkout.d.mts +3 -22
- package/dist/stripe-js/custom-checkout.d.ts +3 -22
- package/dist/stripe-js/elements/index.d.mts +0 -1
- package/dist/stripe-js/elements/index.d.ts +0 -1
- package/dist/stripe-js/elements/payment.d.mts +0 -135
- package/dist/stripe-js/elements/payment.d.ts +0 -135
- package/dist/stripe-js/elements-group.d.mts +6 -3
- package/dist/stripe-js/elements-group.d.ts +6 -3
- package/dist/stripe-js/embedded-checkout.d.mts +0 -30
- package/dist/stripe-js/embedded-checkout.d.ts +0 -30
- package/dist/stripe-js/payment-intents.d.mts +3 -79
- package/dist/stripe-js/payment-intents.d.ts +3 -79
- package/dist/stripe-js/setup-intents.d.mts +3 -0
- package/dist/stripe-js/setup-intents.d.ts +3 -0
- package/dist/stripe-js/stripe.d.mts +0 -35
- package/dist/stripe-js/stripe.d.ts +0 -35
- package/package.json +1 -1
- package/dist/stripe-js/elements/currency-selector.d.mts +0 -93
- package/dist/stripe-js/elements/currency-selector.d.ts +0 -93
|
@@ -84,6 +84,9 @@ export interface ConfirmationTokenCreateParams {
|
|
|
84
84
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
|
+
* Requires beta access:
|
|
88
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
89
|
+
*
|
|
87
90
|
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature
|
|
88
91
|
*/
|
|
89
92
|
allow_redisplay?: 'always' | 'limited' | 'unspecified';
|
|
@@ -84,6 +84,9 @@ export interface ConfirmationTokenCreateParams {
|
|
|
84
84
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
|
+
* Requires beta access:
|
|
88
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
89
|
+
*
|
|
87
90
|
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature
|
|
88
91
|
*/
|
|
89
92
|
allow_redisplay?: 'always' | 'limited' | 'unspecified';
|
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
package/dist/pure.js
CHANGED
package/dist/pure.mjs
CHANGED
|
@@ -12,8 +12,6 @@ import {
|
|
|
12
12
|
import {Appearance, CssFontSource, CustomFontSource} from './elements-group';
|
|
13
13
|
import {StripeError} from './stripe';
|
|
14
14
|
import {
|
|
15
|
-
StripeCurrencySelectorElement,
|
|
16
|
-
FieldsOption,
|
|
17
15
|
StripeElementBase,
|
|
18
16
|
StripeExpressCheckoutElement,
|
|
19
17
|
StripeExpressCheckoutElementConfirmEvent,
|
|
@@ -153,7 +151,6 @@ export type StripeCustomCheckoutLineItem = {
|
|
|
153
151
|
usageType: 'metered' | 'licensed';
|
|
154
152
|
} | null;
|
|
155
153
|
adjustableQuantity: StripeCustomCheckoutAdjustableQuantity | null;
|
|
156
|
-
images: string[];
|
|
157
154
|
};
|
|
158
155
|
|
|
159
156
|
export type StripeCustomCheckoutRecurring = {
|
|
@@ -205,12 +202,6 @@ export type StripeCustomCheckoutTrial = {
|
|
|
205
202
|
trialPeriodDays: number;
|
|
206
203
|
};
|
|
207
204
|
|
|
208
|
-
export type StripeCustomCheckoutCurrencyOption = {
|
|
209
|
-
unitAmount: number;
|
|
210
|
-
currency: string;
|
|
211
|
-
currencyConversion?: {fxRate: number; sourceCurrency: string};
|
|
212
|
-
};
|
|
213
|
-
|
|
214
205
|
/* Custom Checkout session */
|
|
215
206
|
export interface StripeCustomCheckoutSession {
|
|
216
207
|
billingAddress: StripeCustomCheckoutContact | null;
|
|
@@ -218,7 +209,6 @@ export interface StripeCustomCheckoutSession {
|
|
|
218
209
|
canConfirm: boolean;
|
|
219
210
|
confirmationRequirements: StripeCustomCheckoutConfirmationRequirement[];
|
|
220
211
|
currency: string;
|
|
221
|
-
currencyOptions: Array<StripeCustomCheckoutCurrencyOption> | null;
|
|
222
212
|
discountAmounts: Array<StripeCustomCheckoutDiscountAmount> | null;
|
|
223
213
|
email: string | null;
|
|
224
214
|
id: string;
|
|
@@ -246,7 +236,6 @@ export type StripeCustomCheckoutPaymentElementOptions = {
|
|
|
246
236
|
paymentMethodOrder?: Array<string>;
|
|
247
237
|
readonly?: boolean;
|
|
248
238
|
terms?: TermsOption;
|
|
249
|
-
fields?: FieldsOption;
|
|
250
239
|
};
|
|
251
240
|
|
|
252
241
|
export type StripeCustomCheckoutAddressElementOptions = {
|
|
@@ -263,7 +252,6 @@ export type StripeCustomCheckoutExpressCheckoutElementOptions = {
|
|
|
263
252
|
buttonType: StripeExpressCheckoutElementOptions['buttonType'];
|
|
264
253
|
layout: StripeExpressCheckoutElementOptions['layout'];
|
|
265
254
|
paymentMethodOrder: StripeExpressCheckoutElementOptions['paymentMethodOrder'];
|
|
266
|
-
paymentMethods: StripeExpressCheckoutElementOptions['paymentMethods'];
|
|
267
255
|
};
|
|
268
256
|
|
|
269
257
|
export type StripeCustomCheckoutUpdateHandler = (
|
|
@@ -405,10 +393,8 @@ export interface StripeCustomCheckout {
|
|
|
405
393
|
updateBillingAddress: (
|
|
406
394
|
billingAddress: StripeCustomCheckoutContact | null
|
|
407
395
|
) => Promise<StripeCustomCheckoutResult>;
|
|
408
|
-
updatePhoneNumber: (
|
|
409
|
-
|
|
410
|
-
) => Promise<StripeCustomCheckoutResult>;
|
|
411
|
-
updateEmail: (email: string) => Promise<StripeCustomCheckoutResult>;
|
|
396
|
+
updatePhoneNumber: (phoneNumber: string) => void;
|
|
397
|
+
updateEmail: (email: string) => void;
|
|
412
398
|
updateLineItemQuantity: (args: {
|
|
413
399
|
lineItem: string;
|
|
414
400
|
quantity: number;
|
|
@@ -417,6 +403,7 @@ export interface StripeCustomCheckout {
|
|
|
417
403
|
shippingOption: string
|
|
418
404
|
) => Promise<StripeCustomCheckoutResult>;
|
|
419
405
|
confirm: (args?: {
|
|
406
|
+
return_url?: string;
|
|
420
407
|
returnUrl?: string;
|
|
421
408
|
redirect?: StripeCustomCheckoutRedirectBehavior;
|
|
422
409
|
paymentMethod?: string;
|
|
@@ -435,10 +422,6 @@ export interface StripeCustomCheckout {
|
|
|
435
422
|
getElement(
|
|
436
423
|
elementType: 'expressCheckout'
|
|
437
424
|
): StripeCustomCheckoutExpressCheckoutElement | null;
|
|
438
|
-
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
439
|
-
getElement(
|
|
440
|
-
elementType: 'currencySelector'
|
|
441
|
-
): StripeCurrencySelectorElement | null;
|
|
442
425
|
createElement(
|
|
443
426
|
elementType: 'payment',
|
|
444
427
|
options?: StripeCustomCheckoutPaymentElementOptions
|
|
@@ -451,6 +434,4 @@ export interface StripeCustomCheckout {
|
|
|
451
434
|
elementType: 'expressCheckout',
|
|
452
435
|
options: StripeCustomCheckoutExpressCheckoutElementOptions
|
|
453
436
|
): StripeCustomCheckoutExpressCheckoutElement;
|
|
454
|
-
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
455
|
-
createElement(elementType: 'currencySelector'): StripeCurrencySelectorElement;
|
|
456
437
|
}
|
|
@@ -12,8 +12,6 @@ import {
|
|
|
12
12
|
import {Appearance, CssFontSource, CustomFontSource} from './elements-group';
|
|
13
13
|
import {StripeError} from './stripe';
|
|
14
14
|
import {
|
|
15
|
-
StripeCurrencySelectorElement,
|
|
16
|
-
FieldsOption,
|
|
17
15
|
StripeElementBase,
|
|
18
16
|
StripeExpressCheckoutElement,
|
|
19
17
|
StripeExpressCheckoutElementConfirmEvent,
|
|
@@ -153,7 +151,6 @@ export type StripeCustomCheckoutLineItem = {
|
|
|
153
151
|
usageType: 'metered' | 'licensed';
|
|
154
152
|
} | null;
|
|
155
153
|
adjustableQuantity: StripeCustomCheckoutAdjustableQuantity | null;
|
|
156
|
-
images: string[];
|
|
157
154
|
};
|
|
158
155
|
|
|
159
156
|
export type StripeCustomCheckoutRecurring = {
|
|
@@ -205,12 +202,6 @@ export type StripeCustomCheckoutTrial = {
|
|
|
205
202
|
trialPeriodDays: number;
|
|
206
203
|
};
|
|
207
204
|
|
|
208
|
-
export type StripeCustomCheckoutCurrencyOption = {
|
|
209
|
-
unitAmount: number;
|
|
210
|
-
currency: string;
|
|
211
|
-
currencyConversion?: {fxRate: number; sourceCurrency: string};
|
|
212
|
-
};
|
|
213
|
-
|
|
214
205
|
/* Custom Checkout session */
|
|
215
206
|
export interface StripeCustomCheckoutSession {
|
|
216
207
|
billingAddress: StripeCustomCheckoutContact | null;
|
|
@@ -218,7 +209,6 @@ export interface StripeCustomCheckoutSession {
|
|
|
218
209
|
canConfirm: boolean;
|
|
219
210
|
confirmationRequirements: StripeCustomCheckoutConfirmationRequirement[];
|
|
220
211
|
currency: string;
|
|
221
|
-
currencyOptions: Array<StripeCustomCheckoutCurrencyOption> | null;
|
|
222
212
|
discountAmounts: Array<StripeCustomCheckoutDiscountAmount> | null;
|
|
223
213
|
email: string | null;
|
|
224
214
|
id: string;
|
|
@@ -246,7 +236,6 @@ export type StripeCustomCheckoutPaymentElementOptions = {
|
|
|
246
236
|
paymentMethodOrder?: Array<string>;
|
|
247
237
|
readonly?: boolean;
|
|
248
238
|
terms?: TermsOption;
|
|
249
|
-
fields?: FieldsOption;
|
|
250
239
|
};
|
|
251
240
|
|
|
252
241
|
export type StripeCustomCheckoutAddressElementOptions = {
|
|
@@ -263,7 +252,6 @@ export type StripeCustomCheckoutExpressCheckoutElementOptions = {
|
|
|
263
252
|
buttonType: StripeExpressCheckoutElementOptions['buttonType'];
|
|
264
253
|
layout: StripeExpressCheckoutElementOptions['layout'];
|
|
265
254
|
paymentMethodOrder: StripeExpressCheckoutElementOptions['paymentMethodOrder'];
|
|
266
|
-
paymentMethods: StripeExpressCheckoutElementOptions['paymentMethods'];
|
|
267
255
|
};
|
|
268
256
|
|
|
269
257
|
export type StripeCustomCheckoutUpdateHandler = (
|
|
@@ -405,10 +393,8 @@ export interface StripeCustomCheckout {
|
|
|
405
393
|
updateBillingAddress: (
|
|
406
394
|
billingAddress: StripeCustomCheckoutContact | null
|
|
407
395
|
) => Promise<StripeCustomCheckoutResult>;
|
|
408
|
-
updatePhoneNumber: (
|
|
409
|
-
|
|
410
|
-
) => Promise<StripeCustomCheckoutResult>;
|
|
411
|
-
updateEmail: (email: string) => Promise<StripeCustomCheckoutResult>;
|
|
396
|
+
updatePhoneNumber: (phoneNumber: string) => void;
|
|
397
|
+
updateEmail: (email: string) => void;
|
|
412
398
|
updateLineItemQuantity: (args: {
|
|
413
399
|
lineItem: string;
|
|
414
400
|
quantity: number;
|
|
@@ -417,6 +403,7 @@ export interface StripeCustomCheckout {
|
|
|
417
403
|
shippingOption: string
|
|
418
404
|
) => Promise<StripeCustomCheckoutResult>;
|
|
419
405
|
confirm: (args?: {
|
|
406
|
+
return_url?: string;
|
|
420
407
|
returnUrl?: string;
|
|
421
408
|
redirect?: StripeCustomCheckoutRedirectBehavior;
|
|
422
409
|
paymentMethod?: string;
|
|
@@ -435,10 +422,6 @@ export interface StripeCustomCheckout {
|
|
|
435
422
|
getElement(
|
|
436
423
|
elementType: 'expressCheckout'
|
|
437
424
|
): StripeCustomCheckoutExpressCheckoutElement | null;
|
|
438
|
-
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
439
|
-
getElement(
|
|
440
|
-
elementType: 'currencySelector'
|
|
441
|
-
): StripeCurrencySelectorElement | null;
|
|
442
425
|
createElement(
|
|
443
426
|
elementType: 'payment',
|
|
444
427
|
options?: StripeCustomCheckoutPaymentElementOptions
|
|
@@ -451,6 +434,4 @@ export interface StripeCustomCheckout {
|
|
|
451
434
|
elementType: 'expressCheckout',
|
|
452
435
|
options: StripeCustomCheckoutExpressCheckoutElementOptions
|
|
453
436
|
): StripeCustomCheckoutExpressCheckoutElement;
|
|
454
|
-
/* Requires beta access: Contact [Stripe support](https://support.stripe.com/) for more information. */
|
|
455
|
-
createElement(elementType: 'currencySelector'): StripeCurrencySelectorElement;
|
|
456
437
|
}
|
|
@@ -116,31 +116,6 @@ export type StripePaymentElement = StripeElementBase & {
|
|
|
116
116
|
handler?: (event: {elementType: 'payment'}) => any
|
|
117
117
|
): StripePaymentElement;
|
|
118
118
|
|
|
119
|
-
/**
|
|
120
|
-
* The change event is triggered when the `Element`'s value changes.
|
|
121
|
-
* Represents the details of a selected Card payment method.
|
|
122
|
-
*/
|
|
123
|
-
on(
|
|
124
|
-
eventType: 'carddetailschange',
|
|
125
|
-
handler: (event: StripePaymentElementCardDetailsChangeEvent) => any
|
|
126
|
-
): StripePaymentElement;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Triggered when a Saved Payment Method is updated.
|
|
130
|
-
*/
|
|
131
|
-
on(
|
|
132
|
-
eventType: 'savedpaymentmethodupdate',
|
|
133
|
-
handler: (event: StripePaymentElementSavedPaymentMethodUpdateEvent) => any
|
|
134
|
-
): StripePaymentElement;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Triggered when a Saved Payment Method is removed.
|
|
138
|
-
*/
|
|
139
|
-
on(
|
|
140
|
-
eventType: 'savedpaymentmethodremove',
|
|
141
|
-
handler: (event: StripePaymentElementSavedPaymentMethodRemoveEvent) => any
|
|
142
|
-
): StripePaymentElement;
|
|
143
|
-
|
|
144
119
|
/**
|
|
145
120
|
* Updates the options the `PaymentElement` was initialized with.
|
|
146
121
|
* Updates are merged into the existing configuration.
|
|
@@ -183,7 +158,6 @@ export interface FieldsOption {
|
|
|
183
158
|
phone?: FieldOption;
|
|
184
159
|
address?:
|
|
185
160
|
| FieldOption
|
|
186
|
-
| 'if_required'
|
|
187
161
|
| {
|
|
188
162
|
country?: FieldOption;
|
|
189
163
|
postalCode?: FieldOption;
|
|
@@ -323,112 +297,3 @@ export interface StripePaymentElementChangeEvent {
|
|
|
323
297
|
};
|
|
324
298
|
};
|
|
325
299
|
}
|
|
326
|
-
|
|
327
|
-
type CardBrand =
|
|
328
|
-
| 'amex'
|
|
329
|
-
| 'diners'
|
|
330
|
-
| 'discover'
|
|
331
|
-
| 'eftpos_au'
|
|
332
|
-
| 'jcb'
|
|
333
|
-
| 'mastercard'
|
|
334
|
-
| 'unionpay'
|
|
335
|
-
| 'visa'
|
|
336
|
-
| 'unknown';
|
|
337
|
-
type CardFunding = 'credit' | 'debit' | 'prepaid' | 'unknown';
|
|
338
|
-
|
|
339
|
-
export interface StripePaymentElementCardDetailsChangeEvent {
|
|
340
|
-
/**
|
|
341
|
-
* The type of element that emitted this event.
|
|
342
|
-
*/
|
|
343
|
-
elementType: 'payment';
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* `true` when the card details are loading.
|
|
347
|
-
*/
|
|
348
|
-
loading: boolean;
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* The card details for the selected payment method.
|
|
352
|
-
* Undefined while loading and for non card payment methods.
|
|
353
|
-
*/
|
|
354
|
-
details?: {
|
|
355
|
-
brands: CardBrand[] | null;
|
|
356
|
-
funding: CardFunding | null;
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
export interface StripePaymentElementSavedPaymentMethodUpdateEvent {
|
|
361
|
-
/**
|
|
362
|
-
* The type of element that emitted this event.
|
|
363
|
-
*/
|
|
364
|
-
elementType: 'payment';
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* `true` when the saved payment method is successfully updated.
|
|
368
|
-
*/
|
|
369
|
-
success: boolean;
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* Error message if the saved payment method update fails.
|
|
373
|
-
*/
|
|
374
|
-
error?: string;
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* The updated saved payment method.
|
|
378
|
-
*/
|
|
379
|
-
payment_method: {
|
|
380
|
-
id: string;
|
|
381
|
-
type: string;
|
|
382
|
-
billing_details: {
|
|
383
|
-
address: {
|
|
384
|
-
city: null | string;
|
|
385
|
-
country: null | string;
|
|
386
|
-
line1: null | string;
|
|
387
|
-
line2: null | string;
|
|
388
|
-
postal_code: null | string;
|
|
389
|
-
state: null | string;
|
|
390
|
-
};
|
|
391
|
-
name: null | string;
|
|
392
|
-
email: null | string;
|
|
393
|
-
phone: null | string;
|
|
394
|
-
};
|
|
395
|
-
};
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
export interface StripePaymentElementSavedPaymentMethodRemoveEvent {
|
|
399
|
-
/**
|
|
400
|
-
* The type of element that emitted this event.
|
|
401
|
-
*/
|
|
402
|
-
elementType: 'payment';
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* `true` when the saved payment method is successfully removed.
|
|
406
|
-
*/
|
|
407
|
-
success: boolean;
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* Error message if the saved payment method removal fails.
|
|
411
|
-
*/
|
|
412
|
-
error?: string;
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* The removed saved payment method.
|
|
416
|
-
*/
|
|
417
|
-
payment_method: {
|
|
418
|
-
id: string;
|
|
419
|
-
type: string;
|
|
420
|
-
billing_details: {
|
|
421
|
-
address: {
|
|
422
|
-
city: null | string;
|
|
423
|
-
country: null | string;
|
|
424
|
-
line1: null | string;
|
|
425
|
-
line2: null | string;
|
|
426
|
-
postal_code: null | string;
|
|
427
|
-
state: null | string;
|
|
428
|
-
};
|
|
429
|
-
name: null | string;
|
|
430
|
-
email: null | string;
|
|
431
|
-
phone: null | string;
|
|
432
|
-
};
|
|
433
|
-
};
|
|
434
|
-
}
|
|
@@ -116,31 +116,6 @@ export type StripePaymentElement = StripeElementBase & {
|
|
|
116
116
|
handler?: (event: {elementType: 'payment'}) => any
|
|
117
117
|
): StripePaymentElement;
|
|
118
118
|
|
|
119
|
-
/**
|
|
120
|
-
* The change event is triggered when the `Element`'s value changes.
|
|
121
|
-
* Represents the details of a selected Card payment method.
|
|
122
|
-
*/
|
|
123
|
-
on(
|
|
124
|
-
eventType: 'carddetailschange',
|
|
125
|
-
handler: (event: StripePaymentElementCardDetailsChangeEvent) => any
|
|
126
|
-
): StripePaymentElement;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Triggered when a Saved Payment Method is updated.
|
|
130
|
-
*/
|
|
131
|
-
on(
|
|
132
|
-
eventType: 'savedpaymentmethodupdate',
|
|
133
|
-
handler: (event: StripePaymentElementSavedPaymentMethodUpdateEvent) => any
|
|
134
|
-
): StripePaymentElement;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Triggered when a Saved Payment Method is removed.
|
|
138
|
-
*/
|
|
139
|
-
on(
|
|
140
|
-
eventType: 'savedpaymentmethodremove',
|
|
141
|
-
handler: (event: StripePaymentElementSavedPaymentMethodRemoveEvent) => any
|
|
142
|
-
): StripePaymentElement;
|
|
143
|
-
|
|
144
119
|
/**
|
|
145
120
|
* Updates the options the `PaymentElement` was initialized with.
|
|
146
121
|
* Updates are merged into the existing configuration.
|
|
@@ -183,7 +158,6 @@ export interface FieldsOption {
|
|
|
183
158
|
phone?: FieldOption;
|
|
184
159
|
address?:
|
|
185
160
|
| FieldOption
|
|
186
|
-
| 'if_required'
|
|
187
161
|
| {
|
|
188
162
|
country?: FieldOption;
|
|
189
163
|
postalCode?: FieldOption;
|
|
@@ -323,112 +297,3 @@ export interface StripePaymentElementChangeEvent {
|
|
|
323
297
|
};
|
|
324
298
|
};
|
|
325
299
|
}
|
|
326
|
-
|
|
327
|
-
type CardBrand =
|
|
328
|
-
| 'amex'
|
|
329
|
-
| 'diners'
|
|
330
|
-
| 'discover'
|
|
331
|
-
| 'eftpos_au'
|
|
332
|
-
| 'jcb'
|
|
333
|
-
| 'mastercard'
|
|
334
|
-
| 'unionpay'
|
|
335
|
-
| 'visa'
|
|
336
|
-
| 'unknown';
|
|
337
|
-
type CardFunding = 'credit' | 'debit' | 'prepaid' | 'unknown';
|
|
338
|
-
|
|
339
|
-
export interface StripePaymentElementCardDetailsChangeEvent {
|
|
340
|
-
/**
|
|
341
|
-
* The type of element that emitted this event.
|
|
342
|
-
*/
|
|
343
|
-
elementType: 'payment';
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* `true` when the card details are loading.
|
|
347
|
-
*/
|
|
348
|
-
loading: boolean;
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* The card details for the selected payment method.
|
|
352
|
-
* Undefined while loading and for non card payment methods.
|
|
353
|
-
*/
|
|
354
|
-
details?: {
|
|
355
|
-
brands: CardBrand[] | null;
|
|
356
|
-
funding: CardFunding | null;
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
export interface StripePaymentElementSavedPaymentMethodUpdateEvent {
|
|
361
|
-
/**
|
|
362
|
-
* The type of element that emitted this event.
|
|
363
|
-
*/
|
|
364
|
-
elementType: 'payment';
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* `true` when the saved payment method is successfully updated.
|
|
368
|
-
*/
|
|
369
|
-
success: boolean;
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* Error message if the saved payment method update fails.
|
|
373
|
-
*/
|
|
374
|
-
error?: string;
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* The updated saved payment method.
|
|
378
|
-
*/
|
|
379
|
-
payment_method: {
|
|
380
|
-
id: string;
|
|
381
|
-
type: string;
|
|
382
|
-
billing_details: {
|
|
383
|
-
address: {
|
|
384
|
-
city: null | string;
|
|
385
|
-
country: null | string;
|
|
386
|
-
line1: null | string;
|
|
387
|
-
line2: null | string;
|
|
388
|
-
postal_code: null | string;
|
|
389
|
-
state: null | string;
|
|
390
|
-
};
|
|
391
|
-
name: null | string;
|
|
392
|
-
email: null | string;
|
|
393
|
-
phone: null | string;
|
|
394
|
-
};
|
|
395
|
-
};
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
export interface StripePaymentElementSavedPaymentMethodRemoveEvent {
|
|
399
|
-
/**
|
|
400
|
-
* The type of element that emitted this event.
|
|
401
|
-
*/
|
|
402
|
-
elementType: 'payment';
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* `true` when the saved payment method is successfully removed.
|
|
406
|
-
*/
|
|
407
|
-
success: boolean;
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* Error message if the saved payment method removal fails.
|
|
411
|
-
*/
|
|
412
|
-
error?: string;
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* The removed saved payment method.
|
|
416
|
-
*/
|
|
417
|
-
payment_method: {
|
|
418
|
-
id: string;
|
|
419
|
-
type: string;
|
|
420
|
-
billing_details: {
|
|
421
|
-
address: {
|
|
422
|
-
city: null | string;
|
|
423
|
-
country: null | string;
|
|
424
|
-
line1: null | string;
|
|
425
|
-
line2: null | string;
|
|
426
|
-
postal_code: null | string;
|
|
427
|
-
state: null | string;
|
|
428
|
-
};
|
|
429
|
-
name: null | string;
|
|
430
|
-
email: null | string;
|
|
431
|
-
phone: null | string;
|
|
432
|
-
};
|
|
433
|
-
};
|
|
434
|
-
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StripeAddressElement,
|
|
3
3
|
StripeAddressElementOptions,
|
|
4
|
-
StripeCurrencySelectorElement,
|
|
5
4
|
StripeShippingAddressElement,
|
|
6
5
|
StripeShippingAddressElementOptions,
|
|
7
6
|
StripePaymentRequestButtonElement,
|
|
@@ -333,6 +332,9 @@ export interface StripeElements {
|
|
|
333
332
|
/////////////////////////////
|
|
334
333
|
|
|
335
334
|
/**
|
|
335
|
+
* Requires beta access:
|
|
336
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
337
|
+
*
|
|
336
338
|
* Creates a `LinkAuthenticationElement`.
|
|
337
339
|
*/
|
|
338
340
|
create(
|
|
@@ -341,6 +343,9 @@ export interface StripeElements {
|
|
|
341
343
|
): StripeLinkAuthenticationElement;
|
|
342
344
|
|
|
343
345
|
/**
|
|
346
|
+
* Requires beta access:
|
|
347
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
348
|
+
*
|
|
344
349
|
* Looks up a previously created `Element` by its type.
|
|
345
350
|
*/
|
|
346
351
|
getElement(
|
|
@@ -495,7 +500,6 @@ export type StripeElementType =
|
|
|
495
500
|
| 'cardNumber'
|
|
496
501
|
| 'cardExpiry'
|
|
497
502
|
| 'cardCvc'
|
|
498
|
-
| 'currencySelector'
|
|
499
503
|
| 'epsBank'
|
|
500
504
|
| 'expressCheckout'
|
|
501
505
|
| 'fpxBank'
|
|
@@ -527,7 +531,6 @@ export type StripeElement =
|
|
|
527
531
|
| StripeIbanElement
|
|
528
532
|
| StripeIdealBankElement
|
|
529
533
|
| StripeP24BankElement
|
|
530
|
-
| StripeCurrencySelectorElement
|
|
531
534
|
| StripeExpressCheckoutElement
|
|
532
535
|
| StripePaymentElement
|
|
533
536
|
| StripePaymentMethodMessagingElement
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StripeAddressElement,
|
|
3
3
|
StripeAddressElementOptions,
|
|
4
|
-
StripeCurrencySelectorElement,
|
|
5
4
|
StripeShippingAddressElement,
|
|
6
5
|
StripeShippingAddressElementOptions,
|
|
7
6
|
StripePaymentRequestButtonElement,
|
|
@@ -333,6 +332,9 @@ export interface StripeElements {
|
|
|
333
332
|
/////////////////////////////
|
|
334
333
|
|
|
335
334
|
/**
|
|
335
|
+
* Requires beta access:
|
|
336
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
337
|
+
*
|
|
336
338
|
* Creates a `LinkAuthenticationElement`.
|
|
337
339
|
*/
|
|
338
340
|
create(
|
|
@@ -341,6 +343,9 @@ export interface StripeElements {
|
|
|
341
343
|
): StripeLinkAuthenticationElement;
|
|
342
344
|
|
|
343
345
|
/**
|
|
346
|
+
* Requires beta access:
|
|
347
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
348
|
+
*
|
|
344
349
|
* Looks up a previously created `Element` by its type.
|
|
345
350
|
*/
|
|
346
351
|
getElement(
|
|
@@ -495,7 +500,6 @@ export type StripeElementType =
|
|
|
495
500
|
| 'cardNumber'
|
|
496
501
|
| 'cardExpiry'
|
|
497
502
|
| 'cardCvc'
|
|
498
|
-
| 'currencySelector'
|
|
499
503
|
| 'epsBank'
|
|
500
504
|
| 'expressCheckout'
|
|
501
505
|
| 'fpxBank'
|
|
@@ -527,7 +531,6 @@ export type StripeElement =
|
|
|
527
531
|
| StripeIbanElement
|
|
528
532
|
| StripeIdealBankElement
|
|
529
533
|
| StripeP24BankElement
|
|
530
|
-
| StripeCurrencySelectorElement
|
|
531
534
|
| StripeExpressCheckoutElement
|
|
532
535
|
| StripePaymentElement
|
|
533
536
|
| StripePaymentMethodMessagingElement
|
|
@@ -17,29 +17,6 @@ export type StripeEmbeddedCheckoutShippingDetailsChangeEvent = {
|
|
|
17
17
|
shippingDetails: StripeEmbeddedCheckoutShippingDetails;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
export type StripeEmbeddedCheckoutLineItem = {
|
|
21
|
-
id?: string;
|
|
22
|
-
quantity?: number;
|
|
23
|
-
price?: string;
|
|
24
|
-
display?: {
|
|
25
|
-
name?: string;
|
|
26
|
-
description?: string;
|
|
27
|
-
images?: string[];
|
|
28
|
-
};
|
|
29
|
-
pricingSpec?: {
|
|
30
|
-
unitAmount?: number;
|
|
31
|
-
unitAmountDecimal?: string;
|
|
32
|
-
currency?: string;
|
|
33
|
-
taxBehavior?: 'inclusive' | 'exclusive' | 'unspecified';
|
|
34
|
-
taxCode?: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export type StripeEmbeddedCheckoutLineItemsChangeEvent = {
|
|
39
|
-
checkoutSessionId: string;
|
|
40
|
-
lineItems: StripeEmbeddedCheckoutLineItem[];
|
|
41
|
-
};
|
|
42
|
-
|
|
43
20
|
export type ResultAction =
|
|
44
21
|
| {type: 'accept'}
|
|
45
22
|
| {type: 'reject'; errorMessage?: string};
|
|
@@ -68,13 +45,6 @@ export interface StripeEmbeddedCheckoutOptions {
|
|
|
68
45
|
onShippingDetailsChange?: (
|
|
69
46
|
event: StripeEmbeddedCheckoutShippingDetailsChangeEvent
|
|
70
47
|
) => Promise<ResultAction>;
|
|
71
|
-
/**
|
|
72
|
-
* onLineItemsChange is called when the customer adds, removes, or modifies a line item.
|
|
73
|
-
* The callback is required when [permissions.update.line_items](https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-permissions-update-line_items) is set to `server_only`.
|
|
74
|
-
*/
|
|
75
|
-
onLineItemsChange?: (
|
|
76
|
-
event: StripeEmbeddedCheckoutLineItemsChangeEvent
|
|
77
|
-
) => Promise<ResultAction>;
|
|
78
48
|
}
|
|
79
49
|
|
|
80
50
|
export interface StripeEmbeddedCheckout {
|
|
@@ -17,29 +17,6 @@ export type StripeEmbeddedCheckoutShippingDetailsChangeEvent = {
|
|
|
17
17
|
shippingDetails: StripeEmbeddedCheckoutShippingDetails;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
export type StripeEmbeddedCheckoutLineItem = {
|
|
21
|
-
id?: string;
|
|
22
|
-
quantity?: number;
|
|
23
|
-
price?: string;
|
|
24
|
-
display?: {
|
|
25
|
-
name?: string;
|
|
26
|
-
description?: string;
|
|
27
|
-
images?: string[];
|
|
28
|
-
};
|
|
29
|
-
pricingSpec?: {
|
|
30
|
-
unitAmount?: number;
|
|
31
|
-
unitAmountDecimal?: string;
|
|
32
|
-
currency?: string;
|
|
33
|
-
taxBehavior?: 'inclusive' | 'exclusive' | 'unspecified';
|
|
34
|
-
taxCode?: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export type StripeEmbeddedCheckoutLineItemsChangeEvent = {
|
|
39
|
-
checkoutSessionId: string;
|
|
40
|
-
lineItems: StripeEmbeddedCheckoutLineItem[];
|
|
41
|
-
};
|
|
42
|
-
|
|
43
20
|
export type ResultAction =
|
|
44
21
|
| {type: 'accept'}
|
|
45
22
|
| {type: 'reject'; errorMessage?: string};
|
|
@@ -68,13 +45,6 @@ export interface StripeEmbeddedCheckoutOptions {
|
|
|
68
45
|
onShippingDetailsChange?: (
|
|
69
46
|
event: StripeEmbeddedCheckoutShippingDetailsChangeEvent
|
|
70
47
|
) => Promise<ResultAction>;
|
|
71
|
-
/**
|
|
72
|
-
* onLineItemsChange is called when the customer adds, removes, or modifies a line item.
|
|
73
|
-
* The callback is required when [permissions.update.line_items](https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-permissions-update-line_items) is set to `server_only`.
|
|
74
|
-
*/
|
|
75
|
-
onLineItemsChange?: (
|
|
76
|
-
event: StripeEmbeddedCheckoutLineItemsChangeEvent
|
|
77
|
-
) => Promise<ResultAction>;
|
|
78
48
|
}
|
|
79
49
|
|
|
80
50
|
export interface StripeEmbeddedCheckout {
|
|
@@ -269,21 +269,6 @@ export interface CreatePaymentMethodMobilepayData
|
|
|
269
269
|
type: 'mobilepay';
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
export interface CreatePaymentMethodMultibancoData
|
|
273
|
-
extends PaymentMethodCreateParams {
|
|
274
|
-
type: 'multibanco';
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* The customer's billing details.
|
|
278
|
-
* `email` is required.
|
|
279
|
-
*
|
|
280
|
-
* @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
|
|
281
|
-
*/
|
|
282
|
-
billing_details: PaymentMethodCreateParams.BillingDetails & {
|
|
283
|
-
email: string;
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
|
|
287
272
|
export interface CreatePaymentMethodOxxoData extends PaymentMethodCreateParams {
|
|
288
273
|
type: 'oxxo';
|
|
289
274
|
|
|
@@ -385,11 +370,6 @@ export interface CreatePaymentMethodSofortData
|
|
|
385
370
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
386
371
|
}
|
|
387
372
|
|
|
388
|
-
export interface CreatePaymentMethodTwintData
|
|
389
|
-
extends PaymentMethodCreateParams {
|
|
390
|
-
type: 'twint';
|
|
391
|
-
}
|
|
392
|
-
|
|
393
373
|
export interface CreatePaymentMethodAuBecsDebitData
|
|
394
374
|
extends PaymentMethodCreateParams {
|
|
395
375
|
/**
|
|
@@ -1096,36 +1076,6 @@ export interface ConfirmMobilepayPaymentOptions {
|
|
|
1096
1076
|
handleActions?: boolean;
|
|
1097
1077
|
}
|
|
1098
1078
|
|
|
1099
|
-
/**
|
|
1100
|
-
* Data to be sent with a `stripe.confirmMultibancoPayment` request.
|
|
1101
|
-
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
1102
|
-
*/
|
|
1103
|
-
export interface ConfirmMultibancoPaymentData
|
|
1104
|
-
extends PaymentIntentConfirmParams {
|
|
1105
|
-
/**
|
|
1106
|
-
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
1107
|
-
* This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
|
|
1108
|
-
*
|
|
1109
|
-
* @recommended
|
|
1110
|
-
*/
|
|
1111
|
-
payment_method?: string | Omit<CreatePaymentMethodMultibancoData, 'type'>;
|
|
1112
|
-
|
|
1113
|
-
/**
|
|
1114
|
-
* The url your customer will be directed to after they complete authentication.
|
|
1115
|
-
*
|
|
1116
|
-
* @recommended
|
|
1117
|
-
*/
|
|
1118
|
-
return_url?: string;
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
export interface ConfirmMultibancoPaymentOptions {
|
|
1122
|
-
/**
|
|
1123
|
-
* Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/sofort/accept-a-payment?platform=web#handle-redirect).
|
|
1124
|
-
* Default is `true`.
|
|
1125
|
-
*/
|
|
1126
|
-
handleActions?: boolean;
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
1079
|
/**
|
|
1130
1080
|
* Data to be sent with a `stripe.confirmOxxoPayment` request.
|
|
1131
1081
|
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
@@ -1328,35 +1278,6 @@ export interface ConfirmSofortPaymentOptions {
|
|
|
1328
1278
|
handleActions?: boolean;
|
|
1329
1279
|
}
|
|
1330
1280
|
|
|
1331
|
-
/**
|
|
1332
|
-
* Data to be sent with a `stripe.confirmTwintPayment` request.
|
|
1333
|
-
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
1334
|
-
*/
|
|
1335
|
-
export interface ConfirmTwintPaymentData extends PaymentIntentConfirmParams {
|
|
1336
|
-
/**
|
|
1337
|
-
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
1338
|
-
* This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
|
|
1339
|
-
*
|
|
1340
|
-
* @recommended
|
|
1341
|
-
*/
|
|
1342
|
-
payment_method?: string | Omit<CreatePaymentMethodTwintData, 'type'>;
|
|
1343
|
-
|
|
1344
|
-
/**
|
|
1345
|
-
* The url your customer will be directed to after they complete authentication.
|
|
1346
|
-
*
|
|
1347
|
-
* @recommended
|
|
1348
|
-
*/
|
|
1349
|
-
return_url?: string;
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
export interface ConfirmTwintPaymentOptions {
|
|
1353
|
-
/**
|
|
1354
|
-
* Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/sofort/accept-a-payment?platform=web#handle-redirect).
|
|
1355
|
-
* Default is `true`.
|
|
1356
|
-
*/
|
|
1357
|
-
handleActions?: boolean;
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
1281
|
/**
|
|
1361
1282
|
* Data to be sent with a `stripe.confirmWechatPayPayment` request.
|
|
1362
1283
|
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
@@ -1539,6 +1460,9 @@ export interface ConfirmPaymentData extends PaymentIntentConfirmParams {
|
|
|
1539
1460
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
1540
1461
|
|
|
1541
1462
|
/**
|
|
1463
|
+
* Requires beta access:
|
|
1464
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
1465
|
+
*
|
|
1542
1466
|
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature
|
|
1543
1467
|
*/
|
|
1544
1468
|
allow_redisplay?: 'always' | 'limited' | 'unspecified';
|
|
@@ -269,21 +269,6 @@ export interface CreatePaymentMethodMobilepayData
|
|
|
269
269
|
type: 'mobilepay';
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
export interface CreatePaymentMethodMultibancoData
|
|
273
|
-
extends PaymentMethodCreateParams {
|
|
274
|
-
type: 'multibanco';
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* The customer's billing details.
|
|
278
|
-
* `email` is required.
|
|
279
|
-
*
|
|
280
|
-
* @docs https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
|
|
281
|
-
*/
|
|
282
|
-
billing_details: PaymentMethodCreateParams.BillingDetails & {
|
|
283
|
-
email: string;
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
|
|
287
272
|
export interface CreatePaymentMethodOxxoData extends PaymentMethodCreateParams {
|
|
288
273
|
type: 'oxxo';
|
|
289
274
|
|
|
@@ -385,11 +370,6 @@ export interface CreatePaymentMethodSofortData
|
|
|
385
370
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
386
371
|
}
|
|
387
372
|
|
|
388
|
-
export interface CreatePaymentMethodTwintData
|
|
389
|
-
extends PaymentMethodCreateParams {
|
|
390
|
-
type: 'twint';
|
|
391
|
-
}
|
|
392
|
-
|
|
393
373
|
export interface CreatePaymentMethodAuBecsDebitData
|
|
394
374
|
extends PaymentMethodCreateParams {
|
|
395
375
|
/**
|
|
@@ -1096,36 +1076,6 @@ export interface ConfirmMobilepayPaymentOptions {
|
|
|
1096
1076
|
handleActions?: boolean;
|
|
1097
1077
|
}
|
|
1098
1078
|
|
|
1099
|
-
/**
|
|
1100
|
-
* Data to be sent with a `stripe.confirmMultibancoPayment` request.
|
|
1101
|
-
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
1102
|
-
*/
|
|
1103
|
-
export interface ConfirmMultibancoPaymentData
|
|
1104
|
-
extends PaymentIntentConfirmParams {
|
|
1105
|
-
/**
|
|
1106
|
-
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
1107
|
-
* This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
|
|
1108
|
-
*
|
|
1109
|
-
* @recommended
|
|
1110
|
-
*/
|
|
1111
|
-
payment_method?: string | Omit<CreatePaymentMethodMultibancoData, 'type'>;
|
|
1112
|
-
|
|
1113
|
-
/**
|
|
1114
|
-
* The url your customer will be directed to after they complete authentication.
|
|
1115
|
-
*
|
|
1116
|
-
* @recommended
|
|
1117
|
-
*/
|
|
1118
|
-
return_url?: string;
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
export interface ConfirmMultibancoPaymentOptions {
|
|
1122
|
-
/**
|
|
1123
|
-
* Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/sofort/accept-a-payment?platform=web#handle-redirect).
|
|
1124
|
-
* Default is `true`.
|
|
1125
|
-
*/
|
|
1126
|
-
handleActions?: boolean;
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
1079
|
/**
|
|
1130
1080
|
* Data to be sent with a `stripe.confirmOxxoPayment` request.
|
|
1131
1081
|
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
@@ -1328,35 +1278,6 @@ export interface ConfirmSofortPaymentOptions {
|
|
|
1328
1278
|
handleActions?: boolean;
|
|
1329
1279
|
}
|
|
1330
1280
|
|
|
1331
|
-
/**
|
|
1332
|
-
* Data to be sent with a `stripe.confirmTwintPayment` request.
|
|
1333
|
-
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
1334
|
-
*/
|
|
1335
|
-
export interface ConfirmTwintPaymentData extends PaymentIntentConfirmParams {
|
|
1336
|
-
/**
|
|
1337
|
-
* Either the `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods), or an object containing data to create a `PaymentMethod` with.
|
|
1338
|
-
* This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent`.
|
|
1339
|
-
*
|
|
1340
|
-
* @recommended
|
|
1341
|
-
*/
|
|
1342
|
-
payment_method?: string | Omit<CreatePaymentMethodTwintData, 'type'>;
|
|
1343
|
-
|
|
1344
|
-
/**
|
|
1345
|
-
* The url your customer will be directed to after they complete authentication.
|
|
1346
|
-
*
|
|
1347
|
-
* @recommended
|
|
1348
|
-
*/
|
|
1349
|
-
return_url?: string;
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
export interface ConfirmTwintPaymentOptions {
|
|
1353
|
-
/**
|
|
1354
|
-
* Set this to `false` if you want to [manually handle the authorization redirect](https://stripe.com/docs/payments/sofort/accept-a-payment?platform=web#handle-redirect).
|
|
1355
|
-
* Default is `true`.
|
|
1356
|
-
*/
|
|
1357
|
-
handleActions?: boolean;
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
1281
|
/**
|
|
1361
1282
|
* Data to be sent with a `stripe.confirmWechatPayPayment` request.
|
|
1362
1283
|
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
@@ -1539,6 +1460,9 @@ export interface ConfirmPaymentData extends PaymentIntentConfirmParams {
|
|
|
1539
1460
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
1540
1461
|
|
|
1541
1462
|
/**
|
|
1463
|
+
* Requires beta access:
|
|
1464
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
1465
|
+
*
|
|
1542
1466
|
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature
|
|
1543
1467
|
*/
|
|
1544
1468
|
allow_redisplay?: 'always' | 'limited' | 'unspecified';
|
|
@@ -42,6 +42,9 @@ export interface ConfirmSetupData extends SetupIntentConfirmParams {
|
|
|
42
42
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
+
* Requires beta access:
|
|
46
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
47
|
+
*
|
|
45
48
|
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature
|
|
46
49
|
*/
|
|
47
50
|
allow_redisplay?: 'always' | 'limited' | 'unspecified';
|
|
@@ -42,6 +42,9 @@ export interface ConfirmSetupData extends SetupIntentConfirmParams {
|
|
|
42
42
|
billing_details?: PaymentMethodCreateParams.BillingDetails;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
+
* Requires beta access:
|
|
46
|
+
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
47
|
+
*
|
|
45
48
|
* Specifies if the PaymentMethod should be redisplayed when using the Saved Payment Method feature
|
|
46
49
|
*/
|
|
47
50
|
allow_redisplay?: 'always' | 'limited' | 'unspecified';
|
|
@@ -437,24 +437,6 @@ export interface Stripe {
|
|
|
437
437
|
options?: paymentIntents.ConfirmMobilepayPaymentOptions
|
|
438
438
|
): Promise<PaymentIntentResult>;
|
|
439
439
|
|
|
440
|
-
/**
|
|
441
|
-
* Use `stripe.confirmMultibancoPayment` in the [Multibanco Payment](https://stripe.com/docs/payments/multibanco) with Payment Methods flow when the customer submits your payment form.
|
|
442
|
-
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
|
|
443
|
-
* Note that there are some additional requirements to this flow that are not covered in this reference.
|
|
444
|
-
* Refer to our [integration guide](https://stripe.com/docs/payments/multibanco) for more details.
|
|
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_multibanco_payment
|
|
451
|
-
*/
|
|
452
|
-
confirmMultibancoPayment(
|
|
453
|
-
clientSecret: string,
|
|
454
|
-
data?: paymentIntents.ConfirmMultibancoPaymentData,
|
|
455
|
-
options?: paymentIntents.ConfirmMultibancoPaymentOptions
|
|
456
|
-
): Promise<PaymentIntentResult>;
|
|
457
|
-
|
|
458
440
|
/**
|
|
459
441
|
* Use `stripe.confirmOxxoPayment` in the [OXXO Payment](https://stripe.com/docs/payments/oxxo) with Payment Methods flow when the customer submits your payment form.
|
|
460
442
|
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
|
|
@@ -597,23 +579,6 @@ export interface Stripe {
|
|
|
597
579
|
options?: paymentIntents.ConfirmSofortPaymentOptions
|
|
598
580
|
): Promise<PaymentIntentResult>;
|
|
599
581
|
|
|
600
|
-
/**
|
|
601
|
-
* Use `stripe.confirmTwintPayment` in the [TWINT Payments with Payment Methods](https://stripe.com/docs/payments/twint) flow when the customer submits your payment form.
|
|
602
|
-
* When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
|
|
603
|
-
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
|
|
604
|
-
*
|
|
605
|
-
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
|
|
606
|
-
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
|
|
607
|
-
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
|
|
608
|
-
*
|
|
609
|
-
* @docs https://stripe.com/docs/js/payment_intents/confirm_twint_payment
|
|
610
|
-
*/
|
|
611
|
-
confirmTwintPayment(
|
|
612
|
-
clientSecret: string,
|
|
613
|
-
data?: paymentIntents.ConfirmTwintPaymentData,
|
|
614
|
-
options?: paymentIntents.ConfirmTwintPaymentOptions
|
|
615
|
-
): Promise<PaymentIntentResult>;
|
|
616
|
-
|
|
617
582
|
/**
|
|
618
583
|
* Requires beta access:
|
|
619
584
|
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
@@ -437,24 +437,6 @@ export interface Stripe {
|
|
|
437
437
|
options?: paymentIntents.ConfirmMobilepayPaymentOptions
|
|
438
438
|
): Promise<PaymentIntentResult>;
|
|
439
439
|
|
|
440
|
-
/**
|
|
441
|
-
* Use `stripe.confirmMultibancoPayment` in the [Multibanco Payment](https://stripe.com/docs/payments/multibanco) with Payment Methods flow when the customer submits your payment form.
|
|
442
|
-
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
|
|
443
|
-
* Note that there are some additional requirements to this flow that are not covered in this reference.
|
|
444
|
-
* Refer to our [integration guide](https://stripe.com/docs/payments/multibanco) for more details.
|
|
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_multibanco_payment
|
|
451
|
-
*/
|
|
452
|
-
confirmMultibancoPayment(
|
|
453
|
-
clientSecret: string,
|
|
454
|
-
data?: paymentIntents.ConfirmMultibancoPaymentData,
|
|
455
|
-
options?: paymentIntents.ConfirmMultibancoPaymentOptions
|
|
456
|
-
): Promise<PaymentIntentResult>;
|
|
457
|
-
|
|
458
440
|
/**
|
|
459
441
|
* Use `stripe.confirmOxxoPayment` in the [OXXO Payment](https://stripe.com/docs/payments/oxxo) with Payment Methods flow when the customer submits your payment form.
|
|
460
442
|
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
|
|
@@ -597,23 +579,6 @@ export interface Stripe {
|
|
|
597
579
|
options?: paymentIntents.ConfirmSofortPaymentOptions
|
|
598
580
|
): Promise<PaymentIntentResult>;
|
|
599
581
|
|
|
600
|
-
/**
|
|
601
|
-
* Use `stripe.confirmTwintPayment` in the [TWINT Payments with Payment Methods](https://stripe.com/docs/payments/twint) flow when the customer submits your payment form.
|
|
602
|
-
* When called, it will confirm the `PaymentIntent` with `data` you provide, and it will automatically redirect the customer to authorize the transaction.
|
|
603
|
-
* Once authorization is complete, the customer will be redirected back to your specified `return_url`.
|
|
604
|
-
*
|
|
605
|
-
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
|
|
606
|
-
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new `PaymentMethod` for you.
|
|
607
|
-
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
|
|
608
|
-
*
|
|
609
|
-
* @docs https://stripe.com/docs/js/payment_intents/confirm_twint_payment
|
|
610
|
-
*/
|
|
611
|
-
confirmTwintPayment(
|
|
612
|
-
clientSecret: string,
|
|
613
|
-
data?: paymentIntents.ConfirmTwintPaymentData,
|
|
614
|
-
options?: paymentIntents.ConfirmTwintPaymentOptions
|
|
615
|
-
): Promise<PaymentIntentResult>;
|
|
616
|
-
|
|
617
582
|
/**
|
|
618
583
|
* Requires beta access:
|
|
619
584
|
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
package/package.json
CHANGED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import {StripeElementBase} from './base';
|
|
2
|
-
import {StripeError} from '../stripe';
|
|
3
|
-
|
|
4
|
-
export type StripeCurrencySelectorElement = StripeElementBase & {
|
|
5
|
-
/**
|
|
6
|
-
* Triggered when the element is fully rendered and can accept `element.focus` calls.
|
|
7
|
-
*/
|
|
8
|
-
on(
|
|
9
|
-
eventType: 'ready',
|
|
10
|
-
handler: (event: {elementType: 'currencySelector'}) => any
|
|
11
|
-
): StripeCurrencySelectorElement;
|
|
12
|
-
once(
|
|
13
|
-
eventType: 'ready',
|
|
14
|
-
handler: (event: {elementType: 'currencySelector'}) => any
|
|
15
|
-
): StripeCurrencySelectorElement;
|
|
16
|
-
off(
|
|
17
|
-
eventType: 'ready',
|
|
18
|
-
handler?: (event: {elementType: 'currencySelector'}) => any
|
|
19
|
-
): StripeCurrencySelectorElement;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Triggered when the element gains focus.
|
|
23
|
-
*/
|
|
24
|
-
on(
|
|
25
|
-
eventType: 'focus',
|
|
26
|
-
handler: (event: {elementType: 'currencySelector'}) => any
|
|
27
|
-
): StripeCurrencySelectorElement;
|
|
28
|
-
once(
|
|
29
|
-
eventType: 'focus',
|
|
30
|
-
handler: (event: {elementType: 'currencySelector'}) => any
|
|
31
|
-
): StripeCurrencySelectorElement;
|
|
32
|
-
off(
|
|
33
|
-
eventType: 'focus',
|
|
34
|
-
handler?: (event: {elementType: 'currencySelector'}) => any
|
|
35
|
-
): StripeCurrencySelectorElement;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Triggered when the element loses focus.
|
|
39
|
-
*/
|
|
40
|
-
on(
|
|
41
|
-
eventType: 'blur',
|
|
42
|
-
handler: (event: {elementType: 'currencySelector'}) => any
|
|
43
|
-
): StripeCurrencySelectorElement;
|
|
44
|
-
once(
|
|
45
|
-
eventType: 'blur',
|
|
46
|
-
handler: (event: {elementType: 'currencySelector'}) => any
|
|
47
|
-
): StripeCurrencySelectorElement;
|
|
48
|
-
off(
|
|
49
|
-
eventType: 'blur',
|
|
50
|
-
handler?: (event: {elementType: 'currencySelector'}) => any
|
|
51
|
-
): StripeCurrencySelectorElement;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Triggered when the escape key is pressed within the element.
|
|
55
|
-
*/
|
|
56
|
-
on(
|
|
57
|
-
eventType: 'escape',
|
|
58
|
-
handler: (event: {elementType: 'currencySelector'}) => any
|
|
59
|
-
): StripeCurrencySelectorElement;
|
|
60
|
-
once(
|
|
61
|
-
eventType: 'escape',
|
|
62
|
-
handler: (event: {elementType: 'currencySelector'}) => any
|
|
63
|
-
): StripeCurrencySelectorElement;
|
|
64
|
-
off(
|
|
65
|
-
eventType: 'escape',
|
|
66
|
-
handler?: (event: {elementType: 'currencySelector'}) => any
|
|
67
|
-
): StripeCurrencySelectorElement;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Triggered when the element fails to load.
|
|
71
|
-
*/
|
|
72
|
-
on(
|
|
73
|
-
eventType: 'loaderror',
|
|
74
|
-
handler: (event: {
|
|
75
|
-
elementType: 'currencySelector';
|
|
76
|
-
error: StripeError;
|
|
77
|
-
}) => any
|
|
78
|
-
): StripeCurrencySelectorElement;
|
|
79
|
-
once(
|
|
80
|
-
eventType: 'loaderror',
|
|
81
|
-
handler: (event: {
|
|
82
|
-
elementType: 'currencySelector';
|
|
83
|
-
error: StripeError;
|
|
84
|
-
}) => any
|
|
85
|
-
): StripeCurrencySelectorElement;
|
|
86
|
-
off(
|
|
87
|
-
eventType: 'loaderror',
|
|
88
|
-
handler?: (event: {
|
|
89
|
-
elementType: 'currencySelector';
|
|
90
|
-
error: StripeError;
|
|
91
|
-
}) => any
|
|
92
|
-
): StripeCurrencySelectorElement;
|
|
93
|
-
};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import {StripeElementBase} from './base';
|
|
2
|
-
import {StripeError} from '../stripe';
|
|
3
|
-
|
|
4
|
-
export type StripeCurrencySelectorElement = StripeElementBase & {
|
|
5
|
-
/**
|
|
6
|
-
* Triggered when the element is fully rendered and can accept `element.focus` calls.
|
|
7
|
-
*/
|
|
8
|
-
on(
|
|
9
|
-
eventType: 'ready',
|
|
10
|
-
handler: (event: {elementType: 'currencySelector'}) => any
|
|
11
|
-
): StripeCurrencySelectorElement;
|
|
12
|
-
once(
|
|
13
|
-
eventType: 'ready',
|
|
14
|
-
handler: (event: {elementType: 'currencySelector'}) => any
|
|
15
|
-
): StripeCurrencySelectorElement;
|
|
16
|
-
off(
|
|
17
|
-
eventType: 'ready',
|
|
18
|
-
handler?: (event: {elementType: 'currencySelector'}) => any
|
|
19
|
-
): StripeCurrencySelectorElement;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Triggered when the element gains focus.
|
|
23
|
-
*/
|
|
24
|
-
on(
|
|
25
|
-
eventType: 'focus',
|
|
26
|
-
handler: (event: {elementType: 'currencySelector'}) => any
|
|
27
|
-
): StripeCurrencySelectorElement;
|
|
28
|
-
once(
|
|
29
|
-
eventType: 'focus',
|
|
30
|
-
handler: (event: {elementType: 'currencySelector'}) => any
|
|
31
|
-
): StripeCurrencySelectorElement;
|
|
32
|
-
off(
|
|
33
|
-
eventType: 'focus',
|
|
34
|
-
handler?: (event: {elementType: 'currencySelector'}) => any
|
|
35
|
-
): StripeCurrencySelectorElement;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Triggered when the element loses focus.
|
|
39
|
-
*/
|
|
40
|
-
on(
|
|
41
|
-
eventType: 'blur',
|
|
42
|
-
handler: (event: {elementType: 'currencySelector'}) => any
|
|
43
|
-
): StripeCurrencySelectorElement;
|
|
44
|
-
once(
|
|
45
|
-
eventType: 'blur',
|
|
46
|
-
handler: (event: {elementType: 'currencySelector'}) => any
|
|
47
|
-
): StripeCurrencySelectorElement;
|
|
48
|
-
off(
|
|
49
|
-
eventType: 'blur',
|
|
50
|
-
handler?: (event: {elementType: 'currencySelector'}) => any
|
|
51
|
-
): StripeCurrencySelectorElement;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Triggered when the escape key is pressed within the element.
|
|
55
|
-
*/
|
|
56
|
-
on(
|
|
57
|
-
eventType: 'escape',
|
|
58
|
-
handler: (event: {elementType: 'currencySelector'}) => any
|
|
59
|
-
): StripeCurrencySelectorElement;
|
|
60
|
-
once(
|
|
61
|
-
eventType: 'escape',
|
|
62
|
-
handler: (event: {elementType: 'currencySelector'}) => any
|
|
63
|
-
): StripeCurrencySelectorElement;
|
|
64
|
-
off(
|
|
65
|
-
eventType: 'escape',
|
|
66
|
-
handler?: (event: {elementType: 'currencySelector'}) => any
|
|
67
|
-
): StripeCurrencySelectorElement;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Triggered when the element fails to load.
|
|
71
|
-
*/
|
|
72
|
-
on(
|
|
73
|
-
eventType: 'loaderror',
|
|
74
|
-
handler: (event: {
|
|
75
|
-
elementType: 'currencySelector';
|
|
76
|
-
error: StripeError;
|
|
77
|
-
}) => any
|
|
78
|
-
): StripeCurrencySelectorElement;
|
|
79
|
-
once(
|
|
80
|
-
eventType: 'loaderror',
|
|
81
|
-
handler: (event: {
|
|
82
|
-
elementType: 'currencySelector';
|
|
83
|
-
error: StripeError;
|
|
84
|
-
}) => any
|
|
85
|
-
): StripeCurrencySelectorElement;
|
|
86
|
-
off(
|
|
87
|
-
eventType: 'loaderror',
|
|
88
|
-
handler?: (event: {
|
|
89
|
-
elementType: 'currencySelector';
|
|
90
|
-
error: StripeError;
|
|
91
|
-
}) => any
|
|
92
|
-
): StripeCurrencySelectorElement;
|
|
93
|
-
};
|