REST Resource: purchases.products

リソース: ProductPurchase

ProductPurchase リソースは、ユーザーのアプリ内購入のステータスを示します。

JSON 表現
{
  "kind": string,
  "purchaseTimeMillis": string,
  "purchaseState": integer,
  "consumptionState": integer,
  "developerPayload": string,
  "orderId": string,
  "purchaseType": integer,
  "acknowledgementState": integer,
  "purchaseToken": string,
  "productId": string,
  "quantity": integer,
  "obfuscatedExternalAccountId": string,
  "obfuscatedExternalProfileId": string,
  "regionCode": string
}
フィールド
kind

string

この種類は、androidpublisher サービスの inappPurchase オブジェクトを表します。

purchaseTimeMillis

string (int64 format)

商品が購入された時刻(エポックからの時間、ミリ秒単位、1970 年 1 月 1 日)。

purchaseState

integer

注文の購入状況です。値は 0 です。1. キャンセル済み 2. 保留

consumptionState

integer

アプリ内アイテムの消費状態。値は 0 です。未使用 1. 消費しました

developerPayload

string

注文に関する補足情報を含む、デベロッパー指定の文字列。

orderId

string

アプリ内アイテムの購入に関連付けられているオーダー ID。

purchaseType

integer

アプリ内アイテムの購入のタイプ。このフィールドは、通常のアプリ内課金フローを使用せずに行われた購入の場合にのみ設定されます。値は 0 です。テスト(ライセンス テスト アカウントから購入) 1.プロモーション(プロモーション コードを使用して購入) 2.リワード(例: 有料ではなく動画広告を視聴)

acknowledgementState

integer

アプリ内アイテムの承認状態。値は 0 です。今もなお認知 1. 承認済み

purchaseToken

string

この購入を識別するために生成される購入トークンです。存在しない可能性があります。

productId

string

アプリ内アイテムの SKU。存在しない可能性があります。

quantity

integer

アプリ内アイテムの購入に関連付けられた数量。存在しない場合、数量は 1 です。

obfuscatedExternalAccountId

string

アプリのユーザー アカウントに対して一意に関連付けられた ID の難読化バージョン。購入時に https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedaccountid を使用して指定された場合にのみ存在します。

obfuscatedExternalProfileId

string

アプリ内でユーザーのプロフィールに一意に関連付けられた ID の難読化バージョン。購入時に https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedprofileid を使用して指定された場合にのみ存在します。

regionCode

string

商品が提供された時点でのユーザーの ISO 3166-1 alpha-2 請求地域コード。

Methods

acknowledge

アプリ内アイテムの購入を承認する。

consume

アプリ内アイテムの購入を行います。

get

アプリ内アイテムの購入と利用のステータスを確認できます。