A subscription is created when you assign a plan to a customer. You can do this at any time, when you create the customer or later on.
Dashboard
API
To assign a plan to a customer through the user interface:
Access the “Customers” section via the side menu;
Select a customer from the list;
In the “Overview” tab, click “Add a plan” on the right;
Select a plan (that you can override if needed - see below);
Give a name to the subscription (name that will be displayed on the invoice - optional);
Give an id to the subscription (define your own subscription identifier - optional);
Set a subscription start date (start date of the subscription - see below);
Set a subscription end date (end date of the subscription - see below - optional);
Define a PO number to be used on invoices generated from this subscription;
Choose whether the subscription should be renewed at the beginning of the period or on its anniversary date (see below);
Under “Subscription activation rule”, select “Activate on successful payment” to hold the subscription until its first payment succeeds (see Activation rules - optional);
In “Invoicing settings”, choose “Consolidate invoices” or “Isolate invoices” (see below - optional); and
When a subscription is active, Lago generates invoices for the customer according to the plan model. It also starts monitoring the customer’s consumption, so you can start pushing events related to this subscription.
The subscription date displayed in the app is based on the organization’s timezone.
Want to hold activation until the first payment clears, so you never open AR for an unpaid subscription? See Activation rules.
Payment terms
Payment terms determine when the subscription’s invoices are due. When assigning a plan, open Invoicing settings and choose a term for this subscription, or keep the inherited customer term. If the customer has no term of their own, the billing entity’s default applies.For example, keep Net 30 for a standard subscription and choose Net 60 for an enterprise subscription belonging to the same customer. For invoices dated April 10, 2026, payment is due on May 10 and June 9, respectively. The different terms require separate invoices.See Payment terms for all six options and dated examples. You can also change an existing subscription’s term.When you upgrade or downgrade the plan, the new subscription keeps this term unless you set a different one during the change.From the API, send payment_term when you create the subscription. This endpoint does not accept the legacy net_payment_term field: if you send it, Lago ignores it and the inherited term applies.
Billing cycles
Bill your customers on calendar dates or on the anniversary date of the subscription (the day they signed up).
Calendar billing period
Anniversary billing period
By default, subscriptions are based on calendar periods. Therefore, if you assign a monthly plan to a customer on July 14th:
The first invoice will be generated for the period July 14th to July 31st;
The next invoice will be generated for the period August 1st to August 31st; and
All future invoices will be generated for full calendar months.
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
Subscription start date
By default, the subscription starts the day it is created. However, you can decide to start a subscription in the past or in the future.
Start date in the past
Start date in the future
If the start date of the subscription is in the past, the subscription is considered active.
Lago does not generate invoices for past periods that are already completed.
If the plan includes a subscription fee to be paid in advance, it will be considered as already paid for the current period. The next invoice will include the usage-based charges for the current period and the subscription fee for the next period (see example 1 below); and
If the plan includes a subscription fee to be paid in arrears, it will be included in the next invoice, together with the usage-based charges for the current period (see example 2 below).
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 arrears
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:
If the plan includes a subscription fee to be paid in advance, when the subscription becomes active, Lago will automatically generate an invoice for the subscription fee. Usage-based charges will be included in the next invoice, generated at the end of the billing period (see example 3 below); and
If the plan includes a subscription fee to be paid in arrears, when the subscription becomes active, there will be no invoice. The subscription fee and usage-based charges will be included in the invoice generated at the end of the billing period (see example 4 below).
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
Subscription end date
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.45 days and 15 days before the subscription ends, Lago sends a subscription.termination_alert webhook to remind you. You then have two choices:
Allow the subscription to continue until the end date and finalize it; or
Adjust the subscription end date if the contract has been renegotiated.
Ensure that the subscription end date is set to a date later than the subscription start date.
Dashboard
API
Here is how you can define a subscription end date from the UI:
Access the “Customers” section via the side menu;
Select a customer from the list;
In the “Overview” tab, click “Add a plan” on the right;
Set a subscription start date;
Set a subscription end date;
Choose between calendar or anniversary billing;
Click “Assign plan” to confirm.
Use the ending_at field on the subscriptions endpoint.
You can 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 (for example Free plan for Workspace 1, Free plan for Workspace 2, Premium plan for Workspace 3).
When assigning multiple plans to a customer, you must specify the external_subscription_id for each event or create batch events.
You can subscribe a customer to multiple plans using different billing cycles, for example one based on calendar dates and another based on the anniversary date.Give each subscription a name when you assign multiple plans to a customer. The names make each plan easier to tell apart, and they appear on the invoices.
Invoice consolidation
When a customer is subscribed to multiple plans, Lago can either group all subscription charges into a single consolidated invoice or issue a separate invoice for each subscription.By default, Lago consolidates subscriptions into a single invoice when they are billed on the same day and share all of the following:
The same payment method;
The same currency;
The same billing entity;
The same PO number (purchase_order_number); and
The same effective payment term.
The effective term is the term that applies after checking subscription, customer, and billing-entity settings. A subscription that inherits Net 30 and one explicitly set to Net 30 share an invoice. A Net 30 subscription and a Net 60 subscription get separate invoices.Terms that always produce the same due date count as the same term. For example, Net 0 and Due on receipt share an invoice, and so do End of month and Net 0 days after end of month.This reduces the number of invoices your customers receive and simplifies payment reconciliation. In the example below, a customer is subscribed to three plans, two billed monthly and one billed yearly, and Lago groups all charges that fall on the same billing date into a single invoice:
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
To keep a specific subscription on its own invoice, for example to bill a different cost center, track a contract independently, or simplify internal reporting, disable consolidation for that subscription. Set the consolidate_invoice field to false on the subscription, either from the dashboard or via the API. Lago then issues a standalone invoice for that subscription, even when other subscriptions for the same customer are billed on the same day.
The consolidate_invoice setting applies at the subscription level, so you can mix consolidated and standalone subscriptions for the same customer. You can update this setting at any time.
Overriding a plan
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.
When you assign a plan to a customer, you can customize parts of it for that subscription.
You keep one plan structure for every customer, and adjust prices per customer where you need to.
Dashboard
API
To override a plan, assign it to a customer. You can then change:
Subscription invoice display name
Subscription fee
Plan currency
Plan trial period
Plan taxes
Charge properties (the charge model cannot be changed)
Fixed charges are also overridden under plan_overrides, using the fixed_charges array. Sending only units (and apply_units_immediately if needed) updates the quantity without creating a plan override. Passing a price or properties creates one. See Update a fixed charge via the API.
An overridden plan stays linked to the initial plan, but it does not appear in the plans list.
To open it, click the subscription in the customer details view.All invoices generated from this subscription are based on the overridden plan, not the initial plan.
Coupons restricted to a plan code apply to both the initial plan and its overrides.By default, changes made to the initial plan do not reach subscriptions linked to an overridden plan. To propagate them, update the plan with cascade_updates set to true. See Editing plans.
Deleting a plan
You can delete a plan that is 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.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Lago","description":"Developer documentation for Lago, the open-source billing platform for usage metering, subscriptions, invoicing, payments, and revenue operations.","colors":{"primary":"#006CFA","light":"#006CFA","dark":"#006CFA"},"logo":{"light":"https://mintcdn.com/lago-docs/zZSJbpe68PHhSs3x/logo/light.svg?fit=max\u0026auto=format\u0026n=zZSJbpe68PHhSs3x\u0026q=85\u0026s=b4af3001527c985b81858b9a0928534c","dark":"https://mintcdn.com/lago-docs/zZSJbpe68PHhSs3x/logo/dark.svg?fit=max\u0026auto=format\u0026n=zZSJbpe68PHhSs3x\u0026q=85\u0026s=1eb7aacac796b0cc6bf05be790a792b1"},"favicon":"https://mintcdn.com/lago-docs/8N-yOElNGe9jRGG5/favicon.svg?fit=max\u0026auto=format\u0026n=8N-yOElNGe9jRGG5\u0026q=85\u0026s=5c319e58dd9b5c5b8a31cf2ad8009a1c","api":{"openapi":"https://swagger.getlago.com/openapi.yaml","mdx":{"server":"https://api.getlago.com/api/v1"}},"background":{"color":{"light":"#F5F5EF","dark":"#131923"}},"navbar":{"links":[{"href":"https://getlago.com/book-a-demo","label":"Book a Demo"}],"primary":{"type":"button","label":"Get Started","href":"https://getlago.com/book-a-demo"}},"footer":{"socials":{"github":"https://github.com/getlago/lago","slack":"https://getlago.com/slack","x":"https://x.com/getlago","linkedin":"https://www.linkedin.com/company/getlago","youtube":"https://www.youtube.com/channel/UCp6ltp7n3SgDVsmerJ7O7ZA"},"links":[{"header":"Documentation","items":[{"label":"Get started","href":"https://getlago.com/docs/guide/introduction/welcome-to-lago"},{"label":"API reference","href":"https://getlago.com/docs/api-reference/intro"},{"label":"Integrations","href":"https://getlago.com/docs/integrations/introduction"},{"label":"Templates","href":"https://getlago.com/docs/templates/introduction"},{"label":"Changelog","href":"https://getlago.com/docs/changelog/product"},{"label":"FAQ","href":"https://getlago.com/docs/faq/about-lago"}]},{"header":"Developers","items":[{"label":"Developer hub","href":"https://getlago.com/docs/developers"},{"label":"Authentication","href":"https://getlago.com/docs/auth"},{"label":"Webhooks","href":"https://getlago.com/docs/guide/webhooks"},{"label":"SDKs","href":"https://getlago.com/docs/developers"},{"label":"OpenAPI spec","href":"https://swagger.getlago.com/"},{"label":"MCP server","href":"https://getlago.com/docs/guide/ai-agents/mcp-server"},{"label":"Self-hosted","href":"https://getlago.com/docs/guide/lago-self-hosted/overview"},{"label":"llms.txt","href":"https://getlago.com/docs/llms.txt"}]},{"header":"Platform","items":[{"label":"Usage metering","href":"https://getlago.com/platform/usage-metering"},{"label":"Billing \u0026 invoicing","href":"https://getlago.com/platform/billing-invoicing"},{"label":"Cash collection","href":"https://getlago.com/platform/cash-collection"},{"label":"Revenue analytics","href":"https://getlago.com/platform/revenue-analytics"},{"label":"Entitlements","href":"https://getlago.com/platform/entitlements"},{"label":"Lago AI","href":"https://getlago.com/platform/ai"},{"label":"Pricing","href":"https://getlago.com/pricing"}]},{"header":"Company","items":[{"label":"About Lago","href":"https://getlago.com/docs/about"},{"label":"Customers","href":"https://getlago.com/customers"},{"label":"Blog","href":"https://getlago.com/blog"},{"label":"Contact","href":"https://getlago.com/docs/contact"},{"label":"Trust center","href":"https://security.getlago.com"},{"label":"Status","href":"https://status.getlago.com"}]}]},"seo":{"metatags":{"canonical":"https://getlago.com/docs","description":"Developer documentation for Lago's API-first billing platform, including OpenAPI, SDKs, webhooks, MCP, authentication, and implementation guides.","keywords":"Lago API, billing API, usage metering API, OpenAPI, billing SDK, Lago MCP"},"organization":{"id":"https://getlago.com/#organization","name":"Lago","legalName":"Get Lago Corp.","url":"https://getlago.com","logo":"https://getlago.com/docs/logo/light.svg","sameAs":["https://github.com/getlago","https://www.linkedin.com/company/getlago","https://x.com/GetLago","https://www.youtube.com/channel/UCp6ltp7n3SgDVsmerJ7O7ZA"]},"indexing":"all"},"fonts":{"heading":{"family":"GT America","weight":700,"source":"fonts/GT-America-Standard-Medium.woff2","format":"woff2"},"body":{"family":"GT America","source":"fonts/GT-America-Standard-Regular.woff2","format":"woff2"}},"styling":{"codeblocks":"dark","latex":true},"integrations":{"ga4":{"measurementId":"G-743BQ9THCG"},"cookies":{"key":"lago_docs_analytics","value":"granted"}},"errors":{"404":{"redirect":false,"title":"Documentation page not found","description":"No Lago documentation exists at this URL. Start at [Lago Developer Documentation](/welcome), browse [Developer Resources](/developers), inspect the [documentation index](/llms.txt) or [sitemap](/sitemap.xml), or search the [API reference](/api-reference/intro)."}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"navigation":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://getlago.com/blog"},{"anchor":"Community","icon":"slack","href":"https://getlago.com/slack"},{"anchor":"GitHub","icon":"github","href":"https://github.com/getlago/lago"},{"anchor":"Status","icon":"signal-bars","href":"https://status.getlago.com/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lago-docs","hasAudioNarration":false,"actualSubdomain":"lago-docs","customDomains":["getlago.com"],"gitSource":{"type":"github","owner":"getlago","repo":"lago-doc","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af5c6195cae6d002f81a42b","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"API References","count":243},{"language":"default","tag":"API Reference","count":243},{"language":"default","tag":"Guide","count":206},{"language":"default","tag":"Integrations","count":54},{"language":"default","tag":"Plans","count":46},{"language":"default","tag":"Resources","count":46},{"language":"default","tag":"Charges","count":39},{"language":"default","tag":"Pricing \u0026 Subscriptions","count":35},{"language":"default","tag":"Subscriptions","count":31},{"language":"default","tag":"Invoices","count":27}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"html{visibility:hidden;background-color:#F5F5EF}@media (prefers-color-scheme: dark){html{background-color:#131923}}html.ready{visibility:visible}.dark .welcome-card{background-color:#1c2535!important;border-color:rgba(255, 255, 255, 0.1)!important;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.3)!important;color:#e5e7eb}.dark .welcome-card:hover{background-color:#243044!important}.dark .welcome-card h3{color:#ffffff}.dark .welcome-card p{color:#9ca3af!important}#changelog-month-nav{padding-left:2.5rem;width:19rem;box-sizing:border-box;margin-bottom:1.75rem;max-height:45vh;overflow-y:auto}#changelog-month-nav .changelog-month-nav__year{margin:0 0 0.5rem;font-size:0.875rem;line-height:1.5rem;font-weight:500;color:#364152}#changelog-month-nav .changelog-month-nav__list{list-style:none;margin:0;padding:0;border-left:1px solid rgba(0, 0, 0, 0.08)}#changelog-month-nav .changelog-month-nav__list a{display:block;padding:0.25rem 0 0.25rem 0.75rem;margin-left:-1px;border-left:1px solid transparent;font-size:0.875rem;line-height:1.5rem;color:#697586;text-decoration:none;transition:color 0.15s ease, border-color 0.15s ease}#changelog-month-nav .changelog-month-nav__list a:hover{color:#121926}#changelog-month-nav .changelog-month-nav__list a.is-active{color:#006CFA;border-left-color:#006CFA;font-weight:500}.dark #changelog-month-nav .changelog-month-nav__year{color:#cdd5df}.dark #changelog-month-nav .changelog-month-nav__list{border-left-color:rgba(255, 255, 255, 0.12)}.dark #changelog-month-nav .changelog-month-nav__list a{color:#9aa4b2}.dark #changelog-month-nav .changelog-month-nav__list a:hover{color:#ffffff}.dark #changelog-month-nav .changelog-month-nav__list a.is-active{color:#4d9bff;border-left-color:#4d9bff}.update-container>div:first-child{display:none}.update-container>div:nth-child(2){flex:1 1 100%;max-width:100%;width:100%}.update-container{gap:0}#footer a[href*=\"utm_campaign=poweredBy\"]{display:none}"}],"page":{"pagePath":"guide/subscriptions/assign-plan","slug":"/guide/subscriptions/assign-plan","pageMetadata":{"title":"Assign a plan to a customer","description":"A subscription is created when you assign a plan to a customer. You can do this at any time, when you create the customer or later on.","href":"/guide/subscriptions/assign-plan"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"A subscription is created when you assign a plan to a customer. You can do this at any time, when you create the customer or later on.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,blockquote:`blockquote`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Frame,Heading,Info,OptimizedImage,Tab,Table,Tabs,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Dashboard`,id:`dashboard`,children:[_jsx(_components.p,{children:`To assign a plan to a customer through the user interface:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Access the `,_jsx(_components.strong,{children:`“Customers”`}),` section via the side menu;`]}),`\n`,_jsx(_components.li,{children:`Select a customer from the list;`}),`\n`,_jsxs(_components.li,{children:[`In the `,_jsx(_components.strong,{children:`“Overview”`}),` tab, click `,_jsx(_components.strong,{children:`“Add a plan”`}),` on the right;`]}),`\n`,_jsxs(_components.li,{children:[`Select a plan (that you can override if needed - `,_jsx(_components.a,{href:`#overriding-a-plan`,children:`see below`}),`);`]}),`\n`,_jsx(_components.li,{children:`Give a name to the subscription (name that will be displayed on the invoice - optional);`}),`\n`,_jsx(_components.li,{children:`Give an id to the subscription (define your own subscription identifier - optional);`}),`\n`,_jsxs(_components.li,{children:[`Set a subscription start date (start date of the subscription - `,_jsx(_components.a,{href:`#subscription-start-date`,children:`see below`}),`);`]}),`\n`,_jsxs(_components.li,{children:[`Set a subscription end date (end date of the subscription - `,_jsx(_components.a,{href:`#subscription-end-date`,children:`see below`}),` - optional);`]}),`\n`,_jsx(_components.li,{children:`Define a PO number to be used on invoices generated from this subscription;`}),`\n`,_jsxs(_components.li,{children:[`Choose whether the subscription should be renewed at the beginning of the period or on its anniversary date (see `,_jsx(_components.a,{href:`#billing-cycles`,children:`below`}),`);`]}),`\n`,_jsxs(_components.li,{children:[`Under `,_jsx(_components.strong,{children:`“Subscription activation rule”`}),`, select `,_jsx(_components.strong,{children:`“Activate on successful payment”`}),` to hold the subscription until its first payment succeeds (see `,_jsx(_components.a,{href:`/guide/subscriptions/activation-rules`,children:`Activation rules`}),` - optional);`]}),`\n`,_jsxs(_components.li,{children:[`In `,_jsx(_components.strong,{children:`“Invoicing settings”`}),`, choose `,_jsx(_components.strong,{children:`“Consolidate invoices”`}),` or `,_jsx(_components.strong,{children:`“Isolate invoices”`}),` (`,_jsx(_components.a,{href:`#invoice-consolidation`,children:`see below`}),` - optional); and`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`“Assign plan”`}),` to confirm.`]}),`\n`]})]}),_jsx(Tab,{title:`API`,id:`api`,children:_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Assign a plan to a customer`,numberOfLines:`16`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`LAGO_URL`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.getlago.com\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`API_KEY`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"__YOUR_API_KEY__\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --location`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$LAGO_URL`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/subscriptions\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`--header `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`--header `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`--data-raw `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"subscription\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"external_customer_id\": \"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"plan_code\": \"premium\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"external_id\": \"my_sub_12345789\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Repository 1\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"subscription_at\": \"2022-08-08T00:00:00Z\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"billing_time\": \"anniversary\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})})})})]}),`\n`,_jsxs(_components.p,{children:[`When a subscription is active, Lago generates invoices for the customer according to the `,_jsx(_components.a,{href:`/guide/plans/plan-model`,children:`plan model`}),`. It also starts monitoring the customer’s consumption, so you can start pushing `,_jsx(_components.a,{href:`/guide/events/ingesting-usage`,children:`events`}),` related to this subscription.`]}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`The subscription date displayed in the app is based on the organization’s timezone.`})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Want to hold activation until the first payment clears, so you never open AR for an unpaid subscription? See `,_jsx(_components.a,{href:`/guide/subscriptions/activation-rules`,children:`Activation rules`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`payment-terms`,children:`Payment terms`}),`\n`,_jsxs(_components.p,{children:[`Payment terms determine when the subscription’s invoices are due. When assigning a plan, open `,_jsx(_components.strong,{children:`Invoicing settings`}),` and choose a term for this subscription, or keep the inherited customer term. If the customer has no term of their own, the billing entity’s default applies.`]}),`\n`,_jsxs(_components.p,{children:[`For example, keep `,_jsx(_components.strong,{children:`Net 30`}),` for a standard subscription and choose `,_jsx(_components.strong,{children:`Net 60`}),` for an enterprise subscription belonging to the same customer. For invoices dated `,_jsx(_components.strong,{children:`April 10, 2026`}),`, payment is due on `,_jsx(_components.strong,{children:`May 10`}),` and `,_jsx(_components.strong,{children:`June 9`}),`, respectively. The different terms require `,_jsx(_components.a,{href:`#invoice-consolidation`,children:`separate invoices`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/guide/invoicing/invoicing-settings/payment-term#choose-a-payment-term`,children:`Payment terms`}),` for all six options and dated examples. You can also `,_jsx(_components.a,{href:`/guide/subscriptions/edit-subscription#change-payment-terms`,children:`change an existing subscription’s term`}),`.`]}),`\n`,_jsx(_components.p,{children:`When you upgrade or downgrade the plan, the new subscription keeps this term unless you set a different one during the change.`}),`\n`,_jsxs(_components.p,{children:[`From the API, send `,_jsx(_components.code,{children:`payment_term`}),` when you `,_jsx(_components.a,{href:`/api-reference/subscriptions/assign-plan`,children:`create the subscription`}),`. This endpoint does not accept the legacy `,_jsx(_components.code,{children:`net_payment_term`}),` field: if you send it, Lago ignores it and the inherited term applies.`]}),`\n`,_jsx(Heading,{level:`2`,id:`billing-cycles`,children:`Billing cycles`}),`\n`,_jsx(_components.p,{children:`Bill your customers on calendar dates or on the anniversary date of the subscription (the day they signed up).`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Calendar billing period`,id:`calendar-billing-period`,children:[_jsxs(_components.p,{children:[`By default, subscriptions are based on `,_jsx(_components.strong,{children:`calendar periods`}),`. Therefore, if you assign a monthly plan to a customer on July 14th:`]}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The first invoice will be generated for the period July 14th to July 31st;`}),`\n`,_jsx(_components.li,{children:`The next invoice will be generated for the period August 1st to August 31st; and`}),`\n`,_jsx(_components.li,{children:`All future invoices will be generated for full calendar months.`}),`\n`]}),_jsxs(_components.p,{children:[`When a subscription starts during the month, the subscription fee will be calculated on a `,_jsx(_components.strong,{children:`pro rata basis`}),` according to the number of days.`]}),_jsx(_components.p,{children:`Consider the following example:`}),_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[`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:\n`,_jsx(_components.strong,{children:`22 days x $50 / 31 days = $35.48`})]}),`\n`]}),_jsx(Frame,{caption:`Calendar billing cadence`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/calendar-date-227bf60245e9d3715d3383098c88c1b0.png?fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=d88cd7ecd443337bed6d1cdbe9f10546`,alt:`Timeline of a monthly subscription billed on calendar periods.`,\"data-og-width\":`2628`,width:`2628`,\"data-og-height\":`544`,height:`544`,\"data-path\":`guide/subscriptions/images/calendar-date-227bf60245e9d3715d3383098c88c1b0.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/calendar-date-227bf60245e9d3715d3383098c88c1b0.png?w=280\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=7a9c4f409238c85e4a7d8bb426e0898e 280w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/calendar-date-227bf60245e9d3715d3383098c88c1b0.png?w=560\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=b50b4f46c0de6f70225242148d6252a5 560w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/calendar-date-227bf60245e9d3715d3383098c88c1b0.png?w=840\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=27e59883297ac3742bc94f4ea49a2de6 840w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/calendar-date-227bf60245e9d3715d3383098c88c1b0.png?w=1100\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=2a7145595277945be7459a7cf52b7157 1100w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/calendar-date-227bf60245e9d3715d3383098c88c1b0.png?w=1650\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=99523f7ef52ed56f5ef3dc79e46c1f4c 1650w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/calendar-date-227bf60245e9d3715d3383098c88c1b0.png?w=2500\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=ba70f753427f51ca799467d991105178 2500w`})})]}),_jsxs(Tab,{title:`Anniversary billing period`,id:`anniversary-billing-period`,children:[_jsxs(_components.p,{children:[`Another option is to use the `,_jsx(_components.strong,{children:`anniversary date`}),` of the subscription to define a custom billing period.`]}),_jsx(_components.p,{children:`For example:`}),_jsxs(_components.blockquote,{children:[`\n`,_jsx(_components.p,{children:`Your customer signs up for the Premium plan on August 10th.\nIf you choose to align the billing cycle with the anniversary date of the subscription, the customer will be billed every 10th of the month.\nThe first billing period will run from August 10th to September 9th.`}),`\n`]}),_jsx(Frame,{caption:`Anniversary billing cadence`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/anniversary-date-c66bee86224946e6e00af9c0cb7eedeb.png?fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=f92c61993ef93e3947982f5a9e2bc7eb`,alt:`Timeline of a monthly subscription billed on its anniversary date.`,\"data-og-width\":`2828`,width:`2828`,\"data-og-height\":`636`,height:`636`,\"data-path\":`guide/subscriptions/images/anniversary-date-c66bee86224946e6e00af9c0cb7eedeb.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/anniversary-date-c66bee86224946e6e00af9c0cb7eedeb.png?w=280\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=939ee142c5cd0837cca9964042edc46c 280w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/anniversary-date-c66bee86224946e6e00af9c0cb7eedeb.png?w=560\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=f0d8cd9d1777ca70a8af7a15d6eb19cf 560w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/anniversary-date-c66bee86224946e6e00af9c0cb7eedeb.png?w=840\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=e556ad1a682f174b468c18267f24abd3 840w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/anniversary-date-c66bee86224946e6e00af9c0cb7eedeb.png?w=1100\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=48d636bb06cc04bb6347b672ea0224f5 1100w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/anniversary-date-c66bee86224946e6e00af9c0cb7eedeb.png?w=1650\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=123075ece332dbed0537dcadac351748 1650w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/anniversary-date-c66bee86224946e6e00af9c0cb7eedeb.png?w=2500\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=e4ddf49bfe07327dcf097a0da958143d 2500w`})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`subscription-start-date`,children:`Subscription start date`}),`\n`,_jsxs(_components.p,{children:[`By default, the subscription starts the day it is created. However, you can decide to start a subscription `,_jsx(_components.strong,{children:`in the past`}),` or `,_jsx(_components.strong,{children:`in the future`}),`.`]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Start date in the past`,id:`start-date-in-the-past`,children:[_jsx(_components.p,{children:`If the start date of the subscription is in the past, the subscription is considered active.`}),_jsx(Info,{children:_jsx(_components.p,{children:`Lago does not generate invoices for past periods that are already completed.`})}),_jsxs(_components.p,{children:[`The invoicing process varies depending on the `,_jsx(_components.a,{href:`/guide/plans/plan-model`,children:`plan model`}),` and `,_jsx(_components.a,{href:`#billing-cycles`,children:`billing cycle`}),`:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`If the plan includes a subscription fee to be paid in advance, it will be considered as `,_jsx(_components.strong,{children:`already paid for the current period`}),`. The next invoice will include the usage-based charges for the current period and the subscription fee for the next period (see example 1 below); and`]}),`\n`,_jsxs(_components.li,{children:[`If the plan includes a subscription fee to be paid in arrears, it will be `,_jsx(_components.strong,{children:`included in the next invoice`}),`, together with the usage-based charges for the current period (see example 2 below).`]}),`\n`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example 1:`}),` Start date in the past and subscription fee to be paid in advance`]}),_jsx(Frame,{caption:`Illustration for start date in the past and subscription fee in advance`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-past-advance-0bedeeb9f9918608568ea7db6479e4ef.png?fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=2d1c16233f9b058dd8e1c07faa091a48`,alt:`Timeline of a subscription starting in the past, with the subscription fee paid in advance.`,\"data-og-width\":`2376`,width:`2376`,\"data-og-height\":`646`,height:`646`,\"data-path\":`guide/subscriptions/images/subscription-past-advance-0bedeeb9f9918608568ea7db6479e4ef.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-past-advance-0bedeeb9f9918608568ea7db6479e4ef.png?w=280\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=c2b8d71607234ea310e23ac106187d38 280w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-past-advance-0bedeeb9f9918608568ea7db6479e4ef.png?w=560\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=36f11d3a187e58445bcf4670c5ebbd42 560w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-past-advance-0bedeeb9f9918608568ea7db6479e4ef.png?w=840\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=537342eceddf180cef0f4fbd309470fe 840w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-past-advance-0bedeeb9f9918608568ea7db6479e4ef.png?w=1100\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=b3e93130e7243f3f6587a3f6948657f9 1100w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-past-advance-0bedeeb9f9918608568ea7db6479e4ef.png?w=1650\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=7bc1e1a53ce9cb023ccb643db445fb40 1650w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-past-advance-0bedeeb9f9918608568ea7db6479e4ef.png?w=2500\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=e8dec36337f5c49b80e7c0f7236be6c5 2500w`})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example 2:`}),` Start date in the past and subscription fee to be paid in arrears`]}),_jsx(Frame,{caption:`Illustration for start date in the past and subscription fee in arrears`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-past-arrears-b4f22483b4ae3a358c0b27305e49a766.png?fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=bfdbd259c51657f6e387fff3a8dca495`,alt:`Timeline of a subscription starting in the past, with the subscription fee paid in arrears.`,\"data-og-width\":`2376`,width:`2376`,\"data-og-height\":`646`,height:`646`,\"data-path\":`guide/subscriptions/images/subscription-past-arrears-b4f22483b4ae3a358c0b27305e49a766.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-past-arrears-b4f22483b4ae3a358c0b27305e49a766.png?w=280\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=bc415da8fd3db983f288cfe0b6ebf3f4 280w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-past-arrears-b4f22483b4ae3a358c0b27305e49a766.png?w=560\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=e893b5a1131d58c12bd8f0b005f4472c 560w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-past-arrears-b4f22483b4ae3a358c0b27305e49a766.png?w=840\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=5c4a1ebce1757912a18b9df525fac321 840w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-past-arrears-b4f22483b4ae3a358c0b27305e49a766.png?w=1100\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=63cb2dd547d8db122004a366610a7dff 1100w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-past-arrears-b4f22483b4ae3a358c0b27305e49a766.png?w=1650\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=c5c6567f28f48747843bc01f6d78c05b 1650w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-past-arrears-b4f22483b4ae3a358c0b27305e49a766.png?w=2500\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=c174b469a139354ee1452bdb8df946c7 2500w`})})]}),_jsxs(Tab,{title:`Start date in the future`,id:`start-date-in-the-future`,children:[_jsx(_components.p,{children:`If the start date of the subscription is in the future, the subscription is considered pending.`}),_jsxs(_components.p,{children:[`The invoicing process varies depending on the `,_jsx(_components.a,{href:`/guide/plans/plan-model`,children:`plan model`}),` and `,_jsx(_components.a,{href:`#billing-cycles`,children:`billing cycle`}),`:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`If the plan includes a subscription fee to be paid in advance, when the subscription becomes active, Lago will automatically generate an `,_jsx(_components.strong,{children:`invoice for the subscription fee`}),`. Usage-based charges will be included in the next invoice, generated at the end of the billing period (see example 3 below); and`]}),`\n`,_jsxs(_components.li,{children:[`If the plan includes a subscription fee to be paid in arrears, when the subscription becomes active, `,_jsx(_components.strong,{children:`there will be no invoice`}),`. The subscription fee and usage-based charges will be included in the invoice generated at the end of the billing period (see example 4 below).`]}),`\n`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example 3:`}),` Start date in the future and subscription fee to be paid in advance`]}),_jsx(Frame,{caption:`Illustration for start date in the future and subscription fee in advance`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-future-advance-e0c8d632579fe11dfc530987d86ca211.png?fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=3ccdc21fc650d742b1e96f76a6e91b8f`,alt:`Timeline of a subscription starting in the future, with the subscription fee paid in advance.`,\"data-og-width\":`2376`,width:`2376`,\"data-og-height\":`550`,height:`550`,\"data-path\":`guide/subscriptions/images/subscription-future-advance-e0c8d632579fe11dfc530987d86ca211.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-future-advance-e0c8d632579fe11dfc530987d86ca211.png?w=280\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=1f160fae849e3ab4f48a0e5690bda0e1 280w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-future-advance-e0c8d632579fe11dfc530987d86ca211.png?w=560\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=37ca1fe293be8a564ccda45d88a9430b 560w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-future-advance-e0c8d632579fe11dfc530987d86ca211.png?w=840\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=9145d42b18a06e0b23ff585072b5344b 840w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-future-advance-e0c8d632579fe11dfc530987d86ca211.png?w=1100\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=ba67ad2bff4840eb74631ae77ecdaeb3 1100w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-future-advance-e0c8d632579fe11dfc530987d86ca211.png?w=1650\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=b42e900c8b8428be78af8a5213b22b78 1650w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-future-advance-e0c8d632579fe11dfc530987d86ca211.png?w=2500\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=601c68ec4d2bc7cba7032a804046c8fe 2500w`})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example 4:`}),` Start date in the future and subscription fee to be paid in arrears`]}),_jsx(Frame,{caption:`Illustration for start date in the future and subscription fee in arrears`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-future-arrears-8b99c7c98e2f8223d6282fd5f47a665a.png?fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=2c97c5af07396e4941d69e034670a1f7`,alt:`Timeline of a subscription starting in the future, with the subscription fee paid in arrears.`,\"data-og-width\":`1188`,width:`1188`,\"data-og-height\":`275`,height:`275`,\"data-path\":`guide/subscriptions/images/subscription-future-arrears-8b99c7c98e2f8223d6282fd5f47a665a.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-future-arrears-8b99c7c98e2f8223d6282fd5f47a665a.png?w=280\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=d9e183a05a77bc6591bfb13dfc9d1505 280w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-future-arrears-8b99c7c98e2f8223d6282fd5f47a665a.png?w=560\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=0414a0be432a41004f3b0da98e2392f1 560w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-future-arrears-8b99c7c98e2f8223d6282fd5f47a665a.png?w=840\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=5d038ddc527c1e61f03b320485d42e8b 840w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-future-arrears-8b99c7c98e2f8223d6282fd5f47a665a.png?w=1100\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=567da13a6f9ab973468970abe0ccee0d 1100w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-future-arrears-8b99c7c98e2f8223d6282fd5f47a665a.png?w=1650\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=40249d9c561553afae3046eee9eac29d 1650w, https://mintcdn.com/lago-docs/ugh-mbZn6BFsC-Za/guide/subscriptions/images/subscription-future-arrears-8b99c7c98e2f8223d6282fd5f47a665a.png?w=2500\u0026fit=max\u0026auto=format\u0026n=ugh-mbZn6BFsC-Za\u0026q=85\u0026s=6f0e49dde27282d91af494de4d102610 2500w`})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`subscription-end-date`,children:`Subscription end date`}),`\n`,_jsxs(_components.p,{children:[`By default, if no subscription end date is specified, `,_jsx(_components.strong,{children:`the subscription will automatically renew at the end of the period`}),`.`]}),`\n`,_jsx(_components.p,{children:`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.`}),`\n`,_jsxs(_components.p,{children:[`45 days and 15 days before the subscription ends, Lago sends a `,_jsx(_components.code,{children:`subscription.termination_alert`}),` webhook to remind you. You then have two choices:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Allow the subscription to continue until the end date and finalize it; or`}),`\n`,_jsx(_components.li,{children:`Adjust the subscription end date if the contract has been renegotiated.`}),`\n`]}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`Ensure that the subscription end date is set to a date later than the subscription start date.`})}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Dashboard`,id:`dashboard-2`,children:[_jsx(_components.p,{children:`Here is how you can define a subscription end date from the UI:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Access the `,_jsx(_components.strong,{children:`“Customers”`}),` section via the side menu;`]}),`\n`,_jsx(_components.li,{children:`Select a customer from the list;`}),`\n`,_jsxs(_components.li,{children:[`In the `,_jsx(_components.strong,{children:`“Overview”`}),` tab, click `,_jsx(_components.strong,{children:`“Add a plan”`}),` on the right;`]}),`\n`,_jsx(_components.li,{children:`Set a subscription start date;`}),`\n`,_jsx(_components.li,{children:`Set a subscription end date;`}),`\n`,_jsx(_components.li,{children:`Choose between calendar or anniversary billing;`}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`“Assign plan”`}),` to confirm.`]}),`\n`]})]}),_jsxs(Tab,{title:`API`,id:`api-2`,children:[_jsxs(_components.p,{children:[`Use the `,_jsx(_components.code,{children:`ending_at`}),` field on the subscriptions endpoint.`]}),_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Define a subscription end date`,numberOfLines:`17`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`LAGO_URL`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.getlago.com\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`API_KEY`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"__YOUR_API_KEY__\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --location`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$LAGO_URL`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/subscriptions\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`--header `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`--header `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`--data-raw `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"subscription\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"external_customer_id\": \"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"plan_code\": \"premium\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"external_id\": \"my_sub_12345789\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Repository 1\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"subscription_at\": \"2022-08-08T00:00:00Z\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"ending_at\": \"2023-08-08T00:00:00Z\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"billing_time\": \"anniversary\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`multiple-plans`,children:`Multiple plans`}),`\n`,_jsx(_components.p,{children:`You can 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 (for example Free plan for Workspace 1, Free plan for Workspace 2, Premium plan for Workspace 3).`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`When assigning multiple plans to a customer, you must specify the `,_jsx(_components.code,{children:`external_subscription_id`}),` for each event or create `,_jsx(_components.a,{href:`/api-reference/events/batch`,children:`batch events`}),`.`]})}),`\n`,_jsx(_components.p,{children:`You can subscribe a customer to multiple plans using different billing cycles, for example one based on calendar dates and another based on the anniversary date.`}),`\n`,_jsx(_components.p,{children:`Give each subscription a name when you assign multiple plans to a customer. The names make each plan easier to tell apart, and they appear on the invoices.`}),`\n`,_jsx(Heading,{level:`2`,id:`invoice-consolidation`,children:`Invoice consolidation`}),`\n`,_jsxs(_components.p,{children:[`When a customer is subscribed to multiple plans, Lago can either group all subscription charges into a `,_jsx(_components.strong,{children:`single consolidated invoice`}),` or issue a `,_jsx(_components.strong,{children:`separate invoice for each subscription`}),`.`]}),`\n`,_jsx(_components.p,{children:`By default, Lago consolidates subscriptions into a single invoice when they are billed on the same day and share all of the following:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The same payment method;`}),`\n`,_jsx(_components.li,{children:`The same currency;`}),`\n`,_jsx(_components.li,{children:`The same billing entity;`}),`\n`,_jsxs(_components.li,{children:[`The same PO number (`,_jsx(_components.code,{children:`purchase_order_number`}),`); and`]}),`\n`,_jsx(_components.li,{children:`The same effective payment term.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`The effective term is the term that applies after checking subscription, customer, and billing-entity settings. A subscription that inherits Net 30 and one explicitly set to Net 30 share an invoice. A Net 30 subscription and a Net 60 subscription get separate invoices.`}),`\n`,_jsxs(_components.p,{children:[`Terms that always produce the same due date count as the same term. For example, `,_jsx(_components.strong,{children:`Net 0`}),` and `,_jsx(_components.strong,{children:`Due on receipt`}),` share an invoice, and so do `,_jsx(_components.strong,{children:`End of month`}),` and `,_jsx(_components.strong,{children:`Net 0 days after end of month`}),`.`]}),`\n`,_jsx(_components.p,{children:`This reduces the number of invoices your customers receive and simplifies payment reconciliation. In the example below, a customer is subscribed to three plans, two billed monthly and one billed yearly, and Lago groups all charges that fall on the same billing date into a single invoice:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{children:`Month 1`}),_jsx(_components.th,{children:`Month 2`}),_jsx(_components.th,{children:`Month 3`}),_jsx(_components.th,{children:`Month 4`}),_jsx(_components.th,{children:`(…)`}),_jsx(_components.th,{children:`Month 13`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Plan A (monthly)`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$40`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$40`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$40`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$40`}),_jsx(_components.td,{children:`(…)`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$40`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Plan B (monthly)`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$60`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$60`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$60`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$60`}),_jsx(_components.td,{children:`(…)`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$60`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Plan C (yearly)`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$500`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-`}),_jsx(_components.td,{children:`(…)`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$500`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Total invoice`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.strong,{children:`$600`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.strong,{children:`$100`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.strong,{children:`$100`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.strong,{children:`$100`})}),_jsx(_components.td,{children:`(…)`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.strong,{children:`$600`})})]})]})]}),`\n`,_jsxs(_components.p,{children:[`To keep a specific subscription on its own invoice, for example to bill a different cost center, track a contract independently, or simplify internal reporting, disable consolidation for that subscription. Set the `,_jsx(_components.code,{children:`consolidate_invoice`}),` field to `,_jsx(_components.code,{children:`false`}),` on the subscription, either from the dashboard or via the API. Lago then issues a standalone invoice for that subscription, even when other subscriptions for the same customer are billed on the same day.`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Keep a subscription on its own invoice`,numberOfLines:`14`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`LAGO_URL`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.getlago.com\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`API_KEY`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"__YOUR_API_KEY__\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --location`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$LAGO_URL`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/subscriptions\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`--header `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`--header `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`--data-raw `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"subscription\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"external_customer_id\": \"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"plan_code\": \"premium\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"external_id\": \"my_sub_12345789\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"consolidate_invoice\": false`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`consolidate_invoice`}),` setting applies at the `,_jsx(_components.strong,{children:`subscription level`}),`, so you can mix consolidated and standalone subscriptions for the same customer. You can update this setting at any time.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`overriding-a-plan`,children:`Overriding a plan`}),`\n`,_jsxs(Info,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`PREMIUM FEATURE`}),` ✨`]}),_jsxs(_components.p,{children:[`This feature is only available to users with a premium license. Please\n`,_jsx(_components.strong,{children:_jsx(_components.a,{href:`mailto:hello@getlago.com`,children:`contact us`})}),` to get access to Lago Cloud and Lago\nSelf-Hosted Premium.`]})]}),`\n`,_jsx(_components.p,{children:`When you assign a plan to a customer, you can customize parts of it for that subscription.\nYou keep one plan structure for every customer, and adjust prices per customer where you need to.`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Dashboard`,id:`dashboard-3`,children:[_jsx(_components.p,{children:`To override a plan, assign it to a customer. You can then change:`}),_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Subscription invoice display name`}),`\n`,_jsx(_components.li,{children:`Subscription fee`}),`\n`,_jsx(_components.li,{children:`Plan currency`}),`\n`,_jsx(_components.li,{children:`Plan trial period`}),`\n`,_jsx(_components.li,{children:`Plan taxes`}),`\n`,_jsx(_components.li,{children:`Charge properties (the charge model cannot be changed)`}),`\n`,_jsx(_components.li,{children:`Filters and their properties (if applicable)`}),`\n`,_jsx(_components.li,{children:`Charge minimum spending`}),`\n`,_jsx(_components.li,{children:`Charge taxes`}),`\n`,_jsx(_components.li,{children:`Charge invoice display name`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/guide/plans/progressive-billing`,children:`Progressive billing`}),` thresholds`]}),`\n`]})]}),_jsx(Tab,{title:`API`,id:`api-3`,children:_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Override a plan`,numberOfLines:`46`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`46`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`LAGO_URL`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.getlago.com\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`API_KEY`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"__YOUR_API_KEY__\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --location`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$LAGO_URL`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/subscriptions\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --data-raw`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"subscription\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"external_customer_id\": \"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"plan_code\": \"premium\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"external_id\": \"my_new_sub_123456789\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Repository 1\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"subscription_at\": \"2022-08-08T00:00:00Z\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"ending_at\": \"2023-08-08T00:00:00Z\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"billing_time\": \"anniversary\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"plan_overrides\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"new_plan\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"invoice_display_name\": \"Subscription fee\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Overridden plan for customer X\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"amount_cents\": 10000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"amount_currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"trial_period\": 0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"tax_codes\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"vat_10\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"charges\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"id\": \"cac4cff7-e2d9-41e2-83e5-7947d91f0eb5\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"invoice_display_name\": \"Cards - custom price\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"min_amount_cents\": 0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"properties\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"amount\": \"10\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"tax_codes\": []`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"fixed_charges\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"id\": \"af360881-357a-4334-ad16-8cd38e246d03\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"units\": 20,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"apply_units_immediately\": true`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})})})})]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Fixed charges are also overridden under `,_jsx(_components.code,{children:`plan_overrides`}),`, using the `,_jsx(_components.code,{children:`fixed_charges`}),` array. Sending only `,_jsx(_components.code,{children:`units`}),` (and `,_jsx(_components.code,{children:`apply_units_immediately`}),` if needed) updates the quantity without creating a plan override. Passing a price or `,_jsx(_components.code,{children:`properties`}),` creates one. See `,_jsx(_components.a,{href:`/guide/plans/charges/fixed-charges#update-a-fixed-charge-via-the-api`,children:`Update a fixed charge via the API`}),`.`]})}),`\n`,_jsx(_components.p,{children:`An overridden plan stays linked to the initial plan, but it does not appear in the plans list.\nTo open it, click the subscription in the customer details view.`}),`\n`,_jsx(_components.p,{children:`All invoices generated from this subscription are based on the overridden plan, not the initial plan.\nCoupons restricted to a plan code apply to both the initial plan and its overrides.`}),`\n`,_jsxs(_components.p,{children:[`By default, changes made to the initial plan do not reach subscriptions linked to an overridden plan. To propagate them, update the plan with `,_jsx(_components.code,{children:`cascade_updates`}),` set to `,_jsx(_components.code,{children:`true`}),`. See `,_jsx(_components.a,{href:`/guide/plans/overview#editing-plans`,children:`Editing plans`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`deleting-a-plan`,children:`Deleting a plan`}),`\n`,_jsxs(_components.p,{children:[`You can `,_jsx(_components.a,{href:`/api-reference/plans/destroy`,children:`delete a plan`}),` that is linked to existing subscriptions.`]}),`\n`,_jsx(_components.p,{children:`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.`}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`After deleting a plan, you can create a new one using the same code.`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Assign a plan to a customer","description":"A subscription is created when you assign a plan to a customer. You can do this at any time, when you create the customer or later on.","href":"/guide/subscriptions/assign-plan"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Payment terms","slug":"payment-terms","depth":2,"children":[]},{"title":"Billing cycles","slug":"billing-cycles","depth":2,"children":[]},{"title":"Subscription start date","slug":"subscription-start-date","depth":2,"children":[]},{"title":"Subscription end date","slug":"subscription-end-date","depth":2,"children":[]},{"title":"Multiple plans","slug":"multiple-plans","depth":2,"children":[]},{"title":"Invoice consolidation","slug":"invoice-consolidation","depth":2,"children":[]},{"title":"Overriding a plan","slug":"overriding-a-plan","depth":2,"children":[]},{"title":"Deleting a plan","slug":"deleting-a-plan","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/lago-docs/a0e77058367d9146/canonical.js","/docs/_mintlify/custom/lago-docs/fa2446312177e9c6/loader.js","/docs/_mintlify/custom/lago-docs/c55d8403f7fc83ad/changelog-anchor-redirect.js","/docs/_mintlify/custom/lago-docs/8c326c8b67b47933/changelog-month-nav.js","/docs/_mintlify/custom/lago-docs/103c90943d27f62a/webmcp.js","/docs/_mintlify/custom/lago-docs/1219fb859e5c496e/github-outbound.js"],"subdomain":"lago-docs","siteName":"Lago","title":"Assign a plan to a customer - Lago","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-10T17:45:11.994Z","originalFileLocation":"guide/subscriptions/assign-plan.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"A subscription is created when you assign a plan to a customer. You can do this at any time, when you create the customer or later on.\">\u003cmeta data-mint-head name=\"keywords\" content=\"Lago API, billing API, usage metering API, OpenAPI, billing SDK, Lago MCP\">\u003cmeta data-mint-head name=\"application-name\" content=\"Lago\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Assign a plan to a customer - Lago\">\u003cmeta data-mint-head property=\"og:description\" content=\"A subscription is created when you assign a plan to a customer. You can do this at any time, when you create the customer or later on.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Lago\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://getlago.com/docs/guide/subscriptions/assign-plan\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lago-docs.mintlify.site/docs/_mintlify/api/og/v2?division=Subscriptions\u0026amp;title=Assign+a+plan+to+a+customer\u0026amp;description=A+subscription+is+created+when+you+assign+a+plan+to+a+customer.+You+can+do+this+at+any+time%2C+when+you+create+the+customer+or+later+on.\u0026amp;theme=e69bad9b2f17285816711238\u0026amp;signature=59169c4eb1ac59b9dafcce426d719059794c957b55589737ddf62035940cd9a5\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Assign a plan to a customer - Lago\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"A subscription is created when you assign a plan to a customer. You can do this at any time, when you create the customer or later on.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lago-docs.mintlify.site/docs/_mintlify/api/og/v2?division=Subscriptions\u0026amp;title=Assign+a+plan+to+a+customer\u0026amp;description=A+subscription+is+created+when+you+assign+a+plan+to+a+customer.+You+can+do+this+at+any+time%2C+when+you+create+the+customer+or+later+on.\u0026amp;theme=e69bad9b2f17285816711238\u0026amp;signature=59169c4eb1ac59b9dafcce426d719059794c957b55589737ddf62035940cd9a5\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Lago\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#006CFA\">\u003clink data-mint-head rel=\"canonical\" href=\"https://getlago.com/docs/guide/subscriptions/assign-plan\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/guide/subscriptions/assign-plan.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://getlago.com/#organization\",\"name\":\"Lago\",\"legalName\":\"Get Lago Corp.\",\"url\":\"https://getlago.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://getlago.com/docs/logo/light.svg\"},\"sameAs\":[\"https://github.com/getlago\",\"https://www.linkedin.com/company/getlago\",\"https://x.com/GetLago\",\"https://www.youtube.com/channel/UCp6ltp7n3SgDVsmerJ7O7ZA\"]},{\"@type\":\"WebSite\",\"@id\":\"https://getlago.com/docs#website\",\"name\":\"Lago\",\"url\":\"https://getlago.com/docs\",\"publisher\":{\"@id\":\"https://getlago.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://getlago.com/docs/guide/subscriptions/assign-plan#webpage\",\"url\":\"https://getlago.com/docs/guide/subscriptions/assign-plan\",\"name\":\"Assign a plan to a customer\",\"description\":\"A subscription is created when you assign a plan to a customer. You can do this at any time, when you create the customer or later on.\",\"dateModified\":\"2026-11-10T17:45:11.994Z\",\"isPartOf\":{\"@id\":\"https://getlago.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://getlago.com/docs/guide/subscriptions/assign-plan#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://getlago.com/docs/guide/subscriptions/assign-plan#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Pricing \u0026 Subscriptions\",\"item\":\"https://getlago.com/docs/guide/plans/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Assign a plan to a customer\",\"item\":\"https://getlago.com/docs/guide/subscriptions/assign-plan\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://getlago.com/docs/guide/subscriptions/assign-plan#article\",\"headline\":\"Assign a plan to a customer\",\"name\":\"Assign a plan to a customer\",\"description\":\"A subscription is created when you assign a plan to a customer. You can do this at any time, when you create the customer or later on.\",\"url\":\"https://getlago.com/docs/guide/subscriptions/assign-plan\",\"mainEntityOfPage\":{\"@id\":\"https://getlago.com/docs/guide/subscriptions/assign-plan#webpage\"},\"dateModified\":\"2026-11-10T17:45:11.994Z\",\"publisher\":{\"@id\":\"https://getlago.com/#organization\"},\"isPartOf\":{\"@id\":\"https://getlago.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Lago\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Lago\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/guide/subscriptions/assign-plan.md","siteName":"Lago","nav":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://getlago.com/blog"},{"anchor":"Community","icon":"slack","href":"https://getlago.com/slack"},{"anchor":"GitHub","icon":"github","href":"https://github.com/getlago/lago"},{"anchor":"Status","icon":"signal-bars","href":"https://status.getlago.com/"}]},"tabs":[{"tab":"Home","pages":[{"title":"Home","href":"/welcome"}]},{"tab":"Guide","groups":[{"group":"Introduction","pages":[{"title":"Welcome to Lago","href":"/guide/introduction/welcome-to-lago"},{"title":"Why billing is a nightmare","href":"/guide/introduction/why-billing-is-a-nightmare"}]},{"group":"Get started","pages":[{"title":"Lago Cloud","href":"/guide/lago-cloud"},{"group":"Lago Self-hosted","pages":[{"title":"Self-hosting overview","sidebarTitle":"Overview","href":"/guide/lago-self-hosted/overview"},{"title":"Docker","href":"/guide/lago-self-hosted/docker"},{"title":"Kubernetes","href":"/guide/lago-self-hosted/kubernetes"},{"title":"Compatibility matrix","href":"/guide/lago-self-hosted/compatibility-matrix"},{"title":"Database maintenance","href":"/guide/lago-self-hosted/database-maintenance"},{"title":"Tracking and analytics","href":"/guide/lago-self-hosted/tracking-analytics"},{"title":"Versions update","href":"/guide/lago-self-hosted/update-instance"},{"title":"Useful commands","href":"/guide/lago-self-hosted/commands"}]}]},{"group":"Events \u0026 Usage Components","pages":[{"group":"Billable metrics","pages":[{"title":"Create billable metrics","href":"/guide/billable-metrics/create-billable-metrics"},{"group":"Aggregation types","pages":[{"title":"Aggregation types: how usage is measured and counted","sidebarTitle":"Overview","href":"/guide/billable-metrics/aggregation-types/overview"},{"title":"Count","href":"/guide/billable-metrics/aggregation-types/count"},{"title":"Count unique","href":"/guide/billable-metrics/aggregation-types/count-unique"},{"title":"Latest","href":"/guide/billable-metrics/aggregation-types/latest"},{"title":"Max","href":"/guide/billable-metrics/aggregation-types/max"},{"title":"Sum","href":"/guide/billable-metrics/aggregation-types/sum"},{"title":"Weighted sum","href":"/guide/billable-metrics/aggregation-types/weighted-sum"},{"title":"CUSTOM","href":"/guide/billable-metrics/aggregation-types/custom-agg"},{"title":"Aggregation examples","href":"/guide/billable-metrics/aggregation-types/aggregation-examples"}]},{"title":"Recurring vs metered","href":"/guide/billable-metrics/recurring-vs-metered"},{"title":"SQL expressions","href":"/guide/billable-metrics/sql-expressions"},{"title":"Rounding","href":"/guide/billable-metrics/rounding"},{"title":"Filters and dimensions","href":"/guide/billable-metrics/filters"},{"title":"Delete billable metrics","href":"/guide/billable-metrics/delete-billable-metrics"}]},{"group":"Usage ingestion","pages":[{"title":"Ingest usage","href":"/guide/events/ingesting-usage"},{"title":"Performance and optimization","href":"/guide/events/usage-performances"},{"title":"Metering ingestion sources","href":"/guide/events/metering-source"},{"title":"Retrieve usage","href":"/guide/events/retrieve-usage"}]},{"group":"Governance","pages":[{"title":"Governance overview","href":"/guide/governance/overview"},{"title":"Core concepts","href":"/guide/governance/core-concepts"},{"title":"Set up governance","href":"/guide/governance/setting-up"},{"title":"Send attributed events","href":"/guide/governance/sending-events"},{"title":"Query attributed usage","href":"/guide/governance/query"}]},{"group":"Alerts","pages":[{"title":"Usage alerts","href":"/guide/alerts/usage-alerts"},{"title":"Credits consumption alerts","href":"/guide/alerts/credits-consumption-alerts"},{"title":"Alert resolution","href":"/guide/alerts/alert-resolution"}]}]},{"group":"Pricing \u0026 Subscriptions","pages":[{"group":"Plans","pages":[{"title":"Plans: price subscriptions, usage and hybrid models","sidebarTitle":"Overview","href":"/guide/plans/overview"},{"title":"Plan model","href":"/guide/plans/plan-model"},{"group":"Charges","pages":[{"title":"Usage based charge","href":"/guide/plans/charges/usage-based-charges"},{"title":"Fixed charge","href":"/guide/plans/charges/fixed-charges"},{"group":"Charge models","pages":[{"title":"Standard","href":"/guide/plans/charges/charge-models/standard"},{"title":"Graduated","href":"/guide/plans/charges/charge-models/graduated"},{"title":"Package","href":"/guide/plans/charges/charge-models/package"},{"title":"Percentage","href":"/guide/plans/charges/charge-models/percentage"},{"title":"Volume","href":"/guide/plans/charges/charge-models/volume"},{"title":"Graduated percentage","href":"/guide/plans/charges/charge-models/graduated-percentage"},{"title":"Dynamic","href":"/guide/plans/charges/charge-models/dynamic"},{"title":"Custom price","href":"/guide/plans/charges/charge-models/custom-price"}]},{"title":"Metered vs Recurring","href":"/guide/plans/charges/metered-vs-recurring"},{"title":"Arrears vs Advance","href":"/guide/plans/charges/arrears-vs-advance"},{"title":"Prorated vs Full","href":"/guide/plans/charges/prorated-vs-full"},{"title":"Spending minimums","href":"/guide/plans/charges/spending-minimum"},{"title":"Invoiceable vs Uninvoiceable","href":"/guide/plans/charges/invoiceable-vs-noninvoiceable"},{"title":"Charges with filters","href":"/guide/plans/charges/charges-with-filters"},{"title":"Group keys","href":"/guide/plans/charges/grouping"}]},{"title":"Custom pricing units","href":"/guide/plans/custom-pricing-units"},{"title":"Commitments","href":"/guide/plans/commitment"},{"title":"Progressive billing","href":"/guide/plans/progressive-billing"}]},{"group":"Customers","pages":[{"title":"Customer management","href":"/guide/customers/customer-management"},{"title":"Customer metadata","href":"/guide/customers/customer-metadata"},{"title":"Invoice a customer","href":"/guide/customers/invoice-customer"},{"title":"The customer portal","href":"/guide/customers/customer-portal"}]},{"title":"Billing entities","description":"Billing entities allow an organization to manage different billing configurations.","href":"/guide/billing-entities"},{"group":"Subscriptions","pages":[{"title":"Assign a plan to a customer","href":"/guide/subscriptions/assign-plan"},{"title":"Activation rules","description":"Hold a subscription in the incomplete state until its activation rules are satisfied. Activation rules are configured per subscription and will expand over time.","href":"/guide/subscriptions/activation-rules"},{"title":"Upgrades and downgrades","href":"/guide/subscriptions/upgrades-downgrades"},{"title":"Edit a subscription","href":"/guide/subscriptions/edit-subscription"},{"title":"Terminate a subscription","href":"/guide/subscriptions/terminate-subscription"}]},{"title":"Coupons","href":"/guide/coupons"},{"title":"Entitlements","href":"/guide/entitlements"},{"title":"Emails","href":"/guide/emails"}]},{"group":"Quotes \u0026 Order Forms","pages":[{"title":"Quotes and order forms: from proposal to provisioned billing","sidebarTitle":"Overview","href":"/guide/quotes/overview"},{"title":"Creating a quote","href":"/guide/quotes/create-a-quote"},{"title":"Writing the quote content","href":"/guide/quotes/quote-editor"},{"title":"Order forms","href":"/guide/quotes/order-forms"},{"title":"Orders","href":"/guide/quotes/orders"},{"title":"Limitations","href":"/guide/quotes/limitations"}]},{"group":"Invoicing","pages":[{"group":"Invoices","pages":[{"title":"Invoicing: generate invoices from plans and usage","sidebarTitle":"Overview","href":"/guide/invoicing/overview"},{"group":"Invoicing settings","pages":[{"title":"Invoicing settings: customize invoices per billing entity","sidebarTitle":"Overview","href":"/guide/invoicing/invoicing-settings/overview"},{"title":"Invoice numbering","href":"/guide/invoicing/invoicing-settings/invoice-numbering"},{"title":"Grace period","href":"/guide/invoicing/invoicing-settings/grace-period"},{"title":"Payment terms","href":"/guide/invoicing/invoicing-settings/payment-term"},{"title":"Empty invoice generation","href":"/guide/invoicing/invoicing-settings/empty-invoices"},{"title":"Issuing date preferences","href":"/guide/invoicing/invoicing-settings/issuing_date"},{"title":"Taxes","href":"/guide/invoicing/invoicing-settings/taxes"}]},{"title":"Fees","href":"/guide/invoicing/fees"},{"title":"Draft invoices","href":"/guide/invoicing/draft-invoices"},{"title":"Download invoices","href":"/guide/invoicing/download-invoices"},{"title":"Invoice metadata","href":"/guide/invoicing/invoice-metadata"},{"title":"Preview an invoice","href":"/guide/invoicing/previews"},{"title":"Void invoices","href":"/guide/invoicing/void"}]},{"group":"One-off invoices","pages":[{"title":"Create add-ons","href":"/guide/one-off-invoices/create-add-ons"},{"title":"Issue one-off invoices","href":"/guide/one-off-invoices/create-one-off-invoices"}]},{"group":"Credit notes","pages":[{"title":"Credit notes: correct an invoice without losing the record","sidebarTitle":"Overview","href":"/guide/invoicing/credit-notes/overview"},{"title":"Credit note metadata","href":"/guide/invoicing/credit-notes/credit-note-metadata"}]},{"title":"Revenue share","href":"/guide/revenue-share"},{"group":"E-invoicing","pages":[{"title":"E-invoicing: generate invoices that comply by country","sidebarTitle":"Overview","href":"/guide/invoicing/e-invoicing/overview"},{"title":"E-Invoicing contributions","href":"/guide/invoicing/e-invoicing/contributions"}]}]},{"group":"Payments \u0026 Cash Collection","pages":[{"group":"Payments","pages":[{"title":"Payment provider integrations","href":"/guide/payments/payment-providers"},{"title":"Payment methods","href":"/guide/payments/payment-methods"},{"title":"Record manual payments","href":"/guide/payments/record-manual-payments"},{"title":"Payment pre-authorization","href":"/guide/payments/payment-authorization"},{"title":"Payment retries","href":"/guide/payments/payment-retries"},{"title":"Payment receipts","href":"/guide/payments/receipts"}]},{"group":"Dunning","pages":[{"title":"Manual dunning","href":"/guide/dunning/manual-dunning"},{"title":"Automatic dunning","href":"/guide/dunning/automatic-dunning"}]},{"group":"Wallets and prepaid credits","pages":[{"title":"Prepaid credits and wallets: bill usage against a balance","sidebarTitle":"Overview","href":"/guide/wallet-and-prepaid-credits/overview"},{"title":"Top-up and void credits","href":"/guide/wallet-and-prepaid-credits/wallet-top-up-and-void"},{"title":"Traceability","href":"/guide/wallet-and-prepaid-credits/traceability"}]}]},{"group":"AI Agents and MCP","pages":[{"title":"AI tools for Lago","sidebarTitle":"AI tools","href":"/guide/ai-agents/for-agents"},{"title":"Build Lago billing with a coding agent","sidebarTitle":"Build with a coding agent","href":"/guide/ai-agents/coding-agents"},{"group":"Lago Agent SDK","pages":[{"title":"Agent SDK: bill LLM token usage from your application","sidebarTitle":"Overview","href":"/guide/ai-agents/agent-sdk/overview"},{"title":"Billing","href":"/guide/ai-agents/agent-sdk/billing"},{"group":"Providers","pages":[{"title":"OpenAI","href":"/guide/ai-agents/agent-sdk/openai"},{"title":"Anthropic","href":"/guide/ai-agents/agent-sdk/anthropic"},{"title":"AWS Bedrock","href":"/guide/ai-agents/agent-sdk/bedrock"},{"title":"Google Gemini","href":"/guide/ai-agents/agent-sdk/gemini"},{"title":"Mistral","href":"/guide/ai-agents/agent-sdk/mistral"}]},{"group":"Gateways","pages":[{"title":"Cloudflare AI Gateway","href":"/guide/ai-agents/agent-sdk/cloudflare"},{"title":"Databricks AI Gateway","href":"/guide/ai-agents/agent-sdk/databricks"},{"title":"Snowflake Cortex","href":"/guide/ai-agents/agent-sdk/snowflake"},{"title":"Ramp Router","href":"/guide/ai-agents/agent-sdk/ramp-router"}]},{"title":"Reference","href":"/guide/ai-agents/agent-sdk/reference"}]},{"title":"The Billing Assistant","href":"/guide/ai-agents/billing-assistant"},{"title":"The Finance Assistant","href":"/guide/ai-agents/finance-assistant"},{"title":"The Dunning Agent","href":"/guide/ai-agents/dunning-agent"},{"title":"MCP server for billing: connect coding agents to usage and invoices","sidebarTitle":"Lago MCP Server","href":"/guide/ai-agents/mcp-server"}]},{"group":"Data \u0026 Analytics","pages":[{"title":"Webhooks","href":"/guide/webhooks"},{"group":"Analytics","pages":[{"group":"Reports","pages":[{"title":"Billing analytics: read revenue, usage and invoice reports","sidebarTitle":"Overview","href":"/guide/analytics/overview"},{"group":"Subscriptions","pages":[{"title":"Active subscriptions","href":"/guide/analytics/subscriptions/active"},{"title":"New subscriptions","href":"/guide/analytics/subscriptions/new"},{"title":"Churn","href":"/guide/analytics/subscriptions/churn"}]},{"group":"Revenue","pages":[{"title":"Revenue streams","href":"/guide/analytics/revenue/revenue-streams"},{"title":"MRR","href":"/guide/analytics/revenue/mrr"}]},{"title":"Credit ledgers","href":"/guide/analytics/credit-ledgers"},{"title":"Usage","href":"/guide/analytics/usage"},{"group":"Cash collection","pages":[{"title":"Payments","href":"/guide/analytics/cash-collection/payments"},{"title":"Dunnings","href":"/guide/analytics/cash-collection/dunnings"}]},{"title":"Invoices","href":"/guide/analytics/invoices"}]},{"title":"Forecasted usage","href":"/guide/analytics/forecasted-usage"}]},{"group":"Data exports","pages":[{"title":"Export invoices","href":"/guide/invoicing/export"},{"title":"Lago Data Pipeline","href":"/integrations/data/lago-data-pipeline"}]}]},{"group":"Revenue recognition","tag":"Private beta","pages":[{"title":"Revenue recognition: turn billing into accrual-basis revenue","sidebarTitle":"Overview","href":"/guide/revenue-recognition/overview"},{"group":"How it works","pages":[{"title":"Methodology","href":"/guide/revenue-recognition/how-it-works/methodology"},{"title":"Subscriptions","href":"/guide/revenue-recognition/how-it-works/subscriptions"},{"title":"Usage-based charges","href":"/guide/revenue-recognition/how-it-works/usage-based-charges"},{"title":"Minimum commitments","href":"/guide/revenue-recognition/how-it-works/minimum-commitments"},{"title":"Taxes","href":"/guide/revenue-recognition/how-it-works/taxes"},{"title":"Payments","href":"/guide/revenue-recognition/how-it-works/payments"},{"title":"Credit notes and adjustments","href":"/guide/revenue-recognition/how-it-works/credit-notes-and-adjustments"},{"title":"Disputes and failed payments","href":"/guide/revenue-recognition/how-it-works/disputes-and-failed-payments"},{"title":"Wallets and prepaid credits","href":"/guide/revenue-recognition/how-it-works/wallets-and-prepaid-credits"}]},{"group":"Get started","pages":[{"title":"Enable revenue recognition","href":"/guide/revenue-recognition/get-started/enable"},{"title":"Prepare your billing data","href":"/guide/revenue-recognition/get-started/prepare-billing-data"},{"title":"Review your first reporting period","href":"/guide/revenue-recognition/get-started/review-first-period"},{"title":"Export revenue recognition data","href":"/guide/revenue-recognition/get-started/export"}]},{"group":"Reports","pages":[{"title":"Recognized Revenue","href":"/guide/revenue-recognition/reports/recognized-revenue"},{"title":"Deferred Revenue","href":"/guide/revenue-recognition/reports/deferred-revenue"},{"title":"Revenue Waterfall","href":"/guide/revenue-recognition/reports/revenue-waterfall"},{"title":"Statements","href":"/guide/revenue-recognition/reports/statements"},{"title":"Journal Entry Details","href":"/guide/revenue-recognition/reports/journal-entry-details"}]},{"group":"Examples","pages":[{"title":"Full lifecycle example","href":"/guide/revenue-recognition/examples/full-lifecycle"}]}]},{"group":"Resources","pages":[{"group":"Security","pages":[{"title":"Audit logs","href":"/guide/security/audit-logs"},{"title":"Security logs","href":"/guide/security/security-logs"},{"title":"API Keys","href":"/guide/security/api-keys"},{"title":"RBAC - Role-Based Access Control","href":"/guide/security/rbac"},{"title":"Single Sign-On (SSO)","href":"/guide/security/sso"},{"title":"SOC 2 Type 2","href":"/guide/security/soc"}]},{"title":"Integration testing","href":"/guide/integration-testing"},{"title":"Lago OpenAPI","href":"/guide/lago-open-api"},{"group":"Lago CLI","pages":[{"title":"Lago CLI: the billing API from your terminal","sidebarTitle":"Overview","href":"/guide/lago-cli/overview"},{"group":"Command reference","pages":[{"title":"Command reference","href":"/guide/lago-cli/commands/overview"},{"title":"Setup and diagnostics","href":"/guide/lago-cli/commands/setup"},{"title":"Helpers","href":"/guide/lago-cli/commands/helpers"},{"title":"Billable metrics","href":"/guide/lago-cli/commands/billable-metrics"},{"title":"Plans","href":"/guide/lago-cli/commands/plans"},{"title":"Features and entitlements","href":"/guide/lago-cli/commands/features-and-entitlements"},{"title":"Customers","href":"/guide/lago-cli/commands/customers"},{"title":"Subscriptions","href":"/guide/lago-cli/commands/subscriptions"},{"title":"Events","href":"/guide/lago-cli/commands/events"},{"title":"Invoices","href":"/guide/lago-cli/commands/invoices"},{"title":"Credit notes","href":"/guide/lago-cli/commands/credit-notes"},{"title":"Coupons and add-ons","href":"/guide/lago-cli/commands/coupons-and-add-ons"},{"title":"Wallets","href":"/guide/lago-cli/commands/wallets"},{"title":"Taxes and fees","href":"/guide/lago-cli/commands/taxes-and-fees"},{"title":"Payments","href":"/guide/lago-cli/commands/payments"},{"title":"Webhooks","href":"/guide/lago-cli/commands/webhooks"},{"title":"Analytics and logs","href":"/guide/lago-cli/commands/analytics-and-logs"},{"title":"Organization","href":"/guide/lago-cli/commands/organization"},{"title":"Quotes and orders","href":"/guide/lago-cli/commands/quotes-and-orders"}]}]},{"group":"Migrations","pages":[{"title":"Migration to v1.57.0","href":"/guide/migration/migration-to-v1.57.0"},{"title":"Migration to v1.56.0","href":"/guide/migration/migration-to-v1.56.0"},{"title":"Migration to v1.54.0","href":"/guide/migration/migration-to-v1.54.0"},{"title":"Migration to v1.52.0","href":"/guide/migration/migration-to-v1.52.0"},{"title":"Migration to v1.50.0","href":"/guide/migration/migration-to-v1.50.0"},{"title":"Migration to v1.45.0","href":"/guide/migration/migration-to-v1.45.0"},{"title":"Migration to v1.44.0","href":"/guide/migration/migration-to-v1.44.0"},{"title":"Migration to v1.43.0","href":"/guide/migration/migration-to-v1.43.0"},{"title":"Migration to v1.32.0","href":"/guide/migration/migration-to-v1.32.0"},{"title":"Migration to v1.31.0","href":"/guide/migration/migration-to-v1.31.0"},{"title":"Migration to v1.29.0","href":"/guide/migration/migration-to-v1.29.0"},{"title":"Migration to v1.28.1","href":"/guide/migration/migration-to-v1.28.1"},{"title":"Migration to v1.25.0","href":"/guide/migration/migration-to-v1.25.0"},{"title":"Migration to v1.20.0","href":"/guide/migration/migration-to-v1.20.0"},{"title":"Migration to v1.2.0","href":"/guide/migration/migration-to-v1.2.0"}]}]}]},{"tab":"API References","pages":[{"title":"API References","href":"/api-reference/intro"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/introduction"}]},{"tab":"Templates","pages":[{"title":"Templates","href":"/templates/introduction"}]},{"tab":"FAQ","pages":[{"title":"FAQ","href":"/faq/about-lago"}]},{"tab":"Knowledge Base","href":"https://knowledge.getlago.com"},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/product"}]}]},"basePath":"","title":"Assign a plan to a customer - Lago","buildId":"dpl_Aw98ji4XvBsgtZwL1VrkUF9ehFqz","deploymentId":"dpl_Aw98ji4XvBsgtZwL1VrkUF9ehFqz","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-0domioUa.js","DynamicMarkdown-BcGRTrw6.js","zoom-image-lightbox-DsiWwPWR.js","lightbox-handle-r17bVUz3.js"]}