Connecting a Dental Clinic to ZATCA Phase 2: OTP, CSID and the Setup Steps
Phase 2 onboarding looks technical, but for a clinic it is a short sequence: correct seller details, an OTP from the Fatoora portal, compliance checks, then a production certificate. Here is each step and where clinics get stuck.
Published

For a dental clinic, ZATCA Phase 2 onboarding sounds more intimidating than it is. The words are technical (CSR, CSID, OTP, compliance checks), but the sequence is short and each step has one job. Most clinics that get stuck do so on the first step, not the last: their seller details are not quite right.
This article walks through the steps in order, from a clinic's point of view.
Operational explainer, not tax advice. Confirm your wave, your integration date and your obligations with ZATCA or your tax adviser.
Step 1: Get the seller details exactly right
Every Phase 2 invoice carries the clinic's details in its XML, and ZATCA checks them. Before anything else, collect:
- VAT number. 15 digits, exactly as registered. One wrong digit means every invoice is issued for someone else.
- Seller name in Arabic (and English if you use it), as on the registration.
- Commercial registration number.
- National address: street, building number, district, city and postal code. Building numbers and postal codes have fixed formats, and they are among the most common causes of validation messages.
Take these from the registration documents, not from memory or an old letterhead. Ten minutes here saves days of chasing warnings later.
Step 2: Choose which invoice types you will issue
Phase 2 distinguishes between simplified invoices (to individual patients, reported to ZATCA after issue) and standard invoices (to businesses such as insurers or corporate accounts, cleared by ZATCA before you share them). Onboarding asks which types your system will issue.
Almost every dental clinic with insurance contracts needs both. Choosing only simplified because "most of our invoices are to patients" leaves you unable to invoice an insurer correctly.
Step 3: Generate the OTP in the Fatoora portal
The OTP proves to ZATCA that the system being onboarded belongs to your taxpayer account. The clinic's authorised user signs in to the Fatoora portal and generates it.
Two practical points:
- It expires quickly. Generate it only when the person setting up the system is ready to use it straight away.
- Whoever owns the ZATCA account must be available. If that is the owner who is travelling, the setup waits.
Step 4: Compliance CSID and the compliance checks
With the OTP, the invoicing system creates a certificate request (a CSR) and receives a compliance CSID, a test certificate. It then sends ZATCA a set of sample documents (invoices, credit notes and debit notes, of each type you selected) to prove it produces them correctly.
As a clinic, you do not prepare these samples. Your software should. What you should see is a clear pass or fail, and if something fails, a message that says what is wrong in terms a person can act on, which is usually the seller details from step 1.
Step 5: Production CSID
Once the compliance checks pass, the system requests the production CSID. This is the certificate that signs your real invoices. From this point, every invoice is generated as signed XML, hashed and chained to the previous one, and either reported or cleared.
Step 6: Know when the certificate expires
The production certificate does not last forever. When it expires, the system can no longer sign invoices, and submissions stop.
- Record the expiry date somewhere the finance lead will see it.
- Make sure your system warns you before the date, not after.
- Know the renewal route in advance: it is a new OTP and a repeat of the onboarding steps, which is easy on a quiet day and stressful on a Thursday evening with a full waiting room.
Where clinics get stuck
Wrong or incomplete address fields. The most common issue by far. Fix it in step 1.
An OTP that expired mid-setup. Generate it last, use it immediately.
Only one invoice type onboarded. Patients work, insurers do not.
Nobody knows the certificate expiry date. Invoicing stops on a random day months later.
Testing in production. Use the simulation or sandbox environment first if your software offers one, so mistakes do not become real invoices in your chain.
How PDental handles onboarding
PDental's ZATCA settings screen holds the seller details, the national address and the invoice types in one place, and walks through the steps in order: generate the CSR, enter the OTP to receive the compliance CSID, run the compliance test invoices, then request the production CSID. Each step reports success or a readable error before moving on. The certificate's status and expiry are shown on the same screen, and if the certificate expires, the system stops and says so rather than failing silently. There is also a reset for starting the onboarding again if the OTP or the details were wrong.
See how invoicing works once you are live on the ZATCA e-invoicing page, and read what Phase 2 actually requires for the background.
The short version
Get the seller details exactly right, onboard both invoice types, generate the OTP only when you are ready to use it, let the software pass the compliance checks, and write down when the production certificate expires. Done in that order, onboarding is an afternoon's work.
Frequently asked questions
Where does the OTP for ZATCA onboarding come from?
From the Fatoora portal on ZATCA's website, signed in with the clinic's taxpayer account. The OTP is short-lived, so generate it only when the person doing the setup is ready to enter it into the invoicing system straight away.
What is a CSID?
A Cryptographic Stamp Identifier, the certificate ZATCA issues to an invoicing system so it can sign invoices. Onboarding first issues a compliance CSID, used to pass ZATCA's test invoices, and then a production CSID, used for real invoices. Certificates expire and need renewing, so someone should know when.
Why do the seller address fields matter so much?
Because they are written into every invoice's XML, and ZATCA validates them. Building numbers and postal codes have fixed formats, and the VAT number must match the registered taxpayer exactly. A wrong value can mean warnings on every invoice or rejections on standard invoices.
Can we keep invoicing while onboarding is in progress?
Yes, as long as your Phase 2 date has not arrived. Onboarding is a setup task you complete before the integration date, not something you do while patients wait. Plan it a few weeks ahead, so a problem with the OTP or the certificate does not land on a busy clinic day.