Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The PaymentRequest interface of the Payment Request API is the primary access point into the API, and lets web content and apps accept payments from the end user.
PaymentRequest() Secure context
PaymentRequest object.PaymentRequest.id Read only Secure context
PaymentRequest, which can be set via details.id. When none is set, it defaults to a UUID.PaymentRequest.shippingAddress Read only Secure context
requestShipping flag 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.shippingOption Read only Secure context
requestShipping flag set to true.PaymentRequest.shippingType Read only Secure context
shipping, delivery, pickup, or null if a value was not provided in the constructor.PaymentRequest.onshippingaddresschange Secure context
PaymentRequest.onshippingoptionchange Secure context
PaymentRequest.onpaymentmethodchange Secure context
PaymentRequest.onmerchantvalidation Secure context
merchantvalidation event, which is dispatched when the user agent requires that the merchant validate that the merchant or vendor requesting payment is legitimate.PaymentRequest.canMakePayment() Secure context
PaymentRequest object can make a payment before calling show().PaymentRequest.show() Secure context
PaymentRequest.abort() Secure context
| Specification | Status | Comment |
|---|---|---|
| Payment Request API The definition of 'PaymentRequest' in that specification. | Candidate Recommendation | Initial definition. |
| Desktop | ||||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
| Basic support | 61
|
Yes | 55
|
No | No | ? |
PaymentRequest() constructor
|
61
|
Yes | 55
|
No | No | ? |
abort
|
61
|
15 | 55
|
No | No | ? |
canMakePayment
|
61
|
16 | 55
|
No | No | ? |
id |
60
|
? | ? | ? | ? | ? |
onpaymentmethodchange
|
No | ? | 63
|
No | No | ? |
onshippingaddresschange
|
61
|
15 | 55
|
No | No | ? |
onshippingoptionchange
|
61
|
15 | 55
|
No | No | ? |
paymentAddress
|
61
|
15 | 55
|
No | No | ? |
requestId
|
No | Yes | 55
|
No | No | ? |
shippingOption
|
61
|
15 | 55
|
No | No | ? |
shippingType
|
61
|
15 | 55
|
No | No | ? |
show
|
61
|
15 | 55
|
No | No | ? |
| Mobile | |||||||
|---|---|---|---|---|---|---|---|
| Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | No | 53
|
Yes | 55
|
No | ? | 6.0 |
PaymentRequest() constructor
|
No | 53
|
Yes | 55
|
No | ? | 6.0 |
abort
|
No | 53
|
Yes | 55
|
No | ? | 6.0 |
canMakePayment
|
No | 56
|
Yes | 55
|
No | ? | 6.0 |
id |
? | 60
|
? | ? | ? | ? | ? |
onpaymentmethodchange
|
No | No | ? | 63
|
No | ? | ? |
onshippingaddresschange
|
No | 53
|
Yes | 55
|
No | ? | 6.0 |
onshippingoptionchange
|
No | 53
|
Yes | 55
|
No | ? | 6.0 |
paymentAddress
|
No | 53
|
Yes | 55
|
No | ? | 6.0 |
requestId
|
No | No | Yes | 55
|
No | ? | No |
shippingOption
|
No | 53
|
Yes | 55
|
No | ? | 6.0 |
shippingType
|
No | 56
|
Yes | 55
|
No | ? | 6.0 |
show
|
No | 53
|
Yes | 55
|
No | ? | 6.0 |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequest