Clearance of standard invoices
Sending a standard invoice or note to FATOORA before the buyer gets it; the platform returns it stamped with a QR code.
The controls define clearance as ZATCA checking standard invoices and their notes, stamping the compliant ones and notifying the issuer before they reach the customer. In phase 2 a standard invoice is valid only with ZATCA's stamp.
The seller sends the document as XML (not PDF/A-3) to the clearance API with its hash and UUID. If valid or accepted with warnings, the platform returns it stamped with a QR code; if rejected it returns the errors, and the corrected document goes again as a new one with a new counter value and UUID.
Under an approved self-billing arrangement the buyer submits. When ZATCA switches clearance off, the API answers 303 and the standard document goes through the reporting API, validated but not stamped. During a system outage the failure is notified through ZATCA's failure-notification service and the documents are sent once it is resolved.
In JooDax
Not builtNot built. The document carries no buyer VAT number or address, which a standard invoice needs, and the programs have no call to the clearance API.
crates/jdx-einvoice-sa/src/api.rs
Steps
- Issue the standard document, optionally stamped.
- Send it to /invoices/clearance/single with its hash and UUID.
- On 200 or 202 take the stamped document (clearedInvoice) and give it to the buyer.
- On 400 correct it and issue a new document.
Questions and answers
Does the hash change after ZATCA stamps the invoice?
No; the stamp and QR code sit in blocks excluded from the hash.
Related pages
- KSA-2 Invoice transaction code
- KSA-15 Cryptographic stamp
- KSA-14 QR code
- BR-KSA-06 · The name attribute on the invoice type must exist with the structure NNPNESB.
Related concepts
- Reporting simplified invoices within 24 hoursSending a simplified invoice or note, already stamped and handed to the buyer, to FATOORA within 24 hours of issue.
- Standard versus simplified tax invoicesStandard invoices are for businesses and cleared before hand-over; simplified ones are mostly for consumers, stamped locally and reported within 24 hours.
- The cryptographic stamp (digital signature)An ECDSA signature in XAdES form over the document hash and signing properties, made with a registered device key and a ZATCA-issued certificate.
E-invoicing in Saudi Arabia (FATOORA)
Sources
- الضوابط والمتطلبات والمواصفات الفنية والقواعد الإجرائية اللازمة لتنفيذ أحكام لائحة الفوترة الإلكترونية (قرار المحافظ رقم 62738 وتاريخ 1443/11/23هـ) (vfile dated 20230519 (decision 62738)) — ZATCA
- Controls, Requirements, Technical Specifications and Procedural Rules for Implementing the Provisions of the E-Invoicing Regulation (Decision No. 62738 dated 23/11/1443H) (vfile dated 20230519 (decision 62738)) — ZATCA
- E-invoicing Detailed Technical Guidelines (vVersion 2) — ZATCA
- Detailed Guidelines for E-Invoicing (vVersion 2) — ZATCA
- Integration Sandbox API pages (Swagger): reporting, clearance, compliance, production CSID, renewal (ve-Invoicing Sandbox Release 2.1.0 (page lists 2.1.1 as latest)) — ZATCA
Checked on: 4 November 2026. What concerns JooDax is taken from the programs’ own code.