Skip to content
Fatooraz

Invoice numbering and archiving in Saudi Arabia

How to number invoices without gaps across branches and tills, handle credit notes, and archive XML files, readable copies and records safely for audits.

Published 5 October 2026 · Updated 5 October 2026 · 5 min read

Why must invoice numbers be sequential and unbroken?

Because a numbered series with no gaps proves that every invoice you issued is accounted for. An auditor can follow the numbers from the first invoice of the year to the last and see that none was removed. A gap invites questions; an unbroken series answers them before anyone asks. It is the simplest control in invoicing, and your software should enforce it.

Phase 2 adds technical checks. Each invoice carries an invoice counter value and the hash of the previous invoice, which chains invoices together, so a removed or altered invoice breaks the chain. Picture a cafe whose shift ends at invoice 1118: the next shift starts at 1119, and if 1090 is missing, someone must explain why.

Several branches or tills: separate series, sequential within each

A business with a Riyadh shop, a Jeddah shop and three tills should not make them share one counter. The usual approach is a separate series for each branch or till, marked by a prefix such as a branch code, with numbers running in order inside each series. Each till then works on its own and still produces an unbroken series that is easy to explain.

Under Phase 2, ask your provider how each till or branch is registered with ZATCA and how its own counter and chain are kept. Write down your numbering plan, give your accountant a copy, and update it whenever you open or close a branch. A written plan saves arguments later and helps a new employee who wonders why the prefixes differ.

  • One prefix for each branch or till
  • A separate prefix for credit and debit notes, if used
  • Numbers assigned by the system at issue, never typed by hand
  • No test invoices on a live series
  • A note of each series' start date and last number

Never reuse or delete a number: mistakes and credit notes

Once issued, an invoice is final. It is not edited, it is not deleted, and its number never goes to another invoice. If you find a wrong price, a wrong customer or a return, issue a credit note, then a new correct invoice that takes the next number. The original stays in the series with the correction beside it, so anyone reading the record can follow what happened.

Credit and debit notes are e-invoices too. Each gets its own number in sequence, refers to the original invoice by number and gives a reason, such as a returned item or a price correction. Some systems keep them in their own series, others in the common one; either way, no gaps, no repeats. Also ask when a draft receives its number, since abandoned drafts can leave holes that look like deleted invoices.

What to keep: the XML, the readable copy and supporting documents

For each invoice, keep two forms. The first is the structured file: under Phase 2 the invoice data is an XML file in UBL 2.1 format, with its cryptographic stamp and QR code. The second is the readable copy, usually the PDF your customer received; a PDF/A-3 file can carry the XML inside it. If you are asked to show an invoice, provide both.

Then keep the paper trail around it: the contract or order behind the sale, the delivery note, proof of payment, the reason for each credit note, and purchase invoices from suppliers. A contractor billing by stage, for example, should link every stage invoice to the signed agreement and the progress sign-off behind it.

How long to keep records, plus backups and audit access

Invoices and tax records are generally kept for six years, but confirm your own case with your accountant or ZATCA. Do not rely on memory or one person's laptop for something that must last that long: decide where the archive lives, who is responsible for it and how an invoice is found in it.

Your provider's backups protect you if its systems fail, but keep your own periodic export in a second place and check that you can open it. For an audit, you must be able to find any invoice by number, date or customer, and your accountant's access should keep working for the whole retention period, even after a staff member leaves or a branch closes.

If you change software or leave a provider

The duty to keep records stays with you, not the software. Before you cancel anything, export everything: every invoice as XML and as a readable copy, credit and debit notes, customers, items and payments. Check the export against your series: the first and last numbers should match, with no gaps. Ask how long the provider keeps your data after you leave.

Plan the changeover as carefully as the export. Note the date and the last invoice number of the old system, and decide whether the new one continues the numbers or starts a new prefix. Either way, one series closes and the next opens with nothing missing between them. Keep the old export somewhere safe; you may need it years later to answer a question.

This guide is general information and not legal or tax advice. Check ZATCA’s latest announcements and speak with your accountant for your situation.

Frequently asked questions

Can I delete an invoice I issued by mistake?

No. An issued invoice stays in the series and its number is never reused. You correct the error with a credit note that refers to the original invoice and gives a reason, then issue a new, correct invoice with the next number. That leaves a clear trail an auditor can follow from start to finish.

Do I need a separate invoice series for each branch or till?

Many businesses do, because it keeps each till's numbers unbroken even when tills work independently. What matters is that every series runs in order with no gaps or repeated numbers. Ask your provider how each branch and till is registered under Phase 2.

How long should I keep my invoices, and in what form?

Invoices and tax records are generally kept for six years, but confirm the period for your own case with your accountant or ZATCA. Keep the XML file and the readable copy of each invoice, plus credit notes and supporting documents, and hold a copy outside your software.

Start with a workspace of your own

Try invoicing, e-invoicing and the point of sale for 90 days. No credit card, no commitment.