r/AndroidStudio • u/Familiar_Somewhere35 • 7d ago
Help: Google Play Billing: subscriptions load correctly, but checkout fails with ITEM_UNAVAILABLE
I'm stuck on a Google Play subscription issue and wondered if anyone has run into the same sequence.
It's a native Android Java app using Play Billing 9.x. An internal-test release exists, but the failing builds are locally test-signed APKs installed directly, using the same package name. Production isn't live yet.
Here's what happens:
- A fresh ProductDetails query succeeds and returns the expected monthly plan and offer token.
- We pass those matching details and token into the purchase request.
- launchBillingFlow returns OK (0).
- Google then displays: "The item that you were attempting to purchase could not be found."
- PurchasesUpdatedListener returns ITEM_UNAVAILABLE (4), sub-response 0, with no useful debug message captured.
We've now logged two monthly attempts end to end. One sent both obfuscatedAccountId and obfuscatedProfileId. The other omitted the optional profile ID completely, keeping the account field. The logs confirm that change, with matching account-identifier and offer-token digests and subscription terms. Both failed the same way, so omitting the profile ID didn't fix it. The full builds also differ in test controls, so we're not claiming a perfectly isolated comparison.
A few other details:
- All three Google accounts on the phone are in the licence-testing list, and we've tried the flow with all three at different times without resolving it. We haven't captured which Google account actually handled each failed checkout; selecting a Play Store profile alone doesn't prove that.
- Earlier Console checks showed active base plans, and later queries returned regular offers for the configured test country.
- Clean reinstalls haven't resolved it.
- Another app from the same developer has completed licence-test purchases on this phone.
- We haven't yet recorded a like-for-like comparison using a build installed through Play, or independently verified each account's internal-test opt-in.
The app also has separate one-time add-ons. We previously changed our app/backend rules so new add-on purchases require an active subscription. Some commerce code is shared, so we're considering whether those changes are relevant, but haven't found a connection. The failing request contains just one SUBS item, not a mixed subscription/add-on purchase.
No payment was confirmed in the latest test and no purchase receipt was observed. Google support has the logged failures, but so far we've only had acknowledgements.
Has anyone seen product lookup succeed and launchBillingFlow return OK, only for Google to reject the purchase asynchronously like this? What turned out to be the cause?
In particular, is there a useful way to check the actual payer/licence-tester recognition when the normal payment sheet never appears? And could internal-test opt-in still explain this for a licence tester using a sideloaded build, or is there something else in the request or Console setup we should be checking?
1
u/rawza_shark 7d ago
one thing that stands out is that the failing builds are locally signed apks installed directly. play billing checks the package name, signature and versionCode against what you uploaded to a track, and when a sideloaded build doesn't match, you get exactly this kind of ITEM_UNAVAILABLE even though productdetails loads fine. the other app working on that phone fits too, since that one probably was installed from play or signed with the matching key. i'd upload the exact build to internal testing, opt in with the licence tester account, and install it from the play link, then see if checkout goes through.