# eTIMS Integration in Kenya: A Developer's View

> What integrating software with KRA eTIMS involves: certification, control unit routes, item classification, offline queues and the states you must handle.

Canonical: https://veirahq.com/blog/etims-api-kenya

Integrating software with eTIMS is less an API problem than a certification and state-handling problem. The calls themselves are not the hard part; being a certified integrator, mapping every item to a tax treatment, and handling the half-dozen states that are not a clean success are. This sets out what the work actually consists of, in the order it tends to bite.

- Certification gates the work: without a control unit signature, the document is a receipt.
- OSCU makes the sale path depend on the network; VSCU moves the complexity into the queue.
- Item classification is schema, not data entry, and deferring it corrupts the return.
- Design idempotency and credit notes in from the start, not after the first duplicate.
- The shop needs to see transmitted against pending without reading logs.

1. Certification comes before code
2. The work, in the order it bites
3. Where integrations go wrong
4. A worked example: the catalogue that was all one rate
5. How Veira handles it
6. Frequently asked questions

## Certification comes before code

Invoices are signed by a [KRA](https://www.kra.go.ke) control unit, and access to one is not something software grants itself. A business can only issue compliant tax invoices through certified software, which means the integration question starts with whether you are, or are working through, a certified integrator.

This is the part teams underestimate. It is entirely possible to build something that produces a beautiful invoice document with a PIN and a QR code on it and is not a tax invoice, because nothing signed it. The QR code has to resolve to KRA&#x27;s record, which only happens if the invoice genuinely went through a control unit.

After that comes the route: OSCU signs each invoice through an online call at the point of sale; VSCU signs locally and transmits in batches. The choice shapes your architecture more than any other decision, because it decides what your system does when the network is gone.

Want to see it running in your own business first?

## The work, in the order it bites

Five areas, roughly in the order teams hit them.

1. 1Taxpayer and device registrationThe business&#x27;s details have to match what KRA holds, and a mismatch surfaces as a rejected invoice rather than as a registration error. Settle this against iTax before debugging anything in code: [KRA PIN requirements](https://veirahq.com/blog/kra-pin-requirements).
2. 2Item classificationEvery product needs a tax treatment, and this is the step most often deferred and most often regretted. A catalogue defaulted to a single rate produces invoices that cannot be reconciled to the return behind them, and fixing it later means correcting invoices rather than correcting data.
3. 3The invoice payloadSupplier identity, buyer identity where it applies, line detail with per-line tax treatment, totals, and the control unit fields that come back. [What a compliant invoice must show](https://veirahq.com/blog/etims-invoice-format) is the functional spec for what your payload has to be able to express.
4. 4Offline behaviourQueue, sign, transmit on reconnect, and keep queued distinguishable from failed. This is most of the engineering: the happy path is short and the recovery paths are not. See [what real time actually means](https://veirahq.com/blog/etims-real-time-transmission).
5. 5CorrectionsAn issued invoice cannot be edited, because KRA holds it. Credit notes referencing the original are the mechanism, and designing for them late means retrofitting a relationship between documents that your schema did not anticipate.

## Where integrations go wrong

### Building the document rather than the invoice

A PDF with a PIN and a QR code is a receipt. Only a control unit signature makes it a tax invoice, and no amount of layout work substitutes.

### Treating offline as an edge case

In Kenya it is a weekly condition, not an edge case. A design where the offline path was added afterwards usually leaks duplicates or loses invoices under exactly the conditions it was added for.

### No idempotency

Retries happen, callbacks repeat, and operators press buttons twice. Without an idempotency key, the result is duplicate invoice numbers at KRA, which is among the more unpleasant things to unwind.

### Deferring item classification

It feels like data entry and it is actually schema. Every invoice line carries a tax treatment, so a catalogue without them cannot produce a correct invoice no matter how good the integration is.

### No visibility for the business

The people running the shop need to see transmitted against pending without reading logs. An integration that is only observable by its developers gets no early warning when a queue stalls: [eTIMS errors](https://veirahq.com/blog/etims-common-errors).

## A worked example: the catalogue that was all one rate

A team integrating a retail system got invoices transmitting within a fortnight. Payloads validated, control unit numbers came back, QR codes resolved. By their measure it was done.

The catalogue had been loaded with every item on a single tax treatment, because classifying several thousand products was scheduled for later and the integration worked without it.

The return was the problem. The figures it produced could not be reconciled to the invoices behind them, and the correction was not a data fix: invoices already at KRA had declared the wrong treatment, and each one needed a credit note and a reissue. The fortnight of integration work was undone by a step that had looked like data entry.

Trading without eTIMS-compliant tax invoices risks KRA penalties, blocked VAT input claims for your customers, and receipts a business buyer cannot expense.

Veira signs every sale to KRA eTIMS automatically, so each receipt is compliant the moment it prints, with no separate device to reconcile.

## How Veira handles it

Veira is a KRA-certified eTIMS integrator, so a business using it is not building any of the above: the invoice is signed and transmitted as part of the sale, and the control unit evidence on the receipt is there because the invoice genuinely went through a control unit.

Products carry their own tax treatment, so a mixed basket is invoiced correctly line by line, and corrections go out as credit notes against the original invoice rather than as a second version of it.

Selling continues when the connection does not, with queued and transmitted visible to the person running the shop rather than only to a developer.

## Frequently asked questions

The eTIMS integration problem is certification, classification and state handling rather than endpoints. Settle which control unit route you are on, classify the catalogue before you go live, and design the queue and the credit note in from the start.

For more eTIMS guides and compliance resources, [visit our free resource site](https://sites.google.com/view/etims-compliance-veira-pos/home).

## Keep reading

[See all eTIMS guides](https://veirahq.com/blog/etims)

## Veira for your business

[Browse Veira by business type](https://veirahq.com/solutions) · [Who we serve](https://veirahq.com/industries)

Veira files a compliant invoice on every sale and keeps selling when the line drops.
