W3cubDocs

/DOM

PaymentDetailsBase

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

The PaymentDetailsBase dictionary is a mixin used by the PaymentDetailsInit and PaymentDetailsUpdate dictionaries. It is never directly used by developers and is included here only to be used as the basis for those documents.

Properties

displayItemsOptional
An array of PaymentItem objects, each describing one line item for the payment request. These represent the line items on a receipt or invoice.
modifiersOptional
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!").
shippingOptionsOptional
An array of PaymentShippingOption objects, each describing one available shipping option from which the user may choose.

Derived dictionaries

The following dictionaries include PaymentDetailsBase.

PaymentDetailsInit
Provides payment information when calling the PaymentRequest() constructor.
PaymentDetailsUpdate
Provides updated payment details while the payment user interface is being handled. This can be delivered to the payment interface using either PaymentDetailsUpdateEvent.updateWith() or by returning it from the optional detailsUpdate promise provided to the PaymentRequest.show() call that begins the user interaction.

Specifications

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

Browser compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support 61 Yes 55
Disabled
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.
No No ?
displayItems 61 Yes 55
Disabled
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.
No No ?
modifiers 61 Yes 55
Disabled
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.
No No ?
shippingOptions 61 Yes 55
Disabled
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.
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
Disabled
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.
No ? 6.0
displayItems No 60 Yes 55
Disabled
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.
No ? No
modifiers No 60 Yes 55
Disabled
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.
No ? No
shippingOptions No 60 Yes 55
Disabled
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.
No ? No

© 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/PaymentDetailsBase