chromium/third_party/blink/public/mojom/payments/payment_credential.mojom

// 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.

module payments.mojom;

enum PaymentCredentialStorageStatus {
  SUCCESS,
  FAILED_TO_STORE_CREDENTIAL,
};

// A per-frame interface restricted to secure contexts for storing
// PaymentCredentials in browser local storage. It is implemented in the browser
// process and called by the renderer after creation of a PublicKeyCredential
// with "payment" extension through the Credential Management API.
interface PaymentCredential {

  // Store a new PublicKeyCredential with "payment" extension on disk. It can be
  // later used for PaymentRequests.
  StorePaymentCredential(array<uint8> credential_id, string rp_id, array<uint8> user_id)
      => (PaymentCredentialStorageStatus status);
};