chromium/third_party/blink/renderer/modules/payments/goods/item_details.idl

// 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://github.com/WICG/digital-goods/blob/main/explainer.md
dictionary ItemDetails {
  required DOMString itemId;
  required DOMString title;
  required PaymentCurrencyAmount price;
  [RuntimeEnabled=DigitalGoodsV2_1]
  ItemType type;
  DOMString description;
  [RuntimeEnabled=DigitalGoodsV2_1]
  sequence<DOMString> iconURLs;
  // Periods are specified as ISO 8601 durations.
  // https://en.wikipedia.org/wiki/ISO_8601#Durations
  DOMString subscriptionPeriod;
  DOMString freeTrialPeriod;
  PaymentCurrencyAmount introductoryPrice;
  DOMString introductoryPricePeriod;
  [EnforceRange, RuntimeEnabled=DigitalGoodsV2_1]
  unsigned long long introductoryPriceCycles;
};

enum ItemType {
  "product",
  "subscription",
};