When selling subscription products from Google Play, must set up google notifications to receive real-time subscription status.
repositories {
google()
mavenCentral()
}
dependencies {
implementation 'com.nhncloud.android:nhncloud-iap-google:1.9.5'
...
}
Google Play in-app purchase functions in Android 5.0 (API level 21) or higher.
repositories {
mavenCentral()
// ONE store V21
maven { url 'https://repo.onestore.co.kr/repository/onestore-sdk-public' }
}
dependencies {
// ONE store V17
implementation 'com.nhncloud.android:nhncloud-iap-onestore:1.9.5'
// ONE store V19
implementation files('libs/iap_sdk-v19.01.00.aar')
implementation 'com.nhncloud.android:nhncloud-iap-onestore-v19:1.9.5'
// ONE store V21
implementation 'com.onestorecorp.sdk:sdk-iap:21.00.01'
implementation 'com.onestorecorp.sdk:sdk-configuration-kr:1.0.0'
implementation 'com.nhncloud.android:nhncloud-iap-onestore-v21:1.9.5'
...
}
ONE store v21 In-app purchase functions in Android (API level 23) 6.0 or higher.
repositories {
mavenCentral()
}
dependencies {
implementation 'com.nhncloud.android:nhncloud-iap-galaxy:1.9.5'
...
}
Galaxy Store in-app purchase works on Android 4.3 (API level 18) or higher.
repositories {
mavenCentral()
}
dependencies {
implementation 'com.nhncloud.android:nhncloud-iap-amazon:1.9.5'
...
}
Add the AppGallery Connection configuration file (agconnect-service.json).
Add the App Gallery Connect plugin to the root level build.gradle as follows.
buildscript {
repositories {
google()
mavenCentral()
// Configure the Maven repository address for the HMS Core SDK.
maven {url 'https://developer.huawei.com/repo/'}
}
dependencies {
...
// Add the AppGallery Connect plugin configuration. You are advised to use the latest plugin version.
classpath 'com.huawei.agconnect:agcp:1.9.0.300'
}
}
apply plugin: 'com.huawei.agconnect'
repositories {
mavenCentral()
maven {url 'https://developer.huawei.com/repo/'}
}
dependencies {
implementation 'com.nhncloud.android:nhncloud-iap-huawei:1.9.5'
...
}
Huawei App Gallery's in-app purchase works on Android 4.4 (API level 19) or higher.
repositories {
mavenCentral()
}
dependencies {
implementation 'com.nhncloud.android:nhncloud-iap-mycard:1.9.5'
...
}
ONE store supports full purchase screen and pop-up purchase screen. You can add metadata to AndroidManifest.xml to select the full purchase screen ("full") or pop-up purchase screen ("popup"). If metadata is not set, the default value ("full") is applied.
<application
...>
<meta-data android:name="iap:view_option" android:value="popup | full"/>
</application>
Purchase Screen | Setting Value |
---|---|
Full Purchase Screen | "full" |
Pop-up Purchase Screen | "popup" |
For more information, see ONE store Purchase Screen Setting.
In Android 11, an app queries other apps that the user installed on the device and changes the way to interact with the apps. To use ONE store, Galaxy Store, or Amazon Appstore purchase in apps targeting Android 11 or higher, you need to define a 'queries' element or permission in AndroidManifest.xml as shown below.
<queries>
<intent>
<action android:name="com.onestore.ipc.iap.IapService.ACTION" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="onestore" />
</intent>
</queries>
<queries>
<package android:name="com.sec.android.app.samsungapps" />
</queries>
For Amazon Appstore, add a permission instead of the 'queries' element.
<uses-permission
android:name="android.permission.QUERY_ALL_PACKAGES"
tools:ignore="QueryAllPackagesPermission" />
The 'queries' element works in Android Gradle Plugin 4.1 or higher. To use a lower version of Android Gradle Plugin, see Preparing your Gradle build for package visibility in Android 11.
Caution!) Be careful not to apply the QUERY_ALL_PACKAGES permission to the Google Play Store.
Add android:name as follows if it is not defined.
<application
android:name="com.nhncloud.android.iap.mycard.NhnCloudMyCardApplication"
...>
...
</application>
When the android:name is defined, inherits the NhnCloudMyCardApplication class instead of the Application class.
<application
android:name=".MyApplication"
...>
...
</application>
class MyApplication extends NhnCloudMyCardApplication {
...
}
Add 'test_mode' to perform payment test. If 'test_mode' is not set, the default value is false.
<application
...>
<meta-data android:name="iap:test_mode" android:value="true | false"/>
</application>
Store | Code |
---|---|
Google Play Store | "GG" |
ONE store | "ONESTORE" |
Galaxy store | "GALAXY" |
Amazon Appstore | "AMAZON" |
Huawei App Gallery | "HUAWEI" |
MyCard | "MYCARD" |
[Note] Store codes are defined in the IapStoreCode class.
Product Name | Product Type | Description |
---|---|---|
Consumable products | "CONSUMABLE" | Examples of Consumable Products: consumable one-time products, in-game goods, and media files. |
Subscription products | "AUTO_RENEWABLE" | Examples of Subscription products: products that are automatically purchased at specific interval and price, and online magazines and music streaming services. |
Consumable subscription products | "CONSUMABLE_AUTO_RENEWABLE" | A subscription product that can be consumed This is a payment method that provides in-game goods and items periodically. |
[Note] Subscription products and consumable subscription products are supported by Google Play Store only.
NhnCloudIapConfiguration configuration =
NhnCloudIapConfiguration.newBuilder(getApplicationContext())
.setAppKey(YOUR_APP_KEY)
.setStoreCode(IapStoreCode.GOOGLE_PLAY_STORE)
.build();
/* NhnCloudIap.java */
public static void initialize(NhnCloudIapConfiguration configuration)
Parameters | |
---|---|
configuration | NhnCloudIapConfiguration: Information for IAP setting |
[Note] Initialization must be performed in Application#onCreate.
public class MainApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
initializeNhnCloudIap();
}
/**
* Initialize NhnCloudIap.
*/
private void initializeNhnCloudIap() {
NhnCloudIapConfiguration configuration = NhnCloudIapConfiguration.newBuilder(getApplicationContext())
.setAppKey(YOUR_APP_KEY)
.setStoreCode(IapStoreCode.GOOGLE_PLAY_STORE)
.build();
NhnCloudIap.initialize(configuration);
}
}
// Login.
NhnCloudSdk.setUserId(userId);
// Logout.
NhnCloudSdk.setUserId(null);
[Note] When the service is logged out, user ID must be set to null. Otherwise, promotion codes might be redeemed or purchase with wrong user ID might occur in purchase reprocessing operation.
Note: Purchases update listener must be registered in Activity.onCreate() and unregistered in Activity.onDestroy().
/* NhnCloudIap.java */
public static void registerPurchasesUpdatedListener(IapService.PurchasesUpdatedListener listener)
public static void unregisterPurchasesUpdatedListener(IapService.PurchasesUpdatedListener listener)
Method | Parameters | Description | |
---|---|---|---|
registerPurchasesUpdatedListener | listener | IapService. PurchasesUpdatedListener: Listener for update on purchases |
Registers purchases update listener. |
unregisterPurchasesUpdatedListener | listener | IapService. PurchasesUpdatedListener: Listener to unregister |
Unregisters purchases update listener. |
public class MainActivity extends AppCompatActivity {
/**
* Notifies the result of purchasing consumable products, subscription products, or promotion products in the app.
*/
private IapService.PurchasesUpdatedListener mPurchaseUpdatedListener =
new IapService.PurchasesUpdatedListener() {
@Override
public void onPurchasesUpdated(@NonNull List<IapPurchaseResult> purchaseResults) {
for (IapPurchaseResult purchaseResult : purchaseResults) {
if (purchaseResult.isSuccess()) {
// Succeeded
IapPurchase purchase = purchaseResult.getPurchase();
} else {
// Failed
}
}
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Register the listener when onCreate is called.
NhnCloudIap.registerPurchasesUpdatedListener(mPurchaseUpdatedListener);
}
@Override
protected void onDestroy() {
super.onDestroy();
// Must remove the listener when onDestroy() is called.
NhnCloudIap.unregisterPurchasesUpdatedListener(mPurchaseUpdatedListener);
}
}
[Note] If the activity is terminated before the purchase result is notified to IapService.PurchasesUpdatedListener, the purchase data can be lost. To process the purchase safely, users must be restricted from terminating the activity (clicking Back or Quit button) until they get the purchase result.
/* NhnCloudIap.java */
public static void queryProductDetails(Activity activity,
IapService.ProductDetailsResponseListener listener)
Method | Parameters | |
---|---|---|
queryProductDetails | activity | Activity: Currently active activity |
listener | IapService. ProductDetailsResponseListener: Listener for product query result |
/**
* Query the products available for purchase.
* <p>
* productDetails: List of products available for purchase
* invalidProducts: Products registered in NHN Cloud IAP console but not in a store
*/
void queryProductDetails() {
IapService.ProductDetailsResponseListener responseListener =
new IapService.ProductDetailsResponseListener() {
@Override
public void onProductDetailsResponse(@NonNull IapResult result,
@Nullable List<IapProductDetails> productDetails,
@Nullable List<IapProduct> invalidProducts) {
if (result.isSuccess()) {
// Query Succeeded
} else {
// Query Failed
}
}
}
NhnCloudIap.queryProductDetails(MainActivity.this, responseListener);
}
/* NhnCloudIap.java */
public static void launchPurchaseFlow(Activity activity,
IapPurchaseFlowParams params)
Method | Parameters | |
---|---|---|
launchPurchaseFlow | activity | Activity: Currently active activity |
params | IapPurchaseFlowParams: Parameter for purchase information |
/**
* Purchase a product.
*/
void launchPurchaseFlow(Activity activity, String productId) {
IapPurchaseFlowParams params = IapPurchaseFlowParams.newBuilder()
.setProductId(productId)
.build();
NhnCloudIap.launchPurchaseFlow(activity, params);
}
String userData = "User Data"
IapPurchaseFlowParams params = IapPurchaseFlowParams.newBuilder()
.setProductId(productId)
.setDeveloperPayload(userData)
.build();
NhnCloudIap.launchPurchaseFlow(activity, params);
If a user purchased a product with a promotion code from the Google Play Store, the user data cannot be used.
/* NhnCloudIap.java */
public static void queryConsumablePurchases(Activity activity,
IapQueryPurchasesParams params,
IapService.PurchasesResponseListener listener)
Method | Parameters | |
---|---|---|
queryConsumablePurchases | activity | Activity: Currently active activity |
params | IapQueryPurchasesParams: Parameter for unconsumed purchase query | |
listener | IapService.PurchasesResponseListener: Listener for query result of unconsumed purchase details |
/**
* Query the list of unconsumed purchases.
*/
void queryConsumablePurchases(boolean isQueryAllStores) {
IapQueryPurchasesParams params = IapQueryPurchasesParams.newBuilder()
.setQueryAllStores(isQueryAllStores) // Query all stores: true, Query the current store: false
.build();
PurchasesResponseListener responseListenr =
new IapService.PurchasesResponseListener() {
@Override
public void onPurchasesResponse(@NonNull IapResult result,
@Nullable List<IapPurchase> purchases) {
if (result.isSuccess()) {
// Succeeded
} else {
// Failed
}
}
};
NhnCloudIap.queryConsumablePurchases(MainActivity.this, params, responseListenr);
}
Subscription products are currently supported by Google Play Store only.
/* NhnCloudIap.java */
public static void queryActivatedPurchases(Activity activity,
IapQueryPurchasesParams params,
PurchasesResponseListener listener)
Method | Parameters | |
---|---|---|
queryActivatedPurchases | activity | Activity: Currently active activity |
params | IapQueryPurchasesParams: Parameter for activated subscription query | |
listener | IapService.PurchasesResponseListener: Listener for query result of activated subscription |
/**
* Query activated subscription products
*/
void queryActivatedPurchases(boolean isQueryAllStores) {
IapQueryPurchasesParams params = IapQueryPurchasesParams.newBuilder()
.setQueryAllStores(isQueryAllStores) // Query all stores: true, Query the current store: false
.build();
PurchasesResponseListener responseListener =
new IapService.PurchasesResponseListener() {
@Override
public void onPurchasesResponse(@NonNull IapResult result,
@Nullable List<IapPurchase> purchases) {
if (result.isSuccess()) {
// Succeeded
} else {
// Failed
}
}
};
NhnCloudIap.queryActivatedPurchases(MainActivity.this, params, responseListener);
}
Subscription products are currently supported by Google Play Store only.
/* NhnCloudIap.java */
public static void querySubscriptionsStatus(Activity activity,
boolean includeExpiredSubscriptions,
IapService.SubscriptionsStatusResponseListener listener)
Method | Parameters | |
---|---|---|
querySubscriptionsStatus | activity | Activity: Currently active activity |
includeExpiredSubscriptions | boolean: whether or not to include the status of expired subscription products |
|
listener | IapService.SubscriptionsStatusResponseListener: Listener for query result of subscription status |
/**
* Subscription Status Query
*/
private void querySubscriptionsStatus() {
SubscriptionsStatusResponseListener listener =
new SubscriptionsStatusResponseListener() {
@Override
public void onSubscriptionsStatusResponse(@NonNull String storeCode,
@Nullable List<IapSubscriptionStatus> subscriptionsStatus) {
if (result.isSuccess()) {
// Succeeded
} else {
// Failed
}
}
};
NhnCloudIap.querySubscriptionsStatus(MainActivity.this, false, listener);
}
This section explains how to handle subscription lifecycle events in Google Store, such as renewals and expirations. For further details, refer to Add Features For Each Subscription.
Subscriptions on the Google Store go through various status changes throughout their lifecycle and an app must respond to each status.
Status | Query unconsumed purchases (NhnCloudIap.queryConsumablePurchases) |
Query activated subscriptions (NhnCloudIap.queryActivatedPurchases) |
Expiry time | Auto-renewal |
---|---|---|---|---|
Active | Yes | Yes | Future time | Yes |
Cancelled | Yes | Yes | Future time | No |
In grace period | No | Yes | Future time | Yes |
On hold | No | No | Past time | Yes |
Pause | No | No | Past time | Yes |
Expired | No | No | Past time | No |
If grace period is enabled, subscriptions transition to grace period if there are issues in the payment method at the end of a billing cycle. During grace period, the user should be able to access subscription content. For further details, refer to Grace period.
Warning!) If a user recovers subscription by fixing the payment method, etc. during the grace period, auto-renewal is resumed. NHN Cloud IAP notifies of the payment results regarding the renewed purchase through the purchase update listener (IapService.PurchaseUpdatedListener). The game or app must make sure that an unnecessary pop-up isn't exposed to the user by the purchase update listener during an important action.
Account hold refers to a user's state when renewal failed due to a payment method issue. If payment fails, more attempts will be made during grace period. If payment fails even during the grace period, the subscription is placed on hold. Users placed on hold cannot access subscription content. Account hold period is up to 30 days. If the payment method is not fixed before the account hold period ends, the subscription will be cancelled. For further details, refer to Account hold.
Warning!) If a user recovers subscription by fixing the payment method, etc. during the account hold period, auto-renewal is resumed. NHN Cloud IAP notifies of the payment results regarding the renewed purchase through the purchase update listener (IapService.PurchaseUpdatedListener). The game or app must make sure that an unnecessary pop-up isn't exposed to the user by the purchase update listener during an important action.
Setting the pause feature allows the user to pause the subscription for a time period from 1 week to 3 months. The pause of subscription will take effect after the current subscription period ends. When the pause period ends, subscription will automatically resume. For further details, refer to Pause.
Warning!) When the pause period is over, auto-renewal is resumed. NHN Cloud IAP notifies of the payment results regarding the renewed purchase through the purchase update listener (IapService.PurchaseUpdatedListener). The game or app must make sure that an unnecessary pop-up isn't exposed to the user by the purchase update listener during an important action.
Setting the resubscription feature will allow the user to reapply for subscription that has been cancelled within 12 months of the expiry of the subscription. Resubscription will create a new subscription and purchase token. After a subscription has expired, the user can use the Google Play Subscription Center to repurchase the same product for up to 1 year after expiry. For further details, refer to Resubscribe.
Warning!) User data (IapPurchase.getDeveloperPayload()) cannot be used because purchases are not carried out in an in-app or game screen. Warning!) If resubscription was used to purchase a subscription product from the Google Play Store, the NHN Cloud IAP notifies of the payment results regarding the purchase through the purchase update listener (IapService.PurchaseUpdatedListener). The game or app must make sure that an unnecessary pop-up isn't exposed to the user by the purchase update listener during an important action.
IAP configuration information which is used as a parameter for the NHN Cloud IAP initialization method.
/* NhnCloudIapConfiguration.java */
public String getAppKey();
public String getStoreCode();
Method | Returns | |
---|---|---|
getAppKey | String | IAP service Appkey |
getStoreCode | String | Store code information ("GG" or "ONESTORE", "GALAXY", ...) |
Accepts IAP service Appkey and store type as inputs and creates an NhnCloudIapConfiguration object.
/* NhnCloudIapConfiguration.java */
public void setAppKey(String appKey)
public void setStoreCode(String storeCode)
Method | Parameters | Description | |
---|---|---|---|
setAppKey | appKey | String: IAP service Appkey | Set Appkey created in TOAST IAP console. |
setStoreCode | storeCode | String: Store code information | Set store code. ("GG" or "ONESTORE", "GALAXY", ...) |
/* IapStoreCode.java */
String GOOGLE_PLAY_STORE
String ONE_STORE
String GALAXY_STORE
String AMAZON_APP_STORE
String HUAWEI_APP_GALLERY
String MYCARD
/* IapPurchaseResult.java */
public IapPurchase getPurchase()
public boolean isSuccess()
public boolean isFailure()
public int getCode()
public String getMessage()
public Throwable getCause()
Method | Returns | |
---|---|---|
getPurchase | IapPurchase | Returns the IaPPurchase object that contains purchase information. |
getCode | int | Returns a purchase result code. |
getMessage | String | Returns a purchase result message. |
getCause | Throwable | Returns cause of failed purchase. |
isSuccess | boolean | Returns whether the purchase succeeded. |
isFailure | boolean | Returns whether the purchase failed. |
/* IapResult.java */
public boolean isSuccess()
public boolean isFailure()
public int getCode()
public String getMessage()
public Throwable getCause()
Method | Returns | |
---|---|---|
getCode | int | Returns a result code. |
getMessage | String | Returns a result message. |
getCause | Throwable | Returns cause of failure. |
isSuccess | boolean | Returns whether it succeeded. |
isFailure | boolean | Returns whether it failed. |
/* IapPurchase.java */
public String getPaymentId()
public String getOriginalPaymentId()
public String getPaymentSequence()
public String getProductId()
public String getProductType()
public String getUserId()
public float getPrice()
public String getPriceCurrencyCode()
public String getAccessToken()
public String getPurchaseType()
public String getPurchaseTime()
public String getExpiryTime()
public String getDeveloperPayload()
Method | Returns | |
---|---|---|
getPaymentId | String | Returns payment ID. |
getOriginalPaymentId | String | Returns original payment ID. |
getPaymentSequence | String | Returns payment sequence number. |
getProductId | String | Returns product ID. |
getProductType | String | Returns product type. |
getUserId | String | Returns user ID. |
getPrice | float | Returns price information. |
getPriceCurrencyCode | String | Returns currency information. |
getAccessToken | String | Returns token used for consumption. |
getPurchaseType | String | Returns product purchase type. |
getPurchaseTime | long | Returns product purchase time. |
getExpiryTime | long | Returns remaining time of subscription product. |
getDeveloperPayload | String | Returns user data. |
/* IapProductDetails.java */
public String getProductId()
public String getProductSequence()
public float getPrice()
public String getLocalizedPrice()
public String getPriceCurrencyCode()
public long getPriceAmountMicros()
public String getFreeTrialPeriod()
public String getSubscriptionPeriod()
public String getProductType()
public String getProductTitle()
public String getProductDescription()
public boolean isActivated()
Method | Returns | |
---|---|---|
getProductId | String | Product ID |
getProductSequence | String | Product sequence number |
getPrice | float | Price |
getLocalizedPrice | String | Local price |
getPriceCurrencyCode | String | Currency |
getPriceAmountMicros | long | Price by 1,000,000 unit |
getFreeTrialPeriod | String | Free trial period |
getSubscriptionPeriod | String | Subscription period |
getProductType | String | Product type |
getProductTitle | String | Product title |
getProductDescription | String | Product description |
isActivated | boolean | Whether the product is activated |
/* IapProduct.java */
public String getProductId()
public String getProductSequence()
public String getProductType()
public String getProductTitle()
public String getProductDescription()
public boolean isActivated()
Method | Returns | |
---|---|---|
getProductId | String | Product ID |
getProductSequence | String | Product sequence number |
getProductType | String | Product type |
getProductTitle | String | Product title |
getProductDescription | String | Product description |
isActivated | boolean | Whether the product is activated |
/* IapPurchaseFlowParams.java */
public String getProductId()
Method | Returns | |
---|---|---|
getProductId | String | Product ID |
/* IapPurchaseFlowParams.java */
public void setProductId(String productId)
Method | Parameters | Description | |
---|---|---|---|
setProductId | productId | String: Product ID | Set the Product ID. |
/* IapQueryPurchasesParams.java */
public String isQueryAllStores()
Method | Returns | |
---|---|---|
isQueryAllStores | boolean | Query all stores |
/* IapQueryPurchasesParams.java */
public void setQueryAllStores(boolean isQueryAllStores)
Method | Parameters | Description | |
---|---|---|---|
setQueryAllStores | isQueryAllStores | boolean: Query all stores | Set the query scope. |
/* IapSubscriptionStatus.java */
public String getStoreCode()
public String getPaymentId()
public String getOriginalPaymentId()
public String getPaymentSequence()
public String getProductId()
public String getProductType()
public String getProductSequence()
public String getUserId()
public float getPrice()
public String getPriceCurrencyCode()
public String getAccessToken()
public String getPurchaseType()
public String getPurchaseTime()
public String getExpiryTime()
public String getDeveloperPayload()
public int getStatusCode()
public String getStatusDescription()
Method | Returns | |
---|---|---|
getStoreCode | String | Returns store code. |
getPaymentId | String | Returns payment ID. |
getOriginalPaymentId | String | Returns original payment ID. |
getPaymentSequence | String | Returns payment sequence number. |
getProductId | String | Returns product ID. |
getProductType | String | Returns product type. |
getProductSeq | String | Returns payment sequence number. |
getUserId | String | Returns user ID. |
getPrice | float | Returns price information. |
getPriceCurrencyCode | String | Returns currency information. |
getAccessToken | String | Returns token used for consumption. |
getPurchaseType | String | Returns purchase type. "Test" or "Promo" or null |
getPurchaseTime | long | Returns product purchase time. |
getExpiryTime | long | Returns remaining time of subscription product. |
getDeveloperPayload | String | Returns user data. |
getStatusCode | int | Returns subscription status code. |
getStatusDescription | String | Returns description for subscription status code. |
/* IapSubscriptionStatus.java */
int ACTIVE
int CANCELED
int ON_HOLD
int IN_GRACE_PERIOD
int PAUSED
int REVOKED
int EXPIRED
int UNKNOWN
Name | Code | Status | Description |
---|---|---|---|
ACTIVE | 0 | Active | Subscription is active. |
CANCELED | 3 | Canceled | Subscription has been canceled. |
ON_HOLD | 5 | Account hold | Subscription was put on hold (if enabled). |
IN_GRACE_PERIOD | 6 | Grace period | Subscription entered grace period (if enabled). |
PAUSED | 10 | Paused | Subscription was paused. |
REVOKED | 12 | Revoked | Subscription was canceled by the user before expiry time. |
EXPIRED | 13 | Expired | Subscription has expired. |
UNKNOWN | 9999 | Undefined | Undefined status. |
void onPurchasesUpdated(List<IapPurchaseResult> purchaseResults)
void onPurchasesResponse(IapResult result,
List<IapPurchase> purchaseList)
void onSubscriptionsStatusResponse(IapResult result,
List<IapSubscriptionStatus> subscriptionsStatus);
RESULT | CODE | DESC |
---|---|---|
FEATURE_NOT_SUPPORTED | -2 | Requested feature is not supported. |
SERVICE_DISCONNECTED | -1 | Store service is not connected. |
OK | 0 | Success. |
USER_CANCELED | 1 | User canceled. |
SERVICE_UNAVAILABLE | 2 | Network connection is down. |
BILLING_UNAVAILABLE | 3 | API version is not supported for the requested type. |
PRODUCT_UNAVAILABLE | 4 | Requested product is not available. |
DEVELOPER_ERROR | 5 | Invalid argument provided for API, which is a common error in development phase. |
ERROR | 6 | Fatal error occurred during API action. |
PRODUCT_ALREADY_OWNED | 7 | Failed to purchase an item as it is already owned. |
PRODUCT_NOT_OWNED | 8 | Cannot consume an item as it is not owned. |
USER_ID_NOT_REGISTERED | 9 | User ID is not registered. |
NETWORK_ERROR | 12 | A network error occurred during the operation. |
UNDEFINED_ERROR | 9999 | Undefined error. |
RESULT | CODE | DESC |
---|---|---|
INACTIVATED_APP | 101 | App is not activated. |
VERIFY_PURCHASE_FAILED | 103 | Failed to verify purchase. |
PURCHASE_ALREADY_CONSUMED | 104 | Purchase is already consumed. |
PURCHASE_ALREADY_REFUNDED | 105 | Purchase is already refunded. |
PURCHASE_LIMIT_EXCEEDED | 106 | Purchase limit was exceeded. |
RESULT | CODE | DESC |
---|---|---|
ONESTORE_NEED_LOGIN | 301 | ONE store service is not logged in. |
ONESTORE_NEED_UPDATE | 302 | ONE store service is not updated or installed. |
ONESTORE_SECURITY_ERROR | 303 | Purchase requested from an abnormal app. |
ONESTORE_PURCHASE_FAILED | 304 | Purchase request failed. |
RESULT | CODE | DESC |
---|---|---|
GALAXY_NOT_LOGGED_IN | 501 | Galaxy service is not logged in. |
GALAXY_NOT_UPDATED | 502 | Galaxy service is not updated or installed. |
GALAXY_PURCHASE_FAILED | 503 | Purchase requested from an abnormal app. |
GALAXY_SERVICE_DENIED | 504 | Purchase request failed. |