🧾
📚 Complete Guide

ZATCA Phase-2 Compliance Checklist

47-Step Guide to Implementing Phase-2

📄 18 pages · ⏱️ 22 min read · 🆓 Free

A practical comprehensive guide to implementing ZATCA Phase-2 in your company step-by-step. Built on Softloomer's hands-on experience in Saudi Arabia. Covers all technical, regulatory, and integration requirements.

1

Phase 1: Preparation & Registration (Week 1)

  1. Verify your company is in the current wave — check ZATCA portal for your effective date
  2. Prepare Commercial Registration — must be active and valid
  3. Register technical contact in ZATCA portal
  4. Review VAT registration — confirm VAT number correct
  5. Choose certified solution provider — Odoo Enterprise, SAP, Oracle, etc.
  6. Schedule test environment access — ZATCA Sandbox
2

Phase 2: Technical Setup (Week 1-2)

  1. Obtain CSID (Cryptographic Stamp Identifier) from ZATCA Sandbox
  2. Configure digital certificate in ERP
  3. Setup CSR (Certificate Signing Request)
  4. Test Sandbox endpoints: /compliance/invoices/clearance + /compliance/invoices/reporting
  5. Configure UBL 2.1 XML invoice templates
  6. Generate QR code templates in Base64 format
  7. Setup UUID generation per invoice (UUID v4)
  8. Setup hash chain for immutability
  9. Configure invoice numbering sequence (must be sequential, no gaps)
3

Phase 3: Data Mapping (Week 2)

  1. Map customer data: VAT number, address, contact
  2. Map product data: UNSPSC codes, VAT category, unit of measure
  3. Map tax rates: 15% standard, 0% (zero-rated), exempt
  4. Map fiscal categories: B2B clearance, B2C reporting, export
  5. Map currency codes ISO 4217 (SAR, USD, etc.)
  6. Map payment methods per ZATCA standards
  7. Map invoice types: standard, credit note, debit note, prepayment
4

Phase 4: Testing (Week 2-3)

  1. Test standard invoice (B2B clearance)
  2. Test simplified invoice (B2C reporting)
  3. Test credit note generation
  4. Test debit note generation
  5. Test prepayment invoice
  6. Test invoice cancellation workflow
  7. Verify XML schema validation against ZATCA XSD
  8. Verify QR code readable with any scanner
  9. Verify cryptographic stamp valid against public key
  10. Test offline scenario — if ZATCA API down, invoice must cache and retry
  11. Test concurrent invoices (100+ per second)
5

Phase 5: Edge Cases

  1. Export of services — VAT 0%, customer outside KSA
  2. Reverse charge mechanism — for imports
  3. Multiple line items with different tax rates
  4. Discounts — line-level + invoice-level
  5. Foreign currency invoices — exchange rate snapshot
  6. Long-form invoices (50+ line items)
  7. Customer with no VAT (B2C)
  8. Customer with foreign VAT (GCC + non-GCC)
6

Phase 6: Go-Live (Week 3-4)

  1. Obtain Production CSID from ZATCA portal
  2. Switch endpoints from Sandbox to Production
  3. Issue test invoice in production + verify clearance
  4. Setup monitoring + alerts for failed submissions
  5. Train accounting team on new workflow
  6. Confirm backup + retention policy (minimum 8 years)
7

Common Troubleshooting

1. Invoice rejected with "Invalid Signature" error

Cause: private key or certificate invalid. Fix: regenerate CSID + re-upload certificate.

2. QR Code doesn't open in any scanner

Cause: base64 encoding wrong or TLV format incorrect. Fix: use ZATCA's official TLV generator for validation.

3. Sequence numbers have gaps

Cause: invoices cancelled mid-stream. Fix: ZATCA requires reason for gaps in monthly report.

4. Timeout on clearance endpoint

Cause: ZATCA API slow during peak hours. Fix: retry logic with exponential backoff (max 3 retries).

✅ Quick Checklist

Print it and track along

  • Commercial Registration active and valid
  • VAT registration valid
  • CSID from ZATCA Sandbox
  • CSR + Digital certificate configured
  • UBL 2.1 XML templates ready
  • QR code generation working
  • UUID v4 generation
  • Hash chain (immutability)
  • Invoice numbering sequence (no gaps)
  • Customer VAT numbers verified
  • Product UNSPSC codes
  • Tax rates configured (15%, 0%, exempt)
  • Standard invoice test passed
  • Simplified invoice test passed
  • Credit note test passed
  • Debit note test passed
  • XML schema validation passed
  • Cryptographic stamp validation
  • Offline scenario handling
  • Production CSID issued
  • Monitoring + alerts setup
  • Accounting team trained
  • Backup + 8-year retention policy
📬

Get new guides first

Subscribe to Softloomer newsletter. New technical guides monthly, no spam.

Need help implementing?

We're a certified Odoo Partner serving the Gulf. Book a free 30-minute discovery session.

📅 Book Session
WhatsApp