Skip to main content
BR-KSA-31ErrorZATCA Phase 2 UBL 2.1implemented

Simplified Invoice Transaction Flag Restrictions

Simplified tax invoices (02xxxxx) cannot enable export (position 5 = 1) or self-billed (position 7 = 1) transaction flags.

Scope
Document Header
Applicable Invoice Types
Simplified (B2C)
Catalog Version
v1.0.0 (2026-11-23)
Target XPath
/Invoice/cbc:InvoiceTypeCode/@name

Typical Reason for Failure

Export or self-billed transactions are accidentally assigned prefix 02 instead of 01.

Invalid Synthetic Example

Before (Fails)xml
<cbc:InvoiceTypeCode name="0200100">388</cbc:InvoiceTypeCode>

Corrected Synthetic Example

After (Fixed)xml
<cbc:InvoiceTypeCode name="0100100">388</cbc:InvoiceTypeCode>

Explanation of the Fix

Use Standard prefix '01' for export/self-billed invoices, or clear positions 5 & 7 for Simplified.

Official Source Reference

ZATCA Electronic Invoice XML Implementation Standard (Phase 2)

Open official specification

Related Rules

Test your invoice against BR-KSA-31 now

Browser quick check; raw XML is never stored.

Open Validator