ZATCA Credit Notes and Debit Notes in Phase 2 (Clearance and Reporting)
Do not edit the original invoice
After a tax invoice is issued, ZATCA does not allow you to delete it or change its amounts in place. A return, a price cut, a pricing mistake, or an extra charge is a new document: a credit note or a debit note that points at the original invoice.
ZATCA’s e-invoicing guideline (Article 54 of the VAT Implementing Regulations) requires that link. Editing the XML after clearance is a violation on its own. See penalties.
Which note to issue
| Situation | Document | ZATCA type code |
|---|---|---|
| Refund, return, or a reduction in value or VAT | Credit note | 381 |
| Increase in value or VAT after the invoice | Debit note | 383 |
The note follows the type of the original invoice:
- Original was a standard tax invoice (usually B2B) → the note is cleared before you share it with the buyer.
- Original was a simplified tax invoice (usually B2C) → issue the note, then report it within 24 hours.
A POS sale to a business can still be a standard invoice. Route the note from the original document, not from the sales channel. Background: B2B clearance vs B2C reporting.
What the note must contain
- A reference to the original invoice (its UUID / invoice reference). One note can cover several originals; the guideline allows a range of invoice numbers and the period they were issued in.
- The same seller identity and the buyer details the original type requires. On a standard (B2B) note that means the buyer’s name, VAT number, and address.
- A reason (goods returned, pricing error, extra charge).
- Line amounts. A credit note cannot exceed the total of the invoice it corrects.
- Arabic in the human-readable fields. English can sit beside it; Arabic cannot be missing.
The note is its own document in the PIH chain for that EGS unit. It is signed and submitted like an invoice. It does not replace the original in your archive — you keep both.
With the Esnad API
Send JSON. We build the UBL, set type 381 or 383, and submit on the same path as the original invoice (clearance or reporting).
await fetch('https://api.esnadapi.com/v1/invoices/credit-note', {
method: 'POST',
headers: {
Authorization: 'Bearer zatca_live_xxxxxxxxxxxx',
'Idempotency-Key': crypto.randomUUID(),
'Content-Type': 'application/json',
},
body: JSON.stringify({
egs_unit_id: 'egs_abc123',
invoice_number: 'CN-2026-014',
original_invoice_uuid: 'original-invoice-uuid',
reason: 'Goods returned',
seller: { name: 'Your Company', vat_number: '310122393500003' },
line_items: [{ description: 'Returned item', quantity: 1, unit_price: 100, vat_category: 'S' }],
}),
});
Debit notes use POST /v1/invoices/debit-note with the same original_invoice_uuid and reason. If the original was B2B, include the buyer name, VAT number, and address. HTTP 200 means Fatoora finished inline; HTTP 202 means it is queued and will retry.
Common rejections
- No original reference —
original_invoice_uuidmust be an invoice you issued on that unit. - Wrong route — a B2B credit sent as a simplified report, or the reverse.
- Credit larger than the invoice — reduce the lines; do not over-credit.
- Editing the cleared XML — issue a note instead.
Skip the boilerplate. Use Esnad API.
The fastest way to integrate ZATCA compliance into any system.