Skip to content
E-invoicing in Saudi Arabia (FATOORA)

The invoice counter (ICV)

A number that goes up by one with every document a device issues, never reset or reused, so any gap in the chain shows.

The controls call the counter tamper-resistant: it is not reset or reassigned to another document, and it increases with every invoice or note. Resetting it is a prohibited function of an invoicing solution.

The counter belongs to the unit, not the business: each invoicing device has one sequence covering standard and simplified documents, and the controls forbid a device from running more than one sequence at a time.

The counter is not the invoice number: the invoice number is the seller's, printed; the counter is a technical value in the ICV element, not printed. A document the platform rejects spends its value; the corrected document takes a new one.

In JooDax

Built

The counter advances in the same transaction that writes the sale, so no two documents share a value, and the data file refuses duplicates. A signed document cannot be edited or deleted (two database triggers). Onboarding a new unit, such as moving from local test mode to production, starts a new chain at 1 and stops the old one.

crates/jdx-einvoice-sa/src/schema.sql

Questions and answers

Can a rejected document's counter value be reused?

No. The technical guidelines say neither the counter value nor the UUID may be reused.

Related pages

Related concepts

E-invoicing in Saudi Arabia (FATOORA)

Sources

  1. الضوابط والمتطلبات والمواصفات الفنية والقواعد الإجرائية اللازمة لتنفيذ أحكام لائحة الفوترة الإلكترونية (قرار المحافظ رقم 62738 وتاريخ 1443/11/23هـ) (vfile dated 20230519 (decision 62738)) — ZATCA
  2. الدليل الإرشادي التفصيلي للفوترة الإلكترونية (vالنسخة الثانية) — ZATCA
  3. E-invoicing Detailed Technical Guidelines (vVersion 2) — ZATCA
  4. Electronic Invoice XML Implementation Standard to the E-Invoicing resolution dated 2023-05-19 (v1.2) — ZATCA

Checked on: 4 November 2026. What concerns JooDax is taken from the programs’ own code.