PHPackages                             osktgui/greenterose - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. osktgui/greenterose

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

osktgui/greenterose
===================

Implementación de la Facturacion Electrónica SUNAT - Perú

v3.0.0(7y ago)056MITPHPPHP &gt;=5.5.9

Since Jul 27Pushed 6y agoCompare

[ Source](https://github.com/osktgui/greenter)[ Packagist](https://packagist.org/packages/osktgui/greenterose)[ Docs](https://github.com/giansalex/greenter)[ RSS](/packages/osktgui-greenterose/feed)WikiDiscussions master Synced 4d ago

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

[![Greenter](docs/img/logo.png)](docs/img/logo.png)[![](https://raw.githubusercontent.com/giansalex/greenter/master/docs/img/sunat.ico)](https://raw.githubusercontent.com/giansalex/greenter/master/docs/img/sunat.ico)

Greenter - Facturación Electrónica
==================================

[](#greenter---facturación-electrónica)

[![Travis-CI](https://camo.githubusercontent.com/909de7d08824fa981cb0a6b7ea04925a6c6b3d48d72344f7752d465398923bf2/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6769616e73616c65782f677265656e7465722e7376673f6c6162656c3d7472617669732d6369266272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://travis-ci.org/giansalex/greenter)[![Coverage Status](https://camo.githubusercontent.com/54ad55f53c7e2b5c3a4b81b83eac3ee2797b391f94f18d12e1ff1b6d51442dcb/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6769616e73616c65782f677265656e7465722e7376673f6c6162656c3d636f766572616c6c73267374796c653d666c61742d737175617265266272616e63683d6d6173746572)](https://coveralls.io/github/giansalex/greenter?branch=master)[![Codacy Badge](https://camo.githubusercontent.com/0febeaca5dd4ee09550568f5038b038559aa85142638cbc395a69f9551b456b9/68747470733a2f2f696d672e736869656c64732e696f2f636f646163792f67726164652f65636364356131366430333534363463626534306231636639643066396634332e7376673f7374796c653d666c61742d737175617265)](https://www.codacy.com/app/giansalex/greenter?utm_source=github.com&utm_medium=referral&utm_content=giansalex/greenter&utm_campaign=Badge_Grade)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7eec40459a8633be9ecfbe0ee242967161b30ca80cff1f714cc3a037bdb12e30/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6769616e73616c65782f677265656e7465722e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/giansalex/greenter/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/22da5b7e3e413ac2e5f29936ddc99c21ba7263a9692fa76f40512262a23cbd59/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6769616e73616c65782f677265656e7465722e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/giansalex/greenter/?branch=master)[![Build Status](https://camo.githubusercontent.com/f69e43931041070dac8f3924cac59a9b1c0331e4b8dd65ccf98792379eaf2b23/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f6769616e73616c65782f677265656e7465722e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/giansalex/greenter/build-status/master)[![Maintainability](https://camo.githubusercontent.com/82f76ff0df43c4233bf1cc564cfb8512cc81608afcf772a05d6f073f7acf0e22/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f34636634323865323862613461653666623233342f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/giansalex/greenter)[![Packagist](https://camo.githubusercontent.com/ffb5312101e09d93b01ee94fdb6054f80f47a9a9717cbf8e0d7bafb1a9ef9ff7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f677265656e7465722f677265656e7465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/greenter/greenter)
Esta libreria le permite realizar la implementación de la **Facturación Electrónica** en Perú, desde los sistemas desarrollados por el contribuyente, la cual esta normado por SUNAT.
Greenter realiza la mayoria de tareas del proceso, genera el XML según el estándar UBL, firma con el certificado digital que sunat exige, comprime el archivo XML en formato zip, conexión al webservice de SUNAT y procesa el CDR (Comprobante de Recepción).

[![Throughput Graph](https://camo.githubusercontent.com/6f78e1b612cb58388488117f7c0ca44a4bbaf7d611929ac92a91952d34ba4c61/68747470733a2f2f6772617068732e776166666c652e696f2f6769616e73616c65782f677265656e7465722f7468726f7567687075742e737667)](https://waffle.io/giansalex/greenter/metrics/throughput)

Requerimientos
--------------

[](#requerimientos)

- PHP 5.6 o superior
- Extensiones PHP Activadas: `soap`, `dom`, `zip`, `zlib`, `openssl`.

Instalar
--------

[](#instalar)

```
composer require greenter/greenter
```

Puede ver una demostración en [Greenter Sampple](https://github.com/giansalex/greenter-sample).

Caracteristicas
---------------

[](#caracteristicas)

### Documentos Soportados.

[](#documentos-soportados)

- Factura Electrónica
- Boleta Electrónica
- Nota de Crédito Electrónica
- Nota de Débito Electrónica
- Resumen Diario de Boletas
- Comunicación de Bajas
- Guia Remisión Electrónica
- Retención Electrónica
- Percepción Electrónica
- Resumen de Reversiones

[![paypal](https://camo.githubusercontent.com/e1ff554a09e8e92bef25abc553ff05b88f45afd695877cf12f3a46558ef65b2e/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f656e5f55532f692f62746e2f62746e5f646f6e61746543435f4c472e676966)](https://paypal.me/giansalex)

> También puedes contactarte vía correo.

### API

[](#api)

- [Api Reference](https://giansalex.github.io/greenter-apidoc/)

### Web Services

[](#web-services)

- Envío y empaquetado de los comprobantes electrónicos
- Consulta de tickets (Resumen diario, Comunicación de Bajas)
- Consulta de Cdr

### XML

[](#xml)

- Estandar UBL v2.0, v2.1
- Firma con certificado digital

### Representación Impresa.

[](#representación-impresa)

- Generación de [HTML Report](https://github.com/giansalex/greenter-report)
- Generación de [PDF](https://github.com/giansalex/greenter-htmltopdf)

### API REST

[](#api-rest)

API REST con [Lycet](https://github.com/giansalex/lycet) empleando Symfony Framework.

### Librerias Relacionadas

[](#librerias-relacionadas)

- [greenter/report](https://github.com/giansalex/greenter-report)
- [greenter/htmltopdf](https://github.com/giansalex/greenter-htmltopdf)
- [greenter/validator](https://github.com/giansalex/greenter-validator)
- [greenter/ubl-validator](https://github.com/giansalex/ubl-validator)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 99.2% 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 ~26 days

Recently: every ~68 days

Total

18

Last Release

2770d ago

Major Versions

v1.0.3 → v2.0.02017-11-13

v2.1.3 → v3.0.02018-10-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/f38da0549ab79e66c5247777fe0bc43baad35e53fa01276a24f6f0d5cbedf01b?d=identicon)[osktgui](/maintainers/osktgui)

---

Top Contributors

[![giansalex](https://avatars.githubusercontent.com/u/14926587?v=4)](https://github.com/giansalex "giansalex (234 commits)")[![thefantas](https://avatars.githubusercontent.com/u/2816602?v=4)](https://github.com/thefantas "thefantas (2 commits)")

---

Tags

xmlfacturacion-electronicasunatubl21ubl20

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/osktgui-greenterose/health.svg)

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

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[jms/serializer

Library for (de-)serializing data of any complexity; supports XML, and JSON.

2.3k135.8M851](/packages/jms-serializer)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[sabre/xml

sabre/xml is an XML library that you may not hate.

52832.2M131](/packages/sabre-xml)[greenter/xml

XML generación de documentos electrónicos, Facturacion Electrónica SUNAT - Perú

1151.0k3](/packages/greenter-xml)

PHPackages © 2026

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