A subscription is created when a plan is assigned to a customer. You can assign a plan to a customer at any time (i.e. when the customer record is created or later on).
To assign a plan to a customer through the user interface:
To assign a plan to a customer through the user interface:
When a subscription is active, Lago will automatically generate invoices for the customer according to the plan model. It will also start monitoring the customer’s consumption, which means that you can start pushing events related to this subscription.
The subscription date displayed in the app is based on the organization’s timezone.
Optimize billing for your customers by assigning subscriptions based on either calendar dates or anniversary dates (the day they signed up).
By default, subscriptions are based on calendar periods. Therefore, if you assign a monthly plan to a customer on July 14th:
When a subscription starts during the month, the subscription fee will be calculated on a pro rata basis according to the number of days.
Consider the following example:
Your customer signs up for the Premium plan, $50 monthly, on August 10th. There are 22 days left until the end of the month, including August 10th. Therefore, the subscription fee for August is: 22 days x $50 / 31 days = $35.48
Calendar billing cadence
By default, subscriptions are based on calendar periods. Therefore, if you assign a monthly plan to a customer on July 14th:
When a subscription starts during the month, the subscription fee will be calculated on a pro rata basis according to the number of days.
Consider the following example:
Your customer signs up for the Premium plan, $50 monthly, on August 10th. There are 22 days left until the end of the month, including August 10th. Therefore, the subscription fee for August is: 22 days x $50 / 31 days = $35.48
Calendar billing cadence
Another option is to use the anniversary date of the subscription to define a custom billing period.
For example:
Your customer signs up for the Premium plan on August 10th. If you choose to align the billing cycle with the anniversary date of the subscription, the customer will be billed every 10th of the month. The first billing period will run from August 10th to September 9th.
Anniversary billing cadence
By default, the subscription starts the day it is created. However, you can set a subscription date in the past or in the future. The subscription date displayed in the app is based on the organization’s timezone. However, you can decide to start a subscription in the past or in the future.
If the start date of the subscription is in the past, the subscription is considered active.
Lago will not generate any invoices for past periods already completed.
The invoicing process varies depending on the plan model and billing cycle:
Example 1: Start date in the past and subscription fee to be paid in advance
Illustration for start date in the past and subscription fee in advance
Example 2: Start date in the past and subscription fee to be paid in arrears
Illustration for start date in the past and subscription fee in advance
If the start date of the subscription is in the past, the subscription is considered active.
Lago will not generate any invoices for past periods already completed.
The invoicing process varies depending on the plan model and billing cycle:
Example 1: Start date in the past and subscription fee to be paid in advance
Illustration for start date in the past and subscription fee in advance
Example 2: Start date in the past and subscription fee to be paid in arrears
Illustration for start date in the past and subscription fee in advance
If the start date of the subscription is in the future, the subscription is considered pending.
The invoicing process varies depending on the plan model and billing cycle:
Example 3: Start date in the future and subscription fee to be paid in advance
Illustration for start date in the future and subscription fee in advance
Example 4: Start date in the future and subscription fee to be paid in arrears
Illustration for start date in the future and subscription fee in arrears
By default, if no subscription end date is specified, the subscription will automatically renew at the end of the period.
However, if you define an end date, the subscription will terminate on that date without renewal. This is valuable for contracts with specific termination dates.
Keep in mind, 45 days and 15 days before the subscription ends, a webhook alert, called subscription.termination_alert
, will remind you. You then have two choices:
Ensure that the subscription end date is set to a date later than the subscription start date.
Here is how you can define a susbcription end date from the UI:
Here is how you can define a susbcription end date from the UI:
Use the ending_at
field on the subscriptions endpoint.
You may create several subscriptions for a customer by assigning them multiple plans. This can be particularly useful if your application allows customers to create different projects or workspaces (e.g. Free plan for Workspace 1, Free plan for Workspace 2, Premium plan for Workspace 3, etc.).
There are some rules to keep in mind when assigning multiple plans to a customer:
external_subscription_id
for each event or create batch events.It is possible to subscribe a customer to multiple plans using different billing cycles (e.g. a subscription based on calendar dates and another based on the anniversary date).
We recommend that you give each subscription a name when assigning multiple plans to a customer. The subscription names will make it easier to differentiate each plan and will also be displayed on the invoices.
When multiple subscriptions are linked to a customer, Lago will automatically consolidate invoices when possible.
Month 1 | Month 2 | Month 3 | Month 4 | (…) | Month 13 | |
---|---|---|---|---|---|---|
Plan A (monthly) | $40 | $40 | $40 | $40 | (…) | $40 |
Plan B (monthly) | $60 | $60 | $60 | $60 | (…) | $60 |
Plan C (yearly) | $500 | - | - | - | (…) | $500 |
Total invoice | $600 | $100 | $100 | $100 | (…) | $600 |
PREMIUM FEATURE ✨
This feature is only available to users with a premium license. Please contact us to get access to Lago Cloud and Lago Self-Hosted Premium.
By assigning a subscription to a customer, you gain the flexibility to customize certain aspects of the initially selected plan. This enables you to maintain a consistent plan structure for all customers while tailoring individualized discounts through price adjustments per customer.
To perform a plan overrides, assign a plan to a customer and you’ll be able to make modifications to the following elements:
To perform a plan overrides, assign a plan to a customer and you’ll be able to make modifications to the following elements:
It’s crucial to note that all overridden plans will remain associated with the initial plan but won’t be visible in the plans list. To access an overridden plan, simply click on the specific subscription item in the customer details view.
Moreover, all invoices generated from this subscription will be based from the overridden plan, not the initial plan. Additionally, any coupons restricted to a plan code will apply to both the initial and overridden plans.
Importantly, any changes made to the initial plans will not impact the subscriptions linked to overridden plans.
You could delete a plan linked to existing subscriptions.
If you do so, the subscriptions associated with this plan will be immediately terminated. This action may trigger the generation of invoices and/or credit notes.
After deleting a plan, you can create a new one using the same code.