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.

Request URL

Info

{domain}/Servlet/AppTradePay.do POST

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

Request Parameters

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

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)

Public Return Parameters

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

Parameters Returned on Success

NameTypeDescriptionRequirement
pay_apptradeStringAPP transaction initiation informationRequired
user_confirm_keyStringUser Key provided by eftPayRequired
out_trade_noString(28)Merchant order numberRequired
payTypeString(6)Payment typeRequired
buyerTypeString(7)Device typeOptional
walletString(20)Wallet typeRequired
eft_trade_noString(28)eftPay order numberRequired
fee_typeString(5)CurrencyRequired
transaction_amountString(8)Transaction amountRequired
tidString(20)Terminal ID, returned when there is a delivery with a consumption requestOptional

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.

Request Example

{
    "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"
}

Return Example

{
    "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"
}