PHPackages                             strappberry/facturama-laravel - 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. strappberry/facturama-laravel

ActiveLibrary[API Development](/categories/api)

strappberry/facturama-laravel
=============================

Wrapper del SDK de Facturama para Laravel

v1.4.4(2y ago)12763MITPHP

Since Aug 19Pushed 2y ago2 watchersCompare

[ Source](https://github.com/strappberry/facturama-laravel)[ Packagist](https://packagist.org/packages/strappberry/facturama-laravel)[ Fund](https://paypal.me/strappberry)[ RSS](/packages/strappberry-facturama-laravel/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (1)Versions (10)Used By (0)

Facturama Laravel
=================

[](#facturama-laravel)

Configuración
-------------

[](#configuración)

Variables que puede ajustar en el archivo de entorno **.env**

VARIABLEDefaultDescripciónFACTURAMA\_SANDBOXtrueIndica si se encuentra en entorno de desarrollo. Valores admitidos: true, falseFACTURAMA\_PRODUCTION\_ENDPOINTUrl de la api de producción de facturamaFACTURAMA\_SANDBOX\_ENDPOINTUrl de la api de pruebas de facturamaFACTURAMA\_USERNAMEpruebasUsuario de pruebas de facturama ver documentació del entorno de pruebas de facturanaFACTURAMA\_PASSWORDpruebas2011Contraseña del usuario de pruebas de facturama### Publicar archivo de configuración

[](#publicar-archivo-de-configuración)

```
php artisan vendor:publish --tag="facturama-laravel"
```

Referencia api
==============

[](#referencia-api)

[https://apisandbox.facturama.mx](https://apisandbox.facturama.mx/docs/api/POST-2-cfdis)

\#Introducción

```
// Instancia Laravel Facturama
$api = new \Strappberry\FacturamaLaravel\Classes\ApiFacturama();
// Obtener instancia de api web
$apiWeb = $api->web();
// Obtener instancia de api multiemisor
$apiMultiemisor = $api->multiemisor();
```

Api Web
=======

[](#api-web)

Emitir factura
--------------

[](#emitir-factura)

```
// Ejemplo tomado de la documenctación de la api de facturama
$datosAFacturar = [
  "Serie" => "R",
  "Currency" => "MXN",
  "ExpeditionPlace" => "78116",
  "PaymentConditions" => "CREDITO A SIETE DIAS",
  "Folio" => "100",
  "CfdiType" => "I",
  "PaymentForm" => "03",
  "PaymentMethod" => "PUE",
  "Receiver" => [
    "Rfc" => "XAXX010101000",
    "Name" => "Público en general",
    "CfdiUse" => "P01",
  ],
  "Items" => [
    [
      "ProductCode" => "10101504",
      "IdentificationNumber" => "EDL",
      "Description" => "Estudios de viabilidad",
      "Unit" => "NO APLICA",
      "UnitCode" => "MTS",
      "UnitPrice" => 50.0,
      "Quantity" => 2.0,
      "Subtotal" => 100.0,
      "Taxes" => [
        [
          "Total" => 16.0,
          "Name" => "IVA",
          "Base" => 100.0,
          "Rate" => 0.16,
          "IsRetention" => false,
        ],
      ],
      "Total" => 116.0,
    ],
    [
      "ProductCode" => "10101504",
      "IdentificationNumber" => "001",
      "Description" => "SERVICIO DE COLOCACION",
      "Unit" => "NO APLICA",
      "UnitCode" => "E49",
      "UnitPrice" => 100.0,
      "Quantity" => 15.0,
      "Subtotal" => 1500.0,
      "Discount" => 0.0,
      "Taxes" => [
        [
          "Total" => 240.0,
          "Name" => "IVA",
          "Base" => 1500.0,
          "Rate" => 0.16,
          "IsRetention" => false,
        ],
      ],
      "Total" => 1740.0,
    ],
  ],
];

// Solicitamos la generación de la factura y el timbrado
$resultado = $apiWeb->emitirCfdi($datosAFacturar)
```

Api Multiemisor
===============

[](#api-multiemisor)

Subir archivos CSD
------------------

[](#subir-archivos-csd)

```
use Strappberry\FacturamaLaravel\Classes\CertificadoSelloDigital;

// Crear objeto con los datos del Certificado de Sello Digital
$csd = new CertificadoSelloDigital();
$csd->agregarRFC('RFC del CSD');
$csd->agregarCertificado(
    base64_encode(file_get_contents("/ruta/a/archivo.key"))
);
$csd->agregarLlavePrivada(
    base64_encode(file_get_contents("/ruta/a/archivo.key"))
);
$csd->agregarPasswordDeLlavePrivada('contraseña del csd');

$apiMultiemisor->agregarNuevoCertificado($csd);
```

Actualizar archivos CSD
-----------------------

[](#actualizar-archivos-csd)

```
use Strappberry\FacturamaLaravel\Classes\CertificadoSelloDigital;

// Crear objeto con los datos del Certificado de Sello Digital
$csd = new CertificadoSelloDigital();
$csd->agregarRFC('RFC del CSD');
$csd->agregarCertificado(
    base64_encode(file_get_contents("/ruta/a/archivo.key"))
);
$csd->agregarLlavePrivada(
    base64_encode(file_get_contents("/ruta/a/archivo.key"))
);
$csd->agregarPasswordDeLlavePrivada('contraseña del csd');

$apiMultiemisor->actualizarCertificado($csd);
```

Emitir factura
==============

[](#emitir-factura-1)

```
// Ejemplo tomado de la documenctación de la api de facturama
// Es importante agregar la clave Issuer
$datosAFacturar = [
  "Serie" => "R",
  "Currency" => "MXN",
  "ExpeditionPlace" => "78116",
  "PaymentConditions" => "CREDITO A SIETE DIAS",
  "Folio" => "100",
  "CfdiType" => "I",
  "PaymentForm" => "03",
  "PaymentMethod" => "PUE",
  "Issuer"=> [
        "FiscalRegime"=> "601",
        "Rfc"=> "RFC con el que desea timbrar",
        "Name"=> "Nombre del emisor"
  ],
  "Receiver" => [
    "Rfc" => "XAXX010101000",
    "Name" => "Público en general",
    "CfdiUse" => "P01",
  ],
  "Items" => [
    [
      "ProductCode" => "10101504",
      "IdentificationNumber" => "EDL",
      "Description" => "Estudios de viabilidad",
      "Unit" => "NO APLICA",
      "UnitCode" => "MTS",
      "UnitPrice" => 50.0,
      "Quantity" => 2.0,
      "Subtotal" => 100.0,
      "Taxes" => [
        [
          "Total" => 16.0,
          "Name" => "IVA",
          "Base" => 100.0,
          "Rate" => 0.16,
          "IsRetention" => false,
        ],
      ],
      "Total" => 116.0,
    ],
    [
      "ProductCode" => "10101504",
      "IdentificationNumber" => "001",
      "Description" => "SERVICIO DE COLOCACION",
      "Unit" => "NO APLICA",
      "UnitCode" => "E49",
      "UnitPrice" => 100.0,
      "Quantity" => 15.0,
      "Subtotal" => 1500.0,
      "Discount" => 0.0,
      "Taxes" => [
        [
          "Total" => 240.0,
          "Name" => "IVA",
          "Base" => 1500.0,
          "Rate" => 0.16,
          "IsRetention" => false,
        ],
      ],
      "Total" => 1740.0,
    ],
  ],
];

// Solicitamos la generación de la factura y el timbrado
$resultado = $apiMultiemisor->emitirCfdi($datosAFacturar)
```

Consultar datos de una factura
------------------------------

[](#consultar-datos-de-una-factura)

```
//Multiemisor
$api->multiemisor()->consultarCfdi($id, $tipo);
```

Consultar acuse cancelación
---------------------------

[](#consultar-acuse-cancelación)

```
$id = '9DLXTRINxFpHGLGEDWu23g2';
$tipo='issuedLite';
$formato = 'pdf';

$api->web()->acuse($formato, $tipo, $id);
```

Consultar vigencia cfdi
-----------------------

[](#consultar-vigencia-cfdi)

```
  $api->web()->consultarEstadoCfdi(
    'cac0cb22-8406-4812-898a-6f6aec7c85b2',
    'EKU9003173C9',
    'CACX7605101P8',
    '1160.00'
  );
```

Credits
=======

[](#credits)

Desarrollador por [Strappberry](https://strappberry.com/)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~197 days

Recently: every ~220 days

Total

9

Last Release

933d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/759f7d709c15ace39ddc486158ae2519b1a8cc5dd2134bfc39e10e2c05f25c88?d=identicon)[dalook](/maintainers/dalook)

---

Top Contributors

[![DaLooK](https://avatars.githubusercontent.com/u/7662026?v=4)](https://github.com/DaLooK "DaLooK (6 commits)")[![IvanAquino](https://avatars.githubusercontent.com/u/29342852?v=4)](https://github.com/IvanAquino "IvanAquino (6 commits)")[![strappberry](https://avatars.githubusercontent.com/u/54283605?v=4)](https://github.com/strappberry "strappberry (6 commits)")

### Embed Badge

![Health badge](/badges/strappberry-facturama-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/strappberry-facturama-laravel/health.svg)](https://phpackages.com/packages/strappberry-facturama-laravel)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

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

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k16](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

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

PHPackages © 2026

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