ZATCA Phase 2 E-Invoicing Integratio…
Dossier
Every SAR-billing business in Saudi Arabia is required to comply with ZATCA Phase 2 e-invoicing — and most ERPs, SaaS products and e-commerce checkouts in the country still get it wrong. This guide is the practical engineering view: what's actually required, what the gotchas are, and what it costs.

What ZATCA Phase 2 actually requires
Invoices generated as UBL 2.1 XML with a specific Saudi extension.
Cryptographic stamp (CSID) issued via the Fatoora portal after compliance onboarding.
QR code on every simplified tax invoice, encoding seller, VAT number, timestamp, total and VAT.
Clearance (B2B) or reporting (B2C) flow against the ZATCA integration API in near-real-time.
Common engineering mistakes
Generating the QR code client-side and losing the cryptographic signature.
Skipping the CSID renewal job — certificates rotate annually.
Treating clearance as fire-and-forget instead of validating the ZATCA response.
Not handling sandbox vs production credentials cleanly.
A clean reference architecture
Invoice service emits UBL 2.1 XML on every billing event.
Signing worker holds the CSID in a KMS / secret store and signs the XML.
Submission worker pushes to ZATCA clearance / reporting and persists the response + UUID.
Frontend renders the QR + invoice number from the signed payload.
Monitoring + retries on every ZATCA call.
What this costs to build
ZATCA integration on top of an existing billing system: SAR 22,000–60,000, 3–6 weeks.
End-to-end SaaS with ZATCA built in from day one: incremental cost is ~SAR 15,000 inside the main build.
Local Saudi stack wired in by default
Every Saudi engagement ships with the local payment, compliance and identity rails integrated from day one — no surprise vendor selection at the end of the build. Saudi operators expect Mada + Apple Pay as the default checkout, Tabby and Tamara as BNPL options, ZATCA Phase 2 e-invoicing on every invoice, and Arabic-first UX with proper RTL — and that's exactly what gets delivered.
FAQs
How to hire a developer in Saudi Arabia
Buyer's guide for KSA founders — salaries, contracts, fixed-price vs day-rate.
SaaS development in Saudi Arabia
Building a multi-tenant SaaS for the KSA market — auth, billing, ZATCA, Arabic UX.
Vision 2030 tech opportunities
Where the giga-projects and PIF capital are actually buying software in 2026.
Related dossiers
Commission the build.
The guide is reference. A two-sentence WhatsApp brief is the fastest route to a fixed-price proposal.
Strategic entry into the Saudi market begins at the atelier — bilingual, fixed-price, milestone-led.