Skip to main content

Use cases

Fiscal log immutability (ISCA + SHA-256 chain)

Crypto-verifiable audit trail + Eloquent ISCA Guard

Scell.io implements fiscal immutability through two complementary mechanisms: (1) a SHA-256 hash chain on the `fiscal_entries` table where each entry embeds the previous entry's hash, (2) an Eloquent-level ISCA Guard blocking any modification of a fiscal field on an invoice/credit-note/closure in a status other than `draft`. Any attempt is logged in `fiscal_audit_logs` with `critical` severity. Global integrity is verifiable via `GET /api/v1/fiscal/integrity` which recomputes the full chain and returns `valid: true/false` + the first corrupted index. Compliant with French DGFiP ISCA requirements.

Key facts

  • Per-entry SHA-256 hash embedding previous hash
  • Eloquent ISCA Guard: modification blocked outside `draft`
  • Critical logs in `fiscal_audit_logs`
  • `GET /api/v1/fiscal/integrity` verification endpoint
  • Daily RFC 3161 TSA anchor (FiscalAnchor)
  • 10-year retention + FEC export DGFiP-compliant

Code example

import { ScellClient } from '@scell/sdk';
const scell = new ScellClient({ apiKey: process.env.SCELL_SECRET_KEY! });

// Vérifier l'intégrité du registre fiscal (cron quotidien recommandé)
const integrity = await scell.fiscal.integrity();

if (!integrity.valid) {
  // Alerte critique : la chaîne est cassée
  await alertOps({
    severity: 'critical',
    message: `Fiscal log corrupted at entry #${integrity.first_corrupted_index}`,
    details: integrity,
  });
  throw new Error('Fiscal integrity violation');
}
console.log(`Chain valid up to entry #${integrity.last_index}`);

See also

Your cookie preferences

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