Cryptographic Onboarding GuideLast reviewed: November 1, 20268 min read

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.

Technical Note: Each distinct EGS unit or branch billing system requires its own CSR configuration and CSID lifecycle. Never share private keys across unrelated legal entities.

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:

ZATCA FATOORA CSID Onboarding Sequence
StepTechnical OperationInput & Output Artifacts
1. CSR GenerationGenerate ECDSA secp256k1 keypair and CSR with ZATCA OID extensionsInput: 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 endpointInput: Base64 CSR + OTP Header. Output: binarySecurityToken (CCSID) + Secret
3. Compliance Invoice ChecksSubmit sample Standard, Simplified, Credit & Debit XMLs to /compliance/invoicesInput: Signed UBL 2.1 XMLs. Output: PASS validation results for required document types
4. Production CSID (PCSID)Exchange validated CCSID at /production/csids endpointInput: 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

Frequently Asked Questions

The 4-digit CSR title/functionality flag specifies which invoice types the EGS unit will issue: the first digit indicates Standard Tax Invoices (B2B) and the second digit indicates Simplified Tax Invoices (B2C). A value of 1100 means the EGS issues both Standard and Simplified invoices.
KSA Enterprise Integration Assessment

Request a ZATCA Phase 2 Technical Demo

Share your existing ERP environment and monthly invoice volume. Our integration engineers will walk you through the middleware architecture, UBL 2.1 XML transformation, and CSID onboarding flow.