PHPackages                             eclipxe/cfdiutils - 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. eclipxe/cfdiutils

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

eclipxe/cfdiutils
=================

PHP Common utilities for Mexican CFDI 3.2, 3.3 &amp; 4.0

v3.0.2(2mo ago)141129.9k↑33.7%53[1 issues](https://github.com/eclipxe13/CfdiUtils/issues)5MITPHPPHP &gt;=8.0CI passing

Since Sep 27Pushed 2mo ago18 watchersCompare

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

READMEChangelog (10)Dependencies (10)Versions (99)Used By (5)

eclipxe/CfdiUtils
=================

[](#eclipxecfdiutils)

[![Source Code](https://camo.githubusercontent.com/acaa5b82ad8f54a0c618b7dab978b0a676660a114e4a16ae4c8c207d99c96809/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d65636c6970786531332f436664695574696c732d626c75653f6c6f676f3d676974687562)](https://github.com/eclipxe13/CfdiUtils)[![Discord](https://camo.githubusercontent.com/e7d280832b4bb781e0e83dc7b04440636ea6a67d076133da0938b79caab9d6dd/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f3435393836303535343039303238333031393f6c6f676f3d646973636f7264)](https://discord.gg/aFGYXvX)[![Packagist PHP Version Support](https://camo.githubusercontent.com/ead58176c9ba3a74112f31b9ed780ea6d2ed48e4c9f0c7f73c757a8194594447/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f65636c697078652f636664697574696c733f6c6f676f3d706870)](https://packagist.org/packages/eclipxe/cfdiutils)[![Latest Version](https://camo.githubusercontent.com/de836ba9b0936de19cbfab44921e23182fe42a26dd201346420ddd596c2d3119/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f65636c6970786531332f436664695574696c733f6c6f676f3d676974)](https://github.com/eclipxe13/CfdiUtils/releases)[![Software License](https://camo.githubusercontent.com/d840a9e0559aa81cf33a5f0bfed3dff3a744f0a645114a646c8cccbd8019b0e6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f65636c6970786531332f436664695574696c733f6c6f676f3d6f70656e2d736f757263652d696e6974696174697665)](https://github.com/eclipxe13/CfdiUtils/blob/master/LICENSE)[![Build Status](https://camo.githubusercontent.com/16cf82927a106a29589ea73afba06b635d1000696d983483c39a856e7143fec1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f65636c6970786531332f436664695574696c732f6275696c642e796d6c3f6272616e63683d6d6173746572266c6f676f3d6769746875622d616374696f6e73)](https://github.com/eclipxe13/CfdiUtils/actions/workflows/build.yml?query=branch:master)[![Reliability](https://camo.githubusercontent.com/52b4a6326401e3fdfc03e8d8993fab3e7ab311243c284a0fa7bba8d05a09ae77/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d65636c6970786531335f636664697574696c73266d65747269633d72656c696162696c6974795f726174696e67)](https://sonarcloud.io/component_measures?id=eclipxe13_cfdiutils&metric=Reliability)[![Maintainability](https://camo.githubusercontent.com/f16ceed3ce67c67e860b1b52e5260ac6a38f2859171a70ba5dd36be73e0b8cd8/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d65636c6970786531335f636664697574696c73266d65747269633d7371616c655f726174696e67)](https://sonarcloud.io/component_measures?id=eclipxe13_cfdiutils&metric=Maintainability)[![Code Coverage](https://camo.githubusercontent.com/51047b3b58a5bd3eb2a5ed42c4c0749893000c4f0d510e07a623df1973459cb6/68747470733a2f2f696d672e736869656c64732e696f2f736f6e61722f636f7665726167652f65636c6970786531335f636664697574696c732f6d61737465723f6c6f676f3d736f6e6172636c6f7564267365727665723d6874747073253341253246253246736f6e6172636c6f75642e696f)](https://sonarcloud.io/component_measures?id=eclipxe13_cfdiutils&metric=Coverage)[![Violations](https://camo.githubusercontent.com/c4e406226aaa11c2af0670c89206116a024836144280123f31c173d97480c621/68747470733a2f2f696d672e736869656c64732e696f2f736f6e61722f76696f6c6174696f6e732f65636c6970786531335f636664697574696c732f6d61737465723f666f726d61743d6c6f6e67266c6f676f3d736f6e6172636c6f7564267365727665723d6874747073253341253246253246736f6e6172636c6f75642e696f)](https://sonarcloud.io/project/issues?id=eclipxe13_cfdiutils&resolved=false)[![Source Code](https://camo.githubusercontent.com/40d64b718790ba6cfdcfae46ac7cd93da057285303514f8f41bd839f3541b522/68747470733a2f2f696d672e736869656c64732e696f2f72656164746865646f63732f636664697574696c732f6c61746573743f6c6f676f3d726561642d7468652d646f6373)](https://cfdiutils.readthedocs.io/)[![Total Downloads](https://camo.githubusercontent.com/b3c717e3bd7a2ef87258f8db173e9fa2744f932cc540aba5d65c171bb7062b6f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f65636c697078652f436664695574696c733f6c6f676f3d636f6d706f736572)](https://packagist.org/packages/eclipxe/CfdiUtils)

> PHP Common utilities for Mexican CFDI 3.2, 3.3 &amp; 4.0.

This library provides helper objects to work with Mexican CFDI (Comprobante Fiscal Digital por Internet).

🇲🇽 Visita la **documentación en español** de esta librería en [Read the docs](https://cfdiutils.readthedocs.io/). También te esperamos en el canal [\#phpcfdi de discord](https://discord.gg/aFGYXvX).

The documentation related to this library and its API is on [Read the docs](https://cfdiutils.readthedocs.io/). It is written in **spanish language** since is the language of the intended audience.

**Nota: Este proyecto será migrado a `phpcfdi/cfdiutils`, aún no tenemos fecha planeada**

No olvides visitar  donde contamos con muchas más librerías relacionadas con CFDI y herramientas del SAT. Y próximamente el lugar donde publicaremos la versión `4.x`.

Main features
-------------

[](#main-features)

- Create CFDI version 3.3 &amp; 4.0 based on a friendly extendable non XML objects (`nodes`).
- Read CFDI version 3.2, 3.3 &amp; 4.0.
- Validate CFDI version 3.3 &amp; 4.0 against schemas, CFDI signature (`Sello`) and custom rules.
- Validate that the Timbre Fiscal Digital signature match with the CFDI 3.3 &amp; CFDI 4.0. If signature doesn't match, then the document has been modified after sealed.
- Helper objects to deal with:
    - `Cadena de origen` generation.
    - Extract information from CER files or `Certificado` attribute.
    - Calculate `Comprobante` sums based on the list of `Conceptos`.
    - Retrieve the CFDI version information.
- Keep a local copy of the tree of XSD and XSLT file dependencies from SAT.
- Keep a local copy of certificates to avoid download them each time.
- Check the SAT WebService to get the status of a CFDI (*`Estado`*, *`EsCancelable`*, *`EstatusCancelacion`* and *`EFOS`*) without WSDL.

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

[](#installation)

Use [composer](https://getcomposer.org/), so please run

```
composer require eclipxe/cfdiutils
```

Major versions
--------------

[](#major-versions)

- Version 1.x **deprecated** was deprecated time ago, that version didn't do much anyway.
- Version 2.x **deprecated** has a lot of features and helper objects.
- Version 3.x **current** is a maintenance release for compatibility with PHP 8.4.
- Version 4.x **future** will be released with backward compatibility breaks.
    - See [docs/CHANGELOG.md](docs/CHANGELOG.md) for backward compatibility breaks.
    - It may change to PHP 8.2.
    - It could be possible to migrate to `phpcfdi/cfdi-utils` under [phpCfdi](https://github.com/phpCfdi) organization.

PHP Support
-----------

[](#php-support)

This library is compatible with **PHP 8.0 and above**. Please, try to use the language's full potential.

The intended support is to be aligned with the oldest *Active support* PHP Branch. See  for more details.

CfdiUtilsPHP Supported versionsSince1.07.0, 7.12017-09-272.07.0, 7.12018-01-012.0.17.0, 7.1, 7.22018-01-032.8.17.0, 7.1, 7.2, 7.32019-03-052.12.77.0, 7.1, 7.2, 7.3, 7.42019-12-042.15.07.3, 7.4, 8.02021-03-172.20.17.3, 7.4, 8.0, 8.12022-03-082.23.57.3, 7.4, 8.0, 8.1, 8.2, 8.32023-05-263.0.08.0, 8.1, 8.2, 8.3, 8.42025-03-18Contributing
------------

[](#contributing)

Contributions are welcome! Please read [CONTRIBUTING](https://github.com/eclipxe13/CfdiUtils/blob/master/CONTRIBUTING.md) for details and don't forget to take a look in the [TODO](https://github.com/eclipxe13/CfdiUtils/blob/master/docs/TODO.md) and [CHANGELOG](https://github.com/eclipxe13/CfdiUtils/blob/master/docs/CHANGELOG.md) files.

Copyright and License
---------------------

[](#copyright-and-license)

The `eclipxe/CfdiUtils` library is copyright © [Carlos C Soto](http://eclipxe.com.mx/)and licensed for use under the MIT License (MIT). Please see [LICENSE](https://github.com/eclipxe13/CfdiUtils/blob/master/LICENSE) for more information.

###  Health Score

67

—

FairBetter than 100% of packages

Maintenance87

Actively maintained with recent releases

Popularity51

Moderate usage in the ecosystem

Community33

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 92.1% 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 ~33 days

Recently: every ~98 days

Total

94

Last Release

62d ago

Major Versions

v1.0.3 → v2.0.02018-01-03

v2.15.1 → v3.x-dev2021-11-04

v2.31.0 → v3.0.02025-03-19

PHP version history (4 changes)v1.0.0PHP &gt;=7.0

v2.15.0PHP &gt;=7.3

v2.30.0PHP &gt;=7.3 &lt;8.4

v3.0.0PHP &gt;=8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/66964609?v=4)[eclipxe](/maintainers/eclipxe)[@Eclipxe](https://github.com/Eclipxe)

---

Top Contributors

[![eclipxe13](https://avatars.githubusercontent.com/u/1266852?v=4)](https://github.com/eclipxe13 "eclipxe13 (1339 commits)")[![driftking301](https://avatars.githubusercontent.com/u/15268559?v=4)](https://github.com/driftking301 "driftking301 (63 commits)")[![ircsasw](https://avatars.githubusercontent.com/u/919978?v=4)](https://github.com/ircsasw "ircsasw (12 commits)")[![celli33](https://avatars.githubusercontent.com/u/23373649?v=4)](https://github.com/celli33 "celli33 (10 commits)")[![EmmanuelJCS](https://avatars.githubusercontent.com/u/74549460?v=4)](https://github.com/EmmanuelJCS "EmmanuelJCS (7 commits)")[![Ahuahuachi](https://avatars.githubusercontent.com/u/8353891?v=4)](https://github.com/Ahuahuachi "Ahuahuachi (6 commits)")[![alejandrogova1](https://avatars.githubusercontent.com/u/5102889?v=4)](https://github.com/alejandrogova1 "alejandrogova1 (6 commits)")[![gam04](https://avatars.githubusercontent.com/u/47505661?v=4)](https://github.com/gam04 "gam04 (4 commits)")[![blacktrue](https://avatars.githubusercontent.com/u/15004512?v=4)](https://github.com/blacktrue "blacktrue (3 commits)")[![ramboram](https://avatars.githubusercontent.com/u/2716685?v=4)](https://github.com/ramboram "ramboram (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![AndreyPootMay](https://avatars.githubusercontent.com/u/28898216?v=4)](https://github.com/AndreyPootMay "AndreyPootMay (1 commits)")

---

Tags

cfdihacktoberfestmexicosatelectronic invoicecfdimexicocfdi33cfdi40

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eclipxe-cfdiutils/health.svg)

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

###  Alternatives

[phpcfdi/cfdi-sat-scraper

Web Scraping para extraer facturas electrónicas desde la página del SAT

9018.0k](/packages/phpcfdi-cfdi-sat-scraper)[phpcfdi/cfdi-cleaner

Clean up Mexican CFDI

1334.1k1](/packages/phpcfdi-cfdi-cleaner)[phpcfdi/rfc

PHP library to deal with Mexican RFC

2562.4k3](/packages/phpcfdi-rfc)[phpcfdi/xml-cancelacion

Genera documentos de cancelación de CFDI firmados (XMLSEC)

1149.5k4](/packages/phpcfdi-xml-cancelacion)[phpcfdi/sat-catalogos

Catálogos de SAT para CFDI 3.3, CFDI 4.0 y Nómina 1.2

304.6k24](/packages/phpcfdi-sat-catalogos)

PHPackages © 2026

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