🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

qrzatca

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qrzatca

A Python library to generate ZATCA-compliant QR codes for Saudi Arabian e-invoices.

0.1.3
Source
PyPI
Maintainers
1

ZATCA QR

A Python library for generating ZATCA-compliant QR codes for Saudi Arabian e-invoices.

PyPI version

📋 Description

qrzatca is a lightweight and developer-friendly Python package designed to help businesses in Saudi Arabia comply with ZATCA (Zakat, Tax, and Customs Authority) e-invoicing regulations.

This library encodes invoice information using TLV (Tag-Length-Value) format and generates QR codes containing:

  • Seller name
  • VAT registration number
  • Invoice timestamp
  • Invoice total amount
  • VAT amount

These QR codes can be used in invoice PDFs, printed receipts, and digital documents to meet ZATCA Phase I & II compliance.

✅ Key Features

  • 🔒 ZATCA-compliant QR code generation
  • 📦 Encodes seller, VAT, timestamp, amount, and tax
  • 🖼️ Returns image as a Pillow object (customizable or savable)
  • 🧩 Easy integration into Django, Flask, or standalone Python apps
  • ⚙️ Minimal dependencies (qrcode, Pillow)

🧾 Usage Example


from qrzatca import create_zatca_qr

# Input invoice data
seller_name = "ABC Trading Co."
vat_number = "123456789012345"
invoice_time = "2025-04-25T12:30:00Z"
total_amount = 2500.00
vat_amount = 375.00

# Generate the ZATCA-compliant QR code
qr_image = create_zatca_qr(
    seller_name=seller_name,
    tax_number=vat_number,
    invoice_time=invoice_time,
    total_amount=total_amount,
    tax_amount=vat_amount
)

# Save the image to a file
qr_image.save("zatca_invoice_qr.png")

# Or display it directly (if using Jupyter or a GUI app)
qr_image.show()



📦 Installation

Install directly from PyPI:

pip install qrzatca





Keywords

zatca

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts