KHQR SDK Demo
Interactive demonstration of the KHQR SDK for Cambodia's Bakong QR payment system. Generate, decode, and test real-world payment flows.
QR Generation
Generate static and dynamic KHQR codes with full EMV compliance
QR Verification
Decode and verify KHQR strings with CRC integrity checks
TypeScript SDK
Fully typed SDK with comprehensive error handling and validation
Quick Example
import { createKHQR } from '@manethpak/khqr-sdk'
const khqr = createKHQR({
baseURL: 'https://api-bakong.nbc.gov.kh',
authToken: 'your_token'
})
// Generate a QR code
const result = khqr.qr.generateKHQR({
bakongAccountID: 'merchant@aclb',
merchantName: 'Coffee Shop',
merchantCity: 'Phnom Penh',
amount: 10000,
currency: 'KHR'
})
console.log(result.result?.qr) // EMV-compliant QR string
console.log(result.result?.md5) // Transaction tracking hash How It Works
1
Merchant Generates QR
Create a static or dynamic QR code with payment details
2
Customer Scans
Customer scans the QR code with their Bakong app
3
Payment Complete
Transaction is verified and funds are transferred