Clearance
Clearance is ZATCA's model for standard (B2B) tax invoices: the invoice goes to ZATCA before the buyer, which validates it, stamps it and sends it back.
Clearance is the model for standard (B2B) tax invoices. The invoice goes to ZATCA first; the Fatoora platform validates it against the XML standard and runs further checks, then adds its own cryptographic stamp and QR code and returns the cleared XML. That cleared document is what the buyer receives.
The call: POST /invoices/clearance/single with the header clearance-status: 1 and a body of invoiceHash, uuid and the base64 invoice. The response carries clearanceStatus (CLEARED or NOT_CLEARED) and clearedInvoice, the stamped document.
What goes wrong: handing the buyer your own copy instead of the stamped one, and thin buyer data: BR-KSA-42 for the name, BR-KSA-81 for another buyer ID when there is no VAT number, BR-KSA-10 for the address. A tax invoice also needs a supply date (BR-KSA-15). An HTTP 303 means ZATCA has clearance switched off and the invoice should be reported instead.
On Matheel, "type": "standard" goes through clearance automatically; the response says status: cleared and invoice_xml is ZATCA's stamped document. Archive that one, not your own.
Example
POST /invoices/clearance/single
accept-version: V2
clearance-status: 1
{"invoiceHash": "…", "uuid": "…", "invoice": "<base64 signed XML>"}
FAQ
What is the difference between clearance and reporting?
Clearance is for standard invoices and happens before the buyer gets the invoice; ZATCA stamps it. Reporting is for simplified invoices, within 24 hours of issue, and ZATCA does not stamp them.
Is an invoice accepted with warnings cleared?
Yes. Warnings do not block acceptance and the invoice is part of the chain. Errors are what reject.
Who generates the QR code on a standard invoice?
Per ZATCA's guidelines, ZATCA generates the QR string at clearance along with its stamp; you print it from the cleared document.
Related ZATCA rules
Related terms
Let Matheel handle this for you
Matheel signs the invoice, files it with ZATCA and keeps the counter and hash in one request, and returns the PDF with the QR.
Try Matheel, no signup Matheel API docs