HomeCompanyPortfolioServicesSoftware & AIMobile AppsIndustriesLocationsPricingBlogContact
Englishالعربية
Home  /  Blog  /  Ecommerce
EcommerceJun 29, 2026·10 min read

ZATCA Phase 2 E-Invoicing: What Saudi Online Stores Must Do

O
Omar
Engineering Lead
ZATCA Phase 2 E-Invoicing: What Saudi Online Stores Must Do

ZATCA e-invoicing moved from a compliance checkbox to an integration project the moment Phase 2 arrived. If you sell online in Saudi Arabia, your checkout and your invoicing system now have to talk to a government platform in real time.

What changed between Phase 1 and Phase 2

Phase 1, the generation phase, required taxpayers to issue structured electronic invoices instead of handwritten or free-form PDFs. It was largely a formatting and record-keeping change that most accounting packages absorbed.

Phase 2, the integration phase, is materially different. Invoices must be generated in a prescribed XML format, cryptographically stamped, and either cleared with or reported to ZATCA's Fatoora platform through a compliant integration. For online stores this means the invoicing flow becomes part of the transaction path rather than a back-office task.

The two invoice types and why the difference matters

Standard invoice (B2B)Simplified invoice (B2C)
Typical useBusiness customers, VAT-registered buyersConsumers, retail and most ecommerce
ZATCA processCleared before issuanceReported after issuance
TimingReal time, before sending to buyerWithin 24 hours of issuance
QR codeRequiredRequired and must be scannable
Buyer VAT numberRequiredNot required

Most consumer ecommerce runs on simplified invoices, which are reported rather than cleared. That is operationally kinder — a ZATCA outage does not block your checkout — but it does mean you need reliable queuing and retry logic, because the 24-hour reporting obligation does not pause when an API does.

What your store actually needs

  1. A compliant e-invoicing solution. Either a certified provider integrated into your platform, or your own solution built to ZATCA's technical specifications and passed through their compliance checks.
  2. Cryptographic stamp identifiers. Onboarded through ZATCA's portal and stored securely, with a defined renewal process before expiry.
  3. Correct XML generation. UBL 2.1 based, with every mandatory field populated — including line-level VAT breakdowns that many storefronts do not natively produce.
  4. A compliant QR code. Base64 TLV encoded, containing seller name, VAT number, timestamp, total with VAT and VAT amount. It must be scannable on the customer's copy.
  5. Archival. Invoices retained in their original electronic form for the statutory period, retrievable on request.
The compliance failure that costs money is almost never the XML schema. It is a queue that silently stopped retrying three weeks ago.

Where implementations go wrong

Buy or build?

For most Saudi online stores, integrating a certified provider is the correct commercial answer. The specification changes, certificates rotate, and maintaining your own implementation means owning that burden permanently for no competitive advantage.

Building in-house makes sense in narrower cases: very high invoice volumes where per-invoice provider fees become material, unusual invoicing logic that providers cannot model, or environments where data cannot leave your infrastructure. Even then, isolate the ZATCA integration behind a single service boundary so the rest of your platform is insulated from specification changes.

Platform-specific notes

A practical readiness checklist

  1. Confirm which invoice types your business issues, including edge cases like B2B orders through a consumer storefront
  2. Select and onboard a certified solution, or scope a build with an explicit maintenance owner
  3. Complete ZATCA onboarding and store cryptographic credentials securely
  4. Validate a real production invoice end to end, then scan the QR code with a phone
  5. Test credit notes, partial refunds and cancelled orders explicitly
  6. Add monitoring and alerting on reporting failures, with a named person receiving the alerts
  7. Diarise certificate renewal well before expiry
  8. Confirm archival meets the retention requirement and is actually retrievable

None of this is technically difficult. It fails when it is treated as a one-off launch task rather than an operational system with an owner.

[ Key Takeaways ]
Phase 2 makes invoicing part of the transaction path, not back office
Most ecommerce uses simplified invoices, reported within 24 hours
Retry queues and alerting matter more than XML correctness
Credit notes and refunds carry their own reporting obligations
For most merchants, a certified provider beats building in-house

Frequently asked questions

Does ZATCA e-invoicing apply to online stores?+

Yes. Any VAT-registered business in Saudi Arabia issuing invoices, including ecommerce, falls within scope. Most consumer online orders are simplified invoices, which must be reported to ZATCA within 24 hours of issuance.

What is the difference between clearance and reporting?+

Standard B2B invoices must be cleared by ZATCA before being issued to the buyer. Simplified B2C invoices are issued first and reported to ZATCA within 24 hours.

Do I need a QR code on every invoice?+

Yes. Both standard and simplified invoices require a compliant Base64 TLV encoded QR code containing seller name, VAT number, timestamp, total including VAT and the VAT amount, and it must be scannable.

Can Salla or Shopify handle ZATCA compliance?+

Salla and Zid provide native support as Saudi platforms. Shopify and WooCommerce require an app or plugin from a certified solution provider, with careful testing of refund and credit-note flows.

What happens if invoices are not reported on time?+

Non-compliance can result in penalties from ZATCA. The practical risk for most merchants is a silently failing integration that goes unnoticed until an audit, which is why monitoring and alerting matter.

Should we build our own ZATCA integration?+

Usually not. Certified providers absorb specification changes and certificate management. Building in-house is justified mainly at very high invoice volumes, with unusual invoicing logic, or where data residency prevents third-party processing.

ZATCAE-InvoicingEcommerceComplianceSaudi Arabia

Keep Reading

All Articles →

Ready to put these ideas to work?

Start a Project →