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
{
"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 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.
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
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
ZATCA Phase 2 integration without building it yourself
- 1In 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.
- 2The technical rules are strictSigned XML, hash chaining, a cryptographic stamp and a specific QR format are all checked by ZATCA.
- 3We carry that part for youYou keep your invoices and customers. We handle the connection to the Fatoora platform.
- Study the ZATCA specifications and SDK
- Generate keys, CSRs and manage CSIDs
- Build UBL 2.1 XML and XAdES signing
- Keep up with rule changes
- Enter one OTP to register your device
- Send invoice details as JSON, or use the portal
- Get ZATCA's status and QR code back
- Keep your existing software as it is
How your invoices reach the ZATCA Fatoora platform
Invoice details go in on one side. ZATCA's decision comes back on the same path.
Where the invoice starts
- Your billing software or ERP
- Your POS
- Our portal
What we do with it
- Check ZATCA's rules
- Build the XML
- Sign and stamp
- Add the QR code
- Submit and return the answer
Fatoora platform
Clears standard invoices in real time and receives simplified invoices through reporting.
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.
ZATCA Phase 2 integration: CSID onboarding, XML signing and QR code
One integration, or one portal account, covers all of it.
Device onboarding
Key pair, signing request, compliance checks and the production certificate, done from a single OTP.
UBL 2.1 invoice XML
Your invoice details are turned into the XML structure ZATCA requires.
Signing and stamping
Each invoice is hashed, chained to the previous one and signed with your device's certificate.
QR code
Generated in ZATCA's TLV format, embedded in the invoice XML and returned in the response.
Clearance and reporting
Each document is sent to the right ZATCA process for its type.
ZATCA's answer, unedited
Status, warnings and errors are returned and kept against the invoice.
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 integration | Online portal | |
|---|---|---|
| Best for | Software, ERP, POS and billing systems | Businesses and individuals with no invoicing system |
| Where invoices are created | In your own software | In our portal, in the browser |
| Device registration | One API call with the OTP | A guided form with the OTP |
| Submitting to ZATCA | Automatic, on each API call | One button on the invoice |
| Technical skill needed | A developer | None |
| Learn more | ZATCA API → | Invoicing portal → |
Tax invoices, simplified invoices, credit notes and debit notes
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.
APIRetail and restaurants
Issue simplified tax invoices with QR codes and have them reported to ZATCA.
API or portalLogistics and trading
Clear standard B2B invoices in real time before they go to the buyer.
API or portalFreelancers and individuals
Register under your VAT number and issue the occasional tax invoice online.
PortalZATCA 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.
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.
