I'm currently testing my Android app (license testing in-app payments), requiring many iterations of buying and refunding an item to test it. This last time, while issuing a refund, I accidentally forgot to check the "revoke entitlement" box in the Play Developer Console (which is unchecked by default for some reason). Now, my version of the app always has the entitlement and I can't test buying it anymore.
I know that there is no way to revoke the entitlement via the website. There seems to be a way to do it through an API call, but I don't have a back-end setup for the app, and haven't been able to figure out how to call the function successfully through my browser/curl (always authentication errors). My app doesn't seem to be able to tell the difference between a purchased entitlement or one that was refunded but not revoked (my Purchase
object's getPurchaseState()
call always returns Purchase.PurchaseState.PURCHASED
), so I don't know if I can revoke it via the app's code-base.
Is there any way that I can revoke the entitlement? The procedure to authorize myself to make API calls is completely opaque to me, but that seems like a viable route if I could understand it.
On any Android device linked to the account you made the purchase from, go to the Play Store page of the item you purchased and hit the Refund button. In the pop-up that appears, click Request refund to confirm.
1 Answer. Save this answer. Show activity on this post. Note: You can only return an app or game for a refund once.
It turns out I had to go the route of consuming the purchase via the app. I did this by adding a developer-only Preference
in the Settings pane (by programmatically adding a new Preference depending on the value of BuildConfig.Debug
) specifically for revoking the given product. Once clicked, the app will:
Purchase
s (through the BillingClient
object's queryPurchases
method)Purchase
with the SKU of the product I want to consume (if it exists).consumeAsync
method of my BillingClient
object, which accepts the purchase token (held by the Purchase
object from step 2).Once this is done and has been verified, the product is consumed immediately and the entitlement that was granted is revoked (significantly faster than refunding through the Google Play Developer Console).
Be careful to not let this option sneak into your release
build, because I think it will revoke entitlements without refunding (not a problem for license testers who aren't using real money, but will lead to angry customers).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With