This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The enableDelegations() method of the PaymentManager interface delegates responsibility for providing various parts of the required payment information to the payment app rather than collecting it from the browser (for example, via autofill).
For example, if the requestShipping option is set to true in the options object when invoking the PaymentRequest() constructor, a shipping address will be returned.
enableDelegations() was used to delegate shippingAddress, that address will come from the payment app.enableDelegations(delegations)
delegations OptionalAn array containing one or more enumerated values that specify the payment information you want to delegate to the payment app. Possible values can be:
payerEmailThe payment app will provide the payer's email whenever it is needed.
payerNameThe payment app will provide the payer's name whenever it is needed.
payerPhoneThe payment app will provide the payer's phone number whenever it is needed.
shippingAddressThe payment app will provide the shipping address whenever it is needed.
A Promise that resolves with a value of undefined.
navigator.serviceWorker.register("serviceworker.js").then((registration) => {
registration.paymentManager.userHint = "Card number should be 16 digits";
registration.paymentManager
.enableDelegations(["shippingAddress", "payerName"])
.then(() => {
// …
});
// …
});
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
enableDelegations |
80 | 80 | No | 67 | No | 80 | No | 57 | No | 13.0 | No | No |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PaymentManager/enableDelegations