Resources

Build or buy your ZATCA integration?

ZATCA complianceBy the alFatora team8 min read

When e-invoicing means connecting an ERP or point of sale to the Zakat, Tax and Customs Authority, the decision to build a ZATCA integration in-house or buy one is not a purely technical choice. It decides who owns compliance when the rules change, who handles rejections, who proves the record is sound at review time, and who carries the cost when invoicing stops.

In Saudi Arabia the requirements do not end with a well-formed invoice file. The data has to be validated, certificates managed, documents sealed, the QR code generated, the document cleared or reported according to its type, and an audit trail kept that you can go back to. Every one of those steps runs under transaction volume, changing requirements and a mix of internal systems. So the decision cannot be reduced to a subscription fee against the cost of a development team.

What are you actually building or buying?

Building in-house means your organisation designs and runs the compliance layer between its systems and the Authority. It may start as a simple API for sending invoices, but it soon becomes a standing operational responsibility: mapping data to the required invoice structure, validation rules, certificate management, key protection, rejection handling, retries, queue monitoring, event logging and producing evidence for audit.

Buying does not mean giving up your core systems or handing over your data. In the right model the business keeps its ERP or point of sale and adds a specialist compliance layer that connects through one interface. That layer handles mapping, validation, sealing and submission, while business rules, pricing, customers and financial processes stay in the systems you already run.

The deciding difference is where operational ownership sits. Build, and compliance becomes an internal product you must develop, maintain and prove reliable. Buy, and it becomes a service with stated commitments — but you still have to check exactly what those commitments cover and where they stop.

When does building make sense?

Building can be justified when the organisation has an engineering team experienced in regulatory integrations and operational security, and a scale or business model that makes invoicing part of its competitive edge. It can also fit a system landscape so specific that no outside provider could take it on within acceptable time or security limits.

But having developers is not enough. What you need is a permanent capability, not a one-off launch project:

  • Who owns updating the validation rules when the Authority publishes a change?
  • Who watches the electronic seal certificate and renews it before production stops?
  • Who chases stalled invoices if the Authority's service goes down at peak hour?
  • Who answers the auditors, two years later, about why a document was rejected or resubmitted?

If the answers are spread across finance, tax and IT with no defined operational owner, building can create a silent risk. The integration looks fine in testing, and its real cost shows at the first regulatory change, the first review or the first expansion to another entity or market.

Why building costs more than the development budget

The initial build is the easiest cost to measure, which is why it misleads. A sounder estimate covers the integration's whole life, not just its first release.

  • Specialist knowledge: e-invoicing specifications, VAT rules and rejection causes move, and someone has to follow them continuously.
  • Operations: monitoring, alerting, incident management, and reconciling what was issued internally against what the Authority actually accepted.
  • Security: sealing keys need access controls, a usage log, lifecycle management and protection that does not assume the application environment is enough on its own. A tamper-evident record of every validation, submission and retry is part of your ability to defend the process before an auditor and the Authority, as covered in invoice storage and audit readiness.
  • Opportunity cost: every hour the product team spends chasing a schema difference or a validation error is an hour not spent on customer experience, collections or new sales channels.

None of this means buying always costs less. It means the fair comparison is total cost of ownership against the cost of the service — not a subscription against developer salaries.

Several entities, several markets

The equation gets harder when a group runs several legal entities or plans to expand beyond the Kingdom. Each market has its own data, sealing and submission requirements, and building a separate connector for each may achieve local compliance while multiplying failure points and maintenance.

The better option is not a provider that hides everything behind an opaque interface, but one layer that gives your teams one data shape — one JSON shape instead of every connected system dealing with UBL — with the regulatory specifics isolated in a managed layer. The model should also separate entities under one account with clear limits on permissions and data, as set out in invoicing across several legal entities. Where the data is kept raises its own questions, covered in e-invoicing data residency in Saudi Arabia.

Four lenses for a decision you can defend

Instead of asking "build or buy?" in the abstract, name the service that must not stop. It is rarely "sending a file"; it is issuing a document the Authority accepts within a given window, with the ability to explain any exception. Then assess each option through four lenses:

  1. Compliance ownership: does the responsible party commit to following, testing and shipping requirement changes — or will your team turn each change into an internal project?
  2. Integration flexibility: do the ERP and point of sale stay as they are? Does the interface support asynchronous processing, notifications and retries without duplicate documents?
  3. Control and security: where are certificates and keys held? How are permissions granted? What evidence exists for every event, from receipt of the document to the Authority's response?
  4. Commercial model: do you pay for every submission attempt, or for documents actually accepted? How are rejections, the test environment and validation errors treated?

These lenses separate a provider that moves documents from an operational compliance layer. Both may pass a simple test; only the second shows what happens when data is missing, the Authority is slow to respond or a certificate expires. If you lean towards buying, the question list in how to choose a ZATCA integration provider and the tests in trialling a platform before you sign are the next step.

Don't let rejection become an operational crisis

The most important test of either choice is how the process behaves when it fails. A rejected invoice is not a rare event to hide; it is an expected part of the cycle (what a rejection means and what to do next). Finance needs the reason in plain language, IT needs an error code and a clear request log, and the tax team needs to know no document disappears between the internal system and the Authority.

Where AI assistants are involved, automation must not get unrestricted write access to production. Scoped permissions, human approval for sensitive operations and a command log are not obstacles to speed; they are the conditions for speed you can trust, as in AI in e-invoicing, under control.

How this looks in alFatora

alFatora Connect is the buy option that leaves your systems as they are: your system sends one JSON shape, and we carry mapping, validation before submission, sealing, the QR code and clearance or reporting, then return each document's status to you by webhook.

  • Change in one place: updates to validation rules and the document structure are made in the compliance layer, not in each of your internal systems.
  • Safe retries: a mandatory idempotency key on every request, so a resubmission never creates a second document.
  • Scoped access keys and a fixed audit trail linking the request, validation, sealing, submission and the Authority's response.
  • Pay for the outcome: credits are spent on documents the Authority accepts in production, and the sandbox is free and unlimited, so rejections and integration tests are never billed.

The sound decision names in advance who owns each step of the invoice's journey, who proves its result, and who acts before a small problem becomes a financial or regulatory one. Then e-invoicing stops being a recurring integration project and becomes an operational capability the business can rely on as it grows.

Frequently asked questions

Is building a ZATCA integration in-house cheaper than buying one?

Not necessarily. The initial build is a small part of the picture; a fair comparison includes following requirement changes, managing certificates and keys, monitoring, handling rejections and audit over the integration’s whole life.

Does buying a compliance layer mean replacing the ERP?

No. The ERP or point of sale stays as it is, and the compliance layer connects through one interface that carries mapping, validation, sealing and submission, then returns each document’s status.

What is the most important question before deciding to build or buy?

Who runs compliance day to day: who updates validation rules, renews certificates, chases stalled documents and answers the auditor about any rejection or resubmission.

Was this useful? Review alFatora on Google.

Zakat, Tax and Customs AuthorityFatooraCompatible with ZATCA Phase 2
e-invoicing requirements
Create your account