目录

Parameter

Mandatory (M)/Optional (O)

Type

Description

applicationId

M

long

ID of an app that initiates a purchase.

autoRenewing

M

boolean

Indicates whether the subscription is   automatically renewed.

Currently, the value is fixed to false.

orderId

M

String

Order ID on the Huawei payment server,   which uniquely identifies a transaction and is generated by the Huawei   payment server during payment.

packageName

M

String

Software package name of the app that   initiates a purchase.

productId

M

String

In-app product ID.

purchaseTime

M

Int

Timestamp of the purchase time, which is the   number of milliseconds between 00:00:00 on January 1, 1970 and the purchase   time.

purchaseState

M

Int

Order status.

l    -1: initialized and invisible

l    0: purchased

l    1: canceled

l    2: refunded

developerPayload

O

String

Reserved information on the merchant side,   which is passed by the app during payment.

purchaseToken

M

String

Purchase token, which uniquely identifies   the mapping between an in-app product and a user. It is generated by the   Huawei payment server when the payment is complete.

developerChallenge

O

String(0,64)

Challenge defined when the app initiates   a consumption request, which uniquely identifies a consumption request.

consumptionState

M

Int

Consumption status.

l    0: not consumed

l    1: consumed

acknowledged

O

Int

Receiving status.

l    0: not received

l    1: received

This parameter is valid only for   receiving APIs.

This parameter has a fixed value of 0. You can ignore this parameter.

currency

M

String

Currency. The value must be a currency   defined in the ISO 4217 standard. Example: USD, CNY, and MYR

price

M

Int

Value after the actual price of an in-app   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 in-app   product price is 5.01.

country

M

String

Country or region code of a user service   area. The value must comply with the ISO 3166   standard. Example: US, CN, and MY

responseCode

M

String

Response code.

l    0: The execution is successful.

responseMessage

O

String

Response information.