Sign in Get started
How it works

How ZATCA Phase 2 e‑invoicing works: device registration to cleared invoice

You bring your VAT details and an OTP from ZATCA. We register your device, sign every invoice, submit it and return ZATCA's answer. The steps are the same whether you use the API or the portal.

Step by step

ZATCA device registration and invoice submission in four steps

Each step shows your part and ours, so you know exactly what is expected of you.

1
Once

Create your account

Sign up and add the company you will invoice from. Nothing reaches ZATCA's live system until you register a production device.

You
  • Enter company name, VAT number and CR details
  • Choose API, portal, or both
We
  • Check the VAT number format
  • Let you create test API keys and sandbox devices at no charge
2
Once per device or branch

Register your device with ZATCA

ZATCA calls each invoicing system an EGS unit. Every unit needs its own cryptographic identity (CSID) before it can send invoices.

You
  • Generate an OTP on ZATCA's Fatoora portal
  • Enter it in the portal, or send it to POST /v1/devices
We
  • Create the key pair and the CSR
  • Obtain the compliance CSID and pass ZATCA's compliance checks
  • Obtain and store the production CSID
3
Every invoice

Send the invoice

Give us the invoice details in whichever way suits you. A credit or debit note works the same way, with a reference to the original invoice.

You
  • From your software: post JSON to POST /v1/invoices
  • From the portal: fill in the invoice form and press Submit to ZATCA
We
  • Check required fields, totals and VAT exemption codes
  • Tell you what to fix before anything is signed
4
Every invoice

Get ZATCA's response

The answer comes back in the same request. In the portal, the invoice status changes on screen.

You
  • Store the status, QR code and hash with your invoice
  • Print the QR code on the invoice you give the customer
We
  • Sign, stamp and submit the invoice
  • Return ZATCA's status, warnings and errors as issued
  • Keep the signed XML for download
Behind step 4

How each e‑invoice is validated, signed and submitted to ZATCA

These six things run in order on every invoice you send. You do not build or maintain any of them.

ValidateRequired fields, VAT maths, totals and exemption codes.
Build XMLYour details become a UBL 2.1 invoice document.
Hash and chainThe invoice hash is linked to the previous invoice.
SignAn XAdES signature is applied with your device's certificate.
Add QRA TLV-encoded QR code is generated and embedded.
SubmitSent to ZATCA for clearance or reporting, and the reply returned to you.
Before you start

What you need for ZATCA device onboarding

With these in hand, registration is a single form or a single API call.

VAT

VAT registration number

The 15-digit number on your ZATCA VAT certificate.

CR

Company details

Legal name, commercial registration number and address, written as they appear on your registration.

OTP

OTP from the Fatoora portal

Generated in your ZATCA account when you onboard a new device. It is valid for a short time, so create it just before you register.

Test first

Test in the ZATCA sandbox, then go live in production

Sandbox

Try everything safely

Register a test device and send sample invoices. Requests and responses have the same shape as production, and nothing counts as a real tax document.

Production

Switch when you are ready

Register your real device with a fresh OTP and use your production key. Your integration code stays the same.

What gets submitted, and how

ZATCA clearance vs reporting: which invoices go where

You tell us the document type. We choose clearance or reporting for you.

DocumentUsed forZATCA processWhen
Standard tax invoiceBusiness to business or governmentClearanceIn real time, before the buyer receives it
Simplified tax invoiceBusiness to consumerReportingWithin 24 hours of issue
Credit or debit noteCorrecting an issued invoiceSame as the original invoiceLinked to the original by its reference

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.