The #1 ZATCA E-Invoicing Software for Saudi Arabia
Don't just read about compliance—automate it. Qeemah handles XML generation, cryptographic stamping, and Fatoora portal integration automatically. Plus: Get paid 68% faster with automated WhatsApp payment reminders →
ZATCA E-Invoicing Requirements
Official technical requirements from the Zakat, Tax and Customs Authority
1. Required XML Structure
Invoices must be in UBL 2.1 (Universal Business Language) format [7] and contain the following elements:
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cbc:ID>INV-2025-001</cbc:ID>
<cbc:IssueDate>2025-01-15</cbc:IssueDate>
<cbc:IssueTime>14:30:00</cbc:IssueTime>
<!-- Seller Information -->
<cac:AccountingSupplierParty>
<cac:Party>
<cac:PartyTaxScheme>
<cbc:CompanyID>310122393500003</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
</cac:Party>
</cac:AccountingSupplierParty>
<!-- Customer Information -->
<cac:AccountingCustomerParty>...</cac:AccountingCustomerParty>
<!-- Invoice Lines -->
<cac:InvoiceLine>...</cac:InvoiceLine>
</Invoice> Critical Warning
Any error in XML structure will result in immediate invoice rejection. Qeemah automatically validates the format before submission.
2. Mandatory QR Code (TLV Format)
QR code uses TLV (Tag-Length-Value) structure, Base64 encoded (max 700 characters) [5] :
Phase 1 - Basic Tags (All Invoices):
- Tag 1: Seller Name
- Tag 2: VAT Registration Number
- Tag 3: Timestamp (ISO format: 2025-01-15T14:30:00Z)
- Tag 4: Invoice Total with VAT
- Tag 5: VAT Total Amount
Phase 2 - Cryptographic Tags (B2B & B2C):
- Tag 6: Invoice Hash (SHA-256 of XML)
- Tag 7: ECDSA Digital Signature
- Tag 8: ECDSA Public Key (secp256k1)
- Tag 9: Certificate Authority Signature
💡 Pro Tip: Qeemah automatically generates all 9 QR tags in TLV format with proper Base64 encoding. Zero manual work required. For a technical deep-dive, read our complete ZATCA QR Code & TLV Encoding guide.
3. Digital Signature & Integration (Phase 2)
In Phase 2, your system must integrate with the Fatoora platform:
Obtain Cryptographic Stamp Certificate
Digital certificate from ZATCA to sign invoices electronically
Receive Unique Invoice ID (UUID)
ZATCA returns a unique identifier after accepting the invoice
✅ Qeemah handles all of this automatically: Integration, signing, and submission without manual intervention.
4. Onboarding Process (Phase 2)
Before going live, you must complete ZATCA's onboarding process:
Step 1: Generate OTP (One-Time Password)
Step 2: Create Certificate Signing Request (CSR)
Must include 11 mandatory fields:
- • Common Name (CN)
- • Serial Number (EGS device serial)
- • Organization Identifier (VAT number)
- • Organization Unit Name
- • Organization Name
- • Country Code (SA)
- • Invoice Type (TSXY format)
- • Location (address)
- • Industry (business category)
Step 3: Compliance Checks (Testing)
Submit 3 test documents for validation:
- ✓ Standard Invoice (B2B)
- ✓ Credit Note
- ✓ Debit Note
Get Compliance CSID for testing
Step 4: Production Certificate
After passing compliance checks, receive Production CSID (valid for 365 days) [8]
🚀 Qeemah manages your entire onboarding: OTP handling, CSR generation, compliance testing, and certificate renewal.
5. Business Rules (BR-KSA) & Validation
ZATCA validates invoices using a 3-tier validation pyramid:
Priority 1: KSA Rules (BR-KSA)
Priority 2: EN 16931 (European Standard)
Priority 3: UBL 2.1 Specifications
Decimal Precision Rules
- • Amounts: 2 decimal places
- • Unit Prices: Unlimited decimals
- • Quantities: Unlimited decimals
VAT Categories
- • S: Standard (15%)
- • Z: Zero-rated (0%)
- • E: Exempt
- • O: Not subject to VAT
Validation Outcomes
Invalid: Invoice rejected with errors (must fix and resubmit)
Accepted with Warnings: Invoice accepted but has non-critical issues
Valid/Compliant: Invoice fully compliant (no errors or warnings)
📋 Critical: Invoice chaining via Previous Invoice Hash (PIH) - even rejected invoices are tracked in the sequence.
Top 10 Errors That Cause Invoice Rejection
Common BR-KSA validation errors and how to fix them
1. Invalid or Expired VAT Number
Error: "Invalid VAT Registration Number" or "310122393500003 is not registered"
✅ Solution: Verify VAT number validity directly from ZATCA website: zatca.gov.sa
2. Incomplete QR Code (Phase 2)
Error: "Missing cryptographic tags in QR code" (BR-KSA-51)
API Response: 400 Bad Request | Error Code: MISSING_QR_TAGS_6_9
✅ Solution: Phase 2 requires all 9 tags (including Tags 6-9: Invoice Hash, ECDSA Signature, Public Key, CA Signature) in TLV format.
3. VAT Calculation Error (BR-KSA-DEC-02)
Error: "VAT amount precision error" or "TaxAmount calculation mismatch"
API Response: 400 Bad Request | Error Code: VAT_CALCULATION_ERROR
✅ Solution: Amounts must have exactly 2 decimal places. Formula: TaxAmount = ROUND(TaxableAmount × 0.15, 2)
4. Invalid Date/Time Format (BR-KSA-05)
Error: "Invalid IssueDate or IssueTime format"
API Response: 400 Bad Request | Error Code: INVALID_DATETIME_FORMAT
✅ Solution: Date: YYYY-MM-DD | Time: HH:MM:SS or HH:MM:SSZ (UTC)
5. Missing Customer Data (B2B Invoices)
Error: "Customer VAT Number is required for B2B invoices"
✅ Solution: For B2B invoices, customer VAT number is mandatory.
6. Expired CSID Certificate (BR-KSA-CERT-01)
Error: "Cryptographic Stamp Identifier (CSID) expired"
API Response: 401 Unauthorized | Error Code: EXPIRED_CERTIFICATE
✅ Solution: Renew CSID before 365-day expiry. Qeemah auto-renews 30 days before expiration.
7. Duplicate Invoice Number (BR-KSA-45)
Error: "Invoice ID already submitted"
API Response: 400 Bad Request | Error Code: DUPLICATE_INVOICE_ID
✅ Solution: Each invoice ID must be unique per company. Use sequential numbering (INV-2025-0001, INV-2025-0002...).
8. Invalid Previous Invoice Hash (BR-KSA-PIH-01)
Error: "Previous Invoice Hash (PIH) mismatch or missing"
API Response: 400 Bad Request | Error Code: INVALID_PIH_CHAIN
✅ Solution: Each invoice must reference the hash of the previous invoice (including rejected ones). First invoice uses empty hash.
9. Missing Arabic Language Fields (BR-KSA-16)
Error: "Arabic language required for visual invoice"
API Response: 400 Bad Request | Error Code: MISSING_ARABIC_LANGUAGE
✅ Solution: Visual invoices (PDF/printed) must include Arabic. XML can be bilingual (Arabic + English).
10. B2B Clearance Timeout (BR-KSA-CLR-01)
Error: "Invoice issued before clearance approval"
API Response: 303 See Other | Warning Code: PREMATURE_ISSUANCE
✅ Solution: B2B invoices require clearance BEFORE issuing to customer. Wait for 202 Accepted response from ZATCA API.
Why Qeemah is Different
We validate 100+ BR-KSA compliance rules before submission using ZATCA's official SDK. Every invoice passes through the same validation ZATCA uses. Not sure if your current software passes? Run our 5-point compliance audit.
Result: Zero rejected invoices in production since launch. Every invoice validated offline before API submission.
How Qeemah Works
From invoice creation to ZATCA integration - everything is automatic
Create Invoice
Add items and customers as usual. No need to worry about XML or QR codes. Start with professional quotations that convert to compliant invoices automatically.
Automatic Validation
Qeemah validates 71 checkpoints (XML, QR, VAT, dates) and auto-fixes errors.
Instant Submission
Invoice is automatically sent to ZATCA. Receive UUID in less than 2 seconds.
Frequently Asked Questions
Common questions about ZATCA e-invoicing compliance
What is ZATCA e-invoicing and who needs to comply?
What is the difference between Phase 1 and Phase 2?
Phase 2 (Integration): Invoices must be in UBL 2.1 XML format, digitally signed with an ECDSA certificate, and submitted to ZATCA's Fatoora platform. B2B invoices require clearance before issuance; B2C invoices must be reported within 24 hours. The QR code expands to 9 TLV fields including cryptographic stamps.
What are the penalties for non-compliance?
How do I get a CSID (Cryptographic Stamp Identifier)?
What is the difference between Clearance and Reporting?
Reporting (B2C): Simplified tax invoices for retail/B2C transactions can be issued immediately to customers, but must be reported to ZATCA within 24 hours. The seller applies their own cryptographic stamp.
How long does ZATCA integration take with Qeemah?
"E-invoicing is a cornerstone of Saudi Arabia's digital transformation. By mandating electronic invoicing across all VAT-registered businesses, we aim to enhance tax transparency, reduce evasion, and support the goals of Vision 2030."
Works Cited & Technical References
- ZATCA, "E-Invoicing Detailed Guidelines Version 2," zatca.gov.sa (2024).
- ZATCA, "VAT Implementing Regulations," zatca.gov.sa (2024).
- ZATCA, "E-Invoicing Roll-out Phases," zatca.gov.sa (2025).
- ZATCA, "Fatoora Portal User Manual," zatca.gov.sa (2024).
- ZATCA, "Security Features Implementation Standards," zatca.gov.sa (2024).
- ZATCA, "How to Get Ready for Phase 2," zatca.gov.sa (2024).
- ZATCA, "XML Implementation Standard - UBL 2.1," zatca.gov.sa (2024).
- ZATCA, "Developer Portal Manual Version 3," zatca.gov.sa (2024).
- EY Global, "Saudi Arabia announces 22nd wave of Phase 2 e-invoicing integration," ey.com (2025).
- Thomson Reuters, "E-invoicing Phase 2 in KSA: How ZATCA's Guidelines Affect You," thomsonreuters.com (2024).
- Monsha'at, "SME Monitor Report," monshaat.gov.sa (2024).
- Vision 2030, "Financial Sector Development Program," vision2030.gov.sa.
Related Resources
Best Accounting Software in Saudi Arabia
Compare ZATCA-compliant accounting solutions for Saudi SMEs. Full feature comparison and pricing.
ZATCA Phase 2 Complete Guide
Understand wave deadlines, technical requirements, and how to prepare your business for compliance.
Accounting for Retail in Saudi Arabia
POS integration, inventory tracking, and real-time ZATCA reporting for retail businesses.
Ready to integrate with ZATCA?
Start free today. No credit card required. Full integration with the e-invoicing platform in less than 10 minutes.