Skip to main content

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

ParameterTypeRequiredDescription
merNointegerYesMerchant Number, Unique identifier assigned to the merchant by the onlinepay payment platform when registering with onlinepay
merOrderNostringYesMerchant Order Number
amountstringYeskeep two decimals
notifyUrlstringYesAsynchronous notification address, Used to receive onlinepay to push refund results to merchants
signstringYessignature, MD5(merNo+merOrderNo+amount+tradeNo+PrivateKey) or RSA
operationTypestringYesvalue:refund
versionstringNoV3.0.0
tradeNostringYestransaction serial number, The order number generated by the platform when the merchant pays
remarkstringYesremark

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

ParameterTypeRequiredDescription
codestringYesIf the value is 00000, it will return success, other please refer to Error Code
messagestringYesInterface returns description
dataobjectYesRequest response data
-refundNostringYesUnique ID generated for successful refund application
-tradeNostringYesOrder number, the unique identifier of OnlinePay
-merNostringYesMerchant number
-merOrderNostringYesMerchant order number
-refundAmountstringYesRefund amount
-refundCurrencystringYesRefund Currency

Example Responses

{
"code":"00000",
"message":"SUCCESS",
"data":{
"refundNo": "444444",
"tradeNo": "333333",
"merNo": "111111",
"merOrderNo": "222222",
"refundAmount": "10",
"refundCurrency": "CNY"
}
}