E-invoice
Compliance with electronic invoicing mandates (KSA ZATCA, EU EN 16931).
Last updated 2026-05-05
The e-invoice module turns a finalized invoice into a compliant electronic document for the relevant regulatory regime: KSA ZATCA Phase 2 (UBL 2.1 + signed JSON + QR code, with clearance / reporting modes), EU EN 16931 (UBL or CII), and Egypt ETA. Configuration lives at Settings → Tax → E-invoice: the tenant onboards their compliance certificate (CSID for KSA), selects the active regime, and turns the feature on per customer. Once enabled, finalized invoices automatically submit to the regulator and the resulting clearance reference is stored on the invoice plus rendered on the PDF.
Failures (network, signature, schema) raise an alert and the invoice stays in a pending-clearance state until the operator retries.
Related endpoints
GET /api/tenant/einvoice/config— current regime + certificate metadata.PUT /api/tenant/einvoice/config— switch regime / upload cert.POST /api/tenant/einvoice/invoices/:id/submit— manual submit (re-tries are auto).GET /api/tenant/einvoice/invoices/:id/status— regulator state + last error.
See the source at apps/web/src/app/(tenant)/settings/tax/einvoice and apps/api/src/einvoice.