Checks the purchase and consumption status of an inapp item.
HTTP request
GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/products/{productId}/tokens/{token}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
packageName |
The package name of the application the inapp product was sold in (for example, 'com.some.thing'). |
productId |
The inapp product SKU (for example, 'com.some.thing.inapp1'). |
token |
The token provided to the user's device when the inapp product was purchased. |
Request body
The request body must be empty.
Response body
If successful, the response body contains an instance of ProductPurchase
.
Sample
The following is a sample request:
curl \ -X GET \ 'https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.example.app/purchases/products/exampleSKU/tokens/exampleToken' \ -H 'Accept: application/json'
The following is a sample response:
{ "kind": "androidpublisher#productPurchase", "purchaseTimeMillis": "1678886400000", "purchaseState": 0, "consumptionState": 0, "developerPayload": "sample developer payload", "orderId": "GPA.1234-5678-9012-34567", "purchaseType": 0, "acknowledgementState": 0, "productId": "com.example.app.productId", "purchaseToken": "purchase token", "quantity": 1, "refundableQuantity": 1, "regionCode": "US", "obfuscatedExternalAccountId": "obfuscated external account id", "obfuscatedExternalProfileId": "obfuscated external profile id" }
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/androidpublisher