---
title: "Lago Cloud walkthrough: from usage to credits and an invoice"
url: https://getlago.com/blog/lago-cloud-usage-to-invoice
description: "Follow one usage event through managed Lago Cloud: pricing, ongoing credits, an invoice, and the responsibilities your team integrates."
authors: ["Anh-Tho Chuong"]
tags: ["Engineering"]
published: 2026-11-14
reading_time_minutes: 3
---

# Lago Cloud walkthrough: from usage to credits and an invoice

An API customer has $100 of prepaid credit. They use 250 units at $0.02 each. Lago calculates $5 of usage, reflects it in the wallet's ongoing balance, and applies $5 of credit when the subscription invoice is finalized. The customer has $95 left and owes $0 on that invoice.

This worked example follows the documented Lago workflow. The values below are illustrative, not a recording of a live customer account. It uses one USD subscription, one eligible wallet, no base fee, no taxes, and no discounts. The $0.02 rate is the example merchant's price to its customer, not Lago's service price.

### 1. Send the usage; Lago operates the billing service

For a recorded setup, watch [Lago's seven-minute BigQuery-style walkthrough](https://www.youtube.com/watch?v=EaRi97Q2BcQ). It covers a billable metric, pricing plan, customer wallet, free credits, and a usage event. Recorded in July 2024, it uses free upfront credits and an earlier interface; its configuration differs from the purchased-credit example here.

With [managed Lago Cloud](https://getlago.com/docs/guide/lago-cloud), Lago runs the application, databases, event pipeline, monitoring, and upgrades. Your team connects the product and defines what customers pay for. Cloud is available in the US and EU; the team confirms your region and plan during setup.

For this example, configure a sum metric named **api\_units** over the **units** property, a subscription with a standard charge of $0.02 per unit, and a USD wallet where one credit equals $1. Start with 100 purchased credits whose payment is already confirmed. Purchased credits become available after payment confirmation.

Your application produces a durable usage record and sends it to Lago's events API. Inside the request's **event** object, this example has these fields:

| Event field | Example value |
| --- | --- |
| transaction\_id | usage\_acme\_0001 |
| external\_subscription\_id | acme\_api |
| code | api\_units |
| timestamp | 1794528000 |
| properties.units | 250 |

Use the actual occurrence time of your usage record within the active subscription period. Keep that timestamp and transaction ID unchanged when retrying the same event. On the ClickHouse event pipeline, changing the timestamp can create another billable event. An accepted request still needs to be processed before its usage appears in billing. See the [event ingestion guide](https://getlago.com/docs/guide/events/ingesting-usage) for delivery, retry, and late-event handling.

### 2. Follow the usage into credits and the invoice

Lago aggregates the 250 units against the subscription's price: **250 × $0.02 = $5**. On a plan with real-time wallet balances, the ongoing balance accounts for current usage before the invoice is finalized. Confirm the required entitlement on the [pricing page](https://getlago.com/pricing).

| Stage | Usage in the open period | Invoiced wallet balance | Ongoing balance | New amount due |
| --- | --- | --- | --- | --- |
| Start, after funding is confirmed | $0 | $100 | $100 | None |
| Usage processed, before invoicing | $5 | $100 | $95 | No finalized invoice yet |
| Subscription invoice finalized | $0 in the next period | $95 | $95, assuming no new usage | $0 on the finalized invoice |

The two balances answer different questions. The invoiced balance reflects credits already settled against invoices. The ongoing balance also includes current usage and applicable taxes. It is updated asynchronously; your application must allow for processing lag. The [wallet guide](https://getlago.com/docs/guide/wallet-and-prepaid-credits/overview) explains both.

At the end of this example's billing period, Lago generates the subscription invoice and applies eligible prepaid credits:

| Invoice item | Amount |
| --- | --- |
| API usage: 250 units × $0.02 | $5.00 |
| Tax | $0.00 |
| Prepaid credits applied | -$5.00 |
| Amount due | $0.00 |

The wallet has $95 of credit remaining.

The initial credit purchase and the usage invoice are separate records. The usage invoice uses the existing credit; it does not charge the same $5 again. If eligible credit cannot cover an invoice, the remaining amount is due under the customer's payment terms. Prepaid credits apply to eligible subscription invoices, not one-off invoices.

To inspect the trail, follow the invoice's usage and fees, then the outbound wallet transaction. Lago's [wallet traceability views](https://getlago.com/docs/guide/wallet-and-prepaid-credits/traceability) link that deduction to the top-up transactions that funded it. Retain your source usage record to reconcile the quantity and price independently.

### 3. Keep the integration responsibilities visible

Your team owns event collection and reliable delivery, customer and subscription identifiers, pricing configuration, and the product's response to balances and alerts. Your application or gateway enforces access limits. Lago does not synchronously stop a request at the moment it consumes the last credit.

Lago Cloud operates the billing service and processes the configured metering, pricing, wallet, and invoice workflow. Your chosen payment provider executes payments; your finance integrations move the resulting records into your reporting and accounting systems.

[Laravel's engineering retrospective](https://laravel.com/blog/1m-deploys-on-laravel-cloud-lessons-on-billing-admin-integrations) shows a real integration boundary: its team built a billing application that collects infrastructure usage, stores immutable events, and sends them to Lago with retry handling. The [Laravel customer story](https://getlago.com/blog/laravel-billing) documents how its engineers automate pricing through Lago's API. The numerical example above is independent of Laravel's configuration and results.

For an evaluation, bring one usage record, one price, and the expected invoice. Confirm the matching subscription, replay the same event safely, inspect both wallet balances, and reconcile the invoice and wallet deduction. [Walk through your pricing model with Lago](https://getlago.com/book-a-demo).
