Not Every Database Can Stand in Court. General-Purpose Databases Store Invoices. FiscalDB Preserves Evidence.
FiscalDB is an append-only, cryptographically sealed database purpose-built for invoices. Qualified RFC 3161 timestamps on every document. Native connectors to tax authorities. PostgreSQL and MySQL wire-compatible — your drivers don't change.
Why FiscalDB Exists
Postgres is great. It is not fiscal storage.
General-purpose databases were never designed to store fiscal evidence with legal validity. Postgres is excellent application storage — rows are mutable, audit is bolted on, there is no native hash chain, no qualified timestamp, no SAT/AEAT/Peppol connector. FiscalDB makes regulatory immutability a storage-layer guarantee, not an application-layer assumption.
| Requirement | PostgreSQL (General App) | FiscalDB (Legal Evidence Engine) |
|---|---|---|
| Append-only at storage layer | ❌ Mutable rows (UPDATE / DELETE allowed) | ✓ WAL + segment, no UPDATE/DELETE path |
| Per-document SHA-256 hash chain | ❌ None (requires custom application triggers) | ✓ Native per-tenant SHA-256 hash chain |
| RFC 3161 qualified timestamp / doc | ❌ None (requires external HTTP calls) | ✓ Async TSA on every validated doc |
| Legal probative value (eIDAS / AEAT / SAT) | ❌ No legal standing without external proof | ✓ Built in by design |
| Fiscal types (TaxId, FiscalFolio, …) | ❌ Generic TEXT / JSONB | ✓ Native domain types |
| Native SAT (CFDI 4.0 / PAC) connector | ❌ Application code required | ✓ Built-in PAC negotiation |
| Native AEAT (Facturae / VeriFactu) | ❌ Application code required | ✓ Built-in VeriFactu connector |
| Native Peppol (UBL 2.1 / CTC) | ❌ Application code required | ✓ Built-in Peppol network integration |
| Multi-tenant isolation at WAL level | ❌ Shared WAL | ✓ Isolated per-tenant WAL chains |
| PostgreSQL & MySQL Wire Protocol | ✓ Postgres native | ✓ Both PostgreSQL & MySQL wire-compatible |
A New Category of Storage Engines
FiscalDB introduces a new category of storage engines. The closest existing product is Amazon QLDB — proprietary and AWS-only. FiscalDB is multi-jurisdiction, deployable on your own infrastructure or as a managed cloud, and wire-compatible with PostgreSQL and MySQL so adoption requires no driver migration.
PostgreSQL
General-purpose relational database optimized for OLTP throughput and schema flexibility. Lacks native legal probative mechanisms.
Amazon QLDB
Immutable ledger database. AWS-only lock-in, lacks tax authority connectors, non-standard query languages.
FiscalDB
Purpose-built fiscal storage engine. Multi-jurisdiction (SAT, AEAT, Peppol), on-prem / any cloud, Postgres & MySQL wire-compatible.
Architecture Blueprint
From your ERP to immutable legal evidence in a single atomic append.
ERP / Billing System
Standard SQL write via Postgres/MySQL drivers
FiscalDB Engine
Drop-in wire protocol receiver
Append-Only WAL
No UPDATE • No DELETE path by design
SHA-256 Hash Chain
Per-tenant, tamper-evident record linking
RFC 3161 Timestamp
Qualified TSA token (eIDAS Art. 41)
SAT • AEAT • Peppol
Automated government reporting & stamp
The Engine Capabilities
An append-only, cryptographically sealed core built for performance and legal integrity.
Append-Only WAL + Segment Storage
- • Crash recovery with magic headers & CRC-32 per record
- • zstd / lz4 compression on repetitive XML payloads
- • AES-256-GCM encryption at rest (key via
FISCALDB_STORAGE_KEY)
Per-Tenant SHA-256 Hash Chain
- • Every document carries
previous_hash + final_hash - • Replayed automatically on engine recovery
- • Tampering detected instantly by
fiscaldb verify-chain
RFC 3161 Qualified Timestamping
- • Async TSA call after every
Validatedevent - • Raw DER TimeStampToken persisted as
TsaTimestampReceived - • FNMT-RCM, DigiCert, Camerfirma, FreeTSA integration
- • Legally valid under eIDAS Reg. 910/2014 Art. 41
How It Holds in Court
For Tax Authorities
Every document is RFC 3161 sealed. The timestamp token is independently verifiable against the TSA certificate chain — even if FiscalDB is completely offline.
For External Auditors
fiscaldb verify-chain replays the per-tenant hash chain. Any unauthorized modification or byte flipping is detected immediately at the segment level.
For CISOs & Security Teams
AES-256-GCM encryption at rest, mTLS to all tax authorities (TLS 1.2+ via rustls), HMAC-SHA256 signed webhooks, and granular JWT + RBAC authorization.
Built for Throughput: 10k+/s Ingestion
Storage, hash chain, qualified timestamp, and connector in one atomic operation instead of five.
One Engine. Every Tax Authority That Matters.
Submit a draft, FiscalDB negotiates with the right authority, receives the official stamp, and seals it into the WAL in a single transaction.
CFDI 4.0 (PAC timbrado & retenciones)
Facturae 3.2 / VeriFactu / SII
UBL 2.1 / BIS Billing 3.0 / CTC
FatturaPA (SdI exchange system)
NF-e / NFC-e integration
DGFiP / CEN (Factur-X & ZUGFeRD)
Speaks PostgreSQL. Speaks MySQL. Doesn't Ask You to Migrate.
Who It's For
If invoices are legal evidence in your world, FiscalDB is engineered for you:
- 🏛️ Governments & Tax Authorities
- 💳 Fintechs & Payment Processors
- 🏦 Commercial & Investment Banks
- 💼 ERP & Billing SaaS Vendors
- 🧾 E-Invoicing Platforms & PACs
- 🏢 Global Enterprise Organizations
Engineered in Rust
Engineered in Rust for absolute correctness under audit. A pure-Rust engine with zero unsafe in its critical paths, deterministic crash recovery, and reproducible benchmarks.
- ⚡ Deterministic Crash Recovery
- ⚡ Single Signed Binary (Zero External Daemons)
- ⚡ Reproducible Performance Benchmarks
- ⚡ Zero
unsafein All Storage Critical Paths
Invoices Are Records. Fiscal Evidence Is Infrastructure.
Stop bolting compliance onto a general-purpose database. Build on the engine designed for it. Commercial license, deployed on your own infrastructure or managed cloud.