BR-KSA-05: Invoice type code must be 388, 383, 381 or 386
cbc:InvoiceTypeCode (BT-3) must be a single value from the KSA subset of UN/CEFACT 1001. The executed check accepts 388 (tax invoice), 383 (debit note), 381 (credit note) and 386 (prepayment invoice); the listed test text omits 386.
How to fix it
Use one of these values with no spaces, e.g. <cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode>.
ZATCA's official text
[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.
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
not(not(contains(normalize-space(.), ' ')) and contains(' 388 383 381 386 ', concat(' ', normalize-space(.), ' ')))
Related rules
- BR-04 · Every invoice needs an invoice type code (BT-3)
- BR-KSA-17 · Credit and debit notes need a reason for issuing
- BR-KSA-56 · Credit and debit notes must reference the original invoice (BT-25)
- BR-KSA-73 · Prepaid amount (BT-113) requires full prepayment reference on lines
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