Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The PaymentResponse interface of the Payment Request API is returned after a user selects a payment method and approves a payment request.
PaymentResponse.details Read only Secure context
BasicCardResponse dictionary.PaymentResponse.methodName Read only Secure context
PaymentResponse.payerEmail Read only Secure context
requestPayerEmail option is set to true in the options parameter of the PaymentRequest() constructor.PaymentResponse.payerName Read only Secure context
requestPayerName option is set to true in the options parameter of the PaymentRequest() constructor.PaymentResponse.payerPhone Read only Secure context
requestPayerPhone option is set to true in the options parameter of the PaymentRequest() constructor.PaymentResponse.requestId Read only Secure context
PaymentRequest that produced the current response. This is the same value supplied in the PaymentRequest() constructor by details.id.PaymentResponse.shippingAddress Read only Secure context
requestShipping option is set to true in the options parameter of the PaymentRequest() constructor.PaymentResponse.shippingOption Read only Secure context
requestShipping option is set to true in the options parameter of the PaymentRequest() constructor.PaymentResponse.onpayerdetailchange Secure context
.retry(), it allows the developer to be notified if the requested user's details change. This allows you to revalidate any requested user data (e.g., the phone number or the email address).PaymentResponse.retry() Secure context
PaymentResponse.complete() Secure context
PaymentRequest.show() method.| Specification | Status | Comment |
|---|---|---|
| Payment Request API The definition of 'PaymentResponse' in that specification. | Candidate Recommendation | Initial definition. |
| Desktop | ||||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
| Basic support | 61
|
Yes | 56
|
No | No | ? |
details
|
61
|
15 | 56
|
No | No | ? |
methodName
|
61
|
15 | 56
|
No | No | ? |
payerEmail
|
61
|
15 | 56
|
No | No | ? |
payerName
|
61
|
15 | 56
|
No | No | ? |
payerPhone
|
61
|
15 | 56
|
No | No | ? |
requestId
|
61
|
16 | 56
|
No | No | ? |
shippingAddress
|
61
|
15 | 56
|
No | No | ? |
shippingOption
|
61
|
15 | 56
|
No | No | ? |
complete
|
61
|
15 | 56
|
No | No | ? |
toJSON |
61
|
? | ? | ? | ? | ? |
| Mobile | |||||||
|---|---|---|---|---|---|---|---|
| Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | No | 53
|
Yes | 56
|
No | ? | 6.0 |
details
|
No | 53
|
Yes | 56
|
No | ? | 6.0 |
methodName
|
No | 53
|
Yes | 56
|
No | ? | 6.0 |
payerEmail
|
No | 53
|
Yes | 56
|
No | ? | 6.0 |
payerName
|
No | 58
|
Yes | 56
|
No | ? | 7.0 |
payerPhone
|
No | 53
|
Yes | 56
|
No | ? | 6.0 |
requestId
|
No | 60
|
Yes | 56
|
No | ? | No |
shippingAddress
|
No | 53
|
Yes | 56
|
No | ? | 6.0 |
shippingOption
|
No | 53
|
Yes | 56
|
No | ? | 6.0 |
complete
|
No | 53
|
Yes | 56
|
No | ? | 6.0 |
toJSON |
? | 55
|
? | ? | ? | ? | ? |
© 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/PaymentResponse