the item you requested is not available for purchase
Asked Answered
I

22

124

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!

Intermit answered 29/10, 2012 at 6:50 Comment(4)
you publish you product?Epimorphosis
the Google account you used for Merchant Account, is different from device account?Epimorphosis
Make sure the product you added on play store is showing status as "active"Dragoon
Make sure your testers have clicked the opt-in link...Hyacinth
I
6

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

Intermit answered 30/10, 2012 at 7:5 Comment(3)
ha my device login as another mail id,after i set testaccount mail id is primary id this problem is solved.Intermit
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.Ardehs
i got this error when my device login as other than test account mail id(testaccount mail id specified in developer console under public key).if i set testaccount mail id as primary mail id of my deviceIntermit
D
207

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.

Dev answered 11/8, 2013 at 13:3 Comment(11)
Always remember to test the application using signed build. +1Avogadro
In addition, make sure you test user has opted-in to the Alpha (if you are using that obv). It is not sufficient to add them to the License Testing.Orfurd
Make sure that you approved to become a tester by opening Opt-in URL and using the test account.Spoony
For me, I forgot to accept test user agreement, as I become valid tester I can able to test game build.Papert
i have tested purchase with test account and i made 4 purchases every thing work great, but when i upload it to google play and download i see "the item you requested is not available for purchase", how?(item is active)Stevenstevena
You don't really have to upload the apk to the play store. you just need the version number to be the same as the uploaded apk. I usually forget and increment the internal test version's number, and get this error.Cluck
Isn't it enough to sign debug version by signingConfig signingConfigs.config in the build.gradle and run it in the debugger?Deferred
The following helped me: 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.Deferred
@i.shadrin Does the app have to be published too? I have unpublished it temporarily while I develop the in-app purchase feature.Bumpy
Hey @all I have tried everything and still showing me an error the item is no longer available Any IdeaHenrique
Do not use DEBUG modeHockenberry
M
113

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 !!!! https://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.
Moynihan answered 1/2, 2016 at 14:23 Comment(17)
I got the same situation with you. all 1-8 is no problem but it's 9 that's the problem. Waste my whole day to find this. You are my life saver.Duvalier
Yes, last part is most important, seems google changed the rules, it use to work without step 9, but now, for either close beta or open beta, you need to click the link. Thanks Man!Imposing
my problem was 4. installed apk's version code was not same as google play apk. Once i made same version it worked.this answer is valuable.Perionychium
I so much hate this "couple of hours" uncertainty! During this "couple of hours" my boss usually freaks out! Btw, if you have a manually installed APK you won't receive any update at all! And it's stupid that with own signed APK the IAB doesn't work. I guess we need to wait for the damn update to happen!Wrathful
For using your release key in debugging mode, for android studio, see #16965558Krick
you can do this in debug mode. Though, publisher can't purchase. So, use other gmail account.Outsoar
My problems were 3.) to set up closed beta testing, but problem continued until I did 9.) accepting myself with my test account as a tester. Tried and checked all other for hours. Basically all is said clearly in Googles guide, but I could not follow them ;-)Nora
Google has made creating a new application with app-in purchases very complicated, because you must also publish it with all screenshots, descriptions, age limit validations etc. even if application is not ready. That takes a lot of time and some work is waste of time, because you must update those screenshots and description anyway with final versions until app is published. ;-(Nora
Thanks for the solution. My problem was step 6.Gravely
Number 8 got me. The little dropdown box in the top right of the play store console isn't very noticeable.Roughshod
I'm having some confusion in my product creation while upgread application version. Did we must required to create product while I'm upgrade my application version? I already created in-app product in my previous version of my application?Countryfied
F**n google, made simple things so dizzy, just like stupid apple! The key was you must accept this link on device the same device where you will test, not on any device linked to your google account!Dewitt
Open the link https://play.google.com/apps/testing/... helped me. Thanks!Deferred
How can we actually debug this though without signing? That possible?Deformation
For me the missing step after following 1 through 10 was to actually download the app from Google Play once. After that I could upgrade the release-signed APK locally for debugging/testing and it continued working.Retribution
Tried everything still showing me an error the item is no longer available.Henrique
@Retribution I can't find the app in the appstore although I am a testerMarjana
H
45

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

Hyposthenia answered 31/5, 2013 at 7:38 Comment(2)
Never thought of that... :D Thanks for saving more hours!Republicanism
What do you mean by Inactive? Developers should just use the Alpha version of the APK.Gabie
B
30

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

Bartholomeus answered 20/5, 2016 at 23:26 Comment(5)
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewJoyner
The information of this answer is actually good to know and could be the right answer for some people like meJannjanna
@Joyner I pointed out another cause of the error, I did not ask for any clarification. It's not an hypothesis or question, if you manually install an APK with a higher version number than the one published, in-app purchases will return this error.Bartholomeus
It was a very useful information to have. Thanks a lot for saving so much of my time. Thumbs up.Glinys
Man you save my day, thanks a lot :)Unborn
A
24

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.

Aubine answered 10/12, 2012 at 11:27 Comment(3)
This answer that is both true and rare to find. So thanks a lot for going the extra mile and not adding yet another "activate your product" answer.Fremantle
Experiencing this just now as well. On relaunch, it may switch to a "Add a payment method" popup instead of the unavailable popup, but it may not. not sure why you get one or the other.Carnay
you dont need a valid payment method when it is a test account. this information is not correct todayPolicy
Y
20

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.

Yvor answered 3/9, 2015 at 21:58 Comment(1)
And also allow at least 45-90 mins after uploading to the Play store for it to start working.Majunga
A
14

you must accept to become tester for CLOSED TRACK AND INTERNAL TRACK

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

enter image description here

Areta answered 12/6, 2018 at 2:59 Comment(1)
I´m a tester and i have the same problem.Displace
W
13

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.

Wisent answered 11/9, 2015 at 3:39 Comment(1)
This was my case in year 2021 - even being the dev account owner, I had to join testing program via that Opt-in URL, or purchases failed with that "the item you requested is not available for purchase"Juror
I
6

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

Intermit answered 30/10, 2012 at 7:5 Comment(3)
ha my device login as another mail id,after i set testaccount mail id is primary id this problem is solved.Intermit
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.Ardehs
i got this error when my device login as other than test account mail id(testaccount mail id specified in developer console under public key).if i set testaccount mail id as primary mail id of my deviceIntermit
S
4

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);

Shrivel answered 1/11, 2016 at 13:54 Comment(0)
C
4

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.

Ceria answered 1/11, 2019 at 7:48 Comment(0)
P
4

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

Pyrophyllite answered 15/4, 2021 at 11:53 Comment(0)
S
3

Spent 3 days on this. After carefully checking each answer above here is my expanded cook book:

  1. in Play Console Testing -> Internal Testing

  2. switch to "testers" tab. There are 2 tabs, easy to miss First tab is "Releases", second tab is "Testers".

  3. Scroll down in testers tab. If you dont scroll you will miss again. There is a text called "How testers join your test" Select the blue "Copy link"

This will be something like https://play.google.com/apps/internaltest/4703249206518615774

  1. Enter this in a browser. You absolutly must do this. Even if you are the main developer. You might have thought "oh Google will automatically add the main developper". No, they do not. You need to paste the link. You can do this on your development machine, you dont have to do it on the Android test device.

  2. Press the "Accept Invite" button (blue)

Preconditions: Like mentioned in answers above, App must be released at least to test track. version numbers must match. You must create a testers list and must be member of the testers list.

Subdelirium answered 25/4, 2023 at 8:55 Comment(0)
T
2

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.

Tenorrhaphy answered 23/5, 2014 at 7:7 Comment(0)
U
1

"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

Uranic answered 11/9, 2015 at 0:20 Comment(0)
D
1

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 ..

Disused answered 26/5, 2017 at 6:30 Comment(0)
W
1

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.

Wigwag answered 9/12, 2021 at 0:1 Comment(0)
B
1

Adding my email to both the licensed testers AND internal testers list solved the issue for me. I had an unpublished app which was only available for internal testing.

Baten answered 9/9, 2022 at 14:14 Comment(1)
You are a rockstar.Doradorado
M
0

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.

Maneuver answered 13/12, 2015 at 12:24 Comment(0)
S
0

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.

Schlenger answered 13/2, 2019 at 15:30 Comment(0)
P
0

Important Note for All Users: After entering your email in the tester, make sure to click on the link provided under "How testers join your test" and accept the invitation in order to participate in the testing process. In my cause I'm running app in debug mode, I am able to view all available products, and after accepting the tester invitation, I can test the purchase functionality using a test card.

Pulitzer answered 9/5, 2023 at 15:20 Comment(0)
P
-1

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.

Perhaps answered 29/10, 2012 at 7:28 Comment(1)
above three conditions are satisfied but it showing same errorIntermit

© 2022 - 2024 — McMap. All rights reserved.