ZATCA e-invoicing · Phase 2

File ZATCA e‑invoices with one API call.

Matheel signs the invoice, computes the hash and QR, files it with ZATCA and returns the answer with the stamped XML. It keeps no invoices.

File a test invoice
  • 6/6 compliance checks
  • ~1.5 s to ZATCA's answer
  • Zero invoices stored
  • Hosted in Riyadh

Try the ZATCA sandbox

ZATCA developer portal

Change the item and price, then press the button. The invoice really goes to ZATCA and you get its answer. No key, no certificate.

Total with 15% VAT: 57.50 ⃁

  1. Sign
  2. Hash
  3. QR
  4. ZATCA
  5. Answer

Why ZATCA integration hurts

Eight things that stall every team on ZATCA Phase 2. Matheel handles them.

Arabic vanishes from the CSRopenssl silently drops non-Latin subject fields.
Counter and hash per deviceThe ICV goes up per invoice; the hash chains it to the last.
Broken hashTouch the XML after hashing and it is rejected.
A CSID per deviceCSR, OTP and six checks before the first invoice.
Address rejections4-digit building number, 5-digit postal code.
Three environmentsDeveloper portal, simulation, production: one CSID each.
Credit notesNeed a reason and a reference to the original.
The 24-hour windowSimplified invoices must be reported within a day.

Validate your invoice against ZATCA's rules, free → · Every ZATCA error explained →

What Matheel does

From the first sandbox call to the first production invoice.

A real ZATCA answer in your first minute.

Send "environment": "sandbox" without a certificate and Matheel files it on ZATCA's developer portal as a shared test taxpayer. The answer is ZATCA's own.

  • No CSR, no OTP, no CSID
  • The same API you use in production
  • 100 sandbox invoices an hour per key
reported0.7 s
{ "status": "reported",
  "warnings": [], "errors": [],
  "qr": "AQ1TaGFy…",
  "invoice_xml": "PD94bWwg…" }

Any language

One request, from whatever you write.

curl https://matheel.app/api/v1/invoices \
  -H "Authorization: Bearer $MATHEEL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"environment":"sandbox","invoice":{"type":"simplified","counter":1,
       "uuid":"8d487816-70b8-4ade-a618-9d620b73814a","number":"INV-1",
       "line_items":[{"name":"Coffee","quantity":2,"price":"50.00"}],
       "subtotal":"100.00","vat_amount":"15.00","total":"115.00"}}'

Pricing

A flat price per device. Unlimited invoices.

Best fit: Team · ⃁ 149 a month · ⃁ 49.67 per device, unlimited invoices

Trial

Free

  • Instant sandbox, 100 invoices an hour
  • Unlimited on the developer portal with your own CSID
  • The exact same API
Get a free trial key

Device

⃁ 39 / month

  • One production device
  • Unlimited invoices
  • Clearance, reporting and onboarding
Subscribe

Team

⃁ 149 / month

  • Up to 5 devices
  • Unlimited invoices
  • Priority support
Subscribe

Partner

⃁ 449 / month

  • Up to 20 devices for POS and accounting software
  • More? Ask for a custom offer
  • Direct support channel
Subscribe

Monthly, cancel any time. Prices in Saudi riyals, paid by card or Apple Pay through Polar. A device is an EGS unit with its own CSID. If you go over your plan's devices, your invoices keep filing and we let you know to upgrade; we never stop your invoicing.

Questions

Before you start.

Can I test ZATCA integration without a CSID?

Yes. Send "environment": "sandbox" without seller or csid and Matheel files the invoice on ZATCA's developer portal as its shared test taxpayer. You get ZATCA's real answer.

How do I get a ZATCA CSID?

One request to /api/v1/onboarding: Matheel generates the CSR, gets the compliance CSID, passes the six checks and gets the production CSID. Simulation and production take the OTP from the taxpayer's Fatoora portal. Step by step in the ZATCA Phase 2 guide.

What is the difference between clearance and reporting?

Standard (B2B) tax invoices must be cleared by ZATCA before they reach the buyer. Simplified (B2C) invoices are reported within 24 hours. Matheel picks the right one from the invoice type.

Does Matheel store invoices or private keys?

No. The request is processed and answered, and nothing from it is kept: not the invoice, not the key. The legal archive is the taxpayer's, and this keeps it in your hands.

What happens when ZATCA rejects an invoice?

You get ZATCA's errors and warnings verbatim with a 422, and a rejected invoice is not counted against your plan. See common ZATCA errors and fixes.

Your first ZATCA sandbox invoice, today.

No certificate, no key, one click.

Try it now