files/en-us/web/api/paymentrequestevent/modifiers/index.md
{{SeeCompatTable}}{{APIRef("Web-Based Payment Handler API")}}{{AvailableInWorkers("service")}}
The modifiers read-only property of the
{{domxref("PaymentRequestEvent")}} interface returns an {{jsxref("Array")}} of PaymentDetailsModifier objects containing modifiers for payment details.
An array of objects containing modifiers for payment details. These objects contain the following properties:
supportedMethods
total
PaymentItem object containing the following properties:
label
amount
PaymentCurrencyAmount object (see total > Value).pending
amount member is not final. This is commonly used to show items such as shipping or tax amounts that depend upon selection of shipping address or shipping option.additionalDisplayItems
PaymentItem objects providing additional display items to be included in the payment details. This member is commonly used to add a discount or surcharge line item indicating the reason for the different total amount for the selected payment method that the user agent MAY display.data
self.addEventListener("paymentrequest", (e) => {
console.log(e.modifiers);
});
{{Specifications}}
{{Compat}}