BR-KSA-05Invoice type code is not one ZATCA accepts

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-05.

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-05]-The invoice type code (BT-3) must be equal to one of value from the subset of UN/CEFACT code list 1001, D.16B agreed for KSA electronic invoices. Please refer paragraph 11.2.1 of XML implementation Standards.

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.

Invoice type code is not one ZATCA accepts

Reported asunknown_codea code ZATCA does not accept

What is wrong

The invoice type code (BT-3), the text content of cbc:InvoiceTypeCode, is missing or is not one of the three codes ZATCA accepts for electronic invoices: 388 for a tax invoice, 383 for a debit note and 381 for a credit note. Any other code is rejected under BR-KSA-05, including codes that are perfectly valid in the wider European EN 16931 list. The one that catches people out is 386, the prepayment invoice.

What to check in your ERP

Check how your system maps document types onto this field: invoices go out as 388, credit notes as 381 and debit notes as 383. Advance and prepayment invoices are not 386 for ZATCA - they are issued as 388 with the amount already paid carried in cbc:PrepaidAmount. If the element is missing altogether, the mapping is not writing the document type at all.

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(not(contains(normalize-space(.), ' ')) and contains(' 388 383 381 386 ', concat(' ', normalize-space(.), ' ')))

Reported test

not(contains(normalize-space(.), ' ')) and contains(' 388 383 381 ', concat(' ', normalize-space(.), ' '))
Evaluated against
cbc:InvoiceTypeCode
Source
vendor/zatca/schematron/20210819_ZATCA_E-invoice_Validation_Rules.xsl:864

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:IssueDate>2026-09-01</cbc:IssueDate><cbc:IssueTime>10:00:00</cbc:IssueTime>This example: <cbc:InvoiceTypeCode name="0100000">380</cbc:InvoiceTypeCode>A document that passed: <cbc:InvoiceTypeCode name="0100000"> 388 </cbc:InvoiceTypeCode><cbc:DocumentCurrencyCode>SAR</cbc:DocumentCurrencyCode><cbc:TaxCurrencyCode>SAR</cbc:TaxCurrencyCode>
Document
bad-07-unknown-type-code.xml
Mutabiq's verdict
Not passed
Reported as
unknown_codea code ZATCA does not accept

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.

ERP guides

Product names identify the systems only. Mutabiq is independent of their vendors and is not affiliated with or endorsed by any of them.

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.