Verify and Acknowledge an In-App Product Purchase
A 3-step recipe with Android. We can help you get access.
Recipe · 3 steps
Verify and Acknowledge an In-App Product Purchase
with Android · Entitlement Enforcement
Verify an in-app product purchase token and acknowledge it if it is still unacknowledged.
- Check the purchase and consumption status of the in-app product token. This is the authoritative server-side validation that the token is real and that Google Play considers the purchase complete.
- Acknowledge the verified purchase so Google Play does not automatically refund it after three days. Grant the user their entitlement before or alongside this call.
- Read the purchase back to confirm Google Play now reports it as acknowledged, closing the loop on the entitlement grant.
What you'll need to have ready
- packageName: The package name of the application (e.g. com.example.myapp).
- productId: The in-app product SKU the purchase relates to.
- purchaseToken: The purchase token supplied to the app by Google Play at purchase time.
- developerPayload: Optional developer-specified string to attach to the purchase when acknowledging it, typically an internal order or user reference.
For your developer
Arazzo workflow android:verify-acknowledge-product-purchase, 3 operations: getPurchaseProduct → acknowledgePurchaseProduct → getPurchaseProduct. Specs on APIs.io.