Electronic Invoicing System API v1
Developers Guide
×
Menu
Index

1.1. Overview

 
Overview
 
The figure shows a high level life cycle of Electronic Invoicing System (EIS). Taxpayers will start by making an application for a terminal, this process is called the Terminal Acquisition. The taxpayer will login to a portal hosted by MRA where they can apply for terminals. At the end of the terminal acquisition process, the tax payer will be issued a Terminal Activation Code(TAC)  which will be used when activating their Point Of Sale System.
 
The terminal (POS software) will get activated through the API hosted at MRA. The API has exposed necessary endpoint to facilitate terminal onboarding. In principle, the Terminal Activation Code  and a few other parameters will be sent to MRA terminal activation endpoint which will internally validate the TAC and return configurations that must be saved on the terminal for subsequent communication with MRA. Once the configuration details are saved on the terminal, a new request will be sent by the terminal to confirm that the terminal has been configured. Once the confirmation is received, the TAC expires and can not be used to get any activation configuration from MRA.
 
Once the device is activated, it is expected that it should regularly check for any changes in the configuration through the getLatestConfig end point. At minimum, it is mandatory that at the beginning of the day and/or every time the terminal gets (re)started, the end point must be called.
 
During the business day, the terminal can be used to make sales and for every receipt, an API call MUST be made to inform MRA of the sale. MRA will respond with an invoice validation signature which must be converted to a QRCode that will appear at the bottom of a receipt. For terminals certified to work offline, transactions can be queued offline (eg in an embedded portable database) if there is any connectivity challenge with MRA APIs. Since receipts need to have a QRCode printed at the bottom, the offline transactions will have a light weight algorithm that will enable terminals generate a QRCode that can be validated. The algorithm will make use of terminal specific keys that will be provided by MRA through configuration from the device onboarding process. Once connectivity is restored, the offline queue will need to be pushed to MRA.
MRA has provided 2 additional end points that will enable terminals to view the last online transaction and last offline transaction submitted by the terminal.
 
The EIS API has provided additional endpoints under utilities. At the time of writting this documentation, the following utility end points are available;
1. Validation of TIN : To enable the validation of a TIN incase the terminal support registration of customers
2. Ping : To enable terminals check if MRA API is up and running.
3. Product Status : To check the status of a product if it is mapped to a standardized category code defined by MRA. This will also respond with stock levels.