Place an Order
Create a pre-order transaction and pay through the returned information.
Info
{domain}/Servlet/JSAPIService.do
https:/VMP/Servlet/JSAPIService.do
| Name | Type | Description | Requirement |
|---|---|---|---|
| service | String | Interface name, see supported service | |
| user_confirm_key | String(12) | User Key, provided by eftPay | |
| transaction_amount | String(8) | Amount. Requires digits, maximum length of decimal places is 2 PAYME test amount parameter description | |
| out_trade_no | String(28) | Merchant order number | |
| paytype | String(6) | Payment type, see supported paytype | |
| buyertype | String(7) | Device typeios, android, others | |
| subject | String(256) | Transaction information | |
| payment_type | String(20) | Wallet type, see supported payment_type | |
| tid | String(20) | Merchant terminal number | |
| notify_url | String(240) | Notification address, production environment only supports 80 and 443 ports, other ports need to apply | |
| time | String | Time, format: yyyyMMddHHmmss | |
| sign | String(64) | Signature |
View supported services and their corresponding paytypes and payment_types
Here is the correspondence between service, paytype, and payment_type
| service | paytype | payment_type | Description |
|---|---|---|---|
| service.alipay.qrcode.PreOrder | Alipay | ALIPAYCNALIPAYHKALIPAYBOTH | Alipay qrcode API |
| service.wechat.qrcode.PreOrder | WeChat | WECHATCNWECHATHK | WeChat qrcode API |
| service.unionpay.qrcode.csb.PreOrder | UnionPay | UNIONPAY | UnionPay qrcode API |
| api.service.gbpay.qrcode.cash.PreOrder | GBPAY | GBPAY | GBPAY qrcode API |
| service.payme.qrcode.PreOrder | PAYME | PAYME | PAYME qrcode API |
| service.fps.qrcode.PreOrder | FPS | FPS | FPS qrcode API |
Tips
- The QR code generated by
ALIPAYBOTHcan be scanned using either the "支付宝" app or the "支付寶香港" app. - For WeChat, if the merchant is integrated with a wallet institution, the value can be either
WECHATHKorWECHATCNto place an order. The wallet type returned in the final transaction will depend on the wallet used by the customer for payment.
transaction_amount
In PAYME UAT environment, the transaction status can be controlled by the two decimal places of the transaction_amount
| Decimal Places | Description | Example |
|---|---|---|
| 81 | Creates a [successful] transaction | transaction_amount=0.81 |
| 80 | Creates a [timeout] transaction | transaction_amount=0.80 |
| 77 | Creates a [failed] transaction | transaction_amount=0.77 |
| 44 | Creates a [server error - no payment QR code] | transaction_amount=0.44 |
| 45 | Creates a [server error - no state] transaction | transaction_amount=0.45 |
| Name | Type | Description | Requirement |
|---|---|---|---|
| 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 description, may change, cannot be used as a condition judgment | |
| time | String | Time, format: yyyyMMddHHmmssreturn_status >= 00 return | |
| sign | String(64) | Signaturereturn_status >= 00 return |
| Name | Type | Description | Requirement |
|---|---|---|---|
| qr_code | String | QR code text | |
| qr_code_address | String | QR code address, Alipay type will return, other types return "" | |
| user_confirm_key | String | User Key, provided by eftPay | |
| out_trade_no | String(28) | Merchant order number | |
| paytype | String(6) | Payment type | |
| buyertype | String(7) | Device type | |
| payment_type | String(20) | Wallet type | |
| transaction_amount | String(8) | Transaction amount | |
| tid | String(20) | Terminal number, return when the consumption request is sent | |
| subject | String(256) | Transaction information | |
| eftpay_trade_no | String(28) | eftPaypay order number, return when configured |
{
"service": "service.alipay.qrcode.PreOrder",
"user_confirm_key": "S0003469",
"transaction_amount": "0.03",
"out_trade_no": "$function=getSaleOutTradeOut",
"paytype": "Alipay",
"buyertype": "others",
"subject": "test",
"sign": "a482c2a7af5cbeb5bee616d74d74e24e2ec1eaf598f01f7d5aba18ce97375309",
"time": "20230609110646",
"payment_type": "ALIPAYCN",
"tid": "ttt333",
"notify_url": "https://www.merchant.com/notify/receive"
}
{
"return_status": "00",
"return_char": "",
"sign": "799f6804aa6a8ee96a714654051cf0b9c1f228fb86446aa7d0454ed5924ef489",
"time": "20230609110646",
"qr_code": "sa22fs3avv3smvs4a45jgs578fsk2330fojsjg311",
"qr_code_address": "sa22fs3avv3smvs4a45jgs578fsk2330fojsjg311",
"user_confirm_key": "S0003469",
"out_trade_no": "rrn_1686280006055",
"paytype": "Alipay",
"buyertype": "andriod",
"payment_type": "ALIPAYHK",
"transaction_amount": "0.77",
"tid": "tid_3378",
"subject": "test123"
}
