This step-by-step integration guide will help you get started with Lago.
At the moment, each Lago account is associated with a unique environment. It is currently not possible to have your test environment and production environment in the same account.
However, we can suggest different workarounds:
Please note that the above workarounds will require you to replicate the same setup in both environments.
In the future, you will be able to get access to a test environment and a production environment with the same Lago account.
To define a billable metric through the user interface:
To create a plan through the user interface:
To create a customer through the user interface:
You can also create customers through the API, as described in the documentation.
To start a subscription, you need to assign a plan to an existing customer. To do so through the user interface:
A success toast will be displayed and the new subscription will appear in the customer view.
You can also start a subscription through the API, as described in the documentation.
Events sent from your backend to Lago will be automatically aggregated according to the predefined billable metrics. To start sending usage-based events, please refer to the documentation.
At the end of the billing period, Lago will automatically generate an invoice for each customer. Invoices will be sent to your application using webhooks. To define the URL to which the webhooks will be sent:
To learn more about webhooks and invoices, please refer to the API documentation.