FISCAL STORAGE ENGINE FISCALDB

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.

Designed from the storage layer up for jurisdictions where invoices are legal evidence — not just application data.
Book a Technical Demo Read the Architecture ↓
WIRE PROTOCOLS • PostgreSQL :5432 • MySQL :3306 • REST :8080
SEALED HASH CHAIN & TSA TOKEN
LSN 41
sha256:3f9a1c8e…
tsa 0x4b8e21 • MX • SAT
LSN 42
sha256:a7d20b54…
tsa 0x4b8e22 • ES • AEAT
LSN 43
sha256:e1c6f093…
tsa 0x4b8e23 • EU • Peppol
LSN 44
sha256:0b8d47a2…
tsa 0x4b8e24 • MX • SAT
prev_hash → final_hash • RFC 3161 TimeStampToken persisted as TsaTimestampReceived
THE STORAGE GAP

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
CATEGORY DEFINITION

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

General-purpose relational database optimized for OLTP throughput and schema flexibility. Lacks native legal probative mechanisms.

Amazon QLDB

PROPRIETARY LEDGER

Immutable ledger database. AWS-only lock-in, lacks tax authority connectors, non-standard query languages.

FiscalDB

FISCAL EVIDENCE ENGINE

Purpose-built fiscal storage engine. Multi-jurisdiction (SAT, AEAT, Peppol), on-prem / any cloud, Postgres & MySQL wire-compatible.

PIPELINE FLOW

Architecture Blueprint

From your ERP to immutable legal evidence in a single atomic append.

1 • APPLICATION

ERP / Billing System

Standard SQL write via Postgres/MySQL drivers

2 • STORAGE ENGINE

FiscalDB Engine

Drop-in wire protocol receiver

3 • WAL IMMUTABILITY

Append-Only WAL

No UPDATE • No DELETE path by design

4 • HASH CHAIN

SHA-256 Hash Chain

Per-tenant, tamper-evident record linking

5 • TIMESTAMPING

RFC 3161 Timestamp

Qualified TSA token (eIDAS Art. 41)

6 • TAX AUTHORITY

SAT • AEAT • Peppol

Automated government reporting & stamp

STORAGE CORE

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 Validated event
  • • Raw DER TimeStampToken persisted as TsaTimestampReceived
  • • FNMT-RCM, DigiCert, Camerfirma, FreeTSA integration
  • • Legally valid under eIDAS Reg. 910/2014 Art. 41
AUDIT & SECURITY

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.

BENCHMARKS

Built for Throughput: 10k+/s Ingestion

Storage, hash chain, qualified timestamp, and connector in one atomic operation instead of five.

10k+/s
Invoices / sec ingest
Commodity hardware (zstd)
< 1 ms
Append Latency
Direct WAL segment layer
60–80%
Disk Reduction
vs raw XML in Postgres BLOB
0 LOC
Application Code
Full TSA-sealed audit trail
GOVERNMENT INTEGRATIONS

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.

🇲🇽 Mexico (SAT) GA AVAILABLE

CFDI 4.0 (PAC timbrado & retenciones)

🇪🇸 Spain (AEAT) GA AVAILABLE

Facturae 3.2 / VeriFactu / SII

🇪🇺 European Union (Peppol) GA AVAILABLE

UBL 2.1 / BIS Billing 3.0 / CTC

🇮🇹 Italy (Agenzia Entrate) CONNECTOR READY

FatturaPA (SdI exchange system)

🇧🇷 Brazil (SEFAZ) ROADMAP

NF-e / NFC-e integration

🇫🇷 France / 🇩🇪 Germany ROADMAP

DGFiP / CEN (Factur-X & ZUGFeRD)

WIRE PROTOCOL COMPATIBILITY

Speaks PostgreSQL. Speaks MySQL. Doesn't Ask You to Migrate.

[1] cURL REST API [2] psql (PostgreSQL Wire) [3] mysql (MySQL Wire) [4] fiscaldb-cli
curl -X POST https://api.fiscaldb.io/v1/invoices \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "external_id": "FAC-2026-001",
    "country": "MX",
    "format": "Cfdi",
    "submit": true,
    "validation_mode": "strict",
    "payload": "<cfdi:Comprobante ...>"
  }'

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 unsafe in All Storage Critical Paths
ENTERPRISE INFRASTRUCTURE

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.

Contact Sales Request Evaluation License