Skip to content

Validation rules — E-invoicing in Saudi Arabia (FATOORA)

The XML standard does not say which rules are errors and which are warnings; this classification is not confirmed by an official document.

ZATCA’s own rules (BR-KSA)

IdentifierWhat it requiresIn JooDax
BR-KSA-03The document must carry a UUID generated by the issuing machine, made of letters, digits and dashes only.Built
BR-KSA-04The issue date must not be later than the current date.Built
BR-KSA-05The invoice type code must be one of the Saudi subset: 388, 386, 383 or 381.Built
BR-KSA-06The name attribute on the invoice type must exist with the structure NNPNESB.Built
BR-KSA-07Self-billing may not be combined with the export flag.Not built
BR-KSA-08The seller must carry exactly one identifier with scheme CRN, MOM, MLS, 700, SAG or OTH, alphanumeric only.Partly built
BR-KSA-09The seller address must contain street, building number, postal code, city, district and country code.Partly built
BR-KSA-10On a standard invoice the buyer address must contain street, city and country code.Not built
BR-KSA-11A line in category O ("not subject to VAT") must have a zero rate if a rate is given.Not built
BR-KSA-14The other buyer ID, when needed, must use one of the listed schemes and be alphanumeric.Not built
BR-KSA-15A standard tax invoice (388 with subtype 01) must contain the supply date.Not built
BR-KSA-16If a payment means code is given, it must come from UNTDID 4461.Built
BR-KSA-17A credit or debit note must state the reason it was issued.Built
BR-KSA-18The VAT category code must be S, Z, E or O.Built
BR-KSA-23A breakdown with category E (exempt) must carry an exemption reason code.Partly built
BR-KSA-24A breakdown with category O must carry a reason code.Not built
BR-KSA-25A simplified document with VATEX-SA-EDU or VATEX-SA-HEA must name the buyer.Partly built
BR-KSA-26The previous invoice hash must be a base64 SHA-256 computed the standard's way.Built
BR-KSA-27The document must contain a QR code encoded as base64Binary.Built
BR-KSA-28The signature information ID in the stamp must be urn:oasis:names:specification:ubl:signature:1.Built
BR-KSA-29The referenced signature ID and signature ID must be urn:oasis:names:specification:ubl:signature:Invoice.Built
BR-KSA-30The signature method must be urn:oasis:names:specification:ubl:dsig:enveloped:xades.Built
BR-KSA-31On simplified documents only the third-party, nominal and summary flags are accepted.Built
BR-KSA-33Every document must carry an invoice counter value.Built
BR-KSA-34The counter value contains digits only.Built
BR-KSA-35If a supply end date is present, the supply date must be present too.Not built
BR-KSA-36The supply end date must not be earlier than the supply date.Not built
BR-KSA-37The seller building number must be four digits.Partly built
BR-KSA-39The document must contain the seller VAT number or VAT group number.Built
BR-KSA-40The seller VAT number has 15 digits, the first and last being 3.Partly built
BR-KSA-42The buyer name is mandatory on standard invoices and their notes.Not built
BR-KSA-44The buyer VAT number, when present on a non-export invoice, has 15 digits starting and ending with 3.Not built
BR-KSA-46An export invoice must not contain a buyer VAT number.Not built
BR-KSA-49With exemption code VATEX-SA-EDU or VATEX-SA-HEA, the buyer's national ID (scheme NAT) is mandatory.Not built
BR-KSA-51The line amount with VAT equals the line net amount plus the line VAT.Built
BR-KSA-52The line VAT amount is mandatory on standard invoices and their notes.Built
BR-KSA-53The line amount with VAT is mandatory on standard invoices and their notes.Built
BR-KSA-56Credit notes (381) and debit notes (383) must carry the billing reference ID.Built
BR-KSA-60The cryptographic stamp is mandatory on simplified documents and their notes.Built
BR-KSA-61Every document must contain the previous invoice hash.Built
BR-KSA-63If the buyer country is SA, the full national address is required.Not built
BR-KSA-66The seller postal code must be five digits.Partly built
BR-KSA-67If the buyer country is SA, the buyer postal code must be five digits.Not built
BR-KSA-68The tax currency code must exist in the document.Built
BR-KSA-69A breakdown with category Z must carry a reason code.Partly built
BR-KSA-70The document must contain the issue time as hh:mm:ss (Saudi time) or hh:mm:ssZ (UTC).Built
BR-KSA-71A simplified summary invoice must name the buyer.Not built
BR-KSA-72A simplified summary invoice must carry the supply date and supply end date.Not built
BR-KSA-73When a prepaid amount is given, each prepayment invoice must be identified in an extra line.Not built
BR-KSA-80The prepaid amount equals the sum of the prepayments' taxable amounts and their VAT.Not built
BR-KSA-81A standard invoice without a buyer VAT number must give another buyer ID.Not built
BR-KSA-82On a prepayment settlement line the principal line amounts are zero.Not built
BR-KSA-83A breakdown with category E, Z or O must carry a reason text from ZATCA's list.Partly built
BR-KSA-DEC-02VAT rates must be between 0.00 and 100.00 with at most two decimals and no % sign.Built
BR-KSA-CL-02Every currencyID equals the invoice currency, except the VAT total in accounting currency.Built
BR-KSA-CL-04With category Z, E or O, a reason code from the Saudi list must exist.Partly built
BR-KSA-EN16931-01The business process type must be reporting:1.0.Built
BR-KSA-EN16931-02The VAT accounting currency must be SAR.Built
BR-KSA-EN16931-07When a gross price is given, the net price equals gross price minus price discount.Not built
BR-KSA-EN16931-08Only one tax total with tax subtotals may be provided.Built
BR-KSA-EN16931-09Only one tax total without subtotals when the tax currency is given.Built
BR-KSA-EN16931-11Line net = quantity × (net price ÷ base quantity) + line charges − line allowances.Built
BR-KSA-F-01Dates must be formatted YYYY-MM-DD.Built
BR-KSA-F-03The document must not contain empty elements.Built
BR-KSA-F-04All amounts and quantities must be positive.Built
BR-KSA-F-06Field lengths must stay within the data dictionary's minimum and maximum.Partly built
BR-KSA-98A warning that a simplified document should be submitted within 24 hours.Partly built

EN 16931 rules ZATCA applies

IdentifierWhat it requiresIn JooDax
BR-02An invoice shall have an invoice number. The sequential number Article 53 requires; neither the UUID nor the counter replaces it, since each has another job.Built
BR-03An invoice shall have an issue date. A Gregorian YYYY-MM-DD date, which may not lie in the future (BR-KSA-04).Built
BR-06An invoice shall contain the seller name. The registered name in RegistrationName, which is also QR tag 1.Built
BR-08An invoice shall contain the seller postal address. The European rule asks for the address; the Saudi rule BR-KSA-09 specifies its six parts.Partly built
BR-09The seller postal address shall contain a seller country code. A two-letter ISO 3166 code; applying the Saudi rules is tied to the seller's country code.Built
BR-10An invoice shall contain the buyer postal address, except simplified documents and their notes. ZATCA amended the European rule to exempt simplified documents (KSA-2 positions 1-2 = 02), which usually carry no buyer details.Not built
BR-16An invoice shall have at least one invoice line. Even a credit note needs a line describing what is credited; a prepayment settlement adds extra lines with zero amounts.Built
BR-48Each VAT breakdown shall have a VAT category rate, except if not subject to VAT. For category O the rate may be omitted; elsewhere it must be stated, even when zero.Built
BR-53If the VAT accounting currency is present, the VAT total in that currency shall be provided. Because ZATCA makes the tax currency mandatory, this second total becomes mandatory on every document.Built
BR-55Each preceding invoice reference shall contain the preceding invoice number. An empty BillingReference is refused; a reference must carry the original invoice number.Built
BR-CO-04Each invoice line shall be categorised with a VAT category code. The line category is what the breakdown is built from; a line without one cannot be assigned to any breakdown.Built
BR-CO-10Sum of line net amounts = Σ line net amounts. An exact match to the halala; any rounding gap between lines and total is enough for rejection.Built
BR-CO-13Total without VAT = Σ line nets − document allowances + document charges. With no document-level allowances or charges, the total without VAT equals the sum of line nets.Built
BR-CO-14Invoice total VAT = Σ category tax amounts. The total is built from the breakdown, not from line VAT; the standard asks for rounding at document level.Partly built
BR-CO-15Total with VAT = total without VAT + total VAT. This amount is QR tag 4.Built
BR-CO-16Amount due = total with VAT − prepaid amount + rounding amount. With no prepayment or rounding, the amount due equals the total with VAT.Built
BR-CO-17Category tax = category taxable amount × rate ÷ 100, rounded to two decimals. Half-up rounding on the category's final result, which can differ by a halala from adding its rounded line VAT amounts.Partly built
BR-CO-18An invoice shall have at least one VAT breakdown group. Even a fully exempt invoice carries a breakdown with category E and zero tax.Built
BR-S-08For category S the taxable amount = Σ S line nets − S allowances + S charges. Only lines, allowances and charges with category S and scheme VAT are counted.Built
BR-S-09For category S, tax = taxable amount × rate ÷ 100, rounded. The standard-rate version of BR-CO-17, where rounding effects show most.Partly built
BR-S-10A category S breakdown shall not have an exemption reason code or text. An exemption reason explains why standard VAT is absent, so it makes no sense where VAT is charged.Built
BR-Z-01An invoice with a zero-rated line, allowance or charge shall have a Z breakdown. Every category used on the lines needs its own breakdown.Built
BR-Z-05A zero-rated line shall have a VAT rate of 0. Zero-rated does not mean no rate: the rate is present and equals 0.Built
BR-Z-08For category Z the taxable amount = Σ Z line nets − Z allowances + Z charges. The amount is stated in full even though its tax is zero, as it feeds the VAT return.Built
BR-Z-09The tax amount of a Z breakdown shall be 0. Anything but zero in a zero-rated breakdown is refused.Built
BR-E-01An invoice with an exempt line, allowance or charge shall have an E breakdown. And the E breakdown needs a reason code and text (BR-KSA-23, BR-KSA-83).Built
BR-E-05An exempt line shall have a VAT rate of 0. As with zero-rating, the rate is stated and equals 0.Built
BR-E-08For category E the taxable amount = Σ E line nets − E allowances + E charges. The amount is stated in full even though no VAT is charged.Built
BR-E-09The tax amount of an E breakdown shall be 0. Exempt supplies carry no VAT; their reason codes are three: financial services, life insurance and exempt real estate.Built
BR-O-01An invoice with a not-subject-to-VAT line shall have an O breakdown. And the O breakdown needs VATEX-SA-OOS and a reason the taxpayer writes.Not built
BR-O-08For category O the taxable amount = Σ O line nets − O allowances + O charges. Despite the name, the not-subject amount goes in this field.Not built
BR-O-09The tax amount of an O breakdown shall be 0. A supply outside the scope of VAT carries no VAT.Not built
BR-CL-01The document type code must come from UNTDID 1001. The European rule accepts any code from the list; the Saudi BR-KSA-05 narrows it to four.Built
BR-CL-18VAT categories must come from UNCL5305. The international list is wider; the Saudi BR-KSA-18 narrows it to S, Z, E and O.Built

Sources

  1. Electronic Invoice XML Implementation Standard to the E-Invoicing resolution dated 2023-05-19 (v1.2) — ZATCA
  2. الضوابط والمتطلبات والمواصفات الفنية والقواعد الإجرائية اللازمة لتنفيذ أحكام لائحة الفوترة الإلكترونية (قرار المحافظ رقم 62738 وتاريخ 1443/11/23هـ) (vfile dated 20230519 (decision 62738)) — ZATCA
  3. Electronic Invoice Data Dictionary to the E-Invoicing resolution dated 2023-05-19 (v1.2) — ZATCA
  4. تحمّل الدولة ضريبة القيمة المضافة المستحقة على الخدمات التعليمية الأهلية المقدمة إلى المواطنين (vالإصدار الثاني) — ZATCA
  5. Security Features Implementation Standards to the E-Invoicing resolution dated 2023-05-19 (v1.2) — ZATCA
  6. اللائحة التنفيذية لنظام ضريبة القيمة المضافة (vالنسخة العاشرة (آخر تعديل بقرار 24-06-01 في 2024-11-19)) — ZATCA
  7. Integration Sandbox API pages (Swagger): reporting, clearance, compliance, production CSID, renewal (ve-Invoicing Sandbox Release 2.1.0 (page lists 2.1.1 as latest)) — ZATCA

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