capabilities.work

Verify and Acknowledge a Subscription Purchase

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

Recipe · 3 steps

Verify and Acknowledge a Subscription Purchase

with Android · Entitlement Enforcement

Resolve a subscription purchase token via v2, then acknowledge it using the derived product id.

  1. Resolve the purchase token into the full subscription state using the Subscriptions v2 API, which returns the subscription state, line items, and external account identifiers.
  2. Acknowledge the subscription purchase using the product id resolved from the v2 line item, so Google Play does not automatically refund and revoke it after three days. Provision the subscriber's access first.
  3. Read the subscription back through the v2 API to confirm Google Play now reports it as acknowledged.
What you'll need to have ready
  • packageName: The package name of the application (e.g. com.example.myapp).
  • purchaseToken: The subscription purchase token supplied to the app by Google Play.
  • developerPayload: Optional developer-specified string to record against the subscription when acknowledging it, typically an internal account reference.
For your developer

Arazzo workflow android:verify-acknowledge-subscription-purchase, 3 operations: getSubscriptionPurchaseV2 → acknowledgePurchaseSubscription → getSubscriptionPurchaseV2. Specs on APIs.io.