Receiving error while doing in-app purchase in my app in android. Error while retrieving information from server [DF-AA-20]
-
Welcome! You'll need to share a lot more information. Have you tried [Googling your issue](https://www.google.ca/search?q=Receiving+error+while+doing+in-app+purchase+in+my+app+in+android.+Error+while+retrieving+information+from+server+[DF-AA-20])? Please check out [mcve] as well as the [tour] and [ask] and then [edit] your question appropriately. – ashleedawg Dec 12 '17 at 09:20
-
i have googled the same issue but didn't find any solution. – S. Shaikh Dec 12 '17 at 09:26
-
i have integrated in-app purchase in my app, but when i am trying to click on the button to purchase it shows me the error on google-play window. – S. Shaikh Dec 12 '17 at 09:27
-
There are hundreds of possible solutions in the search results; which ones have you tried, and what was the results. Did you see the links, like [mcve]? – ashleedawg Dec 12 '17 at 09:30
-
@S.Shaikh This simply means your app is not published yet in play store. – Sunny Dec 16 '17 at 09:57
-
My problem was that I had not published my APK properly in Alpha. Once it turned to "Published" the error went away. Now I get another erro "The item you requested is not available for purchase." Not sure why though as it's an active managed item with the correct name... – May 16 '18 at 20:01
4 Answers
Make sure you have followed the below steps:
Login to the Play Console with your developer account.
Copy the application's public key (a base-64 string). You can find this in the "Services & APIs" section under "Development tools" and replace in your code.
Make signed apk and upload (not publish) in ALPHA, and add your test account (the one you will use to test purchases) to the "testers" section of your app. Your test account CANNOT BE THE SAME AS THE PUBLISHER ACCOUNT.
Click Settings > Account details, then in the License Testing section, add the Google email addresses for your tester accounts.
Under In-app Products, create your product and make active.
Use your product id in code and make a signed build and Publish in the Alpha channel wait until the status change to "Published".
Test the app in tester account enabled device.

- 3,078
- 1
- 32
- 34
-
1
-
I followed the Google play Billing docs, i didn't see any mention of the app public key? – Pavel Poley Sep 02 '18 at 10:18
-
@PavelPoley, Console has been updated so now you can find this under "Development tools" – Deven Sep 03 '18 at 10:12
-
-
Make sure that you are using the right ProductID and check if you have that ProductID set to "active" in "In-app products" in your Google Play Console.
You can also add a new ProductID and try if you get the same error.

- 61
- 5
-
Hey, i have used right ProductID and it is activated on google play console. – S. Shaikh Dec 14 '17 at 12:43
-
Hello, any update for the solution, its day 3 i am facing this issue. Please help.... – S. Shaikh Dec 15 '17 at 07:27
-
-
-
2Chief! The product was not active for me... I had to activate it, was my bad. Thank you dude. – romaneso Feb 14 '18 at 23:08
I had the same Issue, but as @Parodius says you need to change your product's SKU, I solved using:
Bundle buyIntentBundle = mService.getBuyIntent(3, getActivity().getPackageName(),
"remover_publicidad", "inapp", "DFOSYwWKWv");
Where "remover_publicidad" is my SKU. Also, If you wanna see the dialog with the button to proceed the purchase you must use an Android Device with a different Google Account than your developer account email.

- 1,262
- 4
- 20
- 31