PaymentDetailsUpdate

Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Draft
This page is not complete.

The PaymentDetailsUpdate dictionary is used to provide updated information to the payment user interface after it has been instantiated. This can be done either by calling the PaymentRequestUpdateEvent.updateWith() method or by using the PaymentRequest.show() method's detailsPromise parameter to provide a Promise that returns a PaymentDetailsUpdate that updates the payment information before the user interface is even enabled for the first time.

Properties

The PaymentDetailsUpdate dictionary is based on the PaymentDetailsBase dictionary, and inherits its properties, which are included in the list below.

displayItems Optional
An array of PaymentItem objects, each describing one line item for the payment request. These represent the line items on a receipt or invoice.
error Optional
A DOMString specifying an error message to present to the user. When calling updateWith(), including error in the updated data causes the user agent to display the text as a general error message. For address field specific errors, use shippingAddressErrors.
modifiers Optional
An array of PaymentDetailsModifier objects, each describing a modifier for particular payment method identifiers. For example, you can use one to adjust the total payment amount based on the selected payment method ("5% cash discount!").
shippingAddressErrors Optional
An AddressErrors object which includes an error message for each property of the shipping address that could not be validated.
shippingOptions Optional
An array of PaymentShippingOption objects, each describing one available shipping option from which the user may choose.
total Optional
A PaymentItem providing an updated total for the payment. Make sure this equals the sum of all of the items in displayItems.

Specifications

Specification Status Comment
Payment Request API
The definition of 'PaymentDetailsUpdate' in that specification.
Candidate Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic support
Experimental
Chrome Full support 61Edge Full support YesFirefox Full support 55
Disabled
Full support 55
Disabled
Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE No support NoOpera No support NoSafari ? WebView Android No support NoChrome Android Full support 53Edge Mobile Full support YesFirefox Android Full support 55
Disabled
Full support 55
Disabled
Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Opera Android No support NoSafari iOS ? Samsung Internet Android Full support 6.0
error
Experimental
Chrome Full support 61Edge Full support YesFirefox Full support 55
Disabled
Full support 55
Disabled
Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE No support NoOpera No support NoSafari ? WebView Android No support NoChrome Android Full support 60Edge Mobile Full support YesFirefox Android Full support 55
Disabled
Full support 55
Disabled
Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Opera Android No support NoSafari iOS ? Samsung Internet Android No support No
shippingAddressErrors
Experimental
Chrome Full support 61Edge Full support YesFirefox Full support 55
Disabled
Full support 55
Disabled
Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE No support NoOpera No support NoSafari ? WebView Android No support NoChrome Android Full support 60Edge Mobile Full support YesFirefox Android Full support 55
Disabled
Full support 55
Disabled
Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Opera Android No support NoSafari iOS ? Samsung Internet Android No support No
total
Experimental
Chrome Full support 61Edge Full support YesFirefox Full support 55
Disabled
Full support 55
Disabled
Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE No support NoOpera No support NoSafari ? WebView Android No support NoChrome Android Full support 60Edge Mobile Full support YesFirefox Android Full support 55
Disabled
Full support 55
Disabled
Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Opera Android No support NoSafari iOS ? Samsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
User must explicitly enable this feature.
User must explicitly enable this feature.

 

Document Tags and Contributors

Contributors to this page: Sheppy
Last updated by: Sheppy,