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

Line-Level Charge Reason Code Mandatory (BT-145)

Any line-level cac:AllowanceCharge with ChargeIndicator=true must specify cbc:AllowanceChargeReasonCode.

Scope
Invoice Lines
Applicable Invoice Types
Standard (B2B), Simplified (B2C), Credit Note, Debit Note
Catalog Version
v1.0.0 (2026-11-23)
Target XPath
/Invoice/cac:InvoiceLine/cac:AllowanceCharge/cbc:AllowanceChargeReasonCode

Typical Reason for Failure

Line charges include text reason only while omitting UNTDID 7161 reason code.

Invalid Synthetic Example

Before (Fails)xml
<cac:AllowanceCharge><cbc:ChargeIndicator>true</cbc:ChargeIndicator><cbc:Amount currencyID="SAR">25.00</cbc:Amount></cac:AllowanceCharge>

Corrected Synthetic Example

After (Fixed)xml
<cac:AllowanceCharge><cbc:ChargeIndicator>true</cbc:ChargeIndicator><cbc:AllowanceChargeReasonCode>CG</cbc:AllowanceChargeReasonCode><cbc:Amount currencyID="SAR">25.00</cbc:Amount></cac:AllowanceCharge>

Explanation of the Fix

Add a valid UNTDID 7161 cbc:AllowanceChargeReasonCode on line charges.

Official Source Reference

ZATCA Electronic Invoice XML Implementation Standard (Phase 2)

Open official specification

Related Rules

Test your invoice against BR-KSA-20 now

Browser quick check; raw XML is never stored.

Open Validator