capabilities.work

Refund a Play Order

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

Recipe · 3 steps

Refund a Play Order

with Android · Entitlement Enforcement

Verify an in-app purchase, refund its order, and confirm the resulting purchase state.

  1. Verify the purchase token and resolve the Google Play order id that the refund must be issued against.
  2. Refund the resolved order through Google Play. When revoke is true the user's access to the item is terminated immediately.
  3. Read the purchase back to observe the post-refund purchase state, which reflects the cancellation once Google Play has processed the refund.
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 for the order being refunded.
  • revoke: Whether to revoke the purchased item as part of the refund. True terminates access immediately; false refunds while leaving the entitlement in place.
For your developer

Arazzo workflow android:refund-order, 3 operations: getPurchaseProduct → refundOrder → getPurchaseProduct. Specs on APIs.io.