Skip to main content

Use cases

FEC export (French DGFiP-compliant audit file)

Standardised export for tax audit

The FEC (Fichier des Écritures Comptables) is a standardised text format mandated by the French DGFiP (article A47 A-1 of the LPF) that any company must produce on tax audit request. Scell.io generates the FEC on demand via `POST /api/v1/fiscal/exports/fec` over a date range: returns an `export_id`, then `GET /api/v1/fiscal/exports/{id}/download` (S3 signed URL, 7 days). The file follows the mandatory format: 18 pipe-separated columns, ISO-8859-15 encoding, CRLF line ending, comma decimal separator. Includes all invoicing and credit-note entries over the period with the SHA-256 chain hash for integrity proof.

Key facts

  • Compliant with article A47 A-1 LPF
  • 18 pipe-separated columns, ISO-8859-15, CRLF
  • Configurable date range (max 1 year per export)
  • SHA-256 fiscal chain hash included
  • S3 signed URL (7-day expiry)
  • Async generation (`export.ready` webhook)

Code example

use Scell\Sdk\ScellClient;

$scell = new ScellClient(getenv('SCELL_SECRET_KEY'));

// 1. Demander l'export FEC pour l'exercice 2025
$export = $scell->fiscal()->createFecExport([
    'date_from' => '2025-01-01',
    'date_to' => '2025-12-31',
]);

// 2. Polling ou webhook `export.ready`
while ($export->status === 'pending') {
    sleep(5);
    $export = $scell->fiscal()->getExport($export->id);
}

// 3. Télécharger via signed URL
file_put_contents(
    '/var/exports/FEC_2025.txt',
    file_get_contents($export->download_url)
);

See also

Your cookie preferences

We use cookies to improve your experience. Essential cookies are always active. Cookie policy.