Token-based authentication with required prefix "Token"
Query Parameters
customer_id
string | null
required
Filter to a specific customer.
Minimum string length: 1
plan_id
string<uuid>
required
Filter to a specific plan.
subscription_filters
object[]
Filter to a specific set of subscription filters. If your billing model only allows for one subscription per customer, you very likely do not need this field. Must be formatted as a JSON-encoded + stringified list of dictionaries, where each dictionary has a key of 'property_name' and a key of 'value'.
[DEPRECATED] Will currently perform a best-effort attempt to find the correct plan version to replace the current plan with. If more than one plan version matches the criteria, this will return an error. Use the change_plan method of a subscription instance instead.
invoicing_behavior
enum<string>
default:invoice_now
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
turn_off_auto_renew
boolean
Turn off auto renew for the subscription
end_date
string<date-time>
Change the end date for the subscription.
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/change-subscription-old","slug":"/api-reference/subscriptions/change-subscription-old","pageMetadata":{"title":"Update a subscription","openapi":"POST /api/subscriptions/update/","description":"Upgrade, downgrade or cancel autorenew for a subscription plan","href":"/api-reference/subscriptions/change-subscription-old"},"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, downgrade or cancel autorenew for a subscription 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`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);return _jsxs(_Fragment,{children:[_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`14`,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:`14`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`lotus.update_subscription(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` customer_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cust_0569173ee6654369'`}),_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:` plan_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"plan_123\"`}),_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:` replace_plan_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"plan_456\"`}),_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:` invocing_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:` turn_off_auto_renew`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`lotus.update_subscription(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` customer_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cust_0569173ee6654369'`}),_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:` plan_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"plan_123\"`}),_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:` subscription_filters`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"property_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"value\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"active\"`}),_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:` end_date`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`datetime.date(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2022`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`8`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Typescript`,numberOfLines:`8`,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:`8`,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:`updateSubscription`}),_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:` customerId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cust_234\"`}),_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:` planId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"plan_234\"`}),_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:` subscriptionFilters`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`property_name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"project_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"3234123\"`}),_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:` replacePlanId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"plan_235\"`}),_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:` invoicingBehavior`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` usageBehavior`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"transfer_to_new_subscription\"`})]}),`\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":"Update a subscription","openapi":"POST /api/subscriptions/update/","description":"Upgrade, downgrade or cancel autorenew for a subscription plan","href":"/api-reference/subscriptions/change-subscription-old"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"api_subscriptions_update_create","parameters":["7340a883-5a2c-4e2d-913d-e0b9e383015c","498879de-2af5-4e98-960c-4681d31467d1","6f39ab17-bff3-4873-a1df-e4a44a71cc1c"],"tags":["api"],"requestBody":"1f3043f1-deb4-45de-a36d-24fce87bf473","security":["448bedc2-3469-4d80-aa6d-ce9602af3d9b","0daa5a6a-2c61-429a-9c5c-3652d92b18c2"],"responses":{"200":"3b498715-05a6-4909-b9b2-b467ee23f092"},"method":"post","type":"path","servers":[],"path":"/api/subscriptions/update/","baseUrlOptions":["https://api.uselotus.io"],"title":"","description":"Upgrade, downgrade or cancel autorenew for a subscription plan","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"7340a883-5a2c-4e2d-913d-e0b9e383015c":{"in":"query","name":"customer_id","schema":{"oneOf":[{"type":"string","minLength":1,"description":"Filter to a specific customer.","isRequired":true,"uniqueKey":"oneOf.0","typeLabel":"string"},{"type":"null","minLength":1,"description":"Filter to a specific customer.","isRequired":true,"uniqueKey":"oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"","typeLabel":"string | null"},"description":"Filter to a specific customer.","required":true},"498879de-2af5-4e98-960c-4681d31467d1":{"in":"query","name":"plan_id","schema":{"type":"string","format":"uuid","isRequired":true,"description":"Filter to a specific plan.","uniqueKey":"","typeLabel":"string\u003cuuid>"},"description":"Filter to a specific plan.","required":true},"6f39ab17-bff3-4873-a1df-e4a44a71cc1c":{"in":"query","name":"subscription_filters","schema":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"isRequired":true,"uniqueKey":"items.[INDEX].value","typeLabel":"string"},"property_name":{"type":"string","minLength":1,"description":"The string name of the property to filter on. Example: 'product_id'","isRequired":true,"uniqueKey":"items.[INDEX].property_name","typeLabel":"string"}},"required":["property_name","value"],"uniqueKey":"items.[INDEX]","typeLabel":"object"},"description":"Filter to a specific set of subscription filters. If your billing model only allows for one subscription per customer, you very likely do not need this field. Must be formatted as a JSON-encoded + stringified list of dictionaries, where each dictionary has a key of 'property_name' and a key of 'value'.","uniqueKey":"","typeLabel":"object[]"},"description":"Filter to a specific set of subscription filters. If your billing model only allows for one subscription per customer, you very likely do not need this field. Must be formatted as a JSON-encoded + stringified list of dictionaries, where each dictionary has a key of 'property_name' and a key of 'value'."}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"replace_plan_id":{"type":"string","format":"uuid","writeOnly":true,"description":"[DEPRECATED] Will currently perform a best-effort attempt to find the correct plan version to replace the current plan with. If more than one plan version matches the criteria, this will return an error. Use the change_plan method of a subscription instance instead.","uniqueKey":"replace_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>"},"turn_off_auto_renew":{"type":"boolean","description":"Turn off auto renew for the subscription","uniqueKey":"turn_off_auto_renew","typeLabel":"boolean"},"end_date":{"type":"string","format":"date-time","description":"Change the end date for the subscription.","uniqueKey":"end_date","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"replace_plan_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","invoicing_behavior":"invoice_now","usage_behavior":"transfer_to_new_subscription","turn_off_auto_renew":true,"end_date":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"replace_plan_id":{"type":"string","format":"uuid","writeOnly":true,"description":"[DEPRECATED] Will currently perform a best-effort attempt to find the correct plan version to replace the current plan with. If more than one plan version matches the criteria, this will return an error. Use the change_plan method of a subscription instance instead.","uniqueKey":"replace_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>"},"turn_off_auto_renew":{"type":"boolean","description":"Turn off auto renew for the subscription","uniqueKey":"turn_off_auto_renew","typeLabel":"boolean"},"end_date":{"type":"string","format":"date-time","description":"Change the end date for the subscription.","uniqueKey":"end_date","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"replace_plan_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","invoicing_behavior":"invoice_now","usage_behavior":"transfer_to_new_subscription","turn_off_auto_renew":true,"end_date":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"},"multipart/form-data":{"schema":{"type":"object","properties":{"replace_plan_id":{"type":"string","format":"uuid","writeOnly":true,"description":"[DEPRECATED] Will currently perform a best-effort attempt to find the correct plan version to replace the current plan with. If more than one plan version matches the criteria, this will return an error. Use the change_plan method of a subscription instance instead.","uniqueKey":"replace_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>"},"turn_off_auto_renew":{"type":"boolean","description":"Turn off auto renew for the subscription","uniqueKey":"turn_off_auto_renew","typeLabel":"boolean"},"end_date":{"type":"string","format":"date-time","description":"Change the end date for the subscription.","uniqueKey":"end_date","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"replace_plan_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","invoicing_behavior":"invoice_now","usage_behavior":"transfer_to_new_subscription","turn_off_auto_renew":true,"end_date":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"3b498715-05a6-4909-b9b2-b467ee23f092":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"subscription_id":{"type":"string","isRequired":true,"uniqueKey":"items.[INDEX].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":"items.[INDEX].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":"items.[INDEX].end_date","typeLabel":"string\u003cdate-time>"},"auto_renew":{"type":"boolean","description":"Whether the subscription automatically renews. Defaults to true.","isRequired":true,"uniqueKey":"items.[INDEX].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":"items.[INDEX].is_new","typeLabel":"boolean"},"subscription_filters":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","isRequired":true,"uniqueKey":"items.[INDEX].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":"items.[INDEX].subscription_filters.items.[INDEX].property_name","typeLabel":"string"}},"required":["property_name","value"],"uniqueKey":"items.[INDEX].subscription_filters.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"items.[INDEX].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":"items.[INDEX].customer.customer_name.oneOf.0","typeLabel":"string"},{"type":"null","readOnly":true,"description":"The display name of the customer","isRequired":true,"uniqueKey":"items.[INDEX].customer.customer_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"items.[INDEX].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":"items.[INDEX].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":"items.[INDEX].customer.email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"items.[INDEX].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":"items.[INDEX].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":"items.[INDEX].customer.customer_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"items.[INDEX].customer.customer_id","typeLabel":"string | null"}},"required":["customer_id","customer_name","email"],"isRequired":true,"uniqueKey":"items.[INDEX].customer","typeLabel":"object"},"billing_plan":{"type":"object","properties":{"plan_name":{"type":"string","readOnly":true,"isRequired":true,"uniqueKey":"items.[INDEX].billing_plan.plan_name","typeLabel":"string"},"plan_id":{"type":"string","isRequired":true,"uniqueKey":"items.[INDEX].billing_plan.plan_id","typeLabel":"string"},"version_id":{"type":"string","readOnly":true,"isRequired":true,"uniqueKey":"items.[INDEX].billing_plan.version_id","typeLabel":"string"},"version":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"items.[INDEX].billing_plan.version.oneOf.0","typeLabel":"integer"},{"type":"string","enum":["custom_version"],"isRequired":true,"uniqueKey":"items.[INDEX].billing_plan.version.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"items.[INDEX].billing_plan.version","typeLabel":"integer | enum\u003cstring>"}},"required":["plan_id","plan_name","version","version_id"],"isRequired":true,"uniqueKey":"items.[INDEX].billing_plan","typeLabel":"object"},"fully_billed":{"type":"boolean","readOnly":true,"isRequired":true,"uniqueKey":"items.[INDEX].fully_billed","typeLabel":"boolean"},"addons":{"type":"array","items":{"type":"object","properties":{"addon_subscription_id":{"type":"string","isRequired":true,"uniqueKey":"items.[INDEX].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":"items.[INDEX].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":"items.[INDEX].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":"items.[INDEX].addons.items.[INDEX].addon.addon_name","typeLabel":"string"},"addon_id":{"type":"string","description":"The ID of the add-on plan.","isRequired":true,"uniqueKey":"items.[INDEX].addons.items.[INDEX].addon.addon_id","typeLabel":"string"},"addon_type":{"enum":["flat","usage_based"],"type":"string","readOnly":true,"isRequired":true,"uniqueKey":"items.[INDEX].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":"items.[INDEX].addons.items.[INDEX].addon.billing_frequency","typeLabel":"enum\u003cstring>"}},"required":["addon_id","addon_name","addon_type","billing_frequency"],"isRequired":true,"uniqueKey":"items.[INDEX].addons.items.[INDEX].addon","typeLabel":"object"},"fully_billed":{"type":"boolean","readOnly":true,"isRequired":true,"uniqueKey":"items.[INDEX].addons.items.[INDEX].fully_billed","typeLabel":"boolean"}},"required":["addon","addon_subscription_id","end_date","fully_billed","start_date"],"uniqueKey":"items.[INDEX].addons.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"items.[INDEX].addons","typeLabel":"object[]"},"metadata":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"items.[INDEX].metadata.additionalProperties","typeLabel":"any"},"isRequired":true,"uniqueKey":"items.[INDEX].metadata","typeLabel":"object"}},"required":["addons","auto_renew","billing_plan","customer","end_date","fully_billed","is_new","metadata","start_date","subscription_filters","subscription_id"],"uniqueKey":"items.[INDEX]","typeLabel":"object"},"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":{"448bedc2-3469-4d80-aa6d-ce9602af3d9b":{"knoxTokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\"","scopes":[]}},"0daa5a6a-2c61-429a-9c5c-3652d92b18c2":{"OrganizationApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY","scopes":[]},"TokenAuth":{"$ref":"2e8dda05-7309-4105-9d0e-f1be5f0462ef","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":"Update a subscription - Lotus","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-06T22:43:31.528Z","originalFileLocation":"api-reference/subscriptions/change-subscription-old.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, downgrade or cancel autorenew for a subscription 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=\"Update a subscription - Lotus\">\u003cmeta data-mint-head property=\"og:description\" content=\"Upgrade, downgrade or cancel autorenew for a subscription 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/change-subscription-old\">\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=Deprecated+Methods\u0026amp;title=Update+a+subscription\u0026amp;description=Upgrade%2C+downgrade+or+cancel+autorenew+for+a+subscription+plan\u0026amp;theme=850f94eaa8b43b0c4fea2974\u0026amp;signature=7e90266c3b812964a93a3594e2145b3bc25c910cce43526e7b3db5df633b07fb\">\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=\"Update a subscription - Lotus\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Upgrade, downgrade or cancel autorenew for a subscription plan\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lotus.mintlify.site/_mintlify/api/og/v2?division=Deprecated+Methods\u0026amp;title=Update+a+subscription\u0026amp;description=Upgrade%2C+downgrade+or+cancel+autorenew+for+a+subscription+plan\u0026amp;theme=850f94eaa8b43b0c4fea2974\u0026amp;signature=7e90266c3b812964a93a3594e2145b3bc25c910cce43526e7b3db5df633b07fb\">\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/change-subscription-old\">\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/change-subscription-old.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/change-subscription-old#webpage\",\"url\":\"https://docs.uselotus.io/api-reference/subscriptions/change-subscription-old\",\"name\":\"Update a subscription\",\"description\":\"Upgrade, downgrade or cancel autorenew for a subscription plan\",\"dateModified\":\"2026-01-06T22:43:31.528Z\",\"isPartOf\":{\"@id\":\"https://docs.uselotus.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.uselotus.io/api-reference/subscriptions/change-subscription-old#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.uselotus.io/api-reference/subscriptions/change-subscription-old#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\":\"Deprecated Methods\",\"item\":\"https://docs.uselotus.io/api-reference/subscriptions/create-subscription-old\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Update a subscription\",\"item\":\"https://docs.uselotus.io/api-reference/subscriptions/change-subscription-old\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.uselotus.io/api-reference/subscriptions/change-subscription-old#apireference\",\"headline\":\"Update a subscription\",\"name\":\"Update a subscription\",\"description\":\"Upgrade, downgrade or cancel autorenew for a subscription plan\",\"url\":\"https://docs.uselotus.io/api-reference/subscriptions/change-subscription-old\",\"mainEntityOfPage\":{\"@id\":\"https://docs.uselotus.io/api-reference/subscriptions/change-subscription-old#webpage\"},\"dateModified\":\"2026-01-06T22:43:31.528Z\",\"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/change-subscription-old.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/","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/","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","description":"Cancels a subscription. You can modify the behavior of the cancellation based on the arguments passed to the call.","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/","description":null,"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":"Update a subscription - 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"]}