PHPackages                             elmogy/fatoora-zatca - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. elmogy/fatoora-zatca

ActiveLibrary[Payment Processing](/categories/payments)

elmogy/fatoora-zatca
====================

this package handle the stage 2 of zatca for integration the tax and simpilified tax invoices.

v1.1(1y ago)022proprietaryPHP

Since May 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/karim-Elmogy/fatoora-zatca)[ Packagist](https://packagist.org/packages/elmogy/fatoora-zatca)[ RSS](/packages/elmogy-fatoora-zatca/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

 [![ZATCA Logo](https://camo.githubusercontent.com/7b933a65cd7294fe508cb058936f903fe8bf764c49266afa4d375307a6623e95/68747470733a2f2f6c6f67696e2e7a617463612e676f762e73612f636f6d2e7361702e706f7274616c2e7265736f757263657265706f7369746f72792f7265706f2f7a617463612f696d672f5a415443412d6c6f676f2e706e67)](https://camo.githubusercontent.com/7b933a65cd7294fe508cb058936f903fe8bf764c49266afa4d375307a6623e95/68747470733a2f2f6c6f67696e2e7a617463612e676f762e73612f636f6d2e7361702e706f7274616c2e7265736f757263657265706f7369746f72792f7265706f2f7a617463612f696d672f5a415443412d6c6f676f2e706e67)

Fatoora Zatca
=============

[](#fatoora-zatca)

This package handle the phase 2 of the zakat and income authority in the saudi arabia, addition to it's based on native php so it can work on any system based on php or any framework like: (Laravel - Symfony - CodeIgniter - Yii - Zend Framework - CakePHP)

### The package handle 3 environments:

[](#the-package-handle-3-environments)

- test.
- simulation.
- production.

**Requirements**

- phpseclib/phpseclib:~3.0
- simplesoftwareio/simple-qrcode

Installation
------------

[](#installation)

```
composer require elmogy/fatoora-zatca
```

**Configuration:**

```
 # Must add the service provider to config/app.php
 'providers' => [
    /*
    * Package Service Providers...
    */
    Bl\FatooraZatca\FatooraZatcaServiceProvider::class,
 ]

```

Then publish the config file 👏
------------------------------

[](#then-publish-the-config-file-)

```
php artisan vendor:publish --tag=fatoora-zatca

```

Assign the config from your.env
-------------------------------

[](#assign-the-config-from-yourenv)

```
 ZATCA_ENVIRONMENT=local   # local|simulation|production

```

Setting
-------

[](#setting)

```
First you must generate credentials to use in zatca authentication
and here is the steps :
1- fill all parameters in Setting object.
 $settings = new \Bl\FatooraZatca\Objects\Setting();
 2 - pass $settings to the static method ( generateZatcaSetting )
$result = \Bl\FatooraZatca\Zatca::generateZatcaSetting($settings);
 3 - save all $result object to database to use when sending xml invoices.
 Prepare
 $seller
instance of \Bl\FatooraZatca\Objects\Seller::class
 $invoice    instance of \Bl\FatooraZatca\Objects\Invoice::class
 $client
instance of \Bl\FatooraZatca\Objects\Client::class
 \Bl\FatooraZatca\Classes\InvoiceType
(TAX_INVOICE|REFUND_INVOICE|CREDIT_NOTE)
 \Bl\FatooraZatca\Classes\PaymentType (CASH|CREDIT|BANK_ACCOUNT|
 BANK_CARD|MULTIPLE)
 B2B Invoice Tax
 $invoice = \Bl\FatooraZatca\Invoices\B2B::make($seller, $invoice, $client)->report();
 B2C Invoice Tax
 $invoice = \Bl\FatooraZatca\Invoices\B2C::make($seller, $invoice)->report();
 OR
 $invoice = \Bl\FatooraZatca\Invoices\B2C::make($seller, $invoice)->calculate();

```

Access Response
---------------

[](#access-response)

```
 $invoice->getQr();                            # qr text in base64 format
 $invoice->getQrImage();                       # qr image in base64 format
 $invoice->getInvoiceHash();                   # the hash of the invoice
 $invoice->getClearedInvoice();                # the invoice in base64 format
 $invoice->getXmlInvoice();                    # the invoice in xml format
 $invoice->getReportingStatus();               # Status of clearance and reporting
 $invoice->getValidationResultStatus();        # validation status of sent data
 $invoice->getValidationResults();             # all messages (info - warning - error)
 $invoice->getInfoMessages();                  # all info messages
 $invoice->getWarningMessages();               # all warning messages
 $invoice->getErrorMessages();                 # all error messages
 $invoice->getResult();                        # access all the previous data

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance49

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

368d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/50c6353e8c5920c7eebb2e8974a22ac7e0a9eb762c2dfe0b263a6513004af337?d=identicon)[karim\_elmogy](/maintainers/karim_elmogy)

---

Top Contributors

[![karim-Elmogy](https://avatars.githubusercontent.com/u/55699823?v=4)](https://github.com/karim-Elmogy "karim-Elmogy (8 commits)")

### Embed Badge

![Health badge](/badges/elmogy-fatoora-zatca/health.svg)

```
[![Health](https://phpackages.com/badges/elmogy-fatoora-zatca/health.svg)](https://phpackages.com/packages/elmogy-fatoora-zatca)
```

###  Alternatives

[amzn/amazon-pay-api-sdk-php

Amazon Pay API SDK (PHP)

505.1M9](/packages/amzn-amazon-pay-api-sdk-php)[amzn/amazon-pay-magento-2-module

Official Magento2 Plugin to integrate with Amazon Pay

109501.7k1](/packages/amzn-amazon-pay-magento-2-module)[sylius/paypal-plugin

PayPal plugin for Sylius.

451.4M4](/packages/sylius-paypal-plugin)[tpay-com/tpay-php

Tpay.com library

25260.3k9](/packages/tpay-com-tpay-php)[litle/payments-sdk

The Vantiv eCommerce PHP SDK is a PHP implementation of the \[Vantiv eCommerce\](https://developer.vantiv.com/community/ecommerce). XML API. This SDK was created to make it as easy as possible to connect process your payments with Vantiv eCommerce

19139.3k1](/packages/litle-payments-sdk)[saleh7/php-zatca-xml

An unofficial PHP library for generating ZATCA Fatoora e-invoices. This library facilitates the creation of compliant e-invoices, QR Codes, and certificates, as well as the submission of e-invoices to ZATCA's servers. It provides developers with an easy-to-use, customizable, and robust toolkit to integrate and automate ZATCA e-invoicing processes in PHP applications.

5112.5k](/packages/saleh7-php-zatca-xml)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
