Skip to main content
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.

Example agreement and expected invoice

Assume a 100monthlybasefeebilledinarrears∗∗and∗∗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: 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 for API calls. Create a monthly plan with a 100recurringfeeanda100 recurring fee and a 0.01 standard usage charge. 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 and assign the plan. Your signup application must create or identify the same customer in Lago; the API reference covers the production integration.
  3. Connect payment collection. Configure Stripe Payments, 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. 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 for the configured subscription, then compare its line items with the agreed pricing and independently calculated usage. At period end, inspect the generated invoice 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 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. Lago Cloud does not provide a built-in sandbox inside the same organization. Do not send a live payment request while testing the example.