Skip to content

Statuses and lifecycle ​

Each invoice has five independent status fields, so "what went wrong where" is always clear.

FieldValues
processing_statusWhere the invoice is in the pipeline (main status)
validation_statusPENDING, VALID, VALID_WITH_WARNINGS, INVALID
submission_statusNOT_STARTED, PENDING, IN_FLIGHT, DELIVERED, UNKNOWN, FAILED_TRANSIENT, FAILED_PERMANENT
reporting_status (B2C)NOT_APPLICABLE, PENDING, REPORTED, REPORTED_WITH_WARNINGS, NOT_REPORTED
clearance_status (B2B)NOT_APPLICABLE, PENDING, CLEARED, CLEARED_WITH_WARNINGS, NOT_CLEARED, CLEARANCE_DEACTIVATED

Processing status ​

StatusMeaningWhat to do
RECEIVEDStored, about to be validatedNothing
VALIDATION_FAILEDThe payload is invalid. No counter was usedCorrect the JSON
READY_FOR_PROCESSINGValid, waiting to be signedNothing (B2B submit(): a worker signs it)
QUEUEDSigned, waiting to be sent to ZATCANothing
SUBMITTINGA worker is talking to ZATCANothing
REPORTEDZATCA accepted the reportDone
CLEAREDZATCA cleared the invoiceSend the cleared XML to the buyer
REJECTEDZATCA refused the documentRead the errors, then correct, reissue or cancel
RETRY_PENDINGTemporary failure, retry scheduled (next_retry_at)Nothing
OUTCOME_UNKNOWNNo readable answer (e.g. timeout after sending). The same document will be resentNothing
FAILEDRetries exhausted, or signing failed (certificate problem)Fix the cause, then retry
MANUAL_REVIEWStopped for a human: authentication refused, request refused, or a correction waiting for approvalInvestigate; retry or approve
CANCELLEDDiscarded before signingFinal
ABANDONEDRejected and abandoned ⚠Final

Typical paths ​

B2C   RECEIVED → READY_FOR_PROCESSING → QUEUED → SUBMITTING → REPORTED
B2B   RECEIVED → READY_FOR_PROCESSING → QUEUED → SUBMITTING → CLEARED

temporary failure   … SUBMITTING → RETRY_PENDING → QUEUED → SUBMITTING → REPORTED
rejection           … SUBMITTING → REJECTED → (correct) READY_FOR_PROCESSING → QUEUED → … → REPORTED
invalid payload     RECEIVED → VALIDATION_FAILED → (correct) READY_FOR_PROCESSING → …

Where the details are ​

TableContent
zatca_invoicesThe record and its current statuses
zatca_invoice_versionsOriginal JSON and every correction
zatca_invoice_issuancesEvery legal document (UUID, ICV, hash, QR) and its status (issued, accepted, accepted_with_warnings, rejected, superseded)
zatca_submission_attemptsEvery call to ZATCA with the (redacted) request, the response, HTTP status and duration
zatca_errors / zatca_error_groupsErrors with category, severity, code, resolution
zatca_warningsLocal and ZATCA warnings
zatca_processing_logsEvery status change with time, actor and message

From the command line:

bash
php artisan zatca:invoice show 01M6E1Y8WXFJ0RK6YXMP4JN9WX

Not affiliated with or endorsed by ZATCA. Verify regulatory requirements with ZATCA and your tax advisor.