ZATCA CSID Onboarding, CSR Generation & Certificate Lifecycle Guide
Every E-Invoice Generation Solution (EGS) unit in Saudi Arabia must obtain a Cryptographic Stamp Identifier (CSID) from ZATCA before it can clear or report Phase 2 invoices. This guide explains the technical lifecycle from Certificate Signing Request (CSR) generation to Production CSID renewal.
1. What Is a ZATCA Cryptographic Stamp Identifier (CSID)?
A Cryptographic Stamp Identifier (CSID) is an X.509 digital certificate issued by ZATCA’s FATOORA Certificate Authority using Elliptic Curve Cryptography (`secp256k1`). It authenticates your EGS unit when calling ZATCA’s Clearance and Reporting APIs and is used to sign simplified tax invoices and generate Phase 2 QR codes.
ZATCA uses a two-stage certificate issuance model: first a **Compliance CSID (CCSID)** used to verify that your system generates valid UBL 2.1 XML payloads, followed by a **Production CSID (PCSID)** used for live commercial transactions.
2. The 4-Step CSID Onboarding Workflow
Onboarding an ERP or POS unit to ZATCA FATOORA follows a deterministic four-step cryptographic handshake:
| Step | Technical Operation | Input & Output Artifacts |
|---|---|---|
| 1. CSR Generation | Generate ECDSA secp256k1 keypair and CSR with ZATCA OID extensions | Input: Organization VAT, Branch Name, Invoice Type (1100/1000/0100). Output: Private Key + .csr |
| 2. Compliance CSID (CCSID) | Submit CSR + 6-digit FATOORA portal OTP to /compliance endpoint | Input: Base64 CSR + OTP Header. Output: binarySecurityToken (CCSID) + Secret |
| 3. Compliance Invoice Checks | Submit sample Standard, Simplified, Credit & Debit XMLs to /compliance/invoices | Input: Signed UBL 2.1 XMLs. Output: PASS validation results for required document types |
| 4. Production CSID (PCSID) | Exchange validated CCSID at /production/csids endpoint | Input: CCSID credentials + request_id. Output: Production binarySecurityToken (PCSID) + Secret |
3. Production CSID Renewal, Expiration & Multi-Branch Operations
Production CSIDs have a defined validity period and can also be revoked on the FATOORA portal if a device is decommissioned or re-keyed. If an active certificate expires or is missing for a branch, ZATCA API calls will fail until a valid PCSID is provisioned.
Saky ZATCA Connect centralizes CSID management across all branches—monitoring certificate status, automating CSR generation per branch, and alerting administrators prior to certificate expiration.
Official ZATCA Regulatory References
- ZATCA E-Invoicing Security Features Implementation Standards— Zakat, Tax and Customs Authority (ZATCA)
- ZATCA FATOORA Onboarding & Developer Portal Documentation— Zakat, Tax and Customs Authority (ZATCA)