If Billable metrics are made to measure customer usage, Plans are made to apply prices to this usage.
Note that you don’t need to define a Billable metric to create a Plan. However, if you have usage feature to charge, the price of your Billable metrics is defined inside each Plan. Make sure to understand how to create a Billable metric first.
A Plan defines the features your customers have access to, the prices paid to access them and the invoicing cadence. In order to invoice a Customer with Lago, you must assign a Plan to a customer.
But first, let’s define the structure of a Plan:
name
code
description
interval
amount
with the currency
trial period
in daysmodel
amount
and its currency
(automatically inherited from the
currency of the Plan)name
code
description
interval
amount
with the currency
trial period
in daysmodel
amount
and its currency
(automatically inherited from the
currency of the Plan)Plans can be fully edited as long as they are not linked to a customer (i.e., no active subscriptions). Once a plan is assigned to a customer, you can modify subscription prices, add or remove charges, and adjust them. However, other settings—such as the “plan interval,” “pay in advance” options, and pro-rated charges—become fixed and cannot be edited once assigned to a customer.
Any edits to a plan will instantly impact all subscriptions linked to it.
Please note: If this plan is linked to overridden subscriptions, you can choose to cascade or not these changes to these overridden subscriptions.
When updating a plan via the API, use the cascade_updates: true
property to ensure that overridden subscriptions are impacted by the changes.
To update plans that are already linked to customers, you will need to either remove all active subscriptions or create a new plan.
To update a specific charge in a plan, the charge must first be removed, then re-added with the updated details.
Plans can be deleted regardless of whether they are linked to a subscription.
Deleting a plan that is linked to a subscription will automatically terminate the subscription, and invoices will be generated.