chromium/third_party/blink/renderer/modules/payments/payment_manager.idl

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://w3c.github.io/payment-handler/#dom-paymentmanager

enum PaymentDelegation {
    "shippingAddress",
    "payerName",
    "payerPhone",
    "payerEmail",
};

[
    Exposed=Window,
    RuntimeEnabled=PaymentApp,
    SecureContext
] interface PaymentManager {
    [SameObject, DeprecateAs=PaymentInstruments, RuntimeEnabled=PaymentInstruments] readonly attribute PaymentInstruments instruments;
    attribute DOMString userHint;
    // The implementation resolves with boolean, even though the spec says undefined.
    [CallWith=ScriptState, PromiseIDLTypeMismatch, RaisesException] Promise<undefined> enableDelegations(sequence<PaymentDelegation> delegations);
};