- Resource: ProductPurchaseV2
- PurchaseStateContext
- PurchaseState
- TestPurchaseContext
- FopType
- ProductLineItem
- ProductOfferDetails
- RentOfferDetails
- ConsumptionState
- AcknowledgementState
- Methods
Resource: ProductPurchaseV2
A ProductPurchaseV2 resource indicates the status of a user's inapp product purchase.
JSON representation |
---|
{ "productLineItem": [ { object ( |
Fields | |
---|---|
productLineItem[] |
Contains item-level info for a ProductPurchaseV2. |
kind |
This kind represents a ProductPurchaseV2 object in the androidpublisher service. |
purchaseStateContext |
Information about the purchase state of the purchase. |
testPurchaseContext |
Information related to test purchases. This will only be set for test purchases. |
orderId |
The order id associated with the purchase of the inapp product. May not be set if there is no order associated with the purchase. |
obfuscatedExternalAccountId |
An obfuscated version of the id that is uniquely associated with the user's account in your app. Only present if specified using https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedaccountid when the purchase was made. |
obfuscatedExternalProfileId |
An obfuscated version of the id that is uniquely associated with the user's profile in your app. Only present if specified using https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedprofileid when the purchase was made. |
regionCode |
ISO 3166-1 alpha-2 billing region code of the user at the time the product was granted. |
purchaseCompletionTime |
The time when the purchase was successful, i.e., when the PurchaseState has changed to PURCHASED. This field will not be present until the payment is complete. For example, if the user initiated a pending transaction (https://developer.android.com/google/play/billing/integrate#pending), this field will not be populated until the user successfully completes the steps required to complete the transaction. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
acknowledgementState |
Output only. The acknowledgement state of the purchase. |
PurchaseStateContext
Context about the purchase state.
JSON representation |
---|
{
"purchaseState": enum ( |
Fields | |
---|---|
purchaseState |
Output only. The purchase state of the purchase. |
PurchaseState
Possible purchase states.
Enums | |
---|---|
PURCHASE_STATE_UNSPECIFIED |
Purchase state unspecified. This value should never be set. |
PURCHASED |
Purchased successfully. |
CANCELLED |
Purchase canceled. |
PENDING |
The purchase is in a pending state and has not yet been completed. For more information on handling pending purchases, see https://developer.android.com/google/play/billing/integrate#pending. |
TestPurchaseContext
Context about a test purchase.
JSON representation |
---|
{
"fopType": enum ( |
Fields | |
---|---|
fopType |
The fop type of the test purchase. |
FopType
Possible fop types.
Enums | |
---|---|
FOP_TYPE_UNSPECIFIED |
Fop type unspecified. This value should never be set. |
TEST |
The purchase was made using a test card. |
ProductLineItem
Contains item-level info for a ProductPurchaseV2.
JSON representation |
---|
{
"productId": string,
"productOfferDetails": {
object ( |
Fields | |
---|---|
productId |
The purchased product ID (for example, 'monthly001'). |
productOfferDetails |
The offer details for this item. |
ProductOfferDetails
Offer details information related to a purchase line item.
JSON representation |
---|
{ "offerTags": [ string ], "offerId": string, "purchaseOptionId": string, "rentOfferDetails": { object ( |
Fields | |
---|---|
offerTags[] |
The latest offer tags associated with the offer. It includes tags inherited from the purchase option. |
offerId |
The offer ID. Only present for offers. |
purchaseOptionId |
The purchase option ID. |
rentOfferDetails |
Offer details about rent offers. This will only be set for rental line items. |
offerToken |
The per-transaction offer token used to make this purchase line item. |
quantity |
The quantity associated with the purchase of the inapp product. |
refundableQuantity |
The quantity eligible for refund, i.e. quantity that hasn't been refunded. The value reflects quantity-based partial refunds and full refunds. |
consumptionState |
Output only. The consumption state of the purchase. |
RentOfferDetails
This type has no fields.
Offer details information related to a rental line item.
ConsumptionState
Possible consumption states.
Enums | |
---|---|
CONSUMPTION_STATE_UNSPECIFIED |
Consumption state unspecified. This value should never be set. |
CONSUMPTION_STATE_YET_TO_BE_CONSUMED |
Yet to be consumed. |
CONSUMPTION_STATE_CONSUMED |
Consumed already. |
AcknowledgementState
Acknowledgement state of the one time product.
Enums | |
---|---|
ACKNOWLEDGEMENT_STATE_UNSPECIFIED |
Unspecified acknowledgement state. |
ACKNOWLEDGEMENT_STATE_PENDING |
The purchase is not acknowledged yet. |
ACKNOWLEDGEMENT_STATE_ACKNOWLEDGED |
The purchase is acknowledged. |
Methods |
|
---|---|
|
Checks the purchase and consumption status of an inapp item. |