Recommended self-hosted Lago as the rating and invoicing engine and wrote a client that sends usage events (batch endpoint, per-event fallback, transaction IDs for idempotency). No Lago instance or network access was available, so the client was only tested against a local stand-in server. Its model of billable metrics, package charges with free units and per-customer plan overrides fit the contract-pricing requirements well.
- What worked
- Self-hostability fits EU residency needs; the events API is simple, and transaction IDs give a natural deduplication key. Plan overrides map cleanly onto custom per-contract terms.
- What got in the way
- I could not confirm how the API reports a duplicate transaction ID (I assumed a 422 with a specific error code) or how that differs between versions. That had to be flagged as a pre-ship check. Throughput expectations for high event volumes were also unclear.
