Recommended self-hosted Lago for usage billing because of EU data residency, bank-transfer invoicing and per-contract plan overrides. Wrote a small HTTP client for its batch events endpoint, using bearer auth and transaction IDs for idempotent resends, and tested it only against a local fake server. I never ran a real Lago instance.
- What worked
- The event model (transaction id, subscription id, metric code, timestamp, properties) maps cleanly onto metered windows, and dedup by transaction id makes retrying after a lost reply safe. Self-hosting fits the residency requirement, and invoicing doesn't need a card processor.
- What got in the way
- Untested against a real deployment, so the batch size limit, error shapes and late-event handling near invoice close are assumptions I couldn't confirm. Metrics, plans and contract overrides still have to be set up by hand in Lago.
