Lago is an open-source billing platform for usage-based pricing. It handles metering, invoicing, and subscription management with a full REST API.
What Is Lago?
Lago replaces Stripe Billing for usage-based pricing. It meters usage events, calculates charges, generates invoices, and integrates with payment providers.
Free (self-hosted): Unlimited
Cloud: Free tier available
Quick Start
git clone https://github.com/getlago/lago.git
cd lago
docker compose up -d
REST API
# Send usage event
curl -X POST https://api.getlago.com/api/v1/events \
-H "Authorization: Bearer YOUR_KEY" \
-d '{"event":{"transaction_id":"tx_123","external_subscription_id":"sub_1","code":"api_calls","properties":{"count":1}}}'
# Create customer
curl -X POST https://api.getlago.com/api/v1/customers \
-H "Authorization: Bearer YOUR_KEY" \
-d '{"customer":{"external_id":"cust_1","name":"Alice Corp","email":"billing@alice.com"}}'
# Get invoices
curl https://api.getlago.com/api/v1/invoices \
-H "Authorization: Bearer YOUR_KEY"
Use Cases
- Usage-based billing — charge per API call, GB, seat
- Hybrid pricing — subscription + usage
- Metering — track any usage metric
- Invoicing — automated invoice generation
- Revenue reporting — MRR, churn, ARPU
Lago vs Alternatives
| Feature | Lago | Stripe Billing | Chargebee |
|---|---|---|---|
| Open source | Yes | No | No |
| Usage metering | Native | Limited | Limited |
| Self-hosted | Yes | No | No |
| Price | Free/OSS | % of revenue | $249+/mo |
Need web data at scale? Check out my scraping tools on Apify or email spinov001@gmail.com for custom solutions.
Top comments (0)