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)
| Identifier | What it requires | In JooDax |
|---|---|---|
| BR-KSA-03 | The document must carry a UUID generated by the issuing machine, made of letters, digits and dashes only. | Built |
| BR-KSA-04 | The issue date must not be later than the current date. | Built |
| BR-KSA-05 | The invoice type code must be one of the Saudi subset: 388, 386, 383 or 381. | Built |
| BR-KSA-06 | The name attribute on the invoice type must exist with the structure NNPNESB. | Built |
| BR-KSA-07 | Self-billing may not be combined with the export flag. | Not built |
| BR-KSA-08 | The seller must carry exactly one identifier with scheme CRN, MOM, MLS, 700, SAG or OTH, alphanumeric only. | Partly built |
| BR-KSA-09 | The seller address must contain street, building number, postal code, city, district and country code. | Partly built |
| BR-KSA-10 | On a standard invoice the buyer address must contain street, city and country code. | Not built |
| BR-KSA-11 | A line in category O ("not subject to VAT") must have a zero rate if a rate is given. | Not built |
| BR-KSA-14 | The other buyer ID, when needed, must use one of the listed schemes and be alphanumeric. | Not built |
| BR-KSA-15 | A standard tax invoice (388 with subtype 01) must contain the supply date. | Not built |
| BR-KSA-16 | If a payment means code is given, it must come from UNTDID 4461. | Built |
| BR-KSA-17 | A credit or debit note must state the reason it was issued. | Built |
| BR-KSA-18 | The VAT category code must be S, Z, E or O. | Built |
| BR-KSA-23 | A breakdown with category E (exempt) must carry an exemption reason code. | Partly built |
| BR-KSA-24 | A breakdown with category O must carry a reason code. | Not built |
| BR-KSA-25 | A simplified document with VATEX-SA-EDU or VATEX-SA-HEA must name the buyer. | Partly built |
| BR-KSA-26 | The previous invoice hash must be a base64 SHA-256 computed the standard's way. | Built |
| BR-KSA-27 | The document must contain a QR code encoded as base64Binary. | Built |
| BR-KSA-28 | The signature information ID in the stamp must be urn:oasis:names:specification:ubl:signature:1. | Built |
| BR-KSA-29 | The referenced signature ID and signature ID must be urn:oasis:names:specification:ubl:signature:Invoice. | Built |
| BR-KSA-30 | The signature method must be urn:oasis:names:specification:ubl:dsig:enveloped:xades. | Built |
| BR-KSA-31 | On simplified documents only the third-party, nominal and summary flags are accepted. | Built |
| BR-KSA-33 | Every document must carry an invoice counter value. | Built |
| BR-KSA-34 | The counter value contains digits only. | Built |
| BR-KSA-35 | If a supply end date is present, the supply date must be present too. | Not built |
| BR-KSA-36 | The supply end date must not be earlier than the supply date. | Not built |
| BR-KSA-37 | The seller building number must be four digits. | Partly built |
| BR-KSA-39 | The document must contain the seller VAT number or VAT group number. | Built |
| BR-KSA-40 | The seller VAT number has 15 digits, the first and last being 3. | Partly built |
| BR-KSA-42 | The buyer name is mandatory on standard invoices and their notes. | Not built |
| BR-KSA-44 | The buyer VAT number, when present on a non-export invoice, has 15 digits starting and ending with 3. | Not built |
| BR-KSA-46 | An export invoice must not contain a buyer VAT number. | Not built |
| BR-KSA-49 | With exemption code VATEX-SA-EDU or VATEX-SA-HEA, the buyer's national ID (scheme NAT) is mandatory. | Not built |
| BR-KSA-51 | The line amount with VAT equals the line net amount plus the line VAT. | Built |
| BR-KSA-52 | The line VAT amount is mandatory on standard invoices and their notes. | Built |
| BR-KSA-53 | The line amount with VAT is mandatory on standard invoices and their notes. | Built |
| BR-KSA-56 | Credit notes (381) and debit notes (383) must carry the billing reference ID. | Built |
| BR-KSA-60 | The cryptographic stamp is mandatory on simplified documents and their notes. | Built |
| BR-KSA-61 | Every document must contain the previous invoice hash. | Built |
| BR-KSA-63 | If the buyer country is SA, the full national address is required. | Not built |
| BR-KSA-66 | The seller postal code must be five digits. | Partly built |
| BR-KSA-67 | If the buyer country is SA, the buyer postal code must be five digits. | Not built |
| BR-KSA-68 | The tax currency code must exist in the document. | Built |
| BR-KSA-69 | A breakdown with category Z must carry a reason code. | Partly built |
| BR-KSA-70 | The document must contain the issue time as hh:mm:ss (Saudi time) or hh:mm:ssZ (UTC). | Built |
| BR-KSA-71 | A simplified summary invoice must name the buyer. | Not built |
| BR-KSA-72 | A simplified summary invoice must carry the supply date and supply end date. | Not built |
| BR-KSA-73 | When a prepaid amount is given, each prepayment invoice must be identified in an extra line. | Not built |
| BR-KSA-80 | The prepaid amount equals the sum of the prepayments' taxable amounts and their VAT. | Not built |
| BR-KSA-81 | A standard invoice without a buyer VAT number must give another buyer ID. | Not built |
| BR-KSA-82 | On a prepayment settlement line the principal line amounts are zero. | Not built |
| BR-KSA-83 | A breakdown with category E, Z or O must carry a reason text from ZATCA's list. | Partly built |
| BR-KSA-DEC-02 | VAT rates must be between 0.00 and 100.00 with at most two decimals and no % sign. | Built |
| BR-KSA-CL-02 | Every currencyID equals the invoice currency, except the VAT total in accounting currency. | Built |
| BR-KSA-CL-04 | With category Z, E or O, a reason code from the Saudi list must exist. | Partly built |
| BR-KSA-EN16931-01 | The business process type must be reporting:1.0. | Built |
| BR-KSA-EN16931-02 | The VAT accounting currency must be SAR. | Built |
| BR-KSA-EN16931-07 | When a gross price is given, the net price equals gross price minus price discount. | Not built |
| BR-KSA-EN16931-08 | Only one tax total with tax subtotals may be provided. | Built |
| BR-KSA-EN16931-09 | Only one tax total without subtotals when the tax currency is given. | Built |
| BR-KSA-EN16931-11 | Line net = quantity × (net price ÷ base quantity) + line charges − line allowances. | Built |
| BR-KSA-F-01 | Dates must be formatted YYYY-MM-DD. | Built |
| BR-KSA-F-03 | The document must not contain empty elements. | Built |
| BR-KSA-F-04 | All amounts and quantities must be positive. | Built |
| BR-KSA-F-06 | Field lengths must stay within the data dictionary's minimum and maximum. | Partly built |
| BR-KSA-98 | A warning that a simplified document should be submitted within 24 hours. | Partly built |
EN 16931 rules ZATCA applies
| Identifier | What it requires | In JooDax |
|---|---|---|
| BR-02 | An 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-03 | An invoice shall have an issue date. A Gregorian YYYY-MM-DD date, which may not lie in the future (BR-KSA-04). | Built |
| BR-06 | An invoice shall contain the seller name. The registered name in RegistrationName, which is also QR tag 1. | Built |
| BR-08 | An 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-09 | The 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-10 | An 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-16 | An 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-48 | Each 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-53 | If 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-55 | Each 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-04 | Each 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-10 | Sum 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-13 | Total 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-14 | Invoice 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-15 | Total with VAT = total without VAT + total VAT. This amount is QR tag 4. | Built |
| BR-CO-16 | Amount due = total with VAT − prepaid amount + rounding amount. With no prepayment or rounding, the amount due equals the total with VAT. | Built |
| BR-CO-17 | Category 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-18 | An 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-08 | For 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-09 | For 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-10 | A 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-01 | An 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-05 | A 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-08 | For 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-09 | The tax amount of a Z breakdown shall be 0. Anything but zero in a zero-rated breakdown is refused. | Built |
| BR-E-01 | An 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-05 | An exempt line shall have a VAT rate of 0. As with zero-rating, the rate is stated and equals 0. | Built |
| BR-E-08 | For 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-09 | The 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-01 | An 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-08 | For 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-09 | The tax amount of an O breakdown shall be 0. A supply outside the scope of VAT carries no VAT. | Not built |
| BR-CL-01 | The 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-18 | VAT 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
- Electronic Invoice XML Implementation Standard to the E-Invoicing resolution dated 2023-05-19 (v1.2) — ZATCA
- الضوابط والمتطلبات والمواصفات الفنية والقواعد الإجرائية اللازمة لتنفيذ أحكام لائحة الفوترة الإلكترونية (قرار المحافظ رقم 62738 وتاريخ 1443/11/23هـ) (vfile dated 20230519 (decision 62738)) — ZATCA
- Electronic Invoice Data Dictionary to the E-Invoicing resolution dated 2023-05-19 (v1.2) — ZATCA
- تحمّل الدولة ضريبة القيمة المضافة المستحقة على الخدمات التعليمية الأهلية المقدمة إلى المواطنين (vالإصدار الثاني) — ZATCA
- Security Features Implementation Standards to the E-Invoicing resolution dated 2023-05-19 (v1.2) — ZATCA
- اللائحة التنفيذية لنظام ضريبة القيمة المضافة (vالنسخة العاشرة (آخر تعديل بقرار 24-06-01 في 2024-11-19)) — ZATCA
- 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.