Integration

API Integration

Connect to upstream + downstream APIs without spreadsheet middlemen. Banking APIs (ABA, Wing, Bakong), government e-invoicing (CamInvoice), logistics (J&T, DHL, Speedoo), payment gateways, and any third-party SaaS your business relies on.

Back to Integration

What does API integration cover in Cambodia?

API integration connects your system to the services that have an API: banking APIs (ABA, Wing, Bakong), payment gateways, logistics (J&T, DHL, Speedoo), any third-party SaaS your business relies on and, from government, CamInvoice. GDT's monthly return is not one of them. GDT has no API. Your accountant files the return through GDT's E-Filing system or the GDT Taxpayer App.

The two government systems work differently. CamInvoice is run by the General Department of Digital Economy (GDDE), under the Ministry of Economy and Finance, not by GDT. It launched publicly on 12 May 2025 and works invoice by invoice, through an API. The GDT monthly return carries VAT, withholding tax, Tax on Salary and the 1% prepayment of income tax. It is filed by a person, by the 25th of the following month electronically or the 20th on paper. Our guide to GDT filing covers the return.

So for GDT we build filing-ready figures, not a connection. The accounting systems we build keep the books in KHR at the official rate and produce the monthly return figures and the sales and purchase lists, ready for your accountant to file through GDT's E-Filing.

Your systemInvoiceFiling-ready figuresAPICamInvoiceInvoice by invoiceNo APIYour accountantGDT monthly returnFiled by a person
Your systemInvoiceAPICamInvoiceInvoice by invoiceNo APIFiling-ready figuresYour accountantGDT monthly returnFiled by a person
fig. 01 · two government systems: one has an API, the other is filed by a person

How does a CamInvoice integration work?

The adapter maps each invoice to UBL 2.1 XML, authenticates with OAuth 2.0 and submits the document through the CamInvoice API. CamInvoice validates the invoice and attests it on the CamDL ledger. The reference that comes back is written to the invoice record. GDDE publishes the API documentation at developer.e-invoice.gov.kh.

CamInvoice is mandatory for suppliers invoicing the central-level units of the ministries and institutions named in four MEF circulars, twenty-eight as of 1 June 2026, for invoices under public procurement procedure. State-owned enterprises are not named. Between businesses CamInvoice is voluntary, and we found no published mandate date.

Onboarding runs through GDDE and is free of charge. A business connecting its own system meets the operator, signs an NDA, builds the integration, demonstrates the system and signs an MOU. A supplier of ERP or accounting systems submits an application form, signs an NDA, completes technical testing and signs a contract. Our CamInvoice integration guide covers both routes. Once GDDE has issued the base URL and client credentials, each invoice takes five steps.

  1. Map: invoice fields are mapped to UBL 2.1 XML. The API takes invoices, credit notes and debit notes.

  2. Authenticate: OAuth 2.0, with a client ID and secret. Access tokens expire after 15 minutes and are renewed with a refresh token.

  3. Submit: the document is submitted Base64-encoded. There is no signing step on the sender's side.

  4. Validate and attest: CamInvoice checks the XML structure, the UBL fields, GDT rules and e-KYB, then hashes the validated invoice and stores it on the CamDL ledger.

  5. Write back: CamInvoice returns a document ID and a verification link, and notifies the sender's and receiver's systems by webhook. The adapter writes the reference to the invoice record.

What does an integration project look like?

An integration project runs in five phases: discovery and mapping, build, end-to-end test, UAT, then go-live and monitoring. A single integration takes 4–8 weeks. For CamInvoice, a single-system SMB integration takes 6–13 weeks, because onboarding with GDDE runs beside the build. Adapter development for a single source system (one ERP, one entity, one currency) typically takes 3–5 weeks, and a multi-system or multi-currency scope adds 4–8 weeks.

GDDE gives no lead time for onboarding, so treat any timeline you are quoted, ours included, as indicative. The five phases are the same whichever service is on the other end: a bank, a payment gateway, a logistics carrier or CamInvoice.

  1. Discovery and mapping: we document your invoice flow, VAT codes and withholding tax codes, map every source field to the target schema, and flag gaps.

  2. Build: we build the adapter in TypeScript/Node, with retry logic, error alerting (email and Telegram) and an audit log table.

  3. End-to-end test: we run 30 days of historical invoices through the adapter's mapping and checks, reconcile totals and fix edge cases. Your accountant validates the output.

  4. UAT: your team runs its own invoices through the adapter alongside your existing process, before anything is submitted for real. We resolve any discrepancies before cutover.

  5. Go-live and monitoring: the adapter runs in production. We monitor submission success rate and error queues for the first 30 days, then hand over with runbook documentation.

0w4w8w12w16w20wSingle-system SMB6–13 weeksAdapter development3–5 weeksMulti-system or multi-currencyadds 4–8 weeks
Single-system SMB6–13 weeksAdapter development3–5 weeksMulti-system or multi-currencyadds 4–8 weeks0w4w8w12w16w20w
fig. 02 · how long a CamInvoice integration takes, in weeks

Common pitfalls when integrating CamInvoice

Five pitfalls are worth catching during discovery. Four of them become checks the adapter makes on each invoice before it is submitted. The fifth is when onboarding starts.

  • KHR rounding drift: tax is reported in KHR. If your system rounds each line and the adapter rounds the total again, the two disagree by a riel. The check: KHR rounded once, at the total, after summing exact line amounts.
  • USD invoice with no rate: an invoice may be in a foreign currency, but tax is reported in KHR, so an invoice not in KHR must carry a tax exchange rate. The check: tax exchange rate set on every invoice that is not in KHR.
  • Buyer's TIN not checked: the API has a validate-taxpayer call that takes a TIN, a single ID and the company names, and returns whether they match. The check: buyer's TIN validated before submission. An invoice that fails goes to a manual queue, not to CamInvoice.
  • The 15 minute token: access tokens expire after 15 minutes. The check: access token renewed with the refresh token before the adapter submits.
  • Onboarding started late: GDDE's route puts a meeting with the operator and an NDA before integration, and GDDE gives no lead time. Start onboarding on day one.
InvoiceKHR rounded onceTax exchange rate setBuyer's TIN validatedAccess token renewedCamInvoiceManual queue
InvoiceKHR rounded onceTax exchange rate setBuyer's TIN validatedAccess token renewedCamInvoiceManual queue
fig. 03 · four checks the adapter makes on each invoice before it is submitted
FAQ

Frequently asked questions: API integration

Does GDT have an API?

No. GDT has no API, and there is no separate GDT system called e-VAT. VAT, withholding tax, Tax on Salary and the 1% prepayment of income tax sit on one monthly return. A person files it, your accountant or finance team, through GDT's E-Filing system or the GDT Taxpayer App. The government system that does have an API is CamInvoice, run by GDDE.

What do you build for GDT filing, then?

Filing-ready figures. The system we build keeps the books in KHR at the official rate and produces the monthly return figures and the sales and purchase lists, ready for your accountant to file through GDT's E-Filing. The deadline is the 25th of the following month when filed electronically, the 20th on paper.

What is the difference between GDT's monthly return and CamInvoice?

GDT's monthly return is one return for the month, filed by a person. CamInvoice is a separate platform, run by GDDE and launched publicly on 12 May 2025. It works document by document, through an API: each invoice, credit note or debit note is submitted as UBL 2.1 XML. We connect a system to CamInvoice. For GDT we produce the figures your accountant files.

Who has to use CamInvoice?

Suppliers invoicing the central-level units of the ministries and institutions named in four MEF circulars, twenty-eight as of 1 June 2026, for invoices under public procurement procedure. State-owned enterprises and sub-national administrations are not named. Between businesses CamInvoice is voluntary, and we found no published mandate date.

Can one integration serve several legal entities?

Yes. Each legal entity is its own CamInvoice member and authorises the connecting system separately, so one integration holds a separate access token for each entity. Each entity also has its own TIN and its own VAT registration. Multi-entity projects are scoped separately, depending on how many entities share one system.

Does the integration keep an audit trail?

Yes. The adapter writes every submission attempt to a log table: invoice ID, timestamp, request payload (sanitised), response, and a success or failure flag. Logs are retained for ten years by default. The Law on Accounting and Auditing 2016 (Article 23) requires accounting records to be kept ten years. The Law on Taxation 2023 (Article 201) requires ten years from medium and large taxpayers, three from small.

What happens when a CamInvoice submission fails?

CamInvoice returns the documents that failed, each with a message. Processing is asynchronous, so results arrive by webhook. A rejected invoice goes to a manual queue for a person to correct. A submission that could not be sent is queued and retried with exponential back-off. Your team receives a Telegram or email alert for any invoice not submitted within 24 hours.

Can banking be part of the same project?

Yes. API integration projects often cover several upstream systems. Banking APIs (ABA, Wing, Bakong), payment gateways and logistics (J&T, DHL, Speedoo) can sit in the same project as CamInvoice, and share the same adapter infrastructure, authentication vault and monitoring dashboard. Each service is scoped in discovery.