Result Code | Value | Description | Solution |
|---|---|---|---|
ORDER_STATE_SUCCESS | 0 | Success. | - |
ORDER_STATE_FAILED | -1 | Common error code upon a failure. | If this error code is returned for a purchase request, you are advised to use the obtainOwnedPurchases API to check whether the user has purchased the product. |
ORDER_STATE_DEFAULT_CODE | 1 | Default error code, which is returned when no payment result is obtained from IAP. | If this error code is returned for a purchase request, you are advised to use the obtainOwnedPurchases API to check whether the user has purchased the product. |
ORDER_STATE_CANCEL | 60000 | The user cancels the payment. | Record the order ID and execute the payment process when the user performs the payment operation again. |
ORDER_STATE_PARAM_ERROR | 60001 | Parameter error (including no parameter). | Check whether request parameters are missing and whether the parameter format is correct. |
ORDER_STATE_IAP_NOT_ACTIVATED | 60002 | The IAP service is not enabled. | To use HUAWEI IAP, you first need to enable the IAP service and also set IAP parameters. |
ORDER_STATE_PRODUCT_INVALID | 60003 | Incorrect product information. | Sign in to AppGallery Connect. Click My apps, select an app, and go to Operate > Products > Product Management. In the product list, check whether the product exists or whether all its mandatory information is available. NOTE: This error may also occur if the country or region of the HUAWEI ID signed in on a device is not supported by IAP. Those supported ones are listed in Supported Countries/Regions. You can sign to AppGallery Connect and check the countries or regions where the product is available. |
ORDER_STATE_CALLS_FREQUENT | 60004 | Too frequent API calls. | Control the API call frequency. |
ORDER_STATE_NET_ERROR | 60005 | Network connection exception. | Display a message to users, asking them to check the network. |
ORDER_STATE_PMS_TYPE_NOT_MATCH | 60006 | The found product type is inconsistent with that defined in the PMS. | Sign in to AppGallery Connect. Click My apps, select an app, and go to Operate > Products > Product Management. In the product list, check the actual product type. |
ORDER_STATE_PRODUCT_COUNTRY_NOT_SUPPORTED | 60007 | The app to which the product belongs is not released in a specified location. | Sign in to AppGallery Connect. Click My apps, select an app, and go to Distribute > Version information > Draft. Under Countries/Regions, check the countries or regions to which the app will be released. |
ORDER_HWID_NOT_LOGIN | 60050 | The HUAWEI ID is not signed in. | Sign in a user with HUAWEI ID. When this error code is returned after you call the isEnvReady API, use the status object of the IapApiException object to open the HUAWEI ID sign-in screen. You can also use other APIs to call the isEnvReady API to instruct users to complete sign-in. |
ORDER_PRODUCT_OWNED | 60051 | A user failed to purchase a product because the user already owns the product. | Use the obtainOwnedPurchases API to check whether the user has purchased the product.
|
ORDER_PRODUCT_NOT_OWNED | 60052 | A user failed to consume a product because the user does not own the product. | Use the obtainOwnedPurchases API to check whether the user has purchased the product. |
ORDER_PRODUCT_CONSUMED | 60053 | The product has been consumed and cannot be consumed again. | Use the obtainOwnedPurchaseRecord API to check whether the product has a consumption record. |
ORDER_ACCOUNT_AREA_NOT_SUPPORTED | 60054 | The country or region of the signed-in HUAWEI ID does not support IAP. | This error code may be returned when the country or region of the signed-in HUAWEI ID is one of Supported Countries/Regions, but there is a service error. In this case, try calling the API again to resolve this issue. |
ORDER_HIGH_RISK_OPERATIONS | 60056 | The user triggers risk control, and the transaction is rejected. | You are advised to use a sandbox environment (which will not cause actual payments), or change the payment method. |
ORDER_STATE_PENDING | 60057 | The order is in pending state. | This result code is returned only when the pending purchase function is used. When the order state changes to purchased, perform product delivery. For details, please refer to Pending Purchase Implementation. |
If you want to check more error codes, go to HMS Core SDK Framework Result Codes.
If the error persists, submit a ticket online. Huawei will get back to you as soon as possible.