SoftwareKSA6 min read
ZATCA API Integration for Your Billing System (Phase 2)
ZATCA API integration explained for Saudi businesses with their own billing system: clearance vs reporting, onboarding, Wave 25 date and a checklist.
By Quickship Editorial Team · Published
Looking for the software itself? See our custom software development Dubai.
ZATCA API integration means your own billing system sends every e-invoice to the Fatoora platform in the format ZATCA requires. B2B invoices are cleared before you share them with the buyer. B2C invoices are reported to ZATCA after issue.
If you run a custom ERP or in-house billing tool in Saudi Arabia, this work falls on you or your developer. The latest announced wave, Wave 25, has an integration date of 1 February 2027. From today (10 November 2026) that is about 12 weeks away.
What does ZATCA API integration involve?
It involves four things: registering your system with ZATCA, producing invoices in the required format, stamping them, and sending them through ZATCA's APIs.
ZATCA says Phase 2 (Integration) adds three requirements. You integrate your e-invoicing solution with Fatoora. You issue invoices in a specific format. You include additional fields.
Phase 1 (Generation) started on 4 December 2021. Phase 2 started on 1 January 2023 and rolls out in waves. Phase 1 was about creating invoices electronically. Phase 2 is about connecting to ZATCA.
For a developer, the practical pieces are:
- A structured XML invoice, not just a PDF.
- A cryptographic stamp and a QR code on the invoice.
- A unique invoice ID and a running sequence.
- Calls to ZATCA's APIs for onboarding, clearance and reporting.
- Handling the response from ZATCA and storing it against the invoice.
Always build from the current technical specification on ZATCA's site, not from a blog post, including this one. Field names and versions change.
What is the difference between clearance and reporting?
Clearance applies to standard (B2B) invoices. Reporting applies to simplified (B2C) invoices. The Fatoora Developer Community explains both flows.
| Clearance | Reporting | |
|---|---|---|
| Invoice type | Standard tax invoice (B2B, B2G) | Simplified tax invoice (B2C) |
| When you call ZATCA | Before you give the invoice to the buyer | After you issue the invoice to the customer |
| What ZATCA does | Validates and returns the cleared invoice | Receives and validates the invoice |
| Timing | Real time, in the sales flow | Within the time ZATCA allows (check the current rule) |
| What your system must do | Wait for the response, then share the cleared version | Issue first, then send without blocking the till |
The design impact is big. Clearance sits inside your sales flow. If ZATCA does not respond, your invoice is not ready to send. Reporting can run in the background, so a shop counter or delivery driver is not waiting.
Say a Jeddah trading company issues 60 B2B invoices a day from its ERP and a few hundred cash sales from its showroom. The ERP needs a live clearance call on the 60. The showroom system needs a reliable queue for the rest. Those are two different jobs, even if they share one codebase.
How do you onboard your system with Fatoora?
You onboard by registering each solution unit with ZATCA, proving it can produce valid invoices, and then getting production credentials. The exact steps are in ZATCA's documents. The usual order looks like this:
- Check your wave and date. ZATCA notifies each business directly. Confirm it on the Fatoora portal.
- Log in to the Fatoora portal with your taxpayer account and start the onboarding of your solution. The Fatoora Portal User Manual walks through the portal screens and links to the API documentation.
- Generate your keys and certificate request in your system, following ZATCA's specification.
- Get the compliance credentials from ZATCA and run the compliance checks. You send sample invoices of each type you issue.
- Fix every validation error until the samples pass.
- Request production credentials and switch your system from simulation to production.
- Go live and monitor the first days of real invoices closely.
Use the non-production environments first. The Developer Portal Manual describes the sandbox, the SDK and the validator. The Fatoora Portal manual lists the simulation and production endpoints. Check the current version of both documents, as the manuals we reviewed are dated 2022 and 2023.
Who has to integrate and by when?
Phase 2 rolls out in waves based on VAT-subject revenue. ZATCA says it announces waves gradually and notifies each business directly, at least six months before the integration date.
| Wave | Revenue threshold | Deadline |
|---|---|---|
| 23 | Above SAR 750,000 | 31 March 2026 (passed) |
| 24 | Above SAR 375,000 in 2022, 2023 or 2024 | No later than 30 June 2026 (passed, per ZATCA) |
| 25 | Above SAR 187,500 in any one of 2022, 2023, 2024 or 2025 | No later than 1 February 2027 |
We could not open a ZATCA page for Wave 25 when we wrote this. The Wave 25 details come from secondary reporting that agrees across several sources. It says Wave 25 was announced on 24 July 2026 and is the first wave to use 2025 revenue. One year above the line is enough.
Your own notification from ZATCA is the thing that counts. Check it, and check your Fatoora portal account, before you plan around any date in a blog.
What should your developer check before go-live?
Most failed integrations fail on data, not on the API call. Run through this list with whoever owns your billing system.
- Seller and buyer data. Your VAT number, address and the customer's VAT number must be complete. A Riyadh buyer with a missing VAT number on a B2B invoice will cause a rejection.
- Invoice types. List every type you issue: tax invoice, simplified invoice, credit note, debit note. Each needs testing.
- Tax calculations. Rounding and line-level VAT must match the totals. Small differences get flagged by the validator.
- Sequence and hash chain. Invoices must follow in order. A deleted or skipped invoice number is a problem to design around, not to hide.
- Failure handling. What does your system do when ZATCA returns an error, or does not answer? It needs a queue, a retry and a clear message to the user.
- Storage. Keep the XML and ZATCA's response with each invoice. Check ZATCA's retention rules.
- Multiple devices. If you issue from several tills, branches or warehouses, each one needs its own registration.
- Credentials. Keep keys and certificates out of source code. Plan for renewal.
Penalties for non-compliance exist. We did not verify the amounts against an official page, so check ZATCA directly rather than trusting a figure you see on a blog.
Build it yourself, use your vendor, or hire a developer?
It depends on who owns your billing code.
| Your situation | Likely route |
|---|---|
| Off-the-shelf accounting software | Ask the vendor for their Phase 2 status and onboarding steps |
| Custom ERP built years ago, original developer gone | Scope a new integration layer, and test it before the wave date |
| Online store on Salla or Zid issuing invoices | Check what the platform or its apps handle for Fatoora |
| Several systems issuing invoices (ERP, POS, e-commerce) | Decide whether to route all invoices through one service |
If you need custom work, Quickship's software development service builds integrations on quote. We are a technology company, so we write and test software. We do not issue invoices for you or act as your tax agent. A good first step is a short scoping call with the ZATCA documents and your invoice samples on the table.
Common mistakes to avoid
- Starting after the wave deadline, when the compliance tests need weeks of fixes.
- Testing only one invoice type, then finding credit notes fail on go-live day.
- Treating clearance like reporting, and not blocking the buyer copy until ZATCA responds.
- Hard-coding values from an old version of the specification.
- Forgetting branches, tills or second billing systems.
- Leaving the cutover to a Thursday evening before a weekend.
If your date is 1 February 2027, work back from it. Allow time for onboarding, test fixes and a quiet week of monitoring.
Frequently asked questions
Do I need to build the ZATCA API integration myself if I use an accounting package?
Not always. If your software vendor already supports Phase 2, you onboard through them and your job is mostly data quality and testing. You only build your own integration when your billing system is custom or an in-house ERP. Ask your vendor for their Phase 2 status in writing before you decide.
Is there a sandbox to test against before going live?
Yes. ZATCA's Developer Portal Manual describes a sandbox, an SDK and a validator for testing invoices before production. The Fatoora Portal User Manual also refers to simulation and production environments. Test your invoice types in the non-production environments first.
Does a Saudi company under SAR 187,500 revenue have to integrate?
Under the Wave 25 rules reported by secondary sources, a VAT-registered business is in scope if its revenue passed SAR 187,500 in any one of 2022, 2023, 2024 or 2025. A business under that figure in all four years is not in Wave 25. Wait for your own notification from ZATCA and check it on the official portal.
What happens if my system is down when I need to issue an invoice?
Plan for this before go-live. Your system should queue invoices, keep the sequence and hash chain intact, and retry sending to ZATCA. Read ZATCA's current rules on offline or failed submissions in the technical documentation, because they can change between versions.
Can Quickship integrate my billing system with Fatoora?
Quickship builds custom software on quote, so you can ask us to scope an integration for your own billing system. We would review your system and ZATCA's current technical documents first. We do not promise a timeline before that review.
Sources
- ZATCA news: Wave 24 of Phase 2 (Integration)
- ZATCA Developer Portal Manual (v3)
- ZATCA Fatoora Portal User Manual (v3)
- Fatoora Developer Community: Reporting and clearance of e-invoices
- VATupdate: ZATCA announces Wave 25 (secondary source)
Rules and fees in the UAE and Saudi Arabia change. This guide reflects the sources above on 10 November 2026. Check the official source before acting on it.
