PHPackages                             rubensalban/sfec-client-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. rubensalban/sfec-client-laravel

ActiveLibrary[API Development](/categories/api)

rubensalban/sfec-client-laravel
===============================

Integration Laravel du client SFEC (rubensalban/sfec-client-php). ServiceProvider + Facade + config publiable.

v0.1.1(1mo ago)03MITPHPPHP ^8.0

Since Jun 16Pushed 1mo agoCompare

[ Source](https://github.com/Rubensalban/sfec-client-laravel)[ Packagist](https://packagist.org/packages/rubensalban/sfec-client-laravel)[ Docs](https://github.com/Rubensalban/sfec-client-laravel)[ RSS](/packages/rubensalban-sfec-client-laravel/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (7)Versions (3)Used By (0)

sfec-client-laravel
===================

[](#sfec-client-laravel)

Bridge Laravel pour [`rubensalban/sfec-client-php`](https://packagist.org/packages/rubensalban/sfec-client-php) — client communautaire pour l'API SFEC (Système de Facturation Électronique Certifiée, République du Congo).

> Package indépendant, non affilié à l'administration congolaise ni aux éditeurs de SFEC.

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

[](#installation)

```
composer require rubensalban/sfec-client-laravel
```

Auto-discovery activé : aucune action manuelle requise. Le `ServiceProvider` et la façade `Sfec` sont enregistrés automatiquement.

Configuration
-------------

[](#configuration)

### Variables d'environnement

[](#variables-denvironnement)

```
SFEC_CLIENT_BASE_URL=https://api.sfec.gouv.cg
SFEC_CLIENT_API_KEY=sk_votre_cle_api
SFEC_CLIENT_ENV=production
```

### Publier le fichier de configuration (optionnel)

[](#publier-le-fichier-de-configuration-optionnel)

```
php artisan vendor:publish --tag=sfec-config
```

Génère `config/sfec.php`.

Usage
-----

[](#usage)

```
use Sfec\Client\Laravel\Facades\Sfec;

// Soumission ERP
$result = Sfec::erp()->submit([
    'taxpayer_niu' => 'M987654321',
    'recipient' => [
        'type' => 'business',
        'name' => 'ACME SARL',
        'niu' => 'P123456789',
    ],
    'items' => [[
        'designation' => 'Service A',
        'type' => 'service',
        'unit_price' => 50000,
        'quantity' => 2,
        'tax_rate' => '18',
    ]],
    'payment' => ['method' => 'mobile_money', 'currency' => 'XAF'],
]);

// Liste paginée
$page = Sfec::erp()->list(['page' => 1, 'pageSize' => 20]);

// Bootstrap mTLS
$credentials = Sfec::claim(['token' => '...', 'niu' => '...']);
```

### Via injection de dépendance (recommandé)

[](#via-injection-de-dépendance-recommandé)

```
use Sfec\Client\SfecClient;

class InvoiceController extends Controller
{
    public function store(Request $request, SfecClient $sfec)
    {
        return $sfec->erp()->submit($request->validated());
    }
}
```

Mode TCC / TFC (mTLS)
---------------------

[](#mode-tcc--tfc-mtls)

Ajouter à `.env` :

```
SFEC_CLIENT_MTLS_CERT_PEM="-----BEGIN CERTIFICATE-----\n..."
SFEC_CLIENT_MTLS_KEY_PEM="-----BEGIN PRIVATE KEY-----\n..."
```

Le bridge configure automatiquement Guzzle pour mTLS (fichiers temporaires en chmod 0600, nettoyés en fin d'exécution).

```
Sfec::tcc()->submit($input);
Sfec::tfc()->submit($input);
```

Documentation complète
----------------------

[](#documentation-complète)

Voir le [README du core](https://github.com/Rubensalban/sfec-client-php#readme) pour :

- Le schéma complet d'input d'une facture
- La gestion d'erreurs (exceptions typées)
- Les recettes (idempotence, avoirs, hooks)
- Les garanties de sécurité

Tests
-----

[](#tests)

```
composer test
```

Licence
-------

[](#licence)

MIT

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance90

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

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

Total

2

Last Release

47d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f0ce45d0c204a0dd8e184a3f8fbca04dfc91973c48e69d3ff8157c8b78fa462?d=identicon)[Rubensalban](/maintainers/Rubensalban)

---

Top Contributors

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

---

Tags

laravelcongosfece-factureefacture

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rubensalban-sfec-client-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/rubensalban-sfec-client-laravel/health.svg)](https://phpackages.com/packages/rubensalban-sfec-client-laravel)
```

###  Alternatives

[moonshine/moonshine

Laravel administration panel

1.3k268.2k86](/packages/moonshine-moonshine)[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k113.1M962](/packages/laravel-socialite)[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.5k26.0M738](/packages/laravel-boost)[spatie/laravel-export

Create a static site bundle from a Laravel app

679153.2k6](/packages/spatie-laravel-export)[spatie/laravel-health

Monitor the health of a Laravel application

88212.7M180](/packages/spatie-laravel-health)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.4M352](/packages/psalm-plugin-laravel)

PHPackages © 2026

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