PaymentMethodChangeEvent

The PaymentMethodChangeEvent interface of the Payment Request API describes the paymentmethodchange event which is fired by some payment handlers when the user switches payment instruments (e.g., a user selects a "store" card to make a purchase while using Apple Pay). Available only in secure contexts.

MDN Reference

Constructors

Link copied to clipboard
constructor(type: EventType<PaymentMethodChangeEvent>, init: PaymentMethodChangeEventInit = definedExternally)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
external val bubbles: Boolean
Link copied to clipboard
external val cancelable: Boolean
Link copied to clipboard
external val composed: Boolean
Link copied to clipboard
external val currentTarget: EventTarget?
Link copied to clipboard
Link copied to clipboard
external val eventPhase: EventPhase
Link copied to clipboard
external val isTrusted: Boolean
Link copied to clipboard
external val methodDetails: JsAny?

The read-only methodDetails property of the PaymentMethodChangeEvent interface is an object containing any data the payment handler may provide to describe the change the user has made to their payment method. The value is null if no details are available.

Link copied to clipboard
external val methodName: String

The read-only methodName property of the PaymentMethodChangeEvent interface is a string which uniquely identifies the payment handler currently selected by the user. The payment handler may be a payment technology, such as Apple Pay or Android Pay, and each payment handler may support multiple payment methods; changes to the payment method within the payment handler are described by the PaymentMethodChangeEvent.

Link copied to clipboard
external val target: EventTarget?
Link copied to clipboard
Link copied to clipboard
open external override val type: EventType<PaymentMethodChangeEvent>

Functions

Link copied to clipboard
Link copied to clipboard
external fun preventDefault()
Link copied to clipboard
Link copied to clipboard
external fun stopPropagation()
Link copied to clipboard
external fun updateWith(detailsPromise: PromiseLike<PaymentDetailsUpdate>)
external fun updateWith(detailsPromise: PaymentDetailsUpdate)

The updateWith() method of the PaymentRequestUpdateEvent interface updates the details of an existing PaymentRequest.