BR-KSA-18: VAT category code must be S, Z, E or O

Explained by Matheel from ZATCA's rule text and the condition SDK 3.4.8 executes · Updated

Error: the invoice is rejectedAll invoicesFields: —

Each tax category cbc:ID (in cac:TaxSubtotal/cac:TaxCategory, line cac:TaxSubtotal, document-level cac:AllowanceCharge/cac:TaxCategory and line cac:Item/cac:ClassifiedTaxCategory) must be S, Z, E or O. The executed check tests each code; the listed test text is malformed and does not express this.

How to fix it

Use S (standard), Z (zero-rated), E (exempt) or O (not subject to VAT), e.g. <cbc:ID>S</cbc:ID>.

ZATCA's official text

[BR-KSA-18]-VAT category code must contain one of the values (S, Z, E, O).
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules

Fails when (the condition ZATCA's SDK runs)

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

Related rules

Validate your invoice against ZATCA's rules

Paste the XML and see every error and warning. It runs in your browser; the invoice goes nowhere.

Validate an invoice or try Matheel