Queries details about a refund order.
If the value of resultCode is 000000, the refund order is successfully queried, but the refund status needs to be determined based on refundOrderStatus.
Refund status:
REFUND_CHL_PROC: processing
REFUND_SUCCESS: successful
REFUND_FAILED: failed
Protocol: HTTPS GET
Direction: Your server -> Payment Kit server
URL: https://petalpay-developer.cloud.huawei.com.cn/api/v1/aggr/transactions/refunds/orders/{sysRefundOrderNo}
Data format:
Request: Content-Type: application/json; charset=UTF-8
Response: Content-Type: application/json; charset=UTF-8
Request Header
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | The value is application/json; charset=UTF-8. |
| PayMercAuth | Yes | String | The value is a JSON string of PayMercAuth. |
Request Path
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| sysRefundOrderNo | Yes | String | Refund order number in the Huawei Pay system. |
GET /api/v1/aggr/transactions/refunds/orders/{sysRefundOrderNo} HTTP/1.1
Content-Type: application/json;charset=UTF-8
PayMercAuth: {"callerId":"10132120***","traceId":"202305151501075707669","time":1684134067480,"authId":"120291744647139***","headerSign":"p9e6EvvWnVW/Q********************o6Run7iCj1mWYBYJIPB75/UrhP0aBflpW1J8Sf8VUt6orCWk=","bodySign":"haZnDZSsB/ed+BBnXhv5lPKR********************H8JJ+7uNwoEYO3lps="} Response Header
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | The value is application/json; charset=UTF-8. |
Response Body
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| resultCode | Yes | String | Result code. The value 000000 indicates success, and other values indicate failure. |
| resultDesc | Yes | String | Result description. |
| subCode | No | String | Service result code. |
| subDesc | No | String | Service result description. |
| sign | Yes | String | Signature, which is used to perform anti-tamper verification on response packets. |
| sysRefundOrderNo | No | String | Refund order number in the Huawei Pay system. |
| mercRefundOrderNo | No | String | Merchant refund order number. The value contains a maximum of 64 characters. |
| refundOrderStatus | Yes | String | Refund status. - REFUND_CHL_PROC: processing - REFUND_SUCCESS: successful - REFUND_FAILED: failed |
| finishTime | No | String | Refund completion time, in UTC format (yyyy-MM-dd'T'HH:mm:ss.SSSZ). |
| promotionRefundAmount | No | Long | Promotion refund amount, in cents. |
| refundAmount | No | Long | Total refund amount. Refund amount for an order, in cents. The value cannot be greater than the order amount. Note: If promotion coupons are used in a forward transaction, the refund amount includes the coupon amount. Huawei Pay determines the refund proportions of the coupon amount and the amount paid by the buyer based on the business rules. Refund is made according to the proportion by default. If this parameter is left empty, the full amount is refunded by default. |
| payerRefundAmount | No | Long | Amount refunded to the payer, in cents. |
| currency | No | String | Transaction currency. The value contains a maximum of 3 characters. The default value is CNY. Currently, only this currency is supported. |
| payload | No | String | Reserved information. If this parameter is passed in a merchant request, it will be returned as-is. |
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"resultCode": "000000",
"resultDesc": "Success.",
"sign": "MEUCIQCEA/HVCjAFReiy59wGUp0zQ********************IxmlIIv2zaKH3e6YfxkL94=",
"sysRefundOrderNo": "12407030900270084914518***",
"mercRefundOrderNo": "czl0012024070914***",
"refundOrderStatus": "REFUND_SUCCESS",
"finishTime": "2023-05-15T14:42:09.000+0800",
"promotionRefundAmount": 0,
"refundAmount": 2,
"payerRefundAmount": 2,
"currency": "CNY",
"payload": "example-payload"
} For error codes of resultCode other than 400000, see Common Result Codes.
| Return Code | Result Code | Description | Solution |
|---|---|---|---|
| 400000 | UNKNOW_ERROR | Service temporarily unavailable. Try again later. | Try again later. |
| 400000 | INVALID_ARGUMENTS | Invalid parameter. | Check the request parameters. |
| 400000 | PAY_ORDER_NOT_EXIST | The payment order number does not exist. | Check whether the input order number is correct. |
| 400000 | MERC_ORDER_NOT_EXIST | The merchant order number does not exist. | Check whether the input order number is correct. |
| 400000 | INVALID_MERCNO | Invalid merchant number. | Check whether the input merchant number is correct. |
| 400000 | CHECK_ORDER_STATUS | Order status error. | Check whether this is a duplicate order submission. |