ZATCA integration for any systemAPI · CSV · Excel

Keep your system, we connect it to ZATCA

Your accounting software, point of sale or in-house system sends each invoice to us; we build the stamped XML, clear tax invoices and report simplified ones, and return the QR code and the cleared invoice within seconds.

The two offers

Pick the way you want to work

Either way the certificate is issued to your business, and you generate the OTP in your own Fatoora account.

Integration only

For businesses with an accounting system, ERP, POS or in-house software. Your system stays as it is and sends invoices to us by API or CSV/Excel; we clear and report them and return the QR code, the cleared invoice and a PDF, with instant notifications and a locked archive.

E-invoicing only

For businesses that keep their books in Excel or in software without Phase 2. Issue invoices from our screen in Arabic and English, send them to ZATCA with one click, then export them to Excel for your books.

The full system

Accounting, VAT, inventory, point of sale and e-invoicing in one system, at the published per-user licence price.

How it works

Three steps from activation to your first cleared invoice

Activation in your name

We open your account; you generate the OTP in your own Fatoora account and type it yourself, so the certificate is issued to your business and the six compliance checks run.

Connect your system

Your system gets an API key, or you use the CSV/Excel template with any software that can export its invoices. Your accounting software does not change.

Every invoice comes back cleared

Send an invoice and within seconds it comes back with its number, the stamped QR code and a PDF; a tax invoice is marked deliverable only after ZATCA cleared it.

Ways to connect

Any system can connect one of these ways

MethodSuitsTimingWhat you need
REST APIERPs, points of sale, in-house systems and software housesReal time: cleared or reported within secondsA developer who sends the invoice and prints the QR code we return
CSV or Excel fileBusinesses that issue invoices in batches: monthly billing, contracts, subscriptionsBefore the invoices reach the buyer: stamped at upload, sent to ZATCA within minutesExport the batch in the template, upload it, then send your customers the PDFs we return
Invoicing screenBusinesses without Phase 2 softwareReal timeNothing: issue the invoice on our screen

Automatic direct connections with specific accounting software are built on request; tell us which software you use.

Rules the service keeps

What ZATCA requires and how we apply it

Tax invoices after clearance

A B2B invoice may not reach the buyer before ZATCA clears it, so we clear it the moment it is sent and do not release its PDF before that.

Simplified within 24 hours

A simplified invoice carries its stamped QR code from issue, and we report it at once or from the send queue within minutes.

The buyer gets our document

What reaches the buyer carries our invoice number and stamped QR code, or is the PDF we return; a tax invoice also goes with its cleared XML. Receipts handed out before they were stamped cannot be fixed by uploading them later.

Responsibility

The business remains responsible for its invoices before ZATCA; we are the solution provider that issues, stamps and sends them and keeps every ZATCA answer.

No duplicates

Every invoice carries your own reference; send it twice and you get the same invoice back, never a second one.

For developers

Your first invoice in one request

The key goes in the Authorization header. The examples use curl and work from any language.

Issue a simplified invoice
curl -X POST https://YOUR-ACCOUNT.xrero.com/api/zatca/v1/documents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "external_id": "INV-1001",
    "invoice_type": "simplified",
    "payment_means": "10",
    "lines": [
      {"name": "Basmati rice 5kg", "quantity": 2, "unit_price": 49},
      {"name": "Bottled water 1.5L", "quantity": 6, "unit_price": 1.5}
    ]
  }'
Issue a B2B tax invoice (cleared before we answer)
{
  "external_id": "INV-1002",
  "buyer": {
    "name": "Al Noor Trading Co.", "vat": "311111111100003",
    "street": "King Fahd Road", "building_number": "1234",
    "district": "Al Olaya", "city": "Riyadh", "postal_code": "12211"
  },
  "lines": [{"name": "Office chair", "quantity": 4, "unit_price": 350, "discount_percent": 5}]
}
The answer
HTTP/1.1 201 Created
{
  "id": 88, "external_id": "INV-1002", "number": "INV/2026/00088",
  "document_type": "invoice", "invoice_type": "standard",
  "status": "cleared", "can_deliver": true,
  "uuid": "…", "icv": 45, "qr": "AQ9…",
  "totals": {"net": 1330.0, "vat": 199.5, "total": 1529.5, "currency": "SAR"},
  "messages": {"errors": [], "warnings": []},
  "links": {"pdf": "…/documents/88/pdf", "xml": "…/documents/88/xml"}
}
A credit note for an earlier invoice
{
  "external_id": "CN-1001",
  "document_type": "credit_note",
  "original": {"external_id": "INV-1001"},
  "reason": "Customer returned one bottle",
  "lines": [{"name": "Bottled water 1.5L", "quantity": 1, "unit_price": 1.5}]
}
Fields

Invoice fields

FieldMeaning
external_idYour own reference for the document; required and unique (up to 64 characters).
document_typeinvoice, credit_note or debit_note (default invoice).
invoice_typestandard (tax invoice), simplified, or auto: standard when the buyer has a VAT number.
buyername, vat, street, building_number, district, city, postal_code; required for tax invoices, optional for simplified ones.
lines[]name, quantity, unit_price, discount_percent, vat_category: S (15%), Z (zero-rated) or O (out of scope).
original, reasonFor credit and debit notes: the original invoice issued through us, and the reason.
payment_means10 cash, 30 credit, 42 bank transfer, 48 card, 1 other.
processsync to send at once (default) or async for simplified invoices through the send queue.

Currency is SAR. Exempt (E) lines are not supported yet.

Statuses

What a document's status means

statusMeaningcan_deliver
clearedZATCA cleared the tax invoiceyes
reportedThe simplified invoice was reported to ZATCAyes
queuedIn the send queue; a simplified invoice can be delivered, a tax invoice waits for clearancesimplified only
rejectedZATCA refused it; the reasons are in messages - issue a corrected invoice with a new referenceno
failedSending failed; we retry automatically, or call /retryno

Endpoints: GET /documents/{id}, /documents/{id}/pdf, /documents/{id}/xml and /status. Signed webhooks can notify you when a document is cleared, reported or rejected.

Questions

Questions about the integration

Talk to the Riyadh team
Does it work with my accounting software?

Yes, as long as your software can send an API request or export its invoices to CSV or Excel. Automatic direct connections with specific software are built on request.

Can we upload invoices we already issued?

No. An invoice is stamped when it is issued and the buyer must receive the stamped version, so you upload before delivering the invoices, not after.

Do you need my Fatoora password?

No. You generate the OTP in your own account and type it yourself during activation, and the certificate is issued to your business.

How does the QR code get onto my invoice?

What reaches the buyer must carry our invoice number and the stamped QR code we return, or be the PDF we return, ready to deliver. For a tax invoice, send the cleared XML with it.

What if ZATCA rejects an invoice?

We return ZATCA's reasons exactly as received. You correct the invoice and issue it with a new reference; the rejected one stays in the log.

What does it cost?

It depends on your monthly invoice volume and the way you connect. Contact us and we send a quote the same working day.

Connect your system before your wave date

Start on the simulation environment from your own Fatoora account, then move to production when your system is ready.

Page updated 30 September 2026

CallWhatsAppStart trial