capabilities.work

Grant and Consume a Consumable Purchase

A 4-step recipe with Android. We can help you get access.

Recipe · 4 steps

Grant and Consume a Consumable Purchase

with Android · Entitlement Enforcement

Verify, acknowledge, and consume a consumable in-app product purchase.

  1. Validate the consumable purchase token and read its purchase and consumption state before granting anything to the user.
  2. Acknowledge the purchase after the in-game currency or consumable entitlement has been credited to the user's account.
  3. Consume the purchase so the SKU becomes available for the user to buy again. Only call this once the entitlement has actually been granted.
  4. Read the purchase back to confirm Google Play now reports the item as consumed and therefore repurchasable.
What you'll need to have ready
  • packageName: The package name of the application (e.g. com.example.myapp).
  • productId: The consumable in-app product SKU (e.g. com.example.myapp.coins100).
  • purchaseToken: The purchase token supplied to the app by Google Play at purchase time.
  • developerPayload: Optional developer-specified string recorded against the purchase when acknowledging, typically an internal grant reference.
For your developer

Arazzo workflow android:grant-consumable-purchase, 4 operations: getPurchaseProduct → acknowledgePurchaseProduct → consumePurchaseProduct → getPurchaseProduct. Specs on APIs.io.