SDK / 1.1 Bakong payment infrastructure

From code to
countertop.

Generate compliant KHQR payment codes and validate live Bakong transactions from one focused TypeScript toolkit.

KHQR / PAYMENT REQUEST READY
QR
PAY TOManeth Pak AMOUNT៛ 1,000 maneth_pak@aclb
EMV® compliantCRC verifiedKH / 116
A payment primitive,
not another platform.
01Generate

Static and dynamic KHQR strings with typed payment data.

02Verify

Decode payloads and validate CRC integrity before use.

03Track

Query Bakong by MD5 or short hash to confirm payment.

QUICK START Minimal surface area

One client.
A complete flow.

Strong types, explicit results, and no framework lock-in. Move from installation to a scannable code in minutes.

$pnpm add @manethpak/khqr-sdk
payment.tsTypeScript · SDK
import { createKHQR } from '@manethpak/khqr-sdk'

const khqr = createKHQR({
  baseURL: 'https://api-bakong.nbc.gov.kh',
  authToken: process.env.BAKONG_TOKEN
})

const payment = khqr.qr.generateKHQR({
  bakongAccountID: 'coffee@aclb',
  merchantName: 'Tonlé Coffee',
  merchantCity: 'Phnom Penh',
  amount: 24000,
  currency: 'KHR'
})

console.log(payment.result?.qr)
console.log(payment.result?.md5)

PAYMENT LOOP Three clear steps

Generate.
Scan. Confirm.

01
Create a request

Pass merchant and transaction details through the typed generator.

02
Present the code

Render the EMV payload at checkout or in your own interface.

03
Verify settlement

Use the returned hash to query payment status through Bakong.

Ready to test the full loop?

Build your first KHQR.

Launch QR Studio ↗Explore the API Console →