Back to Projects

A community-maintained TypeScript SDK for working with Cambodia’s KHQR payment system. Supports generating static and dynamic QR codes, decoding existing QR strings, and validating CRC integrity — all following the EMV QR Code specification.

Features

  • QR Generation — Create static (user-entered amount) and dynamic (fixed amount) KHQR codes for both individual and merchant accounts.
  • QR Decoding & Validation — Parse any KHQR string into structured data and verify its CRC integrity.
  • Bakong API Integration — Type-safe wrappers for all Bakong endpoints including deeplink generation, transaction checks, and account verification.
  • Bilingual Support — Alternate language fields for Khmer/English QR codes.

Design

The SDK uses a Result<T> pattern instead of throwing exceptions, making error handling explicit. Subpath exports (/constants, /helper, /types) allow importing only what you need to minimize bundle size.

Published on npm as @manethpak/khqr-sdk with ESM and CommonJS support. Currently at 6 GitHub stars.

Tech Stack

TypeScriptSDKEMVQR CodeBakongFintech

© 2025 · Maneth Pak

Astro · Vercel