This version of the application is not configured for billing through Google Play
This error may be caused by several reasons.
Here is the list of requirements for the Google IAB testing.
Prerequisites:
- AndroidManifest must include "com.android.vending.BILLING" permission.
- APK is built in release mode.
- APK is signed with the release certificate(s). (Important: with "App Signing by Google Play" it only works if you download directly from GooglePlayStore!)
- APK is uploaded to alpha/beta distribution channel (previously - as a draft) to the developer console at least once. (takes some time ~2h-24h).
- IAB products are published and their status set to active.
- Test account(s) is added in developer console.
Testing requirements:
- Test APK has the same versionCode as the one uploaded to developer console.
- Test APK is signed with the same certificate(s) as the one uploaded to dev.console.
- Test account (not developer) - is the main account on the device. (Main account might be not necessary - according to @MinosL comment)
- 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://stackoverflow.com/a/15754187/1321401 (Thnx @dipp for the link)
P.P.S: Wanted to make this list for a long time already.
Thnx @zlgdev, @Kyone, @MinosL for updates
Ahh found the solution after trying for a couple of hours.
- 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.
- Export and sign APK. Unsigned APK trying to make purchases will get error.
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"
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'.
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.