CamFinTech
PracticeRegulatoryPublicationsAboutContact

CamFinTech

A fee-only regulatory and compliance practice in Phnom Penh, working on the approvals, compliance programmes and client-side integrations that connect institutions to the Kingdom of Cambodia's national digital infrastructure.

CAMFINTECH CO., LTD. (ខេមហ្វីនថេក ឯ.ក), Private Limited Company, Kingdom of Cambodia

Ministry of Commerce registration no. 1000648818 · Incorporated 9 October 2026

VAT TIN K003-902604575 · General Department of Taxation

Registered office: Room 203, 2nd Floor, BRED Bank Building, No. 30 Preah Norodom Boulevard, Village 9, Sangkat Phsar Thmey 3, Khan Daun Penh, Phnom Penh 12210

Registered activity scope, KHNSIC-2015: 62010 computer programming · 62020 computer consultancy and systems integration · 62090 information-technology advisory · 70200 management consultancy · 85499 professional training.

Publications

  • Regulatory instruments
  • Knowledge base
  • Explainers
  • Insights
  • Engagement scenarios
  • Glossary

Practice

  • Practice
  • Digital-asset service providers
  • How the firm is constituted
  • About
  • Careers
  • The Riel Report
  • Contact
  • Privacy
  • Terms

Fee-only · No client funds held · No rail operated · Reserved work to licensed professionals

© 2024–2026 CamFinTech. Established 2024, Phnom Penh.

  1. CamFinTech
  2. /
  3. Knowledge Base
  4. /
  5. Bakong Technical Integration Guide for Enterprise Developers
Knowledge Base

Bakong Technical Integration Guide for Enterprise Developers

Bakong is the National Bank of Cambodia's national payment system, and its members are banks, microfinance institutions and payment service institutions: 69 at the end of 2024, 60 of them live. An enterprise that is not a member reaches Bakong in two ways. Payments themselves move through a member institution, under that institution's own API and terms. Alongside that, the NBC publishes a public developer toolkit for KHQR: a format guideline, an SDK for generating and verifying codes, and the Bakong Open API for checking whether a KHQR payment has been made. This guide sets out what those NBC documents specify, endpoint by endpoint, and is explicit about what they leave to the member institution.

Updated November 2026·8 min read

The Bakong Open API provides eight calls: request token, verify token, renew token, generate deeplink by QR, check transaction status by MD5, by full hash or by short hash, and check a Bakong account, the last added in version 1.0.2. Responses carry a response code of 0 for success or 1 for failure and a numbered error code.

— National Bank of Cambodia, Bakong Open API Document v1.0.2 (4 November 2021), pp. 2-4, 2021

In the NBC's dynamic KHQR flow, the merchant's back end generates a KHQR code with the NBC's KHQR SDK, following the EMVCo QR standard, and displays it with an expiration time; the merchant then checks the transaction status with Bakong at intervals, and Bakong responds with a status such as success or failed.

— National Bank of Cambodia, QR Payment Integration, v1.0.3 (6 August 2021), product flow, 2021

Two Ways In

An enterprise integrating with Bakong works on two surfaces, and they should not be confused. The first is the member institution, the bank or payment service institution that holds the enterprise's account and moves its money. Its API, credentials, settlement terms, statements and any notifications are its own, and they are documented by that institution, not by the NBC. The second is the NBC's public KHQR toolkit: a format guideline, an SDK and the Bakong Open API. It lets the enterprise generate KHQR codes correctly and check whether they have been paid, but it does not initiate or settle payments. Most merchant and e-commerce integrations use both: the toolkit at the point of payment, and the member institution's statements for settlement and reconciliation. Bakong membership itself, for institutions, is governed by the NBC's Bakong rules in Prakas F14-020-349.

The KHQR Payload

KHQR follows the EMVCo QR code standard for merchant-presented payments, with Cambodian content set by Prakas F14-020-351 and the KHQR Content Guideline. The payload is a series of tag-length-value fields: a two-digit tag, a two-digit length and the value. The Guideline's examples show the fields below; the point-of-initiation method distinguishes a static code (11) from a dynamic one (12), and the final field is a CRC checksum computed over everything before it.
KHQR fields in the NBC's examples (KHQR Content Guideline v1.3; Bakong Open API Document v1.0.2)
TagFieldExample from the NBC documents
00Payload format indicator000201 (version 01)
01Point of initiation method010211 (static) / 010212 (dynamic)
29Merchant account information (individual or solo merchant)Bakong account information
53Transaction currency5303116 (Khmer riel)
59Merchant name5917Lucky Supermarket
60Merchant city6010Phnom Penh
62Additional dataFree-text reference, as in the Open API deeplink sample
63CRC checksum6304 followed by four hexadecimal digits

Generating Codes with the KHQR SDK

The NBC's KHQR SDK generates, decodes and verifies KHQR codes. Version 2.9 of its documentation, dated May 2025, gives examples for Java (via Maven or Gradle), iOS (Swift) and JavaScript. It distinguishes individual and merchant codes, supports an alternate-language merchant name and city in Khmer, and returns an MD5 hash with each generated code, which is the key used to check payment status. In the NBC's integration flow, the merchant's back end generates the code with a unique transaction reference, returns it to the client with its expiry time, and the client displays it. Generating on the server keeps account information and references under the merchant's control, and lets the same service that issued a code also check it.

The Bakong Open API: Access and Endpoints

Access to the Bakong Open API starts with registration. The integrator calls request-token with an email address (up to 30 characters), organisation name and project name; a 20-character verification code is sent to that email; and the verify call exchanges the code for an access token. When the token expires, renew-token issues a new one. Status checks send the token as a Bearer authorization header. Every response carries a response code, 0 for success and 1 for failure, a numbered error code and a message. The API also returns standard HTTP codes, including 429 for too many requests, so a client should back off rather than retry immediately.
Bakong Open API endpoints (Bakong Open API Document v1.0.2)
CallEndpointPurpose
Request tokenPOST /v1/request_tokenRegister email, organisation and project; a verification code is emailed
Verify tokenPOST /v1/verifyExchange the 20-character code for an access token
Renew tokenPOST /v1/renew_tokenIssue a new token when the previous one expires
Generate deeplinkPOST /v1/generate_deeplink_by_qrTurn a KHQR string into a short link that opens a payment app
Check transaction by MD5POST /v1/check_transaction_by_md5Status of a payment by the MD5 hash of its KHQR string
Check transaction by full hashPOST /v1/check_transaction_by_hashStatus of a payment by its transaction hash
Check transaction by short hashPOST /v1/check_transaction_by_short_hashStatus of a payment by a shortened hash
Check Bakong accountAdded in v1.0.2Confirm a Bakong account

Checking Payment Status and Handling Errors

A successful MD5 check returns the transaction hash, the from and to account identifiers, the currency, the amount and an optional description. The integration guide asks that a status check complete within 10 seconds, with a manual check as the fallback, and leaves the code's expiry time to the integrator. The error codes are few and specific, and each calls for a different response. Error 1 usually means the customer has not yet paid: keep polling until the code expires. Error 3 is a definite failure: tell the customer and offer a new code. Error 2 means a static code was sent to an endpoint that only handles dynamic ones. Errors 6 and 10 are credential problems, to fix rather than retry.
Bakong Open API error codes (Bakong Open API Document v1.0.2, p. 4)
CodeMessage
1Transaction could not be found. Please try again.
2Sorry, the system does not support static QR code.
3Transaction failed.
4Error occurred on requesting deeplink from provider.
5Missing required fields.
6Unauthorized.
7Email server has been down.
8Email has been registered already.
9Cannot connect to server. Please try again later.
10Not registered yet.

Deeplinks for Mobile Payments

On a phone, a customer cannot scan a QR code displayed on the same screen. The generate-deeplink call solves this: it takes the KHQR string, plus the merchant app's name, icon and a callback deeplink to return to after payment, and returns a short link that opens the payment in a banking app. The documentation notes that the short link is different every time the call is made, so it should be generated per payment and not cached.

Reconciliation

The NBC toolkit gives each dynamic payment two identifiers: the merchant's own transaction reference, embedded when the code is generated, and the MD5 hash of the code, which the status check uses and which returns the Bakong transaction hash once paid. A sound design stores all three against the order, so that every order can be matched to exactly one payment. The member institution's statements remain the settlement record. Daily reconciliation should match the merchant's orders, the statuses returned by the Open API, and the institution's statement, and flag anything that appears in one and not the others. The cut-off times, file formats and fee lines of those statements are set by the institution.

What the NBC Documents Do Not Cover

The NBC's public documents read for this guide do not specify webhooks or push notifications, a sandbox or test environment, service levels or maintenance windows, rate limits beyond the HTTP 429 response, settlement timing, or the transaction limits and operating hours of the cross-border QR links. Those are matters for the member institution's documentation and agreement, and an enterprise should obtain them in writing before designing around them. The cross-border links themselves are recorded in the NBC's 2024 payment-system report: Thailand from February 2020, Laos and Vietnam from 2023, South Korea and Malaysia from 2024, and the UnionPay and Alipay+ networks. They are QR payment links, which let a visitor pay a Cambodian merchant from a home-country app, not remittance services.

Frequently Asked Questions

Related Reading

  • What is Bakong?Glossary
  • What is KHQR?Glossary
  • How Does Bakong Work in Cambodia?Learn

Official sources

  • National Bank of Cambodia — Bakong Open API Document, v1.0.2, November 2021 (PDF)
  • National Bank of Cambodia — QR Payment Integration, v1.0.3, 6 August 2021 (PDF)
  • National Bank of Cambodia — KHQR SDK Document, v2.9, May 2025 (PDF)
  • National Bank of Cambodia — KHQR Content Guideline v1.3, November 2020 (PDF)
  • National Bank of Cambodia — Prakas F14-020-349 on the Bakong system rules and procedures, June 2020 (Khmer, PDF)
  • National Bank of Cambodia — Prakas F14-020-351 on the KHQR Code technical specification, June 2020 (Khmer, PDF)
  • National Bank of Cambodia — Project Bakong: Next Generation Payment System, white paper, June 2020 (PDF)
  • National Bank of Cambodia — Annual Report on the Payment System in Cambodia 2024 (Khmer, PDF, Open Development Cambodia copy)

Links last checked on 2026-11-15. Home pages are starting points, not citations for a specific statement on this page.

Regulatory instruments

  • B14-017-161 P.K — Prakas on the Management of Payment Service Institutions

How CamFinTech Can Help

Core Rail Integrations

  • CamDX / eKYC Enablement
  • Bakong / KHQR Integration
  • CamInvoice Readiness
  • CamInvoice SP-Enablement

Strategic Services

  • Licensing-Readiness
  • Market-Entry Consulting

Risk & Security

  • AML-Programme Design
  • Security / Pentesting
  • Data-Protection Protocols
  • DASP Approval-Readiness· flagship

Enablement

  • Professional Training & Knowledge Transfer

Fee-only. We build the client-side integration ourselves, or bring in a platform specialist as a disclosed sub-contract. We never hold client funds and never operate a rail.

Book a Consultation
← All Knowledge Base articles