Skip to main content

Place an order


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

Currently only supports WeChat and Alipay.

Info

{domain}/Servlet/JSAPIService.do

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

NameTypeDescriptionRequirement
serviceStringInterface name
service.alipay.jsapi.PreOrder
service.wechat.jsapi.PreOrder
user_confirm_keyString(12)User Key, provided by eftPay
paytypeString(6)Payment type
AlipayWeChat
payment_typeString(20)Wallet type
ALIPAYCNALIPAYHK
WECHATCNWECHATHK
scene_typeStringPayment scene, PUBLIC and H5 are only applicable to WeChat
APPLETSPUBLICH5
transaction_amountString(8)Amount. Requires numbers, the maximum length of decimal places is 2
out_trade_noString(28)Merchant order number
subjectString(256)Transaction information
tidString(20)Merchant terminal number
fee_typeString(5)Currency type, HKDCNY
Default:HKD
notify_urlString(240)Notification address, the production environment only supports 80 and 443 ports, other ports need to apply
active_timeStringEffective time, in seconds. Default 30 minutes, that is,1800
timeStringTime, format:yyyyMMddHHmmss
signString(64)Signature

NameTypeDescriptionRequirement
openidStringThe openid obtained by the official account, applicable to the PUBLIC scene
openid and sub_openid choose one
sub_openidStringThe openid obtained by the applet, applicable to the APPLETS scene
sub_openid and openid choose one
return_urlStringThe return address after payment is completed. Applicable to the H5 scene, see [Notes on WeChat H5 Scene](#Notes on WeChat H5 Scene)
scene_infoStringScene information, applicable to the H5 scene
receiptStringElectronic invoice entry opening logo (only applicable to WeChat). When Y is entered, the payment success message and payment details page will appear to open the invoice entry. It is necessary to open the electronic invoice function on the WeChat payment merchant platform or WeChat public platform to pass this field Can take effect
goods_tagStringOrder discount mark
detailObjectDetailed description of the product, for merchants who use single-item discounts, this field must be uploaded in accordance with the specifications. For ordinary merchants, use the Json format.
For merchants who use single-item discounts, the specification of this field is detailed in Single Item Discount Parameter Descriptionopen in new window

About return_url

The WeChat H5 payment scene may occur after setting the return_url and jumping back to the specified page:

  1. More than 5 seconds after the WeChat payment middle page calls up the WeChat cashier
  2. The user clicks “Cancel Payment” or “Complete” button after payment is completed

Therefore, it cannot be guaranteed that the payment process has ended when the page jumps back, so the return_url address set by the merchant cannot automatically execute the check single operation, and the user should be allowed to click the button to trigger the check single operation.

The display effect of the jump back page can refer to the figure below.

NameTypeDescriptionRequirement
return_statusString(3)Return status code, represents . Note: This parameter cannot be used to judge whether the transaction status is successful
Other status codes see Appendix 3
return_charString(100)Return description, which may change and cannot be used for conditional judgment
Return when return_status > 00
timeStringTime, format: yyyyMMddHHmmss
return_status >= 00 when returned
signString(64)Signature
return_status >= 00 when returned

NameTypeDescriptionRequirement
user_confirm_keyStringUser Key, provided by eftPay
paytypeString(6)Payment type
payPackageStringUsed for jsapi or H5 to call up payment, the content inside cannot be modified
out_trade_noString(28)Merchant order number
payment_typeString(20)Wallet type
transaction_amountString(8)Transaction amount
scene_typeStringPayment scene
subjectString(256)Transaction information
tidString(20)Terminal number, returned when the consumption request is sent
fee_typeString(5)Currency
eftpay_trade_noString(28)eftPay order number, configuration return
openidStringOpenid obtained from the public account
WeChat PUBLIC scene return
sub_openidStringOpenid obtained from the applet
WeChat APPLETS scene return

{
    "service": "service.wechat.jsapi.PreOrder",
    "user_confirm_key": "S0003469",
    "paytype": "WeChat",
    "payment_type": "WECHATCN",
    "scene_type": "H5",
    "transaction_amount": "0.07",
    "out_trade_no": "rrn_1686280006040",
    "subject": "test测试",
    "time": "20230609110646",
    "sign": "2426d6a5eb2371052aaa7b2ecead2f1c23cb6b9114960a5eee89a6a8aba2a475",
    "tid": "tid_3378",
    "fee_type": "HKD",
    "notify_url": "https://www.merchant.com/notify/receive",
    "return_url": "https://www.merchant.com/return/page"
}

{
    "user_confirm_key": "S0003469",
    "return_status": "00",
    "return_char": "",
    "payPackage": "https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx161448344276518c6138605600a28axxxx&package=3645625860&redirect_url=https%3A%2F%2Fwww.merchant.com%2Freturn%2Fpage",
    "subject": "test测试",
    "transaction_amount": "0.89",
    "sign": "7725226a14e3aefc738246a03ed6b3a357ab17f63b9ae22377e89ecad0a0c5e0",
    "fee_type": "HKD",
    "scene_type": "H5",
    "tid": "tid_3378",
    "payment_type": "WECHATCN",
    "out_trade_no": "rrn_1686280006042",
    "time": "20230609110646",
    "paytype": "WeChat"
}