リソース: 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 |
この種類は、androidpublisher サービスの inappPurchase オブジェクトを表します。 |
purchaseTimeMillis |
商品の購入時間。エポック(1970 年 1 月 1 日)からのミリ秒数です。 |
purchaseState |
注文の購入状況です。有効な値は 0 です。購入済み: 1. キャンセル済み 2. 保留 |
consumptionState |
アプリ内アイテムの消費状態。有効な値は 0 です。まだ消費されていない 1. 消費しました |
developerPayload |
注文に関する補足情報を含むデベロッパーが指定した文字列です。 |
orderId |
アプリ内アイテムの購入に関連付けられたオーダー ID。 |
purchaseType |
アプリ内アイテムの購入タイプ。このフィールドは、標準のアプリ内課金フローを使用して行われた購入ではない場合にのみ設定されます。有効な値は 0 です。テスト(ライセンス テスト アカウントから購入する場合)1.プロモーション(プロモーション コードを使用して購入した場合など)2.リワード(支払いではなく動画広告の視聴など) |
acknowledgementState |
アプリ内アイテムの確認ステータスです。有効な値は 0 です。未確認 1. 承認済み |
purchaseToken |
この購入を識別するために生成された購入トークン。存在しない場合があります。 |
productId |
アプリ内アイテムの SKU。存在しない場合があります。 |
quantity |
アプリ内アイテムの購入に関連付けられた数量。存在しない場合、数量は 1 です。 |
obfuscatedExternalAccountId |
アプリ内のユーザーのアカウントに一意に関連付けられた ID の難読化バージョン。購入時に https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedaccountid を使用して指定した場合にのみ存在します。 |
obfuscatedExternalProfileId |
アプリのユーザーのプロフィールに一意に関連付けられている、難読化されたバージョンの ID。購入時に https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedprofileid を使用して指定した場合にのみ存在します。 |
regionCode |
商品が付与された時点でのユーザーの ISO 3166-1 alpha-2 請求地域コード。 |
Methods |
|
---|---|
|
アプリ内アイテムの購入を承認します。 |
|
アプリ内アイテムを購入します。 |
|
アプリ内アイテムの購入と消費のステータスをチェックします。 |