2026-05-07· 15 min read· Developer

ZATCA Phase 2 Developer Guide: Complete Technical Integration

This guide is for developers building invoicing systems for the Saudi market. It covers all technical details for integrating with ZATCA Phase 2, from CSR generation to clearing your first invoice.

⚠️ Prerequisites: Understanding of XML, X.509 certificates, ECDSA cryptography, REST APIs, and UBL 2.1 schema.

1. Architecture Overview

Phase 2 (Integration) requires real-time connectivity with ZATCA via two paths:

2. Full Integration Cycle

  1. Generate CSR per ZATCA spec
  2. Get OTP from Fatoora portal
  3. POST CSR + OTP → Compliance API → receive Compliance CSID
  4. Issue 6 test invoices (Standard + Simplified + Credit + Debit notes)
  5. Request Production CSID from Onboarding API
  6. Sign real invoices + send to Clearance/Reporting API

Building this layer takes 3-6 months for a specialized team. POS SAAS provides a ready API hiding all complexity. Read API docs or start a free trial.

Related Articles