Skip to main content

Asynchronous notification and synchronous return


  • The server returns after receiving the payment notification from the payment provider.
  • Asynchronous notifications need to provide the interface URL for us to configure in the background, or upload the parameter notify_url when pre-ordering; synchronous returns need to upload the parameter return_url when pre-ordering.
    Note: OCT, FDMS, JETCOHK currently have no asynchronous notifications, only synchronous notifications, online UnionPay only notifies once, please call the query to get the order status.
  • The request parameters of the asynchronous notification merchant interface and the synchronous return merchant page, where the Content-Type of the asynchronous notification merchant interface is application/json, and the Content-Type of the synchronous return merchant page is x-www-form-urlencode, POST submission method returns to the merchant for receiving and processing.
  • After receiving the asynchronous notification, you must return the response parameters to inform that the notification has been successfully received and processed. If it is a synchronous return, the merchant does not need to return.

Info

Need to provide notify_url / return_url when placing an order

NameTypeDescriptionRequirement
notify_typeString(30)Notification type
Fixed:trade_status_sync
user_confirm_keyStringUser Key, provided by eftPay
trade_noString(64)Payment provider's order number
transaction_idString(64)Payment provider's order number
out_trade_noString(28)Merchant order number
eft_trade_noString(28)eftPay order number
eftpay_trade_noString(28)eftPay order number
total_feeString(8)Amount
currencyString(5)Currency type
trade_statusString(32)Transaction status, see Appendix 2
gmt_paymentStringTransaction time, format:yyyy-MM-dd HH:mm:ss
walletString(20)Wallet type
tidString(20)Merchant terminal number
trade_typeString(10)Transaction type
SALE
card_schemeString(8)Card type, returned by Mpgs transaction configuration. Such as:VISA/MASTERCARD
card_numberString(8)Card number, returned by Mpgs transaction configuration
timeStringTime, format:yyyyMMddHHmmss
signString(64)Signature

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

The following parameters must be returned after receiving the asynchronous transaction notification

NameTypeDescriptionRequirement
return_codeString(10)Return code
success/false
timeStringTime, format: yyyyMMddHHmmss
signString(64)Signature

{
    "notify_type": "trade_status_sync",
    "user_confirm_key": "12345678",
    "trade_no": "2019082422001386450540290447",
    "out_trade_no": "20190824021916",
    "eft_trade_no": "08520005269190824021901723",
    "total_fee": "0.02",
    "currency": "HKD",
    "trade_status": "TRADE_SUCCESS",
    "sign": "d37d17a7243b2ae49a865275531a9a7c42f80623e673d0ccf5a79ef62bf14913",
    "time": "20190824022030",
    "gmt_payment": "2019-09-24 02:20:29",
    "wallet": "ALIPAYCN",
    "trade_type": "SALE"
}

{
    "time": "20230609110646",
    "sign": "2c418bfb1085b0cabbf2f5c6de71db0694a5a78b7271b05ca6d5a8b70227ebb2",
    "return_code": "success"
}