Lago API
Lago — open-source, self-hostable usage-based billing and metering platform for SaaS companies, with a REST API for ingesting usage events, managing plans, and generating invoices.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
AGPL open source — fully auditable. Self-hosted gives complete data control. Cloud GDPR compliant. No SOC2 yet. API keys scoped to organization. Idempotency keys prevent billing duplication.
⚡ Reliability
Best When
Your agent product has usage-based pricing (per API call, per token, per GB) and needs flexible metering, plan management, and invoicing without vendor lock-in.
Avoid When
You have simple fixed-price subscriptions — use Stripe Billing directly for straightforward recurring payments.
Use Cases
- • Agents ingesting usage events in real time for metered billing — API calls, compute minutes, tokens consumed
- • Billing automation — agents creating subscriptions, applying discounts, and generating invoices programmatically
- • Custom pricing model implementation — agents building credit-based, seat-based, or hybrid billing via Lago's flexible plan API
- • Usage analytics — agents querying Lago for customer consumption data to power usage dashboards
- • Dunning automation — agents handling failed payment flows and subscription lifecycle management via webhooks
Not For
- • Simple fixed-price subscriptions — Stripe Billing is simpler for standard subscription models
- • Teams not needing usage-based or complex pricing — overkill without metering requirements
- • Non-technical teams — Lago requires engineering integration for event ingestion pipeline
Interface
Authentication
API key from Lago settings. Bearer token authentication. Organization-scoped. Self-hosted instances manage their own API keys.
Pricing
Open source under AGPL — self-hosted is completely free. Cloud adds managed hosting. Revenue share model aligns Lago's success with yours.
Agent Metadata
Known Gotchas
- ⚠ Usage events are processed asynchronously — ingest endpoint returns 200 immediately; billing reflects events after processing lag
- ⚠ Billable metrics must be created before events can be associated — configuration before ingestion
- ⚠ Invoice generation is triggered by billing period end — not real-time; agents cannot force immediate invoicing easily
- ⚠ External IDs (customer, subscription) are immutable after creation — plan naming carefully
- ⚠ Self-hosted requires PostgreSQL, Redis, and storage bucket — Docker Compose provided but ops overhead exists
Alternatives
Full Evaluation Report
Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Lago API.
Scores are editorial opinions as of 2026-03-06.