diff --git a/tests/types/src/valid.ts b/tests/types/src/valid.ts index 41ed15e1..bf570059 100644 --- a/tests/types/src/valid.ts +++ b/tests/types/src/valid.ts @@ -870,7 +870,7 @@ expressCheckoutElement }) => {} ); -expressCheckoutElement.on('confirm', ({paymentFailed}) => { +expressCheckoutElement.on('confirm', ({paymentFailed, expressPaymentType}) => { paymentFailed(); paymentFailed({}); paymentFailed({reason: 'invalid_shipping_address'}); diff --git a/types/stripe-js/elements/express-checkout.d.ts b/types/stripe-js/elements/express-checkout.d.ts index 684b7ce1..9f73525c 100644 --- a/types/stripe-js/elements/express-checkout.d.ts +++ b/types/stripe-js/elements/express-checkout.d.ts @@ -188,7 +188,7 @@ export type StripeExpressCheckoutElement = StripeElementBase & { ): StripeExpressCheckoutElement; }; -export type PaymentMethodType = 'google_pay' | 'apple_pay' | 'link'; +export type ExpressPaymentType = 'google_pay' | 'apple_pay' | 'link' | 'paypal'; export type ExpressCheckoutPartialAddress = { city: string; @@ -420,7 +420,7 @@ export interface StripeExpressCheckoutElementClickEvent { /** * The payment method associated with the button that was clicked. */ - paymentMethodType: PaymentMethodType; + expressPaymentType: ExpressPaymentType; /** * Callback to configure the details shown on a payment interface, including which fields to collect. @@ -443,7 +443,7 @@ export interface StripeExpressCheckoutElementConfirmEvent { shippingRate?: ShippingRate; - paymentMethodType: PaymentMethodType; + expressPaymentType: ExpressPaymentType; } export type ChangeResolveDetails = {