to select ↑↓ to navigate
TIMs INCOTEX Integration

TIMs INCOTEX Integration

How the Intergration Works

The integration follows a five-step lifecycle for every invoice:

Step 1: Invoice Creation The user creates a Sales Invoice in ERPNext as they normally would, filling in customer details, line items, taxes, and the tax category.

Step 2: Invoice Submission to INCOTEX When the user submits (posts) the invoice in ERPNext, a server-side hook fires automatically and sends the invoice payload to the INCOTEX device via its REST API. The correct endpoint is selected based on whether the invoice uses inclusive or exclusive tax pricing.

Step 3: Response Handling INCOTEX responds instantly with a unique submission ID and associated metadata. ERPNext records this response against the invoice.

Step 4: KRA Submission INCOTEX independently forwards the invoice data to KRA's servers and logs KRA's acknowledgment response against the same submission ID it returned to ERPNext. This happens asynchronously on the INCOTEX side.

Step 5: Invoice Update in ERPNext ERPNext updates the Sales Invoice with the following fields:

  • System Invoice Number: the ID returned by INCOTEX
  • CU Invoice Number: the official KRA-assigned control unit number
  • is_filed: a checkbox that gets ticked to indicate the invoice has been successfully submitted
  • Verify URL: a KRA verification link used to generate the QR code

A QR code is then automatically generated from the Verify URL and attached to the invoice for printing.

Important: If the submission to INCOTEX fails for any reason (network issues, device unavailability, etc.), ERPNext will still post the invoice locally and surface the failure reason to the user. The invoice can be re-submitted manually at any time.

Last updated 5 days ago
Was this helpful?
Thanks!