Lago CLI.
Start here to configure billing, inspect JSON results, and verify usage from your terminal or coding agent.
Start here to configure billing, inspect JSON results, and verify usage from your terminal or coding agent.
Read exact request and response schemas, generate clients, or build agent tools from the complete API contract.
Create customers, plans, subscriptions, and events over a typed REST API. Scoped bearer keys, pagination, and regional base URLs.
Ship with maintained JavaScript, Python, Ruby, Go, PHP, and Kotlin clients generated from the API contract.
Receive billing events with delivery retries and idempotency keys. Verify every payload with a JWT or HMAC signature.
Connect Claude, ChatGPT, and other MCP clients to Lago billing data and operations through a documented server.
Yes. Lago’s ongoing wallet balance typically refreshes in under a second after a new event is included in usage. It reflects remaining prepaid credits after current usage, including taxes.
Use this live balance in customer dashboards and configure balance alerts and automatic top-ups.
Yes. Customize subscription fees, usage rates, minimum commitments and billing thresholds for each customer’s subscription while keeping a shared plan structure.
Lago applies those negotiated terms when calculating charges and generating invoices.
No. Lago Cloud is a fully managed billing platform. Lago handles hosting, scaling, upgrades and monitoring. Your team connects customer and usage data, configures pricing and connects your payment and finance tools.
Self-hosting is also available if you prefer to operate Lago in your own environment.
Yes. Once your customer and usage data are connected, business teams can configure plans, prices and discounts directly in Lago’s dashboard.
Launch new offers or adjust customer-specific pricing using Lago’s existing billing configuration.
Yes. Model the contract in a separate test environment, send representative usage and compare the resulting invoices with your current system. Include discounts, credits, taxes and payment settings so your team can validate the complete billing flow.
Yes. Configure Lago’s ongoing balance alerts to trigger a restriction in your application when credits reach your chosen threshold. Your application enforces access using those alerts and its own request checks.
You can also set earlier thresholds to warn customers and prompt them to top up before their credits run out.
Your data is protected with enterprise-grade rigor.
Deploy Lago on-prem, in a VPC or elsewhere.
Role-based access control to set user roles and permissions.
Deploy Lago seamlessly on your own infrastructure to keep full control.
Create a Lago plan from plan.json using the CLI:
lago plans create --input @plan.json --output jsonExample Lago JSON response for a yearly Basic plan with usage-based API charges:
{
"plan": {
"name": "Basic",
"code": "basic",
"interval": "yearly",
"amount_cents": 90000,
"amount_currency": "USD",
"charges": [
{
"billable_metric_code": "api_calls",
"charge_model": "standard"
}
]
}
}