Connect your software to French e-invoicing in less than a day
TypeScript library: Factur-X generation, state machine, Iopole PA client, signed webhooks. 162 tests. 30-day free sandbox.
What's included
EN 16931 validation
All BR-* rules including BR-FR-01 (franchise TVA). Errors block generation, warnings are logged.
Factur-X generation
PDF/A-3 + CII XML, profile EN 16931, Alternative relationship — fully spec-compliant.
8-state machine
DRAFT → SUBMITTED → RECEIVED → ACCEPTED/REJECTED → PAID. All invalid transitions throw.
PA client sandbox/prod
SandboxPaClient for testing, IopolePaClient for production. Explicit switch with contractual warning.
Signed webhooks
HMAC-SHA256 verification with timingSafeEqual — constant-time comparison against timing attacks.
e-reporting scaffold
EReportingClient ready for DGFiP connection (obligation from 2026) — API pending doctrine.
Quick start
import { generateXml, buildPdf, validate } from '@facturation/core';
const { valid, errors } = validate(invoice);
if (!valid) throw new Error(errors.map(e => e.message).join(', '));
const xml = generateXml(invoice);
const pdf = await buildPdf(invoice, xml);
// pdf : Buffer — Factur-X PDF/A-3 + CII XML embeddedPricing
Issuer responsibility
The SDK generates invoices and provides tools for state management and PA submission. The issuer remains legally responsible for the accuracy of invoices and compliance with French tax law.