KHQR Payment Integration
Personal Project · Payment Integration2026Live payments tested

KHQR Payment Integration

A reusable JavaScript payment integration for live KHQR payments through Bakong, with a responsive checkout and automatic confirmation.

RoleJavaScript Developer
Built with
JavaScriptNode.jsSQLiteBakong Open APIHTML / CSS

What it does

  • Generates dynamic KHQR codes with payment amounts and expiry times.
  • Verifies the receiving account, amount, and currency server-side.
  • Automatically checks payment status every 15 seconds.
  • Stores payment records in SQLite and prevents duplicate transaction reuse.
  • Supports separate demo and live modes while keeping API credentials on the server.
  • Provides a reusable module for Node.js and Next.js projects.

Results

Successfully tested live payments and passed 8 automated tests covering payment verification, expiry, access control, duplicate protection, and concurrent checks.

About the project

I built this project to learn how KHQR payment integration works with the Bakong Open API. It combines a reusable server-side JavaScript module with a responsive checkout interface and SQLite payment records. The module can be reused in Node.js and Next.js projects, with demo and live modes and API credentials kept on the server.