Getlago

Credits & Spend Control

Prepaid credits with real-time balances

Sell or grant credits, track ongoing balances, and refill wallets before customers run out.

This illustrative wallet opens with 1,000.00 credits at one dollar per credit. Current usage reduces its ongoing balance before an invoice is finalized. At 288.00 credits it crosses the 300-credit alert threshold. Below 200 credits, an automatic purchase of 812.00 credits goes pending, then its payment fails. The ongoing balance reaches zero and a depletion alert fires. A successful manual purchase of 1,000.00 credits restores it to 1,000.00.

Trusted by the most innovative companies

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

Know every balance.
Before your customers ask.

Customers see what they have left.
Finance can collect cash before usage, not after.

See how wallets workExplore prepaid credits
Wallet
JDJake Dennisond8588d09-78eb-4485-9e4e
Tokens1 credit = $1.00Active
Balance1,460.00 credits$1,460.00
Ongoing balance1,160.00 credits$1,160.00
ExpireNo expiration date
Total invoiced: 40.00 credits | $40.00
Activity
TransactionsAmount
Credits voidedJan. 09, 2025-15 credits$15.00
Credits invoicedJan. 09, 2025-15 credits$15.00
Manual credits purchasedJan. 09, 2025+15 credits$15.00
Automatic credits purchasedPending • Jan. 09, 2025+15 credits$15.00
Automatic credits purchasedFailed • Jan. 09, 2025+15 credits$15.00
Credits offeredJan. 09, 2025+15 credits$15.00

Know the ongoing balance.Lago waits until newly ingested usage is included before refreshing the wallet. The ongoing balance, including current usage and taxes, typically updates in under a second after an event lands.

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

AI credits for your agents

A budget per agent

Give each agent its own prepaid credits. Scope a wallet to the metrics it burns, like LLM tokens.

Every token, priced live

The Agent SDK meters and prices each LLM call. Once its usage lands, the agent's ongoing balance typically updates in under a second.

Stops you control

Lago sends balance alerts as an agent's credits run low or reach zero. Your product can use them to pause the agent.

Fund an agent in one command

Create an agent's wallet from the API, the CLI or MCP, with its credits and an automatic top-up. Your agents can check their own balance too.

Create a prepaid credits wallet for an AI agent with the Lago CLI:

lago wallets create --input @agent-wallet.json --output json

The research agent's wallet holds 500 credits. Whenever its ongoing balance drops below 50 credits, Lago tops it back up to 500.

{
  "wallet": {
    "external_customer_id": "research_agent",
    "name": "Agent budget",
    "credits_ongoing_balance": "500.0",
    "recurring_transaction_rules": [
      {
        "trigger": "threshold",
        "method": "target",
        "threshold_credits": "50.0",
        "target_ongoing_balance": "500.0"
      }
    ]
  }
}

Credits & Spend Control FAQ

Does Lago update prepaid credit balances in real time?

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.

See the event-to-wallet flow and wallet documentation.

Can Lago handle negotiated enterprise contracts?

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.

Explore customer-specific pricing.

Do I need to self-host Lago or manage billing infrastructure?

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.

Explore managed Lago Cloud.

Which wallet balance should I use to show customers their remaining credits?

Use the ongoing balance to show remaining credits after current usage, including taxes and draft invoices. It gives customers visibility into their spending before the next invoice is finalized.

The invoiced balance shows the credits remaining after finalized invoices have been deducted.

Explore wallet balances.

Can Lago automatically top up credits when a customer’s balance runs low?

Yes. Set a balance threshold and configure Lago to trigger a top-up that adds a fixed number of credits or refills the wallet to a target balance.

You can also schedule recurring top-ups, for example, to provide a monthly credit allowance. Purchased credits become available after successful payment.

Explore automatic top-ups.

Can I stop usage when a customer runs out of prepaid credits?

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.

Explore credit balance alerts.

Can I choose which charges a customer’s prepaid credits cover?

Yes. Scope a wallet to specific fee types or billable metrics, for example, to cover API usage while keeping subscription fees payable separately.

Lago automatically applies eligible credits to subscription and progressive billing invoices in the wallet’s currency, after taxes and credit notes.

Explore wallet scope.

When can customers start using purchased or free credits?

Purchased credits become available in the customer’s wallet once payment is confirmed. Free credits are available as soon as you grant them.

You can also choose whether Lago issues the credit-purchase invoice when the top-up is created or after successful payment.

Explore credit purchases and grants.

Can I choose whether prepaid credits expire or roll over?

Yes. Credits roll over between billing periods by default, remaining available until consumed.

For time-limited credits, set an expiration date on the wallet. Lago automatically voids the remaining credits when that date arrives.

Explore credit expiration.

Can I manage customer spending without requiring prepaid credits?

Yes. Use Lago’s usage alerts to trigger notifications when a customer’s usage or spending crosses thresholds you define.

You can also enable progressive billing to generate invoices as cumulative usage reaches configured thresholds, letting you bill throughout the billing period and manage outstanding balances.

Explore usage alerts and progressive billing.

Can I trace how purchased and promotional credits were used?

Yes. Lago links each wallet deduction to the purchases or grants that funded it, including the amount contributed by each. You can also start from a credit purchase and see which deductions consumed it.

Explore these records in the dashboard or through the API to reconcile credit movements.

Explore credit traceability.

Lago solves complex billing.