Skip to main content

Place an Order


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

Currently, only WeChat and Alipay are supported.

Info

{domain}/Servlet/AppTradePay.do

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

NameTypeDescriptionRequirement
user_confirm_keyString(12)User Key, provided by eftPay
transaction_amountString(8)Amount. Requires digits, maximum decimal length is 2
out_trade_noString(28)Merchant order number
payTypeString(6)Payment type
AlipayWeChat
buyerTypeString(7)Device type
iosandroidothers
subjectString(256)Transaction information
walletString(20)Wallet type
AlipayALIPAYHKALIPAYCN
WeChatWECHATHKWECHATCN
bodyString(128)In the case of needing to describe various goods, it is recommended to accumulate the string of describing the goods
pay_sceneStringPayment scene
APP
fee_typeString(5)Currency type, HKDCNY
Default:HKD
Default:HKD
tidString(20)Merchant terminal number
notify_urlString(240)Notification address, production environment only supports 80 and 443 ports, other ports need to apply
active_timeString(240)Valid time, unit seconds. WeChat defaults to 900; Alipay defaults to 1800, and requires multiples of 60.
timeStringTime, format:yyyyMMddHHmmss
signString(64)Signature

Tips

Different payType need to correspond to different wallet

  • Alipay
    • ALIPAYHK (Alipay Hong Kong Wallet)
    • ALIPAYCN (Alipay Mainland Wallet)
  • WeChat
    • WECHATHK (WeChat Pay Hong Kong Wallet)
    • WECHATCN (WeChat Pay Mainland Wallet)

NameTypeDescriptionRequirement
return_statusString(3)Return status code, represents . Note: This parameter cannot be used to determine the success of the transaction.
Other status codes refer to Appendix 3.
return_charString(100)Return description, may vary, cannot be used as a condition for judgment.
return_status greater than 00 returns
timeStringTime, format: yyyyMMddHHmmss
Returns when return_status >= 00.
signString(64)Signature
Returns when return_status >= 00.

NameTypeDescriptionRequirement
pay_apptradeStringAPP transaction initiation information
user_confirm_keyStringUser Key provided by eftPay
out_trade_noString(28)Merchant order number
payTypeString(6)Payment type
buyerTypeString(7)Device type
walletString(20)Wallet type
eft_trade_noString(28)eftPay order number
fee_typeString(5)Currency
transaction_amountString(8)Transaction amount
tidString(20)Terminal ID, returned when there is a delivery with a consumption request

Tips

pay_apptrade is used to call the corresponding payment wallet's SDK to initiate payment.
Alipay returns the data type as String which can be used directly, while WeChat returns in JSON format and needs to be parsed and processed according to the app development documentation.

{
    "pay_scene": "APP",
    "user_confirm_key": "S0003469",
    "wallet": "ALIPAYCN",
    "subject": "中文测试 test",
    "body": "test",
    "transaction_amount": "0.77",
    "sign": "43b6b40b6083cc914f62216d262bae6a4f22bc9317852420295e3b4a18f529c8",
    "tid": "123456",
    "fee_type": "HKD",
    "payType": "Alipay",
    "out_trade_no": "rrn_1686280005923",
    "buyerType": "android",
    "time": "20230609110645"
}

{
    "user_confirm_key": "S0003469",
    "wallet": "ALIPAYCN",
    "pay_apptrade": "_input_charset=utf-8&body=测试&currency=HKD&forex_biz=FP......",
    "return_char": "",
    "transaction_amount": "0.02",
    "sign": "068235adf035e0d60ca25b5d68bcc09b26782ee2190d1ac47acca9b982e2a1bb",
    "fee_type": "HKD",
    "tid": "",
    "eft_trade_no": "20005269520084311t5rutcv1734",
    "out_trade_no": "20200120114032000838",
    "payType": "Alipay",
    "buyerType": "android",
    "return_status": "00",
    "time": "20200120114035"
}