Skip to main content
Browse: Latest · 2025 · 2024 · 2023 · 2022
API

Lago Open API

We have developed an Open API to help you get started with Lago and make it easier to test our solution.Please refer to the documentation to learn how to import the Lago Open API into Postman and create a new collection.Our public repository is also available on GitHub.
InvoicingSubscriptions

Apply several coupons

You can now apply several coupons to a customer account.When several coupons are applied to a customer, they will be deducted according to the date on which they were applied: the coupon that was applied first will be deducted first.The remaining value / number of remaining periods for each coupon will be visible in the Overview tab of the customer view.You can also use GET /api/v1/applied_coupons to retrieve all coupons applied to a customer.

Invoice details

To review the invoice details through the user interface:
  1. Go to the Customers section
  2. Select a customer to open the customer view
  3. Open the Invoices tab
  4. Click the invoice to see its details
On the details page, you can download the invoice in PDF format and copy the invoice ID through the Actions dropdown in the upper right corner.
Lago invoice details view.
SubscriptionsUsage & meteringPaymentsIntegrations

Integration with GoCardless

Lago now offers native integration with GoCardless, including (but not limited to):
  • Ability to define GoCardless as the default payment provider for a customer
  • Ability to automatically create Lago customers in GoCardless and retrieve their customer ID
  • Ability to automatically collect payments via direct debit
  • Ability to automatically update the status of an invoice depending on the payment status
  • Ability to automatically resubmit failed payments with GoCardless Success+
To learn more about this integration, please consult our guide.

Subscription date

It is now possible to set a start date in the past or in the future for a new subscription.Setting a start date in the past can be useful when migrating existing customers to Lago, while setting a start date in the future can be useful for scheduling upcoming subscriptions.For more information about the impact of the start date on the invoicing process, please refer to the documentation.

Dimensions for grouping events

When creating a new billable metric, you can define dimensions that will be used to group events according to their properties.For example, if you want to charge your customers for compute capacity according to the cloud provider and server region, you can create a compute billable metric with two dimensions (learn more).Changes to the API include:

Enhanced coupon model

We have improved the coupon model to offer more flexibility.Changes include (but are not limited to):
  1. Ability to define the value of a coupon as a fixed amount or percentage
  2. Ability to create recurring coupons that apply over several billing periods
  3. Ability to set an expiration date (i.e. date after which the coupon can no longer be redeemed)
Learn more

Customer currency

It is now possible to define the currency at customer level.The currency associated with each customer was previously defined by the currency of the plan assigned to the customer. This logic prevented users from assigning a coupon or an add-on to a customer before creating a subscription.When creating a new customer via the user interface or the API, you can now select the currency associated with the customer. If the currency is not defined at customer level, it will be determined by the first object assigned to the customer (i.e. currency of the plan, add-on, coupon, or wallet).
⚠️ Once an object has been assigned to the customer (i.e. plan, add-on, coupon, or wallet), the currency associated with the customer cannot be changed.

Error management

We have refactored the error management system to give more visibility to API users.The message attribute for errors has been replaced with code and error_details, which provide more information about the errors. There are several codes associated with each error.For example, when creating a new billable metric, the API may return "error": "Unprocessable entity" with the code value_is_mandatory for the name field (i.e. the name of the billable metric is missing).Please refer to the documentation available for each endpoint for more information on error codes.
SubscriptionsSecurity & access

Invite members

You can now invite your teammates to join your Lago account.To add a new member via the user interface:
  1. Go to the Settings section of the app
  2. Open the Members tab
  3. Click Invite a member on the right
  4. Enter the email address of your teammate
  5. Click Generate invitation link to confirm
  6. Copy the invitation link to share it with your teammate
Invitation links have no expiration date. When your teammate clicks the link, they can choose their password and then access the account.You can remove a member by clicking the bin icon on the right of the list of members.
ℹ️ All members have the same role and permissions.

Overwrite plans

If after a negotiation phase, you need to create a custom plan for an important customer, you can use the ‘overwrite’ feature, available through the user interface.This feature allows you to create a new plan from an existing one, in order to adjust the plan model and charges according to your business needs.Overwriting a plan has no impact on the original plan or existing subscriptions.Learn more

Recurring count

Companies with fair and transparent pricing models are often praised by customers. If you are considering implementing seat-based pricing for instance, the reccuring_count aggregation is exactly what you need.This new aggregation type allows you to push events for persistent units.Consider the following example:
Your customer is on a monthly plan and adds a new user to their account on September 15th, so you generate an event that corresponds to one billing unit. At the end of September, Lago will automatically create a prorated charge for this user, based on the number of days of activity (i.e. from September 15th to September 30th). This billing unit will remain valid until you generate another event to remove it. For instance, if your customer deletes the user on October 22nd, Lago will create another prorated charge for the period October 1st to October 22nd.
Consult our guide to learn more about persistent units.

External IDs

We are introducing changes to the API that will make it easier to manage subscriptions:
  • For the creation of new subscriptions, subscription_id and unique_id will be removed and replaced with external_id (required)
  • For all other endpoints, subscription_id will be replaced with external_subscription_id
This will allow you to operate via the API using your own identifiers and save you the trouble for storing our IDs.In addition to this, for consistency purposes:
  • For the creation of new customers, customer_id will be replaced with external_id
  • For all other endpoints, customer_id will be replaced with external_customer_id`
These changes will come into effect on September 8, 2022.Please get in touch with our team if you have any questions.
SubscriptionsAnalyticsAPI

Volume charge model

The new volume charge model allows you to create a tiered pricing structure and then calculate a unit price that applies to all units depending on total volume.It is similar to the graduated charge model, except that only one price tier applies at the end of the billing period.Please refer to the guide and API documentation for more information.

Anniversary dates for subscriptions

When assigning a plan to a customer, you can now choose whether the subscription should be renewed at the beginning of the period or on its anniversary date.For instance, if a monthly plan is assigned to a customer on August 10th and you choose to align the billing cycle with the anniversary date of the subscription, the customer will be billed every 10th of the month.With the API, you can use the billing_time attribute to choose your preferred option. If not provided, Lago will base the subscription on calendar periods.Learn more

Free units for the percentage charge model

We have released an enhanced version of the percentage charge model, including:
  • Ability to define free units based on the number of events (e.g. first 3 events are free)
  • Ability to define free units based on the total amount (e.g. first $500 are free)
Please refer to the documentation for more information.

Multiple plans

It is now possible to assign multiple plans to a customer (e.g. if your customer needs to create several workspaces on your platform, you can link a plan to each workspace).To help differentiate each plan, you can add display names that will appear in the user interface and on invoices.Kindly note that:
  1. All plans must be denominated in the same currency
  2. You must now specify the subscription_id for each event or create batch events
Click here to see the documentation

Tracking & Analytics

To help us better understand your needs, we have added a tracking module to the self-hosted version of Lago.Data analytics will help us improve the quality of our product and performance of the API.As the privacy of our users is of paramount importance, we will not collect any personal information about your customers or the amount of your invoices, and you can opt out at any time.Learn more

Go client

We have added a new API client to make it easier for Go users to set up their billing system with Lago.Click here to see the documentation
InvoicingAPIUsage & metering

App version

It is now possible to check the version of the Lago application you are using.Click on of your organization's name in the top-left corner of the user interface to see the app version currently in use.
Lago application version displayed in the interface.

Current usage

Good news for those who follow closely the consumption of their customers. You can now track the current billing usage of your customers either from the UI or from the API.To access this Usage tab:
  1. Access your list of customers
  2. Select a specific customer that is already linked to a subscription
  3. Access the usage tab
  4. Get a complete view of usage-based consumption that is going to be billed on the next invoice
On top of that, you can fetch the current usage of a customer directly from the API. To do so, you can access the following endpoint GET /api/v1/customers/:customer_id/current_usage
Lago customer current usage for the ongoing billing period.

PDF invoices

Lago will generate a PDF file for each new invoice.You can download invoices via the user interface or the API and can also modify some of the elements included in the invoice template.Full documentation available here.

New API endpoints

We like our users when they use our nice and clean UI, but we also love when they use our API. One of the usecase could be to use Lago as a white-labeled solution.Here is the full list of endpoints we have just released:Billable metrics
  • Create a billable metric POST /api/v1/billable_metrics
  • Update a billable metric PUT /api/v1/billable_metrics/:code
  • Destroy a billable metric DELETE /api/v1/billable_metrics/:code
  • Fetch a specific billable metric GET /api/v1/billable_metrics/:code
  • Fetch all billable metrics GET /api/v1/billable_metrics?per_page=2&page=1
Plans
  • Create a plan POST /api/v1/plans
  • Update a plan PUT /api/v1/plans/:code
  • Destroy a plan DELETE /api/v1/plans/:code
  • Fetch a specific plan GET /api/v1/plans/:code
  • Fetch all plans GET /api/v1/plans?per_page=2&page=1
Coupons
  • Create a coupon POST /api/v1/coupons
  • Update a coupon PUT /api/v1/coupons/:code
  • Destroy a coupon DELETE /api/v1/coupons/:code
  • Fetch a specific coupon GET /api/v1/coupons/:code
  • Fetch all coupons GET /api/v1/coupons?per_page=2&page=1
Add-ons
  • Create a add_on POST /api/v1/add_ons
  • Update a add_on PUT /api/v1/add_ons/:code
  • Destroy a add_on DELETE /api/v1/add_ons/:code
  • Fetch a specific add_on GET /api/v1/add_ons/:code
  • Fetch all add_ons GET /api/v1/add_ons?per_page=2&page=1
Current usage
  • Get the current usage of a specific customer GET /api/v1/customers/:customer_id/current_usage
Organization
  • Update the information of your organization PUT /api/v1/organizations
PaymentsSubscriptionsInvoicingUsage & metering

Integration with Stripe Payments

Lago now offers native integration with Stripe, including (but not limited to):
  • Ability to create Lago customers in Stripe automatically and retrieve their customer ID
  • Ability to define Stripe as the default payment provider for a customer
  • Ability to generate payment intents automatically
  • Ability to update the status of an invoice depending on the payment status
  • Ability to receive a webhook when a payment fails
To learn more about this integration, please consult our guide.

Weekly plan interval

When setting up a plan, you can select the weekly interval to define a weekly billing period.The plan interval applies to the subscription and charges, which means that:
  • For plans that must be paid in advance, the subscription fee is invoiced at the beginning of the week
  • For plans that are paid in arrears, the subscription fee is invoiced at the end of the week
  • Usage is calculated at the end of each week
The week starts on Monday and ends on Sunday. If the customer’s subscription starts in the middle of the week, the fees will be applied on a pro-rata basis.

Invoice monthly charges for a plan paid yearly

Before the release of this feature, usaged-based features (charges) were following the plan period. If the plan period was invoiced yearly, the charges were invoiced yearly.It’s now possible to invoice billable metrics on a monthly basis for a plan billed yearly. The base amount of the plan will be invoice yearly (in-arrears or in-advance), but your usage based features will be invoiced on a monthly basis.To do so:
  1. Access a Plan
  2. Define a plan yearly
  3. Price additional charges from your billable metrics
  4. Turn on the toggle for applying charges monthly
By switching on, all the charges will be invoiced monthly even if the plan is yearly.
ℹ️ The last invoice is gathering both the subscription and the usage-based charges

Events list

You are now able to view all the ingested events sent from your application to Lago. We called this feature Events list because it makes the event ingestion easier and more understandable.
  1. Access the Developer sidebar item
  2. Click the Events tab
  3. Take a look at the latest events ingested
ℹ️ If an event you sent is not shown in the UI, it means that it has not been ingested by Lago
This events list is also helpul to warn you for 2 specific cases:
  1. Warning 1 - The event code is not related to an existing billable metric
  2. Warning 2 - The property sent does not match the aggregation property defined in your billable metric
Lago events list showing ingested usage events.

Add-ons

Add-ons are now available on Lago. Create add-ons to apply one-time fees (e.g. setup fee, one-time purchase, etc.) and generate the corresponding invoices instantly.Full documentation available here.
Subscriptions

Pay-as-you-go template

We’ve added a new template to our collection: click here to learn how to replicate Algolia’s pay-as-you-go pricing.It’s a great starting point for companies whose pricing fully depends on usage, such as cloud service providers and API companies.With Lago, you can adapt this template to your products and services, using some of our most popular features, including the ‘sum’ aggregation type and the package charge model.

Coupons

Introducing coupons, a new feature that allows you to offer discounts to your customers.Full documentation available here.
Subscriptions

Subscription changes

You can now modify the subscription assigned to a customer through the user interface.To learn how to upgrade or downgrade a subscription and how it affects billing, please refer to the documentation.

Package pricing for charges

It is now possible to apply a package pricing model to a charge. To do so:
  1. Select an existing plan (or create a new one)
  2. Add a charge
  3. Select the package pricing model
This new pricing model allows you to apply a flat fee to a range of units. The price will be fixed for the entire range, regardless of the number of units consumed by the customer during the billing period.

Percentage charge model

Inside the plan, when creating a charge, you can now select the percentage charge model.This feature is useful for industries willing to take a % + fixed fee out of a usage-based features (for banking or charity industry, for instance). These fees are applied on the units to be charged (e.g. the aggregation result of your billable metric).