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