Direct Payment
Direct Payment refers to a payment method completed directly via API without UI redirection. Depending on the in-store checkout scenarios, Direct Payment supports the following three modes:
Direct payment via payment token workflow
Directly charges the customer using their saved payment token. Check here for save payment token processDOC.
- Obtain a payment token: Obtain a valid payment token via get customer payment tokensAPI.
- Initiate direct payment: Call create a transactionAPI to pass the
payment_tokenandentry_type = 'mit'in the request body. - Receive webhook notification: Your system confirms the payment result by polling the check transaction statusAPI or receiving webhookDOC.
{
"payment" : {
"payment_token" : {
"amount" : "1.00",
"token" : "<The customer's payment token>",
"consume_mode" : "sales",
"entry_type" : "mit"
}
}
}Direct payment via consumer presented QR code workflow
The customer presents a payment QR code (e.g., WeChat Pay/Alipay), and the merchant scans it to initiate payment.
Supports Wallet Apps: Wechat Pay, Alipay, X Pay, Pay Me, JKO Pay, FPS, Union Pay (Includes all of Union Pay family wallets, like BOCPay).
- Scan customer's payment QR code: Scan the customer's payment QR code using your POS or scanner to read the content.
- Initiate direct payment: Call create a transactionAPI to pass
consumer_presented_qr_code. - Handle asynchronous results: For some async QR payments, you can call the check transaction statusAPI to actively query the final result.
- Receive webhook notification: Your system confirms the payment result by polling the check transaction statusAPI or receiving webhookDOC.
{
"payment" : {
"consumer_presented_qr_code" : {
"amount" : "10.0",
"code_type" : "qrcode",
"content" : "<The customer's qrcode>"
}
}
}Direct payment via merchant presented QR code workflow
Your system generates and displays a payment QR code, and the customer scans it with their mobile wallet to complete payment.
Supports Wallet Apps: Wechat Pay, Alipay, X Pay, Pay Me, JKO Pay, FPS, Union Pay (Includes all of Union Pay family wallets, like BOCPay).
- Generate QR code: Call create a transactionAPI pass
merchant_presented_qr_code. - Display QR code: Get
payinfoin the response body and can use this string to generate the QR code and to display in your POS or other device. - Customer scan and pay: Customer scan the displayed QR code and confirm to pay.
- Get transaction status: Your system confirms the payment result by polling the check transaction statusAPI or receiving webhookDOC.
{
"order": {
"reference_number": "<your side unique number>",
"currency": "",
"charge_fee": "",
"note": ""
},
"payment": {
"alipay": {
"amount": "",
"merchant_presented_qr_code": {
"payinfo": ""
}
}
}
}"acquirer_response_body": "{\"alipay\":{\"merchant_presented_qr_code\":{\"payinfo\":\"https://qr-acquire.alipay.hk/28100404059zT2Pb8Yve16Hrdb2rZgEv3TPM\"}}}",