Sign in Get started
ZATCA Phase 2 · Device registration & submission

ZATCA Phase 2 e‑invoicing API and portal for Saudi Arabia

Connect your own software through our API, or create invoices right here in the portal. Either way we onboard your device with ZATCA, sign each invoice, submit it and give you back ZATCA's response.

  • Sandbox and production
  • Tax invoices, credit and debit notes
  • Charged only for accepted invoices
POST/v1/invoices
{
  "device_id": "6f4d20e0-6bfe-…",
  "uuid": "3f6c1a52-8d0e-…",
  "number": "INV-2026-0418",
  "type": "invoice",
  "category": "simplified",
  "lines": [{ "name": "Freight, Jeddah–Riyadh",
              "quantity": 1, "unit_price": 2400.00, "vat_rate": 15 }]
}
200 ZATCA response, passed through
{
  "status": "REPORTED",
  "total_with_vat": 2760,
  "qr": "AQxXYXNsIEZhdG9v…",
  "zatca": { "warnings": [], "errors": [] }
}
  • CSID device onboarding
  • UBL 2.1 XML
  • XAdES signing
  • TLV QR code
  • Invoice hash chaining
  • Clearance
  • Reporting
Two ways in

Two ways to connect to ZATCA Fatoora: API integration or online portal

The same engine sits behind both. Pick the door that matches how you issue invoices today.

{ }For software and ERPs

ZATCA API integration for your software

Your billing system, POS or ERP keeps creating invoices as it does now. It calls our API and gets ZATCA's answer in the same request.

  • Register each device or branch with one call
  • Send invoice details as plain JSON
  • Receive the status, QR, hash and signed XML
  • Serve many client companies from one account
See the API
INVFor businesses and individuals

Online ZATCA invoicing portal

Sign up, register with ZATCA from your account, and issue Phase 2 invoices from the browser. Nothing to install and no developer needed.

  • Guided ZATCA registration with your OTP
  • Create invoices, credit notes and debit notes
  • Submit to ZATCA with one button
  • Download the signed XML and QR code data
See the portal
Why integrate

ZATCA Phase 2 integration without building it yourself

  • 1
    In Phase 2, tax invoices go to ZATCAIn Phase 2, standard invoices are cleared before they are issued and simplified invoices are reported within 24 hours.
  • 2
    The technical rules are strictSigned XML, hash chaining, a cryptographic stamp and a specific QR format are all checked by ZATCA.
  • 3
    We carry that part for youYou keep your invoices and customers. We handle the connection to the Fatoora platform.
Building it yourself
  1. Study the ZATCA specifications and SDK
  2. Generate keys, CSRs and manage CSIDs
  3. Build UBL 2.1 XML and XAdES signing
  4. Keep up with rule changes
With FatooraConnect
  1. Enter one OTP to register your device
  2. Send invoice details as JSON, or use the portal
  3. Get ZATCA's status and QR code back
  4. Keep your existing software as it is
The connection

How your invoices reach the ZATCA Fatoora platform

Invoice details go in on one side. ZATCA's decision comes back on the same path.

You

Where the invoice starts

  • Your billing software or ERP
  • Your POS
  • Our portal
invoice detailsstatus + QR
FatooraConnect

What we do with it

  • Check ZATCA's rules
  • Build the XML
  • Sign and stamp
  • Add the QR code
  • Submit and return the answer
signed invoiceZATCA response
ZATCA

Fatoora platform

Clears standard invoices in real time and receives simplified invoices through reporting.

How it works

ZATCA device registration and invoice submission in four steps

Create your account

Add your company, VAT number and CR details. You can test in the sandbox first.

Register your device

Enter the OTP from ZATCA's Fatoora portal. We complete onboarding and obtain your CSID.

Send an invoice

Post JSON to the API, or fill in the invoice form in the portal.

Get ZATCA's response

Receive the status, QR code and any warnings or errors, exactly as ZATCA issued them.

See each step in detail →
What we handle

ZATCA Phase 2 integration: CSID onboarding, XML signing and QR code

One integration, or one portal account, covers all of it.

CSID

Device onboarding

Key pair, signing request, compliance checks and the production certificate, done from a single OTP.

XML

UBL 2.1 invoice XML

Your invoice details are turned into the XML structure ZATCA requires.

SIG

Signing and stamping

Each invoice is hashed, chained to the previous one and signed with your device's certificate.

QR

QR code

Generated in ZATCA's TLV format, embedded in the invoice XML and returned in the response.

API

Clearance and reporting

Each document is sent to the right ZATCA process for its type.

LOG

ZATCA's answer, unedited

Status, warnings and errors are returned and kept against the invoice.

Compare

ZATCA API or invoicing portal: which one fits you?

Both use the same ZATCA connection. You can use the two together under one account.

API integrationOnline portal
Best forSoftware, ERP, POS and billing systemsBusinesses and individuals with no invoicing system
Where invoices are createdIn your own softwareIn our portal, in the browser
Device registrationOne API call with the OTPA guided form with the OTP
Submitting to ZATCAAutomatic, on each API callOne button on the invoice
Technical skill neededA developerNone
Learn moreZATCA API →Invoicing portal →
Documents

Tax invoices, simplified invoices, credit notes and debit notes

Standard tax invoiceBusiness to business or governmentClearance
Simplified tax invoiceBusiness to consumerReporting
Credit noteReduces an issued invoiceFollows the original
Debit noteIncreases an issued invoiceFollows the original
Who uses it

ZATCA e‑invoicing for every kind of Saudi business

Software and ERP vendors

Add ZATCA Phase 2 to your product and onboard each client company under one account.

API

Retail and restaurants

Issue simplified tax invoices with QR codes and have them reported to ZATCA.

API or portal

Logistics and trading

Clear standard B2B invoices in real time before they go to the buyer.

API or portal

Freelancers and individuals

Register under your VAT number and issue the occasional tax invoice online.

Portal
Explained

ZATCA Phase 2 e‑invoicing in Saudi Arabia, in plain words

E-invoicing in Saudi Arabia is run by the Zakat, Tax and Customs Authority (ZATCA) through its Fatoora platform. Phase 1 required businesses to generate and store electronic invoices. Phase 2, the integration phase, requires the invoicing system itself to connect to ZATCA.

What Phase 2 asks of your system

Each invoicing system is registered with ZATCA and receives a cryptographic identity. Every invoice is produced as structured XML, signed, given a QR code and sent to ZATCA. Standard invoices are cleared in real time. Simplified invoices are reported within 24 hours.

Where we fit

We are the integration layer. You provide the invoice details. We take care of device registration, signing and submission, and hand back what ZATCA returns.

See how ZATCA integration works →
EGS unit
ZATCA's name for a system or device that issues e-invoices.
OTP
A one-time code from the Fatoora portal used to register a device.
CSID
The cryptographic stamp identifier ZATCA issues to a registered device.
Clearance
Real-time approval of a standard tax invoice by ZATCA.
Reporting
Sending a simplified invoice to ZATCA within 24 hours of issue.
UBL 2.1 XML
The structured invoice format ZATCA requires.
Questions

ZATCA e‑invoicing questions

The short answers. The full list is on the FAQ page.

Read all questions →
Should I use the API or the portal?

Use the API if your own software already creates invoices. Use the portal if you have no invoicing system. You can use both under one account.

What do I need to register a device?

Your VAT registration number, your company details and an OTP from ZATCA's Fatoora portal.

What happens if ZATCA rejects an invoice?

You get ZATCA's error codes and messages. Correct the invoice and submit it again.

Send your first invoice to the sandbox today.

Create an account, register a test device and watch ZATCA's response come back. Move to production when you are ready.