BR-KSA-07An export invoice is marked as self-billed
Mutabiq checks Saudi ZATCA Phase 2 e-invoice XML before you submit it: pre-validation against published ZATCA requirements, not an approval by the authority. This page explains one rule, BR-KSA-07.
Five checks a month on the Free plan. The file is checked in memory and is never stored.
The message ZATCA prints
[BR-KSA-07]-Self billing is not allowed (KSA-2, position 7 cannot be "1") for export invoices (KSA-2, position 5 = 1).
What Mutabiq reports
One entry for each way this rule can be reported.
Reported as
What kind of value was found — empty, not_15_digits and the like — never the value itself.
An export invoice is marked as self-billed
Reported asself_billed_exportan export invoice marked as self-billed
What is wrong
The invoice transaction code (KSA-2), the name attribute on cbc:InvoiceTypeCode, has both its exports flag at position 5 and its self-billed flag at position 7 set to 1. ZATCA rejects that combination under BR-KSA-07: an invoice to a customer outside the Kingdom may not be issued as a self-billed invoice. Self-billing is an arrangement where the customer raises the invoice on the supplier's behalf, and it is not available on an export.
What to check in your ERP
One of the two flags is wrong, and which one depends on the transaction. If this really is a sale to a customer outside the Kingdom, the self-billed flag must be 0 - so the code is 0100100 rather than 0100101. If the invoice was genuinely raised by the customer under a self-billing agreement, then the exports flag is the one to check. Both are usually set from a customer or agreement setting rather than typed, so check which setting feeds each position of the transaction code.
The clause that runs
Quoted from the validation-rule stylesheet ZATCA publishes, at the file and line named below. The executed guard is what the check runs; the reported test is what it prints when it fails, and the two are not always the same.
As shipped in ZATCA SDK 3.4.8: the copy quoted here is, byte for byte, the file that release ships. The date in the file name is the name ZATCA gives the file; the rules in it are those of SDK 3.4.8.
A worked example
A synthetic document from the measured test corpus that trips this rule, shown where it differs from one that passed. Mutabiq's report names the class of the value, never the value itself.
Where it differs from a document that passed
− This example
+ A document that passed
<cbc:IssueDate>2026-09-01</cbc:IssueDate><cbc:IssueTime>10:00:00</cbc:IssueTime>−This example: <cbc:InvoiceTypeCode name="0100101">388</cbc:InvoiceTypeCode>+A document that passed: <cbc:InvoiceTypeCode name="01001000">388</cbc:InvoiceTypeCode><cbc:DocumentCurrencyCode>SAR</cbc:DocumentCurrencyCode><cbc:TaxCurrencyCode>SAR</cbc:TaxCurrencyCode>
Document
bad-16-export-self-billed.xml
Mutabiq's verdict
Not passed
Reported as
self_billed_exportan export invoice marked as self-billed