GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - muhannadhg/zatca-tools-examples: أمثلة تكامل وأدوات مجانية للفوترة الإلكترونية السعودية (ZATCA / فاتورة) — Saudi e-invoicing examples & free developer tools: REST API, TLV QR decoder/generator, VAT validator

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
assets
assets
 
 
data
data
 
 
docs
docs
 
 
examples
examples
 
 
tools
tools
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

ZATCA Tools — Saudi ZATCA e-Invoicing Examples & Free Tools

Saudi ZATCA e-Invoicing — Examples & Free Tools

Ready-to-run integration examples and free developer tools for Saudi Arabia's e-invoicing (ZATCA Phase 2 — Fatoora).

Brought to you by ZATCA Tools — the fastest way for Saudi businesses to connect to ZATCA and issue compliant, cryptographically-signed e-invoices in minutes. No accounting system required. Free — no card required.

🌐 App zatcatools.com
📚 API docs zatcatools.com/docs/api
🧪 Sandbox quickstart (no credentials needed) docs/zatca-sandbox-quickstart.md
🚫 Rejection codes cheat sheet docs/zatca-error-codes-cheatsheet.md
🗂️ Validation rules dataset (135 codes, JSON/CSV) data/
✍️ Blog (Arabic guides) zatcatools.com/blog

Quick start

Issue a ZATCA-compliant invoice in one API call — the platform handles the hard parts (UBL XML, XAdES digital signature, TLV QR code, ICV/PIH chain, clearance/reporting with ZATCA) and returns the accepted invoice with ready PDF/XML links:

curl -X POST https://zatcatools.com/api/v1/invoices \
  -H "Authorization: Bearer ztk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"simplified","lines":[{"name":"Consulting service","quantity":1,"unit_price":500}]}'

🔑 Getting an API key: sign up free → complete Fatoora onboarding → Settings → API tab → Generate key.

📦 What's inside

1) API integration examples — examples/

Issue an accepted tax invoice in under 30 lines, with zero external dependencies:

Language File
cURL (all endpoints) examples/curl/README.md
PHP examples/php/issue-invoice.php
Node.js 18+ examples/node/issue-invoice.mjs
Python 3 examples/python/issue_invoice.py

Covered: simplified (B2C) & standard (B2B) invoices, credit/debit notes, listing with filters, and downloading the signed PDF / UBL XML / QR.

2) Free developer tools — tools/

Standalone utilities, useful even if you don't use our platform:

Tool What it does
qr-tlv-decoder Decode any Saudi invoice QR code (base64 TLV → readable fields, Phase 1 & 2 tags)
qr-tlv-generator Generate a Phase-1-compliant TLV QR payload
vat-validator Validate a Saudi VAT registration number (15 digits, format rules)

Common questions (short answers)

Do I need anything from ZATCA to start testing? No. The developer sandbox accepts any well-formed CSR with the fixed OTP 123345 and validates invoices for the test VAT 399999999900003. Step-by-step: docs/zatca-sandbox-quickstart.md.

Sandbox vs simulation vs production? Three base URLs under gw-fatoora.zatca.gov.sa/e-invoicing/ — developer-portal, simulation, core — with three CSR template names and separate OTPs. An OTP is valid in one environment only, once, for one hour.

Is there a free ZATCA e-invoicing API? Yes: ZATCA Tools signs (XAdES), chains (ICV/PIH), reports/clears and returns QR + XML + PDF from one JSON call. First 50 invoices free, no card; a trial mode runs on ZATCA's sandbox with no VAT number or OTP.

Which rejection codes are most common? BR-KSA-26/61 (PIH), BR-KSA-33 (ICV), BR-KSA-09/66 (address and postal code), BR-KSA-04 (timezone), BR-KSA-F-04 (negative lines), BR-KSA-EN16931-09 (tax total with a tax currency). One-line fixes for twenty codes: docs/zatca-error-codes-cheatsheet.md.

Does it plug into an existing store or workflow? Yes — WooCommerce plugin, Shopify app, n8n community node, and the REST API for anything else.

Why ZATCA Tools?

  • ⚡ Onboarding in minutes — CSR, compliance CSID, the 6 compliance checks, and production CSID are fully automated
  • 🧾 Standard (B2B) & simplified (B2C) invoices — signed, cleared/reported, with credit & debit notes
  • 🔗 Clean REST API — JSON in, accepted invoice + PDF out; uniform {error:{code,message}} errors
  • 🗄️ XML/PDF archive of every invoice in its official format
  • 🆓 Free — no card required

Contributing

Found a bug, or want to add an example in another language (C#, Go, Java…)? Issues and PRs are welcome 🤝

License

MIT — use freely in your own projects.


ملخص بالعربي

هذا المستودع يقدّم أمثلة تكامل جاهزة (cURL / PHP / Node.js / Python) وأدوات مجانية (فك وتوليد رمز QR بصيغة TLV، والتحقق من الرقم الضريبي) للفوترة الإلكترونية السعودية — المرحلة الثانية (فاتورة). مقدّم من ZATCA Tools: اربط منشأتك مع هيئة الزكاة وأصدر فواتير معتمدة خلال دقائق — مجانًا وبدون بطاقة. التوثيق الكامل بالعربي: docs/api.

About

أمثلة تكامل وأدوات مجانية للفوترة الإلكترونية السعودية (ZATCA / فاتورة) — Saudi e-invoicing examples & free developer tools: REST API, TLV QR decoder/generator, VAT validator

zatcatools.com

Topics

api-examplese-invoicingeinvoicefatoorafatoora-apiksaqr-codesaudi-arabiasaudi-e-invoicingtlvubl-2-1vatxadeszatcazatca-phase-2

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.