BR-KSA-06: Invalid Invoice Transaction Subtype Code (NNPNESB / KSA-2)
BR-KSA-06: كود المعاملة الفرعية للفاتورة غير صحيح (NNPNESB / KSA-2)
The invoice transaction code (KSA-2) must exist and respect NNPNESB structure: NN (pos 1-2) = 01 (Tax Invoice) or 02 (Simplified), P (pos 3) = Third Party (0/1), N (pos 4) = Nominal (0/1), E (pos 5) = Export (0/1), S (pos 6) = Summary (0/1), B (pos 7) = Self-billed (0/1).
/ubl:Invoice/cbc:InvoiceTypeCode/@name 📌 Overview & Impact
The invoice transaction code (KSA-2) must exist in @name attribute of InvoiceTypeCode and respect the 7-digit NNPNESB structure.
⚠️ Common Causes for Rejection
- ✕ Missing @name attribute on <cbc:InvoiceTypeCode>
- ✕ Name attribute string length is not exactly 7 characters
- ✕ Using characters other than '0' and '1' in positions 3 to 7
- ✕ Setting invalid positions (e.g. Export '1' on Simplified invoice '02')
✅ How to Fix & Resolve
Construct 7-Character Subtype
For Standard B2B Invoice: '0100000'. For Simplified B2C Invoice: '0200000'. For Standard Export Invoice: '0100100'.
Validate Export Flags
Ensure Export (pos 5) is only set on Standard Tax Invoices (01), not on Simplified (02).
💻 Code Comparison: Invalid vs Compliant UBL 2.1 XML
<cbc:InvoiceTypeCode name="01">388</cbc:InvoiceTypeCode> <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 is the transaction code for a standard B2B invoice?
For a standard domestic B2B tax invoice with no special transaction flags, the transaction code is '0100000'.
🔗 Related ZATCA Rules
BR-KSA-05: Invalid Invoice Type Code (BT-3)
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).
BR-KSA-31: Unsupported Subtype on Simplified Tax Invoice
For simplified tax invoices (KSA-2 starting with 02), only third party (pos 3), nominal supply (pos 4), and summary transactions (pos 6) are allowed. Exports & self-billing are forbidden.
Stop Fighting Cryptic ZATCA XML Errors
Qeemah handles Phase 2 e-invoicing, cryptographic signing, and real-time clearance automatically. Integrate in minutes.