Search code examples
androidin-app-purchasegoogle-play-console

How to remove Entitlement after refund a test order (in app purchase) in play console


Am testing in-app purchase in my app, i made a test order then while refund it I forgot to check on remove Entitlement box, now am stuck with this in-app purchase

I contact play console support in 11 Aug and they always reply ("we are investigating the issue")

How to remove the Entitlement ?


Solution

  • There is a solution, from your app: consume the product.

    Add this temporary code and run it for your purchase.

    private fun testConsumePurchase(purchase: Purchase) {
        val params = ConsumeParams.newBuilder()
            .setPurchaseToken(purchase.purchaseToken)
            .build()
        billingClient.consumeAsync(params) { _, _ ->
            Timber.w("Consumed!")
        }
    }
    

    After this, remove the code and continue testing as usual. You will not own the SKU anymore and you will be unblocked, you can buy it again on your main test account. Remember next time to check the "Remove Entitlement" box with your refund :-)