Skip to content

Most visited

Recently visited

navigation

BillingClient.BillingResponse

public static abstract @interface BillingClient.BillingResponse
implements Annotation

com.android.billingclient.api.BillingClient.BillingResponse


Possible response codes.

Summary

Constants

int BILLING_UNAVAILABLE

Billing API version is not supported for the type requested

int DEVELOPER_ERROR

Invalid arguments provided to the API.

int ERROR

Fatal error during the API action

int FEATURE_NOT_SUPPORTED

Requested feature is not supported by Play Store on the current device.

int ITEM_ALREADY_OWNED

Failure to purchase since item is already owned

int ITEM_NOT_OWNED

Failure to consume since item is not owned

int ITEM_UNAVAILABLE

Requested product is not available for purchase

int OK

Success

int SERVICE_DISCONNECTED

Play Store service is not connected now - potentially transient state.

int SERVICE_UNAVAILABLE

Network connection is down

int USER_CANCELED

User pressed back or canceled a dialog

Inherited methods

From interface java.lang.annotation.Annotation

Constants

BILLING_UNAVAILABLE

int BILLING_UNAVAILABLE

Billing API version is not supported for the type requested

Constant Value: 3 (0x00000003)

DEVELOPER_ERROR

int DEVELOPER_ERROR

Invalid arguments provided to the API. This error can also indicate that the application was not correctly signed or properly set up for In-app Billing in Google Play, or does not have the necessary permissions in its manifest

Constant Value: 5 (0x00000005)

ERROR

int ERROR

Fatal error during the API action

Constant Value: 6 (0x00000006)

FEATURE_NOT_SUPPORTED

int FEATURE_NOT_SUPPORTED

Requested feature is not supported by Play Store on the current device.

Constant Value: -2 (0xfffffffe)

ITEM_ALREADY_OWNED

int ITEM_ALREADY_OWNED

Failure to purchase since item is already owned

Constant Value: 7 (0x00000007)

ITEM_NOT_OWNED

int ITEM_NOT_OWNED

Failure to consume since item is not owned

Constant Value: 8 (0x00000008)

ITEM_UNAVAILABLE

int ITEM_UNAVAILABLE

Requested product is not available for purchase

Constant Value: 4 (0x00000004)

OK

int OK

Success

Constant Value: 0 (0x00000000)

SERVICE_DISCONNECTED

int SERVICE_DISCONNECTED

Play Store service is not connected now - potentially transient state.

E.g. Play Store could have been updated in the background while your app was still running. So feel free to introduce your retry policy for such use case. It should lead to a call to startConnection(BillingClientStateListener) right after or in some time after you received this code.

Constant Value: -1 (0xffffffff)

SERVICE_UNAVAILABLE

int SERVICE_UNAVAILABLE

Network connection is down

Constant Value: 2 (0x00000002)

USER_CANCELED

int USER_CANCELED

User pressed back or canceled a dialog

Constant Value: 1 (0x00000001)

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)