🧾
📚 دليل شامل

ZATCA Phase-2 Compliance Checklist

دليل الـ47 خطوة لتطبيق المرحلة الثانية

📄 18 صفحة · ⏱️ 22 دقيقة قراءة · 🆓 مجاني

دليل عملي شامل لتطبيق ZATCA Phase-2 في شركتك خطوة بخطوة. مبني على خبرة Softloomer العملية في السعودية. يشمل جميع المتطلبات التقنية، التشريعية، والتكاملية.

1

المرحلة 1: التحضير والتسجيل (الأسبوع 1)

  1. تحقق من إن شركتك ضمن الـwave الحالي — راجع ZATCA portal لتاريخ الـeffective date لشركتك
  2. احضّر الـCommercial Registration — لازم يكون active وصحيح
  3. سجّل المسؤول التقني في الـZATCA portal
  4. راجع الـVAT registration — التأكد من VAT number صحيح
  5. اختر solution provider معتمد — Odoo Enterprise، SAP، Oracle، إلخ
  6. حدد موعد الـtest environment access — ZATCA Sandbox
2

المرحلة 2: الإعداد التقني (الأسبوع 1-2)

  1. احصل على CSID (Cryptographic Stamp Identifier) من ZATCA Sandbox
  2. configure الـdigital certificate في الـERP
  3. setup الـCSR (Certificate Signing Request)
  4. اختبر Sandbox endpoints: /compliance/invoices/clearance + /compliance/invoices/reporting
  5. configure UBL 2.1 XML templates للفواتير
  6. generate QR code templates بـBase64 format
  7. setup UUID generation لكل فاتورة (UUID v4)
  8. setup hash chain للـimmutability
  9. configure invoice numbering sequence (لازم sequential بدون gaps)
3

المرحلة 3: Mapping البيانات (الأسبوع 2)

  1. Map customer data: VAT number، address، contact
  2. Map product data: UNSPSC codes، VAT category، unit of measure
  3. Map tax rates: 15% standard، 0% (zero-rated)، exempt
  4. Map fiscal categories: B2B clearance، B2C reporting، export
  5. Map currency codes ISO 4217 (SAR، USD، إلخ)
  6. Map payment methods حسب ZATCA standards
  7. Map invoice types: standard، credit note، debit note، prepayment
4

المرحلة 4: الاختبار (الأسبوع 2-3)

  1. اختبر standard invoice (B2B clearance)
  2. اختبر simplified invoice (B2C reporting)
  3. اختبر credit note generation
  4. اختبر debit note generation
  5. اختبر prepayment invoice
  6. اختبر invoice cancellation workflow
  7. تأكد من XML schema validation ضد ZATCA XSD
  8. تأكد من QR code readable بأي scanner
  9. تأكد من cryptographic stamp valid ضد public key
  10. اختبر offline scenario — لو الـZATCA API down، الفاتورة لازم تـcache وتـretry
  11. اختبر concurrent invoices (100+ في الـsecond)
5

المرحلة 5: Edge Cases

  1. Export of services — الـVAT 0%، الـcustomer outside KSA
  2. Reverse charge mechanism — للـimports
  3. Multiple line items with different tax rates
  4. Discounts — line-level + invoice-level
  5. Foreign currency invoices — exchange rate snapshot
  6. Long-form invoices (50+ line items)
  7. Customer with no VAT (B2C)
  8. Customer with foreign VAT (GCC + non-GCC)
6

المرحلة 6: Go-Live (الأسبوع 3-4)

  1. احصل على Production CSID من ZATCA portal
  2. switch endpoints من Sandbox لـProduction
  3. Issue test invoice في production + verify clearance
  4. setup monitoring + alerts للـfailed submissions
  5. train accounting team على الـnew workflow
  6. تأكد من backup + retention policy (8 سنين كحد أدنى)
7

الـTroubleshooting الشائع

1. الفاتورة rejected بـerror "Invalid Signature"

السبب: الـprivate key أو الـcertificate غير صحيح. الحل: regenerate CSID + re-upload certificate.

2. QR Code لا يفتح بأي scanner

السبب: الـbase64 encoding خطأ أو الـTLV format غلط. الحل: استخدم ZATCA's official TLV generator لـvalidation.

3. الـsequence numbers بها gaps

السبب: فواتير اتلغت في الـmiddle. الحل: ZATCA بيتطلب reason للـgap في الـmonthly report.

4. الـtimeout على الـclearance endpoint

السبب: ZATCA API بطيء في الـpeak hours. الحل: retry logic مع exponential backoff (max 3 retries).

✅ القائمة المرجعية

اطبعها وتابعها معك

  • Commercial Registration active وصحيح
  • VAT registration valid
  • CSID من ZATCA Sandbox
  • CSR + Digital certificate configured
  • UBL 2.1 XML templates ready
  • QR code generation working
  • UUID v4 generation
  • Hash chain (immutability)
  • Invoice numbering sequence (no gaps)
  • Customer VAT numbers verified
  • Product UNSPSC codes
  • Tax rates configured (15%, 0%, exempt)
  • Standard invoice test passed
  • Simplified invoice test passed
  • Credit note test passed
  • Debit note test passed
  • XML schema validation passed
  • Cryptographic stamp validation
  • Offline scenario handling
  • Production CSID issued
  • Monitoring + alerts setup
  • Accounting team trained
  • Backup + 8-year retention policy
📬

استلم الـguides الجديدة أولاً بأول

اشترك في نشرة Softloomer. guides تقنية جديدة شهرياً، بدون spam.

محتاج مساعدة في التطبيق؟

احنا شريك Odoo معتمد بنخدم الخليج. احجز جلسة استكشاف مجانية 30 دقيقة.

📅 احجز جلسة
WhatsApp