@stripe/stripe-js 3.4.0 → 3.5.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/payment-methods.d.mts +9 -9
- package/dist/api/payment-methods.d.ts +9 -9
- 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 +1 -0
- package/dist/stripe-js/custom-checkout.d.ts +1 -0
- package/dist/stripe-js/payment-intents.d.mts +36 -0
- package/dist/stripe-js/payment-intents.d.ts +36 -0
- package/dist/stripe-js/stripe.d.mts +22 -0
- package/dist/stripe-js/stripe.d.ts +22 -0
- package/package.json +1 -1
|
@@ -403,17 +403,17 @@ export namespace PaymentMethodCreateParams {
|
|
|
403
403
|
/**
|
|
404
404
|
* Email address.
|
|
405
405
|
*/
|
|
406
|
-
email?: string;
|
|
406
|
+
email?: string | null;
|
|
407
407
|
|
|
408
408
|
/**
|
|
409
409
|
* Full name.
|
|
410
410
|
*/
|
|
411
|
-
name?: string;
|
|
411
|
+
name?: string | null;
|
|
412
412
|
|
|
413
413
|
/**
|
|
414
414
|
* Billing phone number (including extension).
|
|
415
415
|
*/
|
|
416
|
-
phone?: string;
|
|
416
|
+
phone?: string | null;
|
|
417
417
|
}
|
|
418
418
|
|
|
419
419
|
export namespace BillingDetails {
|
|
@@ -421,32 +421,32 @@ export namespace PaymentMethodCreateParams {
|
|
|
421
421
|
/**
|
|
422
422
|
* City, district, suburb, town, or village.
|
|
423
423
|
*/
|
|
424
|
-
city?: string;
|
|
424
|
+
city?: string | null;
|
|
425
425
|
|
|
426
426
|
/**
|
|
427
427
|
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
428
428
|
*/
|
|
429
|
-
country?: string;
|
|
429
|
+
country?: string | null;
|
|
430
430
|
|
|
431
431
|
/**
|
|
432
432
|
* Address line 1 (e.g., street, PO Box, or company name).
|
|
433
433
|
*/
|
|
434
|
-
line1?: string;
|
|
434
|
+
line1?: string | null;
|
|
435
435
|
|
|
436
436
|
/**
|
|
437
437
|
* Address line 2 (e.g., apartment, suite, unit, or building).
|
|
438
438
|
*/
|
|
439
|
-
line2?: string;
|
|
439
|
+
line2?: string | null;
|
|
440
440
|
|
|
441
441
|
/**
|
|
442
442
|
* ZIP or postal code.
|
|
443
443
|
*/
|
|
444
|
-
postal_code?: string;
|
|
444
|
+
postal_code?: string | null;
|
|
445
445
|
|
|
446
446
|
/**
|
|
447
447
|
* State, county, province, or region.
|
|
448
448
|
*/
|
|
449
|
-
state?: string;
|
|
449
|
+
state?: string | null;
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
452
|
}
|
|
@@ -403,17 +403,17 @@ export namespace PaymentMethodCreateParams {
|
|
|
403
403
|
/**
|
|
404
404
|
* Email address.
|
|
405
405
|
*/
|
|
406
|
-
email?: string;
|
|
406
|
+
email?: string | null;
|
|
407
407
|
|
|
408
408
|
/**
|
|
409
409
|
* Full name.
|
|
410
410
|
*/
|
|
411
|
-
name?: string;
|
|
411
|
+
name?: string | null;
|
|
412
412
|
|
|
413
413
|
/**
|
|
414
414
|
* Billing phone number (including extension).
|
|
415
415
|
*/
|
|
416
|
-
phone?: string;
|
|
416
|
+
phone?: string | null;
|
|
417
417
|
}
|
|
418
418
|
|
|
419
419
|
export namespace BillingDetails {
|
|
@@ -421,32 +421,32 @@ export namespace PaymentMethodCreateParams {
|
|
|
421
421
|
/**
|
|
422
422
|
* City, district, suburb, town, or village.
|
|
423
423
|
*/
|
|
424
|
-
city?: string;
|
|
424
|
+
city?: string | null;
|
|
425
425
|
|
|
426
426
|
/**
|
|
427
427
|
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
428
428
|
*/
|
|
429
|
-
country?: string;
|
|
429
|
+
country?: string | null;
|
|
430
430
|
|
|
431
431
|
/**
|
|
432
432
|
* Address line 1 (e.g., street, PO Box, or company name).
|
|
433
433
|
*/
|
|
434
|
-
line1?: string;
|
|
434
|
+
line1?: string | null;
|
|
435
435
|
|
|
436
436
|
/**
|
|
437
437
|
* Address line 2 (e.g., apartment, suite, unit, or building).
|
|
438
438
|
*/
|
|
439
|
-
line2?: string;
|
|
439
|
+
line2?: string | null;
|
|
440
440
|
|
|
441
441
|
/**
|
|
442
442
|
* ZIP or postal code.
|
|
443
443
|
*/
|
|
444
|
-
postal_code?: string;
|
|
444
|
+
postal_code?: string | null;
|
|
445
445
|
|
|
446
446
|
/**
|
|
447
447
|
* State, county, province, or region.
|
|
448
448
|
*/
|
|
449
|
-
state?: string;
|
|
449
|
+
state?: string | null;
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
452
|
}
|
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
package/dist/pure.js
CHANGED
package/dist/pure.mjs
CHANGED
|
@@ -221,6 +221,7 @@ export type StripeCustomCheckoutExpressCheckoutElementOptions = {
|
|
|
221
221
|
buttonTheme: StripeExpressCheckoutElementOptions['buttonTheme'];
|
|
222
222
|
buttonType: StripeExpressCheckoutElementOptions['buttonType'];
|
|
223
223
|
layout: StripeExpressCheckoutElementOptions['layout'];
|
|
224
|
+
paymentMethodOrder: StripeExpressCheckoutElementOptions['paymentMethodOrder'];
|
|
224
225
|
};
|
|
225
226
|
|
|
226
227
|
export type StripeCustomCheckoutUpdateHandler = (
|
|
@@ -221,6 +221,7 @@ export type StripeCustomCheckoutExpressCheckoutElementOptions = {
|
|
|
221
221
|
buttonTheme: StripeExpressCheckoutElementOptions['buttonTheme'];
|
|
222
222
|
buttonType: StripeExpressCheckoutElementOptions['buttonType'];
|
|
223
223
|
layout: StripeExpressCheckoutElementOptions['layout'];
|
|
224
|
+
paymentMethodOrder: StripeExpressCheckoutElementOptions['paymentMethodOrder'];
|
|
224
225
|
};
|
|
225
226
|
|
|
226
227
|
export type StripeCustomCheckoutUpdateHandler = (
|
|
@@ -264,6 +264,11 @@ export interface CreatePaymentMethodKonbiniData
|
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
+
export interface CreatePaymentMethodMobilepayData
|
|
268
|
+
extends PaymentMethodCreateParams {
|
|
269
|
+
type: 'mobilepay';
|
|
270
|
+
}
|
|
271
|
+
|
|
267
272
|
export interface CreatePaymentMethodOxxoData extends PaymentMethodCreateParams {
|
|
268
273
|
type: 'oxxo';
|
|
269
274
|
|
|
@@ -1040,6 +1045,37 @@ export interface ConfirmKonbiniPaymentOptions {
|
|
|
1040
1045
|
handleActions?: boolean;
|
|
1041
1046
|
}
|
|
1042
1047
|
|
|
1048
|
+
/**
|
|
1049
|
+
* Data to be sent with a `stripe.confirmMobilepayPayment` request.
|
|
1050
|
+
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
1051
|
+
*/
|
|
1052
|
+
export interface ConfirmMobilepayPaymentData
|
|
1053
|
+
extends PaymentIntentConfirmParams {
|
|
1054
|
+
/**
|
|
1055
|
+
* The `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods).
|
|
1056
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent` or a new `PaymentMethod` will be created.
|
|
1057
|
+
*
|
|
1058
|
+
* @recommended
|
|
1059
|
+
*/
|
|
1060
|
+
payment_method?: string | Omit<CreatePaymentMethodMobilepayData, 'type'>;
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* The url your customer will be directed to after they complete authentication.
|
|
1064
|
+
*/
|
|
1065
|
+
return_url?: string;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* An options object to control the behavior of `stripe.confirmMobilepayPayment`.
|
|
1070
|
+
*/
|
|
1071
|
+
export interface ConfirmMobilepayPaymentOptions {
|
|
1072
|
+
/**
|
|
1073
|
+
* Set this to `false` if you want to [manually handle the redirect](https://docs.stripe.com/payments/mobilepay/accept-a-payment?web-or-mobile=web&payments-ui-type=direct-api#web-confirm-payment-intent).
|
|
1074
|
+
* Default is `true`.
|
|
1075
|
+
*/
|
|
1076
|
+
handleActions?: boolean;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1043
1079
|
/**
|
|
1044
1080
|
* Data to be sent with a `stripe.confirmOxxoPayment` request.
|
|
1045
1081
|
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
@@ -264,6 +264,11 @@ export interface CreatePaymentMethodKonbiniData
|
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
+
export interface CreatePaymentMethodMobilepayData
|
|
268
|
+
extends PaymentMethodCreateParams {
|
|
269
|
+
type: 'mobilepay';
|
|
270
|
+
}
|
|
271
|
+
|
|
267
272
|
export interface CreatePaymentMethodOxxoData extends PaymentMethodCreateParams {
|
|
268
273
|
type: 'oxxo';
|
|
269
274
|
|
|
@@ -1040,6 +1045,37 @@ export interface ConfirmKonbiniPaymentOptions {
|
|
|
1040
1045
|
handleActions?: boolean;
|
|
1041
1046
|
}
|
|
1042
1047
|
|
|
1048
|
+
/**
|
|
1049
|
+
* Data to be sent with a `stripe.confirmMobilepayPayment` request.
|
|
1050
|
+
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
1051
|
+
*/
|
|
1052
|
+
export interface ConfirmMobilepayPaymentData
|
|
1053
|
+
extends PaymentIntentConfirmParams {
|
|
1054
|
+
/**
|
|
1055
|
+
* The `id` of an existing [PaymentMethod](https://stripe.com/docs/api/payment_methods).
|
|
1056
|
+
* This field is optional if a `PaymentMethod` has already been attached to this `PaymentIntent` or a new `PaymentMethod` will be created.
|
|
1057
|
+
*
|
|
1058
|
+
* @recommended
|
|
1059
|
+
*/
|
|
1060
|
+
payment_method?: string | Omit<CreatePaymentMethodMobilepayData, 'type'>;
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* The url your customer will be directed to after they complete authentication.
|
|
1064
|
+
*/
|
|
1065
|
+
return_url?: string;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* An options object to control the behavior of `stripe.confirmMobilepayPayment`.
|
|
1070
|
+
*/
|
|
1071
|
+
export interface ConfirmMobilepayPaymentOptions {
|
|
1072
|
+
/**
|
|
1073
|
+
* Set this to `false` if you want to [manually handle the redirect](https://docs.stripe.com/payments/mobilepay/accept-a-payment?web-or-mobile=web&payments-ui-type=direct-api#web-confirm-payment-intent).
|
|
1074
|
+
* Default is `true`.
|
|
1075
|
+
*/
|
|
1076
|
+
handleActions?: boolean;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1043
1079
|
/**
|
|
1044
1080
|
* Data to be sent with a `stripe.confirmOxxoPayment` request.
|
|
1045
1081
|
* Refer to the [Payment Intents API](https://stripe.com/docs/api/payment_intents/confirm) for a full list of parameters.
|
|
@@ -420,6 +420,23 @@ export interface Stripe {
|
|
|
420
420
|
options?: paymentIntents.ConfirmKonbiniPaymentOptions
|
|
421
421
|
): Promise<PaymentIntentResult>;
|
|
422
422
|
|
|
423
|
+
/**
|
|
424
|
+
* Use `stripe.confirmMobilepayPayment` in the [Mobilepay Payments](https://docs.stripe.com/payments/mobilepay) with Payment Methods flow when the customer submits your payment form.
|
|
425
|
+
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
|
|
426
|
+
* Refer to our [integration guide](https://docs.stripe.com/payments/mobilepay) for more details.
|
|
427
|
+
*
|
|
428
|
+
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
|
|
429
|
+
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
|
|
430
|
+
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
|
|
431
|
+
*
|
|
432
|
+
* @docs https://stripe.com/docs/js/payment_intents/confirm_mobilepay_payment
|
|
433
|
+
*/
|
|
434
|
+
confirmMobilepayPayment(
|
|
435
|
+
clientSecret: string,
|
|
436
|
+
data?: paymentIntents.ConfirmMobilepayPaymentData,
|
|
437
|
+
options?: paymentIntents.ConfirmMobilepayPaymentOptions
|
|
438
|
+
): Promise<PaymentIntentResult>;
|
|
439
|
+
|
|
423
440
|
/**
|
|
424
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.
|
|
425
442
|
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
|
|
@@ -1464,6 +1481,11 @@ export interface StripeError {
|
|
|
1464
1481
|
*/
|
|
1465
1482
|
param?: string;
|
|
1466
1483
|
|
|
1484
|
+
/**
|
|
1485
|
+
* A URL to the request log entry in your dashboard.
|
|
1486
|
+
*/
|
|
1487
|
+
request_log_url?: string;
|
|
1488
|
+
|
|
1467
1489
|
/**
|
|
1468
1490
|
* The `PaymentIntent` object for errors returned on a request involving a `PaymentIntent`.
|
|
1469
1491
|
*/
|
|
@@ -420,6 +420,23 @@ export interface Stripe {
|
|
|
420
420
|
options?: paymentIntents.ConfirmKonbiniPaymentOptions
|
|
421
421
|
): Promise<PaymentIntentResult>;
|
|
422
422
|
|
|
423
|
+
/**
|
|
424
|
+
* Use `stripe.confirmMobilepayPayment` in the [Mobilepay Payments](https://docs.stripe.com/payments/mobilepay) with Payment Methods flow when the customer submits your payment form.
|
|
425
|
+
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
|
|
426
|
+
* Refer to our [integration guide](https://docs.stripe.com/payments/mobilepay) for more details.
|
|
427
|
+
*
|
|
428
|
+
* When you confirm a `PaymentIntent`, it needs to have an attached [PaymentMethod](https://stripe.com/docs/api/payment_methods).
|
|
429
|
+
* In addition to confirming the `PaymentIntent`, this method can automatically create and attach a new PaymentMethod for you.
|
|
430
|
+
* If you have already attached a `PaymentMethod` you can call this method without needing to provide any additional data.
|
|
431
|
+
*
|
|
432
|
+
* @docs https://stripe.com/docs/js/payment_intents/confirm_mobilepay_payment
|
|
433
|
+
*/
|
|
434
|
+
confirmMobilepayPayment(
|
|
435
|
+
clientSecret: string,
|
|
436
|
+
data?: paymentIntents.ConfirmMobilepayPaymentData,
|
|
437
|
+
options?: paymentIntents.ConfirmMobilepayPaymentOptions
|
|
438
|
+
): Promise<PaymentIntentResult>;
|
|
439
|
+
|
|
423
440
|
/**
|
|
424
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.
|
|
425
442
|
* When called, it will confirm the [PaymentIntent](https://stripe.com/docs/api/payment_intents) with `data` you provide.
|
|
@@ -1464,6 +1481,11 @@ export interface StripeError {
|
|
|
1464
1481
|
*/
|
|
1465
1482
|
param?: string;
|
|
1466
1483
|
|
|
1484
|
+
/**
|
|
1485
|
+
* A URL to the request log entry in your dashboard.
|
|
1486
|
+
*/
|
|
1487
|
+
request_log_url?: string;
|
|
1488
|
+
|
|
1467
1489
|
/**
|
|
1468
1490
|
* The `PaymentIntent` object for errors returned on a request involving a `PaymentIntent`.
|
|
1469
1491
|
*/
|