BR-KSA-18VAT category code is not S, Z, E or O

Mutabiq checks Saudi ZATCA Phase 2 e-invoice XML before you submit it: pre-validation against published ZATCA requirements, not an approval by the authority. This page explains one rule, BR-KSA-18.

Validate 5 invoices free

Five checks a month on the Free plan. The file is checked in memory and is never stored.

The message ZATCA prints

[BR-KSA-18]-VAT category code must contain one of the values (S, Z, E, O).

What Mutabiq reports

One entry for each way this rule can be reported.

Reported as
What kind of value was found — empty, not_15_digits and the like — never the value itself.

VAT category code is not S, Z, E or O

Reported asnot_s_z_e_onot S, Z, E or O

What is wrong

A VAT category code - in the VAT breakdown, in a line's own tax subtotal, on a document-level allowance or charge, or on a line item's cac:ClassifiedTaxCategory - is not one of S, Z, E or O. ZATCA rejects the document under BR-KSA-18. The EN 16931 code list (UNCL 5305) has other categories, such as AE for reverse charge or K for intra-community supply, but ZATCA accepts these four only.

What to check in your ERP

Map every VAT code in your system to one of the four: S standard rated, Z zero rated, E exempt, O not subject to VAT. A European category code, or an internal tax code written into cbc:ID, is the usual cause.

The clause that runs

Quoted from the validation-rule stylesheet ZATCA publishes, at the file and line named below. The executed guard is what the check runs; the reported test is what it prints when it fails, and the two are not always the same.

Executed guard

not( contains( ' S Z E O ',(.)) )

Reported test

not( contains('S Z E O',/ubl:Invoice/cac:InvoiceLine/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID) )
Evaluated against
/ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cbc:ID | /ubl:Invoice/cac:InvoiceLine/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID | /ubl:Invoice / cac:AllowanceCharge / cac:TaxCategory / cbc:ID | /ubl:Invoice / cac:InvoiceLine / cac:Item / cac:ClassifiedTaxCategory / cbc:ID
Source
vendor/zatca/schematron/20210819_ZATCA_E-invoice_Validation_Rules.xsl:1572

As shipped in ZATCA SDK 3.4.8: the copy quoted here is, byte for byte, the file that release ships. The date in the file name is the name ZATCA gives the file; the rules in it are those of SDK 3.4.8.

A worked example

A synthetic document from the measured test corpus that trips this rule, shown where it differs from one that passed. Mutabiq's report names the class of the value, never the value itself.

Where it differs from a document that passed

  • This example
  • A document that passed
<cbc:Name>Consulting services</cbc:Name><cac:ClassifiedTaxCategory>This example:   <cbc:ID schemeID="UN/ECE 5305" schemeAgencyID="6">X</cbc:ID>A document that passed:   <cbc:ID schemeID="UN/ECE 5305" schemeAgencyID="6">S</cbc:ID>  <cbc:Percent>15.00</cbc:Percent>  <cac:TaxScheme>
Document
bad-67-unknown-vat-category.xml
Mutabiq's verdict
Not passed
Reported as
not_s_z_e_onot S, Z, E or O

Download this example (.xml)Check it in Mutabiq

This page's example, checked by the same rules your own upload goes through. No upload and no sign-in.

Rules evaluated against the same part of the document. One wrong value often reports several of them at once.

Check an invoice

Check your own invoice

© 2026 Hayatiq AI Solutions F.Z.E. All rights reserved.