Query
You can query information about consumption transactions and refund transactions.
Info
{domain}/Servlet/JSAPIService.do POST
https:/VMP/Servlet/JSAPIService.do
| Name | Type | Description | Required |
|---|---|---|---|
| service | String | Interface name, see Supported Services | |
| querytype | String(30) | Query type, fixed: OUT_TRADE | |
| out_trade_no | String(28) | Merchant order number | |
| refund_no | String(28) | Merchant refund number, used when querying refund transactions | |
| user_confirm_key | String(12) | User Key provided by eftPay | |
| paytype | String(6) | Payment type, see Supported Payment Types | |
| buyertype | String(7) | Device type: ios, android, others | |
| payment_type | String(20) | Wallet type, see Supported Wallet Types | |
| time | String | Time, format: yyyyMMddHHmmss | |
| sign | String(64) | Signature |
Tips
When refund_no is not provided or is "", it returns the order information based on out_trade_no, where trade_status represents the status of a consumption order. Otherwise, it returns the refund information based on refund_no, where trade_status represents the status of a refund order.
Supported services and their corresponding paytype and payment_type
Here is the mapping between service, paytype, and payment_type:
| service | paytype | payment_type | Description |
|---|---|---|---|
| service.alipay.qrcode.Query | Alipay | ALIPAYCNALIPAYHKALIPAYBOTH | Alipay qrcode Query API |
| service.wechat.qrcode.Query | WeChat | WECHATCNWECHATHK | WeChat qrcode Query API |
| service.unionpay.qrcode.csb.Query | UnionPay | UNIONPAY | UnionPay qrcode Query API |
| api.service.gbpay.qrcode.cash.Query | GBPAY | GBPAY | GBPAY qrcode Query API |
| service.payme.qrcode.Query | PAYME | PAYME | PAYME qrcode Query API |
| service.fps.qrcode.Query | FPS | FPS | FPS qrcode Query API |
| Name | Type | Description | Request |
|---|---|---|---|
| return_status | String(3) | Return status code, represents . Note: This parameter cannot be used as a judgment of whether the transaction status is successful Other status codes see Appendix 3 | |
| return_char | String(100) | Return explanation, may change, cannot be used as a conditional judgment | |
| time | String | Time, format: yyyyMMddHHmmssreturn_status >= 00 when returned | |
| sign | String(64) | Signaturereturn_status >= 00 when returned |
| Name | Type | Description | Request |
|---|---|---|---|
| out_trade_no | String(28) | Merchant order number | |
| extra_trade_no | String(28) | Merchant refund number, return when refund is queried | |
| eftpay_trade_no | String(28) | eftPay order number | |
| trade_status | String(32) | Trade status, see Appendix 2 | |
| user_confirm_key | String(12) | User Key, provided by eftPay | |
| trade_type | String(10) | Order type, see Appendix 4 | |
| buyer_id | String(30) | User identifier | |
| tid | String(20) | Terminal number, returned when sent during consumption request | |
| transaction_id | String(64) | Payment provider number | |
| payment_type | String(8) | Wallet type | |
| trade_time | String | Trade time, format: yyyy-MM-dd HH:mm:ss | |
| transaction_amount | String(8) | Transaction amount. Consumption amount when querying consumption; refund amount when querying refund | |
| currency | String(10) | Currency | |
| original_amount | String(8) | Original transaction amount, returned when refund is queried | |
| rate | String(10) | Exchange rate, returned for GBPAY type | |
| actual_total_fee | String(12) | Actual payment amount, returned for GBPAY type | |
| actual_total_fee_type | String(10) | Actual payment currency, returned for GBPAY type | |
| payment_amount | String(12) | Merchant's actual receipt amount, returned for UnionPay type | |
| cost_amount | String(12) | User's payment amount, returned for UnionPay type | |
| uplan_discount | String(12) | Uplan discount amount, returned for UnionPay type | |
| amount_discount | String(12) | Instant discount amount, returned for UnionPay type |
{
"service": "service.alipay.qrcode.Query",
"user_confirm_key": "12345678",
"out_trade_no": "201908241040035",
"sign": "24db1adc94b18a416796695a3062398bf3908bff7647da4948b769bf118dff87",
"time": "20190824104052",
"paytype": "WeChat",
"payment_type": "WECHATCN",
"buyertype": "ios",
"querytype": "OUT_TRADE"
}
{
"return_status": "00",
"return_char": "",
"sign": "6077b275107676aac219cb38d7970a8f3de607f47d6baa6320f337a4ca1358e2",
"time": "20190824104135",
"out_trade_no": "201908241040035",
"eftpay_trade_no": "08520005269190824104101935",
"trade_status": "TRADE_SUCCESS",
"user_confirm_key": "12345678",
"trade_type": "SALE",
"buyer_id": "2088012867786450",
"tid": "tid123",
"transaction_id": "2019082422001486450540740143",
"payment_type": "WECHATCN",
"trade_time": "2019-08-24 10:41:25",
"transaction_amount": "0.02",
"currency": "HKD",
"original_amount": "10.01"
}
