Skip to content

Artisan commands ​

Setup ​

CommandDescription
zatca:taxpayer:registerRegister a company / VAT registration (and optionally its first branch). Options: --name, --name-ar, --legal-name, --vat, --group-tin, --crn, --street, --building, --district, --city, --postal-code, --branch-code, --branch-name
zatca:device:registerRegister a device. Options: --vat-registration, --branch, --name, --types (1000/0100/1100), --environment, --industry, --location, --serial
zatca:device:onboard {device} [--resume]Onboard with an OTP (asked as hidden input). --resume continues after failed compliance checks
zatca:device:renew {device}Renew the production certificate (new OTP)
zatca:devices [--status=]List devices with status and certificate expiry
zatca:devices:import {file}Register (and with an otp column, onboard) devices from CSV/XLSX. Options: --disk, --ids=auto|external|package, --validate, --no-onboard, --actor

Invoices ​

CommandDescription
zatca:invoice show {invoice}Summary: number, workflow, type, statuses, issuance and attempt counts, unresolved errors, last error code
zatca:invoice retry {invoice} [--now] [--actor=]Resend the identical document
zatca:invoice correct {invoice} --file=corrected.json --reason= [--actor=]Save a corrected version and reissue
zatca:invoice reissue {invoice} --reason= [--actor=]New issuance from the unchanged JSON
zatca:invoice approve {invoice} --actor=Approve a correction (four-eyes)
zatca:invoice credit {invoice} --file=note.json --reason=Credit note for an accepted invoice
zatca:invoice debit {invoice} --file=note.json --reason=Debit note for an accepted invoice
zatca:invoice cancel {invoice} --reason=Full credit note (Cancelling invoices)
zatca:invoice discard {invoice} --reason=Close a never-signed invoice (CANCELLED)
zatca:invoice abandon {invoice} --reason=Close a rejected invoice (ABANDONED) ⚠

{invoice} is the invoice_id (ULID) returned when issuing.

Background and maintenance ​

CommandScheduleDescription
zatca:outbox:relay [--daemon] [--sleep=1] [--limit=500] [--max-time=0]every minutePush due outbox messages to the queues
zatca:outbox:prune [--days=]daily 03:30Delete processed outbox messages (dead letters are kept)
zatca:deadlines:checkevery 10 minB2C deadline alerts and breaches
zatca:reconcile [--older-than=300]every 15 minRe-queue submissions and B2B generations without a pending message
zatca:chain:verify [--device=] [--deep]daily 02:45Verify ICV/PIH chains
zatca:devices:check-expirydaily 03:15Certificate expiry status and warnings
zatca:audit:verify—Verify the audit log hash chain

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