Grow with Us.
If you have a development team, we offer a simple but proven REST API for your third party POS or applicaiton to issue MRA compliant invoices. The engine to our successful product.
Contact usFree integration API
Introduction (v1)
Welcome to the official API documentation for ebsmauritius.com, the leading e-invoicing solution designed to meet and exceed the compliance requirements of the Mauritius Revenue Authority (MRA). Our API provides seamless integration capabilities for third-party systems such as ERP, billing, and POS platforms, ensuring real-time, legally compliant invoice processing.
The ebsmauritius.com API is developed with adherence to MRA’s electronic invoicing mandates, offering the capability to generate and transmit invoices in JSON format. This ensures that all invoices meet regulatory standards for fiscal compliance. The API automatically generates QR codes that you can embed into invoices to enhance traceability and authenticity. Additionally, our system includes mechanisms to handle offline scenarios by generating sequential invoices that synchronize automatically with the MRA’s platform when the connection is restored. These features make our API both robust and reliable, safeguarding compliance and operational continuity.
To further enhance user trust, all invoices issued through the ebsmauritius.com platform will be verifiable via our upcoming ebsmauritius Verification App. This app will enable recipients of invoices to scan QR codes for instant validation against our records. This feature is designed to combat invoice fraud and ensure transparency for businesses and customers alike.
From a technical standpoint, our API adheres to REST principles, making it intuitive and accessible for developers. Endpoints are logically structured and use standard HTTP methods. Each request and response is formatted in JSON to align with modern integration practices. Authentication is enforced via API keys, ensuring that only authorized systems can access the platform’s resources. Our API also includes robust error handling and retry mechanisms to ensure uninterrupted service. In the event of a temporary failure from the MRA, the API automatically queues and retries failed requests with exponential backoff, minimizing disruptions to invoice processing.
By offering this integration at no cost, ebsmauritius.com ensures accessibility for businesses of all sizes. However, clients (taxpayers) are required to register and subscribe to our service to unlock full API functionality. Registration is straightforward, and once subscribed, clients gain access to not only our API but also a suite of support services, including our support team and ongoing updates. You integrate and we take care of the rest.
The ebsmauritius.com API is more than a tool; it is a gateway to compliance, efficiency, and enhanced trust for your business operations. Whether you are looking to automate invoicing processes or ensure adherence to MRA mandates, our API is built to support your goals with reliability and ease.
REST Guidelines
General Guidelines
All calls to this rest API must use the POST method unless otherwise specified. Each post must include the required API key for authentication and all calls must be made via secure http (https). Ensure data is properly validated and formatted accodring to the API documentation as, to ensure simplicity for the developer, there are several layers of internal validation before the data is sent to MRA. If any error is encoutered the API will display the message as documented below.
Sequential Numbering
Invoice and credit note numbers must follow sequential numbering for each seller. If the sequence is not correct, the API will reject the call and let you know the next expected sequence. Developers are encouraged to inform their clients of this. Each document type (invoice or credit note) must maintain its own separate sequence. If you need to follow a unified sequence for both, contact us to configure this.
Buyer BRN and VAT Numbers:
Ensure the provided buyer BRN and VAT numbers are correct if the buyer VAT type is VATR (VAT registered) If invalid or incorrect details are submitted, the API will reject the request. This usually is the biggest client issue and as such we offer data cleanup services to assist with maintaining accurate buyer information. If you require any assistance in this kindly get in touch with us. This does not apply for B2C and EXP (export) transactions.
Using x_ignore_sequence:
This parameter allows you to bypass sequence validation for reference numbers. However, to use this feature, please contact us to enable this option as it requires approval from the MRA.
For further assistance, feel free to reach out to our support team. We're here to help!
Endpoints
LIVE:
https://app.ebsmauritius.com/api/restv1/fiscalise/
TEST:
https://test1.ebsmauritius.com/api/restv1/fiscalise/
Request Parameters
Headers
Content-Type: application/json
Body Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
api_key | String | Yes | Unique API key assigned to the user for authentication. |
document_type | String | Yes | Type of document to fiscalize. Must be either invoice or credit_note. |
document_number | String | Yes | Unique document number (invoice or credit note number) for this document. |
invoice_number | String | Conditional | Required if document_type is credit_note. The invoice number being credited. |
reason | String | Conditional | Required if document_type is credit_note. Reason for issuing the credit note. |
buyer_id | String | No | Unique buyer ID from the external system. If this was sent in an earlier request, then this buyer's details will be updated with the details below. |
buyer_name | String | Yes | Name of the buyer. CASH SALE if it is a cash sale (supermarket, resturant etc) |
buyer_brn | String | Conditional | Mandatory if buyer transaction type below is B2B or B2E |
buyer_brn_auto | Boolean | Conditional | If this is specified, we will fill in ALL the buyer_xxxx details using the buyer_brn details above so all those fields are not mandatory and will be ignored. Applicable only for companies in Mauritius. Note that if this is specified and the other information automatically filled, a automatic fill charge of Rs 1 for every request is chargable above the usual fees for using our pre-fill database. The charge will not be applied if the BRN is not on our database (eg the buyer is not registered in Mauritius) |
buyer_transaction_type | String | Yes | Transaction type. Must be one of: B2B, B2C, B2G, EXP, B2E. |
buyer_vat_type | String | Yes | VAT type of the buyer. Must be one of: VATR, NVTR, EXMP. |
buyer_vat_number | String | Conditional | Required if buyer_vat_type is VATR. Valid VAT number of the buyer. |
payment_method | String | Yes | Payment method. Must be one of: CASH, BNKTRANSFER, CHEQUE, CARD, CREDIT. |
currency | String | Yes | ISO 4217 currency code (e.g., MUR, USD). Must be upper case. |
rate_to_mur | Decimal | Conditional | Exchange rate to MUR. Required if currency is not MUR. |
line_items | List | Yes | List of line items. Each line item must include details as outlined below. |
x_ignore_sequence | Boolean | No | If set to true, skips reference number validation against expected sequence. |
attempt | Integer | No | Increment each time you make an attempt and can not reach our server. |
callback_url | String | No | Callback URL that will be used if MRA is down and your document is ficalised later (see below) |
Response
Success Response
{ "status": "ok", "message": "(QR code to be displayed in invoice coded in base64 png format)" }
Error Responses
Status Code | Error Message |
---|---|
400 | Missing or invalid input parameters. |
404 | Invalid api_key or unsupported document_type. |
405 | Method not allowed (only POST is supported). |
500 | Internal server error or unexpected issue during fiscalization. |
Call back URL (optional)
There will be situations when the document can not be fiscalised by MRA if this happens you will get the response below
{ "status": "queued", "message": "c8edeb24-1856-4f4c-a160-88b3a476f9db" }
If you receive this, it means your document has been successfully received and queued to be sent to MRA when the MRA system is available. You do not need to send the document again. The message parameter of the return JSON will contain a unique key which will be used when the system calls your call back URL. Once the document is fiscalised, your call back URL will be called with a HTTP POST with the following JSON in the body of the HTTP request. If you do not specify a call back URL then the system wont alert you.
{ "id": "c8edeb24-1856-4f4c-a160-88b3a476f9db", "message": "(QR code to be displayed in invoice coded in base64 png format)" }
If this call back fails and the system cannot reach your platform, the system will try again after 1,2,4,8,16,32,64... seconds and so on until 8,912 seconds which is 15 tries totalling about 4.5 hours before giving up.
Examples
Request for Invoice
{ "api_key": "your_api_key", "document_type": "invoice", "reference_number": "INV001234", "buyer_name": "John Doe", "buyer_transaction_type": "B2C", "buyer_vat_type": "NVTR", "payment_method": "CASH", "currency": "MUR", "line_items": [ { "unit_price": "100.00", "quantity": "2", "discount": "10.00", "tax_code": "TC01", "nature": "GOODS", "description": "Product A" } ] }
Response
{ "status": "ok", "message": "MRA_QR_Code_Here" }
In order to test your application, please get in touch with us and we will issue you with a API key that you can use to test and develop your product using our test URL.