PHPackages                             hz/qr-invoice - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hz/qr-invoice

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hz/qr-invoice
=============

Helper To make QR E-Invoice

09.8k↑35.7%PHP

Since Dec 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/husseinzaher/QrInvoice)[ Packagist](https://packagist.org/packages/hz/qr-invoice)[ RSS](/packages/hz-qr-invoice/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Requirements
------------

[](#requirements)

- PHP &gt;= 7.2
- An mbstring extension

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

[](#installation)

You can install the package via composer:

```
$ composer require hz/qr-invoice
```

([back to top](#top))

Usage
-----

[](#usage)

### Generate Base64

[](#generate-base64)

```
use Hz\QrInvoice\GenerateQrCode;
use Hz\QrInvoice\Tags\InvoiceDate;
use Hz\QrInvoice\Tags\InvoiceTaxAmount;
use Hz\QrInvoice\Tags\InvoiceTotalAmount;
use Hz\QrInvoice\Tags\Seller;
use Hz\QrInvoice\Tags\TaxNumber;

$generatedString = GenerateQrCode::fromArray([
    new Seller('Husseinzaher'), // seller name
    new TaxNumber('1234567891'), // seller tax number
    new InvoiceDate('2021-07-12T14:25:09Z'), // invoice date as Zulu ISO8601 @see https://en.wikipedia.org/wiki/ISO_8601
    new InvoiceTotalAmount('100.00'), // invoice total amount
    new InvoiceTaxAmount('15.00') // invoice tax amount
    // TODO :: Support others tags
])->toBase64();

// > Output
// AQVTYWxsYQIKMTIzNDU2Nzg5MQMUMjAyMS0wNy0xMlQxNDoyNTowOVoEBjEwMC4wMAUFMTUuMDA=
```

### Generate Plain

[](#generate-plain)

```
use Hz\QrInvoice\GenerateQrCode;
use Hz\QrInvoice\Tags\InvoiceDate;
use Hz\QrInvoice\Tags\InvoiceTaxAmount;
use Hz\QrInvoice\Tags\InvoiceTotalAmount;
use Hz\QrInvoice\Tags\Seller;
use Hz\QrInvoice\Tags\TaxNumber;

$generatedString = GenerateQrCode::fromArray([
    new Seller('Husseinzaher'), // seller name
    new TaxNumber('1234567891'), // seller tax number
    new InvoiceDate('2021-12-12T14:25:09Z'), // invoice date as Zulu ISO8601 @see https://en.wikipedia.org/wiki/ISO_8601
    new InvoiceTotalAmount('100.00'), // invoice total amount
    new InvoiceTaxAmount('15.00') // invoice tax amount
    // TODO :: Support others tags
])->toTLV();
```

([back to top](#top))

### Render A QR Code Image

[](#render-a-qr-code-image)

You can render the tags as QR code image easily

```
use Hz\QrInvoice\GenerateQrCode;
use Hz\QrInvoice\Tags\InvoiceDate;
use Hz\QrInvoice\Tags\InvoiceTaxAmount;
use Hz\QrInvoice\Tags\InvoiceTotalAmount;
use Hz\QrInvoice\Tags\Seller;
use Hz\QrInvoice\Tags\TaxNumber;

// data:image/png;base64, .........
$displayQRCodeAsBase64 = GenerateQrCode::fromArray([
    new Seller('Husseinzaher'), // seller name
    new TaxNumber('1234567891'), // seller tax number
    new InvoiceDate('2021-07-12T14:25:09Z'), // invoice date as Zulu ISO8601 @see https://en.wikipedia.org/wiki/ISO_8601
    new InvoiceTotalAmount('100.00'), // invoice total amount
    new InvoiceTaxAmount('15.00') // invoice tax amount
    // TODO :: Support others tags
])->render();

// now you can inject the output to src of html img tag :)
//
```

([back to top](#top))

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3226b9e5e1b1500ce8e203dd3d7e6077a0b989d612a72fbd978953273ca7d2d4?d=identicon)[husseinzaher](/maintainers/husseinzaher)

---

Top Contributors

[![husseinzaher](https://avatars.githubusercontent.com/u/24205592?v=4)](https://github.com/husseinzaher "husseinzaher (3 commits)")

### Embed Badge

![Health badge](/badges/hz-qr-invoice/health.svg)

```
[![Health](https://phpackages.com/badges/hz-qr-invoice/health.svg)](https://phpackages.com/packages/hz-qr-invoice)
```

###  Alternatives

[im0rtality/underscore

Functional programming library for PHP

415.2k](/packages/im0rtality-underscore)[maosea0125/coords

coords distance and transform

194.1k](/packages/maosea0125-coords)

PHPackages © 2026

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