Refund
Refund Instructions
You can apply for refund through the interface, 50 maximum refund applications for each time. Both parameters be submitted to do the refund and the returning of the refund processing result are all should be in json format. Making sure all the refund applications are successful orders under the same gatewayNo.
Refund URL:
Request parameters
Please submit it through the POST method, the data format is JSON.
| Name | Type | Max Length | Required | Description |
|---|---|---|---|---|
| merNo | Long | 5 | Yes | Merchant number assigned by fireantpay. |
| gatewayNo | Long | 8 | Yes | Gateway number(Sub-merchant number) assigned by fireantpay . |
| refundOrders | List | 1000 | Yes | 【Refund Order Collections】 Details of refund orders,50 maximum each time, Details pls refer to clause:Parameters list for details of refund orders |
| signInfo | String | 64 | Yes | 【Digital signature information】 signInfo=sha256(merNo+ gatewayNo+ tradeNo+ signkey) For example: (merNo+gatewayNo+tradeNo(1)+...+tradeNo(n) + signkey); |
Parameters list for details of refund orders
| Name | Type | Max Length | Required | Description |
|---|---|---|---|---|
| tradeNo | String | 50 | Yes | Unique identifier allocated by fireantpay. |
| orderNo | String | 50 | Yes | 【orderNo】 Merchant order number |
| refundNo | String | 50 | No | 【refundNo】 Merchant refund serial number |
| tradeAmount | String | 10 | Yes | 【Transaction amount】 Number format only |
| refundAmount | String | 10 | Yes | 【Refund Amount】 Number format only, and should be no more than tradeAmount |
| currency | String | 3 | Yes | 【Transaction currency】 |
| refundReason | String | 1000 | Yes | 【reason of the refund】 |
Refund submitting example
json
{
"merNo": "90000",
"gatewayNo": "90000001",
"signInfo": "a665a45920422f9d417e",
"refundOrders": [
{
"tradeNo": "N2020010108082101234567",
"orderNo": "12345",
"currency": "USD",
"tradeAmount": "10",
"refundAmount": "1",
"refundReason": "test"
},
{
"tradeNo": "N2020010108082101234568",
"orderNo": "12346",
"currency": "USD",
"tradeAmount": "10",
"refundAmount": "10",
"refundReason": "test"
}
// ........
]
}Response parameters
the data format is JSON.
| Name | Type | Description |
|---|---|---|
| merNo | Long | Merchant number assigned by fireantpay . |
| gatewayNo | Long | Gateway number(Sub-merchant number) assigned by fireantpay . |
| refundOrders | List | 【refund inforamtion】 For details pls refer to:response details of refund operations |
| signInfo | String | 【Digital signature information】 |
| errorStatus | String | 【Refund checking status】 0:Failure 1:Successful(Successfully submitted,It doesn't represent the final refund result.) |
| errorInfo | String | 【Refund Checking Reason】 |
Response details of refund operation
| Name | Type | Description |
|---|---|---|
| tradeNo | String | 【tradeNo】 Unique identifier allocated by fireantpay. |
| orderNo | String | 【orderNo】 Merchant order number |
| tradeAmount | String | 【Transaction amount】 Number format only |
| refundAmount | String | 【Refund Amount】 Number format only, and should be no more than tradeAmount |
| currency | String | 【Transaction currency】 |
| refundReason | String | 【reason of the refund】 |
| refundStatus | String | 【Refund checking status on an order】 0: Failure 1: Successful |
| refundInfo | String | 【Failure reason for a refund order】 |
Parameters of Refund Response Example
json
{
"errorInfo": "Refund submitted successfully",
"errorStatus": "1",
"merNo": 90000,
"gatewayNo": 90000001,
"signInfo": "a07e998e86f7f7a27ae3",
"refundOrders": [
{
"currency": "USD",
"orderNo": "12345",
"refundAmount": 10,
"refundInfo": " Invalid format of the refund amount",
"refundStatus": "0",
"refundReason": "test",
"tradeAmount": 10,
"tradeNo": "N2020010108082101234567"
},
{
"currency": "USD",
"orderNo": "12346",
"refundAmount": 1,
"refundInfo": " Only successful order can be refunded",
"refundStatus": "0",
"refundReason": "test",
"tradeAmount": 10,
"tradeNo": "N2020010108082101234568"
}
// .....
]
}