This API allows merchant system to query the refund detail of a transaction.
URL: https://pay.ionlinepay.com/gateway/
Request Method: POST Form-Data
| Name | ID | Required | Type | Description |
| API Name | service | Yes | String(32) | ionline.unified.trade.refundquery |
| API Version | version | No | String(8) | Default value: 1.0 |
| Charset | charset | No | String(8) | Default value: UTF-8 |
| Signature Type | sign_type | No | String(8) | Default value: MD5 |
| Merchant ID (MID) | mch_id | Yes | String(32) | Specifies Merchant ID assigned by iOnline Pay |
| Order Number | out_trade_no | No | String(32) | ^ An internal order number within the Merchant’s system. |
| Platform Order Number | transaction_id | No | String(32) | ^ An unique order number within the payment system. |
| Merchant Refund Number | out_refund_no | No | String(32) | ^ An internal refund number within the Merchant’s system. |
| Platform Refund Number | refund_id | No | String(32) | ^ An unique refund number within the payment system. |
| Random String | nonce_str | Yes | String(32) | 32 characters or fewer. |
| Signature | sign | Yes | String(32) | Signature Hash. For more information, see "Security Specification" |
Response Format: JSON
| Name | ID | Required | Type | Description |
| API Version | version | Yes | String(8) | Default value: 1.0 |
| Charset | charset | Yes | String(8) | Default value: UTF-8 |
| Signature Type | sign_type | Yes | String(8) | Default value: MD5 |
| Return Status Code | status | Yes | String(16) | This parameters indicates whether the API call is successful or not but this doesn't indicate to have a successful transaction. If the value is 0, then it indicates sucecssful. Otherwise, it indicates failure. |
| Return Message | message | No | String(128) | The description of the Return Status Code if the value of parameter "status" is not 0. |
| The below parameters will be returned if the value of the parameter "status" is 0. | ||||
| Service Result | result_code | Yes | String(16) | If the value is 0, then it indicates sucecssful. Otherwise, it indicates failure. |
| Merchant ID (MID) | mch_id | Yes | String(32) | Specifies Merchant ID assigned by iOnline Pay |
| Device ID | device_info | No | String(32) | Specifies the ID of the terminal device with from which the Merchant submitted their order |
| Random String | nonce_str | Yes | String(32) | 32 characters or fewer. |
| Error Code | err_code | No | String(32) | Error code |
| Signature | sign | Yes | String(32) | Signature Hash. For more information, see "Security Specification" |
| The below parameters will be returned if the value of the both parameters "status" and "result_code" are 0. | ||||
| Platform Order Number | transaction_id | Yes | String(32) | An unique order number within the payment system. |
| Order Number | out_trade_no | Yes | String(32) | An internal order number within the Merchant’s system. |
| Payment Channel | trade_channel | Yes | String(32) | WECHATPAY - WeChat Pay ALIPAY - Alipay |
| Trade Type | trade_type | Yes | String(32) | ionline.pay.weixin.native.intl |
| Item Description | body | Yes | String(127) | Item Description |
| Number of Refund td> | refund_count | Yes | Int | Indicate how many refunds has been completed for this transaction. td> |
| Merchant Refund Number | out_refund_no_$n | Yes | String(32) | An internal refund number within the Merchant’s system. |
| Platform Refund Number | refund_id_$n | Yes | String(32) | An unique refund number within the payment system. |
| Refund Amount | refund_fee_$n | Yes | Int | Specifies the refund amount. The units are expressed in cents as integers. |
| Refund Time | refund_time_$n | No | String(14) | Specifies the refund datetime in the format yyyyMMddHHmmss, such as 20170520094130 for May 20, 2017 09:41:30 (GMT+8). |
| Refund Status | refund_status_$n | Yes | String(16) |
SUCCESS - Refund Successfully FAIL - Fail to refund PROCESSING - Refund in progress |
| Refund Reason | refund_reason_$n | No | String(127) | Specifies the reason of refund |
| $n indicates the ordering of refund starting from zero (refund_count - 1). For example, if there are three refunds for a transaction, then the value of "refund_count" is e. The max value of $n is 2 (refund_count - 1). The order index of the first refund is 0. The order index of the second refund is 1 and so on. | ||||