PHPackages                             charkoulis/einvoicing - 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. charkoulis/einvoicing

ActiveLibrary[Payment Processing](/categories/payments)

charkoulis/einvoicing
=====================

Library for reading and creating European-compliant electronic invoices (EN 16931)

v1.0.0(1y ago)06MITPHPPHP &gt;=7.1

Since Sep 24Pushed 1y agoCompare

[ Source](https://github.com/charkoulis/einvoicing)[ Packagist](https://packagist.org/packages/charkoulis/einvoicing)[ Docs](https://github.com/charkoulis/einvoicing)[ RSS](/packages/charkoulis-einvoicing/feed)WikiDiscussions master Synced 1mo ago

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

 [![](docs/logo.svg)
European Invoicing (eInvoicing)](https://josemmo.github.io/einvoicing/)
============================================================================================

[](#----european-invoicing-einvoicing)

 [![Build Status](https://github.com/josemmo/einvoicing/workflows/CI/badge.svg)](https://github.com/josemmo/einvoicing/actions) [![Latest Version](https://camo.githubusercontent.com/3aaf4d421d08ef4f6d110f2c47024414b8ceb655e960270fcafbdf9c0e6fa220/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f73656d6d6f2f65696e766f6963696e67)](https://packagist.org/packages/josemmo/einvoicing) [![Supported PHP Versions](https://camo.githubusercontent.com/24c3711f219819aaa9c0a40961198e63c4930253add0fe00fefdc8e35b4ffd29/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a6f73656d6d6f2f65696e766f6963696e67)](#installation) [![License](https://camo.githubusercontent.com/a8c1debdd280b070bed3a5368c6ff08a92140c2c67a921084e1ee693e3816415/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a6f73656d6d6f2f65696e766f6963696e67)](LICENSE) [![Documentation](https://camo.githubusercontent.com/3d7ade9635b634ef7989c8040782b3b39292eafe4c719bb48b2bb9ff43506865/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6f6e6c696e652d646f63732d626c756576696f6c6574)](https://josemmo.github.io/einvoicing/)

About
-----

[](#about)

eInvoicing is a PHP library for creating and reading electronic invoices according to the [eInvoicing Directive and European standard](https://ec.europa.eu/digital-building-blocks/wikis/display/DIGITAL/eInvoicing).

It aims to be 100% compliant with [EN 16931](https://ec.europa.eu/digital-building-blocks/wikis/x/boTXGw) as well as with the most popular CIUS and extensions, such as [PEPPOL BIS](https://docs.peppol.eu/poacc/billing/3.0/bis/).

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

[](#installation)

First of all, make sure your environment meets the following requirements:

- PHP 7.1 or higher
- [SimpleXML extension](https://www.php.net/book.simplexml) for reading and exporting UBL/CII invoices

Then, you should be able to install this library using Composer:

```
composer require charkoulis/einvoicing

```

Usage
-----

[](#usage)

For a proper quick start guide, visit the documentation website at .

### Importing invoice documents

[](#importing-invoice-documents)

```
use Einvoicing\Exceptions\ValidationException;
use Einvoicing\Readers\UblReader;

$reader = new UblReader();
$document = file_get_contents(__DIR__ . "/example.xml");
$inv = $reader->import($document);
try {
    $inv->validate();
} catch (ValidationException $e) {
    // Invoice is not EN 16931 complaint
}
```

### Exporting invoice documents

[](#exporting-invoice-documents)

```
use Einvoicing\Identifier;
use Einvoicing\Invoice;
use Einvoicing\InvoiceLine;
use Einvoicing\Party;
use Einvoicing\Presets;
use Einvoicing\Writers\UblWriter;

// Create PEPPOL invoice instance
$inv = new Invoice(Presets\Peppol::class);
$inv->setNumber('F-202000012')
    ->setIssueDate(new DateTime('2020-11-01'))
    ->setDueDate(new DateTime('2020-11-30'));

// Set seller
$seller = new Party();
$seller->setElectronicAddress(new Identifier('9482348239847239874', '0088'))
    ->setCompanyId(new Identifier('AH88726', '0183'))
    ->setName('Seller Name Ltd.')
    ->setTradingName('Seller Name')
    ->setVatNumber('ESA00000000')
    ->setAddress(['Fake Street 123', 'Apartment Block 2B'])
    ->setCity('Springfield')
    ->setCountry('DE');
$inv->setSeller($seller);

// Set buyer
$buyer = new Party();
$buyer->setElectronicAddress(new Identifier('ES12345', '0002'))
    ->setName('Buyer Name Ltd.')
    ->setCountry('FR');
$inv->setBuyer($buyer);

// Add a product line
$line = new InvoiceLine();
$line->setName('Product Name')
    ->setPrice(100)
    ->setVatRate(16)
    ->setQuantity(1);
$inv->addLine($line);

// Export invoice to a UBL document
header('Content-Type: text/xml');
$writer = new UblWriter();
echo $writer->export($inv);
```

Roadmap
-------

[](#roadmap)

These are the expected features for the library and how's it going so far:

- Representation of invoices, parties and invoice lines as objects
- Compatibility with the most used [CIUS and extensions](https://ec.europa.eu/digital-building-blocks/wikis/display/EINVCOMMUNITY/Registry+of+CIUS+%28Core+Invoice+Usage+Specifications%29+and+Extensions)
- Export invoices to UBL documents
- Import invoices from UBL documents
- Export invoices to CII documents
- Import invoices from CII documents
- Proper documentation

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 95.7% 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

Unknown

Total

1

Last Release

601d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/72c9fe597cccb9296b619be62be772f075f370b404acd9bdcf67ae9cb4126850?d=identicon)[charkoulis](/maintainers/charkoulis)

---

Top Contributors

[![josemmo](https://avatars.githubusercontent.com/u/4470267?v=4)](https://github.com/josemmo "josemmo (199 commits)")[![ChristianVermeulen](https://avatars.githubusercontent.com/u/1062751?v=4)](https://github.com/ChristianVermeulen "ChristianVermeulen (4 commits)")[![hmazter](https://avatars.githubusercontent.com/u/805377?v=4)](https://github.com/hmazter "hmazter (3 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")[![rycks](https://avatars.githubusercontent.com/u/1468823?v=4)](https://github.com/rycks "rycks (1 commits)")

---

Tags

invoiceinvoicingublpeppolcii

### Embed Badge

![Health badge](/badges/charkoulis-einvoicing/health.svg)

```
[![Health](https://phpackages.com/badges/charkoulis-einvoicing/health.svg)](https://phpackages.com/packages/charkoulis-einvoicing)
```

###  Alternatives

[josemmo/einvoicing

Library for reading and creating European-compliant electronic invoices (EN 16931)

173279.6k2](/packages/josemmo-einvoicing)[num-num/ubl-invoice

A modern object-oriented PHP library to create and read valid UBL and EN 16931/Peppol BIS 3.0 files

135820.5k](/packages/num-num-ubl-invoice)[horstoeko/zugferd

A library for creating and reading european electronic invoices

4044.3M18](/packages/horstoeko-zugferd)[horstoeko/zugferdublbridge

Convert Factur-X/ZUGFeRD (CII-Syntax) to PEPPOL (UBL-Syntax) and visa versa

16135.6k5](/packages/horstoeko-zugferdublbridge)[cleverit/ubl_invoice

A PHP wrapper for UBL invoices

36283.4k](/packages/cleverit-ubl-invoice)[easybill/e-invoicing

A package to read and create EN16931 e-invoices or CIUS like: XRechnung, ZUGFeRD etc.

12122.5k](/packages/easybill-e-invoicing)

PHPackages © 2026

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