Testing Google Play Billing With "The Item You Requested is Not Available for Purchase" error
Asked Answered
A

1

6

We have an internal testing app for the platform we use to develop our apps and we are working on adding in-app-billing to our platform to support subscriptions that some of our clients may offer.

Integration of the billing library thus far has been pretty easy, and we have our platform test app in the Google Play Console with test subscriptions setup, license testers properly setup, and emails added to an alpha testing list. The app is signed and we use the same signing keystore on both the store and locally for our sandbox app.

In my code, I am able to see the list of products (subscriptions) we get back from the IAB library and I can successfully read the SkuDetails object, but when attempting to purchase them, I am getting an error: "The Item You Requested is Not Available for Purchase". On my test device, I have the same emails setup as we have in both our license testing and alpha testing channel. The version code and name of our sandbox app matches what we have in the store.

Error Message We Receive

I was successfully able to register for internal Alpha testing, however I cannot download the app on the Google Play Store.

The questions I have are:

  1. Why am I unable to download the alpha of our app after signing up for the beta on my phone using the email address we have designated to have access to the beta?

  2. Why are we getting a "The Item You Requested is Not Available for Purchase" error even though we have our subscriptions and licensing setup properly (from our perspective) in both the store and our sandbox app?

Audsley answered 17/3, 2022 at 17:12 Comment(0)
F
9

This has happened to before, so I am going to share with you some tips to help you with the same.

Tip 1: There are two testing lists and you need to make sure your email is added to both of them. One is app specific and one is your Google Play account specific. You can find the first outside in the play console panel before you select your app. Second is app specific which I assume you have already added.

enter image description here

Tip 2: Make sure you accept the testing invite for your specific email. You can find the testing link in your internal testing track or alpha testing track. Make sure you open your email account and then open the invite link and accept the test.

Tip 3: On your testing device, make sure your email account is the only one logged in. If sometimes you have multiple accounts, that can causes issue with the in app testing.

Tip 4: Sometimes after adding a tester, it takes time for Google's server to mark that user as a test user, so after adding, give it some time like a couple of hours and then make the test.

Tip 5: Make sure the testing account is different than one that you have set up play console with.

Tip 6: Make sure that the versionCode and versionName matches as the build on Play Console and the build is available on required tracks and not in testing mode.

Tip 7: Make sure the product is activated and the SKU IDs are proper.

Fungosity answered 17/3, 2022 at 17:23 Comment(11)
For Tip 1: We have done that. My main email is on both lists. For Tip 2: I have down that as well. Tip 3: I will try this. My main test phone is my daily driver device, but both emails I use on that phone are in the test list. Tip 4: We've waited well over a day now.Audsley
If you could post some code, also another unknown factor is how have you set up the item for purchase, because as you said otherwise the process is pretty straightforward. @JoshuaDelaneyFungosity
Also just a couple of other shoutouts, your testing account should be different from the one you have set up your Play account with. Also the versionCode and versionName should match as the build uploaded on internal testing track. Make sure the build is available and not in draft.Fungosity
We first get the SkuDetails object. I have verified that bit all works. We have a valid SkuDetails object. ' val flowParams = BillingFlowParams.newBuilder() .setSkuDetails(skuDetails) .build() billingClient?.launchBillingFlow(activity, flowParams) ' Doing that, I get the error.Audsley
@JoshuaDelaney I have updated the answer with some other couple of tips. Please check themFungosity
Just to confirm point 2 @JoshuaDelaney you have accepted the opt-in URL right that you get from console?Fungosity
Tip 5: Yup. The test emails we use were NOT the same one that setup the Play account. Tip 6: Also verified. Tip 7: Also verified. We have valid SkuDetails objects. Their ids match and they are activated.Audsley
@JoshuaDelaney I suggest you install the app from the official link and if that is not working, install the signed APK on your device. And as I said try with a device which doesn't have multiple emails and only the one which you have opted as testing.Fungosity
I booted up another test device with JUST a single email that we have allowed on testing. I still am unable to download the app, even though I am opted into testing. Installing a signed version of the APK still does not let me purchase and gives me the same error.Audsley
did you manage to solve this? im in the same state where i did all the configs but still get the above message?Squill
For me it was the testing link mentioned in Tip 2. There was no email sent. You have to actually copy the link from the Play Console and open it in your testing device with the tester account logged in and accept it from there. After that it worked like a breeze. Thanks for the tips!Dextrous

© 2022 - 2024 — McMap. All rights reserved.