Skip to main content

Web Payment

Overview

Web payments allow customers to complete purchases directly from a merchant website. Users scan a QR code, confirm the payment amount, and complete payment using their selected wallet. After payment, the return_url will redirect the user to a predefined merchant page.

The selected wallet will deduct the amount in HKD from the customer, and QFPay will settle the same HKD amount to the merchant.


HTTP Request

POST /trade/v1/payment

Supported pay_type values:

PayTypeDescription
800201WeChat Web QR Payment (HK merchants) – see WeChat Web Payment
801514Alipay Web Payment (HK merchants) – see Alipay Web Payment
800714UnionPay Web Payment (Cloud QuickPass for HK merchants)
805814PayMe Web Payment (HK merchants)

Request Parameters

Parameter NameParameter CodeRequiredTypeDescription
Order AmounttxamtYesInt(11)Integer amount in smallest currency unit. E.g. 100 = $1. Recommended to use >200 to avoid risk triggers.
CurrencytxcurrcdYesString(3)Transaction currency. See Supported Currencies.
Payment Typepay_typeYesString(6)e.g. 805814 for PayMe.
External Order IDout_trade_noYesString(128)Unique transaction ID within the merchant system. Must be unique per transaction/refund.
Transaction TimetxdtmYesString(20)Format: yyyy-MM-dd HH:mm:ss
Expiry Timeexpired_timeNoString(3)QR code expiry in minutes. Default is 30, range: 5–120. (Applicable for static QR payments)
Product Namegoods_nameNoString(64)Optional label shown on payment page. If using Chinese, encode in UTF-8. Required for App payments.
Sub-Merchant IDmchidNoString(16)Assigned by QFPay. Use this when operating as a sub-merchant.
Device IDudidNoString(40)Optional device identifier shown in backend.
Return URLreturn_urlNoString(512)User will be redirected here after payment completion.

Response Parameters

Parameter NameParameter CodeTypeDescription
Payment Typepay_typeString(6)e.g. 805814 for PayMe
System TimesysdtmString(20)Format: YYYY-MM-DD hh:mm:ss. Used as settlement cut-off.
Transaction TimetxdtmString(20)Format: YYYY-MM-DD hh:mm:ss
Response MessageresperrString(128)Text description of the result
Order AmounttxamtInt(11)Transaction amount
Debug InforespmsgString(128)Optional technical message for debugging
External Order IDout_trade_noString(128)Matches request value
QFPay Order IDsyssnString(40)QFPay-generated transaction ID
Response CoderespcdString(4)0000 = success, 1143/1145 = pending. See Response Codes.
Payment URLpay_urlString(512)The generated payment URL. Can be used to generate QR code on desktop UI.