Gateway Order Query
API method
URL |
|
Method |
POST |
Parameter organization format |
application/x-www-form-urlencoded |
Order Query Request Parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
sign |
String(256) |
YES |
b000e9b6ec3fbda482d96a3d7c75c6956a5864336c3098462525e7229e8e046e490939a3e8b320a6c68eb63795a25b79d8c74f042f0972039bb5fe9b861cefb4 |
Digital signature for verifying the authenticity of digital messages. Please check how to got Signature Algorithm page |
appid |
String(32) |
YES |
mch35000 |
Your Merchant Number. Check on how to find your appid/Merchant No.. The format is mch{Merchant No}. |
nonce_str |
String(32) |
YES |
Random string, must be unique |
|
time_stamp |
String(256) |
YES |
time stamp example: "time_stamp": "20190622131804" |
|
mch_order_no |
String(32) |
YES |
order number on merchant side, must be unique |
|
{
"appid": "mch32625",
"mch_order_no": "33663431",
"nonce_str": "d2b4874c75fca3d7c637bee971ede6ac",
"sign": "6aa39ba2ab6ac60df6223b0604a1fffe62280d33accb6d91a2dceea6648c04b8117d5b33f5f348d21adcc47f1f63faae8fd77b6800e476bf92d5ad45488cdadc",
"time_stamp": "2020041421583131S"
}
Order Query SUCCESS Response Parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
code |
int |
YES |
0 |
code msg 0 SUCCESS |
lang |
String(256) |
YES |
The display languange.The default language is English if no specification.Value range: * "en":----English * "cn":----Chinese * "th":----Thai |
|
result |
string(16) |
YES |
FAIL |
Value Range: FAIL/SUCCESS/CLOSED/NOTPAY/PAYERROR/PENDING/NOTSURE/USERPAYING/REFUND
|
message |
String(128) |
Detailed description of result |
||
msg |
String(128) |
YES |
system error |
the detailed description of the error |
data |
JSON |
|||
data parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
appid |
String(32) |
YES |
mch35000 |
Your Merchant Number. Check on how to find your appid/Merchant No.. The format is mch{Merchant No}. |
attach |
String |
YES |
e-wallet local currency total amount, unit is cent. |
|
cash_fee_type |
String |
YES |
THB |
e-wallet local currency, e.g. THB for Thailand e-wallets, CNY for Chinese e-wallets Alipay, WeChat Pay. |
channel |
String(16) |
YES |
alipay |
Actual payment e-wallet channel.Value range: alipay, linepay, airpay, wechat, promptpay, truemoney. |
channel_order_no |
String(32) |
Conditional |
e-wallet order number. Only response with result "SUCCESS" and "REFUND". |
|
fee_type |
String(16) |
YES |
THB |
Currency code for total_fee. refer to with ISO 4217. Value range: THB: Thai Baht use for Thailand. MYR: Malaysia JPY: Japan AED: United Arab Emirates dirham use for UAE. |
pay_mch_order_no |
String(32) |
YES |
4200000553202004150354623931 |
Gateway Pay unique order number |
ksher_order_no |
String(32) |
YES |
merchant Order number, must be unique. |
|
nonce_str |
String(32) |
YES |
Random string. |
|
openid |
String(128) |
NO |
Customer’s id under this merchant’s public account. |
|
rate |
String(16) |
YES |
Exchange rate of foreign currency to RMB. |
|
result |
String(16) |
YES |
Value Range:FAIL/SUCCESS/NOTPAY/CLOSED/PAYERROR/REFUND
|
|
time_end |
String(20) |
2020-04-15 09:49:19 |
Payment success time |
|
total_fee |
Int |
YES |
total amount of the order and it must be an integer, the unit is cent |
|
{
"code": 0,
"data": {
"appid": "mch32625",
"attach": "",
"cash_fee": 21,
"cash_fee_type": "CNY",
"channel": "wechat",
"channel_order_no": "4200000553202004150354623931",
"fee_type": "THB",
"pay_mch_order_no": "2004150948529843",
"ksher_order_no": "90020200415104909426008",
"mch_order_no": "77713",
"nonce_str": "UHl8XNywZjdMrpsWCNy00gOYbspYzH7Z",
"openid": "o2G4c04tmsU-wsCG7jN_ORL5Vh14",
"rate": "0.222657",
"result": "SUCCESS",
"time_end": "2020-04-15 09:49:19",
"total_fee": 100
},
"lang": "",
"message": "操作成功",
"msg": "操作成功",
"sign": "a19fb42985cbf2ce81e74a1e2aa7fdaf42d33234b3f5d9a3ce9230d1cabc2796abd05c6b00951c6c33f557410d029853bf70d99af32cae858f1484412309f242"
}
or
{
"code": 0,
"data": {
"appid": "mch28321",
"attach": "",
"cash_fee": 102,
"cash_fee_type": "THB",
"channel": "card",
"channel_order_no": "509109",
"fee_type": "THB",
"ksher_order_no": "70020200713155936857097",
"mch_order_no": "12594",
"nonce_str": "FbbQyfY7Nskt1D8rHqFunx6SWJYt0mOz",
"openid": "453215******0399 YAYA NUGHT",
"pay_mch_order_no": "2007131459298082",
"rate": "",
"result": "SUCCESS",
"time_end": "2020-07-13 14:59:36",
"total_fee": 100
},
"lang": "",
'message': '操作成功',
'msg': '操作成功'
"sign": "63b77c9542e6f5cd62a72dff0a72d055228fdeb68943dabe0ebb64e413beb2cf69a8b4ac106934e9f40a555b9eafaf5d512ea3750cadb3d3158dd913c3a01bdf"
}
Order Query Fail Response Parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
code |
int |
YES |
0 |
code msg * -1: merchant info error * -2: sign failed to verify * -3: order not exist * -4: order number is not unique * -100: query order failed |
lang |
String(256) |
YES |
The default language is English if no specification. Value range: * "en":----English * "cn":----Chinese * "th":----Thai |
|
message |
String(128) |
Detailed description of result |
||
msg |
String(128) |
YES |
system error |
the detailed description of the error |
{'lang': '', 'code': -3, 'msg': '该订单不存在', 'message': '该订单不存在'}