Every merchant selling in Saudi Arabia or Egypt discovers the same surprise right around launch week: turning on Paymob, Moyasar, or Stripe does not make your business tax-compliant. Payment gateways settle money; ZATCA (Fatoora) in Saudi Arabia and the Egyptian Tax Authority (ETA) expect structured, signed electronic invoices linked directly to your accounting and order systems.
Whether you run an ecommerce brand, a SaaS billing portal, multi-branch retail POS, or an enterprise ERP, here is how ZATCA Phase 2 and Egypt ETA integration work in practice—and when to use Odoo vs custom API bridges.
ZATCA Phase 2 (KSA) vs Egypt ETA side by side
| Compliance dimension | Saudi Arabia — ZATCA Phase 2 (Fatoora) | Egypt — ETA e-Invoicing & e-Receipt |
|---|---|---|
| Standard VAT rate | 15% | 14% (with exempt/table categories per product code) |
| Payload format | UBL 2.1 XML with embedded PIH hash chain | Versioned JSON document schema with GS1 / EGS item coding |
| Cryptographic identity | Onboarded device CSID certificates + ECDSA XML signature | Tax-authority registered USB Token / HSM CADES-BES signature (B2B e-Invoice) |
| B2B vs B2C flow | B2B (Standard): real-time Clearance before sharing PDF with buyer; B2C (Simplified): Reporting within 24 hours | B2B: e-Invoice submission; B2C retail/ecommerce: e-Receipt via registered POS/channel UUID |
| QR code on printed PDF | Tag-Length-Value (TLV) Base64 QR encoding 9 cryptographic fields (Phase 2) | Validation receipt link / ETA receipt QR code |
Key engineering realities that trip teams up
1. Credit and debit notes (partial refunds & returns)
Many first-version integrations handle happy-path Invoice submissions and fail completely when a customer requests a partial return or card refund. Neither ZATCA nor ETA lets you silently edit or delete a cleared tax invoice—you must emit a formal signed Credit Note referencing the original invoice UUID/hash before closing accounting entries.
2. Hash chains and sequential numbering (ICV / PIH)
In ZATCA Phase 2, each device/POS stream maintains a monotonically increasing counter (ICV) and links the SHA-256 hash of the previous invoice (PIH). Sending two parallel async worker requests without an atomic database lock breaks the sequence and causes ZATCA rejections until re-synced.
3. Item coding (EGS / GS1) and rounding precision
ETA documents reject mismatched line-item tax math down to the piaster (0.01 EGP rounding drift) or unapproved GS1/EGS GPC codes. Always calculate tax per line cleanly on the server, never on JavaScript client carts.
4. Retry queues and offline fallback
Tax authority endpoints occasionally rate-limit, rotate maintenance windows, or return transient 5xx responses during peak billing days. Treat submission as an idempotent background queue with explicit statuses (Draft, Queued, Submitted, Cleared/Valid, Rejected) rather than blocking the shopper’s browser checkout spinner on government API latency.
Odoo ERP vs building a custom e-invoicing service
You rarely want to maintain evolving XML/JSON government compliance schemas inside five separate storefronts:
- Use Odoo ERP as your compliance core when: You already manage inventory, purchasing, VAT returns, and accounting journals—Odoo localization handles ZATCA Phase 2 and ETA submission flows alongside full double-entry ledgers. See our honest breakdown on when to choose Odoo vs custom software.
- Build a custom decoupled API / middleware when: Your custom SaaS, marketplace, or high-volume mobile checkout (like Egypt Paymob flows or Saudi Moyasar/Mada checkouts) needs clean REST/webhook triggers feeding a single compliant tax signing service or bridging cleanly into Odoo via API.
Pre-go-live e-invoicing checklist
- Verify sandbox credentials,
CSIDcertificates (KSA) or signing HSM/token agent + mappedEGS/GS1product codes (Egypt). - Test all document types: standard B2B invoice, simplified B2C invoice/receipt, partial credit note (refund), and zero-rated/exempt tax lines.
- Verify Arabic + English PDF rendering with embedded fonts and crisp QR code visibility—see our Arabic & RTL design guide so RTL invoices never garble characters.
- Build admin alerts when any invoice enters
Rejectedstatus so finance resolves validation issues the same day.
Frequently Asked Questions
Does my payment gateway handle ZATCA Phase 2 or Egypt ETA e-invoicing for me?
No. Payment gateways such as Moyasar, Paymob, or Tap collect card/wallet funds and return transaction webhooks, while your store backend, SaaS billing engine, or ERP (such as Odoo) must generate, cryptographically sign, and submit compliant electronic tax invoices.
What is the key difference between ZATCA Phase 1 and Phase 2 (Integration Phase)?
Phase 1 required generating and storing structured invoices with basic QR codes locally. Phase 2 mandates direct API integration with ZATCA’s Fatoora portal: UBL 2.1 XML format, cryptographic hash chaining, digital CSID certificates, real-time Clearance for B2B invoices, and Reporting within 24 hours for B2C simplified invoices.
In Egypt, how does ETA e-Invoicing differ from e-Receipt?
Egypt’s ETA separates B2B tax invoices (e-Invoicing with USB/HSM cryptographic token signing by an authorized issuer) from B2C consumer POS/ecommerce receipts (e-Receipt submitted directly from registered POS/store channels).
Should we build a custom ZATCA/ETA connector or handle compliance through Odoo ERP?
If you already need inventory, purchasing, and accounting ledgers, Odoo with properly configured KSA ZATCA Phase 2 or Egypt ETA localization avoids months of tax maintenance. Use a dedicated custom API service mainly when integrating a proprietary high-throughput SaaS or custom POS platform.
Need ZATCA Phase 2 or Egypt ETA integration wired cleanly into Odoo, your custom platform, or ecommerce stack? Explore our ZATCA & ETA E-Invoicing Integration service, Odoo ERP services, Saudi Arabia solutions, Egypt hub, or contact our engineers.
