Kenya Compliance via DigiTax integrates ERPNext with the Kenya Revenue Authority (KRA) eTIMS platform through DigiTax, allowing tax-related transactions to be processed and transmitted automatically as part of normal ERP workflows.
The integration is designed to work in the background with minimal user intervention while ensuring that transactions remain compliant with KRA requirements.
High-Level Flow
The integration follows a structured transaction flow between ERPNext, DigiTax, and KRA eTIMS.
Step 1: Transaction Creation in ERPNext
A user creates or submits a transaction in ERPNext, such as:
- Sales Invoice
- Credit Note
- Item Registration
- Customer Registration
The application validates the transaction and checks whether it qualifies for eTIMS submission.
Step 2: Payload Preparation
Once the transaction is validated, the integration prepares a structured payload formatted according to DigiTax and KRA eTIMS requirements.
Step 3: Secure API Communication
The prepared payload is securely transmitted from ERPNext to DigiTax using authenticated API requests.
DigiTax acts as the middleware layer responsible for interacting with KRA systems.
Step 4: Processing by DigiTax and eTIMS
DigiTax validates the incoming payload and forwards the request to KRA eTIMS for processing.
During this stage:
- Data validation checks are performed
- Tax compliance rules are enforced
- KRA references may be generated
Step 5: Response Handling
After processing, a response is returned back through DigiTax to ERPNext.
The response may include:
- Submission status
- Reference numbers
- QR Url or compliance identifiers
- Validation messages
- Error details (if any)
The response is stored within ERPNext for audit and tracking purposes.
Step 6: ERPNext Transaction Update
The original ERPNext transaction is updated automatically with:
- Compliance status
- Submission timestamps
- Reference information
- Validation outcomes
Users can then monitor the transaction directly from ERPNext.
Background Processing
To improve reliability and performance, many compliance operations may run asynchronously using ERPNext background jobs and queue workers.
This approach helps:
- Prevent delays during invoice submission
- Handle high transaction volumes efficiently
- Retry failed transactions automatically
- Improve system responsiveness
Supported Transaction Types
The integration supports several compliance workflows.
- Sales Transactions: Sales invoices are transmitted to eTIMS for tax reporting and compliance validation.
- Inventory and Item Synchronization: Items and classifications may be synchronized to ensure consistency between ERPNext and compliance systems.
- Customer Management: Customer details are processed and transmitted appropriately.
Error Handling and Retries
If a submission fails due to validation issues, connectivity problems, or API errors, the integration records the failure and preserves the transaction state.
Depending on configuration and workflow:
- Failed submissions can be retried automatically
- Users may manually trigger resubmission
- Detailed logs are maintained for troubleshooting
This ensures that failed compliance operations do not result in data loss.