Wonder

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.

  1. Obtain a payment token: Obtain a valid payment token via get customer payment tokensAPI.
  2. Initiate direct payment: Call create a transactionAPI to pass the payment_token and entry_type = 'mit' in the request body.
  3. Receive webhook notification: Your system confirms the payment result by polling the check transaction statusAPI or receiving webhookDOC.
json
{
 "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.

INFO

Supports Wallet Apps: Wechat Pay, Alipay, X Pay, Pay Me, JKO Pay, FPS, Union Pay (Includes all of Union Pay family wallets, like BOCPay).

  1. Scan customer's payment QR code: Scan the customer's payment QR code using your POS or scanner to read the content.
  2. Initiate direct payment: Call create a transactionAPI to pass consumer_presented_qr_code.
  3. Handle asynchronous results: For some async QR payments, you can call the check transaction statusAPI to actively query the final result.
  4. Receive webhook notification: Your system confirms the payment result by polling the check transaction statusAPI or receiving webhookDOC.
json
{
  "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.

INFO

Supports Wallet Apps: Wechat Pay, Alipay, X Pay, Pay Me, JKO Pay, FPS, Union Pay (Includes all of Union Pay family wallets, like BOCPay).

  1. Generate QR code: Call create a transactionAPI pass merchant_presented_qr_code.
  2. Display QR code: Get payinfo in the response body and can use this string to generate the QR code and to display in your POS or other device.
  3. Customer scan and pay: Customer scan the displayed QR code and confirm to pay.
  4. Get transaction status: Your system confirms the payment result by polling the check transaction statusAPI or receiving webhookDOC.
json
{
  "order": {
    "reference_number": "<your side unique number>",
    "currency": "",
    "charge_fee": "",
    "note": ""
  },
  "payment": {
    "alipay": {
      "amount": "",
      "merchant_presented_qr_code": {
        "payinfo": ""
      }
    }
  }
}
json
"acquirer_response_body": "{\"alipay\":{\"merchant_presented_qr_code\":{\"payinfo\":\"https://qr-acquire.alipay.hk/28100404059zT2Pb8Yve16Hrdb2rZgEv3TPM\"}}}",