Skip to content

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.

NameTypeMax LengthRequiredDescription
merNoLong5YesMerchant number assigned by fireantpay.
gatewayNoLong8YesGateway number(Sub-merchant number) assigned by fireantpay .
refundOrdersList1000Yes【Refund Order Collections】
Details of refund orders,50 maximum each time, Details pls refer to clause:Parameters list for details of refund orders
signInfoString64Yes【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

NameTypeMax LengthRequiredDescription
tradeNoString50YesUnique identifier allocated by fireantpay.
orderNoString50Yes【orderNo】 Merchant order number
refundNoString50No【refundNo】 Merchant refund serial number
tradeAmountString10Yes【Transaction amount】
Number format only
refundAmountString10Yes【Refund Amount】
Number format only, and should be no more than tradeAmount
currencyString3Yes【Transaction currency】
refundReasonString1000Yes【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.

NameTypeDescription
merNoLongMerchant number assigned by fireantpay .
gatewayNoLongGateway number(Sub-merchant number) assigned by fireantpay .
refundOrdersList【refund inforamtion】
For details pls refer to:response details of refund operations
signInfoString【Digital signature information】
errorStatusString【Refund checking status】
0:Failure
1:Successful(Successfully submitted,It doesn't represent the final refund result.)
errorInfoString【Refund Checking Reason】

Response details of refund operation

NameTypeDescription
tradeNoString【tradeNo】 Unique identifier allocated by fireantpay.
orderNoString【orderNo】 Merchant order number
tradeAmountString【Transaction amount】
Number format only
refundAmountString【Refund Amount】
Number format only, and should be no more than tradeAmount
currencyString【Transaction currency】
refundReasonString【reason of the refund】
refundStatusString【Refund checking status on an order】
0: Failure
1: Successful
refundInfoString【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"
    }
    // .....
  ]
}