PHPackages                             uctoplus/ubl-wrapper - 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. uctoplus/ubl-wrapper

ActiveLibrary[Payment Processing](/categories/payments)

uctoplus/ubl-wrapper
====================

A PHP wrapper for UBL documents

v1.3.1(1y ago)24.6k2GPL-3.0-or-laterPHPPHP &gt;=7.0CI passing

Since Feb 11Pushed 1y ago2 watchersCompare

[ Source](https://github.com/uctoplus/ubl-wrapper)[ Packagist](https://packagist.org/packages/uctoplus/ubl-wrapper)[ RSS](/packages/uctoplus-ubl-wrapper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (12)Used By (0)

UBL Wrapper
===========

[](#ubl-wrapper)

[![GitHub Workflow Status (branch)](https://camo.githubusercontent.com/62c36e2262e04a0a00c05f552f2a5231e0459d8ddb390ce4237118062d72eb61/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7563746f706c75732f75626c2d777261707065722f504850556e69742f6d61696e)](https://camo.githubusercontent.com/62c36e2262e04a0a00c05f552f2a5231e0459d8ddb390ce4237118062d72eb61/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7563746f706c75732f75626c2d777261707065722f504850556e69742f6d61696e)[![Codecov](https://camo.githubusercontent.com/a29b5c32131b50b8586216fda42b24b3de5a6480ff77909a3600c303d73dab0d/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f7563746f706c75732f75626c2d777261707065723f746f6b656e3d33356361653839662d363838352d343638372d396565662d363465623231396163643133)](https://camo.githubusercontent.com/a29b5c32131b50b8586216fda42b24b3de5a6480ff77909a3600c303d73dab0d/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f7563746f706c75732f75626c2d777261707065723f746f6b656e3d33356361653839662d363838352d343638372d396565662d363465623231396163643133)

About The Project
-----------------

[](#about-the-project)

You can install new

```
$ composer require uctoplus/ubl-wrapper
```

Supported UBL versions
----------------------

[](#supported-ubl-versions)

### UBL 2.1

[](#ubl-21)

### *\[comming soon\] UBL 2.3*

[](#comming-soon-ubl-23)

Getting Started
---------------

[](#getting-started)

To get a local copy up and running follow these simple steps.

### Generate UBL Documents

[](#generate-ubl-documents)

```
$generator = new Generator();

$invoice = new Invoice();
$invoice->setID(1);
$invoice->setIssueDate(Carbon::now());
$invoice->addNote("Note No. 1!!!");
$invoice->addNote(new NoteType("Note No. 2!!!", ["languageID" => "en"]));

// Create AccountingSupplierParty
$accountingSupplierParty = new SupplierPartyType();
$invoice->setAccountingSupplierParty($accountingSupplierParty);

// Create AccountingCustomerParty
$accountingCustomerParty = new CustomerPartyType();
$invoice->setAccountingCustomerParty($accountingCustomerParty);

// Create LegalMonetaryTotal
$legalMonetaryTotal = new MonetaryTotalType();

$payableAmount = new PayableAmountType();
$payableAmount->setCurrencyIDAttribute("EUR");
$payableAmount->setValue(15.35);
$legalMonetaryTotal->setPayableAmount($payableAmount);
$invoice->setLegalMonetaryTotal($legalMonetaryTotal);

// Create InvoiceLine
$invoiceLine = new InvoiceLineType();
$invoiceLine->setID("1");
$invoiceLine->setLineExtensionAmount(new LineExtensionAmountType("555", ["currencyID" => "EUR"]));

$item = new ItemType();
$item->setName("Item");

$invoiceLine->setItem($item);

$invoice->addInvoiceLine($invoiceLine);

$generator->addDocument($invoice);
$generator->save( 'path/to/file.xml' );
```

When multiple documents are provided to generator zip file will be generated as default. When flag `$aggregated=true` is provided to `$generator->save( $file_path, $aggregated = false);`, aggregated XML will be generated using UCT xsd scheme. This is useful for Import/Export in large amount of documents.

### Parse UBL Documents

[](#parse-ubl-documents)

```
$parser = new Parser();
$parser->fromFile('tests/resources/UBL-Invoice-2.1-Example.xml');

$parser->getDocuments();
```

About The Author
----------------

[](#about-the-author)

This package was created by **Účto+ / doq.to** to provide support for UBL standard.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance43

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 67.4% 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 ~99 days

Recently: every ~235 days

Total

11

Last Release

563d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d474013692bcf98ee69d43097167b0329b3cb1ea9aaaa12e9f5464621da9b8f?d=identicon)[uctoplus](/maintainers/uctoplus)

---

Top Contributors

[![MimoGraphix](https://avatars.githubusercontent.com/u/5190700?v=4)](https://github.com/MimoGraphix "MimoGraphix (31 commits)")[![padackar](https://avatars.githubusercontent.com/u/32055902?v=4)](https://github.com/padackar "padackar (11 commits)")[![uctoplus](https://avatars.githubusercontent.com/u/59417032?v=4)](https://github.com/uctoplus "uctoplus (2 commits)")[![goestijn](https://avatars.githubusercontent.com/u/28931777?v=4)](https://github.com/goestijn "goestijn (1 commits)")[![j-troost](https://avatars.githubusercontent.com/u/7579156?v=4)](https://github.com/j-troost "j-troost (1 commits)")

---

Tags

parsergeneratorinvoicedocumentublordercredit notequotationuctopluspacking listdebit note

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/uctoplus-ubl-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/uctoplus-ubl-wrapper/health.svg)](https://phpackages.com/packages/uctoplus-ubl-wrapper)
```

###  Alternatives

[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)[josemmo/einvoicing

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

173279.6k2](/packages/josemmo-einvoicing)[cleverit/ubl_invoice

A PHP wrapper for UBL invoices

36283.4k](/packages/cleverit-ubl-invoice)[greenter/ubl-validator

OASIS Universal Business Language Schema Validator UBL v2.0, UBL v2.1

15180.9k9](/packages/greenter-ubl-validator)[horstoeko/zugferdublbridge

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

16135.6k5](/packages/horstoeko-zugferdublbridge)

PHPackages © 2026

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