This version of the application is not configured for billing through Google Play
Asked Answered
S

27

373

When I try to run my application with in-app billing I am getting the error: "This version of the application is not configured for billing through Google Play. Check the help center for more information".

I have the billing permission already in the Manifest file and I have a signed .apk uploaded as a draft onto Google Play and I have also installed that same signed apk onto my phone.

Any help on how to solve this issue?

Shriver answered 17/6, 2012 at 3:20 Comment(1)
I have this problem on real device, but not on emulator. I install the same build on the emulator and device. I logged in as the same user on both emulator and device. On device I got this-version-of-the-application-is-not-configured-for-billing error, on emulator everything works normally and dialog with test card appears. What the difference?Heptagonal
S
207

Ahh found the solution after trying for a couple of hours.

  1. Google takes a while to process applications and update them to their servers, for me it takes about half a day. So after saving the apk as a draft on Google Play, you must wait a few hours before the in-app products will respond normally and allow for regular purchases.
  2. Export and sign APK. Unsigned APK trying to make purchases will get error.
Shriver answered 18/6, 2012 at 1:19 Comment(12)
Wow, is this serious? Just ran into the same problem. Did everything Google asked me to do in order to test in-app billing, but still getting the same evasive error message. I guess I'll have to wait and see. But does Google really expect us developers to wait hours each time we need to update our app in order to implement in-app billing? It seems quite inappropriate to me, to say the least.Fiery
Can you test while connected to Android Studio / running while connected to the debugger? Or do you need to install the release apk via USB?Inca
Is there an easier way to test the purchase process other than, Android Tools > Export signed project... etc, then manually copy APK across to device, Test, .... repeat? I must be missing something?Cayla
Seriously, I cannot use the application with debug certificate and test In-App Billing?Counterstroke
Even with the signed apk installed, I'm still getting this error.Margheritamargi
It seems like the testing device has to have the exact same APK installed that is in Google Play. It doesn't need to be in production, beta works too. But this makes developing very hard. To test it, you have to upload the APK to Google Play, and it takes them hours to refresh. So, if I just want to add one logger call, I need to wait hours for it to work. Or am I missing something?Overt
Note that you CAN use debug builds, straight from your IDE as you are working. You just need to change the debug keystore to one that matches your release store. See this post for more information on how: #10887314Etching
I export a signed APK, and run it manually on my device, the problem solved. 10x!Zhao
@gatekeeper will it also take half day if I do some changes in IAP and test it in my Android phone without updating to Google play?Dearman
@gatekeeper Do you happen to know which countries that I manually need to report and pay VAT tax for on In-app billing with Google? I have read that Japan needs manually reporting. Anyone else? I would be happy If you could read/answer my Q at #36507335Petty
For Android Studio users (not eclipse), follow steps here: #16965558Synchroscope
WHY THE DUCK IS THE REQUIREMENT TO USE A SIGNED APK NOT IN THE DOCUMENTATION IN 2024? Wasted 3 days on this garbage before finally stumbling on this post. Ugh.Valenevalenka
D
412

This error may be caused by several reasons.

Here is the list of requirements for the Google IAB testing.

Prerequisites:

  1. AndroidManifest must include "com.android.vending.BILLING" permission.
  2. APK is built in release mode.
  3. APK is signed with the release certificate(s). (Important: with "App Signing by Google Play" it only works if you download directly from GooglePlayStore!)
  4. APK is uploaded to alpha/beta distribution channel (previously - as a draft) to the developer console at least once. (takes some time ~2h-24h).
  5. IAB products are published and their status set to active.
  6. Test account(s) is added in developer console.

Testing requirements:

  1. Test APK has the same versionCode as the one uploaded to developer console.
  2. Test APK is signed with the same certificate(s) as the one uploaded to dev.console.
  3. Test account (not developer) - is the main account on the device. (Main account might be not necessary - according to @MinosL comment)
  4. Test account is opted-in as a tester and it's linked to a valid payment method. (@Kyone)

P.S: Debugging with release certificate: https://mcmap.net/q/41983/-how-to-set-a-custom-keystore-for-debugging-in-eclipse-for-android (Thnx @dipp for the link)

P.P.S: Wanted to make this list for a long time already.

Thnx @zlgdev, @Kyone, @MinosL for updates

Devoe answered 18/3, 2014 at 2:24 Comment(24)
Being an absolute newbie in Android development, I don't understand No 3. What do you mean 'Release certificate'?Ferdelance
@Ferdelance then you should read this carefully (there are some pitfalls): developer.android.com/tools/publishing/app-signing.htmlDevoe
Don't forget to make sure the account you're using to test IAB is opted-in as a tester using the "opt-in URL" generated once you've uploaded a build; AND that it's linked to a valid payment method.Pearman
After adding BILLING permission to main manifest file, this error dialog box removed from my build. But I don't know why before I can able to add In App Products into play store account!!!Redskin
on android studio: build -> generate signed APK, then install to deviceTriaxial
Shouldn't it be easier to just test IAP? Or to test things in general..Barbur
The keys for me: first, what @Pearman said about the tester needing to opt in and to have a valid payment method set up; second, that the APK is signed with the release certificate - by default a debug build uses a debug keystore, and in VS you need to manually edit the .csproj file to tell it to use your release keystore instead, as documented here in the "Permanently Use a Different Keystore" section.Virtues
also worth noting; test account should not be linked to developer account (should not have access to upload APK)Orpine
also worth noting; if "App signing certificate" is enabled, then we cannot use our local APK to test with real purchases since we cannot sign with signing certificate. (took me like 3 hours to find out)Orpine
This is funny, I have one app where I can do how many purchases I want in debug mode, with different version code from the one uploaded.How is it possible? I also think I'm not in the tester listIsooctane
Wait for 24hrs after uploading it on google playstore and to test on debug apk right away use this SKU 'android.test.purchased'Dicker
I've been successfully testing with 1) a signed debug app that is 2) not the main account on the device, so the process for Google IAB testing seems to be not as strict as noted above.Anglian
@Anglian 1) Signed debug app is ok and it's mentioned in the answer. 2) "Main account is not nessesary" - thanks, longilong added it to the listDevoe
No need for the messing with debuggable keystores. I was able to 'debug' my app through logs using adb logcat.Lewanna
Quick note from my side, as this bordered me a while: On the dev docs Google says that you can do local builds after the first alpha/beta roll out was successfully. This isn't working for me. After doing all the stuff up there, I only managed to make it work with the downloaded version from the Play Store, NOT A LOCAL BUILD (even if same signing, release build and installed from sdcard). Maybe it's my fault, but just wanted to mention it here.Pentecostal
Regarding step 3 of Prerequisites: If "App Signing by Google Play" is enabled then how can I debug and impement the code. It will require me to upload new APK every time I make any changes.Crumpler
Emphasis for the line "Must be the main account"!Sosa
AndroidManifest must include "com.android.vending.BILLING" permission. This worked for me... thanks man!Bensen
Last note was most helpful. If you linked Service Account after you added products (which is usually true), you need to make any changes in price of the product, then it will work. Also, make sure you see linked Service Account in Google Play Console (in linked product). if you don't you have re-create your Service Account and indicate PERMISSIONS in step 2 (I just granted full access)Bechtel
i have all above still i'm getting same errorOverhasty
The information here is outdated in 2021. Please check dor506 and Pablo Cegarra answersCorrode
It is working correctly if I add licensed testers but doesn't work without the licensed testers. How can I be sure that everything is gonna work fine when the app is published?Ammons
@Ammons google purposely did this you can check for more details developer.android.com/google/play/billing/testEmphysema
Thank you. For me the issue was that the test APK had a different versionCode to the APK on Google Play.Cornered
S
207

Ahh found the solution after trying for a couple of hours.

  1. Google takes a while to process applications and update them to their servers, for me it takes about half a day. So after saving the apk as a draft on Google Play, you must wait a few hours before the in-app products will respond normally and allow for regular purchases.
  2. Export and sign APK. Unsigned APK trying to make purchases will get error.
Shriver answered 18/6, 2012 at 1:19 Comment(12)
Wow, is this serious? Just ran into the same problem. Did everything Google asked me to do in order to test in-app billing, but still getting the same evasive error message. I guess I'll have to wait and see. But does Google really expect us developers to wait hours each time we need to update our app in order to implement in-app billing? It seems quite inappropriate to me, to say the least.Fiery
Can you test while connected to Android Studio / running while connected to the debugger? Or do you need to install the release apk via USB?Inca
Is there an easier way to test the purchase process other than, Android Tools > Export signed project... etc, then manually copy APK across to device, Test, .... repeat? I must be missing something?Cayla
Seriously, I cannot use the application with debug certificate and test In-App Billing?Counterstroke
Even with the signed apk installed, I'm still getting this error.Margheritamargi
It seems like the testing device has to have the exact same APK installed that is in Google Play. It doesn't need to be in production, beta works too. But this makes developing very hard. To test it, you have to upload the APK to Google Play, and it takes them hours to refresh. So, if I just want to add one logger call, I need to wait hours for it to work. Or am I missing something?Overt
Note that you CAN use debug builds, straight from your IDE as you are working. You just need to change the debug keystore to one that matches your release store. See this post for more information on how: #10887314Etching
I export a signed APK, and run it manually on my device, the problem solved. 10x!Zhao
@gatekeeper will it also take half day if I do some changes in IAP and test it in my Android phone without updating to Google play?Dearman
@gatekeeper Do you happen to know which countries that I manually need to report and pay VAT tax for on In-app billing with Google? I have read that Japan needs manually reporting. Anyone else? I would be happy If you could read/answer my Q at #36507335Petty
For Android Studio users (not eclipse), follow steps here: #16965558Synchroscope
WHY THE DUCK IS THE REQUIREMENT TO USE A SIGNED APK NOT IN THE DOCUMENTATION IN 2024? Wasted 3 days on this garbage before finally stumbling on this post. Ugh.Valenevalenka
Y
148

The same will happen if your published version is not the same as the version you're testing on your phone.

For example, uploaded version is android:versionCode="1", and the version you're testing on your phone is android:versionCode="2"

Yasmin answered 9/7, 2012 at 12:31 Comment(6)
can u tell please me what if uploaded version is android:versionCode="1" and phone is android:versionCode="2" dose it ok or i have to change my apk google play ?.Behalf
What you need to do is to bump down the local version to "1" so it matches the current live version, as least temporarily for testing.Izzo
Looks like there are 2 common fixes to this error depending on your situation. In my case it was this one.Crucifix
Thank you, this was the issue. Was debugging fine with release signed apk on my attached device. Then, changed the versioncode and it started getting the 1005 error. whew!Campagna
@Anna be aware that -1005 is also USER_CANCELLED if you use iabHelperSomatic
This does not happen anymore apparently github.com/googlesamples/android-play-billing/issues/…Gregarine
M
106

In the old developer console:

Settings -> Account details -> License Testing -> Gmail accounts with testing access and type here your accounts

In new developer console:

Setup -> License Testing -> Type your Gmail account, hit 'Enter' and click 'Save'.

Google Play License testing

Marchand answered 11/7, 2018 at 12:21 Comment(6)
Works like a charm.Fecundate
Hi my email is added in the license account. Still i am getting the errorNevels
Special attention to the hit 'Enter' part. I was just clicking save and the emails were not being added to the list.Jutland
I can't ever repay you enough for saving my life, my marriage, and my sanity with this answer. Bless you.Etzel
This also works for me, but I have one concern. How can I be sure that this will work when the app is published?Ammons
This did it for meMikkanen
L
48

You need to sign your APK with your live certificate. Then install that onto your test device. You can then test InAppBilling. If you are testing your application by direct run via eclipse to device(In debug mode) then you will get this error.

If you are using android.test.purchased as the SKU, it will work all the way, but you won't have the developerPayload in your final response.

If you are using your own draft in app item you can test all the way but you will be charged and so will have to refund it yourself afterwards.

You cannot buy items with the same gmail account that you use for the google play development console.

Lerner answered 6/2, 2013 at 12:8 Comment(2)
+1 Running from debugger uses debug certificate. After exporting the app and creating a new public key (and installing it in the developer console), just email yourself the apk and install it from your gmail inbox.Polyamide
If I want to try "android.test.purchased" am I then going to change the SKU in both my code and in the developer console?Commiserate
O
45

Conclusions in 2021

For all of you who concerned about debugging - You CAN run and debug and test the code in debug mode

Here's how you can test the process:

(This of course relies on the fact that you have already added and activated your products, and your code is ready for integration with those products)

  1. Add com.android.vending.BILLING to the manifest
  2. Upload signed apk to internal testing
  3. Add license testers (Play console -> Settings -> License testing) - If you use multiple accounts on your device and you're not sure which one to use, just add all of them as testers.
  4. Run the application, as you normally would, from Android Studio (* The application should have the same version code as the one you just uploaded to internal testing)

I did the above and it is working just fine.

Oxysalt answered 3/2, 2021 at 7:28 Comment(8)
I can't ever repay you enough for saving my life, my marriage, and my sanity with this answer. Bless you.Etzel
Worked for me too. I was able to test in app purchase in my flutter app using an emulator. (i am using in_app_purchase library in flutter)Equivalence
don't forget to add com.android.vending.BILLING to your debug/AndroidManifest.xml file.Equivalence
I skipped step 1 and it is working for testing purposes. I did that on behalf this article developer.android.com/google/play/billing/…Railing
Beautiful, worked for me! Very nice solution.Melodious
It is still beyond me why Google added support for sideloading & debug builds, but still forces the versionCode to match the build uploaded to GPlay store. It's also not mentioned in the docs (at least not anymore). But then again, we also still can't reset subscription trials and need to recreate Google accounts each time, so there's that too. I hope someone at Google reads this and makes our life easier.Proton
There is no need for the first step (adding the permission). Because it's added in the billing library. It's already declared in the AndroidManifest.xml file of the com.android.billingclient:billing library.Fico
what worked for me was step # 3, but it's no longer Settings, it's Setup, as in: Play console -> Setup -> License testing.Decorous
L
22

If you're here from 2018, you need to download the APK directly from Play Store and install the "derived" APK. Maybe it is because of Google's Play Store has a feature "App Signing by Google Play".

Update:

Still a possible solution in the year 2023.

Lazarus answered 11/5, 2018 at 0:36 Comment(6)
Which APK? I am using AIDL do i still need to do that?Hyacinth
@ZhenLiu I guess not neededLazarus
In addition, the app cannot be already installed on the device by a different means (ie. Android Studio). Installation/update from the Play Store will work, but the IAP will not - you'll get the OPs error.Rafael
How do we debug this?Trygve
I recently started getting this error, I also recently removed this stuff from my google app store settings thinking it wasn't needed. It is indeed needed. I must have added these settings years & years ago and forgot why.Aseptic
Cool! I guess I have to update this answer 5 years later.Lazarus
F
12

This is tested for debug/release builds & either if the app is signed by Play Signing (which means the signing certificate of the delivered app from Google Play is different from the certificate when installing the app from your machine using Android Studio).

check these following steps:

  1. Create your product on Google Play Console and activate it.
  2. Add license testers (open the Google Play Console -> Settings -> License Testing). Add all the Google accounts listed on your android device.
  3. Upload signed app to the internal testing track (it must be in release mode).
  4. Use the testing link to check if the app is available to download (make sure the uploaded app version to the internal track matches the version you're testing in debug mode). It takes some time to see the latest uploaded version there, so I recommend clearing the cache of the Play Store app.
  5. Run your app in debug mode from Android Studio. (Again, the app version and build number must match the values on the published version to the internal track).

I tested that on two different Google Play Console accounts (two different apps), and it works.

Fico answered 10/1, 2022 at 9:15 Comment(2)
This is the correct answer if you still get the error after adding License Testing. Thank you!Luzern
Tested today, internal track build worked great!Monometallism
P
4

This will happen if you use a different version of the apk than the one in the google play.

Prone answered 25/11, 2013 at 7:49 Comment(1)
there is no such thing any longer not sure if it was in 2013,Hypothermia
A
4

Let me just add what happened with me, may help some one.

It was mainly due to signing.

Since I have added the signing details in the Project structure, I was thinking that every time when I run, expected signed apk is getting installed. But build type 'debug' was selected.

Below fix solved the problem for me.

  • Generated signed apk of build type 'release'.
  • Manually installed the apk.
Aiguille answered 2/1, 2016 at 15:48 Comment(0)
F
3

Contrary to many answers and comments on SO and other sites, you do NOT have to perform preliminary tests with an alpha/beta version of your product that has been downloaded from Google Play onto your test device (the alpha/beta publication process often eats up half a day). Neither do you have to load and re-load a signed release apk from your developer studio to your test device.

You CAN debug preliminary Google Play in app billing services using the debug app as loaded from your developer studio directly to your test device via ADB. If you are experiencing errors that prevent this, likely you have done something wrong in your code. Pay especially close attention to the CASE of your SKU's (product ids) and their format (for example, if you load your APK as com.mydomain.my_product_id, be sure your try to purchase it this way - providing the same case and domain). Also, pay especially close attention to your itemType - this should be either "inapp" or "subs" for managed/unmanaged in app purchases or subscriptions, respectively.

As suggested by Chirag Patel, provided you have your billing code properly established, perform all testing using the android.test.purchased Sku (product ID) during your preliminary tests. Check for this ID throughout your billing operations to pass it through signature, token and payload checks, since this data is not provided by the Google test system. Additionally, give one of your test products this ID to test its purchase, unlock/load and presentation all the way through your schema. To CLEAR the purchase, simply consume it, passing the same Sku AND a token string formatted this way - no other fields are relevant :

    "inapp:"+appContext.getAppContext().getPackageName()+":android.test.purchased";

Once you have completed this phase of testing, move to semi-live testing with your alpha/beta product. Create a Google group (essentially a mailing list), add your test users emails to it, and add/invite this group to test your device in this phase (performed at the "APK" portion of your app's Google developer listing). Purchases will be simulated but not actually charged - however to clear and re-test the purchases, Google indicates that you must refund them from your Google wallet. THIS is the only phase of testing that requires the time-consuming process of using alpha/beta loads and test users.

Frostwork answered 23/7, 2014 at 0:20 Comment(0)
I
3

The trick for me was realizing that the License Tester email I added to Google Play Console needs to match the email address that's associated with the device, which is found in the device Settings app under "About Phone -> Google Account".

The email addresses under "Settings -> Google" and in the Play Store app don't count, and can even be different than the email address associated to the device, which apparently can only be changed by factory reset.

Infielder answered 2/12, 2023 at 7:14 Comment(0)
C
2

In my case I saw the same message due to the different signatures of the installed apk and an uploaded to the market apk.

Clo answered 6/11, 2013 at 22:37 Comment(0)
W
2

Had the same problem, and it was not solved before i read the post from DZDomi. It suddenly occurred to be that there is a setting in the Google Developer Console that you need to enable. In the "In app purchases" section, there's a line for your product and to the far right there's a status for it. It should be ACTIVE!

Weil answered 31/3, 2017 at 6:50 Comment(0)
V
2

2023

In my case

i just update the compileSdkVersion = 31 to compileSdkVersion = 33 and targetSdkVersion = 31 to targetSdkVersion = 33

    compileSdkVersion = 33
    targetSdkVersion = 33 

Because the latest version of Android is 13

Before the upgradation, I received this

enter image description here

then perfectly it worked fine

enter image description here

Valente answered 4/7, 2023 at 8:28 Comment(0)
I
2

I was stuck on this issue for days, I had attempted to deploy to play console and test on my phone again and again.

i had 2 test phones and there were 2 different main accounts but i forgot what is the main account is so if you have more than 1 account sign in to your Google Play. make sure you have added your main account to the testers list on google app console

you can also try to add all of the accounts to make sure that the issue is not related to different google accounts.

Insanitary answered 15/12, 2023 at 2:15 Comment(0)
T
1

If you want to debug IAB what do you have to do is:

  1. Submit to google play a version of your app with the IAB permission on the manifest:

  2. Add a product to your app on google play: Administering In-app Billing

  3. Set a custom debug keystore signed: Configure Eclipse to use signed keystore

Tillietillinger answered 31/12, 2014 at 12:21 Comment(0)
A
1

Another reason not mentioned here is that you need to be testing on a real device. With the emulator becoming really good, it's an easy mistake to make.

Astra answered 22/1, 2018 at 15:58 Comment(0)
C
1

Recently google has implemented a change on their systems, and since you have uploaded at least one APK to your console, you can test your in-app requests with your app with any version code / number.

Cross reference LINK

Configure gradle to sign your debug build for debugging.

android {
    ...
    defaultConfig { ... }
    signingConfigs {
        release {
            storeFile file("my-release-key.jks")
            storePassword "password"
            keyAlias "my-alias"
            keyPassword "password"
        }
    }
    buildTypes {
        debug {
            signingConfig signingConfigs.release
            ...
        }
    }
}
Commute answered 28/3, 2018 at 6:42 Comment(0)
D
1

SOLUTION

Just hold on a while after uploading your app on play store because google takes some time to update app versions.It will work !

Dicker answered 4/6, 2018 at 9:46 Comment(1)
It was hard, but indeed. Waiting for 8 hours fixed it.Mcmahan
M
1

If you wanted to integrate with another app that is not published but has the same id, version code, and version name of deployed one so don't forget to edit appname.iml file version in flutter app because I stuck on to it with the same error.

Magnetoelectricity answered 17/8, 2021 at 12:2 Comment(0)
E
0

my problem was that i tried to check it with the debug.keystore , i mean running it through eclipse.I exported it with the keystore with which i published in alpha mode(it must be published before you can test it).installed it in my phone and than i could test it normally.

Extracellular answered 28/9, 2014 at 10:4 Comment(0)
E
0

The problem also occurs, when you have added an in-app purchase after you uploaded the apk, but you have not published the application in the play store (alpha, beta and production).

Which basically means, that you have to add the In-App purchase AFTER you have published the apk in the Play store (alpha, beta and production). Otherwise you wont be able to purchase or query for the In-App purchase.

Enschede answered 22/8, 2016 at 13:54 Comment(0)
N
0

I have the same issue when installing on the device directly from the IDE (debug or release mode - doesn't matter).

But when I put the app on the Google Play marketplace, and then installed the app from this marketplace on the same phone (previously uninstalling the "ad hoc" version intalled directly on the device from the IDE), and IAP started working.

But when I debug AFTER installation, I get the signing key mismatch, have to uninstall the app from the phone, then debug works, but IAP doesn't work again... Frustrating, but you have to have installed the app from the marketplace as it turns out.

Nervy answered 22/5, 2023 at 18:5 Comment(2)
Did you find any solution as its hectic to upload the build on closed testing everytime for development ?Exterritorial
The IAP product doesn't work when building the app from the Visual Studio. It works only when I install the app from the google play marketplace.Nervy
F
0

In my case:

  • You cannot buy in-app items for your own app. (try with different Gmail account)
  • That email add to Licence testing (Playconsole > Setup > Licence testing)
  • Also add com.android.vending.BILLING to the manifest and upload app for internal testing or production
Falk answered 7/7, 2023 at 18:3 Comment(0)
B
-1

All answers are valid according to their situation, but my case was different of all. I'm using revenuecat and some configuration was wrong.

  • I didn't enable google playstore developer api for the current project in cloud developer console
  • then make sure you've linked right project with in API access tab. (In my case, I was unable to link my actual project until I enabled playstore developer
  • Provide right permissions to revenuecat email according to documentation and invite user.

It will then take 36 hours to enable revenuecat API for this project.

Bawd answered 5/4, 2023 at 4:59 Comment(0)
K
-2

If all the settings are OK and still you are getting the error This version of the application is not configured for billing through Google Play. Check the help center for more information.

Edit your In-App Products pricing in the Play Store or deactivate and activate the In-App products. This will solve the issue.

Kraut answered 7/12, 2021 at 10:59 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Wellmeaning

© 2022 - 2024 — McMap. All rights reserved.