BR-KSA-05 📑 Invoice Types & Structure error

BR-KSA-05: Invalid Invoice Type Code (BT-3)

BR-KSA-05: رمز نوع الفاتورة غير صالح (BT-3)

Official ZATCA Specification:

The invoice type code (BT-3) must be equal to one of values from the subset of UN/CEFACT code list 1001, D.16B agreed for KSA electronic invoices (388, 381, 383, 386).

XPath Context: /ubl:Invoice/cbc:InvoiceTypeCode

📌 Overview & Impact

Invoice type code must be one of the agreed UN/CEFACT 1001 codes: 388 (Tax Invoice), 381 (Credit Note), 383 (Debit Note), or 386 (Prepayment).

الوصف بالعربية: رمز نوع الفاتورة يجب أن يكون أحد رموز UN/CEFACT 1001 المعتمدة: 388 (فاتورة ضريبية)، 381 (إشعار دائن)، 383 (إشعار مدين)، 386 (دفعة مقدمة).

⚠️ Common Causes for Rejection

  • Supplying unsupported invoice type codes like 380 or custom string codes
  • Case sensitivity or leading/trailing whitespace in <cbc:InvoiceTypeCode>
  • Mismatched document structure when submitting credit/debit notes

How to Fix & Resolve

1

Select Allowed Code

Use 388 for Standard & Simplified Tax Invoices, 381 for Credit Notes, 383 for Debit Notes, or 386 for Prepayment Invoices.

2

Set Transaction Code Name Attribute

Ensure the 'name' attribute contains the 7-digit NNPNESB transaction subtype code.

💻 Code Comparison: Invalid vs Compliant UBL 2.1 XML

❌ Invalid XML (Rejected by ZATCA) Invalid Payload
<cbc:InvoiceTypeCode name="0100000">380</cbc:InvoiceTypeCode>
✓ Valid XML (Compliant UBL 2.1) Valid Payload
<cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode>

Verify Your Invoice XML Online

Use Qeemah's free developer tools to inspect transforms, C14N digests, and Phase 2 QR codes.

Frequently Asked Questions

What code should I use for a simplified invoice?

Both Standard and Simplified invoices use code '388'. They are differentiated by the 'name' attribute on InvoiceTypeCode (0100000 for standard, 0200000 for simplified).

Stop Fighting Cryptic ZATCA XML Errors

Qeemah handles Phase 2 e-invoicing, cryptographic signing, and real-time clearance automatically. Integrate in minutes.