Certification en ligne
Utilisez cet endpoint pour déclarer des factures déjà certifiées via l’API ERP en ligne pour archivage fiscal.
Authentification : X-API-Key - voir Authentification
Endpoint
URL : POST /api/invoices/report/api
Authentification : X-API-Key
POST https://dev-pgsfec.akieni.tech/api/invoices/report/api
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: application/jsonParamètres de requête
Identification et statut
| Paramètre | Type | Description | Obligatoire |
|---|---|---|---|
taxpayer_niu | string | Numéro d’identification unique du contribuable (vendeur) - max 20 caractères | ✅ |
invoice_id | string | Identifiant unique de la facture (ex: INV-2025-12) | âś… |
invoice_type | string | Type de facture (salesInvoice, creditNote) | âś… |
invoice_subject | string|null | Sujet ou description de la facture | ❌ |
invoice_due_date | string|null | Date d’échéance au format ISO 8601 | ❌ |
invoice_status | string | Statut de la facture (certified, pending) | âś… |
reference_invoice_id | string|null | ID de la facture de référence (pour avoirs) | ❌ |
sciet | string | Numéro SCiET (identifiant interne SFEC) | ✅ |
terminal_identifier | string | ID du terminal ou POS utilisé | ✅ |
Informations destinataire
| Paramètre | Type | Description | Obligatoire |
|---|---|---|---|
recipient_type | string | Type du destinataire (1 = Entreprise, 2 = Particulier) | âś… |
recipient_name | string | Nom ou raison sociale du destinataire | âś… |
recipient_niu | string|null | Numéro d’identification fiscale du destinataire | ❌ |
recipient_rccm | string|null | Numéro RCCM du destinataire | ❌ |
recipient_address | string|null | Adresse physique complète | ❌ |
recipient_phone | string|null | Numéro de téléphone du destinataire | ❌ |
recipient_email | string|null | Adresse e-mail du destinataire | ❌ |
is_recipient_taxable | boolean | Indique si le destinataire est assujetti Ă la TVA | âś… |
Montants et totaux
Tous les montants sont exprimés en valeur numérique simple, sans devise.
| Paramètre | Type | Description | Obligatoire |
|---|---|---|---|
subtotal | number | Montant hors taxe total | âś… |
total_tax_t_amount | number | Total de la TVA collectée | ✅ |
total_tax_r_amount | number | Total des retenues fiscales | âś… |
total_exempt_amount | number | Montant total exonéré | ✅ |
total_tax_amount | number | Total global des taxes | âś… |
discount_amount | number | Remise globale appliquée | ✅ |
total_line_discount_amount | number | Total des remises ligne Ă ligne | âś… |
additional_cent_tax | number | Taxe additionnelle en centimes | âś… |
electronic_stamp_duty | number | Timbre fiscal électronique | ✅ |
total_amount | number | Montant global TTC | âś… |
amount_due | number | Montant total Ă payer | âś… |
Paiement
| Paramètre | Type | Description | Obligatoire |
|---|---|---|---|
currency | string | Code de devise (XAF, USD) | âś… |
payment_method | string | Méthode de paiement (1 = Virement, 2 = Carte, 3 = Espèces, 4 = Mobile Money) | ✅ |
payment_reference | string|null | Référence du paiement | ❌ |
payment_date | string|null | Date du paiement au format ISO 8601 | ❌ |
Certification et métadonnées
| Paramètre | Type | Description | Obligatoire |
|---|---|---|---|
certification_date | string | Date de certification au format ISO 8601 | âś… |
certification_status | string | Statut de certification (certified, pending) | âś… |
certification_signature | string | Signature cryptographique complète | ✅ |
certification_short_signature | string|null | Version courte de la signature pour affichage | ❌ |
certification_qr_code | string | Code QR au format base64 | âś… |
notes | string|null | Remarques libres | ❌ |
Articles (items)
Chaque article de la facture doit contenir :
| Paramètre | Type | Description | Obligatoire |
|---|---|---|---|
designation | string | Nom du produit ou service | âś… |
classification_code | string|null | Code de classification (C01, S01, etc.) | ❌ |
type | string | Type d’article (product, service) | ✅ |
unit_price | number | Prix unitaire hors taxe | âś… |
quantity | number | Quantité vendue | ✅ |
subtotal | number | Montant HT pour l’article | ✅ |
discount_amount | number | Remise appliquée sur cet article | ✅ |
discount_type | string | Type de remise (fixed, percentage) | âś… |
net_amount | number | Montant net après remise | ✅ |
tax_rate | string | Taux de TVA applicable (0, 18, etc.) | âś… |
tax_amount | number | Montant de taxe pour cet article | âś… |
total_amount | number | Montant TTC de la ligne | âś… |
Exemple de requĂŞte
{
"invoice_id": "INV-2025-12",
"taxpayer_niu": "M25000000561080T",
"invoice_type": "salesInvoice",
"invoice_subject": "Vente matériel informatique",
"invoice_due_date": "2025-02-15T00:00:00Z",
"invoice_status": "certified",
"reference_invoice_id": null,
"sciet": "SFEC-API-001",
"terminal_identifier": "API-TERMINAL-001",
"subtotal": 13280,
"total_tax_t_amount": 2390.4,
"total_tax_r_amount": 0,
"total_exempt_amount": 0,
"total_tax_amount": 2390.4,
"discount_amount": 0,
"amount_due": 15670.4,
"total_line_discount_amount": 2000,
"additional_cent_tax": 0,
"electronic_stamp_duty": 0,
"total_amount": 15670.4,
"currency": "XAF",
"recipient_type": "1",
"recipient_name": "Test Buyer Company",
"recipient_niu": "BUYER123456789",
"recipient_rccm": "CG-BZV-2025-B-001",
"recipient_address": "123 Buyer Street, Brazzaville",
"recipient_phone": "+237123456789",
"recipient_email": "contact@buyer.com",
"is_recipient_taxable": true,
"payment_method": "2",
"payment_reference": "PAY-2025-001",
"payment_date": "2025-01-15T14:30:00Z",
"notes": "Facture API pour test d'intégration",
"items": [
{
"designation": "iPhone 16 Pro",
"classification_code": "C01",
"discount_amount": 1000,
"discount_type": "fixed",
"net_amount": 7835.2,
"quantity": 6,
"subtotal": 4320,
"tax_amount": 597.6,
"tax_rate": "18",
"total_amount": 3917.6,
"type": "product",
"unit_price": 720
},
{
"designation": "MacBook Pro M3",
"classification_code": "C01",
"discount_amount": 1000,
"discount_type": "fixed",
"net_amount": 7835.2,
"quantity": 6,
"subtotal": 8960,
"tax_amount": 1792.8,
"tax_rate": "18",
"total_amount": 11752.8,
"type": "product",
"unit_price": 1493.33
}
],
"certification_date": "2025-01-15T10:30:00Z",
"certification_status": "certified",
"certification_signature": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"certification_short_signature": "SFEC-API-2025-001",
"certification_qr_code": "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAM..."
}Réponse
Réponse de succès
| Paramètre | Type | Description |
|---|---|---|
sfec_certification_number | string | Numéro de certification SFEC officiel unique |
invoice_number | string | Numéro de facture confirmé par le système |
certification_date | string | Date/heure de certification au format ISO 8601 |
sfec_identifier | string | Identifiant SFEC du système de certification |
sfec_qr_code | string | Code QR de vérification au format base64 |
Exemple de réponse
{
"sfec_certification_number": "SFEC-API-2025-0000123456",
"invoice_number": "INV-2025-12",
"certification_date": "2025-01-15T10:30:00.000Z",
"sfec_identifier": "SFEC-API-001",
"sfec_qr_code": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEA..."
}Codes d’erreur
| Code | Description |
|---|---|
400 | Données invalides (format incorrect, champs manquants, incohérences dans les totaux) |
401 | Clé d’authentification invalide ou manquante |
409 | Facture déjà certifiée ou déclarée |
422 | Erreur de validation des données métier |
500 | Erreur interne du serveur |
Différences avec TCC/TFC
| Aspect | TCC/TFC | API en ligne |
|---|---|---|
| Authentification | mTLS (certificats clients) | X-API-Key |
| Certification | Locale puis synchronisation | Directe via API |
| Endpoint | /invoices/report/tcc ou /tfc | /invoices/report |
| Usage | Systèmes hors ligne/hybrides | Systèmes en ligne |
| Réponse | Confirmation d’archivage | Certification immédiate |
Le rapport en ligne est destiné aux systèmes ERP connectés en permanence qui peuvent effectuer la certification et le rapport en temps réel.
⚠️
Assurez-vous que tous les montants sont cohérents et que les totaux correspondent à la somme des articles avant soumission.
Pour toute assistance technique, contactez l’équipe SFEC.