ZATCA Phase 2 E-Invoicing: What Saudi Businesses Need to Know

ZATCA’s e-invoicing mandate has been rolling out to Saudi businesses in waves since 2023, and for SAP Business One users the practical question is rarely “what is ZATCA” — it’s “what does our ERP actually need to do differently, and by when.”

The two phases, briefly

Phase 1 (Generation)

Since December 2021, businesses have needed to generate invoices electronically in a structured format (rather than paper or unstructured PDF), include a QR code, and be able to store them electronically. Most SAP B1 users met this by adjusting their print layouts and generating compliant XML/QR alongside the standard invoice document.

Phase 2 (Integration)

This is the phase that requires real integration work. Businesses are onboarded in waves determined by ZATCA based on annual revenue. Once in scope, every invoice (and credit/debit note) must be transmitted to ZATCA’s platform (Fatoora) in real time or near-real time, in UBL 2.1 XML format, cryptographically signed and stamped with a hash chain linking each invoice to the previous one.

What this means technically for SAP B1

Structured XML generation

Every invoice needs to be represented as UBL-compliant XML with the specific fields ZATCA requires: seller and buyer VAT numbers, invoice type codes, line-level tax breakdowns, and the previous invoice hash. Getting this mapping right from SAP B1’s document structure (header, lines, tax codes) is the bulk of the implementation effort.

Cryptographic stamping

Invoices need a digital signature and a cryptographic stamp identifier (CSID), issued after onboarding the business’s device/solution with ZATCA’s platform. This typically means integrating with either a ZATCA-compliant middleware solution or building direct API calls to the Fatoora platform’s onboarding and reporting endpoints.

Clearance vs reporting

Standard tax invoices (B2B) generally go through the “clearance” model — the invoice must be cleared by ZATCA before being shared with the buyer. Simplified tax invoices (typically B2C, cash-register style) go through “reporting” — shared with the customer first, then reported to ZATCA within 24 hours. This distinction directly affects the integration flow: clearance needs to happen synchronously within the sales process, before the invoice can be printed or emailed.

Where SAP B1 integrations typically plug in

Most implementations I’ve seen use one of two patterns:

  • Direct Service Layer integration: middleware listens for new/updated AR Invoices via Service Layer, generates the UBL XML, submits it to a ZATCA-compliant gateway or directly to Fatoora, and writes the resulting QR code and clearance status back onto the SAP B1 document (often via a User Defined Field).
  • Third-party ZATCA middleware: a specialised local vendor solution handles the cryptographic and compliance complexity, and the SAP B1 side just needs to push invoice data to that middleware’s API and receive back the signed invoice/QR code.

For most SMEs, the second route reduces risk considerably — ZATCA’s technical specification changes periodically, and a specialised vendor absorbs that maintenance burden rather than it sitting on the business’s own integration.

Common pitfalls

The most frequent issue is treating this purely as a document-formatting task and underestimating the hash-chaining requirement — each invoice’s XML must reference the hash of the previous invoice, which means invoice sequencing and any voided/cancelled documents need careful handling in SAP B1 to avoid breaking the chain.

A second common gap is tax code mapping. ZATCA’s expected tax category codes don’t always line up one-to-one with how VAT is configured in a given SAP B1 database, especially for businesses with mixed standard-rated, zero-rated, and exempt transactions.

Takeaway

If your business hasn’t yet received its Phase 2 integration notification from ZATCA, this is the time to get the SAP B1 invoice structure and tax configuration audited, and to decide between direct integration and a compliant middleware vendor — not after the onboarding letter arrives with a fixed deadline attached.

Categories:

Leave a Reply

Your email address will not be published. Required fields are marked *