MRA · Fiscalisation

MRA Invoice Hash Chain Explained

How the MRA invoice hash chain works and why it matters.

The MRA invoice hash chain is a cryptographic link between consecutive invoices. It makes the invoice sequence tamper-evident: any change to a historical invoice breaks the chain and is detected by the MRA. This page explains how the hash chain works, what fields it covers, and why it matters for your Mauritius business.

What is the hash chain?

The hash chain is a sequence of cryptographic hashes where each invoice's hash depends on the previous invoice's data and hash. The MRA requires this chain so that historical invoices cannot be altered or deleted without detection. The chain is a critical part of MRA e-invoicing compliance.

What fields go into the hash?

The MRA hash typically includes: the previous invoice's hash, the current invoice's date and time, the total amount, the seller's BRN, and the invoice identifier. Exact field selection is defined in the MRA Technical Guidelines and the DataStructure specification. Your MRA-approved EBS must implement the chain exactly per the spec.

What hash algorithm is used?

The MRA Technical Guidelines specify the hash algorithm. Codeblix eInvoicing implements the chain per the MRA spec, validated against the MRA test suite during certification.

What if the chain breaks?

If the chain is broken — for example, by altering a historical invoice or by missing an invoice in the sequence — the MRA will reject new invoices until the chain is repaired. Your EBS must prevent chain breaks in the first place by: (1) never allowing deletion of fiscalised invoices; (2) always computing the previous hash from the last issued invoice; (3) handling offline invoices correctly so they join the chain in the right place.

Does the chain work in offline mode?

Yes. The chain is computed locally regardless of MRA endpoint status. When the EBS is offline, it still computes the chain and assigns sequential counters. When the endpoint is back, the deferred invoices are sent to the MRA in batch and join the chain at the correct position.

How is the chain reported?

The MRA requires every EBS to maintain a transaction report that lists, for each invoice: counter number, invoice number, IRN, previous invoice's hash, and date. The report is sorted ascending by counter and exportable to CSV for MRA audits.

Why is the chain important?

The chain prevents the two most common forms of VAT fraud: (1) issuing an invoice and then deleting or altering it; (2) issuing an off-the-books invoice that never gets reported. With the chain in place, the MRA can detect any tampering immediately. For Mauritius VAT-registered businesses, the chain is the foundation of audit-ready e-invoicing.

Internal links

Read our complete MRA e-invoicing guide, MRA fiscalisation explained, and MRA offline mode requirements. See how Codeblix eInvoicing implements the chain.

Key points

  • The hash chain is a cryptographic link between consecutive invoices
  • Each invoice's hash depends on the previous invoice's hash and current data
  • The chain makes historical invoices tamper-evident
  • The MRA validates the chain on every new invoice
  • The chain must be computed even in offline mode
  • The transaction report lists counter, invoice number, IRN, previous hash, sorted ascending

FAQ

What happens if I delete an old invoice?

Deleting a fiscalised invoice breaks the chain. The MRA will reject new invoices until the chain is repaired. Your EBS should not allow deletion of fiscalised invoices in the first place.

Can two invoices have the same counter?

No. Each invoice gets a unique sequential counter. Codeblix eInvoicing enforces this at the database level so it is physically impossible to create a duplicate counter.

How is the previous hash chosen?

The previous hash is taken from the latest issued invoice for the company, regardless of document type. STD, CRN, and DRN all share the same chain.

Does the chain reset every year?

No. The chain is continuous across the lifetime of the business (or at least the lifetime of the EBS instance). The MRA never resets the chain.

What if I need to issue a corrective invoice?

You issue a credit note (CRN) that references the original invoice. The credit note becomes part of the chain, with its own counter and hash. The original invoice is not deleted or altered.

Need help staying compliant?

Start free trial