> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getlago.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Self-serve subscription and usage billing

> Follow a Lago Cloud customer from signup to a recurring and usage invoice, payment, and Finance review.

This example is a SaaS customer who signs up online, pays a monthly base fee, and incurs a charge for each API call. Lago Cloud calculates the charges and generates the invoice; Stripe Payments processes the payment after you [connect it to Lago](/guide/payments/stripe-integration).

## Example agreement and expected invoice

Assume a **$100 monthly base fee billed in arrears** and **$0.01 per API call**, with no included units, credits, discounts, or tax. If the customer makes 12,000 billable calls in the month, the expected pre-tax invoice is:

| Illustrative invoice line | Calculation | Amount |
| - | - | -: |
| Monthly subscription | \$100 | \$100 |
| API usage | 12,000 × \$0.01 | \$120 |
| **Total before tax** | | **\$220** |

This table is an independent arithmetic check, not an invoice generated from a Lago account. Your actual invoice depends on the plan, billing period, event data, taxes, credits, and customer settings you configure.

## Set up and check the workflow

1. **Configure the charges.** Create a `COUNT` [billable metric](/guide/billable-metrics/create-billable-metrics) for API calls. Create a monthly [plan](/guide/plans/overview) with a $100 recurring fee and a $0.01 [standard usage charge](/guide/plans/charges/charge-models/standard). Set the subscription fee to bill in arrears in the plan if you want both lines on the period-end invoice shown above.
2. **Create and subscribe the customer.** Add the [customer](/guide/customers/customer-management) and [assign the plan](/guide/subscriptions/assign-plan). Your signup application must create or identify the same customer in Lago; the [API reference](/api-reference/intro) covers the production integration.
3. **Connect payment collection.** Configure [Stripe Payments](/guide/payments/stripe-integration), set the customer's payment provider and payment method, and check the customer-facing checkout or payment link. Lago initiates collection through the integration; Stripe handles payment processing.
4. **Send and check usage.** Your application sends one event per billable API call using [usage ingestion](/guide/events/ingesting-usage). Check the event code, subscription identifier, timestamp, and deduplication behavior before relying on an invoice total.
5. **Review the bill.** Use the Premium [invoice preview](/guide/invoicing/previews) for the configured subscription, then compare its line items with the agreed pricing and independently calculated usage. At period end, inspect the [generated invoice](/guide/invoicing/overview) and its payment status. A preview is an estimate; the finalized invoice reflects the billing data and settings in effect when it is issued.
6. **Hand off to Finance.** Follow the [Finance invoice workflow](/guide/lago-cloud/finance-workflow) to filter invoices, review payment status, export line items, and reconcile the accounting destination.

For synthetic tests, use an isolated organization and the [integration testing guide](/guide/integration-testing). Lago Cloud does not provide a built-in sandbox inside the same organization. Do not send a live payment request while testing the example.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.