Pillar Guide · Saudi Arabia

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.

ZATCA Phase 2 E-Invoicing Integration: A 2026 Engineering Guide
Pillar Guide
Field Build · KSA / 2026
01Section 01

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.

02Section 02

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.

03Section 03

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.

04Section 04

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.

Mada
Default KSA card rail
Apple Pay
Standard on Mada checkout
Tabby
BNPL — 4 instalments
Tamara
BNPL — Pay in 3
STC Pay
Wallet for younger demos
HyperPay
Gateway for enterprise
ZATCA Phase 2
Fatoora e-invoicing
Nafath
Government identity SSO
Absher
Citizen services bridge
Salla & Zid
Build-on-top or migrate-off

FAQs

Other Saudi pillar guides

Related dossiers

Engagement Brief · Engineering Desk

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.