Search code examples
androidin-app-purchasein-app-billingpromotionsin-app-promotions

Testing In-app Promotions: how to cancel a purchase made with a promo code


Is there any way to cancel a purchase made with a promotion code?

The developer console shows the count of redeemed promo codes but I didn't find a way to administrate and cancel them.

According to the Testing In-app Promotions documentation there are 3 workflows to test. I have an in app purchase that is a non consumable product (no more ad) so there is no way in the app to buy it twice if I already have it.

So how to easily test these workflows on the same user account?


Solution

  • However you can consume your purchase to cancel a promo code with

    public int consumePurchase(int apiVersion, String packageName, String purchaseToken)