The Payment Request API's
PaymentRequest interface is the primary access point into the API, and lets web content and apps accept payments from the end user on behalf of the operator of the site or the publisher of the app.
Creates a new
PaymentRequest.idRead only Secure context
An unique identifier for a particular
PaymentRequest, which can be set via
details.id. When none is set, it defaults to a UUID.
PaymentRequest.shippingAddressRead only Secure context
If requested via payment options, returns the shipping address chosen by the user for the purposes of calculating shipping. This property is only populated if the constructor is called with the
requestShippingflag set to true. Additionally, in some browsers, the parts of the address will be redacted for privacy until the user indicates they are ready to complete the transaction (i.e., they hit "Pay").
PaymentRequest.shippingOptionRead only Secure context
Returns the identifier of the selected shipping option. This property is only populated if the constructor is called with the
requestShippingflag set to true.
PaymentRequest.shippingTypeRead only Secure context
Returns the type of shipping used to fulfill the transaction. This will be one of
nullif a value was not provided in the constructor.
Indicates whether the
PaymentRequestobject can make a payment before calling
Causes the user agent to begin the user interaction for the payment request.
Causes the user agent to end the payment request and to remove any user interface that might be shown.
With some payment handlers (e.g., Apple Pay), this event handler is called to handle the
merchantvalidationevent, which is dispatched when the user agent requires that the merchant validate that the merchant or vendor requesting payment is legitimate. Also available using the
onmerchantvalidationevent handler property.
With some payment handlers (e.g., Apple Pay), dispatched whenever the user changes payment instrument, like switching from a credit card to a debit card. Also available using the
onpaymentmethodchangeevent handler property.
Dispatched whenever the user changes their shipping address. Also available using the
onshippingaddresschangeevent handler property.
Dispatched whenever the user changes a shipping option. Also available using the
onshippingoptionchangeevent handler property.
|Payment Request API |
BCD tables only load in the browser