# ABA QR API

## 1. Introduction
The **ABA QR API** is a payment solution that allows businesses to generate dynamic QR codes for customers to scan and pay using **ABA KHQR**, **WeChat Pay**, or **Alipay**.
It enables fast and cashless transactions across multiple digital wallets and banking apps.





<div style="display:flex;gap:16px;overflow-x:auto;padding-bottom:12px;">
<div style="flex:0 0 260px;width:260px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;display:flex;flex-direction:column;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;">
  <div style="height:148px;position:relative;flex-shrink:0;overflow:hidden;">
    
  
![retail-store.svg](https://api.apidog.com/api/v1/projects/831852/resources/377007/image-preview)

      
    <span style="position:absolute;top:10px;left:10px;font-size:10px;font-weight:600;padding:3px 8px;border-radius:5px;letter-spacing:.04em;text-transform:uppercase;background:#bfdbfe;color:#0c447c;">In-store API</span>
  </div>
  <div style="padding:14px 16px;display:flex;flex-direction:column;gap:8px;flex:1;">
    <p style="margin:0;font-size:13px;font-weight:600;color:#0f172a;line-height:1.3;">Retail store solutions</p>
    <p style="margin:0;color:#475569;font-size:12px;line-height:1.5;flex:1;">Generate face-to-face payment codes at counters to link cashier systems with customer mobile wallets in real time.</p>
    <a href="/qr-api-14530840e0" style="display:inline-block;font-size:11px;font-weight:600;text-decoration:none;padding:4px 10px;border-radius:6px;border:1px solid #185fa5;color:#185fa5;width:fit-content;">View API docs &rarr;</a>
   
      
  </div>
</div>
<div style="flex:0 0 260px;width:260px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;display:flex;flex-direction:column;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;">
  <div style="height:148px;position:relative;flex-shrink:0;overflow:hidden;">
   
![self-kiosk.svg](https://api.apidog.com/api/v1/projects/831852/resources/377008/image-preview)
    <span style="position:absolute;top:10px;left:10px;font-size:10px;font-weight:600;padding:3px 8px;border-radius:5px;letter-spacing:.04em;text-transform:uppercase;background:#ddd6fe;color:#3c3489;">Unattended UI</span>
  </div>
  <div style="padding:14px 16px;display:flex;flex-direction:column;gap:8px;flex:1;">
    <p style="margin:0;font-size:13px;font-weight:600;color:#0f172a;line-height:1.3;">Self kiosk service</p>
    <p style="margin:0;color:#475569;font-size:12px;line-height:1.5;flex:1;">Power autonomous ticketing and food ordering terminals with dynamic QR codes and real-time webhook callbacks.</p>
    <a href="/qr-api-14530840e0" style="display:inline-block;font-size:11px;font-weight:600;text-decoration:none;padding:4px 10px;border-radius:6px;border:1px solid #534ab7;color:#534ab7;width:fit-content;">View API docs &rarr;</a>
  </div>
</div>
<div style="flex:0 0 260px;width:260px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;display:flex;flex-direction:column;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;">
  <div style="height:148px;position:relative;flex-shrink:0;overflow:hidden;">
    
![parking-system.svg](https://api.apidog.com/api/v1/projects/831852/resources/377009/image-preview)
    <span style="position:absolute;top:10px;left:10px;font-size:10px;font-weight:600;padding:3px 8px;border-radius:5px;letter-spacing:.04em;text-transform:uppercase;background:#e2e8f0;color:#334155;">IoT hardware</span>
  </div>
  <div style="padding:14px 16px;display:flex;flex-direction:column;gap:8px;flex:1;">
    <p style="margin:0;font-size:13px;font-weight:600;color:#0f172a;line-height:1.3;">Parking systems</p>
    <p style="margin:0;color:#475569;font-size:12px;line-height:1.5;flex:1;">Integrate boom barriers with timestamp-based fee calculations and hardware relay triggers on payment success.</p>
    <a href="/qr-api-14530840e0" style="display:inline-block;font-size:11px;font-weight:600;text-decoration:none;padding:4px 10px;border-radius:6px;border:1px solid #475569;color:#475569;width:fit-content;">View API docs &rarr;</a>
  </div>
</div>
<div style="flex:0 0 260px;width:260px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;display:flex;flex-direction:column;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;">
  <div style="height:148px;position:relative;flex-shrink:0;overflow:hidden;">
   
![massage-chair.svg](https://api.apidog.com/api/v1/projects/831852/resources/377010/image-preview)
    <span style="position:absolute;top:10px;left:10px;font-size:10px;font-weight:600;padding:3px 8px;border-radius:5px;letter-spacing:.04em;text-transform:uppercase;background:#fed7aa;color:#9a3412;">Micro-transactions</span>
  </div>
  <div style="padding:14px 16px;display:flex;flex-direction:column;gap:8px;flex:1;">
    <p style="margin:0;font-size:13px;font-weight:600;color:#0f172a;line-height:1.3;">Massage chair nodes</p>
    <p style="margin:0;color:#475569;font-size:12px;line-height:1.5;flex:1;">Enable micro-payments with low-latency firmware callbacks that activate mechanical timers on payment confirmation.</p>
    <a href="/qr-api-14530840e0" style="display:inline-block;font-size:11px;font-weight:600;text-decoration:none;padding:4px 10px;border-radius:6px;border:1px solid #854f0b;color:#854f0b;width:fit-content;">View API docs &rarr;</a>
  </div>
</div>
<div style="flex:0 0 260px;width:260px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;display:flex;flex-direction:column;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;">
  <div style="height:148px;position:relative;flex-shrink:0;overflow:hidden;">
   
![smart-vending.svg](https://api.apidog.com/api/v1/projects/831852/resources/377011/image-preview)
    <span style="position:absolute;top:10px;left:10px;font-size:10px;font-weight:600;padding:3px 8px;border-radius:5px;letter-spacing:.04em;text-transform:uppercase;background:#bbf7d0;color:#14532d;">Instant dispense</span>
  </div>
  <div style="padding:14px 16px;display:flex;flex-direction:column;gap:8px;flex:1;">
    <p style="margin:0;font-size:13px;font-weight:600;color:#0f172a;line-height:1.3;">Smart vending slots</p>
    <p style="margin:0;color:#475569;font-size:12px;line-height:1.5;flex:1;">Map inventory units to payment intents and trigger product release via slot allocation callbacks on checkout.</p>
    <a href="#vending" style="display:inline-block;font-size:11px;font-weight:600;text-decoration:none;padding:4px 10px;border-radius:6px;border:1px solid #3b6d11;color:#3b6d11;width:fit-content;">View API docs &rarr;</a>
  </div>
</div>
<div style="flex:0 0 260px;width:260px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;display:flex;flex-direction:column;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;">
  <div style="height:148px;position:relative;flex-shrink:0;overflow:hidden;">
    
![self-laundry.svg](https://api.apidog.com/api/v1/projects/831852/resources/377012/image-preview)
    <span style="position:absolute;top:10px;left:10px;font-size:10px;font-weight:600;padding:3px 8px;border-radius:5px;letter-spacing:.04em;text-transform:uppercase;background:#99f6e4;color:#134e4a;">App & hardware</span>
  </div>
  <div style="padding:14px 16px;display:flex;flex-direction:column;gap:8px;flex:1;">
    <p style="margin:0;font-size:13px;font-weight:600;color:#0f172a;line-height:1.3;">Self laundry service</p>
    <p style="margin:0;color:#475569;font-size:12px;line-height:1.5;flex:1;">Deploy automated laundromats — scan a hub QR to authenticate and activate a specific washer via digital triggers.</p>
    <a href="/qr-api-14530840e0" style="display:inline-block;font-size:11px;font-weight:600;text-decoration:none;padding:4px 10px;border-radius:6px;border:1px solid #0f6e56;color:#0f6e56;width:fit-content;">View API docs &rarr;</a>
  </div>
</div>
</div>

## 2. Set up your QR display UI
To ensure a smooth payment experience, your platform **must** include a UI to accommodate QR payment acceptance. This includes:
- A screen for customers to choose the payment options you offer (ABA PAY, WeChat or Alipay).
- An area to display the generated QR code for payment
- A confirmation/success screen after the payment is completed.

:::caution[]
You **must** follow **[PayWay QR payment display guidelines](https://www.figma.com/design/5AJmZJwZha5QFfpIKmREBr/Displaying-Payment-QR-Code---Integration-Guideline?node-id=0-320&t=xB5i9Lf49UCKU6t7-4)** to ensure proper QR placement. 
:::

## 3. Integration steps

:::tip[]
Before you start, make sure you have the following:
-  PayWay Sandbox Account – **[Register here](https://sandbox.payway.com.kh/register-sandbox/)** to test transactions.
-  Sandbox Merchant ID & API Key – You will receive these via email after registering for the sandbox.
:::


To integrate QR on Display, follow these steps:


<Steps>
  <Step title="Generate a QR Code (QR Payment API)">
Use the **[QR Payment API](https://developer.payway.com.kh/qr-api-14530840e0.md)** to generate a payment QR code and display it where customers can scan and pay. 
      
      Upon a successful request, the API will respond with a JSON object containing all necessary information, which you can display in your preferred payment interface.

**Sample Response**
      
```json
{
  "qrString": "000201010212...9",
  "qrImage": "data:image/png;base64, ---REMOVED DATA---",
  "abapay_deeplink": "abamobilebank://ababank.com?...63041A49",
  "app_store": "https://itunes.apple.com/a...0649?mt=8",
  "play_store": "https://play.google.com/...com.paygo24.ibank",
  "amount": 0.01,
  "currency": "USD",
  "status": {
    "code": "0",
    "message": "Success.",
    "trace_id": "65bdc1fde8eea8254a437e51b606b328"
  }
}
```
#### **Customize QR Image Template (Optional)**
      
      The `qrImage` comes with various options to suit your needs. Please check API document ([QR API](https://developer.payway.com.kh/qr-api-14530840e0.md)) on how to customize the `qrImage`.
    

      :::warning[]
      
      The QR images included with the templates are high-resolution and can be up to 0.5 MB in size, which may cause network issues during download.

If  your production environments has  internet constraints or if network optimization is needed, we recommend using the QR string to generate the QR code on your end. Use the KHQR frame template as a static frame for display.

:::
      
      
![template1.png](https://api.apidog.com/api/v1/projects/831852/resources/363894/image-preview)

![template2.png](https://api.apidog.com/api/v1/projects/831852/resources/363897/image-preview)

![template3.png](https://api.apidog.com/api/v1/projects/831852/resources/363896/image-preview)
      
![template4.png](https://api.apidog.com/api/v1/projects/831852/resources/363899/image-preview)

![template5.png](https://api.apidog.com/api/v1/projects/831852/resources/363895/image-preview)


![template6.jpg](https://api.apidog.com/api/v1/projects/831852/resources/368430/image-preview)



      

  </Step>
  <Step title="Handle Callback URL for payment status updates">
      
      Once a payment is made using the QR code, the payment gateway will send a payment notification to your `callback_url`.
      
       Your `callback_url` must accept HTTP `POST` method.
      
      Here is the sample response of pushback notification:
      ```json
      {
          "tran_id": "123456789",
          "apv": 123456,
          "status": "0",
          "merchant_ref_no": "ref0001"
      }
      ```
      ------
      tran_id  `string` 
      Payment transaction ID generated by the payment gateway.
      `Max. Lenght: 20`
      
      -----
      apv `int`
      Transaction approval code.
      `Length: 6`
      
      ---
      status `string`
      Request status `00`
      
      ---
      merchant_ref_no `string`
      Your payment link reference number.
      
      ---
   

      
  </Step>
    <Step title="Verify Payment Status">
        
        In addition to verifying the payment status via `callback_url`, you must also use the **[Check transaction API](https://developer.payway.com.kh/check-transaction-14530826e0.md)** to ensure the payment is successfully marked as `PAID` and was processed correctly.


  </Step>
</Steps>




