Fluid Payments.
The fastest way to integrate Bakong KHQR into your application. Secure, reliable, and built for scale.
Authentication
No tokens needed. Simply pass your bakong_id parameter in every request.
bakong_id
Create KHQR
Generate a KHQR payment code for customer scanning.
GET/khqr/create
Parameters
- amount number required Payment amount
- bakongid string required Your Bakong account ID (e.g., user@abaa)
- merchantname string required Display name for the merchant
- username string optional Username for tracking (defaults to 'unknown_user')
Example Request
curl "https://api.bakong-api.online/khqr/create?amount=50&bakongid=merchant@abaa&merchantname=My%20Store&username=john"
Example Response
{ "status": true, "message": "success", "qr": "https://api.bakong-api.online/khqr/qr/YvJXiLoT", "qr_stand": "https://api.bakong-api.online/khqr/qr/stand/YvJXiLoT", "md5": "f2bb7310df261ab64e13fc397b0b86f0", "tran": "YvJXiLoT" }
View Image
Direct PNG render of the QR code. Returns a PNG image that can be displayed directly.
Standard QR
GET/khqr/qr/:tran
Example Request
curl "https://api.bakong-api.online/khqr/qr/YvJXiLoT" -o qr.png
QR Stand
GET/khqr/qr/stand/:tran
Example Request
curl "https://api.bakong-api.online/khqr/qr/stand/YvJXiLoT" -o qr-stand.png
Check Status
Verify payment status using transaction ID.
GET/POST/khqr/check/:tran_id
Parameters
- tran_id string required Transaction ID from create response (path parameter)
- bakongid string required Your Bakong account ID (query or body)
Example Request
curl "https://api.bakong-api.online/check/YvJXiLoT?bakongid=merchant@abaa"
Example Response - Success
{ "responseCode": 0, "responseMessage": "Success", "data": { "status": "SUCCESS", "amount": 10.00, "currency": "USD", "hash": "83jhd7..." } }
Example Response - Pending
{ "responseCode": 1, "responseMessage": "Transaction not found", "data": null }
Check by MD5
GET/POST/check_by_md5
Parameters
- md5 string required MD5 hash from create response
- bakongid string required Your Bakong account ID
Example Request
curl "https://api.bakong-api.online/check_by_md5?md5=f2bb7310df261ab64e13fc397b0b86f0&bakongid=merchant@abaa"