Refund API
Endpoints
Live POST
https://pay.onlinepay.ai/refund/apply
Sandbox POST
https://testpay.onlinepay.ai/refund/apply
note
There are refunds for SEPA,Credit Cards and Alipay, UnionPay no refund.
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
merNo | integer | Yes | Merchant Number, Unique identifier assigned to the merchant by the onlinepay payment platform when registering with onlinepay |
merOrderNo | string | Yes | Merchant Order Number |
amount | string | Yes | keep two decimals |
notifyUrl | string | Yes | Asynchronous notification address, Used to receive onlinepay to push refund results to merchants |
sign | string | Yes | signature, MD5(merNo+merOrderNo+amount+tradeNo+PrivateKey) or RSA |
operationType | string | Yes | value:refund |
version | string | No | V3.0.0 |
tradeNo | string | Yes | transaction serial number, The order number generated by the platform when the merchant pays |
remark | string | Yes | remark |
Example Request
{
"merNo": 111111,
"merOrderNo": "222222",
"amount": "10",
"version": "V3.0.0",
"tradeNo": "333333",
"sing": "9D6FDF4880B00B002B1F2AB61AE9A721",
"notifyUrl": "https://www.example.com",
"remark": "12323425345",
"operationType": "refund"
}
Responses Body
Parameter | Type | Required | Description |
---|---|---|---|
code | string | Yes | If the value is 00000, it will return success, other please refer to Error Code |
message | string | Yes | Interface returns description |
data | object | Yes | Request response data |
-refundNo | string | Yes | Unique ID generated for successful refund application |
-tradeNo | string | Yes | Order number, the unique identifier of OnlinePay |
-merNo | string | Yes | Merchant number |
-merOrderNo | string | Yes | Merchant order number |
-refundAmount | string | Yes | Refund amount |
-refundCurrency | string | Yes | Refund Currency |
Example Responses
{
"code":"00000",
"message":"SUCCESS",
"data":{
"refundNo": "444444",
"tradeNo": "333333",
"merNo": "111111",
"merOrderNo": "222222",
"refundAmount": "10",
"refundCurrency": "CNY"
}
}