Query API
Endpoints
Live POST
https://pay.onlinepay.ai/order/query
Sandbox POST
https://testpay.onlinepay.ai/order/query
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 |
sign | string | Yes | signature, MD5(merNo+merOrderNo+tradeNo+queryType+PrivateKey) or RSA |
operationType | string | Yes | Operation Type, default:query |
version | string | No | V3.0.0 |
tradeNo | string | Yes | transaction serial number |
queryType | string | Yes | Query type, Refund the query: refund; Transaction Order query: sales;Chargeback the query: chargeback |
refundNo | string | Yes | A unique refund number generated by the onlinepay system, Refund enquiries must be sent |
Example Request
{
"merNo": 111111,
"merOrderNo": "222222",
"version": "V3.0.0",
"tradeNo": "333333",
"sing": "9D6FDF4880B00B002B1F2AB61AE9A721",
"operationType": "query",
"queryType": "refund",
"refundNo": "444444"
}
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 |
-state | integer | Yes | 1: Transaction processing, 2: Transaction failed, 3: Transaction successful: 4 Refund processing, 5 Refund failed, 6 Refund successful |
-refundNo | string | Yes | Unique ID generated for successful refund application |
-tradeNo | string | Yes | Order number, the unique identifier of OnlinePay |
-message | string | Yes | reason |
-merNo | string | Yes | Merchant number |
-merOrderNo | string | Yes | Merchant order number |
-refundAmount | string | Yes | Refund amount |
-refundCurrency | string | Yes | Refund Currency |
-refuseAmount | string | Yes | chargeback amount |
-refuseCurrency | string | Yes | chargeback Currency |
-actualRefuseAmount | string | Yes | The currency in which the actual chargeback was made |
-actualRefuseCurrency | string | Yes | The amount of the actual chargeback |
-tradeFee | string | Yes | Transaction processing fee. |
-settle | integer | Yes | 1: Settled, 0: Unsettled |
-gasFee | string | No | Order collection transfer GAS, only for crypto pay use |
-transactionHash | string | No | On-chain transaction hash, used to query transaction details in the blockchain browser, only for crypto pay |
Example Responses
{
"code":"00000",
"message":"SUCCESS",
"data":{
"tradeNo": "333333",
"merNo": "111111",
"merOrderNo": "222222",
"state": "3",
"settle": 1
}
}