Keep in mind that Lotus internally updates the subscription ID when you upgrade or downgrade a subscription. This means that the old ID will no longer be valid.
lotus.switch_subscription_plan( subscription_id='sub_a623349004cd4947aca1851c64aa6fbd', switch_plan_id='plan_b5fe8a2603a24c4fa05ffb3fb382fe6d', invoicing_behavior='add_to_next_invoice', usage_behavior='transfer_to_new_subscription', # or 'keep_separate')
The invoicing behavior to use when replacing the plan. Invoice now will invoice the customer for the prorated difference of the old plan and the new plan, whereas add_to_next_invoice will wait until the end of the subscription to do the calculation.
add_to_next_invoice - Add to Next Invoice
invoice_now - Invoice Now
Available options:
add_to_next_invoice,
invoice_now
usage_behavior
enum<string>
default:transfer_to_new_subscription
The usage behavior to use when replacing the plan. Transfer to new subscription will transfer the usage from the old subscription to the new subscription, whereas keep_separate will reset the usage to 0 for the new subscription, while keeping the old usage on the old subscription and charging for that appropriately at the end of the month.
transfer_to_new_subscription - Transfer to New Subscription
keep_separate - Keep Separate
Available options:
transfer_to_new_subscription,
keep_separate
component_fixed_charges_initial_units
object[]
The initial units for the plan components' prepaid fixed charges. In the context of swithciong plans, this is only required if the new plan has a component the old plan did not have, that has a prepaid charge, that deos not have a default.
Show child attributes
Response
200 - application/json
subscription_id
string
required
start_date
string<date-time>
required
The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
end_date
string<date-time>
required
The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
auto_renew
boolean
required
Whether the subscription automatically renews. Defaults to true.
is_new
boolean
required
Whether this subscription came from a renewal or from a first-time. Defaults to true on creation.
subscription_filters
object[]
required
Show child attributes
customer
object
required
Show child attributes
billing_plan
object
required
Show child attributes
fully_billed
boolean
required
read-only
addons
object[]
required
Show child attributes
metadata
object
required
Show child attributes
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Lotus","colors":{"primary":"#C3986B","light":"#FFECD2","dark":"#3A3A3A"},"favicon":"https://mintcdn.com/lotus/HlrVno1vSHfnJwCd/favicon.png?fit=max\u0026auto=format\u0026n=HlrVno1vSHfnJwCd\u0026q=85\u0026s=f00ab5bfd2b64dc25cf303cb98465466","logo":{"light":"https://mintcdn.com/lotus/HlrVno1vSHfnJwCd/logo/light.svg?fit=max\u0026auto=format\u0026n=HlrVno1vSHfnJwCd\u0026q=85\u0026s=4682f6784b28863e5693f044eeb5cc43","dark":"https://mintcdn.com/lotus/HlrVno1vSHfnJwCd/logo/dark.svg?fit=max\u0026auto=format\u0026n=HlrVno1vSHfnJwCd\u0026q=85\u0026s=72afa819a0c40b3f39e7528d403b1fc8"},"api":{"openapi":"openapi.yaml","mdx":{"server":"https://api.uselotus.io","auth":{"method":"key","name":"X-API-KEY"}}},"background":{"decoration":null,"color":{"light":null,"dark":"#171717"}},"navbar":{"links":[{"label":"GitHub Repo","href":"https://github.com/uselotus/lotus"}],"primary":{"type":"button","label":"Sign Up","href":"https://form.typeform.com/to/pehx2YSQ"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/uselotusio/","twitter":"https://twitter.com/uselotusio","instagram":"https://www.instagram.com/uselotusio/"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lotus","hasAudioNarration":false,"actualSubdomain":"lotus","customDomains":["docs.uselotus.io"],"gitSource":{"type":"github","owner":"uselotus","repo":"lotus","deployBranch":"main","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6a98bddf12e4713d1d355344","clientVersion":"0.0.4377","searchFilterCounts":[{"language":"default","tag":"API Reference","count":60},{"language":"default","tag":"Documentation","count":24},{"language":"default","tag":"Subscriptions","count":11},{"language":"default","tag":"Credits","count":5},{"language":"default","tag":"External Integrations","count":5},{"language":"default","tag":"Subscription Lifecycle","count":5},{"language":"default","tag":"Overview","count":4},{"language":"default","tag":"Customers","count":3},{"language":"default","tag":"Invoices","count":3},{"language":"default","tag":"Deprecated Methods","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"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":"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":"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":"turbopuffer-dual-write","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":"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":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/subscriptions/switch-subscription-plan","slug":"/api-reference/subscriptions/switch-subscription-plan","pageMetadata":{"title":"Switch a subscription's plan","openapi":"POST /api/subscriptions/{subscription_id}/switch_plan/","description":"Upgrade or downgrade the susbcription's plan.","href":"/api-reference/subscriptions/switch-subscription-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: \"Upgrade or downgrade the susbcription’s plan.\"\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={code:`code`,hr:`hr`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Keep in mind that Lotus internally updates the subscription ID when you upgrade or downgrade a subscription. This means that the old ID will no longer be valid.`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`6`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`lotus.switch_subscription_plan(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` subscription_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sub_a623349004cd4947aca1851c64aa6fbd'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` switch_plan_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'plan_b5fe8a2603a24c4fa05ffb3fb382fe6d'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` invoicing_behavior`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'add_to_next_invoice'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` usage_behavior`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'transfer_to_new_subscription'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# or 'keep_separate'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Typescript`,numberOfLines:`6`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` lotus`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`switchSubscriptionPlan`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` subscription_id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sub_a623349004cd4947aca1851c64aa6fbd\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` switch_plan_id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"plan_b5fe8a2603a24c4fa05ffb3fb382fe6d\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` invoicing_behavior:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"add_to_next_invoice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` usage_behavior:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"transfer_to_new_subscription\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// or 'keep_separate'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})})]}),`\n`,_jsx(_components.hr,{})]})}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":{"config":{},"pageMetadata":{"title":"Switch a subscription's plan","openapi":"POST /api/subscriptions/{subscription_id}/switch_plan/","description":"Upgrade or downgrade the susbcription's plan.","href":"/api-reference/subscriptions/switch-subscription-plan"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"api_subscriptions_switch_plan_create","parameters":["9e72a33e-0f54-4ebf-a855-acf800941b87"],"tags":["api"],"requestBody":"6233fb88-3374-4fb0-8765-48b767b7a984","security":["a2f1aa88-3058-4afa-82a5-7ff006d001c5","d6c17624-0a8c-4513-9e1d-887bd9e8dce2"],"responses":{"200":"d6773f01-b96e-407c-a19b-7215c552062a"},"method":"post","type":"path","servers":[],"path":"/api/subscriptions/{subscription_id}/switch_plan/","baseUrlOptions":["https://api.uselotus.io"],"title":"","description":"Upgrade or downgrade the susbcription's plan.","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"9e72a33e-0f54-4ebf-a855-acf800941b87":{"in":"path","name":"subscription_id","schema":{"type":"string","isRequired":true,"description":"The ID of the subscription which will have its plans switched.","uniqueKey":"","typeLabel":"string"},"description":"The ID of the subscription which will have its plans switched.","required":true}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"switch_plan_id":{"type":"string","format":"uuid","writeOnly":true,"description":"The new plan to switch to.","uniqueKey":"switch_plan_id","typeLabel":"string\u003cuuid>"},"invoicing_behavior":{"enum":["add_to_next_invoice","invoice_now"],"type":"string","default":"invoice_now","description":"The invoicing behavior to use when replacing the plan. Invoice now will invoice the customer for the prorated difference of the old plan and the new plan, whereas add_to_next_invoice will wait until the end of the subscription to do the calculation.\n\n* `add_to_next_invoice` - Add to Next Invoice\n* `invoice_now` - Invoice Now","uniqueKey":"invoicing_behavior","typeLabel":"enum\u003cstring>"},"usage_behavior":{"enum":["transfer_to_new_subscription","keep_separate"],"type":"string","default":"transfer_to_new_subscription","description":"The usage behavior to use when replacing the plan. Transfer to new subscription will transfer the usage from the old subscription to the new subscription, whereas keep_separate will reset the usage to 0 for the new subscription, while keeping the old usage on the old subscription and charging for that appropriately at the end of the month.\n\n* `transfer_to_new_subscription` - Transfer to New Subscription\n* `keep_separate` - Keep Separate","uniqueKey":"usage_behavior","typeLabel":"enum\u003cstring>"},"component_fixed_charges_initial_units":{"type":"array","items":{"type":"object","properties":{"metric_id":{"type":"string","format":"uuid","writeOnly":true,"description":"The id of the metric that this initial value is for","isRequired":true,"uniqueKey":"component_fixed_charges_initial_units.items.[INDEX].metric_id","typeLabel":"string\u003cuuid>"},"units":{"type":"number","format":"double","maximum":10000000000,"minimum":0,"exclusiveMaximum":true,"description":"The number of units of the metric that this initial value is for","isRequired":true,"uniqueKey":"component_fixed_charges_initial_units.items.[INDEX].units","typeLabel":"number\u003cdouble>"}},"required":["metric_id","units"],"uniqueKey":"component_fixed_charges_initial_units.items.[INDEX]","typeLabel":"object"},"description":"The initial units for the plan components' prepaid fixed charges. In the context of swithciong plans, this is only required if the new plan has a component the old plan did not have, that has a prepaid charge, that deos not have a default.","uniqueKey":"component_fixed_charges_initial_units","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"switch_plan_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","invoicing_behavior":"invoice_now","usage_behavior":"transfer_to_new_subscription","component_fixed_charges_initial_units":[{"metric_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","units":5000000000}]}}},"exampleType":"generated"},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"switch_plan_id":{"type":"string","format":"uuid","writeOnly":true,"description":"The new plan to switch to.","uniqueKey":"switch_plan_id","typeLabel":"string\u003cuuid>"},"invoicing_behavior":{"enum":["add_to_next_invoice","invoice_now"],"type":"string","default":"invoice_now","description":"The invoicing behavior to use when replacing the plan. Invoice now will invoice the customer for the prorated difference of the old plan and the new plan, whereas add_to_next_invoice will wait until the end of the subscription to do the calculation.\n\n* `add_to_next_invoice` - Add to Next Invoice\n* `invoice_now` - Invoice Now","uniqueKey":"invoicing_behavior","typeLabel":"enum\u003cstring>"},"usage_behavior":{"enum":["transfer_to_new_subscription","keep_separate"],"type":"string","default":"transfer_to_new_subscription","description":"The usage behavior to use when replacing the plan. Transfer to new subscription will transfer the usage from the old subscription to the new subscription, whereas keep_separate will reset the usage to 0 for the new subscription, while keeping the old usage on the old subscription and charging for that appropriately at the end of the month.\n\n* `transfer_to_new_subscription` - Transfer to New Subscription\n* `keep_separate` - Keep Separate","uniqueKey":"usage_behavior","typeLabel":"enum\u003cstring>"},"component_fixed_charges_initial_units":{"type":"array","items":{"type":"object","properties":{"metric_id":{"type":"string","format":"uuid","writeOnly":true,"description":"The id of the metric that this initial value is for","isRequired":true,"uniqueKey":"component_fixed_charges_initial_units.items.[INDEX].metric_id","typeLabel":"string\u003cuuid>"},"units":{"type":"number","format":"double","maximum":10000000000,"minimum":0,"exclusiveMaximum":true,"description":"The number of units of the metric that this initial value is for","isRequired":true,"uniqueKey":"component_fixed_charges_initial_units.items.[INDEX].units","typeLabel":"number\u003cdouble>"}},"required":["metric_id","units"],"uniqueKey":"component_fixed_charges_initial_units.items.[INDEX]","typeLabel":"object"},"description":"The initial units for the plan components' prepaid fixed charges. In the context of swithciong plans, this is only required if the new plan has a component the old plan did not have, that has a prepaid charge, that deos not have a default.","uniqueKey":"component_fixed_charges_initial_units","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"switch_plan_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","invoicing_behavior":"invoice_now","usage_behavior":"transfer_to_new_subscription","component_fixed_charges_initial_units":[{"metric_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","units":5000000000}]}}},"exampleType":"generated"},"multipart/form-data":{"schema":{"type":"object","properties":{"switch_plan_id":{"type":"string","format":"uuid","writeOnly":true,"description":"The new plan to switch to.","uniqueKey":"switch_plan_id","typeLabel":"string\u003cuuid>"},"invoicing_behavior":{"enum":["add_to_next_invoice","invoice_now"],"type":"string","default":"invoice_now","description":"The invoicing behavior to use when replacing the plan. Invoice now will invoice the customer for the prorated difference of the old plan and the new plan, whereas add_to_next_invoice will wait until the end of the subscription to do the calculation.\n\n* `add_to_next_invoice` - Add to Next Invoice\n* `invoice_now` - Invoice Now","uniqueKey":"invoicing_behavior","typeLabel":"enum\u003cstring>"},"usage_behavior":{"enum":["transfer_to_new_subscription","keep_separate"],"type":"string","default":"transfer_to_new_subscription","description":"The usage behavior to use when replacing the plan. Transfer to new subscription will transfer the usage from the old subscription to the new subscription, whereas keep_separate will reset the usage to 0 for the new subscription, while keeping the old usage on the old subscription and charging for that appropriately at the end of the month.\n\n* `transfer_to_new_subscription` - Transfer to New Subscription\n* `keep_separate` - Keep Separate","uniqueKey":"usage_behavior","typeLabel":"enum\u003cstring>"},"component_fixed_charges_initial_units":{"type":"array","items":{"type":"object","properties":{"metric_id":{"type":"string","format":"uuid","writeOnly":true,"description":"The id of the metric that this initial value is for","isRequired":true,"uniqueKey":"component_fixed_charges_initial_units.items.[INDEX].metric_id","typeLabel":"string\u003cuuid>"},"units":{"type":"number","format":"double","maximum":10000000000,"minimum":0,"exclusiveMaximum":true,"description":"The number of units of the metric that this initial value is for","isRequired":true,"uniqueKey":"component_fixed_charges_initial_units.items.[INDEX].units","typeLabel":"number\u003cdouble>"}},"required":["metric_id","units"],"uniqueKey":"component_fixed_charges_initial_units.items.[INDEX]","typeLabel":"object"},"description":"The initial units for the plan components' prepaid fixed charges. In the context of swithciong plans, this is only required if the new plan has a component the old plan did not have, that has a prepaid charge, that deos not have a default.","uniqueKey":"component_fixed_charges_initial_units","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"switch_plan_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","invoicing_behavior":"invoice_now","usage_behavior":"transfer_to_new_subscription","component_fixed_charges_initial_units":[{"metric_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","units":5000000000}]}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"d6773f01-b96e-407c-a19b-7215c552062a":{"content":{"application/json":{"schema":{"type":"object","properties":{"subscription_id":{"type":"string","isRequired":true,"uniqueKey":"subscription_id","typeLabel":"string"},"start_date":{"type":"string","format":"date-time","description":"The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.","isRequired":true,"uniqueKey":"start_date","typeLabel":"string\u003cdate-time>"},"end_date":{"type":"string","format":"date-time","description":"The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.","isRequired":true,"uniqueKey":"end_date","typeLabel":"string\u003cdate-time>"},"auto_renew":{"type":"boolean","description":"Whether the subscription automatically renews. Defaults to true.","isRequired":true,"uniqueKey":"auto_renew","typeLabel":"boolean"},"is_new":{"type":"boolean","description":"Whether this subscription came from a renewal or from a first-time. Defaults to true on creation.","isRequired":true,"uniqueKey":"is_new","typeLabel":"boolean"},"subscription_filters":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","isRequired":true,"uniqueKey":"subscription_filters.items.[INDEX].value","typeLabel":"string"},"property_name":{"type":"string","description":"The string name of the property to filter on. Example: 'product_id'","isRequired":true,"uniqueKey":"subscription_filters.items.[INDEX].property_name","typeLabel":"string"}},"required":["property_name","value"],"uniqueKey":"subscription_filters.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"subscription_filters","typeLabel":"object[]"},"customer":{"type":"object","properties":{"customer_name":{"oneOf":[{"type":"string","readOnly":true,"description":"The display name of the customer","isRequired":true,"uniqueKey":"customer.customer_name.oneOf.0","typeLabel":"string"},{"type":"null","readOnly":true,"description":"The display name of the customer","isRequired":true,"uniqueKey":"customer.customer_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"customer.customer_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","format":"email","readOnly":true,"description":"The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider","isRequired":true,"uniqueKey":"customer.email.oneOf.0","typeLabel":"string\u003cemail>"},{"type":"null","format":"email","readOnly":true,"description":"The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider","isRequired":true,"uniqueKey":"customer.email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"customer.email","typeLabel":"string\u003cemail> | null"},"customer_id":{"oneOf":[{"type":"string","readOnly":true,"description":"The id provided when creating the customer, we suggest matching with your internal customer id in your backend","isRequired":true,"uniqueKey":"customer.customer_id.oneOf.0","typeLabel":"string"},{"type":"null","readOnly":true,"description":"The id provided when creating the customer, we suggest matching with your internal customer id in your backend","isRequired":true,"uniqueKey":"customer.customer_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"customer.customer_id","typeLabel":"string | null"}},"required":["customer_id","customer_name","email"],"isRequired":true,"uniqueKey":"customer","typeLabel":"object"},"billing_plan":{"type":"object","properties":{"plan_name":{"type":"string","readOnly":true,"isRequired":true,"uniqueKey":"billing_plan.plan_name","typeLabel":"string"},"plan_id":{"type":"string","isRequired":true,"uniqueKey":"billing_plan.plan_id","typeLabel":"string"},"version_id":{"type":"string","readOnly":true,"isRequired":true,"uniqueKey":"billing_plan.version_id","typeLabel":"string"},"version":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"billing_plan.version.oneOf.0","typeLabel":"integer"},{"type":"string","enum":["custom_version"],"isRequired":true,"uniqueKey":"billing_plan.version.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"billing_plan.version","typeLabel":"integer | enum\u003cstring>"}},"required":["plan_id","plan_name","version","version_id"],"isRequired":true,"uniqueKey":"billing_plan","typeLabel":"object"},"fully_billed":{"type":"boolean","readOnly":true,"isRequired":true,"uniqueKey":"fully_billed","typeLabel":"boolean"},"addons":{"type":"array","items":{"type":"object","properties":{"addon_subscription_id":{"type":"string","isRequired":true,"uniqueKey":"addons.items.[INDEX].addon_subscription_id","typeLabel":"string"},"start_date":{"type":"string","format":"date-time","readOnly":true,"description":"The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.","isRequired":true,"uniqueKey":"addons.items.[INDEX].start_date","typeLabel":"string\u003cdate-time>"},"end_date":{"type":"string","format":"date-time","readOnly":true,"description":"The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.","isRequired":true,"uniqueKey":"addons.items.[INDEX].end_date","typeLabel":"string\u003cdate-time>"},"addon":{"type":"object","properties":{"addon_name":{"type":"string","description":"The name of the add-on plan.","isRequired":true,"uniqueKey":"addons.items.[INDEX].addon.addon_name","typeLabel":"string"},"addon_id":{"type":"string","description":"The ID of the add-on plan.","isRequired":true,"uniqueKey":"addons.items.[INDEX].addon.addon_id","typeLabel":"string"},"addon_type":{"enum":["flat","usage_based"],"type":"string","readOnly":true,"isRequired":true,"uniqueKey":"addons.items.[INDEX].addon.addon_type","typeLabel":"enum\u003cstring>"},"billing_frequency":{"enum":["one_time","recurring"],"description":"* `one_time` - one_time\n* `recurring` - recurring","readOnly":true,"type":"string","isRequired":true,"uniqueKey":"addons.items.[INDEX].addon.billing_frequency","typeLabel":"enum\u003cstring>"}},"required":["addon_id","addon_name","addon_type","billing_frequency"],"isRequired":true,"uniqueKey":"addons.items.[INDEX].addon","typeLabel":"object"},"fully_billed":{"type":"boolean","readOnly":true,"isRequired":true,"uniqueKey":"addons.items.[INDEX].fully_billed","typeLabel":"boolean"}},"required":["addon","addon_subscription_id","end_date","fully_billed","start_date"],"uniqueKey":"addons.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"addons","typeLabel":"object[]"},"metadata":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"metadata.additionalProperties","typeLabel":"any"},"isRequired":true,"uniqueKey":"metadata","typeLabel":"object"}},"required":["addons","auto_renew","billing_plan","customer","end_date","fully_billed","is_new","metadata","start_date","subscription_filters","subscription_id"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"subscription_id":"\u003cstring>","start_date":"2023-11-07T05:31:56Z","end_date":"2023-11-07T05:31:56Z","auto_renew":true,"is_new":true,"subscription_filters":[{"value":"\u003cstring>","property_name":"\u003cstring>"}],"customer":{"customer_name":"\u003cstring>","email":"jsmith@example.com","customer_id":"\u003cstring>"},"billing_plan":{"plan_name":"\u003cstring>","plan_id":"\u003cstring>","version_id":"\u003cstring>","version":123},"fully_billed":true,"addons":[{"addon_subscription_id":"\u003cstring>","start_date":"2023-11-07T05:31:56Z","end_date":"2023-11-07T05:31:56Z","addon":{"addon_name":"\u003cstring>","addon_id":"\u003cstring>","addon_type":"flat","billing_frequency":"one_time"},"fully_billed":true}],"metadata":{}}}},"exampleType":"generated"}},"description":"","exampleType":"generated"}},"security":{"a2f1aa88-3058-4afa-82a5-7ff006d001c5":{"knoxTokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\"","scopes":[]}},"d6c17624-0a8c-4513-9e1d-887bd9e8dce2":{"OrganizationApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY","scopes":[]},"TokenAuth":{"$ref":"9363bc7c-7235-4740-bff6-ebdd857c2474","scopes":[]}}},"servers":{},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\"","scopes":[]},"schema":{"title":"Authorization","type":"string","description":"Token-based authentication with required prefix \"Token\"","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"knoxTokenAuth","name":"Authorization"}],"title":"knoxTokenAuth"},{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-API-KEY","scopes":[]},"schema":{"title":"X-API-KEY","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"OrganizationApiKeyAuth","name":"X-API-KEY"}],"title":"OrganizationApiKeyAuth"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"lotus","siteName":"Lotus","title":"Switch a subscription's plan - Lotus","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-06T22:43:31.879Z","originalFileLocation":"api-reference/subscriptions/switch-subscription-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=\"Upgrade or downgrade the susbcription\u0026#x27;s plan.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Lotus\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lotus/MiITvKPMr80Jfh6t/_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=\"/mintlify-assets/_mintlify/favicons/lotus/MiITvKPMr80Jfh6t/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lotus/MiITvKPMr80Jfh6t/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lotus/MiITvKPMr80Jfh6t/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lotus/MiITvKPMr80Jfh6t/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lotus/MiITvKPMr80Jfh6t/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lotus/MiITvKPMr80Jfh6t/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lotus/MiITvKPMr80Jfh6t/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lotus/MiITvKPMr80Jfh6t/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Switch a subscription\u0026#x27;s plan - Lotus\">\u003cmeta data-mint-head property=\"og:description\" content=\"Upgrade or downgrade the susbcription\u0026#x27;s plan.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Lotus\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.uselotus.io/api-reference/subscriptions/switch-subscription-plan\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lotus.mintlify.site/_mintlify/api/og/v2?division=Subscriptions\u0026amp;title=Switch+a+subscription%27s+plan\u0026amp;description=Upgrade+or+downgrade+the+susbcription%27s+plan.\u0026amp;theme=850f94eaa8b43b0c4fea2974\u0026amp;signature=9e2339cbc3a9bf27f79fa0dd67cc316c35a6c068f519e2c55eb42fb31e3f5d8c\">\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=\"Switch a subscription\u0026#x27;s plan - Lotus\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Upgrade or downgrade the susbcription\u0026#x27;s plan.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lotus.mintlify.site/_mintlify/api/og/v2?division=Subscriptions\u0026amp;title=Switch+a+subscription%27s+plan\u0026amp;description=Upgrade+or+downgrade+the+susbcription%27s+plan.\u0026amp;theme=850f94eaa8b43b0c4fea2974\u0026amp;signature=9e2339cbc3a9bf27f79fa0dd67cc316c35a6c068f519e2c55eb42fb31e3f5d8c\">\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=\"/mintlify-assets/_mintlify/favicons/lotus/MiITvKPMr80Jfh6t/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Lotus\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#C3986B\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.uselotus.io/api-reference/subscriptions/switch-subscription-plan\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/subscriptions/switch-subscription-plan.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.uselotus.io/#organization\",\"name\":\"Lotus\",\"url\":\"https://docs.uselotus.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/lotus/HlrVno1vSHfnJwCd/logo/light.svg?fit=max\u0026auto=format\u0026n=HlrVno1vSHfnJwCd\u0026q=85\u0026s=4682f6784b28863e5693f044eeb5cc43\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.uselotus.io#website\",\"name\":\"Lotus\",\"url\":\"https://docs.uselotus.io\",\"publisher\":{\"@id\":\"https://docs.uselotus.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.uselotus.io/api-reference/subscriptions/switch-subscription-plan#webpage\",\"url\":\"https://docs.uselotus.io/api-reference/subscriptions/switch-subscription-plan\",\"name\":\"Switch a subscription's plan\",\"description\":\"Upgrade or downgrade the susbcription's plan.\",\"dateModified\":\"2026-01-06T22:43:31.879Z\",\"isPartOf\":{\"@id\":\"https://docs.uselotus.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.uselotus.io/api-reference/subscriptions/switch-subscription-plan#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.uselotus.io/api-reference/subscriptions/switch-subscription-plan#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.uselotus.io/api-reference/api-overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Subscriptions\",\"item\":\"https://docs.uselotus.io/api-reference/subscriptions/create-subscription\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Switch a subscription's plan\",\"item\":\"https://docs.uselotus.io/api-reference/subscriptions/switch-subscription-plan\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.uselotus.io/api-reference/subscriptions/switch-subscription-plan#apireference\",\"headline\":\"Switch a subscription's plan\",\"name\":\"Switch a subscription's plan\",\"description\":\"Upgrade or downgrade the susbcription's plan.\",\"url\":\"https://docs.uselotus.io/api-reference/subscriptions/switch-subscription-plan\",\"mainEntityOfPage\":{\"@id\":\"https://docs.uselotus.io/api-reference/subscriptions/switch-subscription-plan#webpage\"},\"dateModified\":\"2026-01-06T22:43:31.879Z\",\"publisher\":{\"@id\":\"https://docs.uselotus.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.uselotus.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Lotus\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Lotus\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/subscriptions/switch-subscription-plan.md","siteName":"Lotus","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":"/overview/why-lotus"}]},{"anchor":"API Reference","icon":"square-terminal","groups":[{"group":"API Reference","pages":[{"title":"API Overview","openapi":"GET /api/ping/","href":"/api-reference/api-overview"},{"group":"SDK Setup","pages":[{"title":"Python Library","href":"/api-reference/python-guide"},{"title":"Typescript Library","href":"/api-reference/typescript-guide"}]},{"group":"Events","pages":[{"openapi":"POST /api/track/","title":null,"href":"/api-reference/events/tracking"},{"openapi":"POST /api/verify_idems_received/","title":"Verify Event Ingestion","href":"/api-reference/events/verify-ingestion"}]},{"group":"Customers","pages":[{"title":"Create a customer","openapi":"POST /api/customers/","href":"/api-reference/customers/create-customer"},{"title":"Get a customer","openapi":"GET /api/customers/{customer_id}/","href":"/api-reference/customers/retrieve-customer"},{"title":"List customers","openapi":"GET /api/customers/","href":"/api-reference/customers/list-customers"}]},{"group":"Entitlements","pages":[{"openapi":"GET /api/feature_access/","title":"Get Feature Access","href":"/api-reference/access/feature-access"},{"openapi":"GET /api/metric_access/","title":"Get Metric Access","href":"/api-reference/access/metric-access"}]},{"group":"Subscriptions","pages":[{"openapi":"POST /api/subscriptions/","title":"Create a subscription","href":"/api-reference/subscriptions/create-subscription"},{"title":"Cancel a subscription","openapi":"POST /api/subscriptions/{subscription_id}/cancel/","href":"/api-reference/subscriptions/cancel-subscription"},{"title":"Update a subscription","openapi":"POST /api/subscriptions/{subscription_id}/update/","description":"Cancel auto-renew or change the end date of a subscription.","href":"/api-reference/subscriptions/change-subscription"},{"title":"Switch a subscription's plan","openapi":"POST /api/subscriptions/{subscription_id}/switch_plan/","href":"/api-reference/subscriptions/switch-subscription-plan"},{"title":"Change Prepaid Units","openapi":"POST /api/subscriptions/{subscription_id}/components/{metric_id}/change_prepaid_units/","description":"Change the number of prepaid usage units in a subscription.","href":"/api-reference/subscriptions/change-prepaid-units"},{"openapi":"POST /api/subscriptions/{subscription_id}/addons/attach/","title":"Attach an Add-On","href":"/api-reference/subscriptions/attach-addon"},{"openapi":"POST /api/subscriptions/{subscription_id}/addons/{addon_id}/cancel/","title":"Cancel an Add-On","href":"/api-reference/subscriptions/cancel-addon"},{"title":"List subscriptions","openapi":"GET /api/subscriptions/","href":"/api-reference/subscriptions/list-subscriptions"},{"group":"Deprecated Methods","pages":[{"openapi":"POST /api/subscriptions/add/","title":"Create a subscription","href":"/api-reference/subscriptions/create-subscription-old"},{"title":"Cancel a subscription","openapi":"POST /api/subscriptions/cancel/","href":"/api-reference/subscriptions/cancel-subscription-old"},{"title":"Update a subscription","openapi":"POST /api/subscriptions/update/","href":"/api-reference/subscriptions/change-subscription-old"}]}]},{"group":"Plans","pages":[{"title":"List plans","openapi":"GET /api/plans/","href":"/api-reference/plans/list-plans"},{"openapi":"GET /api/plans/{plan_id}/","title":"Get Plan","href":"/api-reference/plans/retrieve-plan"}]},{"group":"Invoices","pages":[{"title":"List invoices","openapi":"GET /api/invoices/","href":"/api-reference/invoices/list-invoices"},{"title":"Get invoice","openapi":"GET /api/invoices/{invoice_id}/","href":"/api-reference/invoices/get-invoice"},{"title":"Get Invoice PDF","openapi":"GET /api/invoices/{invoice_id}/pdf_url/","href":"/api-reference/invoices/get-invoice-pdf"}]},{"group":"Credits","pages":[{"title":"List credits","openapi":"GET /api/credits/","href":"/api-reference/credits/list-credits"},{"title":"Create a credit","openapi":"POST /api/credits/","href":"/api-reference/credits/create-credit"},{"title":"Void credit","openapi":"POST /api/credits/{credit_id}/void/","href":"/api-reference/credits/void-credit"},{"title":"Update credit","openapi":"POST /api/credits/{credit_id}/update/","href":"/api-reference/credits/update-credit"}]}]}]},{"anchor":"Blog","href":"https://www.uselotus.io/journal","icon":"newspaper"},{"anchor":"Github","href":"https://github.com/uselotus/lotus","icon":"github"},{"anchor":"Community","href":"https://join.slack.com/t/lotus-community/shared_invite/zt-1ghi61p9j-ADYbp3tEL~N16AxQr2mlzA","icon":"slack"}]},"basePath":"","title":"Switch a subscription's plan - Lotus","deploymentId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","buildId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C6Z1vAfX.js","snippetPresets-Bjd6OXRM.js","utils-QL6OhUyF.js","style-to-object-BY3JEAdk.js","utils-Dsq-HLeF.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-CEYfmkoV.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CHgPjMM8.js","_Uint8Array-IXRJ_ueo.js","isObject-FP1Yky1u.js","ApiExamples-pq4ns9YA.js","usePlaygroundInputsStore-D-gnigmo.js","shallow-DIfWGPrf.js","isEqual-DDFuixlH.js","CodeSnippets-8g5rilZj.js","CodeSnippet-C_J7pouP.js","use-playground-group-access-bkOyfPao.js","Page-B_smDgrp.js","api-description-markdown-DtcP2u3s.js","DynamicMarkdown-DOefW1_8.js","SectionHeading-Cg4lfWZw.js","MethodPill-BnqygvYm.js","getPastedJson-BGXYEZ3P.js","Check2Icon-BBeO3TOS.js","axios-CsQoIw0U.js","Markdown-D5IqLG6A.js","AssistantPageLink-_S2h4i6W.js","dist-DzZqOeCq.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}