Getlago

Lago developer resources

Lago is an API-first billing platform for usage-based, subscription, and hybrid pricing. Start with the API reference or OpenAPI contract, authenticate with a scoped bearer key, consume signed webhooks, use an official SDK, or connect an AI assistant through Lago's Model Context Protocol server.

REST API.

Create customers, plans, subscriptions, and events over a typed REST API. Scoped bearer keys, pagination, and regional base URLs.

Webhooks.

Receive billing events with delivery retries and idempotency keys. Verify every payload with a JWT or HMAC signature.

Official SDKs.

Ship with maintained JavaScript, Python, Ruby, Go, PHP, and Kotlin clients generated from the API contract.

Lago CLI.

Run billing commands, inspect structured results, and diagnose your integration from the terminal.

MCP server.

Connect Claude, ChatGPT, and other MCP clients to Lago billing data and operations through a documented server.

OpenAPI specification.

Generate clients, inspect typed operations, or expose billing actions to an AI agent from the OpenAPI 3.1 schema.

Enterprise-grade security and privacy

SOC 2 Type II

SOC 2 Type II

Your data is protected with enterprise-grade rigor.

Self-host

Flexible Deployment

Deploy Lago on-prem, in a VPC or elsewhere.

Role Based Access Control

RBAC

Role-based access control to set user roles and permissions.

Lago self-hosted

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 json

Example 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"
      }
    ]
  }
}