Skip to main content
Use this page as the canonical developer portal for Lago. It links the contracts, guides, packages, tools, and operational resources needed to build and maintain a production billing integration.

API and authentication

Choose the REST API base URL for the Lago deployment you are targeting: https://api.getlago.com/api/v1 for US Cloud, https://api.eu.getlago.com/api/v1 for EU Cloud, or your Lago API origin followed by /api/v1 for self-hosted. Authenticate server-to-server requests with the API key from your Lago organization settings. Send the key only over HTTPS, store it in a secret manager, and never expose it in browser code, logs, or source control.

OpenAPI schemas

Use the same-origin OpenAPI discovery schema for automated discovery, function generation, and error-shape inspection. It describes representative high-value operations and points to the production server. Use the complete Lago OpenAPI specification for code generation and exhaustive endpoint coverage. The source is maintained in the Lago OpenAPI repository. Agents can also discover these surfaces through the Agentic Resource Discovery catalog and the RFC 9727 API catalog. The root-level JSON files provide version-controlled aliases of those well-known documents. The Agent Skills discovery index publishes the Lago billing-integration skill with a content digest. The A2A agent card and MCP server card expose Lago’s identity, documentation tools, and read-only skill resource at predictable URLs. Compatible agent clients can also load the repository as an Agent Plugin. Its MCP configuration declares both Lago MCP surfaces, and its packaged billing skill is maintained in the public Lago documentation repository. Coding agents contributing to these docs should read the repository’s version-controlled AGENTS.md instructions. They preserve Lago’s established design, identify authoritative API sources, prohibit invented product claims, and define the required validation workflow.

SDKs and clients

Lago maintains open-source clients for common server-side languages. Check each repository’s README and release history before selecting a version.

Webhooks and asynchronous processing

Use webhooks to react to customer, subscription, invoice, credit note, payment, wallet, and quote lifecycle changes. Consumers should verify authenticity, acknowledge delivery quickly, deduplicate retries, and move expensive work to a queue. Treat the API as the source of truth when a webhook payload and locally cached state disagree.

AI agents and MCP

Lago exposes two distinct MCP surfaces:
  • The Lago Docs MCP at /mcp is a public, read-only Streamable HTTP server for documentation search and retrieval.
  • The Lago Product MCP is the open-source, Docker-distributed server documented in the product MCP guide and maintained in the Lago Agent Toolkit repository. It authenticates with a Lago API key and exposes live billing data and operations over stdio. Set LAGO_API_URL explicitly to the US, EU, or self-hosted base URL before starting it.
Use the Docs MCP to learn and the Product MCP to act. Treat the product server as an authenticated operational integration: keep its API key in the client environment, verify the target Lago instance and organization, and keep financial mutations behind the same authorization and human-approval rules used by non-agent integrations. For application-level billing agents, also review the agent SDK overview.

Examples and self-hosting

Operations and support

Check Lago status for current service health. Use the contact page to find community, support, sales, and security routes. For automated discovery, start with llms.txt; for a complete text export, use llms-full.txt. For packaging and commercial availability, use the pricing summary and verify decisions against the current Lago pricing page.