PHPackages                             komma-softhouse/facturae-engine - 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. komma-softhouse/facturae-engine

ActiveLibrary

komma-softhouse/facturae-engine
===============================

Librería para la generación, firma y envío de facturas electrónicas

v1.8.100(today)02↑2900%MITPHPPHP &gt;=5.6CI failing

Since Aug 28Pushed todayCompare

[ Source](https://github.com/komma-softhouse/facturae-engine)[ Packagist](https://packagist.org/packages/komma-softhouse/facturae-engine)[ Docs](https://github.com/komma-softhouse/facturae-engine)[ GitHub Sponsors](https://github.com/komma-softhouse)[ RSS](/packages/komma-softhouse-facturae-engine/feed)WikiDiscussions main Synced today

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

Facturae-PHP
============

[](#facturae-php)

[![CI](https://github.com/komma-softhouse/Facturae-PHP/workflows/Tests/badge.svg)](https://github.com/komma-softhouse/Facturae-PHP/actions)[![Codacy Badge](https://camo.githubusercontent.com/4623f89b58ac4467b3545a4ca6360c4c7991a42a8d8539e7a94e5799f7ac45ba/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3763343564356562646639613465383862306665366230653132643732306231)](https://www.codacy.com/gh/komma-softhouse/Facturae-PHP)[![Coverage](https://camo.githubusercontent.com/4467a85b67444201349e7f49561908a414ce1d6b64040aa76611cb8b82a4497d/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f436f7665726167652f3763343564356562646639613465383862306665366230653132643732306231)](https://www.codacy.com/gh/komma-softhouse/Facturae-PHP)[![Última versión estable](https://camo.githubusercontent.com/1821aa3b20871b0a53c85102952e813a6b6043ecce395e3ef9fe85938b1effb2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6f6d6d612d736f6674686f7573652f66616374757261652d706870)](https://packagist.org/packages/komma-softhouse/facturae-php)[![Versión de PHP](https://camo.githubusercontent.com/63a8948d90d8ff98ad0f8932ea7e8ed3f2ae6ee9cdede2f81525971ca4e7d62c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e32253230253743253743253230253345253344372e30253230253743253743253230253345253344382e302d383839324246)](composer.json)[![Documentación](https://camo.githubusercontent.com/c504b03100248d94785837215ba7cbe69e3ca7d1b9ddc0047ab147b6adac7ff1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63732d6f6e6c696e652d626c75652e7376673f6c6f6e6743616368653d74727565)](https://komma-softhouse.github.io/Facturae-PHP/)

Facturae-PHP es un paquete escrito puramente en PHP que permite generar facturas electrónicas siguiendo el formato estructurado [Facturae](http://www.facturae.gob.es/), **añadirlas firma electrónica** XAdES y sellado de tiempo, e incluso **enviarlas a FACe o FACeB2B** sin necesidad de ninguna librería o clase adicional.

Note

Esta librería **no** genera registros de facturación de VERI\*FACTU. Para ello, consulta [Verifactu-PHP](https://github.com/komma-softhouse/Verifactu-PHP).

En apenas 25 líneas de código y con un tiempo de ejecución inferior a 0,4 µs es posible generar, firmar y exportar una factura electrónica totalmente válida:

```
$fac = new Facturae();
$fac->setNumber('FAC201804', '123');
$fac->setIssueDate('2018-04-01');

$fac->setSeller(new FacturaeParty([
  "taxNumber" => "A00000000",
  "name"      => "Perico de los Palotes S.A.",
  "address"   => "C/ Falsa, 123",
  "postCode"  => "12345",
  "town"      => "Madrid",
  "province"  => "Madrid"
]));
$fac->setBuyer(new FacturaeParty([
  "isLegalEntity" => false,
  "taxNumber"     => "00000000A",
  "name"          => "Antonio",
  "firstSurname"  => "García",
  "lastSurname"   => "Pérez",
  "address"       => "Avda. Mayor, 7",
  "postCode"      => "54321",
  "town"          => "Madrid",
  "province"      => "Madrid"
]));

$fac->addItem("Lámpara de pie", 20.14, 3, Facturae::TAX_IVA, 21);

$fac->sign("certificado.pfx", null, "passphrase");
$fac->export("mi-factura.xsig");
```

También permite firmar facturas que hayan sido generadas con otro programa:

```
$signer = new FacturaeSigner();
$signer->loadPkcs12("certificado.pfx", "passphrase");

$xml = file_get_contents(__DIR__ . "/factura.xml");
$signedXml = $signer->sign($xml);
file_put_contents(__DIR__ . "/factura.xsig", $signedXml);
```

Requisitos
----------

[](#requisitos)

- PHP 8.2 o superior
- OpenSSL (solo para firmar facturas)
- cURL (solo para *timestamping* y FACe / FACeB2B)
- libXML (solo para FACe y FACeB2B)

Características
---------------

[](#características)

- Generación de facturas 100% conformes con la [Ley 25/2013 del 27 de diciembre](https://www.boe.es/diario_boe/txt.php?id=BOE-A-2013-13722)
- Exportación según las versiones de formato [3.2, 3.2.1 y 3.2.2](http://www.facturae.gob.es/formato/Paginas/version-3-2.aspx) de Facturae
- Firmado de acuerdo a la [política de firma de Facturae 3.1](http://www.facturae.gob.es/formato/Paginas/politicas-firma-electronica.aspx) basada en XAdES
- Sellado de tiempo según el [RFC3161](https://www.ietf.org/rfc/rfc3161.txt)
- Envío automatizado de facturas a **FACe y FACeB2B** 🔥

Usan Facturae-PHP
-----------------

[](#usan-facturae-php)

Estas son algunas de las organizaciones y soluciones software que usan Facturae-PHP o mantienen un fork interno basado en el código de la librería:

[![Holded](https://camo.githubusercontent.com/0b921fd60348335c3f5c1250bec401c554df08f45438ef7e84545db4c74d8b7d/68747470733a2f2f692e696d6775722e636f6d2f7a7164517350412e706e67)](https://www.holded.com/)[![hotelgest](https://camo.githubusercontent.com/633c818e448769566141743070cd7d95af0d5e5f2d29571c46c9823eb537143e/68747470733a2f2f692e696d6775722e636f6d2f6879754b414f742e706e67)](https://hotelgest.com/)[![InvoiceNinja](https://camo.githubusercontent.com/53f99511201ca18054756686b79f6db54d85b6bbd3b0245048463129a28ba377/68747470733a2f2f692e696d6775722e636f6d2f795372794155412e706e67)](https://invoiceninja.com/)[![FacturaScripts](https://camo.githubusercontent.com/cb442c39c9f379ed5212bd591612a7db39e2ce2bb8da3d459432d9c593123c2d/68747470733a2f2f692e696d6775722e636f6d2f55506e555643442e706e67)](https://facturascripts.com/)

Licencia
--------

[](#licencia)

Facturae-PHP se encuentra bajo [licencia MIT](LICENSE). Eso implica que puedes utilizar este paquete en cualquier proyecto (incluso con fines comerciales), siempre y cuando hagas referencia al uso y autoría de la misma.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance100

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1172636?v=4)[KOMMA - RDF object mapper and editing framework for Java](/maintainers/komma)[@komma](https://github.com/komma)

---

Top Contributors

[![edeoliv](https://avatars.githubusercontent.com/u/76831154?v=4)](https://github.com/edeoliv "edeoliv (1 commits)")

---

Tags

facefacturaexadesfaceb2b

### Embed Badge

![Health badge](/badges/komma-softhouse-facturae-engine/health.svg)

```
[![Health](https://phpackages.com/badges/komma-softhouse-facturae-engine/health.svg)](https://phpackages.com/packages/komma-softhouse-facturae-engine)
```

###  Alternatives

[josemmo/facturae-php

Librería para la generación, firma y envío de facturas electrónicas

285648.1k4](/packages/josemmo-facturae-php)[jordikroon/google-vision

Google Vision Api for PHP (https://cloud.google.com/vision/)

6277.8k1](/packages/jordikroon-google-vision)[lyquidity/xml-signer

A PHP to create and verify XAdES signature

2174.7k2](/packages/lyquidity-xml-signer)

PHPackages © 2026

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