Developer Suite
Register Sandbox
Register Sandbox
  1. ABA QR API
  • Overview
  • API Endpoints
  • Ecommerce Checkout
    • Purchase
      POST
    • Get a transaction details
      POST
    • Close transaction
      POST
    • Check transaction
      POST
    • Refund API
      POST
    • Get transaction list
      POST
    • Exchange rate
      POST
  • Checkout Plugins
    • Prestashop
    • Woocommerce
  • Credentials on File
    • Link Account
      POST
    • Link Card
      POST
    • Purchase using token
      POST
    • Remove account token
      POST
    • Remove card token
      POST
    • Get linked account details
      POST
  • ABA QR API
    • QR API
      POST
  • Payment Link
    • Create payment link
      POST
    • Get payment link details
      POST
  • Pre-auth
    • Complete pre-auth transactions
      POST
    • Complete pre-auh transaction with payout
      POST
    • Cancel pre-purchase transaction
      POST
  • Payout
    • Payout
    • Update a beneficiary status
    • Add a beneficiary to whitelist
  • KHQR Guideline
  • Resources
  1. ABA QR API

QR API

POST
/api/payment-gateway/v1/payments/generate-qr
Support both online/instore merchant
Supported payment options
Transaction currency KHR: ABA PAY, KHQR
Transaction curency USD: ABA PAY, KHQR, WeChat and Alipay

Request

Header Params
Content-Type
string 
required
Example:
application/json
Body Params application/json
req_time
string 
required
Request date and time in UTC format as YYYYMMDDHHmmss.
merchant_id
string 
required
A unique merchant key which provided by ABA Bank.
<= 30 characters
tran_id
string 
required
This is the unique transaction ID that identifies the transaction.
<= 20 characters
first_name
string 
optional
Payer's first name.
<= 20 characters
last_name
string 
optional
Payer's last name.
<= 20 characters
email
string 
optional
Payer's email address.
<= 50 characters
phone
string 
optional
Payer's phone number.
<= 20 characters
amount
number 
required
The total transaction amount must be at least 100 KHR or 0.01 USD and cannot be null.
currency
string 
required
Supported transaction currencies: KHR and USD. Not case-sensitive.
<= 3 characters
purchase_type
string 
optional
Supported values: pre-auth and purchase. If the merchant does not provide a value, the default will be purchase.
Note: Alipay & WeChat do not support pre-auth.
<= 20 characters
payment_option
string 
required
Possible payment options:
abapay : PayWay will respond with a proprietary ABA QR, which can only be scanned and paid via ABA Mobile.
abapay_khqr : Payway will response ABA KHQR.
wechat : PayWay will respond with a WeChat QR (only for USD transactions).
alipay : PayWay will respond with an Alipay QR (only for USD transactions).
<= 20 characters
items
string 
optional
Item list description in Base64-encoded JSON format. Maximum of 10 items.
PHP Sample Code
<= 500 characters
callback_url
string 
optional
URL to receive callbacks upon payment completion, encrypted with Base64.
PHP Sample Code
<= 255 characters
return_deeplink
string 
optional
PHP Sample Code
<= 255 characters
custom_fields
string 
optional
Additional custom fields to attach to the QR, encrypted with Base64.
PHP Sample Code
<= 255 characters
return_params
string 
optional
Additional information to include in the pushback once the payment is completed.
PHP Sample Code
payout
string 
optional
Payout instructions in a Base64-encoded JSON string.
PHP Sample Code
<= 255 characters
lifetime
integer 
required
Transaction lifetime in minutes. Default: 30 days.
Minimum: 3 mins
Maximum: 30 days
qr_image_template
string 
required
Refer to KHQR template here
<= 20 characters
hash
string 
required
Base64 encode of hash hmac sha512 encryption of concatenated values req_time,merchant_id,tran_id,amount,items,first_name,last_name,email,phone,purchase_type,payment_option,callback_url,return_deeplink,currency,custom_fields,return_params,payout,lifetime, and qr_image_template
PHP Sample Code
Example
{
    "req_time": "20250312095439",
    "merchant_id": "oldme",
    "tran_id": "20250311033231",
    "first_name": "ABA",
    "last_name": "Bank",
    "email": "aba.bank@gmail.com",
    "phone": "012345678",
    "amount": 0.01,
    "purchase_type": "purchase",
    "payment_option": "abapay_khqr",
    "items": null,
    "currency": "USD",
    "callback_url": "aHR0cHM6Ly9hcGkuY2FsbGJhY2suY29tL25vdGlmeQ==",
    "return_deeplink": null,
    "custom_fields": null,
    "return_params": null,
    "payout": null,
    "lifetime": 6,
    "qr_image_template": "template1",
    "hash": "ZyDmMe/kznbY2e...ZB6tMnqv57V06T13du8807dcbPTg=="
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/payment-gateway/v1/payments/generate-qr' \
--header 'Content-Type: application/json' \
--data-raw '{
    "req_time": "20250312095439",
    "merchant_id": "oldme",
    "tran_id": "20250311033231",
    "first_name": "ABA",
    "last_name": "Bank",
    "email": "aba.bank@gmail.com",
    "phone": "012345678",
    "amount": 0.01,
    "purchase_type": "purchase",
    "payment_option": "abapay_khqr",
    "items": null,
    "currency": "USD",
    "callback_url": "aHR0cHM6Ly9hcGkuY2FsbGJhY2suY29tL25vdGlmeQ==",
    "return_deeplink": null,
    "custom_fields": null,
    "return_params": null,
    "payout": null,
    "lifetime": 6,
    "qr_image_template": "template1",
    "hash": "ZyDmMe/kznbY2e...ZB6tMnqv57V06T13du8807dcbPTg=="
}'

Responses

🟢200Success
application/json
Body
qr_string
string 
required
QR conent as string
qr_image
string 
required
QR as base64 image.
abapay_deeplink
string 
required
ABA Mobile Deeplink. You can use this deeplink to automatically open ABA Mobile so that customer can confim payment.
app_store
string 
required
If you try to open abapay_deeplink and the payer does not have ABA Mobile installed, you can redirect the user to the app store to download ABA Mobile.
play_store
string 
required
If you try to open abapay_deeplink and the payer does not have ABA Mobile installed, you can redirect the user to the play store to download ABA Mobile.
amount
number 
required
Transaction amount.
currency
string 
required
Transaction currency.
status
object 
required
code
string 
required
Possible response codes:
0 : Success.
1 : Wrong Hash.
6 : Requested Domain is not in whitelist.
8 : Something went wrong. Please reach out to our digital support team for assistance
12 : Payment currency is not allowed.
16 : Invalid First Name. It must not contain numbers or special characters or not more than 100 characters.
17 : Invalid Last Name. It must not contain numbers or special characters or not more than 100 characters.
18 : Invalid Phone Number.
19 : Invalid Email.
21 : End of API lifetime.
23 : Selected Payment Option is not enabled for this Merchant Profile.
32 : Service is not enable.
35 : Payout Info is invalid.
44 : Purchase amount has reached transaction limit.
47 : KHR Amount must be greater than 100 KHR.
48 : Something went wrong with requested parameters. Please try again or contact the merchant for help.
96 : Invalid merchant data
102 : The URL is not in the whitelist.
403 : Duplicated Transaction ID
429 : You've reached the maximum attempt limit. Please try again in (min)
message
string 
required
Please see the property reponse code for the details.
tran_id
string 
required
Your unique transaction id
trace_id
string 
required
A unique identifier assigned to a request to help track its journey through a system
Example
{
    "qrString": "00020101021230510016abaakhppxxx@abaa01151250212145328460208ABA Bank52048249530384054040.015802KH5925OLD ME 25 CHAR WINNER IP",
    "qrImage": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgCAYAAACLz2ctAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAOC0lEQVR4nO2deahV1RfHl6ZlaaZ",
    "abapay_deeplink": "abamobilebank://ababank.com?type=payway&qrcode=00020101021230510016abaakhppxxx%40abaa01151250212145328460208ABA+Bank5",
    "app_store": "https://itunes.apple.com/al/app/aba-mobile-bank/id968860649?mt=8",
    "play_store": "https://play.google.com/store/apps/details?id=com.paygo24.ibank",
    "amount": 0.01,
    "currency": "USD",
    "status": {
        "code": "0",
        "message": "Success.",
        "tran_id": "20250311033231",
        "trace_id": "b9f93f45b49f08e26dfcfb8c2da396c6"
    }
}
Previous
ABA QR API
Next
Payment Link