2 min read fintech · engineering · romania
Shipping on top of government APIs: lessons from e-Factura and five state registries
Bono integrates natively with Romania's e-invoicing system; Firmoscop reads five official registries. Building on government infrastructure is a discipline of its own — here's what it demands.
Both of my products are, in a sense, interfaces to the Romanian state. Bono ships invoices through e-Factura, ANAF’s mandatory e-invoicing system. Firmoscop reads five official registries — ANAF, the Ministry of Finance, the Trade Registry, court portals, and the Insolvency Bulletin — and turns them into a payment-risk verdict. If you’re building for businesses in Romania, government infrastructure isn’t an edge case; it’s the foundation.
It’s also nothing like consuming a commercial API. Here’s the discipline it forces on you.
Treat the state as an unreliable dependency — politely
Government systems go down for maintenance on weekday afternoons. They change formats with modest announcements. They rate-limit unpredictably. None of this is malice; it’s just infrastructure built under different constraints than a SaaS API.
The architecture answer is old-fashioned and unglamorous: queue everything. No user-facing request should ever wait synchronously on a state system. Submissions go into background jobs that are idempotent and safe to re-run, with explicit retry policies and visible status. The user sees “submitted, confirmation pending” — an honest state — instead of a spinner that dies after ninety seconds.
Idempotency is not optional
When a submission times out, you often can’t know whether it was processed. The only sane design is one where re-sending is always safe: client-generated identifiers, deduplication on the receiving side of your system, and jobs that check before they act. Every integration bug I’ve seen in this space traces back to someone assuming a request either succeeded or failed — government APIs live in the third state.
Audit everything, in the same transaction
When the tax authority is involved, “what did we send, when, and what did they answer” is not a debugging convenience — it’s your defense. Every mutation that touches a state system gets an audit record written in the same transaction as the business operation: payload, timestamp, response, correlation id. This has settled every dispute we’ve had, usually in minutes.
Compliance is a feature, not a chore
Here’s the reframe that changed how I plan roadmaps: for Romanian SMEs, e-Factura compliance isn’t overhead we grudgingly support — it’s a top reason customers choose a platform at all. The bureaucratic pain is the product opportunity. The companies that treat mandatory integrations as first-class product surface — clear statuses, plain-language errors, proactive notifications — win trust that marketing can’t buy.
The upside nobody mentions
Government data has one beautiful property: it’s the ground truth. When Firmoscop says a company entered insolvency on a given date, that’s not scraped gossip — it’s the official record, with a source and a date attached. Building on state infrastructure is harder than building on Stripe. It’s also, for exactly that reason, a moat.