Parameter | Mandatory (M)/Optional (O) | Type | Description |
applicationId | M | long | App ID. |
autoRenewing | M | Boolean | For consumables or non-consumables,
For subscriptions, the options are as follows:
|
orderId | M | String | Merchant ID, which uniquely identifies a transaction and is generated by the Huawei IAP server during payment. |
kind | M | Integer | Product type. The options are as follows:
|
packageName | O | String | App installation package name. |
productId | M | String | Product ID. Each product must have a unique ID, which is maintained in the PMS or passed to the PMS when the app initiates a purchase. |
productName | O | String | Product name. |
purchaseTime | O | long | Timestamp of the purchase time, which is the number of milliseconds from 00:00:00 on January 1, 1970 to the purchase time. |
purchaseState | M | int | Transaction status. The options are as follows:
|
developerPayload | O | String | Information stored on the merchant side, which is passed by the app when the payment API is called. |
developerChallenge | O | String | Challenge defined when an app initiates a consumption request, which uniquely identifies the consumption request. This parameter exists only for one-off products. |
consumptionState | O | String | Consumption status, which exists only for one-off products. The options are as follows:
|
purchaseToken | M | String | Purchase token, which uniquely identifies the mapping between a product and a user. It is generated by the Huawei IAP server when the payment is complete. |
purchaseType | O | int | Purchase type. The options are as follows:
This parameter is not returned during common purchase. |
currency | O | String | Currency. The value must comply with the ISO 4217 standard. |
price | O | long | Value after the actual price of a product is multiplied by 100. The actual price is accurate to two decimal places. For example, if the value of this parameter is 501, the actual product price is 5.01. |
country | O | String | Country or region code, which is used to identify a country or region. The value must comply with the ISO 3166 standard. |
payType | O | String | Payment method. The options are as follows:
|
payOrderId | O | String | Transaction order ID. |
accountFlag | O | int | Account type. The options are as follows:
|
The following parameters are returned only in the subscription scenario. | |||
lastOrderId | M | String | Order ID generated by the Huawei IAP server during fee deduction for the previous renewal. The parameter value is the same as that of orderId when a subscription is purchased for the first time. |
productGroup | O | String | ID of the subscription group to which a subscription belongs. |
purchaseTime | O | long | Timestamp of the purchase time, which is the number of milliseconds from 00:00:00 on January 1, 1970 to the purchase time. If the purchase is not complete, this parameter is left empty. |
oriPurchaseTime | O | long | Timestamp of the first fee deduction time, which is the number of milliseconds from 00:00:00 on January 1, 1970 to the first successful fee deduction time. |
subscriptionId | O | String | Subscription ID. |
oriSubscriptionId | O | String | Original subscription ID. If this parameter is set to a value, the current subscription is switched from another one. The value can be associated with the subscription about the original subscription. |
quantity | O | int | Purchase quantity. |
daysLasted | O | long | Days of a paid subscription, excluding the free trial period and promotion period. |
numOfPeriods | O | long | Number of successful standard renewal periods (that is, renewal periods without promotion). If the parameter is set to 0 or left empty, no renewal has been performed successfully. |
numOfDiscount | O | long | Number of successful renewal periods with promotion. |
expirationDate | O | long | Timestamp of the subscription expiration time. For an automatic renewal receipt where the fee has been deducted successfully, this parameter indicates the renewal date or expiration date. If the value is a past time for the latest receipt of a subscription, the subscription has expired. |
expirationIntent | O | int | Reason why a subscription expires. The options are as follows:
If there are multiple exceptions, a smaller number indicates a higher priority (1 > 2 > 3...). |
retryFlag | O | int | Indicates whether the system still tries to renew an expired subscription. The options are as follows:
|
introductoryFlag | O | int | Indicates whether a subscription is in the renewal period with promotion. The options are as follows:
|
trialFlag | O | int | Indicates whether a subscription is in the free trial period. The options are as follows:
|
cancelTime | O | long | Timestamp of the subscription revoking time. This parameter has a value when a user: (1) makes a complaint and revokes a subscription through the customer service personnel; (2) performs subscription upgrade or crossgrade that immediately takes effect and revokes the previous receipt of the original subscription. Note: If a receipt is revoked, the purchase is not complete. |
cancelReason | O | int | Cause of subscription cancellation. The options are as follows:
Note: If this parameter is left empty but the cancelTime parameter has a value, the cancellation is caused by an operation such as upgrade. |
appInfo | O | String | App information. This parameter is reserved. |
notifyClosed | O | int | Indicates whether a user has disabled the subscription notification function. The options are as follows:
If the user disables the subscription notification function, no subscription notification will be sent to this user. |
renewStatus | O | int | Renewal status. The options are as follows:
For auto-renewable subscriptions, this parameter is valid for both valid and expired subscriptions. However, it does not represent users' subscription status. Generally, when the value is 0, the app can provide other subscription options for the user, for example, recommending another subscription with a lower level in the same group. The value 0 indicates that a user proactively cancels the subscription. |
priceConsentStatus | O | int | User opinion on the price increase of a product. The options are as follows:
|
renewPrice | O | long | Price used upon the next renewal. It is provided as a reference for users when the priceConsentStatus parameter is returned. |
subIsvalid | O | boolean |
Note: If a user has canceled a subscription, the subIsvalid parameter value is still true until the subscription expires. |
deferFlag | O | int | Indicates whether to postpone a settlement date. 1: yes |
cancelWay | O | int | Subscription cancellation initiator. The options are as follows:
|
cancellationTime | O | long | Subscription cancellation time in UTC. Note: cancelWay and cancellationTime are displayed when a subscription renewal stops (the refund is not involved). |
cancelledSubKeepDays | O | int | Number of days for retaining a subscription relationship after the subscription is canceled. |
resumeTime | O | long | Time when a subscription is resumed. |