the item you requested is not available for purchase

AndroidIn App-PurchaseIn App-Billing

Android Problem Overview


I'm trying to integrate Android Market in-app purchases into my app, but unfortunately coming across an annoying error every time I try to purchase a real inapp product.

I've taken the sample application (Dungeons) and added it to my app. I've updated the Public Key and also updated the list of products to the following:

/** An array of product list entries for the products that can be purchased. */

private static final CatalogEntry[] CATALOG = new CatalogEntry[] {
    new CatalogEntry("full", "Full v", Managed.MANAGED),
   
};

I've exported the application using Eclipse, and installed it on my phone and also uploaded it to the Android Market website. Also on the Android Market website I've added full as an in-app purchase and published it.

I've also added my googlemail account as a testing account (that is the one I'm signed into on my phone).

When I run the application on my phone I get a the item you've requested not available for purchase android message whenever I try to buy full, but if I try for example, android.test.purchased, it works absolutely fine.

The documentation for the item you've requested not available for purchase android states the following:

Indicates that Android Market cannot find the requested item in the application's product list. This can happen if the product ID is misspelled in your REQUEST_PURCHASE request or if an item is unpublished in the application's product list.

The product ID is definetely the same, it's definetely published and the request must be going through ok as it's the sample application .

i am using same version of apk and i published inapp products also and activated apk also. but still i am facing same problem please help me ho to fix it.

Any thoughts would be appreciated!

Android Solutions


Solution 1 - Android

My experience on this error is:

  1. Make sure to upload the signed APK to developer console.

  2. Make sure to install the signed APK on your device not launch the app in the debugger.

  3. Make sure to create a test account in your developer console.

  4. Setup you testing account

    1. Make sure to sign in your device with your test account.
    2. In a case of closed alpha/beta testing, make sure you have added your test account to selected testers group, you can do this on the page of management your alpha/beta version.
    3. In a case of closed alpha/beta testing, make sure your testing account have accepted participation in testing of this application via special invite link
  5. Make sure to create in app billing in your developer console and finally activate the item from the console!!! (this is the one that got me after fully following google's tutorial)

  6. Make sure to set VersionCode and VersionName in the manifest to be the same as the version in the developer console (Alpha, Beta or Production. Drafts does not work anymore). @alexgophermix answer worked for me.

If you're looking for testing payments without actual money withdrawal, you need additionally add your testing account to another special list of accounts "Gmail accounts with testing access", you can find that on play account setting(not project!). On the page where you can see a list of your projects go to settings, and then on "Account details" page (scroll down, it's almost in the bottom of page) you will find the "Gmail accounts with testing access" list.

Solution 2 - Android

Here are some things to check:

  1. You've created an apk and you've published it to the GooglePlay Dashboard in Alpha or Beta.
  2. The app in the GooglePlay Dashboard is NOT in Draft mode, but in Published (you'll need to make all the small circles with the check icon in them on the left side of the screen green before being able to publish).
  3. You've set another test account than the one that's "attached" to the GooglePlay Dashboard. You can do that by creating a Google+ group, add your test account to that group and specify the Google+ group in the GooglePlay Dashboard.
  4. The apk that you're using to test the purchase has the same version code, version name, and most importantly it's signed with the same keystore as the apk that you've published in the store.
  5. You wait a couple of hours between when you change something in the dashboard in order for the changes to propagate. It takes a couple of hours to do so.
  6. Make sure the sku value is a valid sku value (compare it with the one you've entered in the GP Dashboard).
  7. You try to purchase an already purchased item. Get the purchased items and display them in the log to see if so. If so, then consume that product or refund the money to your test account(you'll need to wait for the refund to propagate. It takes a couple of hours.)
  8. Make sure the Inapps are Active !

What did it for me, after 6 hours, was this last part:

  1. Make sure you're signedIn into google (in your browser) with the test account and you open this link (marked with the red) and you approve to become a tester !!!! http://i.stack.imgur.com/VSgAV.png

UPDATE

  1. If you're using flavors to build apks targeting different CPUs and you build for arm, armv7 and x86 and you upload them all to the store, remember to use one of them to test the inapps. If you use a "universal" build which contains all the cpu libraries (basically another build than what's on the store) it won't work.

Solution 3 - Android

This happens when the product is Inactive on the Play Store, Activate the product and it should work fine.

Solution 4 - Android

There is another possible cause for this error, which has almost driven me mad for a whole day until I found what was the problem: the apk version. If you are working with a local apk (correctly signed, correct key, correct product ids) with a version number higher than the one uploaded to the Play Store, you will also get this error.

Hope this helps someone

Solution 5 - Android

This error comes when everything you done is perfect, you have used signed APK with the proper product id, but you have to note that the account that you are using might don't have proper valid credit card details.

So whenever you want to buy any product even with test account, that account should have valid credit details.

Solution 6 - Android

Maybe I've been doing this wrong, but you will also get this error if the version you're testing on isn't on the Play Store as either Alpha, Beta or Production.

I often update my VersionCode and VersionName while still testing a new version (BEFORE uploading to Play Store) and then end up with this error when I go to test IAB specific features.

Solution 7 - Android

For my case is need to go to get link from the APK tab's Opt-in URL. Open a browser and use the link. Then register as a tester in that page.

Solution 8 - Android

you must accept to become tester

Release management -> app releases -> manage tester then open this link(Opt-in URL) with incognito mode to login tester account

enter image description here

Solution 9 - Android

please check if your using same test account mail id or not

Solution 10 - Android

Latest additions (2016/11):

  1. tester must ACCEPT testing request taken from the link taken from Developer Console (section: APK)

  2. app must be PUBLISHED: it is ok to publish in beta/alpha testing; INFO: if you hit "Publish" in Developer Console it will not publish the app on Production unless you propagate it to Production Tab (in section APK);

Solution 11 - Android

While purchasing an in-app subscription, I had all the things from below list at the right place.

  1. Created signed apk and published to alpha channel

  2. Added tester email ids to license testing

  3. Added tester email ids to closed track alpha testing

  4. Opted in to be a tester

  5. Testing Id was different from developer account's id

  6. Was on android device and not on emulator

  7. Downloaded the app from play store

Still I was getting this error saying "Item you were looking for could not be found".

After wasting 2-3 days I found out that it was only working if some payment mode was setup in play store.

While most of the answers are related to old IAB purchase and I implemented new billing client API which is - implementation 'com.android.billingclient:billing:1.0', it was not easy to find out the solution.

If this is the same case for some one, adding a payment mode might help you to overcome this error. You need to add one even for testing it, however, it will not be charged for email ids added as a license testers.

Solution 12 - Android

If the Product status is in "Inactive", activate it. this Solved for me. Of-course Google takes a while to update

Also make sure the your test mail has been registered.

Solution 13 - Android

In my case, I had to add my email addresses to the following fields. enter image description here

Solution 14 - Android

"Open Alpha Testing" or "Open Beta Testing" solved the problem for me, after trying all the methods suggested all over the internet.

Go to Android Developer Console -> Your app -> APK then opt in to use Open Alpha/Beta testing. Send the link provided to yourself or testers.

As long as they are logged in with that account on their Android device, they can test it.

Good luck

Solution 15 - Android

I have faced with the same issue , The solution for me was uploading the current version of your app to the play store , If it is for testing then upload it to the Alpha or the Beta channel , I have done this and the error is gone and the pricing details is shown correctly ..

Solution 16 - Android

Here're my experiences with testing IAP related some of the answers above

  1. You've created an apk and you've published it to the GooglePlay Dashboard in Alpha or Beta.

Nope. I have an app in tests that is in Internal Testing (pre Alpha) and IAPs are working perfectly. Also nowadays I believe most of us publish AAB bundles not APKs I think for new apps AAB distributable is a requirement (could be a factor here?).

  1. The app in the GooglePlay Dashboard is NOT in Draft mode, but in Published (you'll need to make all the small circles with the check icon in them on the left side of the screen green before being able to publish).

Again not true. The app status of the app I am testing is Draft / Internal Testing (displayed on the list of all apps). Unless by 'Published' it is meant: "A release is available to internal testers."

  1. You've set another test account then the one that's "attached" to the GooglePlay Dashboard. You can do that by creating a Google+ group, add your test account to that group and specify the Google+ group in the GooglePlay Dashboard.

That may be correct. I had some problems with both restoring purchases in a newly installed app (if some products were purchased, then the app was uninstalled and subsequently reinstalled, or installed again on a different device with the same Google account) and purchasing them till I started using a different account.

  1. The apk that you're using to test the purchase has the same version code, version name, and most importantly it's signed with the same keystore as the apk that you've published in the store.

Again not true. My app in the store has different version and the build number than the one I test locally. In my case for the app in the store the version is assigned while the app is being built, right before it is deployed, and the build number is calculated based on number of commits in the repo, both happen in the CI I use (Jenkins). The one I run locally on a device connected to my dev machine via USB cable, running in debug mode from the IDE (IntelliJ in my case) - pretty much standard scenario is obviously not signed with the same key as the one in the PlayStore and the version and build number are both fixed. The IAPs still work when running locally.

  1. Tester must ACCEPT testing request taken from the link taken from Developer Console

True + make sure that in case the tester has multiple accounts on the test device the account associated with the email declared in the License Testing section of your app is the one that is active.

Solution 17 - Android

In order to solve this problem, follow these steps:

  1. Create the product on Google play developer console.

  2. Save and set it to "Active".

  3. Upload the APK to Google play.

N.B. The in-app billing may not work until after 6 hours of creating your product in step 1.

Solution 18 - Android

The top voted answer covers pretty much everything, but if you were as stupid as I was to rush through the App Release process in order to get on with testing IAPs, be sure to publish the app in the Play Store of the country you are testing in! Easy way to check this on device is to tap the 'download it on Google Play' link when opening the test opt-in URL. If you get an 'Item not found' error when attempting to open via the Google Play store then it's likely your app hasn't been published there. I ran into this issue because I was side-loading the signed app correctly via ADB and although IAPs will show up in the build, you will get this error when you try to purchase them.

Solution 19 - Android

There could be three possibilities :

  1. Save your APK on google play as Draft and don't forget to activate this and publish your products with unique Ids.
  2. Check your Ids are same as product Ids on google play.
  3. or check for Item types are same e.g. Managed in both Google Play and your Code.

If you are testing no need to publish the app. Just save it as a Draft. And Then wait for some time may be 2 to 3 hrs to activate this.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionlaxmanView Question on Stackoverflow
Solution 1 - AndroidpinuxView Answer on Stackoverflow
Solution 2 - AndroidAndreiBogdanView Answer on Stackoverflow
Solution 3 - AndroidAnilPatelView Answer on Stackoverflow
Solution 4 - AndroidDavidBValView Answer on Stackoverflow
Solution 5 - AndroidNiraliView Answer on Stackoverflow
Solution 6 - AndroidalexgophermixView Answer on Stackoverflow
Solution 7 - AndroidPayne ChuView Answer on Stackoverflow
Solution 8 - Androidvuhung3990View Answer on Stackoverflow
Solution 9 - AndroidlaxmanView Answer on Stackoverflow
Solution 10 - AndroidPerfectGamesOnline.comView Answer on Stackoverflow
Solution 11 - AndroidBeeView Answer on Stackoverflow
Solution 12 - Androidvijeth.agView Answer on Stackoverflow
Solution 13 - AndroidRajesh Jr.View Answer on Stackoverflow
Solution 14 - AndroidR_PaoaView Answer on Stackoverflow
Solution 15 - AndroidAmeen MaheenView Answer on Stackoverflow
Solution 16 - AndroidhicnarView Answer on Stackoverflow
Solution 17 - AndroidinspiredMichaelView Answer on Stackoverflow
Solution 18 - AndroidsprinceView Answer on Stackoverflow
Solution 19 - AndroidURAndroidView Answer on Stackoverflow