BR-KSA-56Credit or debit note does not reference the original invoice

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-56.

Validate 5 invoices free

Five checks a month on the Free plan. The file is checked in memory and is never stored.

The message ZATCA prints

[BR-KSA-56]-For credit notes ((BT-3) has the value of 381) and debit notes ((BT-3) has the value of 383), the billing reference ID (BT-25) is mandatory.

Also cited in this report

  • BR-KSA-56

    [BR-KSA-56]-For credit notes ((BT-3) has the value of 381) and debit notes ((BT-3) has the value of 383), the billing reference ID (BT-25) is mandatory.

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.

Credit or debit note does not reference the original invoice

Reported asbilling_reference_missingno reference to the original invoice

What is wrong

The document is a credit note (381) or a debit note (383) and carries no billing reference id (BT-25) anywhere in it - no cac:BillingReference with a cac:InvoiceDocumentReference holding a cbc:ID. ZATCA makes that reference mandatory on both note types under BR-KSA-56, because a note has no meaning on its own: it adjusts an invoice, and the reference is what says which one.

What to check in your ERP

The original invoice's number goes in cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID. Check that your credit and debit note documents record the invoice they adjust and that the export writes it - a note raised as a standalone document, or one raised against a customer rather than against an invoice, will have nothing to write. If your system allows a note against several invoices, the export must emit one billing reference per invoice.

Credit or debit note references an invoice but names none

Reported asbilling_reference_id_emptythe referenced invoice's id is empty

What is wrong

The document is a credit note (381) or a debit note (383) and carries the billing reference structure, but every cbc:ID inside it is empty, so the billing reference id (BT-25) has no value. ZATCA fails this under BR-KSA-56 exactly as it fails a missing reference: an empty id names no invoice.

What to check in your ERP

The structure is being written and the value is not, which usually means the export emits the reference block for every note while the invoice number itself comes from a field that is only filled when the note is raised from the invoice screen. Check the value the mapping reads. A note raised against an invoice that predates e-invoicing still needs that invoice's own number written here.

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.

Executed guard

not(exists(./cac:InvoiceDocumentReference/cbc:ID) and (./cac:InvoiceDocumentReference/cbc:ID) != '')

Reported test

exists(//cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID) and (//cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID) != ''
Evaluated against
/ubl:Invoice[cbc:InvoiceTypeCode = '381'] | /ubl:Invoice[cbc:InvoiceTypeCode = '383']
Source
vendor/zatca/schematron/20210819_ZATCA_E-invoice_Validation_Rules.xsl:1999

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.

Document
bad-02-credit-no-billingref.xml
Mutabiq's verdict
Passed
Reported as
billing_reference_missingno reference to the original invoice

Download this example (.xml)Check it in Mutabiq

This page's example, checked by the same rules your own upload goes through. No upload and no sign-in.

ERP guides

Product names identify the systems only. Mutabiq is independent of their vendors and is not affiliated with or endorsed by any of them.

Rules evaluated against the same part of the document. One wrong value often reports several of them at once.

Check an invoice

Check your own invoice

© 2026 Hayatiq AI Solutions F.Z.E. All rights reserved.