Validate a ZATCA XML file for free · ZATCA error codes

ZATCA BR-KSA-17: credit/debit note reason (KSA-10)

BR-KSA-17 · Error

[BR-KSA-17]-Debit and credit note (invoice type code (BT-3) is equal to 383 or 381) must contain the reason (KSA-10) for this invoice type issuing.

Official rule text: ZATCA e-invoice validation rules (official SDK XSL, 20210819).

The official rule: a debit or credit note (invoice type code (BT-3) equal to 383 or 381) must contain the reason (KSA-10) for issuing this invoice type.

Official context: /ubl:Invoice[cbc:InvoiceTypeCode = '381' or cbc:InvoiceTypeCode = '383']. The compiled SDK test requires at least one cac:PaymentMeans, and every PaymentMeans must contain cbc:InstructionNote (KSA-10). A missing payment-means block also fails the rule.

Common causes

  • Type code 381 or 383 with no PaymentMeans at all.
  • PaymentMeans is present but InstructionNote is missing or empty.
  • The reason was written only in a free-text note (BT-22) instead of KSA-10.

The snippet is a minimal illustration of the field the official test looks at, not advice on when to issue a credit or debit note. Valifakt is not a ZATCA-onboarded EGS.

<cbc:InvoiceTypeCode name="0100000">381</cbc:InvoiceTypeCode>
<cac:PaymentMeans>
  <cbc:PaymentMeansCode>10</cbc:PaymentMeansCode>
  <cbc:InstructionNote>Returned goods — credit note</cbc:InstructionNote>
</cac:PaymentMeans>

Which type codes trigger this?

The official text: 383 (debit note) and 381 (credit note).

Where is KSA-10?

In the compiled SDK XSL it is cbc:InstructionNote under each cac:PaymentMeans.

Does this tell me when to issue a credit note?

No. It only requires a reason field on those type codes. Not tax advice.

Related ZATCA rules

Validate a ZATCA XML file for free Pricing

Not tax advice. Valifakt is not a ZATCA-onboarded e-invoicing solution (EGS). Official rule text is quoted from the ZATCA SDK validation-rules XSL.