HoneyBooBoo
HoneyBooBoo

Reputation: 55

Android In-App Billing. Cancelled subscription is active even after expiration date

When testing subscriptions, it turned out that canceled subscriptions remain active even after their expiration date. At the same time in Google Play subscription list is empty. I tried two popular IAB libs (in-app-billing v3 and android-checkout).

What causes the problem? Is the problem relevant only when testing? Is there a way to check if the subscription is truly active without the need of running own backend?

bp = new BillingProcessor(a,
            "xxx",
            new BillingProcessor.IBillingHandler() {
            ...
                @Override
                public void onBillingInitialized() {
                    bp.loadOwnedPurchasesFromGoogle();
                    bp.isSubscribed(planId); // true for expired cancelled subscription that is not listed in google play
                }
            });

UPD

I implemented in-app billing without external libs by official guidelines (https://developer.android.com/google/play/billing/billing_integrate.html) and now it works as intended although i have to wait some time to cancelled expired subscription become inactive (sometimes an hour, sometimes a day).

Upvotes: 5

Views: 1261

Answers (1)

eren
eren

Reputation: 46

you may try this one.

purchase.getPurchaseState()
// 0 (purchased), 1 (canceled)- 2 (refunded).

Upvotes: 1

Related Questions