I have an Android app offering auto-renewing subscriptions via In-App Billing, using https://developer.android.com/google/play/billing/billing_library.html.
I'm using a lightly modified BillingManager.java from https://github.com/googlesamples/android-play-billing/ to help with purchase management.
Previously, prior to release (around 4-8 weeks ago), whenever a subscription trial ended and the subscription auto-renewed, I would continue to receive a corresponding Purchase object in the purchases lists upon querying purchases:
PurchasesResult subscriptionResult = mBillingClient.queryPurchases(SkuType.SUBS);
List<Purchase> list = purchasesResult.getPurchasesList();
(see queryPurchases here)
The OrderID had an incremented counter value appended according to the number of renewals that had occurred since the original order (as described under Subscription Order Numbers here).
In the last few days, it seems that whenever a customer's subscription converts to paid from trial, or renews subsequently, queryPurchases returns zero Purchases thereafter. I expect to receive one Purchase object for users with an active subscription (and was getting this during testing a while back - I have the data in my db to confirm it.)
As a result, the app no longer calls our backend server to update the subscription validity and users are denied access to functionality for which they have been charged - not great.
I can view the customer's order (with incremented OrderID) on Google Play Console and the subscription shows as valid (and is not cancelled) and a purchase token is available and can be validated.
Does anyone have any idea why would queryPurchases would stop returning a valid Purchase after the first renewal? (The Purchase is returned as expected prior to the renewal date.)
I'm using the current billing client library, as follows:
implementation 'com.android.billingclient:billing:1.0'
(As a workaround, I can fix this on the back-end by periodically rechecking all submitted purchase tokens, but I'd much prefer to do it on demand triggered by the app, which was working fine previously.)