30

I am using InApp V3 code for in-app purchases in my application , i am getting this error BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE and error value :3 when Google account is not available in device. I want to know is there any other possibilities to get this error, because when i get this error i need show a popup to the user with some data. If this is causing because of Google account not available on device i will show the dialog with related text. this is the code i am using

mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() {
    public void onIabSetupFinished(IabResult result) {              
        if (!result.isSuccess()) {
                // error here               
            return;
        }
    }
});

this is the error Error checking for billing v3 support. (response: 3:Billing Unavailable)

2
  • Why did you accept the answer from Carlos Robles while it does not answer the question? Feb 26, 2016 at 14:42
  • I'm having this error when there isn't any account registered in the device, did you find a way to prompt the user to log in with her Google account?
    – rraallvv
    Feb 21, 2017 at 16:40

8 Answers 8

39
+50

As we can see directly in the code of the setup of the IabHElper of the sample provided by Google, the error means:

"Billing service unavailable on device."

As you can read here that error means

Billing API version is not supported for the type requested

This is the In-app Billing Reference (IAB Version 3), so the error means that the IAB v3 is not installed on the device.

Actually this means that the user has a Google account, and probably also an in-app billing service, but it doesn't have the last version. This happens in old devices, and where the user never updates anything. It used to be devices where you can see the old Market app instead of the Play app.

So the error you have to show to the user, and the test that you have to perform is not if the device has a Google account, but if it has the Google Play services installed and properly updated.

If you look for the code in all the library SDK, and the helper classes provided by google, the only place where we can find that exactly in the function that you are calling: the startSetup of the IabHelper class

Intent serviceIntent = new Intent(
                "com.android.vending.billing.InAppBillingService.BIND");
        if (!mContext.getPackageManager().queryIntentServices(serviceIntent, 0)
                .isEmpty()) {
            // service available to handle that Intent
            mContext.bindService(serviceIntent, mServiceConn,
                    Context.BIND_AUTO_CREATE);
        } else {
            // no service available to handle that Intent
            mServiceConn=null;
            if (listener != null) {
                listener.onIabSetupFinished(new IabResult(
                        BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE,
                        "Billing service unavailable on device."));
            }
        }

This means that the app couldn't connect to the service in the device, since the package manager doesn't even know it. That's the only option that can trigger that error. And what does it mean that it couldn't connect to the service? It means one of these:

  • The device doesn't have the service installed.
  • It has an old version, since we know that the latest versions of play store, uses the IAB v3.

So, your error only can mean one of these, that for you means that you have to show a message to the user like "You don't have Google Play services installed, or you have to update it". And there are no other possibilities for getting that error.

But, if you want to make it easier for the users, you can say the they need to update the Google Play App to the last version. And that will make everything work like a charm.

19
  • Can i depends on this error to show popup as "user need to add google account in device" Jan 22, 2014 at 5:42
  • you could, but the proper message should be that the device needs the google account, and download the last version of google play services. Jan 22, 2014 at 5:43
  • 2
    is there any other possibilities to get this error other than this Jan 22, 2014 at 5:46
  • 1
    What you mean of it "error means that the IAB v3 is not installed on the device.". How user can install it?
    – N Sharma
    Jan 22, 2014 at 5:48
  • 6
    This answer is wrong. Error 3 can occur if there is no google user logged in on the device.
    – shoosh
    Dec 23, 2015 at 12:12
18

This error is also received after the user removes their google account from the device.

2
  • I do remove a google account and change another google account. then i reboot the device, It's still show this error, how can i do?
    – H3c
    Feb 11, 2018 at 3:17
  • I'm getting iabv3: Failed to retrieve info for X products, X I added an android account in my emulator and the error went away.
    – Marlon
    Feb 18, 2019 at 6:50
9

Sign in to the Play Store with any account.

After signing in billing works even on Android Studio Emulator.

7

Majorly possibility of your issue BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE is that In some countries still In App Purchase is not allowed like Serbia and many countries.

So Any user from the country where Google Play does not support In App Purchase then You will get BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE.

This would be less chance that user do not have updated Google Play Service installed on the phone so do not worry about this case.

3
  • Currently i am getting this if user does't have google account in the device Jan 22, 2014 at 7:03
  • Yeah This would be case also but mostly user will have configured account. Because Then it is possible they can download your app from the Google Play but majorly is IAB not supported in some countries
    – N Sharma
    Jan 22, 2014 at 7:06
  • @Williams, do you have any sources were we can check that indeed the error returned in this cases is this one? that error at any range means that the package manager doesn't know that service, so it has to be installed. If the user cannot install it and the reason is that in that country the user cannot install it, that should be a further message from the device or whoever. Jan 22, 2014 at 7:09
2

Try this hacks

Remove the cache, data and updates for the play app, restarted the play app again it should work! or try with latest updates (if it is fixed)

FYI:

Just keep in mind:

  • IABv3 is built into Google Play services, so it requires an update to the Play Services apk.

  • V2 was built into the Play store client itself. The cache/EULA issue isn't specifically related to IAB, it's related to setting up Play Services (and hopefully is unnecessary for most users, the cache part anyway).

  • It's a bummer to be in this transition period where Play Services has to be updated before your app can take advantage of it, but I think most people would agree that it's better than waiting for an OS upgrade.'

See this ref: bug report, G+ post

2
  • Your answer not related to what i asked here.. i want what are the possibilities to get this error event.. Jan 22, 2014 at 3:19
  • Clearing the cache of play store works for me. I saw the same answer in another thread
    – douyw
    May 30, 2016 at 10:55
2

For anyone still facing this problem, in most cases iab isn't supported in your country like Williams said. You can use a VPN to make it work.

1

Sometime if you haven't authenticated your device with Google account, may receive this error.

1
  • How to authenticated device?
    – H3c
    Feb 11, 2018 at 3:12
0

If you're located in Tonga(as me) or any other country where you're unable to buy apps in Google Play you must use a VPN to test billing. Otherwise you will get this error.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.