// Copyright 2020 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/secure-payment-confirmation/#sctn-securepaymentconfirmationrequest-dictionary
dictionary SecurePaymentConfirmationRequest {
required BufferSource challenge;
required USVString rpId;
required sequence<BufferSource> credentialIds;
required PaymentCredentialInstrument instrument;
unsigned long timeout;
USVString payeeName;
USVString payeeOrigin;
AuthenticationExtensionsClientInputs extensions;
sequence<USVString> locale;
// Whether or not to show an opt-out flow in the SPC UX.
[RuntimeEnabled=SecurePaymentConfirmationOptOut, MeasureAs=SecurePaymentConfirmationOptOut] boolean showOptOut;
// Experimental support for showing network and issuer icons in addition to
// the payment instrument. These members are purely experimental; if we
// were to launch this we should find a non-card specific way to encode
// this information in the SecurePaymentConfirmationRequest, or better
// encapsulate it into a single sub-dictionary.
[RuntimeEnabled=SecurePaymentConfirmationNetworkAndIssuerIcons] NetworkOrIssuerInformation networkInfo;
[RuntimeEnabled=SecurePaymentConfirmationNetworkAndIssuerIcons] NetworkOrIssuerInformation issuerInfo;
};
dictionary NetworkOrIssuerInformation {
required USVString name;
required USVString icon;
};