Skip to main content

User Guide

ZATCA & E-Invoicing Compliance — User Guide

This guide explains how to configure and validate electronic invoicing compliance workflows in Xfatora, focusing on:

  • Saudi Arabia (ZATCA QR output on invoices)
  • Global / multi-tenant e-invoicing processing (post-invoice creation processing)

This is a configuration + operations guide. Compliance requirements vary by country and by customer type.

Roles & permissions

Recommended roles:

  • Compliance Owner (Admin)
  • Manages compliance settings, seller identity, VAT values, and rollout policy
  • Finance Lead
  • Validates invoice totals, taxes, PDF output, and audit evidence packs
  • Operations / Support
  • Runs test invoices and verifies QR/PDF output in staging and production

Governance best practice:

  • Limit settings changes to a small group
  • Use a change log and test checklist per tenant

Setup checklist (Saudi ZATCA)

### 1) Enable ZATCA module

  • Ensure the ZATCA module is enabled.
  • Open Setup → ZATCA settings.

### 2) Configure seller identity
In ZATCA settings, configure:

  • Seller name (legal name)
  • VAT number
  • Any required scoping rules (e.g., KSA-only behavior)

### 3) Decide scope (recommended: KSA-only when needed)
If you serve multiple countries, enable KSA-only rules so invoices for non-KSA customers do not include ZATCA output.

### 4) Validate output
Create a test invoice and verify:

  • QR appears where expected (invoice HTML/PDF)
  • Seller name and VAT are correct
  • Timestamp reflects invoice creation time
  • Total and VAT amount match invoice totals/taxes

Setup checklist (Global / multi-tenant e-invoicing processing)

### 1) Enable the e-invoicing processing module

  • Ensure the global e-invoicing processing module is enabled.
  • Confirm migrations/upgrade steps for the module are applied (if your deployment uses migrations).

### 2) Configure e-invoicing settings

  • Open Setup → e-invoicing settings (module-specific).
  • Configure tenant-level settings (if you are in multi-tenant mode).

### 3) Validate invoice processing
Create a test invoice and verify:

  • The invoice triggers the processing pipeline after invoice creation
  • Processing completes successfully (based on your deployment’s logs/output)

Key workflows

### Workflow 1: ZATCA readiness test (staging)

  1. Configure seller identity + VAT number
  2. Enable ZATCA
  3. Create a test invoice for a KSA customer
  4. Generate PDF
  5. Confirm QR appears and values are correct
  6. Capture evidence (PDF + invoice ID)

### Workflow 2: Production rollout (tenant-by-tenant)

  1. Choose a pilot tenant/customer group
  2. Apply settings
  3. Run a controlled set of invoices
  4. Monitor support tickets and finance verification
  5. Expand to more tenants once stable

### Workflow 3: Monthly compliance audit pack

  1. Export invoices for the period
  2. Sample-check PDF output and QR presence
  3. Store evidence in a secure audit folder
  4. Record settings state (seller identity, VAT number, scope rules)

Reports & evidence

Recommended evidence artifacts:

  • Invoice PDFs for sample set
  • Invoice IDs + timestamps
  • Customer country scope and rule confirmation
  • Export pack (CSV/exports if used) for the audit window

Troubleshooting / FAQ

### QR does not appear on invoice

  • Confirm ZATCA is enabled in settings
  • If using KSA-only rules: confirm customer country is Saudi Arabia and the rule allows the invoice
  • Confirm you are viewing the correct invoice output (HTML vs PDF)

### Seller name/VAT is wrong on QR

  • Update seller identity settings
  • Re-generate the invoice PDF
  • Confirm cache is cleared if your environment caches invoice templates

### Compliance processing does not run after invoice creation

  • Confirm processing module is enabled
  • Confirm the invoice creation triggers the post-create hook in your deployment
  • Check module logs / server logs for processing errors

### We serve multiple countries
Use scoped rules and a rollout checklist:

  • KSA-only behavior for ZATCA
  • Tenant-specific rules for multi-tenant compliance

---

✅ Acceptance:

The doc matches your standard structure:

Overview

Roles & permissions

Setup checklist

Workflows

Reports

Troubleshooting / FAQ

Need help with this section? Contact our team for guided setup support.