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:

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

  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.

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"