Skip to main content

Place an Order


Create a pre-order transaction and pay through the returned information.

Info

{domain}/Servlet/JSAPIService.do

https://vmp.eftpay.com.cn/VMP/Servlet/JSAPIService.do

NameTypeDescriptionRequirement
serviceStringInterface name, see supported service
user_confirm_keyString(12)User Key, provided by eftPay
transaction_amountString(8)Amount. Requires digits, maximum length of decimal places is 2
PAYME test amount parameter description
out_trade_noString(28)Merchant order number
paytypeString(6)Payment type, see supported paytype
buyertypeString(7)Device type
ios, android, others
subjectString(256)Transaction information
payment_typeString(20)Wallet type, see supported payment_type
tidString(20)Merchant terminal number
notify_urlString(240)Notification address, production environment only supports 80 and 443 ports, other ports need to apply
timeStringTime, format: yyyyMMddHHmmss
signString(64)Signature

View supported services and their corresponding paytypes and payment_types

Here is the correspondence between service, paytype, and payment_type

servicepaytypepayment_typeDescription
service.alipay.qrcode.PreOrderAlipayALIPAYCN
ALIPAYHK
ALIPAYBOTH
Alipay qrcode API
service.wechat.qrcode.PreOrderWeChatWECHATCN
WECHATHK
WeChat qrcode API
service.atome.v1.qrcode.PreOrderATOMEATOMEATOME qrcode API
service.unionpay.qrcode.csb.PreOrderUnionPayUNIONPAYUnionPay qrcode API
api.service.gbpay.qrcode.cash.PreOrderGBPAYGBPAYGBPAY qrcode API
service.payme.qrcode.PreOrderPAYMEPAYMEPAYME qrcode API
service.fps.qrcode.PreOrderFPSFPSFPS qrcode API

Tips

  • The QR code generated by ALIPAYBOTH can 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 WECHATHK or WECHATCN to 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 PlacesDescriptionExample
81Creates a [successful] transactiontransaction_amount=0.81
80Creates a [timeout] transactiontransaction_amount=0.80
77Creates a [failed] transactiontransaction_amount=0.77
44Creates a [server error - no payment QR code]transaction_amount=0.44
45Creates a [server error - no state] transactiontransaction_amount=0.45

NameTypeDescriptionRequirement
return_statusString(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_charString(100)Return description, may change, cannot be used as a condition judgment
return_status greater than 00 return
timeStringTime, format: yyyyMMddHHmmss
return_status >= 00 return
signString(64)Signature
return_status >= 00 return

NameTypeDescriptionRequirement
qr_codeStringQR code text
qr_code_addressStringQR code address, Alipay type will return, other types return ""
user_confirm_keyStringUser Key, provided by eftPay
out_trade_noString(28)Merchant order number
paytypeString(6)Payment type
buyertypeString(7)Device type
payment_typeString(20)Wallet type
transaction_amountString(8)Transaction amount
tidString(20)Terminal number, return when the consumption request is sent
subjectString(256)Transaction information
eftpay_trade_noString(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"
}