目录

Returning the Refund Review Result

Function

Returns the refund review result to the IAP server.

Scenario

After a user requests a refund, the IAP server will send a refund review notification to your app server. After processing the refund based on the review information, your app server calls this API to inform the IAP server of the refund review result.

Prototype

Request Parameters

[h2]Request Header

Parameter Mandatory Type Description
Content-Type Yes String Content type. The value is application/json;charset=UTF-8.
Authorization Yes String Authentication information. JWT is used for authentication. For details, please refer to Authorization Description.

[h2]Request Body

Parameter Mandatory Type Description
reviewType Yes Integer

Review result.

1: approved.

2: rejected.

refundBatchNo Yes String Refund work order number or batch number.
remark No String Review result remarks. When the value of reviewType is 2, the rejection reason needs to be returned.
notifyTime Yes Long Notification time, which is a UTC timestamp in milliseconds, representing the number of milliseconds elapsed since January 1, 1970, 00:00 UTC.
applicationId Yes String App ID.
totalRefundAmount No Long Total refund amount approved, in fen (RMB). This parameter is mandatory when reviewType is set to 1.
currency No String

Currency. This parameter is mandatory when reviewType is set to 1.

CNY: RMB

reviewResultList Yes ReviewResult Order refund details. When you approve a multi-order refund request, the refund amount for each order must be clearly returned. If the refund request of any order is denied, the refund amount for that order should be returned as 0.

[h2]ReviewResult

Parameter Mandatory Type Description
purchaseOrderId Yes String Order ID, transmitted transparently as provided in the system notification. The value contains a maximum of 256 characters.
payMoney Yes Long Actual payment amount of an order, in fen (RMB).
refundMoney Yes Long Refund amount approved, in fen (RMB).
consumptionStatus No Integer

Entitlement usage status.

1: not used.

2: partially used.

3: fully used.

ratio No Integer

Entitlement usage ratio, which is in percentage. The value ranges from 0 to 100.

- When consumptionStatus is set to 1, ratio must be 0.

- When consumptionStatus is set to 2, ratio cannot be 0 or 100.

- When consumptionStatus is set to 3, ratio must be 100.

playTime No Integer

Entitlement usage duration.

0: unknown

1: 0 to 5 minutes

2: 5 to 60 minutes

3: 1 to 6 hours

4: 6 to 24 hours

5: 1 to 4 days

6: 4 to 16 days

7: more than 16 days

Request Example

POST /post-sales/harmony/v1/transactions/refund/result
Content-Type: application/json;charset=UTF-8
Authorization: Bearer ***.***.***
Accept: application/json
{
  "refundBatchNo": "***",
  "reviewType": 1,
  "notifyTime": 1741085489609,
  "applicationId": "***",
  "totalRefundAmount": 1290,
  "currency": "CNY",
  "reviewResultList": [
    {
      "purchaseOrderId": "***",
      "payMoney": 1290,
      "refundMoney": 1290
    }
  ]
}

Response Parameters

[h2]Response Header

Parameter Mandatory Type Description
Content-Type Yes String Content type. The value is application/json;charset=UTF-8.

[h2]Response Body

Parameter Mandatory Type Description
returnCode Yes String

Response code.

0: Succeeded.

1: Incorrect parameter.

990106: Invalid review type.

990107: The order ID in the review result does not match that in the refund request.

990109: For a refund order that exceeds its processing time, review results cannot be sent through the API.

990110: The refund status is no longer eligible for review.

returnDesc Yes String Response description.
subErrCode No String

If returnCode is not 0, this parameter indicates the specific error reason.

200: Authentication information verification failed.

211: Incorrect JWT format.

Response Example

HTTP/1.2 200 OK
Content-Type: application/json;charset=UTF-8
{
  "returnCode": "0",
  "returnDesc": "success"
}