PHPackages                             danider96/facturae-php - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. danider96/facturae-php

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

danider96/facturae-php
======================

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

v1.7.2(3y ago)050MITPHPPHP &gt;=5.6

Since Sep 9Pushed 3y agoCompare

[ Source](https://github.com/danider96/Facturae-PHP)[ Packagist](https://packagist.org/packages/danider96/facturae-php)[ Docs](https://github.com/josemmo/Facturae-PHP)[ RSS](/packages/danider96-facturae-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (29)Used By (0)

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

[](#facturae-php)

[![CI](https://github.com/josemmo/Facturae-PHP/workflows/Tests/badge.svg)](https://github.com/josemmo/Facturae-PHP/actions)[![Codacy Badge](https://camo.githubusercontent.com/4623f89b58ac4467b3545a4ca6360c4c7991a42a8d8539e7a94e5799f7ac45ba/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3763343564356562646639613465383862306665366230653132643732306231)](https://www.codacy.com/gh/josemmo/Facturae-PHP)[![Coverage](https://camo.githubusercontent.com/4467a85b67444201349e7f49561908a414ce1d6b64040aa76611cb8b82a4497d/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f436f7665726167652f3763343564356562646639613465383862306665366230653132643732306231)](https://www.codacy.com/gh/josemmo/Facturae-PHP)[![Última versión estable](https://camo.githubusercontent.com/e61c8aed802852d3bbc5c575f2a3e841a1d37f5530f258ecf27160f50d82136e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f73656d6d6f2f66616374757261652d706870)](https://packagist.org/packages/josemmo/facturae-php)[![Versión de PHP](https://camo.githubusercontent.com/3192874d97d805a8a817f9eac68b545fb08d9b295cb34531bc9ec172d002b106/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344352e36253230253743253743253230253345253344372e30253230253743253743253230253345253344382e302d383839324246)](composer.json)[![Documentación](https://camo.githubusercontent.com/c504b03100248d94785837215ba7cbe69e3ca7d1b9ddc0047ab147b6adac7ff1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63732d6f6e6c696e652d626c75652e7376673f6c6f6e6743616368653d74727565)](https://josemmo.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.

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");
```

Requisitos
----------

[](#requisitos)

- PHP 5.6 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** 🔥

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

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 90.6% 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 ~66 days

Recently: every ~101 days

Total

27

Last Release

1455d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0106f7cd1f259f42441c202e2b4a00b1931e830516305709a5a54046f55c7d48?d=identicon)[danider96](/maintainers/danider96)

---

Top Contributors

[![josemmo](https://avatars.githubusercontent.com/u/4470267?v=4)](https://github.com/josemmo "josemmo (221 commits)")[![danider96](https://avatars.githubusercontent.com/u/39597187?v=4)](https://github.com/danider96 "danider96 (5 commits)")[![alphp](https://avatars.githubusercontent.com/u/8992091?v=4)](https://github.com/alphp "alphp (5 commits)")[![KaiserVito](https://avatars.githubusercontent.com/u/7655604?v=4)](https://github.com/KaiserVito "KaiserVito (5 commits)")[![txusms](https://avatars.githubusercontent.com/u/804715?v=4)](https://github.com/txusms "txusms (3 commits)")[![PhoneixS](https://avatars.githubusercontent.com/u/1279539?v=4)](https://github.com/PhoneixS "PhoneixS (2 commits)")[![ct2glx](https://avatars.githubusercontent.com/u/4106464?v=4)](https://github.com/ct2glx "ct2glx (1 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")[![duhow](https://avatars.githubusercontent.com/u/1145001?v=4)](https://github.com/duhow "duhow (1 commits)")

---

Tags

facefacturaexadesfaceb2b

### Embed Badge

![Health badge](/badges/danider96-facturae-php/health.svg)

```
[![Health](https://phpackages.com/badges/danider96-facturae-php/health.svg)](https://phpackages.com/packages/danider96-facturae-php)
```

###  Alternatives

[josemmo/facturae-php

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

286522.9k1](/packages/josemmo-facturae-php)[phpoffice/phpspreadsheet

PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine

13.9k293.5M1.3k](/packages/phpoffice-phpspreadsheet)[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[smalot/pdfparser

Pdf parser library. Can read and extract information from pdf file.

2.7k34.5M216](/packages/smalot-pdfparser)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.1k57.6M131](/packages/openspout-openspout)

PHPackages © 2026

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