PHPackages                             fvalencial/begrandafe - 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. [API Development](/categories/api)
4. /
5. fvalencial/begrandafe

ActiveLibrary[API Development](/categories/api)

fvalencial/begrandafe
=====================

Envía facturas electrónicas al api de Begranda para DIAN

0.1.5(7y ago)1162[3 issues](https://github.com/fvalenciabg/begrandafe/issues)MITPHPPHP &gt;=5.5.9

Since Jul 5Pushed 7y agoCompare

[ Source](https://github.com/fvalenciabg/begrandafe)[ Packagist](https://packagist.org/packages/fvalencial/begrandafe)[ RSS](/packages/fvalencial-begrandafe/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (8)Used By (0)

Begranda facturación electrónica
================================

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

Habilita enviar facturas electrónicas a la DIAN por medio del API de Begranda

Acerca de
---------

[](#acerca-de)

[![Packagist](https://camo.githubusercontent.com/563892424be28f9bb4f0aa2892fbcf1664ad88a612e55fd8a736dd402aa00e56/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6676616c656e6369616c2f62656772616e646166652e7376673f6c6162656c3d5061636b6167697374267374796c653d666c61742d737175617265)](https://packagist.org/packages/fvalencial/begrandafe)[![StyleCI](https://camo.githubusercontent.com/1ebe7374ffa9b7311c3449cf349f7b6f2d91983dfe736d3967074fda9fab3e65/68747470733a2f2f7374796c6563692e696f2f7265706f732f39333331333430322f736869656c64)](https://styleci.io/repos/93313402)[![License](https://camo.githubusercontent.com/5d45cca5d636e0ee1bb72e7804057cfe60b0a03cc77dd5a15626f76eaea961ed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6676616c656e6369616c2f62656772616e646166652e7376673f6c6162656c3d4c6963656e7365267374796c653d666c61742d737175617265)](https://github.com/fvalencial/begrandafe/blob/develop/LICENSE)

Usando la libería en PHP de begranda, podrás enviar facturas electronicas a la DIAN de una forma sencilla y limpia

### Requerimientos

[](#requerimientos)

- php &gt;= 5.6
- [Llave de Begranda](https://begranda.com) -Llave de acceso para enviar tus facturas

### Instalación con Composer

[](#instalación-con-composer)

Ejecuta `composer require fvalenciabg/begrandafe`.

### Enviar una factura

[](#enviar-una-factura)

El proceso para enviar una factura electronica simple

```
$endpoint = getenv("BG_ENDPOINT");
$key = getenv("BG_KEY");

$invoice = new Invoice($endpoint,$key);
$datetime = date("Y-m-d h:i:s");
$invoice->
    setInvoice("990000072")->
    setSeller([
        "nit"=>"3534533",
        "name"=>"Vendedor",
        "location"=>[
            "address"=>"Cl 46 AA 43",
            "countryCode"=>"CO",
            "city"=>"Medellín",
            "subdivission"=>"Poblado",
            "department"=>"Antioquia"
        ]
    ])->
    setDate($datetime)->
    setBase(100000.00)->
    setTotal(119000.00)->
    setIva(19000.00)->
    setIca(0)->
    setIpo(0)->
    setPaymentMethod(10)->
    setPaymentChannel(9)->
    setAuthorizationNumber("9000000123303363")->
    setAuthorizationPeriod("2018-05-05","2028-05-05")->
    setAuthorizationInvoiceFrom(990000000)->
    setAuthorizationInvoiceTo(995000000)->
    setBuyer([
        "nit"=>"45747373",
        "name"=>"Comprador",
        "type"=>31,
        "location"=>[
            "address"=>"CR 33 56 34",
            "countryCode"=>"CO",
            "city"=>"Medellin",
            "subdivission"=>"Belen",
            "department"=>"Antioquia"
        ]
    ]);
$invoice->send();

```

### Dudas

[](#dudas)

Si tienes dudas o inconveninentes no dudes en escribirnos a .

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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

Every ~1 days

Total

6

Last Release

2910d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/35342893?v=4)[Fredy Valencia](/maintainers/fvalenciabg)[@fvalenciabg](https://github.com/fvalenciabg)

---

Top Contributors

[![fvalenciabg](https://avatars.githubusercontent.com/u/35342893?v=4)](https://github.com/fvalenciabg "fvalenciabg (11 commits)")

---

Tags

colombiadianelectronicafacturacionphp

### Embed Badge

![Health badge](/badges/fvalencial-begrandafe/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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