Getlago

Billing & Invoicing

Billing & invoicing without the headaches

Lago Cloud calculates charges, generates invoices and connects with your payment provider without your team running the billing service.

Ava Johnson is assigned the Enterprise plan. Its subscription fee and its seats, credits, LLM input tokens, LLM output tokens and compute charges each get a 10% discount, billed monthly. Lago then issues an invoice from Quantive to VantagePoint: a $99.00 Pro plan subscription fee, 250 units of API usage overage at $0.12 and a $21.00 credits top-up, for a $150.00 subtotal. Sales tax of 8% applies to the $99.00 fee, the $51.00 of other items is exempt, and the total due is $157.92. Finally, Jake Dennison’s prepaid wallet takes four transactions in turn, each landing at the top of the activity: 15 credits invoiced, 30 credits invoiced, 100 credits purchased manually, then 45 credits invoiced. The balance moves from 1,520 to 1,530 credits.

Trusted by the most innovative companies

Mistral AI
PayPal
Groq
Synthesia
Laravel
Swan
Epicor
1NCE
Cerebrium
Blacksmith
Lune
OQC

One app for all billing strategies

Usage-based, subscriptions, seats, hybrid or prepaid credits. Each strategy is a plan in Lago, so pricing can change without rebuilding billing.

Usage metrics in Lago: seats, API calls, storage, ATM withdrawals and physical cards, each with its aggregation type

Metering and billing for AI agents

AI Billing SDK

Wrap your OpenAI, Anthropic or Bedrock client and every model call becomes a usage event in Lago.

Agent spend control

Fund agents with prepaid wallets and get alerted as balances run low, before spend gets out of hand.

x402 Payments

Let agents pay per request over HTTP 402, with each payment tied to the usage it covers.

Tools for AI agents

Connect agents to Lago through the MCP server, the CLI or the API. Each one reads and writes the same billing data.

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

From invoice to cash.
Synced to your books.

Invoices go out with the right taxes and get paid through your provider.
Every payment syncs to your accounting and CRM.

Package and price any plansExplore plans
Assign a plan
AJAva Johnsoncus_12345678910111213
PlanSelect a planEnterprise planAssign plan
Override plan
Fixed recurring charges
Subscription fee-10%Monthly
Usage-based charges
Metered chargesCharges are fully billed, invoiced and reset at the end of each billing period.
Seats-10%Monthly
Credits-10%Monthly
LLM Input Tokens-10%Monthly
LLM Output Tokens-10%Monthly
Compute-10%Monthly

Pricing and packaging.Model subscriptions, usage, seats, credits or hybrid plans, and change prices and packages without rebuilding billing.

How Lago supports complex billing

Billing is mission-critical. Lago is engineered for the realities of high-volume enterprises.

Accurate charges.

Accurate charges. Lago automatically calculates what customers owe you based on billable metrics and defined plans.

Customizable plans.

Customizable plans. Tie metrics to any pricing model and combine them into hybrid plans.

Advanced billing.

Advanced billing. Capture more revenue faster with threshold-based billing, pro-rations and automated dunning campaigns.

Automated invoicing.

Automated invoicing. Lago generates accurate invoices for any customer, plan or entity to eliminate manual work.

Integrations across the stack.

Integrations across the stack. Connect Lago with your CRM, ERP, accounting and reseller billing platforms to obtain accurate revenue analytics where you need it.

Empower all teams with usage data

Engineers

Engineering

Build billing without the headaches.

Product

Product

Ship complex pricing and new packaging faster.

Finance

Finance

Billing for all motions, products and geographies.

Operations

Operations

One source of truth for all billing data.

Powering fast-growing AI scaleups.And global enterprises.

See how ambitious teams build and scale their billing with Lago.

Frontier AI
Lago has been able to follow the pace of our releases and has allowed us to focus on what we do best.

— Timothée Lacroix, CTO, Mistral AI

Timothée Lacroix

Related reading

How billing systems are built, compared and chosen.

Billing & Invoicing FAQ

How does Lago generate invoices?

Lago calculates charges from a customer's plan and billable metrics, then automatically creates and sends an invoice once the billing period closes. Invoices apply the right taxes, include usage and subscription line items together, and can go out as PDF or as XML for e-invoicing compliance, without manual assembly.

Can Lago handle hybrid pricing on one invoice?

Yes. A single invoice can combine a flat subscription fee, usage-based charges, prorations, and credit or coupon deductions on the same line-item list. This is what lets a company bill a base plan and metered overage together instead of running separate billing processes for each.

How does Lago calculate tax on invoices?

Lago applies tax rates automatically at invoicing time and connects to dedicated tax engines like Avalara and Anrok for jurisdiction-specific calculation. A team can also set manual tax rates directly on a plan or customer when a full tax integration isn't needed yet.

What happens if a customer's payment fails?

A failed payment triggers a dunning campaign: Lago retries the charge on a defined delay and attempt count, and sends the customer an email with a payment link if a connected payment processor is in use. Reaching the overdue balance threshold on a campaign starts this process automatically, and a successful retry updates the invoice status without manual follow-up.

Can an invoice be corrected after it's issued?

Yes, through voiding rather than editing. Voiding an invoice keeps it in the record for audit purposes, zeroes its value, and marks it as not payable, and a credit note can be issued alongside it to refund the customer or hold the balance as credit. The voided invoice can then be regenerated with corrected line items while staying linked to the original for traceability.

Does Lago support credit notes and refunds?

Yes. Credit notes can be issued on their own or as part of voiding an invoice, and the resulting balance can be refunded to the customer's original payment method or kept as a credit against future invoices. This covers the common corrections teams need: overcharges, cancellations, and partial refunds.

Which payment providers does Lago connect to?

Lago has official native integrations for GoCardless, Stripe and Adyen, plus community integrations for Cashfree and Moneyhash. Other processors need a custom connection through Lago webhooks and API. Automatic collection, status updates and refunds depend on the integration; verify your chosen flow.

Is billing and invoicing available for both usage-based and subscription models?

Yes. The same invoicing engine handles pure subscriptions, pure usage-based billing, and hybrid plans that mix the two, plus prepaid credits and usage allowances. A company doesn't need a separate tool depending on which pricing model a given plan uses.

Lago solves complex billing.