from lago_python_client.client import Clientfrom lago_python_client.exceptions import LagoApiErrorfrom lago_python_client.models import Subscriptionclient = Client(api_key='__YOUR_API_KEY__')update_params = Subscription(name='new name', subscription_at='2022-08-08T00:00:00Z', ending_at= '2023-08-08T00:00:00Z')try: client.subscriptions.update(update_params, 'id')except LagoApiError as e: repair_broken_state(e) # do something on error or raise your own exception
from lago_python_client.client import Clientfrom lago_python_client.exceptions import LagoApiErrorfrom lago_python_client.models import Subscriptionclient = Client(api_key='__YOUR_API_KEY__')update_params = Subscription(name='new name', subscription_at='2022-08-08T00:00:00Z', ending_at= '2023-08-08T00:00:00Z')try: client.subscriptions.update(update_params, 'id')except LagoApiError as e: repair_broken_state(e) # do something on error or raise your own exception
from lago_python_client.client import Clientfrom lago_python_client.exceptions import LagoApiErrorfrom lago_python_client.models import Subscriptionclient = Client(api_key='__YOUR_API_KEY__')update_params = Subscription(name='new name', subscription_at='2022-08-08T00:00:00Z', ending_at= '2023-08-08T00:00:00Z')try: client.subscriptions.update(update_params, 'id')except LagoApiError as e: repair_broken_state(e) # do something on error or raise your own exception
If the field is not defined and multiple active and pending subscriptions exists, Lago will update the active subscription. However, if you wish to update a pending subscription, please ensure that you include the status attribute with the pending value in your request body.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Lago","description":"Developer documentation for Lago, the open-source billing platform for usage metering, subscriptions, invoicing, payments, and revenue operations.","colors":{"primary":"#006CFA","light":"#006CFA","dark":"#006CFA"},"logo":{"light":"https://mintcdn.com/lago-docs/zZSJbpe68PHhSs3x/logo/light.svg?fit=max\u0026auto=format\u0026n=zZSJbpe68PHhSs3x\u0026q=85\u0026s=b4af3001527c985b81858b9a0928534c","dark":"https://mintcdn.com/lago-docs/zZSJbpe68PHhSs3x/logo/dark.svg?fit=max\u0026auto=format\u0026n=zZSJbpe68PHhSs3x\u0026q=85\u0026s=1eb7aacac796b0cc6bf05be790a792b1"},"favicon":"https://mintcdn.com/lago-docs/8N-yOElNGe9jRGG5/favicon.svg?fit=max\u0026auto=format\u0026n=8N-yOElNGe9jRGG5\u0026q=85\u0026s=5c319e58dd9b5c5b8a31cf2ad8009a1c","api":{"openapi":"https://swagger.getlago.com/openapi.yaml","mdx":{"server":"https://api.getlago.com/api/v1"}},"background":{"color":{"light":"#F5F5EF","dark":"#131923"}},"navbar":{"links":[{"href":"https://getlago.com/book-a-demo","label":"Book a Demo"}],"primary":{"type":"button","label":"Get Started","href":"https://getlago.com/book-a-demo"}},"footer":{"socials":{"github":"https://github.com/getlago/lago","slack":"https://getlago.com/slack","x":"https://x.com/getlago","linkedin":"https://www.linkedin.com/company/getlago","youtube":"https://www.youtube.com/channel/UCp6ltp7n3SgDVsmerJ7O7ZA"},"links":[{"header":"Documentation","items":[{"label":"Get started","href":"https://getlago.com/docs/guide/introduction/welcome-to-lago"},{"label":"API reference","href":"https://getlago.com/docs/api-reference/intro"},{"label":"Integrations","href":"https://getlago.com/docs/integrations/introduction"},{"label":"Templates","href":"https://getlago.com/docs/templates/introduction"},{"label":"Changelog","href":"https://getlago.com/docs/changelog/product"},{"label":"FAQ","href":"https://getlago.com/docs/faq/about-lago"}]},{"header":"Developers","items":[{"label":"Developer hub","href":"https://getlago.com/docs/developers"},{"label":"Authentication","href":"https://getlago.com/docs/auth"},{"label":"Webhooks","href":"https://getlago.com/docs/guide/webhooks"},{"label":"SDKs","href":"https://getlago.com/docs/developers"},{"label":"OpenAPI spec","href":"https://swagger.getlago.com/"},{"label":"MCP server","href":"https://getlago.com/docs/guide/ai-agents/mcp-server"},{"label":"Self-hosted","href":"https://getlago.com/docs/guide/lago-self-hosted/overview"},{"label":"llms.txt","href":"https://getlago.com/docs/llms.txt"}]},{"header":"Platform","items":[{"label":"Usage metering","href":"https://getlago.com/platform/usage-metering"},{"label":"Billing \u0026 invoicing","href":"https://getlago.com/platform/billing-invoicing"},{"label":"Cash collection","href":"https://getlago.com/platform/cash-collection"},{"label":"Revenue analytics","href":"https://getlago.com/platform/revenue-analytics"},{"label":"Entitlements","href":"https://getlago.com/platform/entitlements"},{"label":"Lago AI","href":"https://getlago.com/platform/ai"},{"label":"Pricing","href":"https://getlago.com/pricing"}]},{"header":"Company","items":[{"label":"About Lago","href":"https://getlago.com/docs/about"},{"label":"Customers","href":"https://getlago.com/customers"},{"label":"Blog","href":"https://getlago.com/blog"},{"label":"Contact","href":"https://getlago.com/docs/contact"},{"label":"Trust center","href":"https://security.getlago.com"},{"label":"Status","href":"https://status.getlago.com"}]}]},"seo":{"metatags":{"canonical":"https://getlago.com/docs","description":"Developer documentation for Lago's API-first billing platform, including OpenAPI, SDKs, webhooks, MCP, authentication, and implementation guides.","keywords":"Lago API, billing API, usage metering API, OpenAPI, billing SDK, Lago MCP"},"organization":{"id":"https://getlago.com/#organization","name":"Lago","legalName":"Get Lago Corp.","url":"https://getlago.com","logo":"https://getlago.com/docs/logo/light.svg","sameAs":["https://github.com/getlago","https://www.linkedin.com/company/getlago","https://x.com/GetLago","https://www.youtube.com/channel/UCp6ltp7n3SgDVsmerJ7O7ZA"]},"indexing":"all"},"fonts":{"heading":{"family":"GT America","weight":700,"source":"fonts/GT-America-Standard-Medium.woff2","format":"woff2"},"body":{"family":"GT America","source":"fonts/GT-America-Standard-Regular.woff2","format":"woff2"}},"styling":{"codeblocks":"dark","latex":true},"integrations":{"ga4":{"measurementId":"G-743BQ9THCG"},"cookies":{"key":"lago_docs_analytics","value":"granted"}},"errors":{"404":{"redirect":false,"title":"Documentation page not found","description":"No Lago documentation exists at this URL. Start at [Lago Developer Documentation](/welcome), browse [Developer Resources](/developers), inspect the [documentation index](/llms.txt) or [sitemap](/sitemap.xml), or search the [API reference](/api-reference/intro)."}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"navigation":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://getlago.com/blog"},{"anchor":"Community","icon":"slack","href":"https://getlago.com/slack"},{"anchor":"GitHub","icon":"github","href":"https://github.com/getlago/lago"},{"anchor":"Status","icon":"signal-bars","href":"https://status.getlago.com/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lago-docs","hasAudioNarration":false,"actualSubdomain":"lago-docs","customDomains":["getlago.com"],"gitSource":{"type":"github","owner":"getlago","repo":"lago-doc","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae90c1e1df9668c6b4d93b0","collectionId":"d5f75ab8-6a24-4dcd-8ccb-d63f9443d227","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae90c1e1df9668c6b4d93b0"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae9b61ac43360bf593f890c","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"API References","count":235},{"language":"default","tag":"API Reference","count":235},{"language":"default","tag":"Guide","count":200},{"language":"default","tag":"Integrations","count":54},{"language":"default","tag":"Plans","count":46},{"language":"default","tag":"Resources","count":45},{"language":"default","tag":"Charges","count":39},{"language":"default","tag":"Pricing \u0026 Subscriptions","count":35},{"language":"default","tag":"Subscriptions","count":31},{"language":"default","tag":"Invoices","count":27}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"html{visibility:hidden;background-color:#f5f5ef}@media (prefers-color-scheme:dark){html{background-color:#131923}}html.ready{visibility:visible}.dark .welcome-card{background-color:#1c2535!important;border-color:rgba(255,255,255,.1)!important;box-shadow:0 1px 2px 0 rgba(0,0,0,.3)!important;color:#e5e7eb}.dark .welcome-card:hover{background-color:#243044!important}.dark #changelog-month-nav .changelog-month-nav__list a:hover,.dark .welcome-card h3{color:#fff}.dark .welcome-card p{color:#9ca3af!important}#changelog-month-nav{padding-left:2.5rem;width:19rem;box-sizing:border-box;margin-bottom:1.75rem;max-height:45vh;overflow-y:auto}#changelog-month-nav .changelog-month-nav__year{margin:0 0 .5rem;font-size:.875rem;line-height:1.5rem;font-weight:500;color:#364152}#changelog-month-nav .changelog-month-nav__list{list-style:none;margin:0;padding:0;border-left:1px solid rgba(0,0,0,.08)}#changelog-month-nav .changelog-month-nav__list a{display:block;padding:.25rem 0 .25rem .75rem;margin-left:-1px;border-left:1px solid transparent;font-size:.875rem;line-height:1.5rem;color:#697586;text-decoration:none;transition:color .15s ease,border-color .15s ease}#changelog-month-nav .changelog-month-nav__list a:hover{color:#121926}#changelog-month-nav .changelog-month-nav__list a.is-active{color:#006cfa;border-left-color:#006cfa;font-weight:500}.dark #changelog-month-nav .changelog-month-nav__year{color:#cdd5df}.dark #changelog-month-nav .changelog-month-nav__list{border-left-color:rgba(255,255,255,.12)}.dark #changelog-month-nav .changelog-month-nav__list a{color:#9aa4b2}.dark #changelog-month-nav .changelog-month-nav__list a.is-active{color:#4d9bff;border-left-color:#4d9bff}.update-container>div:first-child{display:none}.update-container>div:nth-child(2){flex:1 1 100%;max-width:100%;width:100%}.update-container{gap:0}#footer a[href*=\"utm_campaign=poweredBy\"]{display:none}"}],"page":{"pagePath":"api-reference/subscriptions/update","slug":"/api-reference/subscriptions/update","pageMetadata":{"title":"Update a subscription","openapi":"PUT /subscriptions/{external_id}","authMethod":"bearer","description":"This endpoint allows you to update a subscription.","href":"/api-reference/subscriptions/update"},"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: \"This endpoint allows you to update a subscription.\"\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Update a subscription","openapi":"PUT /subscriptions/{external_id}","authMethod":"bearer","description":"This endpoint allows you to update a subscription.","href":"/api-reference/subscriptions/update"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,RequestExample}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);return _jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`126`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`126`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`LAGO_URL`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.getlago.com\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`API_KEY`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"__YOUR_API_KEY__\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --location`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` PUT`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$LAGO_URL`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/subscriptions/:id\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --data-raw`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"subscription\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Repository B\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"ending_at\": \"2022-10-08T00:00:00Z\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"subscription_at\": \"2022-08-08T00:00:00Z\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"plan_overrides\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"amount_cents\": 10000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"amount_currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Plan for early stage startups.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"invoice_display_name\": \"Startup plan\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Startup\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"tax_codes\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"french_standard_vat\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"trial_period\": 5,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"charges\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"id\": \"cha_12345\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"billable_metric_id\": \"bm_12345\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"invoice_display_name\": \"Setup\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"min_amount_cents\": 0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"tax_codes\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"standard_vat\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"properties\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"graduated_ranges\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"from_value\": 0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"to_value\": 10,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"flat_amount\": \"10\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"per_unit_amount\": \"0.5\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"id\": \"cha_67890\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"billable_metric_id\": \"bm_67890\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"invoice_display_name\": \"FX Transfer\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"min_amount_cents\": 0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"properties\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"graduated_percentage_ranges\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"from_value\": 0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"to_value\": 10,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"rate\": \"1\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"flat_amount\": \"10\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"id\": \"cha_111213\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"billable_metric_id\": \"bm_111213\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"invoice_display_name\": \"API calls\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"min_amount_cents\": 0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"properties\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"amount\": \"30\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"free_units\": 100,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"package_size\": 1000`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"id\": \"cha_141516\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"billable_metric_id\": \"bm_141516\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"invoice_display_name\": \"Interchange\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"min_amount_cents\": 0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"properties\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"rate\": \"1\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"fixed_amount\": \"0.5\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"free_units_per_events\": 5,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"free_units_per_total_aggregation\": \"500\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"per_transaction_max_amount\": \"3.75\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"per_transaction_min_amount\": \"1.75\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"id\": \"cha_171819\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"billable_metric_id\": \"bm_171819\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"invoice_display_name\": \"Seats\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"min_amount_cents\": 0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"properties\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"volume_ranges\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"from_value\": 0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"to_value\": 10,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"flat_amount\": \"10\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"per_unit_amount\": \"0.5\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"id\": \"cha_202122\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"billable_metric_id\": \"bm_202122\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"invoice_display_name\": \"Interchange\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"min_amount_cents\": 0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"filters\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"values\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"cloud\": [\"aws\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"region\": [\"us-east-1\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"properties\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"graduated_ranges\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"from_value\": 0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"to_value\": 10,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"flat_amount\": \"10\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"per_unit_amount\": \"0.5\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`12`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` lago_python_client.client `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` Client`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` lago_python_client.exceptions `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` LagoApiError`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` lago_python_client.models `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` Subscription`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = Client(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'__YOUR_API_KEY__'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`update_params = Subscription(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'new name'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`subscription_at`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'2022-08-08T00:00:00Z'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`ending_at`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`= `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'2023-08-08T00:00:00Z'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`try`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` client.subscriptions.update(update_params, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'id'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`except`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` LagoApiError `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` e:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` repair_broken_state(e) `}),_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# do something on error or raise your own exception`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Ruby`,numberOfLines:`6`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`require`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'lago-ruby-client'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#4EC9B0`,\"--shiki-dark\":`#4EC9B0`},children:`Lago::Api::Client`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`new`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`api_key:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '__YOUR_API_KEY__'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`update_params`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = { `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`name:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'new name'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`subscription_at:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '2022-08-08T00:00:00Z'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`ending_at:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '2022-08-08T00:00:00Z'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`subscriptions`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`update`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(update_params, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'id'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Javascript`,numberOfLines:`7`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`subscriptions`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`updateSubscription`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"external_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` subscription:`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` name:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"new name\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` subscription_at:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"2022-08-08T00:00:00Z\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` ending_at:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"2023-08-08T00:00:00Z\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Update a subscription","openapi":"PUT /subscriptions/{external_id}","authMethod":"bearer","description":"This endpoint allows you to update a subscription.","href":"/api-reference/subscriptions/update"}}}},"mdxExtracts":{"tableOfContents":[],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"126\">\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">LAGO_URL\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"https://api.getlago.com\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">API_KEY\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"__YOUR_API_KEY__\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> --location\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> --request\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> PUT\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">$LAGO_URL\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">/api/v1/subscriptions/:id\"\u003c/span>\u003cspan style=\"color:#D7BA7D;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"Authorization: Bearer \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">$API_KEY\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#D7BA7D;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> 'Content-Type: application/json'\u003c/span>\u003cspan style=\"color:#D7BA7D;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> --data-raw\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"subscription\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"name\": \"Repository B\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"ending_at\": \"2022-10-08T00:00:00Z\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"subscription_at\": \"2022-08-08T00:00:00Z\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"plan_overrides\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"amount_cents\": 10000,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"amount_currency\": \"USD\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"description\": \"Plan for early stage startups.\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"invoice_display_name\": \"Startup plan\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"name\": \"Startup\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"tax_codes\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"french_standard_vat\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"trial_period\": 5,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"charges\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"id\": \"cha_12345\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"billable_metric_id\": \"bm_12345\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"invoice_display_name\": \"Setup\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"min_amount_cents\": 0,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"tax_codes\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"standard_vat\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"properties\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"graduated_ranges\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"from_value\": 0,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"to_value\": 10,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"flat_amount\": \"10\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"per_unit_amount\": \"0.5\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"id\": \"cha_67890\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"billable_metric_id\": \"bm_67890\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"invoice_display_name\": \"FX Transfer\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"min_amount_cents\": 0,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"properties\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"graduated_percentage_ranges\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"from_value\": 0,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"to_value\": 10,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"rate\": \"1\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"flat_amount\": \"10\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"id\": \"cha_111213\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"billable_metric_id\": \"bm_111213\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"invoice_display_name\": \"API calls\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"min_amount_cents\": 0,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"properties\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"amount\": \"30\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"free_units\": 100,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"package_size\": 1000\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"id\": \"cha_141516\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"billable_metric_id\": \"bm_141516\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"invoice_display_name\": \"Interchange\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"min_amount_cents\": 0,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"properties\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"rate\": \"1\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"fixed_amount\": \"0.5\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"free_units_per_events\": 5,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"free_units_per_total_aggregation\": \"500\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"per_transaction_max_amount\": \"3.75\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"per_transaction_min_amount\": \"1.75\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"id\": \"cha_171819\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"billable_metric_id\": \"bm_171819\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"invoice_display_name\": \"Seats\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"min_amount_cents\": 0,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"properties\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"volume_ranges\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"from_value\": 0,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"to_value\": 10,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"flat_amount\": \"10\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"per_unit_amount\": \"0.5\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"id\": \"cha_202122\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"billable_metric_id\": \"bm_202122\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"invoice_display_name\": \"Interchange\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"min_amount_cents\": 0,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"filters\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"values\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"cloud\": [\"aws\"],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"region\": [\"us-east-1\"]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"properties\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"graduated_ranges\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"from_value\": 0,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"to_value\": 10,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"flat_amount\": \"10\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"per_unit_amount\": \"0.5\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">}'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"12\">\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> lago_python_client.client \u003c/span>\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> Client\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> lago_python_client.exceptions \u003c/span>\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> LagoApiError\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> lago_python_client.models \u003c/span>\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> Subscription\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">client = Client(\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">api_key\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">'__YOUR_API_KEY__'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">update_params = Subscription(\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">name\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">'new name'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">subscription_at\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">'2022-08-08T00:00:00Z'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">ending_at\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">= \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">'2023-08-08T00:00:00Z'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">try\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">:\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> client.subscriptions.update(update_params, \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">'id'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">except\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> LagoApiError \u003c/span>\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">as\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> e:\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> repair_broken_state(e) \u003c/span>\u003cspan style=\"color:#6A9955;--shiki-dark:#6A9955\"># do something on error or raise your own exception\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Ruby","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"ruby\">\u003ccode language=\"ruby\" numberOfLines=\"6\">\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">require\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> 'lago-ruby-client'\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">client\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> = \u003c/span>\u003cspan style=\"color:#4EC9B0;--shiki-dark:#4EC9B0\">Lago::Api::Client\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">new\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">api_key:\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> '__YOUR_API_KEY__'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">update_params\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> = { \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">name:\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> 'new name'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">subscription_at:\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> '2022-08-08T00:00:00Z'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">ending_at:\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> '2022-08-08T00:00:00Z'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">client.\u003c/span>\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">subscriptions\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">update\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">(update_params, \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">'id'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Javascript","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"7\">\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">await\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> client\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">subscriptions\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">updateSubscription\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"external_id\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> subscription:\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> name:\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"new name\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> subscription_at:\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"2022-08-08T00:00:00Z\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> ending_at:\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"2023-08-08T00:00:00Z\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":["/docs/_mintlify/custom/lago-docs/a0e77058367d9146/canonical.js","/docs/_mintlify/custom/lago-docs/fa2446312177e9c6/loader.js","/docs/_mintlify/custom/lago-docs/c55d8403f7fc83ad/changelog-anchor-redirect.js","/docs/_mintlify/custom/lago-docs/8c326c8b67b47933/changelog-month-nav.js","/docs/_mintlify/custom/lago-docs/103c90943d27f62a/webmcp.js","/docs/_mintlify/custom/lago-docs/1219fb859e5c496e/github-outbound.js"],"openApiReferenceData":{"operation":{"tags":["subscriptions"],"summary":"Update a subscription","description":"This endpoint allows you to update a subscription.","operationId":"updateSubscription","requestBody":"3f8a42b4-8a4d-4d5d-928c-76a4e2f737ed","parameters":["1b98a6b4-0ede-4726-9c72-7b75a36962ad"],"responses":{"200":"33817e64-ba85-4dbe-9457-41fe523fb0fe","400":"f2c0a828-321f-4517-af8e-9056e3b41371","401":"446f9c47-757e-4f42-b4ce-ad7cea857f89","403":"28a8a2dd-a176-4d74-974f-704d24276680","404":"7e75f6ce-1705-4ae1-b16c-7ceafefd42c1","405":"0f8a3733-5fe2-4198-ab60-52dde32da059","422":"e220222c-7ef8-43bc-b64f-1e7a5bf107a5"},"method":"put","type":"path","servers":["5a8c5435-53db-4536-8bd9-2abb9207dc60","4644862a-d12e-469e-afb7-141956940823"],"security":["aae89aa6-f2f4-456e-aa86-a75b959523a6"],"path":"/subscriptions/{external_id}","baseUrlOptions":["https://api.getlago.com/api/v1","https://api.eu.getlago.com/api/v1"],"title":"Update a subscription","codeSamples":[],"requiredOnlyExamples":false,"requestExamples":[{"dropdown":false,"language":"shellscript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"shellscript","children":{"type":"code","key":null,"ref":null,"props":{"language":"shellscript","numberOfLines":"126","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"LAGO_URL"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"https://api.getlago.com\""}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"API_KEY"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"__YOUR_API_KEY__\""}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#DCDCAA","--shiki-dark":"#DCDCAA"},"children":"curl"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" --location"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" --request"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" PUT"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \""}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"$LAGO_URL"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"/api/v1/subscriptions/:id\""}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#D7BA7D","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" --header"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"Authorization: Bearer "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"$API_KEY"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#D7BA7D","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" --header"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" 'Content-Type: application/json'"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D7BA7D","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" --data-raw"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" '{"}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"subscription\": {"}}}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"name\": \"Repository B\","}}}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"ending_at\": \"2022-10-08T00:00:00Z\","}}}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"subscription_at\": \"2022-08-08T00:00:00Z\","}}}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"plan_overrides\": {"}}}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"amount_cents\": 10000,"}}}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"amount_currency\": \"USD\","}}}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"description\": \"Plan for early stage startups.\","}}}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"invoice_display_name\": \"Startup plan\","}}}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"name\": \"Startup\","}}}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"tax_codes\": ["}}}},"\n",{"type":"span","key":"36","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"french_standard_vat\""}}}},"\n",{"type":"span","key":"38","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" ],"}}}},"\n",{"type":"span","key":"40","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"trial_period\": 5,"}}}},"\n",{"type":"span","key":"42","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"charges\": ["}}}},"\n",{"type":"span","key":"44","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"46","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"id\": \"cha_12345\","}}}},"\n",{"type":"span","key":"48","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"billable_metric_id\": \"bm_12345\","}}}},"\n",{"type":"span","key":"50","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"invoice_display_name\": \"Setup\","}}}},"\n",{"type":"span","key":"52","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"min_amount_cents\": 0,"}}}},"\n",{"type":"span","key":"54","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"tax_codes\": ["}}}},"\n",{"type":"span","key":"56","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"standard_vat\""}}}},"\n",{"type":"span","key":"58","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" ],"}}}},"\n",{"type":"span","key":"60","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"properties\": {"}}}},"\n",{"type":"span","key":"62","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"graduated_ranges\": ["}}}},"\n",{"type":"span","key":"64","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"66","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"from_value\": 0,"}}}},"\n",{"type":"span","key":"68","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"to_value\": 10,"}}}},"\n",{"type":"span","key":"70","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"flat_amount\": \"10\","}}}},"\n",{"type":"span","key":"72","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"per_unit_amount\": \"0.5\""}}}},"\n",{"type":"span","key":"74","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"76","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" ]"}}}},"\n",{"type":"span","key":"78","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"80","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" },"}}}},"\n",{"type":"span","key":"82","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"84","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"id\": \"cha_67890\","}}}},"\n",{"type":"span","key":"86","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"billable_metric_id\": \"bm_67890\","}}}},"\n",{"type":"span","key":"88","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"invoice_display_name\": \"FX Transfer\","}}}},"\n",{"type":"span","key":"90","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"min_amount_cents\": 0,"}}}},"\n",{"type":"span","key":"92","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"properties\": {"}}}},"\n",{"type":"span","key":"94","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"graduated_percentage_ranges\": ["}}}},"\n",{"type":"span","key":"96","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"98","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"from_value\": 0,"}}}},"\n",{"type":"span","key":"100","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"to_value\": 10,"}}}},"\n",{"type":"span","key":"102","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"rate\": \"1\","}}}},"\n",{"type":"span","key":"104","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"flat_amount\": \"10\""}}}},"\n",{"type":"span","key":"106","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"108","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" ]"}}}},"\n",{"type":"span","key":"110","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"112","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" },"}}}},"\n",{"type":"span","key":"114","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"116","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"id\": \"cha_111213\","}}}},"\n",{"type":"span","key":"118","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"billable_metric_id\": \"bm_111213\","}}}},"\n",{"type":"span","key":"120","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"invoice_display_name\": \"API calls\","}}}},"\n",{"type":"span","key":"122","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"min_amount_cents\": 0,"}}}},"\n",{"type":"span","key":"124","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"properties\": {"}}}},"\n",{"type":"span","key":"126","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"amount\": \"30\","}}}},"\n",{"type":"span","key":"128","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"free_units\": 100,"}}}},"\n",{"type":"span","key":"130","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"package_size\": 1000"}}}},"\n",{"type":"span","key":"132","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"134","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" },"}}}},"\n",{"type":"span","key":"136","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"138","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"id\": \"cha_141516\","}}}},"\n",{"type":"span","key":"140","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"billable_metric_id\": \"bm_141516\","}}}},"\n",{"type":"span","key":"142","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"invoice_display_name\": \"Interchange\","}}}},"\n",{"type":"span","key":"144","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"min_amount_cents\": 0,"}}}},"\n",{"type":"span","key":"146","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"properties\": {"}}}},"\n",{"type":"span","key":"148","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"rate\": \"1\","}}}},"\n",{"type":"span","key":"150","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"fixed_amount\": \"0.5\","}}}},"\n",{"type":"span","key":"152","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"free_units_per_events\": 5,"}}}},"\n",{"type":"span","key":"154","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"free_units_per_total_aggregation\": \"500\","}}}},"\n",{"type":"span","key":"156","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"per_transaction_max_amount\": \"3.75\","}}}},"\n",{"type":"span","key":"158","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"per_transaction_min_amount\": \"1.75\""}}}},"\n",{"type":"span","key":"160","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"162","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" },"}}}},"\n",{"type":"span","key":"164","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"166","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"id\": \"cha_171819\","}}}},"\n",{"type":"span","key":"168","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"billable_metric_id\": \"bm_171819\","}}}},"\n",{"type":"span","key":"170","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"invoice_display_name\": \"Seats\","}}}},"\n",{"type":"span","key":"172","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"min_amount_cents\": 0,"}}}},"\n",{"type":"span","key":"174","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"properties\": {"}}}},"\n",{"type":"span","key":"176","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"volume_ranges\": ["}}}},"\n",{"type":"span","key":"178","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"180","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"from_value\": 0,"}}}},"\n",{"type":"span","key":"182","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"to_value\": 10,"}}}},"\n",{"type":"span","key":"184","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"flat_amount\": \"10\","}}}},"\n",{"type":"span","key":"186","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"per_unit_amount\": \"0.5\""}}}},"\n",{"type":"span","key":"188","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"190","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" ]"}}}},"\n",{"type":"span","key":"192","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"194","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" },"}}}},"\n",{"type":"span","key":"196","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"198","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"id\": \"cha_202122\","}}}},"\n",{"type":"span","key":"200","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"billable_metric_id\": \"bm_202122\","}}}},"\n",{"type":"span","key":"202","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"invoice_display_name\": \"Interchange\","}}}},"\n",{"type":"span","key":"204","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"min_amount_cents\": 0,"}}}},"\n",{"type":"span","key":"206","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"filters\": ["}}}},"\n",{"type":"span","key":"208","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"210","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"values\": {"}}}},"\n",{"type":"span","key":"212","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"cloud\": [\"aws\"],"}}}},"\n",{"type":"span","key":"214","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"region\": [\"us-east-1\"]"}}}},"\n",{"type":"span","key":"216","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" },"}}}},"\n",{"type":"span","key":"218","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"properties\": {"}}}},"\n",{"type":"span","key":"220","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"graduated_ranges\": ["}}}},"\n",{"type":"span","key":"222","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" {"}}}},"\n",{"type":"span","key":"224","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"from_value\": 0,"}}}},"\n",{"type":"span","key":"226","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"to_value\": 10,"}}}},"\n",{"type":"span","key":"228","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"flat_amount\": \"10\","}}}},"\n",{"type":"span","key":"230","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"per_unit_amount\": \"0.5\""}}}},"\n",{"type":"span","key":"232","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"234","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" ]"}}}},"\n",{"type":"span","key":"236","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"238","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"240","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" ]"}}}},"\n",{"type":"span","key":"242","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"244","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" ]"}}}},"\n",{"type":"span","key":"246","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"248","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" }"}}}},"\n",{"type":"span","key":"250","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"}'"}}}},"\n"]}}}},"filename":"cURL"},{"dropdown":false,"language":"python","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"python","children":{"type":"code","key":null,"ref":null,"props":{"language":"python","numberOfLines":"12","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"from"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" lago_python_client.client "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" Client"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"from"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" lago_python_client.exceptions "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" LagoApiError"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"from"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" lago_python_client.models "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" Subscription"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"client = Client("}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"api_key"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"'__YOUR_API_KEY__'"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":")"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"update_params = Subscription("}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"name"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"'new name'"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"subscription_at"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"'2022-08-08T00:00:00Z'"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"ending_at"}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"= "}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"'2023-08-08T00:00:00Z'"}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":")"}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"try"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":":"}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" client.subscriptions.update(update_params, "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"'id'"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":")"}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"except"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" LagoApiError "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"as"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" e:"}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" repair_broken_state(e) "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#6A9955","--shiki-dark":"#6A9955"},"children":"# do something on error or raise your own exception"}}]}},"\n"]}}}},"filename":"Python"},{"dropdown":false,"language":"ruby","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"ruby","children":{"type":"code","key":null,"ref":null,"props":{"language":"ruby","numberOfLines":"6","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"require"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" 'lago-ruby-client'"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"client"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" = "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#4EC9B0","--shiki-dark":"#4EC9B0"},"children":"Lago::Api::Client"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"new"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"api_key:"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" '__YOUR_API_KEY__'"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":")"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"update_params"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" = { "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"name:"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" 'new name'"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"subscription_at:"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" '2022-08-08T00:00:00Z'"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"ending_at:"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" '2022-08-08T00:00:00Z'"}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" }"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"client."}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#DCDCAA","--shiki-dark":"#DCDCAA"},"children":"subscriptions"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#DCDCAA","--shiki-dark":"#DCDCAA"},"children":"update"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"(update_params, "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"'id'"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":")"}}]}},"\n"]}}}},"filename":"Ruby"},{"dropdown":false,"language":"javascript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"javascript","children":{"type":"code","key":null,"ref":null,"props":{"language":"javascript","numberOfLines":"7","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"await"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" client"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"subscriptions"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#DCDCAA","--shiki-dark":"#DCDCAA"},"children":"updateSubscription"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"external_id\""}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":", {"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" subscription:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" {"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" name:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"new name\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" subscription_at:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"2022-08-08T00:00:00Z\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" ending_at:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"2023-08-08T00:00:00Z\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" },"}}}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"});"}}}},"\n"]}}}},"filename":"Javascript"}],"requestExampleType":"mdx","responseExampleType":"generated"},"dependencies":{"parameters":{"1b98a6b4-0ede-4726-9c72-7b75a36962ad":{"name":"status","in":"query","description":"By default, this endpoint only updates `active` subscriptions. If you want to update a subscription with a different `status`, you can specify it here.\n","required":false,"schema":{"type":"string","enum":["active","pending"],"example":"active","default":"active","isRequired":false,"description":"By default, this endpoint only updates `active` subscriptions. If you want to update a subscription with a different `status`, you can specify it here.\n","uniqueKey":"","typeLabel":"enum\u003cstring>"}},"c546710e-e551-486e-8d86-de903cf85b87":{"name":"external_id","in":"path","description":"External ID of the existing subscription","required":true,"schema":{"type":"string","example":"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba","isRequired":true,"description":"External ID of the existing subscription","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"description":"Update an existing subscription","content":{"application/json":{"schema":{"type":"object","required":["subscription"],"properties":{"subscription":{"type":"object","properties":{"name":{"oneOf":[{"type":"string","example":"Repository B","description":"The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.","uniqueKey":"subscription.name.oneOf.0","typeLabel":"string"},{"type":"null","example":"Repository B","description":"The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.","uniqueKey":"subscription.name.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.name","typeLabel":"string | null"},"ending_at":{"oneOf":[{"type":"string","format":"date-time","example":"2022-10-08T00:00:00Z","description":"The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).","uniqueKey":"subscription.ending_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","example":"2022-10-08T00:00:00Z","description":"The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).","uniqueKey":"subscription.ending_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.ending_at","typeLabel":"string\u003cdate-time> | null"},"subscription_at":{"type":"string","format":"date-time","example":"2022-08-08T00:00:00Z","description":"The start date and time of the subscription. This field can only be modified for pending subscriptions that have not yet started. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).","uniqueKey":"subscription.subscription_at","typeLabel":"string\u003cdate-time>"},"plan_overrides":{"type":"object","description":"Overrides applied to the plan for this subscription. A units-only `fixed_charges` override is recorded as a per-subscription unit override without creating a plan override; any other override creates a plan override for the subscription. See `fixed_charges` for the exact rule.","properties":{"amount_cents":{"type":"integer","description":"The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.","example":10000,"uniqueKey":"subscription.plan_overrides.amount_cents","typeLabel":"integer"},"amount_currency":{"type":"string","example":"USD","enum":["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BIF","BMD","BND","BOB","BRL","BSD","BWP","BYN","BZD","CAD","CDF","CHF","CLF","CLP","CNY","COP","CRC","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","ISK","JMD","JPY","KES","KGS","KHR","KMF","KRW","KYD","KZT","LAK","LBP","LKR","LRD","LSL","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SEK","SGD","SHP","SLL","SOS","SRD","STD","SYP","SZL","THB","TJS","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VND","VUV","WST","XAF","XCD","XOF","XPF","YER","ZAR","ZMW"],"description":"The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.","uniqueKey":"subscription.plan_overrides.amount_currency","typeLabel":"enum\u003cstring>"},"description":{"type":"string","description":"The description on the plan.","example":"Plan for early stage startups.","uniqueKey":"subscription.plan_overrides.description","typeLabel":"string"},"invoice_display_name":{"type":"string","example":"Startup plan","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.","uniqueKey":"subscription.plan_overrides.invoice_display_name","typeLabel":"string"},"name":{"type":"string","description":"The name of the plan.","example":"Startup","uniqueKey":"subscription.plan_overrides.name","typeLabel":"string"},"tax_codes":{"type":"array","items":{"type":"string","uniqueKey":"subscription.plan_overrides.tax_codes.items.[INDEX]","typeLabel":"string"},"description":"List of unique code used to identify the taxes.","example":["french_standard_vat"],"uniqueKey":"subscription.plan_overrides.tax_codes","typeLabel":"string[]"},"trial_period":{"type":"number","description":"The duration in days during which the base cost of the plan is offered for free.","example":5,"uniqueKey":"subscription.plan_overrides.trial_period","typeLabel":"number"},"minimum_commitment":{"oneOf":[{"type":"object","description":"Minimum commitment for this plan.","required":["amount_cents"],"properties":{"amount_cents":{"type":"integer","description":"The amount of the minimum commitment in cents.","example":100000,"isRequired":true,"uniqueKey":"subscription.plan_overrides.minimum_commitment.oneOf.0.amount_cents","typeLabel":"integer"},"invoice_display_name":{"type":"string","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.","example":"Minimum Commitment (C1)","uniqueKey":"subscription.plan_overrides.minimum_commitment.oneOf.0.invoice_display_name","typeLabel":"string"},"tax_codes":{"type":"array","items":{"type":"string","uniqueKey":"subscription.plan_overrides.minimum_commitment.oneOf.0.tax_codes.items.[INDEX]","typeLabel":"string"},"description":"List of unique code used to identify the taxes.","example":["french_standard_vat"],"uniqueKey":"subscription.plan_overrides.minimum_commitment.oneOf.0.tax_codes","typeLabel":"string[]"}},"uniqueKey":"subscription.plan_overrides.minimum_commitment.oneOf.0","typeLabel":"object"},{"type":"null","description":"Minimum commitment for this plan.","required":["amount_cents"],"properties":{"amount_cents":{"type":"integer","description":"The amount of the minimum commitment in cents.","example":100000},"invoice_display_name":{"type":"string","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.","example":"Minimum Commitment (C1)"},"tax_codes":{"type":"array","items":{"type":"string"},"description":"List of unique code used to identify the taxes.","example":["french_standard_vat"]}},"uniqueKey":"subscription.plan_overrides.minimum_commitment.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan_overrides.minimum_commitment","typeLabel":"object | null"},"charges":{"type":"array","description":"Additional usage-based charges for this plan.","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the charge created by Lago.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"billable_metric_id":{"type":"string","format":"uuid","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","description":"Unique identifier of the billable metric created by Lago.","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].billable_metric_id","typeLabel":"string\u003cuuid>"},"code":{"type":"string","description":"Unique code identifying the charge within the plan.","example":"api_requests_charge","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].code","typeLabel":"string"},"charge_model":{"type":"string","description":"Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:\n - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)\n - [`graduated_percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated-percentage)\n - [`graduated`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated)\n - [`package`](https://docs.getlago.com/guide/plans/charges/charge-models/package)\n - [`percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/percentage)\n - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard)\n - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume)\n","enum":["dynamic","graduated","graduated_percentage","package","percentage","standard","volume"],"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].charge_model","typeLabel":"enum\u003cstring>"},"invoice_display_name":{"type":"string","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.","example":"Setup","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].invoice_display_name","typeLabel":"string"},"min_amount_cents":{"type":"integer","description":"The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.","example":0,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].min_amount_cents","typeLabel":"integer"},"properties":{"type":"object","description":"List of all thresholds utilized for calculating the charge.","properties":{"grouped_by":{"type":"array","description":"**Deprecated.** Replaced by `pricing_group_keys`.\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.","items":{"type":"string","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.grouped_by.items.[INDEX]","typeLabel":"string"},"example":["agent_name"],"deprecated":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.grouped_by","typeLabel":"string[]"},"pricing_group_keys":{"type":"array","description":"The list of event properties that are used to group the events on the invoice.","items":{"type":"string","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.pricing_group_keys.items.[INDEX]","typeLabel":"string"},"example":["agent_name"],"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.pricing_group_keys","typeLabel":"string[]"},"graduated_ranges":{"type":"array","description":"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.","items":{"type":"object","required":["from_value","to_value","flat_amount","per_unit_amount"],"properties":{"from_value":{"type":"integer","description":"Specifies the lower value of a tier for a `graduated` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.","example":0,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].from_value","typeLabel":"integer"},"to_value":{"oneOf":[{"type":"integer","description":"Specifies the highest value of a tier for a `graduated` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Specifies the highest value of a tier for a `graduated` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value","typeLabel":"integer | null"},"flat_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The flat amount for a whole tier, excluding tax, for a `graduated` charge model. It is expressed as a decimal value.","example":"10","isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].flat_amount","typeLabel":"string"},"per_unit_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The unit price, excluding tax, for a specific tier of a `graduated` charge model. It is expressed as a decimal value.","example":"0.5","isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].per_unit_amount","typeLabel":"string"}},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.graduated_ranges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.graduated_ranges","typeLabel":"object[]"},"graduated_percentage_ranges":{"type":"array","description":"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.","items":{"type":"object","required":["from_value","to_value","rate","flat_amount"],"properties":{"from_value":{"type":"integer","description":"Specifies the lower value of a tier for a `graduated_percentage` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.","example":0,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].from_value","typeLabel":"integer"},"to_value":{"oneOf":[{"type":"integer","description":"Specifies the highest value of a tier for a `graduated_percentage` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].to_value.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Specifies the highest value of a tier for a `graduated_percentage` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].to_value.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].to_value","typeLabel":"integer | null"},"rate":{"type":"string","format":"^[0-9]+.?[0-9]*$","description":"The percentage rate that is applied to the amount of each transaction in the tier for a `graduated_percentage` charge model. It is expressed as a decimal value.","example":"1","isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].rate","typeLabel":"string\u003c^[0-9]+.?[0-9]*$>"},"flat_amount":{"type":"string","format":"^[0-9]+.?[0-9]*$","description":"The flat amount for a whole tier, excluding tax, for a `graduated_percentage` charge model. It is expressed as a decimal value.","example":"10","isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].flat_amount","typeLabel":"string\u003c^[0-9]+.?[0-9]*$>"}},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.graduated_percentage_ranges","typeLabel":"object[]"},"amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.","example":"30","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.amount","typeLabel":"string"},"free_units":{"type":"integer","description":"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.","example":100,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.free_units","typeLabel":"integer"},"package_size":{"type":"integer","description":"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.","example":1000,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.package_size","typeLabel":"integer"},"rate":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.","example":"1","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.rate","typeLabel":"string"},"fixed_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.","example":"0.5","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.fixed_amount","typeLabel":"string"},"free_units_per_events":{"oneOf":[{"type":"integer","description":"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.","example":5,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.free_units_per_events.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.","example":5,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.free_units_per_events.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.free_units_per_events","typeLabel":"integer | null"},"free_units_per_total_aggregation":{"oneOf":[{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.","example":"500","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.free_units_per_total_aggregation.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^[0-9]+.?[0-9]*$","description":"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.","example":"500","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.free_units_per_total_aggregation.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.free_units_per_total_aggregation","typeLabel":"string | null"},"per_transaction_max_amount":{"oneOf":[{"type":"string","format":"^[0-9]+.?[0-9]*$","description":"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.","example":"3.75","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.per_transaction_max_amount.oneOf.0","typeLabel":"string\u003c^[0-9]+.?[0-9]*$>"},{"type":"null","format":"^[0-9]+.?[0-9]*$","description":"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.","example":"3.75","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.per_transaction_max_amount.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.per_transaction_max_amount","typeLabel":"string\u003c^[0-9]+.?[0-9]*$> | null"},"per_transaction_min_amount":{"oneOf":[{"type":"string","format":"^[0-9]+.?[0-9]*$","description":"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.","example":"1.75","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.per_transaction_min_amount.oneOf.0","typeLabel":"string\u003c^[0-9]+.?[0-9]*$>"},{"type":"null","format":"^[0-9]+.?[0-9]*$","description":"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.","example":"1.75","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.per_transaction_min_amount.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.per_transaction_min_amount","typeLabel":"string\u003c^[0-9]+.?[0-9]*$> | null"},"volume_ranges":{"type":"array","description":"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.","items":{"type":"object","required":["from_value","to_value","flat_amount","per_unit_amount"],"properties":{"from_value":{"type":"integer","description":"Specifies the lower value of a tier for a `volume` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.","example":0,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.volume_ranges.items.[INDEX].from_value","typeLabel":"integer"},"to_value":{"oneOf":[{"type":"integer","description":"Specifies the highest value of a tier for a `volume` charge model.\n- This value must be higher than the `from_value` of the same tier.\n- This value must be `null` for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Specifies the highest value of a tier for a `volume` charge model.\n- This value must be higher than the `from_value` of the same tier.\n- This value must be `null` for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value","typeLabel":"integer | null"},"flat_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The flat amount for a whole tier, excluding tax, for a `volume` charge model. It is expressed as a decimal value.","example":"10","isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.volume_ranges.items.[INDEX].flat_amount","typeLabel":"string"},"per_unit_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The unit price, excluding tax, for a specific tier of a `volume` charge model. It is expressed as a decimal value.","example":"0.5","isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.volume_ranges.items.[INDEX].per_unit_amount","typeLabel":"string"}},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.volume_ranges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.volume_ranges","typeLabel":"object[]"},"presentation_group_keys":{"type":"array","description":"Groups usage into sub-items on invoices for display only, without affecting pricing or aggregation.","items":{"type":"object","properties":{"value":{"type":"string","description":"The event property to group by.","example":"region","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.presentation_group_keys.items.[INDEX].value","typeLabel":"string"},"options":{"type":"object","properties":{"display_in_invoice":{"type":"boolean","example":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.presentation_group_keys.items.[INDEX].options.display_in_invoice","typeLabel":"boolean"}},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.presentation_group_keys.items.[INDEX].options","typeLabel":"object"}},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.presentation_group_keys.items.[INDEX]","typeLabel":"object"},"example":[{"value":"region","options":{"display_in_invoice":true}}],"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties.presentation_group_keys","typeLabel":"object[]"}},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].properties","typeLabel":"object"},"filters":{"type":"array","description":"List of filters used to apply differentiated pricing based on additional event properties.","items":{"type":"object","description":"Values used to apply differentiated pricing based on additional event properties.","required":["properties","values"],"properties":{"properties":{"type":"object","properties":{"grouped_by":{"type":"array","description":"**Deprecated.** Replaced by `pricing_group_keys`.\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.","items":{"type":"string","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.grouped_by.items.[INDEX]","typeLabel":"string"},"example":["agent_name"],"deprecated":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.grouped_by","typeLabel":"string[]"},"pricing_group_keys":{"type":"array","description":"The list of event properties that are used to group the events on the invoice.","items":{"type":"string","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.pricing_group_keys.items.[INDEX]","typeLabel":"string"},"example":["agent_name"],"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.pricing_group_keys","typeLabel":"string[]"},"graduated_ranges":{"type":"array","description":"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.","items":{"type":"object","required":["from_value","to_value","flat_amount","per_unit_amount"],"properties":{"from_value":{"type":"integer","description":"Specifies the lower value of a tier for a `graduated` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.","example":0,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_ranges.items.[INDEX].from_value","typeLabel":"integer"},"to_value":{"oneOf":[{"type":"integer","description":"Specifies the highest value of a tier for a `graduated` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Specifies the highest value of a tier for a `graduated` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value","typeLabel":"integer | null"},"flat_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The flat amount for a whole tier, excluding tax, for a `graduated` charge model. It is expressed as a decimal value.","example":"10","isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_ranges.items.[INDEX].flat_amount","typeLabel":"string"},"per_unit_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The unit price, excluding tax, for a specific tier of a `graduated` charge model. It is expressed as a decimal value.","example":"0.5","isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_ranges.items.[INDEX].per_unit_amount","typeLabel":"string"}},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_ranges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_ranges","typeLabel":"object[]"},"graduated_percentage_ranges":{"type":"array","description":"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.","items":{"type":"object","required":["from_value","to_value","rate","flat_amount"],"properties":{"from_value":{"type":"integer","description":"Specifies the lower value of a tier for a `graduated_percentage` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.","example":0,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].from_value","typeLabel":"integer"},"to_value":{"oneOf":[{"type":"integer","description":"Specifies the highest value of a tier for a `graduated_percentage` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].to_value.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Specifies the highest value of a tier for a `graduated_percentage` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].to_value.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].to_value","typeLabel":"integer | null"},"rate":{"type":"string","format":"^[0-9]+.?[0-9]*$","description":"The percentage rate that is applied to the amount of each transaction in the tier for a `graduated_percentage` charge model. It is expressed as a decimal value.","example":"1","isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].rate","typeLabel":"string\u003c^[0-9]+.?[0-9]*$>"},"flat_amount":{"type":"string","format":"^[0-9]+.?[0-9]*$","description":"The flat amount for a whole tier, excluding tax, for a `graduated_percentage` charge model. It is expressed as a decimal value.","example":"10","isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].flat_amount","typeLabel":"string\u003c^[0-9]+.?[0-9]*$>"}},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_percentage_ranges","typeLabel":"object[]"},"amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.","example":"30","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.amount","typeLabel":"string"},"free_units":{"type":"integer","description":"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.","example":100,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.free_units","typeLabel":"integer"},"package_size":{"type":"integer","description":"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.","example":1000,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.package_size","typeLabel":"integer"},"rate":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.","example":"1","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.rate","typeLabel":"string"},"fixed_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.","example":"0.5","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.fixed_amount","typeLabel":"string"},"free_units_per_events":{"oneOf":[{"type":"integer","description":"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.","example":5,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.free_units_per_events.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.","example":5,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.free_units_per_events.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.free_units_per_events","typeLabel":"integer | null"},"free_units_per_total_aggregation":{"oneOf":[{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.","example":"500","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.free_units_per_total_aggregation.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^[0-9]+.?[0-9]*$","description":"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.","example":"500","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.free_units_per_total_aggregation.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.free_units_per_total_aggregation","typeLabel":"string | null"},"per_transaction_max_amount":{"oneOf":[{"type":"string","format":"^[0-9]+.?[0-9]*$","description":"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.","example":"3.75","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.per_transaction_max_amount.oneOf.0","typeLabel":"string\u003c^[0-9]+.?[0-9]*$>"},{"type":"null","format":"^[0-9]+.?[0-9]*$","description":"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.","example":"3.75","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.per_transaction_max_amount.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.per_transaction_max_amount","typeLabel":"string\u003c^[0-9]+.?[0-9]*$> | null"},"per_transaction_min_amount":{"oneOf":[{"type":"string","format":"^[0-9]+.?[0-9]*$","description":"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.","example":"1.75","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.per_transaction_min_amount.oneOf.0","typeLabel":"string\u003c^[0-9]+.?[0-9]*$>"},{"type":"null","format":"^[0-9]+.?[0-9]*$","description":"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.","example":"1.75","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.per_transaction_min_amount.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.per_transaction_min_amount","typeLabel":"string\u003c^[0-9]+.?[0-9]*$> | null"},"volume_ranges":{"type":"array","description":"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.","items":{"type":"object","required":["from_value","to_value","flat_amount","per_unit_amount"],"properties":{"from_value":{"type":"integer","description":"Specifies the lower value of a tier for a `volume` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.","example":0,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.volume_ranges.items.[INDEX].from_value","typeLabel":"integer"},"to_value":{"oneOf":[{"type":"integer","description":"Specifies the highest value of a tier for a `volume` charge model.\n- This value must be higher than the `from_value` of the same tier.\n- This value must be `null` for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Specifies the highest value of a tier for a `volume` charge model.\n- This value must be higher than the `from_value` of the same tier.\n- This value must be `null` for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value","typeLabel":"integer | null"},"flat_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The flat amount for a whole tier, excluding tax, for a `volume` charge model. It is expressed as a decimal value.","example":"10","isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.volume_ranges.items.[INDEX].flat_amount","typeLabel":"string"},"per_unit_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The unit price, excluding tax, for a specific tier of a `volume` charge model. It is expressed as a decimal value.","example":"0.5","isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.volume_ranges.items.[INDEX].per_unit_amount","typeLabel":"string"}},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.volume_ranges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties.volume_ranges","typeLabel":"object[]"}},"description":"List of all thresholds utilized for calculating the charge.","isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].properties","typeLabel":"object"},"values":{"type":"object","description":"List of possible filter values. The key and values must match one of the billable metric filters.","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].values.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].values.additionalProperties","typeLabel":"string[]"},"example":{"region":["us-east-1"]},"isRequired":true,"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].values","typeLabel":"object"},"invoice_display_name":{"oneOf":[{"type":"string","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.","example":"AWS","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].invoice_display_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.","example":"AWS","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].invoice_display_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX].invoice_display_name","typeLabel":"string | null"}},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].filters","typeLabel":"object[]"},"tax_codes":{"type":"array","items":{"type":"string","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].tax_codes.items.[INDEX]","typeLabel":"string"},"description":"List of unique code used to identify the taxes.","example":["french_standard_vat"],"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].tax_codes","typeLabel":"string[]"},"applied_pricing_unit":{"type":"object","description":"Updates the pricing unit conversion rate for this charge. Only applies if the charge has applied pricing unit.","properties":{"code":{"type":"string","description":"The code of the pricing unit.","example":"credits","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].applied_pricing_unit.code","typeLabel":"string"},"conversion_rate":{"type":"string","description":"The conversion rate from pricing units to the plan's currency.\nThis rate determines how many currency units (in the plan's base currency) equal one pricing unit.\nFor example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50 USD.","example":"0.5","uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].applied_pricing_unit.conversion_rate","typeLabel":"string"}},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX].applied_pricing_unit","typeLabel":"object"}},"uniqueKey":"subscription.plan_overrides.charges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan_overrides.charges","typeLabel":"object[]"},"fixed_charges":{"type":"array","description":"Fixed charge overrides for the subscription. When `plan_overrides` contains only `fixed_charges` and every entry contains only `id`, `units`, and optionally `apply_units_immediately`, the units are recorded as a per-subscription override without creating a plan override, and subscription-scoped reads return these units. If any entry carries other fields, or `plan_overrides` contains any other key, the request is applied as a full plan override for the subscription instead.","items":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the fixed charge created by Lago.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","isRequired":true,"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"invoice_display_name":{"type":"string","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.","example":"Setup fee","uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].invoice_display_name","typeLabel":"string"},"units":{"type":"number","description":"The number of units for the fixed charge. Defaults to 0 if not provided.","example":1,"default":0,"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].units","typeLabel":"number"},"apply_units_immediately":{"type":"boolean","description":"Determines if the units should be applied immediately upon assignment or deferred to the next billing cycle.","example":true,"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].apply_units_immediately","typeLabel":"boolean"},"properties":{"type":"object","properties":{"amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.","example":"30","uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.amount","typeLabel":"string"},"graduated_ranges":{"type":"array","description":"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.","items":{"type":"object","required":["from_value","to_value","flat_amount","per_unit_amount"],"properties":{"from_value":{"type":"integer","description":"Specifies the lower value of a tier for a `graduated` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.","example":0,"isRequired":true,"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].from_value","typeLabel":"integer"},"to_value":{"oneOf":[{"type":"integer","description":"Specifies the highest value of a tier for a `graduated` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Specifies the highest value of a tier for a `graduated` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value","typeLabel":"integer | null"},"flat_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The flat amount for a whole tier, excluding tax, for a `graduated` charge model. It is expressed as a decimal value.","example":"10","isRequired":true,"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].flat_amount","typeLabel":"string"},"per_unit_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The unit price, excluding tax, for a specific tier of a `graduated` charge model. It is expressed as a decimal value.","example":"0.5","isRequired":true,"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].per_unit_amount","typeLabel":"string"}},"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.graduated_ranges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.graduated_ranges","typeLabel":"object[]"},"volume_ranges":{"type":"array","description":"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.","items":{"type":"object","required":["from_value","to_value","flat_amount","per_unit_amount"],"properties":{"from_value":{"type":"integer","description":"Specifies the lower value of a tier for a `volume` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.","example":0,"isRequired":true,"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.volume_ranges.items.[INDEX].from_value","typeLabel":"integer"},"to_value":{"oneOf":[{"type":"integer","description":"Specifies the highest value of a tier for a `volume` charge model.\n- This value must be higher than the `from_value` of the same tier.\n- This value must be `null` for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Specifies the highest value of a tier for a `volume` charge model.\n- This value must be higher than the `from_value` of the same tier.\n- This value must be `null` for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value","typeLabel":"integer | null"},"flat_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The flat amount for a whole tier, excluding tax, for a `volume` charge model. It is expressed as a decimal value.","example":"10","isRequired":true,"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.volume_ranges.items.[INDEX].flat_amount","typeLabel":"string"},"per_unit_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The unit price, excluding tax, for a specific tier of a `volume` charge model. It is expressed as a decimal value.","example":"0.5","isRequired":true,"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.volume_ranges.items.[INDEX].per_unit_amount","typeLabel":"string"}},"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.volume_ranges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties.volume_ranges","typeLabel":"object[]"}},"description":"List of all thresholds utilized for calculating the fixed charge.","uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].properties","typeLabel":"object"},"tax_codes":{"type":"array","items":{"type":"string","uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].tax_codes.items.[INDEX]","typeLabel":"string"},"description":"List of taxes applied to the fixed charge.","example":["french_standard_vat"],"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX].tax_codes","typeLabel":"string[]"}},"uniqueKey":"subscription.plan_overrides.fixed_charges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan_overrides.fixed_charges","typeLabel":"object[]"},"usage_thresholds":{"type":"array","deprecated":true,"description":"**Deprecated.** Managing usage thresholds through `plan_overrides` is deprecated and its behavior is inconsistent: an empty array does not reliably clear thresholds (it is ignored the first time a subscription is overridden), and it never affects thresholds inherited from a parent plan. Use the top-level `usage_thresholds` array on the subscription instead, or `progressive_billing_disabled` to switch progressive billing off.\n","items":{"type":"object","required":["amount_cents"],"properties":{"amount_cents":{"type":"integer","description":"The amount to reach to trigger a `progressive_billing` invoice.","example":10000,"isRequired":true,"uniqueKey":"subscription.plan_overrides.usage_thresholds.items.[INDEX].amount_cents","typeLabel":"integer"},"threshold_display_name":{"oneOf":[{"type":"string","description":"The display name of the usage threshold.","example":"Threshold 1","uniqueKey":"subscription.plan_overrides.usage_thresholds.items.[INDEX].threshold_display_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The display name of the usage threshold.","example":"Threshold 1","uniqueKey":"subscription.plan_overrides.usage_thresholds.items.[INDEX].threshold_display_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan_overrides.usage_thresholds.items.[INDEX].threshold_display_name","typeLabel":"string | null"},"recurring":{"type":"boolean","description":"This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount.","example":true,"default":false,"uniqueKey":"subscription.plan_overrides.usage_thresholds.items.[INDEX].recurring","typeLabel":"boolean"}},"uniqueKey":"subscription.plan_overrides.usage_thresholds.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan_overrides.usage_thresholds","typeLabel":"object[]"},"metadata":{"type":"object","description":"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"subscription.plan_overrides.metadata.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"subscription.plan_overrides.metadata.additionalProperties.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan_overrides.metadata.additionalProperties","typeLabel":"string | null"},"example":{"external_id":"ext-123","synced_at":"2024-01-15"},"uniqueKey":"subscription.plan_overrides.metadata","typeLabel":"object"}},"uniqueKey":"subscription.plan_overrides","typeLabel":"object"},"invoice_custom_section":{"type":"object","description":"Configuration for invoice custom sections to apply to invoices generated by this resource.","properties":{"skip_invoice_custom_sections":{"type":"boolean","example":false,"description":"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.","uniqueKey":"subscription.invoice_custom_section.skip_invoice_custom_sections","typeLabel":"boolean"},"invoice_custom_section_codes":{"type":"array","items":{"type":"string","uniqueKey":"subscription.invoice_custom_section.invoice_custom_section_codes.items.[INDEX]","typeLabel":"string"},"description":"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.","example":["eu_bank_details"],"uniqueKey":"subscription.invoice_custom_section.invoice_custom_section_codes","typeLabel":"string[]"}},"uniqueKey":"subscription.invoice_custom_section","typeLabel":"object"},"payment_method":{"type":"object","description":"Optional payment method to use for processing subscription payments.","properties":{"payment_method_type":{"type":"string","enum":["provider","manual"],"description":"The type of payment method to use.","example":"provider","uniqueKey":"subscription.payment_method.payment_method_type","typeLabel":"enum\u003cstring>"},"payment_method_id":{"type":"string","format":"uuid","description":"The unique identifier of the payment method (required when using a specific provider payment method).","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","uniqueKey":"subscription.payment_method.payment_method_id","typeLabel":"string\u003cuuid>"}},"uniqueKey":"subscription.payment_method","typeLabel":"object"},"consolidate_invoice":{"type":"boolean","example":false,"description":"Defines whether this subscription should be grouped with other subscriptions of the same customer when generating recurring invoices.\n\n- `true`: the subscription is included in the customer's standard invoice grouping (by billing entity, currency and payment method).\n- `false`: the subscription is excluded from consolidation and always billed on its own dedicated invoice.\n","uniqueKey":"subscription.consolidate_invoice","typeLabel":"boolean"},"billing_entity_code":{"type":"string","example":"default","description":"The code of the billing entity associated with the subscription. Updates take effect on future invoices only.","uniqueKey":"subscription.billing_entity_code","typeLabel":"string"},"on_termination_credit_note":{"type":"string","enum":["credit","refund","offset","skip"],"example":"credit","description":"Sets the default credit note behaviour applied when this subscription is later terminated before the end of its billing period:\n\n- `credit`: a credit note is generated for the unused subscription time. The unused amount is credited back to the customer.\n- `refund`: a credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer.\n- `offset`: a credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is applied to the invoice reducing its amount due.\n- `skip`: no credit note is generated for the unused subscription time.\n\n_Note: This field is only applied to pay-in-advance plans and is ignored for pay-in-arrears plans._\n","uniqueKey":"subscription.on_termination_credit_note","typeLabel":"enum\u003cstring>"},"on_termination_invoice":{"type":"string","enum":["generate","skip"],"example":"generate","description":"Sets the default invoice behaviour applied when this subscription is later terminated before the end of its billing period:\n\n- `generate`: an invoice is generated for the unbilled usage.\n- `skip`: no invoice is generated for the unbilled usage.\n","uniqueKey":"subscription.on_termination_invoice","typeLabel":"enum\u003cstring>"},"purchase_order_number":{"oneOf":[{"type":"string","example":"PO-123","description":"The purchase order number associated with the subscription. It will be added to invoices generated for this subscription.","uniqueKey":"subscription.purchase_order_number.oneOf.0","typeLabel":"string"},{"type":"null","example":"PO-123","description":"The purchase order number associated with the subscription. It will be added to invoices generated for this subscription.","uniqueKey":"subscription.purchase_order_number.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.purchase_order_number","typeLabel":"string | null"},"progressive_billing_disabled":{"type":"boolean","default":false,"example":true,"description":"Disables progressive billing for this subscription, regardless of any usage thresholds defined on the plan (including thresholds inherited from a parent plan when the subscription runs on a plan override).\n\nSet to `true` to switch progressive billing off for this subscription specifically. This is the recommended way to stop progressive billing on a subscription that inherits thresholds from its plan, since clearing `usage_thresholds` only removes subscription-level thresholds and does not remove those defined on (or inherited from) the plan.\n","uniqueKey":"subscription.progressive_billing_disabled","typeLabel":"boolean"},"usage_thresholds":{"type":"array","description":"Usage thresholds managed directly on the subscription. This is the recommended way to set progressive billing thresholds per subscription; when present, they take precedence over the thresholds defined on the plan.\n\nSending an empty array removes all subscription-level thresholds. This field cannot be combined with `plan_overrides.usage_thresholds` in the same request. To fully disable progressive billing on a subscription that inherits thresholds from its plan, use `progressive_billing_disabled` instead.\n","items":{"type":"object","required":["amount_cents"],"properties":{"amount_cents":{"type":"integer","description":"The amount to reach to trigger a `progressive_billing` invoice.","example":10000,"isRequired":true,"uniqueKey":"subscription.usage_thresholds.items.[INDEX].amount_cents","typeLabel":"integer"},"threshold_display_name":{"oneOf":[{"type":"string","description":"The display name of the usage threshold.","example":"Threshold 1","uniqueKey":"subscription.usage_thresholds.items.[INDEX].threshold_display_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The display name of the usage threshold.","example":"Threshold 1","uniqueKey":"subscription.usage_thresholds.items.[INDEX].threshold_display_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.usage_thresholds.items.[INDEX].threshold_display_name","typeLabel":"string | null"},"recurring":{"type":"boolean","description":"This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount.","example":true,"default":false,"uniqueKey":"subscription.usage_thresholds.items.[INDEX].recurring","typeLabel":"boolean"}},"uniqueKey":"subscription.usage_thresholds.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.usage_thresholds","typeLabel":"object[]"},"activation_rules":{"type":"array","items":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of the activation rule. Only `payment` is currently supported. A `payment` rule gates the subscription activation on a successful payment of the first invoice.","example":"payment","enum":["payment"],"isRequired":true,"uniqueKey":"subscription.activation_rules.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"timeout_hours":{"type":"integer","description":"The number of hours the subscription stays in the `incomplete` state waiting for the payment to succeed before it is automatically canceled. Must be a positive integer or zero.","example":48,"uniqueKey":"subscription.activation_rules.items.[INDEX].timeout_hours","typeLabel":"integer"}},"uniqueKey":"subscription.activation_rules.items.[INDEX]","typeLabel":"object"},"description":"Optional list of activation rules that gate the subscription activation. Activation rules can only be set or modified while the subscription is `pending` (future-dated and not yet activated); the request is rejected for `incomplete`, `active`, or `terminated` subscriptions.\n","uniqueKey":"subscription.activation_rules","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"subscription","typeLabel":"object"},"status":{"type":"string","enum":["active","pending"],"example":"active","description":"If the field is not defined and multiple `active` and `pending` subscriptions exists, Lago will update the `active` subscription. However, if you wish to update a `pending` subscription, please ensure that you include the `status` attribute with the `pending` value in your request body.","uniqueKey":"status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"subscription":{"name":"Repository B","ending_at":"2022-10-08T00:00:00Z","subscription_at":"2022-08-08T00:00:00Z","plan_overrides":{"amount_cents":10000,"amount_currency":"USD","description":"Plan for early stage startups.","invoice_display_name":"Startup plan","name":"Startup","tax_codes":["french_standard_vat"],"trial_period":5,"minimum_commitment":{"amount_cents":100000,"invoice_display_name":"Minimum Commitment (C1)","tax_codes":["french_standard_vat"]},"charges":[{"id":"1a901a90-1a90-1a90-1a90-1a901a901a90","billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","code":"api_requests_charge","invoice_display_name":"Setup","min_amount_cents":0,"properties":{"grouped_by":["agent_name"],"pricing_group_keys":["agent_name"],"graduated_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"}],"graduated_percentage_ranges":[{"from_value":0,"to_value":10,"rate":"1","flat_amount":"10"}],"amount":"30","free_units":100,"package_size":1000,"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500","per_transaction_max_amount":"3.75","per_transaction_min_amount":"1.75","volume_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"}],"presentation_group_keys":[{"value":"region","options":{"display_in_invoice":true}}]},"filters":[{"properties":{"grouped_by":["agent_name"],"pricing_group_keys":["agent_name"],"graduated_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"}],"graduated_percentage_ranges":[{"from_value":0,"to_value":10,"rate":"1","flat_amount":"10"}],"amount":"30","free_units":100,"package_size":1000,"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500","per_transaction_max_amount":"3.75","per_transaction_min_amount":"1.75","volume_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"}]},"values":{"region":["us-east-1"]},"invoice_display_name":"AWS"}],"tax_codes":["french_standard_vat"],"applied_pricing_unit":{"code":"credits","conversion_rate":"0.5"}}],"fixed_charges":[{"id":"1a901a90-1a90-1a90-1a90-1a901a901a90","invoice_display_name":"Setup fee","units":1,"apply_units_immediately":true,"properties":{"amount":"30","graduated_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"}],"volume_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"}]},"tax_codes":["french_standard_vat"]}],"usage_thresholds":[{"amount_cents":10000,"threshold_display_name":"Threshold 1","recurring":true}],"metadata":{"external_id":"ext-123","synced_at":"2024-01-15"}},"invoice_custom_section":{"skip_invoice_custom_sections":false,"invoice_custom_section_codes":["eu_bank_details"]},"payment_method":{"payment_method_type":"provider","payment_method_id":"1a901a90-1a90-1a90-1a90-1a901a901a90"},"consolidate_invoice":false,"billing_entity_code":"default","on_termination_credit_note":"credit","on_termination_invoice":"generate","purchase_order_number":"PO-123","progressive_billing_disabled":true,"usage_thresholds":[{"amount_cents":10000,"threshold_display_name":"Threshold 1","recurring":true}],"activation_rules":[{"type":"payment","timeout_hours":48}]},"status":"active"}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"33817e64-ba85-4dbe-9457-41fe523fb0fe":{"description":"Subscription updated","content":{"application/json":{"schema":{"type":"object","required":["subscription"],"properties":{"subscription":{"type":"object","required":["activated_at","activation_rules","billing_time","canceled_at","cancellation_reason","consolidate_invoice","created_at","current_billing_period_ending_at","current_billing_period_started_at","downgrade_plan_date","ending_at","external_customer_id","external_id","lago_customer_id","lago_id","name","next_plan_code","on_termination_credit_note","on_termination_invoice","payment_method","plan_amount_cents","plan_amount_currency","plan_code","previous_plan_code","progressive_billing_disabled","purchase_order_number","started_at","status","subscription_at","terminated_at","trial_ended_at"],"properties":{"lago_id":{"type":"string","format":"uuid","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","description":"Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system","isRequired":true,"uniqueKey":"subscription.lago_id","typeLabel":"string\u003cuuid>"},"external_id":{"type":"string","example":"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba","description":"The subscription external unique identifier (provided by your own application).","isRequired":true,"uniqueKey":"subscription.external_id","typeLabel":"string"},"lago_customer_id":{"type":"string","format":"uuid","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","description":"Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system","isRequired":true,"uniqueKey":"subscription.lago_customer_id","typeLabel":"string\u003cuuid>"},"external_customer_id":{"type":"string","example":"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba","description":"The customer external unique identifier (provided by your own application).","isRequired":true,"uniqueKey":"subscription.external_customer_id","typeLabel":"string"},"billing_time":{"type":"string","description":"The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration).","example":"anniversary","enum":["calendar","anniversary"],"isRequired":true,"uniqueKey":"subscription.billing_time","typeLabel":"enum\u003cstring>"},"name":{"oneOf":[{"type":"string","example":"Repository A","description":"The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.","isRequired":true,"uniqueKey":"subscription.name.oneOf.0","typeLabel":"string"},{"type":"null","example":"Repository A","description":"The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.","isRequired":true,"uniqueKey":"subscription.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.name","typeLabel":"string | null"},"plan_code":{"type":"string","example":"premium","description":"The unique code representing the plan to be attached to the customer. This code must correspond to the `code` property of one of the active plans.","isRequired":true,"uniqueKey":"subscription.plan_code","typeLabel":"string"},"plan_amount_cents":{"type":"integer","description":"The base cost of the related plan, excluding any applicable taxes, that is billed on a recurring basis.","example":10000,"isRequired":true,"uniqueKey":"subscription.plan_amount_cents","typeLabel":"integer"},"plan_amount_currency":{"type":"string","example":"USD","enum":["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BIF","BMD","BND","BOB","BRL","BSD","BWP","BYN","BZD","CAD","CDF","CHF","CLF","CLP","CNY","COP","CRC","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","ISK","JMD","JPY","KES","KGS","KHR","KMF","KRW","KYD","KZT","LAK","LBP","LKR","LRD","LSL","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SEK","SGD","SHP","SLL","SOS","SRD","STD","SYP","SZL","THB","TJS","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VND","VUV","WST","XAF","XCD","XOF","XPF","YER","ZAR","ZMW"],"description":"The currency of the related plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.","isRequired":true,"uniqueKey":"subscription.plan_amount_currency","typeLabel":"enum\u003cstring>"},"status":{"type":"string","description":"The status of the subscription, which can have the following values:\n- `active`: the subscription is currently active and applied to the customer.\n- `canceled`: the subscription has been stopped before its activation. This can occur when two consecutive downgrades have been applied to a customer, when a subscription with a pending status is terminated, or when a payment-gated subscription fails to be paid (or its activation rule expires) before activation. When caused by payment gating, the `cancellation_reason` field is set.\n- `incomplete`: the subscription was created with a payment activation rule and is waiting for the gating payment to succeed before it becomes `active`. It is automatically `canceled` if the payment fails or the activation rule expires.\n- `pending`: a previous subscription has been downgraded, and the current one is awaiting automatic activation at the end of the billing period.\n- `terminated`: the subscription is no longer active.","example":"active","enum":["active","canceled","incomplete","pending","terminated"],"isRequired":true,"uniqueKey":"subscription.status","typeLabel":"enum\u003cstring>"},"created_at":{"type":"string","format":"date-time","example":"2022-08-08T00:00:00Z","description":"The creation date of the subscription, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). This date provides a timestamp indicating when the subscription was initially created.","isRequired":true,"uniqueKey":"subscription.created_at","typeLabel":"string\u003cdate-time>"},"canceled_at":{"oneOf":[{"type":"string","format":"date-time","example":"2022-09-14T16:35:31Z","description":"The cancellation date of the subscription. This field is not null when the subscription is `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).","isRequired":true,"uniqueKey":"subscription.canceled_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","example":"2022-09-14T16:35:31Z","description":"The cancellation date of the subscription. This field is not null when the subscription is `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).","isRequired":true,"uniqueKey":"subscription.canceled_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.canceled_at","typeLabel":"string\u003cdate-time> | null"},"started_at":{"oneOf":[{"type":"string","format":"date-time","example":"2022-08-08T00:00:00Z","description":"The effective start date of the subscription. This field can be null if the subscription is `pending` or `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).","isRequired":true,"uniqueKey":"subscription.started_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","example":"2022-08-08T00:00:00Z","description":"The effective start date of the subscription. This field can be null if the subscription is `pending` or `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).","isRequired":true,"uniqueKey":"subscription.started_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.started_at","typeLabel":"string\u003cdate-time> | null"},"ending_at":{"oneOf":[{"type":"string","format":"date-time","example":"2022-10-08T00:00:00Z","description":"The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).","isRequired":true,"uniqueKey":"subscription.ending_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","example":"2022-10-08T00:00:00Z","description":"The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).","isRequired":true,"uniqueKey":"subscription.ending_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.ending_at","typeLabel":"string\u003cdate-time> | null"},"subscription_at":{"type":"string","format":"date-time","example":"2022-08-08T00:00:00Z","description":"The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with `anniversary` billing time. The `anniversary_date` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).","isRequired":true,"uniqueKey":"subscription.subscription_at","typeLabel":"string\u003cdate-time>"},"terminated_at":{"oneOf":[{"type":"string","format":"date-time","example":"2022-09-14T16:35:31Z","description":"The termination date of the subscription. This field is not null when the subscription is `terminated`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC)","isRequired":true,"uniqueKey":"subscription.terminated_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","example":"2022-09-14T16:35:31Z","description":"The termination date of the subscription. This field is not null when the subscription is `terminated`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC)","isRequired":true,"uniqueKey":"subscription.terminated_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.terminated_at","typeLabel":"string\u003cdate-time> | null"},"previous_plan_code":{"oneOf":[{"type":"string","example":null,"description":"The code identifying the previous plan associated with this subscription.","isRequired":true,"uniqueKey":"subscription.previous_plan_code.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"description":"The code identifying the previous plan associated with this subscription.","isRequired":true,"uniqueKey":"subscription.previous_plan_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.previous_plan_code","typeLabel":"string | null"},"next_plan_code":{"oneOf":[{"type":"string","example":null,"description":"The code identifying the next plan in the case of a downgrade.","isRequired":true,"uniqueKey":"subscription.next_plan_code.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"description":"The code identifying the next plan in the case of a downgrade.","isRequired":true,"uniqueKey":"subscription.next_plan_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.next_plan_code","typeLabel":"string | null"},"downgrade_plan_date":{"oneOf":[{"type":"string","format":"date","example":"2022-04-30","description":"The date when the plan will be downgraded, represented in ISO 8601 date format.","isRequired":true,"uniqueKey":"subscription.downgrade_plan_date.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","example":"2022-04-30","description":"The date when the plan will be downgraded, represented in ISO 8601 date format.","isRequired":true,"uniqueKey":"subscription.downgrade_plan_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.downgrade_plan_date","typeLabel":"string\u003cdate> | null"},"trial_ended_at":{"oneOf":[{"type":"string","format":"date-time","example":"2022-08-08T00:00:00Z","description":"The date when the free trial is ended, represented in ISO 8601 date format.","isRequired":true,"uniqueKey":"subscription.trial_ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","example":"2022-08-08T00:00:00Z","description":"The date when the free trial is ended, represented in ISO 8601 date format.","isRequired":true,"uniqueKey":"subscription.trial_ended_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.trial_ended_at","typeLabel":"string\u003cdate-time> | null"},"current_billing_period_started_at":{"oneOf":[{"type":"string","format":"date-time","example":"2022-08-08T00:00:00Z","description":"The date and time when the current billing period started, represented in ISO 8601 date format.","isRequired":true,"uniqueKey":"subscription.current_billing_period_started_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","example":"2022-08-08T00:00:00Z","description":"The date and time when the current billing period started, represented in ISO 8601 date format.","isRequired":true,"uniqueKey":"subscription.current_billing_period_started_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.current_billing_period_started_at","typeLabel":"string\u003cdate-time> | null"},"current_billing_period_ending_at":{"oneOf":[{"type":"string","format":"date-time","example":"2022-09-08T00:00:00Z","description":"The date and time when the current billing period ends, represented in ISO 8601 date format.","isRequired":true,"uniqueKey":"subscription.current_billing_period_ending_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","example":"2022-09-08T00:00:00Z","description":"The date and time when the current billing period ends, represented in ISO 8601 date format.","isRequired":true,"uniqueKey":"subscription.current_billing_period_ending_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.current_billing_period_ending_at","typeLabel":"string\u003cdate-time> | null"},"on_termination_credit_note":{"oneOf":[{"type":"string","description":"When a pay-in-advance subscription is terminated before the end of its billing period, we generate a credit note for the unused subscription time by default.\nThis field allows you to control the behavior of the credit note generation:\n\n- `credit`: A credit note is generated for the unused subscription time. The unused amount is credited back to the customer.\n- `refund`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer.\n- `offset`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is applied to the invoice reducing its amount due.\n- `skip`: No credit note is generated for the unused subscription time.\n\n_Note: This field is only applicable to pay-in-advance plans and will be `null` for pay-in-arrears plans._\n","example":"credit","enum":["credit","refund","offset","skip"],"isRequired":true,"uniqueKey":"subscription.on_termination_credit_note.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"When a pay-in-advance subscription is terminated before the end of its billing period, we generate a credit note for the unused subscription time by default.\nThis field allows you to control the behavior of the credit note generation:\n\n- `credit`: A credit note is generated for the unused subscription time. The unused amount is credited back to the customer.\n- `refund`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer.\n- `offset`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is applied to the invoice reducing its amount due.\n- `skip`: No credit note is generated for the unused subscription time.\n\n_Note: This field is only applicable to pay-in-advance plans and will be `null` for pay-in-arrears plans._\n","example":"credit","enum":["credit","refund","offset","skip"],"isRequired":true,"uniqueKey":"subscription.on_termination_credit_note.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.on_termination_credit_note","typeLabel":"enum\u003cstring> | null"},"on_termination_invoice":{"type":"string","example":"generate","enum":["generate","skip"],"default":"generate","description":"When a subscription is terminated before the end of its billing period, we generate an invoice for the unbilled usage.\nThis field allows you to control the behavior of the invoice generation:\n\n- `generate`: An invoice is generated for the unbilled usage.\n- `skip`: No invoice is generated for the unbilled usage.\n","isRequired":true,"uniqueKey":"subscription.on_termination_invoice","typeLabel":"enum\u003cstring>"},"payment_method":{"type":"object","description":"The payment method assigned to this subscription for processing payments.","properties":{"payment_method_type":{"type":"string","enum":["provider","manual"],"description":"The type of payment method to use.","example":"provider","uniqueKey":"subscription.payment_method.payment_method_type","typeLabel":"enum\u003cstring>"},"payment_method_id":{"type":"string","format":"uuid","description":"The unique identifier of the payment method (required when using a specific provider payment method).","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","uniqueKey":"subscription.payment_method.payment_method_id","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"subscription.payment_method","typeLabel":"object"},"consolidate_invoice":{"type":"boolean","default":true,"example":true,"description":"Controls whether this subscription is eligible to be grouped with other subscriptions of the same customer on a consolidated recurring invoice.\n\n- `true` (default): the subscription is included in the customer's standard invoice grouping (by billing entity, currency and payment method).\n- `false`: the subscription is excluded from consolidation and always billed on its own dedicated invoice, regardless of other grouping criteria.\n","isRequired":true,"uniqueKey":"subscription.consolidate_invoice","typeLabel":"boolean"},"progressive_billing_disabled":{"type":"boolean","default":false,"example":false,"description":"Indicates whether progressive billing is switched off for this subscription, regardless of any usage thresholds defined on the plan (including thresholds inherited from a parent plan when the subscription runs on a plan override).\n\nWhen `true`, no progressive billing invoice is issued for this subscription.\n","isRequired":true,"uniqueKey":"subscription.progressive_billing_disabled","typeLabel":"boolean"},"cancellation_reason":{"oneOf":[{"type":"string","example":"payment_failed","enum":["payment_failed","timeout","manual"],"description":"The reason a payment-gated subscription was canceled while still `incomplete`. Null unless the subscription was canceled before activation.\n\n- `payment_failed`: the gating payment failed.\n- `timeout`: the activation rule expired before the payment succeeded.\n- `manual`: the incomplete subscription was canceled on demand, via a terminate request with `status=incomplete`.\n","isRequired":true,"uniqueKey":"subscription.cancellation_reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","example":"payment_failed","enum":["payment_failed","timeout","manual"],"description":"The reason a payment-gated subscription was canceled while still `incomplete`. Null unless the subscription was canceled before activation.\n\n- `payment_failed`: the gating payment failed.\n- `timeout`: the activation rule expired before the payment succeeded.\n- `manual`: the incomplete subscription was canceled on demand, via a terminate request with `status=incomplete`.\n","isRequired":true,"uniqueKey":"subscription.cancellation_reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.cancellation_reason","typeLabel":"enum\u003cstring> | null"},"activated_at":{"oneOf":[{"type":"string","format":"date-time","example":"2022-08-08T00:00:00Z","description":"The date and time when a payment-gated subscription was activated (i.e. moved from `incomplete` to `active` once the gating payment succeeded), represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). Null while the subscription is still `incomplete`.\n","isRequired":true,"uniqueKey":"subscription.activated_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","example":"2022-08-08T00:00:00Z","description":"The date and time when a payment-gated subscription was activated (i.e. moved from `incomplete` to `active` once the gating payment succeeded), represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). Null while the subscription is still `incomplete`.\n","isRequired":true,"uniqueKey":"subscription.activated_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.activated_at","typeLabel":"string\u003cdate-time> | null"},"activation_rules":{"type":"array","items":{"type":"object","required":["lago_id","type","timeout_hours","status","expires_at","created_at","updated_at"],"properties":{"lago_id":{"type":"string","format":"uuid","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","description":"Unique identifier assigned to the activation rule within the Lago application. This ID is exclusively created by Lago.","isRequired":true,"uniqueKey":"subscription.activation_rules.items.[INDEX].lago_id","typeLabel":"string\u003cuuid>"},"type":{"type":"string","description":"The type of the activation rule. Only `payment` is currently supported. A `payment` rule gates the subscription activation on a successful payment of the first invoice.","example":"payment","enum":["payment"],"isRequired":true,"uniqueKey":"subscription.activation_rules.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"timeout_hours":{"type":"integer","description":"The number of hours the subscription stays in the `incomplete` state waiting for the payment to succeed before it is automatically canceled.","example":48,"isRequired":true,"uniqueKey":"subscription.activation_rules.items.[INDEX].timeout_hours","typeLabel":"integer"},"status":{"type":"string","description":"The evaluation status of the activation rule:\n- `inactive`: the rule has not been evaluated yet.\n- `pending`: the rule is applicable and is waiting to be satisfied (e.g. waiting for the payment).\n- `satisfied`: the rule has been satisfied and no longer blocks activation.\n- `declined`: the rule was applicable but was declined.\n- `failed`: the rule could not be satisfied (e.g. the payment failed).\n- `expired`: the rule was not satisfied before its timeout elapsed.\n- `not_applicable`: the rule did not apply to this subscription.","example":"pending","enum":["inactive","pending","satisfied","declined","failed","expired","not_applicable"],"isRequired":true,"uniqueKey":"subscription.activation_rules.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"expires_at":{"oneOf":[{"type":"string","format":"date-time","example":"2022-08-10T00:00:00Z","description":"The date and time when the rule expires, after which an unsatisfied rule causes the subscription to be canceled. Represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). Null until the rule starts being evaluated.","isRequired":true,"uniqueKey":"subscription.activation_rules.items.[INDEX].expires_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","example":"2022-08-10T00:00:00Z","description":"The date and time when the rule expires, after which an unsatisfied rule causes the subscription to be canceled. Represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). Null until the rule starts being evaluated.","isRequired":true,"uniqueKey":"subscription.activation_rules.items.[INDEX].expires_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.activation_rules.items.[INDEX].expires_at","typeLabel":"string\u003cdate-time> | null"},"created_at":{"type":"string","format":"date-time","example":"2022-08-08T00:00:00Z","description":"The creation date of the activation rule, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).","isRequired":true,"uniqueKey":"subscription.activation_rules.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","example":"2022-08-08T00:00:00Z","description":"The last update date of the activation rule, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).","isRequired":true,"uniqueKey":"subscription.activation_rules.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"subscription.activation_rules.items.[INDEX]","typeLabel":"object"},"description":"The activation rules attached to the subscription. A payment activation rule gates activation on a successful first payment, keeping the subscription in the `incomplete` state until the payment succeeds or the rule expires.\n","isRequired":true,"uniqueKey":"subscription.activation_rules","typeLabel":"object[]"},"purchase_order_number":{"oneOf":[{"type":"string","example":"PO-123","description":"The purchase order number associated with the subscription. It will be added to invoices generated for this subscription.","isRequired":true,"uniqueKey":"subscription.purchase_order_number.oneOf.0","typeLabel":"string"},{"type":"null","example":"PO-123","description":"The purchase order number associated with the subscription. It will be added to invoices generated for this subscription.","isRequired":true,"uniqueKey":"subscription.purchase_order_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.purchase_order_number","typeLabel":"string | null"},"billing_entity_code":{"type":"string","example":"default","description":"The code of the billing entity associated with the subscription.","uniqueKey":"subscription.billing_entity_code","typeLabel":"string"},"applied_invoice_custom_sections":{"description":"The invoice custom sections applied to invoices generated by this subscription. Only returned when creating, retrieving, updating or terminating a subscription, not when listing subscriptions and not in subscription webhooks.","type":"array","items":{"type":"object","required":["lago_id","created_at","invoice_custom_section"],"properties":{"lago_id":{"type":"string","format":"uuid","description":"Unique identifier of the applied invoice custom section in the Lago application.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","isRequired":true,"uniqueKey":"subscription.applied_invoice_custom_sections.items.[INDEX].lago_id","typeLabel":"string\u003cuuid>"},"created_at":{"type":"string","format":"date-time","description":"The date of the applied invoice custom section creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).","example":"2023-07-06T14:35:58Z","isRequired":true,"uniqueKey":"subscription.applied_invoice_custom_sections.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"invoice_custom_section":{"type":"object","required":["lago_id","name","code"],"properties":{"lago_id":{"type":"string","format":"uuid","description":"Unique identifier for the invoice custom section in the Lago application, generated by Lago to ensure record uniqueness within the system.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","isRequired":true,"uniqueKey":"subscription.applied_invoice_custom_sections.items.[INDEX].invoice_custom_section.lago_id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","description":"Name of the invoice custom section.","example":"EU Bank Details","isRequired":true,"uniqueKey":"subscription.applied_invoice_custom_sections.items.[INDEX].invoice_custom_section.name","typeLabel":"string"},"code":{"type":"string","description":"Unique code identifying the invoice custom section for the API request.","example":"eu_bank_details","isRequired":true,"uniqueKey":"subscription.applied_invoice_custom_sections.items.[INDEX].invoice_custom_section.code","typeLabel":"string"},"description":{"type":"string","description":"Internal description of the invoice custom section.","example":"This section contains the bank details for EU customers.","uniqueKey":"subscription.applied_invoice_custom_sections.items.[INDEX].invoice_custom_section.description","typeLabel":"string"},"details":{"type":"string","description":"The value shown on the invoice PDF.","example":"Bank Name: Lago Bank, IBAN: FR7630004000031234567890143","uniqueKey":"subscription.applied_invoice_custom_sections.items.[INDEX].invoice_custom_section.details","typeLabel":"string"},"display_name":{"type":"string","description":"The name of the invoice custom section displayed on the invoice.","example":"Bank Details:","uniqueKey":"subscription.applied_invoice_custom_sections.items.[INDEX].invoice_custom_section.display_name","typeLabel":"string"},"applied_to_organization":{"type":"boolean","deprecated":true,"description":"**Deprecated.** This field will be removed in a future version. When set to true, it applies the invoice custom section to the organization's default billing entity. To apply or remove an invoice custom section from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.","example":true,"uniqueKey":"subscription.applied_invoice_custom_sections.items.[INDEX].invoice_custom_section.applied_to_organization","typeLabel":"boolean"},"organization_id":{"type":"string","format":"uuid","description":"Unique identifier for the organization associated with the invoice custom section.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","uniqueKey":"subscription.applied_invoice_custom_sections.items.[INDEX].invoice_custom_section.organization_id","typeLabel":"string\u003cuuid>"},"created_at":{"type":"string","format":"date-time","description":"Creation date of the tax.","example":"2023-07-06T14:35:58Z","uniqueKey":"subscription.applied_invoice_custom_sections.items.[INDEX].invoice_custom_section.created_at","typeLabel":"string\u003cdate-time>"}},"isRequired":true,"uniqueKey":"subscription.applied_invoice_custom_sections.items.[INDEX].invoice_custom_section","typeLabel":"object"},"invoice_custom_section_id":{"deprecated":true,"type":"string","format":"uuid","description":"**Deprecated.** Unique identifier of the invoice custom section that was applied.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","uniqueKey":"subscription.applied_invoice_custom_sections.items.[INDEX].invoice_custom_section_id","typeLabel":"string\u003cuuid>"}},"uniqueKey":"subscription.applied_invoice_custom_sections.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.applied_invoice_custom_sections","typeLabel":"object[]"},"plan":{"type":"object","required":["lago_id","name","created_at","code","interval","amount_cents","amount_currency"],"properties":{"lago_id":{"type":"string","format":"uuid","description":"Unique identifier of the plan created by Lago.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","isRequired":true,"uniqueKey":"subscription.plan.lago_id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","description":"The name of the plan.","example":"Startup","isRequired":true,"uniqueKey":"subscription.plan.name","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","description":"The date and time when the plan was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the plan was initially created.","example":"2023-06-27T19:43:42Z","isRequired":true,"uniqueKey":"subscription.plan.created_at","typeLabel":"string\u003cdate-time>"},"code":{"type":"string","description":"The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.","example":"startup","isRequired":true,"uniqueKey":"subscription.plan.code","typeLabel":"string"},"interval":{"type":"string","description":"The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `semiannual`, `quarterly`, `monthly` or `weekly`.","enum":["weekly","monthly","quarterly","semiannual","yearly"],"example":"monthly","isRequired":true,"uniqueKey":"subscription.plan.interval","typeLabel":"enum\u003cstring>"},"amount_cents":{"type":"integer","description":"The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.","example":10000,"isRequired":true,"uniqueKey":"subscription.plan.amount_cents","typeLabel":"integer"},"amount_currency":{"type":"string","example":"USD","enum":["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BIF","BMD","BND","BOB","BRL","BSD","BWP","BYN","BZD","CAD","CDF","CHF","CLF","CLP","CNY","COP","CRC","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","ISK","JMD","JPY","KES","KGS","KHR","KMF","KRW","KYD","KZT","LAK","LBP","LKR","LRD","LSL","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SEK","SGD","SHP","SLL","SOS","SRD","STD","SYP","SZL","THB","TJS","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VND","VUV","WST","XAF","XCD","XOF","XPF","YER","ZAR","ZMW"],"description":"The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.","isRequired":true,"uniqueKey":"subscription.plan.amount_currency","typeLabel":"enum\u003cstring>"},"invoice_display_name":{"oneOf":[{"type":"string","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.","example":"Startup plan","uniqueKey":"subscription.plan.invoice_display_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.","example":"Startup plan","uniqueKey":"subscription.plan.invoice_display_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.invoice_display_name","typeLabel":"string | null"},"description":{"oneOf":[{"type":"string","description":"The description on the plan.","example":"Plan for early stage startups.","uniqueKey":"subscription.plan.description.oneOf.0","typeLabel":"string"},{"type":"null","description":"The description on the plan.","example":"Plan for early stage startups.","uniqueKey":"subscription.plan.description.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.description","typeLabel":"string | null"},"trial_period":{"oneOf":[{"type":"number","description":"The duration in days during which the base cost of the plan is offered for free.","example":5,"uniqueKey":"subscription.plan.trial_period.oneOf.0","typeLabel":"number"},{"type":"null","description":"The duration in days during which the base cost of the plan is offered for free.","example":5,"uniqueKey":"subscription.plan.trial_period.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.trial_period","typeLabel":"number | null"},"pay_in_advance":{"type":"boolean","description":"This field determines the billing timing for the plan. When set to `true`, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to `false`, the base cost of the plan is due at the end of each billing period.","example":true,"uniqueKey":"subscription.plan.pay_in_advance","typeLabel":"boolean"},"bill_charges_monthly":{"oneOf":[{"type":"boolean","description":"This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly or semiannual. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.","example":null,"uniqueKey":"subscription.plan.bill_charges_monthly.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly or semiannual. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.","example":null,"uniqueKey":"subscription.plan.bill_charges_monthly.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.bill_charges_monthly","typeLabel":"boolean | null"},"bill_fixed_charges_monthly":{"oneOf":[{"type":"boolean","description":"This field, when set to `true`, enables to invoice fixed charges on monthly basis, even if the cadence of the plan is yearly or semiannual. This allows customers to pay fixed charges on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.","example":null,"uniqueKey":"subscription.plan.bill_fixed_charges_monthly.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"This field, when set to `true`, enables to invoice fixed charges on monthly basis, even if the cadence of the plan is yearly or semiannual. This allows customers to pay fixed charges on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.","example":null,"uniqueKey":"subscription.plan.bill_fixed_charges_monthly.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.bill_fixed_charges_monthly","typeLabel":"boolean | null"},"parent_id":{"oneOf":[{"type":"string","format":"uuid","description":"Unique identifier of the parent plan, created by Lago. It is set on plans that override a parent plan for a single subscription, and `null` on standard plans.","example":null,"uniqueKey":"subscription.plan.parent_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"Unique identifier of the parent plan, created by Lago. It is set on plans that override a parent plan for a single subscription, and `null` on standard plans.","example":null,"uniqueKey":"subscription.plan.parent_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.parent_id","typeLabel":"string\u003cuuid> | null"},"pending_deletion":{"type":"boolean","description":"This field is set to `true` when the plan is scheduled for deletion but still attached to subscriptions that have to be billed first.","example":false,"uniqueKey":"subscription.plan.pending_deletion","typeLabel":"boolean"},"minimum_commitment":{"oneOf":[{"type":"object","required":["lago_id","amount_cents","created_at"],"properties":{"lago_id":{"type":"string","format":"uuid","description":"Unique identifier of the minimum commitment, created by Lago.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","isRequired":true,"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.lago_id","typeLabel":"string\u003cuuid>"},"amount_cents":{"type":"integer","description":"The amount of the minimum commitment in cents.","example":100000,"isRequired":true,"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.amount_cents","typeLabel":"integer"},"created_at":{"type":"string","format":"date-time","description":"The date and time when the minimum commitment was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the minimum commitment was initially created.","example":"2022-04-29T08:59:51Z","isRequired":true,"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.created_at","typeLabel":"string\u003cdate-time>"},"plan_code":{"type":"string","example":"premium","description":"The unique code representing the plan to be attached to the customer.","uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.plan_code","typeLabel":"string"},"invoice_display_name":{"oneOf":[{"type":"string","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.","example":"Minimum Commitment (C1)","uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.invoice_display_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.","example":"Minimum Commitment (C1)","uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.invoice_display_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.invoice_display_name","typeLabel":"string | null"},"interval":{"type":"string","description":"The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `semiannual`, `quarterly`, `monthly` or `weekly`.","enum":["weekly","monthly","quarterly","semiannual","yearly"],"example":"monthly","uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.interval","typeLabel":"enum\u003cstring>"},"updated_at":{"type":"string","format":"date-time","description":"The date and time when the minimum commitment was updated. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the minimum commitment was initially created.","example":"2022-04-29T08:59:51Z","uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.updated_at","typeLabel":"string\u003cdate-time>"},"taxes":{"type":"array","description":"All taxes applied to the minimum commitment.","items":{"type":"object","required":["lago_id","name","code","description","rate","applied_to_organization","created_at"],"properties":{"lago_id":{"type":"string","format":"uuid","description":"Unique identifier of the tax, created by Lago.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","isRequired":true,"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.taxes.items.[INDEX].lago_id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","description":"Name of the tax.","example":"TVA","isRequired":true,"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.taxes.items.[INDEX].name","typeLabel":"string"},"code":{"type":"string","description":"Unique code used to identify the tax associated with the API request.","example":"french_standard_vat","isRequired":true,"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.taxes.items.[INDEX].code","typeLabel":"string"},"description":{"oneOf":[{"type":"string","description":"Internal description of the tax.","example":"French standard VAT","isRequired":true,"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.taxes.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Internal description of the tax.","example":"French standard VAT","isRequired":true,"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.taxes.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.taxes.items.[INDEX].description","typeLabel":"string | null"},"rate":{"type":"number","description":"The percentage rate of the tax.","example":20,"isRequired":true,"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.taxes.items.[INDEX].rate","typeLabel":"number"},"applied_to_organization":{"type":"boolean","deprecated":true,"description":"**Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.","example":true,"isRequired":true,"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.taxes.items.[INDEX].applied_to_organization","typeLabel":"boolean"},"created_at":{"type":"string","format":"date-time","description":"Creation date of the tax.","example":"2023-07-06T14:35:58Z","isRequired":true,"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.taxes.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"applied_to_billing_entities_codes":{"type":"array","items":{"type":"string","uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.taxes.items.[INDEX].applied_to_billing_entities_codes.items.[INDEX]","typeLabel":"string"},"description":"The codes of the billing entities the tax is applied to, sorted alphabetically. It is empty when the tax is only attached to customers. This field is only returned by the tax endpoints, not by taxes nested in another object.","example":["acme_corp","foo_bar"],"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.taxes.items.[INDEX].applied_to_billing_entities_codes","typeLabel":"string[]"}},"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.taxes.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0.taxes","typeLabel":"object[]"}},"uniqueKey":"subscription.plan.minimum_commitment.oneOf.0","typeLabel":"object"},{"type":"null","required":["lago_id","amount_cents","created_at"],"properties":{"lago_id":{"type":"string","format":"uuid","description":"Unique identifier of the minimum commitment, created by Lago.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90"},"plan_code":{"type":"string","example":"premium","description":"The unique code representing the plan to be attached to the customer."},"amount_cents":{"type":"integer","description":"The amount of the minimum commitment in cents.","example":100000},"invoice_display_name":{"oneOf":[{"type":"string","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.","example":"Minimum Commitment (C1)"},{"type":"null","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.","example":"Minimum Commitment (C1)"}]},"interval":{"type":"string","description":"The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `semiannual`, `quarterly`, `monthly` or `weekly`.","enum":["weekly","monthly","quarterly","semiannual","yearly"],"example":"monthly"},"created_at":{"type":"string","format":"date-time","description":"The date and time when the minimum commitment was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the minimum commitment was initially created.","example":"2022-04-29T08:59:51Z"},"updated_at":{"type":"string","format":"date-time","description":"The date and time when the minimum commitment was updated. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the minimum commitment was initially created.","example":"2022-04-29T08:59:51Z"},"taxes":{"type":"array","description":"All taxes applied to the minimum commitment.","items":{"type":"object","required":["lago_id","name","code","description","rate","applied_to_organization","created_at"],"properties":{"lago_id":{"type":"string","format":"uuid","description":"Unique identifier of the tax, created by Lago.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90"},"name":{"type":"string","description":"Name of the tax.","example":"TVA"},"code":{"type":"string","description":"Unique code used to identify the tax associated with the API request.","example":"french_standard_vat"},"description":{"oneOf":[{"type":"string","description":"Internal description of the tax.","example":"French standard VAT"},{"type":"null","description":"Internal description of the tax.","example":"French standard VAT"}]},"rate":{"type":"number","description":"The percentage rate of the tax.","example":20},"applied_to_organization":{"type":"boolean","deprecated":true,"description":"**Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.","example":true},"applied_to_billing_entities_codes":{"type":"array","items":{"type":"string"},"description":"The codes of the billing entities the tax is applied to, sorted alphabetically. It is empty when the tax is only attached to customers. This field is only returned by the tax endpoints, not by taxes nested in another object.","example":["acme_corp","foo_bar"]},"created_at":{"type":"string","format":"date-time","description":"Creation date of the tax.","example":"2023-07-06T14:35:58Z"}}}}},"uniqueKey":"subscription.plan.minimum_commitment.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.minimum_commitment","typeLabel":"object | null"},"charges":{"type":"array","items":{"type":"object","required":["lago_id","lago_billable_metric_id","billable_metric_code","created_at","charge_model","invoiceable","regroup_paid_fees","pay_in_advance","prorated","min_amount_cents","properties","filters"],"properties":{"lago_id":{"type":"string","format":"uuid","description":"Unique identifier of charge, created by Lago.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].lago_id","typeLabel":"string\u003cuuid>"},"lago_billable_metric_id":{"type":"string","format":"uuid","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","description":"Unique identifier of the billable metric created by Lago.","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].lago_billable_metric_id","typeLabel":"string\u003cuuid>"},"billable_metric_code":{"type":"string","description":"Unique code identifying a billable metric.","example":"requests","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].billable_metric_code","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","description":"The date and time when the charge was created. It is expressed in UTC format according to the ISO 8601 datetime standard.","example":"2022-09-14T16:35:31Z","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"charge_model":{"type":"string","description":"Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:\n - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)\n - [`graduated_percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated-percentage)\n - [`graduated`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated)\n - [`package`](https://docs.getlago.com/guide/plans/charges/charge-models/package)\n - [`percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/percentage)\n - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard)\n - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume)\n","enum":["dynamic","graduated","graduated_percentage","package","percentage","standard","volume"],"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].charge_model","typeLabel":"enum\u003cstring>"},"pay_in_advance":{"type":"boolean","description":"This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to `false`, the charge is due and invoiced at the end of each billing period.","example":true,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].pay_in_advance","typeLabel":"boolean"},"invoiceable":{"type":"boolean","description":"This field specifies whether the charge should be included in a proper invoice. If set to `false`, no invoice will be issued for this charge. You can only set it to `false` when `pay_in_advance` is `true`.","example":true,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].invoiceable","typeLabel":"boolean"},"regroup_paid_fees":{"oneOf":[{"type":"string","enum":[null,"invoice"],"description":"This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.\nThis field determines whether and when the charge fee should be included in\nthe invoice. If `null`, no invoice will be issued for this charge fee.\nIf `invoice`, an invoice will be generated at the end of the period,\nconsolidating all charge fees with a succeeded payment status.","example":"invoice","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].regroup_paid_fees.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":[null,"invoice"],"description":"This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.\nThis field determines whether and when the charge fee should be included in\nthe invoice. If `null`, no invoice will be issued for this charge fee.\nIf `invoice`, an invoice will be generated at the end of the period,\nconsolidating all charge fees with a succeeded payment status.","example":"invoice","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].regroup_paid_fees.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].regroup_paid_fees","typeLabel":"enum\u003cstring> | null"},"prorated":{"type":"boolean","example":false,"description":"Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.\n\n- If set to `true`, the charge is prorated based on the remaining days in the current billing period.\n- If set to `false`, the charge is billed in full.\n- If not defined in the request, default value is `false`.","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].prorated","typeLabel":"boolean"},"min_amount_cents":{"type":"integer","description":"The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.","example":1200,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].min_amount_cents","typeLabel":"integer"},"properties":{"type":"object","description":"List of all thresholds utilized for calculating the charge.","properties":{"grouped_by":{"type":"array","description":"**Deprecated.** Replaced by `pricing_group_keys`.\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.","items":{"type":"string","uniqueKey":"subscription.plan.charges.items.[INDEX].properties.grouped_by.items.[INDEX]","typeLabel":"string"},"example":["agent_name"],"deprecated":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.grouped_by","typeLabel":"string[]"},"pricing_group_keys":{"type":"array","description":"The list of event properties that are used to group the events on the invoice.","items":{"type":"string","uniqueKey":"subscription.plan.charges.items.[INDEX].properties.pricing_group_keys.items.[INDEX]","typeLabel":"string"},"example":["agent_name"],"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.pricing_group_keys","typeLabel":"string[]"},"graduated_ranges":{"type":"array","description":"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.","items":{"type":"object","required":["from_value","to_value","flat_amount","per_unit_amount"],"properties":{"from_value":{"type":"integer","description":"Specifies the lower value of a tier for a `graduated` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.","example":0,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].from_value","typeLabel":"integer"},"to_value":{"oneOf":[{"type":"integer","description":"Specifies the highest value of a tier for a `graduated` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Specifies the highest value of a tier for a `graduated` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value","typeLabel":"integer | null"},"flat_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The flat amount for a whole tier, excluding tax, for a `graduated` charge model. It is expressed as a decimal value.","example":"10","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].flat_amount","typeLabel":"string"},"per_unit_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The unit price, excluding tax, for a specific tier of a `graduated` charge model. It is expressed as a decimal value.","example":"0.5","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].per_unit_amount","typeLabel":"string"}},"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.graduated_ranges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.graduated_ranges","typeLabel":"object[]"},"graduated_percentage_ranges":{"type":"array","description":"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.","items":{"type":"object","required":["from_value","to_value","rate","flat_amount"],"properties":{"from_value":{"type":"integer","description":"Specifies the lower value of a tier for a `graduated_percentage` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.","example":0,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].from_value","typeLabel":"integer"},"to_value":{"oneOf":[{"type":"integer","description":"Specifies the highest value of a tier for a `graduated_percentage` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].to_value.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Specifies the highest value of a tier for a `graduated_percentage` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].to_value.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].to_value","typeLabel":"integer | null"},"rate":{"type":"string","format":"^[0-9]+.?[0-9]*$","description":"The percentage rate that is applied to the amount of each transaction in the tier for a `graduated_percentage` charge model. It is expressed as a decimal value.","example":"1","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].rate","typeLabel":"string\u003c^[0-9]+.?[0-9]*$>"},"flat_amount":{"type":"string","format":"^[0-9]+.?[0-9]*$","description":"The flat amount for a whole tier, excluding tax, for a `graduated_percentage` charge model. It is expressed as a decimal value.","example":"10","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].flat_amount","typeLabel":"string\u003c^[0-9]+.?[0-9]*$>"}},"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.graduated_percentage_ranges","typeLabel":"object[]"},"amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.","example":"30","uniqueKey":"subscription.plan.charges.items.[INDEX].properties.amount","typeLabel":"string"},"free_units":{"type":"integer","description":"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.","example":100,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.free_units","typeLabel":"integer"},"package_size":{"type":"integer","description":"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.","example":1000,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.package_size","typeLabel":"integer"},"rate":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.","example":"1","uniqueKey":"subscription.plan.charges.items.[INDEX].properties.rate","typeLabel":"string"},"fixed_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.","example":"0.5","uniqueKey":"subscription.plan.charges.items.[INDEX].properties.fixed_amount","typeLabel":"string"},"free_units_per_events":{"oneOf":[{"type":"integer","description":"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.","example":5,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.free_units_per_events.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.","example":5,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.free_units_per_events.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.free_units_per_events","typeLabel":"integer | null"},"free_units_per_total_aggregation":{"oneOf":[{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.","example":"500","uniqueKey":"subscription.plan.charges.items.[INDEX].properties.free_units_per_total_aggregation.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^[0-9]+.?[0-9]*$","description":"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.","example":"500","uniqueKey":"subscription.plan.charges.items.[INDEX].properties.free_units_per_total_aggregation.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.free_units_per_total_aggregation","typeLabel":"string | null"},"per_transaction_max_amount":{"oneOf":[{"type":"string","format":"^[0-9]+.?[0-9]*$","description":"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.","example":"3.75","uniqueKey":"subscription.plan.charges.items.[INDEX].properties.per_transaction_max_amount.oneOf.0","typeLabel":"string\u003c^[0-9]+.?[0-9]*$>"},{"type":"null","format":"^[0-9]+.?[0-9]*$","description":"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.","example":"3.75","uniqueKey":"subscription.plan.charges.items.[INDEX].properties.per_transaction_max_amount.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.per_transaction_max_amount","typeLabel":"string\u003c^[0-9]+.?[0-9]*$> | null"},"per_transaction_min_amount":{"oneOf":[{"type":"string","format":"^[0-9]+.?[0-9]*$","description":"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.","example":"1.75","uniqueKey":"subscription.plan.charges.items.[INDEX].properties.per_transaction_min_amount.oneOf.0","typeLabel":"string\u003c^[0-9]+.?[0-9]*$>"},{"type":"null","format":"^[0-9]+.?[0-9]*$","description":"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.","example":"1.75","uniqueKey":"subscription.plan.charges.items.[INDEX].properties.per_transaction_min_amount.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.per_transaction_min_amount","typeLabel":"string\u003c^[0-9]+.?[0-9]*$> | null"},"volume_ranges":{"type":"array","description":"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.","items":{"type":"object","required":["from_value","to_value","flat_amount","per_unit_amount"],"properties":{"from_value":{"type":"integer","description":"Specifies the lower value of a tier for a `volume` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.","example":0,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.volume_ranges.items.[INDEX].from_value","typeLabel":"integer"},"to_value":{"oneOf":[{"type":"integer","description":"Specifies the highest value of a tier for a `volume` charge model.\n- This value must be higher than the `from_value` of the same tier.\n- This value must be `null` for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Specifies the highest value of a tier for a `volume` charge model.\n- This value must be higher than the `from_value` of the same tier.\n- This value must be `null` for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value","typeLabel":"integer | null"},"flat_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The flat amount for a whole tier, excluding tax, for a `volume` charge model. It is expressed as a decimal value.","example":"10","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.volume_ranges.items.[INDEX].flat_amount","typeLabel":"string"},"per_unit_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The unit price, excluding tax, for a specific tier of a `volume` charge model. It is expressed as a decimal value.","example":"0.5","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.volume_ranges.items.[INDEX].per_unit_amount","typeLabel":"string"}},"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.volume_ranges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.volume_ranges","typeLabel":"object[]"},"presentation_group_keys":{"type":"array","description":"Groups usage into sub-items on invoices for display only, without affecting pricing or aggregation.","items":{"type":"object","properties":{"value":{"type":"string","description":"The event property to group by.","example":"region","uniqueKey":"subscription.plan.charges.items.[INDEX].properties.presentation_group_keys.items.[INDEX].value","typeLabel":"string"},"options":{"type":"object","properties":{"display_in_invoice":{"type":"boolean","example":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.presentation_group_keys.items.[INDEX].options.display_in_invoice","typeLabel":"boolean"}},"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.presentation_group_keys.items.[INDEX].options","typeLabel":"object"}},"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.presentation_group_keys.items.[INDEX]","typeLabel":"object"},"example":[{"value":"region","options":{"display_in_invoice":true}}],"uniqueKey":"subscription.plan.charges.items.[INDEX].properties.presentation_group_keys","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].properties","typeLabel":"object"},"filters":{"type":"array","description":"List of filters used to apply differentiated pricing based on additional event properties.","items":{"type":"object","description":"Values used to apply differentiated pricing based on additional event properties.","required":["invoice_display_name","properties","values"],"properties":{"invoice_display_name":{"oneOf":[{"type":"string","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.","example":"AWS","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].invoice_display_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.","example":"AWS","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].invoice_display_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].invoice_display_name","typeLabel":"string | null"},"properties":{"type":"object","properties":{"grouped_by":{"type":"array","description":"**Deprecated.** Replaced by `pricing_group_keys`.\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.","items":{"type":"string","uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.grouped_by.items.[INDEX]","typeLabel":"string"},"example":["agent_name"],"deprecated":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.grouped_by","typeLabel":"string[]"},"pricing_group_keys":{"type":"array","description":"The list of event properties that are used to group the events on the invoice.","items":{"type":"string","uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.pricing_group_keys.items.[INDEX]","typeLabel":"string"},"example":["agent_name"],"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.pricing_group_keys","typeLabel":"string[]"},"graduated_ranges":{"type":"array","description":"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.","items":{"type":"object","required":["from_value","to_value","flat_amount","per_unit_amount"],"properties":{"from_value":{"type":"integer","description":"Specifies the lower value of a tier for a `graduated` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.","example":0,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_ranges.items.[INDEX].from_value","typeLabel":"integer"},"to_value":{"oneOf":[{"type":"integer","description":"Specifies the highest value of a tier for a `graduated` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Specifies the highest value of a tier for a `graduated` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value","typeLabel":"integer | null"},"flat_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The flat amount for a whole tier, excluding tax, for a `graduated` charge model. It is expressed as a decimal value.","example":"10","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_ranges.items.[INDEX].flat_amount","typeLabel":"string"},"per_unit_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The unit price, excluding tax, for a specific tier of a `graduated` charge model. It is expressed as a decimal value.","example":"0.5","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_ranges.items.[INDEX].per_unit_amount","typeLabel":"string"}},"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_ranges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_ranges","typeLabel":"object[]"},"graduated_percentage_ranges":{"type":"array","description":"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.","items":{"type":"object","required":["from_value","to_value","rate","flat_amount"],"properties":{"from_value":{"type":"integer","description":"Specifies the lower value of a tier for a `graduated_percentage` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.","example":0,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].from_value","typeLabel":"integer"},"to_value":{"oneOf":[{"type":"integer","description":"Specifies the highest value of a tier for a `graduated_percentage` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].to_value.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Specifies the highest value of a tier for a `graduated_percentage` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].to_value.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].to_value","typeLabel":"integer | null"},"rate":{"type":"string","format":"^[0-9]+.?[0-9]*$","description":"The percentage rate that is applied to the amount of each transaction in the tier for a `graduated_percentage` charge model. It is expressed as a decimal value.","example":"1","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].rate","typeLabel":"string\u003c^[0-9]+.?[0-9]*$>"},"flat_amount":{"type":"string","format":"^[0-9]+.?[0-9]*$","description":"The flat amount for a whole tier, excluding tax, for a `graduated_percentage` charge model. It is expressed as a decimal value.","example":"10","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX].flat_amount","typeLabel":"string\u003c^[0-9]+.?[0-9]*$>"}},"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_percentage_ranges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.graduated_percentage_ranges","typeLabel":"object[]"},"amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.","example":"30","uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.amount","typeLabel":"string"},"free_units":{"type":"integer","description":"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.","example":100,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.free_units","typeLabel":"integer"},"package_size":{"type":"integer","description":"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.","example":1000,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.package_size","typeLabel":"integer"},"rate":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.","example":"1","uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.rate","typeLabel":"string"},"fixed_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.","example":"0.5","uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.fixed_amount","typeLabel":"string"},"free_units_per_events":{"oneOf":[{"type":"integer","description":"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.","example":5,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.free_units_per_events.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.","example":5,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.free_units_per_events.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.free_units_per_events","typeLabel":"integer | null"},"free_units_per_total_aggregation":{"oneOf":[{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.","example":"500","uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.free_units_per_total_aggregation.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^[0-9]+.?[0-9]*$","description":"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.","example":"500","uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.free_units_per_total_aggregation.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.free_units_per_total_aggregation","typeLabel":"string | null"},"per_transaction_max_amount":{"oneOf":[{"type":"string","format":"^[0-9]+.?[0-9]*$","description":"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.","example":"3.75","uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.per_transaction_max_amount.oneOf.0","typeLabel":"string\u003c^[0-9]+.?[0-9]*$>"},{"type":"null","format":"^[0-9]+.?[0-9]*$","description":"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.","example":"3.75","uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.per_transaction_max_amount.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.per_transaction_max_amount","typeLabel":"string\u003c^[0-9]+.?[0-9]*$> | null"},"per_transaction_min_amount":{"oneOf":[{"type":"string","format":"^[0-9]+.?[0-9]*$","description":"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.","example":"1.75","uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.per_transaction_min_amount.oneOf.0","typeLabel":"string\u003c^[0-9]+.?[0-9]*$>"},{"type":"null","format":"^[0-9]+.?[0-9]*$","description":"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.","example":"1.75","uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.per_transaction_min_amount.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.per_transaction_min_amount","typeLabel":"string\u003c^[0-9]+.?[0-9]*$> | null"},"volume_ranges":{"type":"array","description":"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.","items":{"type":"object","required":["from_value","to_value","flat_amount","per_unit_amount"],"properties":{"from_value":{"type":"integer","description":"Specifies the lower value of a tier for a `volume` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.","example":0,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.volume_ranges.items.[INDEX].from_value","typeLabel":"integer"},"to_value":{"oneOf":[{"type":"integer","description":"Specifies the highest value of a tier for a `volume` charge model.\n- This value must be higher than the `from_value` of the same tier.\n- This value must be `null` for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Specifies the highest value of a tier for a `volume` charge model.\n- This value must be higher than the `from_value` of the same tier.\n- This value must be `null` for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value","typeLabel":"integer | null"},"flat_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The flat amount for a whole tier, excluding tax, for a `volume` charge model. It is expressed as a decimal value.","example":"10","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.volume_ranges.items.[INDEX].flat_amount","typeLabel":"string"},"per_unit_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The unit price, excluding tax, for a specific tier of a `volume` charge model. It is expressed as a decimal value.","example":"0.5","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.volume_ranges.items.[INDEX].per_unit_amount","typeLabel":"string"}},"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.volume_ranges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties.volume_ranges","typeLabel":"object[]"}},"description":"List of all thresholds utilized for calculating the charge.","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].properties","typeLabel":"object"},"values":{"type":"object","description":"List of possible filter values. The key and values must match one of the billable metric filters.","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].values.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].values.additionalProperties","typeLabel":"string[]"},"example":{"region":["us-east-1"]},"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].values","typeLabel":"object"},"lago_id":{"type":"string","format":"uuid","description":"Unique identifier of the charge filter, created by Lago.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].lago_id","typeLabel":"string\u003cuuid>"},"charge_code":{"type":"string","description":"Unique code identifying the charge this filter belongs to.","example":"api_requests_charge","uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX].charge_code","typeLabel":"string"}},"uniqueKey":"subscription.plan.charges.items.[INDEX].filters.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].filters","typeLabel":"object[]"},"code":{"type":"string","description":"Unique code identifying the charge within the plan.","example":"api_requests_charge","uniqueKey":"subscription.plan.charges.items.[INDEX].code","typeLabel":"string"},"invoice_display_name":{"oneOf":[{"type":"string","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.","example":"Setup","uniqueKey":"subscription.plan.charges.items.[INDEX].invoice_display_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.","example":"Setup","uniqueKey":"subscription.plan.charges.items.[INDEX].invoice_display_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.charges.items.[INDEX].invoice_display_name","typeLabel":"string | null"},"taxes":{"type":"array","description":"All taxes applied to the charge.","items":{"type":"object","required":["lago_id","name","code","description","rate","applied_to_organization","created_at"],"properties":{"lago_id":{"type":"string","format":"uuid","description":"Unique identifier of the tax, created by Lago.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].taxes.items.[INDEX].lago_id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","description":"Name of the tax.","example":"TVA","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].taxes.items.[INDEX].name","typeLabel":"string"},"code":{"type":"string","description":"Unique code used to identify the tax associated with the API request.","example":"french_standard_vat","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].taxes.items.[INDEX].code","typeLabel":"string"},"description":{"oneOf":[{"type":"string","description":"Internal description of the tax.","example":"French standard VAT","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].taxes.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Internal description of the tax.","example":"French standard VAT","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].taxes.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].taxes.items.[INDEX].description","typeLabel":"string | null"},"rate":{"type":"number","description":"The percentage rate of the tax.","example":20,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].taxes.items.[INDEX].rate","typeLabel":"number"},"applied_to_organization":{"type":"boolean","deprecated":true,"description":"**Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.","example":true,"isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].taxes.items.[INDEX].applied_to_organization","typeLabel":"boolean"},"created_at":{"type":"string","format":"date-time","description":"Creation date of the tax.","example":"2023-07-06T14:35:58Z","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].taxes.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"applied_to_billing_entities_codes":{"type":"array","items":{"type":"string","uniqueKey":"subscription.plan.charges.items.[INDEX].taxes.items.[INDEX].applied_to_billing_entities_codes.items.[INDEX]","typeLabel":"string"},"description":"The codes of the billing entities the tax is applied to, sorted alphabetically. It is empty when the tax is only attached to customers. This field is only returned by the tax endpoints, not by taxes nested in another object.","example":["acme_corp","foo_bar"],"uniqueKey":"subscription.plan.charges.items.[INDEX].taxes.items.[INDEX].applied_to_billing_entities_codes","typeLabel":"string[]"}},"uniqueKey":"subscription.plan.charges.items.[INDEX].taxes.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan.charges.items.[INDEX].taxes","typeLabel":"object[]"},"applied_pricing_unit":{"oneOf":[{"type":"object","required":["code","conversion_rate"],"description":"The pricing unit applied to the charge.","properties":{"code":{"type":"string","description":"The code of the pricing unit.","example":"unit_code","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].applied_pricing_unit.oneOf.0.code","typeLabel":"string"},"conversion_rate":{"type":"string","description":"The conversion rate from pricing units to the plan's currency.","example":"0.5","isRequired":true,"uniqueKey":"subscription.plan.charges.items.[INDEX].applied_pricing_unit.oneOf.0.conversion_rate","typeLabel":"string"}},"uniqueKey":"subscription.plan.charges.items.[INDEX].applied_pricing_unit.oneOf.0","typeLabel":"object"},{"type":"null","required":["code","conversion_rate"],"description":"The pricing unit applied to the charge.","properties":{"code":{"type":"string","description":"The code of the pricing unit.","example":"unit_code"},"conversion_rate":{"type":"string","description":"The conversion rate from pricing units to the plan's currency.","example":"0.5"}},"uniqueKey":"subscription.plan.charges.items.[INDEX].applied_pricing_unit.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.charges.items.[INDEX].applied_pricing_unit","typeLabel":"object | null"},"accepts_target_wallet":{"type":"boolean","description":"Specifies whether the charge accepts a target wallet for prepaid credits deduction.\nWhen `true`, events may include a `target_wallet_code` in their `properties` to direct credit deduction to a specific wallet.\nThis field requires a premium integration.","example":false,"uniqueKey":"subscription.plan.charges.items.[INDEX].accepts_target_wallet","typeLabel":"boolean"},"lago_parent_id":{"oneOf":[{"type":"string","format":"uuid","description":"Unique identifier of the parent charge (if this is an override).","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","uniqueKey":"subscription.plan.charges.items.[INDEX].lago_parent_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"Unique identifier of the parent charge (if this is an override).","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","uniqueKey":"subscription.plan.charges.items.[INDEX].lago_parent_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.charges.items.[INDEX].lago_parent_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"subscription.plan.charges.items.[INDEX]","typeLabel":"object"},"description":"Additional usage-based charges for this plan.","example":[{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","billable_metric_code":"requests","created_at":"2023-06-27T19:43:42Z","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","billable_metric_code":"cpu","created_at":"2023-06-27T19:43:42Z","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"},{"from_value":11,"to_value":null,"flat_amount":"0","per_unit_amount":"0.4"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","billable_metric_code":"seats","created_at":"2023-06-27T19:43:42Z","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{},"filters":[{"invoice_display_name":"Europe","properties":{"amount":"10"},"values":{"region":["Europe"]}},{"invoice_display_name":"USA","properties":{"amount":"5"},"values":{"region":["USA"]}},{"invoice_display_name":"Africa","properties":{"amount":"8"},"values":{"region":["Africa"]}}]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","billable_metric_code":"storage","created_at":"2023-06-27T19:43:42Z","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","billable_metric_code":"payments","created_at":"2023-06-27T19:43:42Z","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"filters":[]}],"uniqueKey":"subscription.plan.charges","typeLabel":"object[]"},"fixed_charges":{"type":"array","description":"List of fixed charges for this plan. Only returned when creating, retrieving, updating or deleting a plan. It is not returned when listing plans, in the plan webhooks, or on the plan nested in a subscription.","items":{"type":"object","required":["lago_id","lago_add_on_id","code","invoice_display_name","add_on_code","created_at","charge_model","pay_in_advance","prorated","properties","units"],"properties":{"lago_id":{"type":"string","format":"uuid","description":"Unique identifier of the fixed charge, created by Lago.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].lago_id","typeLabel":"string\u003cuuid>"},"lago_add_on_id":{"type":"string","format":"uuid","description":"Unique identifier of the add-on associated with this fixed charge.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].lago_add_on_id","typeLabel":"string\u003cuuid>"},"invoice_display_name":{"oneOf":[{"type":"string","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.","example":"Setup fee","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].invoice_display_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.","example":"Setup fee","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].invoice_display_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].invoice_display_name","typeLabel":"string | null"},"add_on_code":{"type":"string","description":"Unique code used to identify the add-on.","example":"setup_fee","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].add_on_code","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","description":"The date and time when the fixed charge was created. It is expressed in UTC format according to the ISO 8601 datetime standard.","example":"2023-06-27T19:43:42Z","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"code":{"type":"string","description":"Unique code for the fixed charge.","example":"setup_fee","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].code","typeLabel":"string"},"charge_model":{"type":"string","enum":["standard","graduated","volume"],"description":"The charge model for the fixed charge. Only `standard`, `graduated`, and `volume` models are supported for fixed charges.","example":"standard","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].charge_model","typeLabel":"enum\u003cstring>"},"pay_in_advance":{"type":"boolean","description":"This field determines the billing timing for this fixed charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.","example":false,"isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].pay_in_advance","typeLabel":"boolean"},"prorated":{"type":"boolean","description":"Specifies whether a fixed charge is prorated based on the remaining number of days in the billing period or billed fully.\n\n- If set to `true`, the charge is prorated based on the remaining days in the current billing period.\n- If set to `false`, the charge is billed in full.\n- If not defined in the request, default value is `false`.\n","example":false,"isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].prorated","typeLabel":"boolean"},"properties":{"type":"object","properties":{"amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.","example":"30","uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.amount","typeLabel":"string"},"graduated_ranges":{"type":"array","description":"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.","items":{"type":"object","required":["from_value","to_value","flat_amount","per_unit_amount"],"properties":{"from_value":{"type":"integer","description":"Specifies the lower value of a tier for a `graduated` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.","example":0,"isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].from_value","typeLabel":"integer"},"to_value":{"oneOf":[{"type":"integer","description":"Specifies the highest value of a tier for a `graduated` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Specifies the highest value of a tier for a `graduated` charge model.\n- This value must be higher than the from_value of the same tier.\n- This value must be null for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].to_value","typeLabel":"integer | null"},"flat_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The flat amount for a whole tier, excluding tax, for a `graduated` charge model. It is expressed as a decimal value.","example":"10","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].flat_amount","typeLabel":"string"},"per_unit_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The unit price, excluding tax, for a specific tier of a `graduated` charge model. It is expressed as a decimal value.","example":"0.5","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.graduated_ranges.items.[INDEX].per_unit_amount","typeLabel":"string"}},"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.graduated_ranges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.graduated_ranges","typeLabel":"object[]"},"volume_ranges":{"type":"array","description":"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.","items":{"type":"object","required":["from_value","to_value","flat_amount","per_unit_amount"],"properties":{"from_value":{"type":"integer","description":"Specifies the lower value of a tier for a `volume` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.","example":0,"isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.volume_ranges.items.[INDEX].from_value","typeLabel":"integer"},"to_value":{"oneOf":[{"type":"integer","description":"Specifies the highest value of a tier for a `volume` charge model.\n- This value must be higher than the `from_value` of the same tier.\n- This value must be `null` for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Specifies the highest value of a tier for a `volume` charge model.\n- This value must be higher than the `from_value` of the same tier.\n- This value must be `null` for the last tier.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.volume_ranges.items.[INDEX].to_value","typeLabel":"integer | null"},"flat_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The flat amount for a whole tier, excluding tax, for a `volume` charge model. It is expressed as a decimal value.","example":"10","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.volume_ranges.items.[INDEX].flat_amount","typeLabel":"string"},"per_unit_amount":{"type":"string","pattern":"^[0-9]+.?[0-9]*$","description":"The unit price, excluding tax, for a specific tier of a `volume` charge model. It is expressed as a decimal value.","example":"0.5","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.volume_ranges.items.[INDEX].per_unit_amount","typeLabel":"string"}},"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.volume_ranges.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties.volume_ranges","typeLabel":"object[]"}},"description":"List of all thresholds utilized for calculating the fixed charge.","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].properties","typeLabel":"object"},"units":{"type":"string","description":"The number of units for the fixed charge, as a decimal string.\n\nWhen retrieved through a subscription-scoped endpoint (e.g. `GET /subscriptions/{external_id}/fixed_charges`), this reflects the per-subscription unit override when one exists, and falls back to the plan-level units otherwise. Plan-scoped endpoints always return the plan-level units.","example":"1.0","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].units","typeLabel":"string"},"lago_parent_id":{"oneOf":[{"type":"string","format":"uuid","description":"Unique identifier of the parent fixed charge (for plan versions).","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].lago_parent_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"Unique identifier of the parent fixed charge (for plan versions).","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].lago_parent_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].lago_parent_id","typeLabel":"string\u003cuuid> | null"},"taxes":{"type":"array","description":"List of taxes applied to the fixed charge.","items":{"type":"object","required":["lago_id","name","code","description","rate","applied_to_organization","created_at"],"properties":{"lago_id":{"type":"string","format":"uuid","description":"Unique identifier of the tax, created by Lago.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].taxes.items.[INDEX].lago_id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","description":"Name of the tax.","example":"TVA","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].taxes.items.[INDEX].name","typeLabel":"string"},"code":{"type":"string","description":"Unique code used to identify the tax associated with the API request.","example":"french_standard_vat","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].taxes.items.[INDEX].code","typeLabel":"string"},"description":{"oneOf":[{"type":"string","description":"Internal description of the tax.","example":"French standard VAT","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].taxes.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Internal description of the tax.","example":"French standard VAT","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].taxes.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].taxes.items.[INDEX].description","typeLabel":"string | null"},"rate":{"type":"number","description":"The percentage rate of the tax.","example":20,"isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].taxes.items.[INDEX].rate","typeLabel":"number"},"applied_to_organization":{"type":"boolean","deprecated":true,"description":"**Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.","example":true,"isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].taxes.items.[INDEX].applied_to_organization","typeLabel":"boolean"},"created_at":{"type":"string","format":"date-time","description":"Creation date of the tax.","example":"2023-07-06T14:35:58Z","isRequired":true,"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].taxes.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"applied_to_billing_entities_codes":{"type":"array","items":{"type":"string","uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].taxes.items.[INDEX].applied_to_billing_entities_codes.items.[INDEX]","typeLabel":"string"},"description":"The codes of the billing entities the tax is applied to, sorted alphabetically. It is empty when the tax is only attached to customers. This field is only returned by the tax endpoints, not by taxes nested in another object.","example":["acme_corp","foo_bar"],"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].taxes.items.[INDEX].applied_to_billing_entities_codes","typeLabel":"string[]"}},"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].taxes.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX].taxes","typeLabel":"object[]"}},"uniqueKey":"subscription.plan.fixed_charges.items.[INDEX]","typeLabel":"object"},"example":[{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","lago_add_on_id":"2b802b80-2b80-2b80-2b80-2b802b802b80","code":"setup_fee","invoice_display_name":"Setup Fee","add_on_code":"setup","created_at":"2026-01-15T10:30:00Z","charge_model":"standard","pay_in_advance":true,"prorated":false,"properties":{"amount":"500"},"units":"1.0","lago_parent_id":null,"taxes":[{"lago_id":"3c703c70-3c70-3c70-3c70-3c703c703c70","name":"VAT","code":"vat_20","rate":20,"description":"Standard VAT rate","applied_to_organization":true,"created_at":"2026-01-01T00:00:00Z"}]},{"lago_id":"4d604d60-4d60-4d60-4d60-4d604d604d60","lago_add_on_id":"5e505e50-5e50-5e50-5e50-5e505e505e50","code":"support_tier","invoice_display_name":"Support Tier","add_on_code":"premium_support","created_at":"2026-01-15T10:30:00Z","charge_model":"graduated","pay_in_advance":false,"prorated":true,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"per_unit_amount":"5","flat_amount":"200"},{"from_value":11,"to_value":null,"per_unit_amount":"1","flat_amount":"300"}]},"units":"1.0","lago_parent_id":null,"taxes":[]},{"lago_id":"6f406f40-6f40-6f40-6f40-6f406f406f40","lago_add_on_id":"7a307a30-7a30-7a30-7a30-7a307a307a30","code":"storage","invoice_display_name":"Storage Allocation","add_on_code":"cloud_storage","created_at":"2026-01-15T10:30:00Z","charge_model":"volume","pay_in_advance":false,"prorated":false,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"per_unit_amount":"2","flat_amount":"1"},{"from_value":101,"to_value":null,"per_unit_amount":"1","flat_amount":"0"}]},"units":"50.0","lago_parent_id":null,"taxes":[]}],"uniqueKey":"subscription.plan.fixed_charges","typeLabel":"object[]"},"taxes":{"type":"array","description":"All taxes applied to the plan.","items":{"type":"object","required":["lago_id","name","code","description","rate","applied_to_organization","created_at"],"properties":{"lago_id":{"type":"string","format":"uuid","description":"Unique identifier of the tax, created by Lago.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","isRequired":true,"uniqueKey":"subscription.plan.taxes.items.[INDEX].lago_id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","description":"Name of the tax.","example":"TVA","isRequired":true,"uniqueKey":"subscription.plan.taxes.items.[INDEX].name","typeLabel":"string"},"code":{"type":"string","description":"Unique code used to identify the tax associated with the API request.","example":"french_standard_vat","isRequired":true,"uniqueKey":"subscription.plan.taxes.items.[INDEX].code","typeLabel":"string"},"description":{"oneOf":[{"type":"string","description":"Internal description of the tax.","example":"French standard VAT","isRequired":true,"uniqueKey":"subscription.plan.taxes.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Internal description of the tax.","example":"French standard VAT","isRequired":true,"uniqueKey":"subscription.plan.taxes.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.taxes.items.[INDEX].description","typeLabel":"string | null"},"rate":{"type":"number","description":"The percentage rate of the tax.","example":20,"isRequired":true,"uniqueKey":"subscription.plan.taxes.items.[INDEX].rate","typeLabel":"number"},"applied_to_organization":{"type":"boolean","deprecated":true,"description":"**Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.","example":true,"isRequired":true,"uniqueKey":"subscription.plan.taxes.items.[INDEX].applied_to_organization","typeLabel":"boolean"},"created_at":{"type":"string","format":"date-time","description":"Creation date of the tax.","example":"2023-07-06T14:35:58Z","isRequired":true,"uniqueKey":"subscription.plan.taxes.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"applied_to_billing_entities_codes":{"type":"array","items":{"type":"string","uniqueKey":"subscription.plan.taxes.items.[INDEX].applied_to_billing_entities_codes.items.[INDEX]","typeLabel":"string"},"description":"The codes of the billing entities the tax is applied to, sorted alphabetically. It is empty when the tax is only attached to customers. This field is only returned by the tax endpoints, not by taxes nested in another object.","example":["acme_corp","foo_bar"],"uniqueKey":"subscription.plan.taxes.items.[INDEX].applied_to_billing_entities_codes","typeLabel":"string[]"}},"uniqueKey":"subscription.plan.taxes.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan.taxes","typeLabel":"object[]"},"usage_thresholds":{"type":"array","description":"List of usage thresholds applied to the plan.","items":{"type":"object","required":["lago_id","threshold_display_name","amount_cents","recurring","created_at","updated_at"],"properties":{"lago_id":{"type":"string","format":"uuid","description":"Unique identifier of the usage threshold created by Lago.","example":"1a901a90-1a90-1a90-1a90-1a901a901a90","isRequired":true,"uniqueKey":"subscription.plan.usage_thresholds.items.[INDEX].lago_id","typeLabel":"string\u003cuuid>"},"threshold_display_name":{"oneOf":[{"type":"string","description":"The display name of the usage threshold.","example":"Threshold 1","isRequired":true,"uniqueKey":"subscription.plan.usage_thresholds.items.[INDEX].threshold_display_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The display name of the usage threshold.","example":"Threshold 1","isRequired":true,"uniqueKey":"subscription.plan.usage_thresholds.items.[INDEX].threshold_display_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.usage_thresholds.items.[INDEX].threshold_display_name","typeLabel":"string | null"},"amount_cents":{"type":"integer","description":"The amount to reach to trigger a `progressive_billing` invoice.","example":10000,"isRequired":true,"uniqueKey":"subscription.plan.usage_thresholds.items.[INDEX].amount_cents","typeLabel":"integer"},"recurring":{"type":"boolean","description":"This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount.","example":true,"isRequired":true,"uniqueKey":"subscription.plan.usage_thresholds.items.[INDEX].recurring","typeLabel":"boolean"},"created_at":{"type":"string","format":"date-time","description":"The date and time when the usage threshold was created. It is expressed in UTC format according to the ISO 8601 datetime standard.","example":"2023-06-27T19:43:42Z","isRequired":true,"uniqueKey":"subscription.plan.usage_thresholds.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","description":"The date and time when the usage threshold was last updated. It is expressed in UTC format according to the ISO 8601 datetime standard.","example":"2023-06-27T19:43:42Z","isRequired":true,"uniqueKey":"subscription.plan.usage_thresholds.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"subscription.plan.usage_thresholds.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan.usage_thresholds","typeLabel":"object[]"},"applicable_usage_thresholds":{"type":"array","description":"List of usage thresholds that actually apply to the plan. For an overriding plan these are inherited from its parent plan; for a standard plan they match `usage_thresholds`. It is not returned in the plan webhooks.","items":{"type":"object","required":["threshold_display_name","amount_cents","recurring"],"properties":{"threshold_display_name":{"oneOf":[{"type":"string","description":"The display name of the usage threshold.","example":"Threshold 1","isRequired":true,"uniqueKey":"subscription.plan.applicable_usage_thresholds.items.[INDEX].threshold_display_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The display name of the usage threshold.","example":"Threshold 1","isRequired":true,"uniqueKey":"subscription.plan.applicable_usage_thresholds.items.[INDEX].threshold_display_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.applicable_usage_thresholds.items.[INDEX].threshold_display_name","typeLabel":"string | null"},"amount_cents":{"type":"integer","description":"The amount to reach to trigger a `progressive_billing` invoice.","example":10000,"isRequired":true,"uniqueKey":"subscription.plan.applicable_usage_thresholds.items.[INDEX].amount_cents","typeLabel":"integer"},"recurring":{"type":"boolean","description":"This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount.","example":true,"isRequired":true,"uniqueKey":"subscription.plan.applicable_usage_thresholds.items.[INDEX].recurring","typeLabel":"boolean"}},"uniqueKey":"subscription.plan.applicable_usage_thresholds.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan.applicable_usage_thresholds","typeLabel":"object[]"},"entitlements":{"type":"array","description":"List of all feature entitlements and their privileges available for this plan. It is not returned with the `plan.deleted` webhook, nor on the plan nested in a subscription.","items":{"type":"object","required":["entitlement"],"properties":{"entitlement":{"type":"object","required":["code","name","description","privileges"],"properties":{"code":{"type":"string","example":"seats","description":"Unique code used to identify the feature. Max 255 characters.","isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.code","typeLabel":"string"},"name":{"oneOf":[{"type":"string","example":"Number of seats","description":"Name of the feature. Max 255 characters.","isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.name.oneOf.0","typeLabel":"string"},{"type":"null","example":"Number of seats","description":"Name of the feature. Max 255 characters.","isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.name","typeLabel":"string | null"},"description":{"oneOf":[{"type":"string","example":"Number of users of the account","description":"Description of the feature. Max 600 characters.","isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.description.oneOf.0","typeLabel":"string"},{"type":"null","example":"Number of users of the account","description":"Description of the feature. Max 600 characters.","isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.description","typeLabel":"string | null"},"privileges":{"type":"array","items":{"type":"object","required":["value","code","name","value_type","config"],"properties":{"code":{"type":"string","example":"max","description":"Unique code for the privilege.","isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.privileges.items.[INDEX].code","typeLabel":"string"},"name":{"oneOf":[{"type":"string","example":"Maximum","description":"Display name for the privilege.","isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.privileges.items.[INDEX].name.oneOf.0","typeLabel":"string"},{"type":"null","example":"Maximum","description":"Display name for the privilege.","isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.privileges.items.[INDEX].name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.privileges.items.[INDEX].name","typeLabel":"string | null"},"value_type":{"type":"string","enum":["integer","boolean","string","select"],"example":"integer","description":"Data type of the privilege value. It defaults to `string`.","isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.privileges.items.[INDEX].value_type","typeLabel":"enum\u003cstring>"},"config":{"type":"object","description":"Extra configuration of the privilege. It is empty unless the value type is `select`.","properties":{"select_options":{"type":"array","items":{"type":"string","uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.privileges.items.[INDEX].config.select_options.items.[INDEX]","typeLabel":"string"},"example":["google","okta"],"description":"The values the privilege accepts. It is only sent when the value type is `select`.","uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.privileges.items.[INDEX].config.select_options","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.privileges.items.[INDEX].config","typeLabel":"object"},"value":{"oneOf":[{"type":"integer","description":"Value assigned to this privilege in the entitlement. Type depends on the privilege's value_type.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.privileges.items.[INDEX].value.oneOf.0","typeLabel":"integer"},{"type":"boolean","description":"Value assigned to this privilege in the entitlement. Type depends on the privilege's value_type.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.privileges.items.[INDEX].value.oneOf.1","typeLabel":"boolean"},{"type":"string","description":"Value assigned to this privilege in the entitlement. Type depends on the privilege's value_type.","example":10,"isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.privileges.items.[INDEX].value.oneOf.2","typeLabel":"string"}],"isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.privileges.items.[INDEX].value","typeLabel":"integer | boolean | string"}},"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.privileges.items.[INDEX]","typeLabel":"object"},"example":[{"code":"max","name":"Maximum","value_type":"integer","config":{},"value":10},{"code":"max_admins","name":"Max Admins","value_type":"integer","config":{},"value":5},{"code":"root","name":"Allow root user","value_type":"boolean","config":{},"value":true},{"code":"provider","name":"SSO Provider","value_type":"select","value":"google","config":{"select_options":["google","okta"]}}],"description":"Privileges associated with this feature. Each privilege must have a value assigned.","isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement.privileges","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"subscription.plan.entitlements.items.[INDEX].entitlement","typeLabel":"object"}},"uniqueKey":"subscription.plan.entitlements.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan.entitlements","typeLabel":"object[]"},"metadata":{"oneOf":[{"type":"object","description":"Custom metadata stored as key-value pairs.\nKeys are strings (max 100 characters), values can be strings (max 255 characters) or null.","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"subscription.plan.metadata.oneOf.0.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"subscription.plan.metadata.oneOf.0.additionalProperties.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.metadata.oneOf.0.additionalProperties","typeLabel":"string | null"},"example":{"external_id":"ext-123","synced_at":"2024-01-15","source":null},"uniqueKey":"subscription.plan.metadata.oneOf.0","typeLabel":"object"},{"type":"null","description":"Custom metadata stored as key-value pairs.\nKeys are strings (max 100 characters), values can be strings (max 255 characters) or null.","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"subscription.plan.metadata.oneOf.1.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"subscription.plan.metadata.oneOf.1.additionalProperties.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.metadata.oneOf.1.additionalProperties","typeLabel":"string | null"},"example":{"external_id":"ext-123","synced_at":"2024-01-15","source":null},"uniqueKey":"subscription.plan.metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.plan.metadata","typeLabel":"object | null"}},"uniqueKey":"subscription.plan","typeLabel":"object"},"applicable_usage_thresholds":{"type":"array","items":{"type":"object","required":["threshold_display_name","amount_cents","recurring"],"properties":{"threshold_display_name":{"oneOf":[{"type":"string","description":"The display name of the usage threshold.","example":"Threshold 1","isRequired":true,"uniqueKey":"subscription.applicable_usage_thresholds.items.[INDEX].threshold_display_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The display name of the usage threshold.","example":"Threshold 1","isRequired":true,"uniqueKey":"subscription.applicable_usage_thresholds.items.[INDEX].threshold_display_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.applicable_usage_thresholds.items.[INDEX].threshold_display_name","typeLabel":"string | null"},"amount_cents":{"type":"integer","description":"The amount to reach to trigger a `progressive_billing` invoice.","example":10000,"isRequired":true,"uniqueKey":"subscription.applicable_usage_thresholds.items.[INDEX].amount_cents","typeLabel":"integer"},"recurring":{"type":"boolean","description":"This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount.","example":true,"isRequired":true,"uniqueKey":"subscription.applicable_usage_thresholds.items.[INDEX].recurring","typeLabel":"boolean"}},"uniqueKey":"subscription.applicable_usage_thresholds.items.[INDEX]","typeLabel":"object"},"description":"List of usage thresholds applicable to this subscription. Not returned when terminating a subscription.","uniqueKey":"subscription.applicable_usage_thresholds","typeLabel":"object[]"},"entitlements":{"type":"array","items":{"type":"object","required":["code","name","description","privileges","overrides"],"properties":{"code":{"type":"string","example":"seats","description":"Unique code used to identify the feature. Max 255 characters.","isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].code","typeLabel":"string"},"name":{"oneOf":[{"type":"string","example":"Number of seats","description":"Name of the feature. Max 255 characters.","isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].name.oneOf.0","typeLabel":"string"},{"type":"null","example":"Number of seats","description":"Name of the feature. Max 255 characters.","isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].name","typeLabel":"string | null"},"description":{"oneOf":[{"type":"string","example":"Number of users of the account","description":"Description of the feature. Max 600 characters.","isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","example":"Number of users of the account","description":"Description of the feature. Max 600 characters.","isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].description","typeLabel":"string | null"},"privileges":{"type":"array","items":{"type":"object","required":["value","plan_value","override_value","code","name","value_type","config"],"properties":{"code":{"type":"string","example":"max","description":"Unique code for the privilege.","isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].code","typeLabel":"string"},"name":{"oneOf":[{"type":"string","example":"Maximum","description":"Display name for the privilege.","isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].name.oneOf.0","typeLabel":"string"},{"type":"null","example":"Maximum","description":"Display name for the privilege.","isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].name","typeLabel":"string | null"},"value_type":{"type":"string","enum":["integer","boolean","string","select"],"example":"integer","description":"Data type of the privilege value. It defaults to `string`.","isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].value_type","typeLabel":"enum\u003cstring>"},"config":{"type":"object","description":"Extra configuration of the privilege. It is empty unless the value type is `select`.","properties":{"select_options":{"type":"array","items":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].config.select_options.items.[INDEX]","typeLabel":"string"},"example":["google","okta"],"description":"The values the privilege accepts. It is only sent when the value type is `select`.","uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].config.select_options","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].config","typeLabel":"object"},"value":{"oneOf":[{"type":"integer","description":"Applicable value for this subscription (override_value if set, plan_value otherwise). Type depends on the privilege's value_type.","example":10,"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].value.oneOf.0","typeLabel":"integer"},{"type":"boolean","description":"Applicable value for this subscription (override_value if set, plan_value otherwise). Type depends on the privilege's value_type.","example":10,"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].value.oneOf.1","typeLabel":"boolean"},{"type":"string","description":"Applicable value for this subscription (override_value if set, plan_value otherwise). Type depends on the privilege's value_type.","example":10,"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].value.oneOf.2","typeLabel":"string"}],"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].value","typeLabel":"integer | boolean | string"},"plan_value":{"oneOf":[{"type":"integer","description":"Value assigned to this privilege in the plan. Type depends on the privilege's value_type. Null when the privilege only exists as a subscription override.","example":10,"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].plan_value.oneOf.0","typeLabel":"integer"},{"type":"boolean","description":"Value assigned to this privilege in the plan. Type depends on the privilege's value_type. Null when the privilege only exists as a subscription override.","example":10,"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].plan_value.oneOf.1","typeLabel":"boolean"},{"type":"string","description":"Value assigned to this privilege in the plan. Type depends on the privilege's value_type. Null when the privilege only exists as a subscription override.","example":10,"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].plan_value.oneOf.2","typeLabel":"string"},{"type":"null","description":"Value assigned to this privilege in the plan. Type depends on the privilege's value_type. Null when the privilege only exists as a subscription override.","example":10,"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].plan_value.oneOf.3","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].plan_value","typeLabel":"integer | boolean | string | null"},"override_value":{"oneOf":[{"type":"integer","description":"Value assigned to this subscription specifically. Type depends on the privilege's value_type. Null if no override is set.","example":10,"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].override_value.oneOf.0","typeLabel":"integer"},{"type":"boolean","description":"Value assigned to this subscription specifically. Type depends on the privilege's value_type. Null if no override is set.","example":10,"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].override_value.oneOf.1","typeLabel":"boolean"},{"type":"string","description":"Value assigned to this subscription specifically. Type depends on the privilege's value_type. Null if no override is set.","example":10,"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].override_value.oneOf.2","typeLabel":"string"},{"type":"null","description":"Value assigned to this subscription specifically. Type depends on the privilege's value_type. Null if no override is set.","example":10,"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].override_value.oneOf.3","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX].override_value","typeLabel":"integer | boolean | string | null"}},"uniqueKey":"subscription.entitlements.items.[INDEX].privileges.items.[INDEX]","typeLabel":"object"},"example":[{"code":"max","name":"Maximum","value_type":"integer","config":{},"value":15,"plan_value":10,"override_value":15},{"code":"max_admins","name":"Max Admins","value_type":"integer","config":{},"value":5,"plan_value":5,"override_value":null},{"code":"root","name":"Allow root user","value_type":"boolean","config":{},"value":true,"plan_value":true,"override_value":null},{"code":"provider","name":"SSO Provider","value_type":"select","value":"okta","plan_value":"google","override_value":"okta","config":{"select_options":["google","okta"]}}],"description":"Privileges associated with this feature. Each privilege shows the plan value and any subscription override.","isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].privileges","typeLabel":"object[]"},"overrides":{"type":"object","additionalProperties":true,"example":{"max":15,"provider":"okta"},"description":"Privilege values set on this subscription only. Each key is a privilege code and each value is the subscription override. Privileges that use the plan value are not listed.","isRequired":true,"uniqueKey":"subscription.entitlements.items.[INDEX].overrides","typeLabel":"object"}},"uniqueKey":"subscription.entitlements.items.[INDEX]","typeLabel":"object"},"description":"The feature entitlements of the subscription. Only returned when creating or retrieving a subscription.","uniqueKey":"subscription.entitlements","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"subscription","typeLabel":"object"},"authorization":{"type":"object","description":"The Stripe payment intent created for the pre-authorization. Only returned when creating a subscription with an `authorization` payload.\n","required":["id","object","amount","amount_capturable","status"],"properties":{"id":{"type":"string","example":"pi_1a901a901a901a901a901a90","description":"The identifier of the Stripe payment intent.","isRequired":true,"uniqueKey":"authorization.id","typeLabel":"string"},"object":{"type":"string","example":"payment_intent","description":"The Stripe object type. Always `payment_intent`.","isRequired":true,"uniqueKey":"authorization.object","typeLabel":"string"},"amount":{"type":"integer","example":5000,"description":"The authorized amount, in cents.","isRequired":true,"uniqueKey":"authorization.amount","typeLabel":"integer"},"amount_capturable":{"type":"integer","example":5000,"description":"The amount that can still be captured from the authorization, in cents.","isRequired":true,"uniqueKey":"authorization.amount_capturable","typeLabel":"integer"},"status":{"type":"string","example":"requires_capture","description":"The status of the Stripe payment intent. `requires_capture` means the amount is held and about to be released. `requires_action` means 3D Secure was requested, and the subscription is still created.","isRequired":true,"uniqueKey":"authorization.status","typeLabel":"string"}},"uniqueKey":"authorization","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"subscription":{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","external_id":"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba","lago_customer_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","external_customer_id":"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba","billing_time":"anniversary","name":"Repository A","plan_code":"premium","plan_amount_cents":10000,"plan_amount_currency":"USD","status":"active","created_at":"2022-08-08T00:00:00Z","canceled_at":"2022-09-14T16:35:31Z","started_at":"2022-08-08T00:00:00Z","ending_at":"2022-10-08T00:00:00Z","subscription_at":"2022-08-08T00:00:00Z","terminated_at":"2022-09-14T16:35:31Z","previous_plan_code":null,"next_plan_code":null,"downgrade_plan_date":"2022-04-30","trial_ended_at":"2022-08-08T00:00:00Z","current_billing_period_started_at":"2022-08-08T00:00:00Z","current_billing_period_ending_at":"2022-09-08T00:00:00Z","on_termination_credit_note":"credit","on_termination_invoice":"generate","payment_method":{"payment_method_type":"provider","payment_method_id":"1a901a90-1a90-1a90-1a90-1a901a901a90"},"consolidate_invoice":true,"progressive_billing_disabled":false,"cancellation_reason":"payment_failed","activated_at":"2022-08-08T00:00:00Z","activation_rules":[{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","type":"payment","timeout_hours":48,"status":"pending","expires_at":"2022-08-10T00:00:00Z","created_at":"2022-08-08T00:00:00Z","updated_at":"2022-08-08T00:00:00Z"}],"purchase_order_number":"PO-123","billing_entity_code":"default","applied_invoice_custom_sections":[{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","created_at":"2023-07-06T14:35:58Z","invoice_custom_section":{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","name":"EU Bank Details","code":"eu_bank_details","description":"This section contains the bank details for EU customers.","details":"Bank Name: Lago Bank, IBAN: FR7630004000031234567890143","display_name":"Bank Details:","applied_to_organization":true,"organization_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","created_at":"2023-07-06T14:35:58Z"},"invoice_custom_section_id":"1a901a90-1a90-1a90-1a90-1a901a901a90"}],"plan":{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","name":"Startup","created_at":"2023-06-27T19:43:42Z","code":"startup","interval":"monthly","amount_cents":10000,"amount_currency":"USD","invoice_display_name":"Startup plan","description":"Plan for early stage startups.","trial_period":5,"pay_in_advance":true,"bill_charges_monthly":null,"bill_fixed_charges_monthly":null,"parent_id":null,"pending_deletion":false,"minimum_commitment":{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":100000,"created_at":"2022-04-29T08:59:51Z","plan_code":"premium","invoice_display_name":"Minimum Commitment (C1)","interval":"monthly","updated_at":"2022-04-29T08:59:51Z","taxes":[{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","name":"TVA","code":"french_standard_vat","description":"French standard VAT","rate":20,"applied_to_organization":true,"created_at":"2023-07-06T14:35:58Z","applied_to_billing_entities_codes":["acme_corp","foo_bar"]}]},"charges":[{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","billable_metric_code":"requests","created_at":"2023-06-27T19:43:42Z","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","billable_metric_code":"cpu","created_at":"2023-06-27T19:43:42Z","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"},{"from_value":11,"to_value":null,"flat_amount":"0","per_unit_amount":"0.4"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","billable_metric_code":"seats","created_at":"2023-06-27T19:43:42Z","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{},"filters":[{"invoice_display_name":"Europe","properties":{"amount":"10"},"values":{"region":["Europe"]}},{"invoice_display_name":"USA","properties":{"amount":"5"},"values":{"region":["USA"]}},{"invoice_display_name":"Africa","properties":{"amount":"8"},"values":{"region":["Africa"]}}]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","billable_metric_code":"storage","created_at":"2023-06-27T19:43:42Z","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","billable_metric_code":"payments","created_at":"2023-06-27T19:43:42Z","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"filters":[]}],"fixed_charges":[{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","lago_add_on_id":"2b802b80-2b80-2b80-2b80-2b802b802b80","code":"setup_fee","invoice_display_name":"Setup Fee","add_on_code":"setup","created_at":"2026-01-15T10:30:00Z","charge_model":"standard","pay_in_advance":true,"prorated":false,"properties":{"amount":"500"},"units":"1.0","lago_parent_id":null,"taxes":[{"lago_id":"3c703c70-3c70-3c70-3c70-3c703c703c70","name":"VAT","code":"vat_20","rate":20,"description":"Standard VAT rate","applied_to_organization":true,"created_at":"2026-01-01T00:00:00Z"}]},{"lago_id":"4d604d60-4d60-4d60-4d60-4d604d604d60","lago_add_on_id":"5e505e50-5e50-5e50-5e50-5e505e505e50","code":"support_tier","invoice_display_name":"Support Tier","add_on_code":"premium_support","created_at":"2026-01-15T10:30:00Z","charge_model":"graduated","pay_in_advance":false,"prorated":true,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"per_unit_amount":"5","flat_amount":"200"},{"from_value":11,"to_value":null,"per_unit_amount":"1","flat_amount":"300"}]},"units":"1.0","lago_parent_id":null,"taxes":[]},{"lago_id":"6f406f40-6f40-6f40-6f40-6f406f406f40","lago_add_on_id":"7a307a30-7a30-7a30-7a30-7a307a307a30","code":"storage","invoice_display_name":"Storage Allocation","add_on_code":"cloud_storage","created_at":"2026-01-15T10:30:00Z","charge_model":"volume","pay_in_advance":false,"prorated":false,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"per_unit_amount":"2","flat_amount":"1"},{"from_value":101,"to_value":null,"per_unit_amount":"1","flat_amount":"0"}]},"units":"50.0","lago_parent_id":null,"taxes":[]}],"taxes":[{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","name":"TVA","code":"french_standard_vat","description":"French standard VAT","rate":20,"applied_to_organization":true,"created_at":"2023-07-06T14:35:58Z","applied_to_billing_entities_codes":["acme_corp","foo_bar"]}],"usage_thresholds":[{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","threshold_display_name":"Threshold 1","amount_cents":10000,"recurring":true,"created_at":"2023-06-27T19:43:42Z","updated_at":"2023-06-27T19:43:42Z"}],"applicable_usage_thresholds":[{"threshold_display_name":"Threshold 1","amount_cents":10000,"recurring":true}],"entitlements":[{"entitlement":{"code":"seats","name":"Number of seats","description":"Number of users of the account","privileges":[{"code":"max","name":"Maximum","value_type":"integer","config":{},"value":10},{"code":"max_admins","name":"Max Admins","value_type":"integer","config":{},"value":5},{"code":"root","name":"Allow root user","value_type":"boolean","config":{},"value":true},{"code":"provider","name":"SSO Provider","value_type":"select","value":"google","config":{"select_options":["google","okta"]}}]}}],"metadata":{"external_id":"ext-123","synced_at":"2024-01-15","source":null}},"applicable_usage_thresholds":[{"threshold_display_name":"Threshold 1","amount_cents":10000,"recurring":true}],"entitlements":[{"code":"seats","name":"Number of seats","description":"Number of users of the account","privileges":[{"code":"max","name":"Maximum","value_type":"integer","config":{},"value":15,"plan_value":10,"override_value":15},{"code":"max_admins","name":"Max Admins","value_type":"integer","config":{},"value":5,"plan_value":5,"override_value":null},{"code":"root","name":"Allow root user","value_type":"boolean","config":{},"value":true,"plan_value":true,"override_value":null},{"code":"provider","name":"SSO Provider","value_type":"select","value":"okta","plan_value":"google","override_value":"okta","config":{"select_options":["google","okta"]}}],"overrides":{"max":15,"provider":"okta"}}]},"authorization":{"id":"pi_1a901a901a901a901a901a90","object":"payment_intent","amount":5000,"amount_capturable":5000,"status":"requires_capture"}}}},"exampleType":"generated"}},"exampleType":"generated"},"f2c0a828-321f-4517-af8e-9056e3b41371":{"description":"Bad Request error","content":{"application/json":{"schema":{"type":"object","required":["status","error"],"properties":{"status":{"type":"integer","format":"int32","example":400,"isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"error":{"type":"string","example":"Bad request","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":400,"error":"Bad request"}}},"exampleType":"generated"}},"exampleType":"generated"},"446f9c47-757e-4f42-b4ce-ad7cea857f89":{"description":"Unauthorized error","content":{"application/json":{"schema":{"type":"object","required":["status","error"],"properties":{"status":{"type":"integer","format":"int32","example":401,"isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"error":{"type":"string","example":"Unauthorized","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":401,"error":"Unauthorized"}}},"exampleType":"generated"}},"exampleType":"generated"},"28a8a2dd-a176-4d74-974f-704d24276680":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["status","error","code"],"properties":{"status":{"type":"integer","format":"int32","example":403,"isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"error":{"type":"string","example":"Forbidden","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","example":"feature_unavailable","isRequired":true,"uniqueKey":"code","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":403,"error":"Forbidden","code":"feature_unavailable"}}},"exampleType":"generated"}},"exampleType":"generated"},"7e75f6ce-1705-4ae1-b16c-7ceafefd42c1":{"description":"Not Found error","content":{"application/json":{"schema":{"type":"object","required":["status","error","code"],"properties":{"status":{"type":"integer","format":"int32","example":404,"isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"error":{"type":"string","example":"Not Found","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","example":"object_not_found","isRequired":true,"uniqueKey":"code","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":404,"error":"Not Found","code":"object_not_found"}}},"exampleType":"generated"}},"exampleType":"generated"},"0f8a3733-5fe2-4198-ab60-52dde32da059":{"description":"Not Allowed error","content":{"application/json":{"schema":{"type":"object","required":["status","error","code"],"properties":{"status":{"type":"integer","format":"int32","example":405,"isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"error":{"type":"string","example":"Method Not Allowed","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","example":"not_allowed","isRequired":true,"uniqueKey":"code","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":405,"error":"Method Not Allowed","code":"not_allowed"}}},"exampleType":"generated"}},"exampleType":"generated"},"e220222c-7ef8-43bc-b64f-1e7a5bf107a5":{"description":"Unprocessable entity error","content":{"application/json":{"schema":{"type":"object","required":["status","error","code","error_details"],"properties":{"status":{"type":"integer","format":"int32","example":422,"isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"error":{"type":"string","example":"Unprocessable entity","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","example":"validation_errors","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"error_details":{"type":"object","isRequired":true,"uniqueKey":"error_details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":422,"error":"Unprocessable entity","code":"validation_errors","error_details":{}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"aae89aa6-f2f4-456e-aa86-a75b959523a6":{"bearerAuth":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"5a8c5435-53db-4536-8bd9-2abb9207dc60":{"url":"https://api.getlago.com/api/v1","description":"US Lago cluster"},"4644862a-d12e-469e-afb7-141956940823":{"url":"https://api.eu.getlago.com/api/v1","description":"EU Lago cluster"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"https://swagger.getlago.com/openapi.yaml"},"subdomain":"lago-docs","siteName":"Lago","title":"Update a subscription - Lago","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-28T09:36:38.983Z","originalFileLocation":"api-reference/subscriptions/update.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=\"This endpoint allows you to update a subscription.\">\u003cmeta data-mint-head name=\"keywords\" content=\"Lago API, billing API, usage metering API, OpenAPI, billing SDK, Lago MCP\">\u003cmeta data-mint-head name=\"application-name\" content=\"Lago\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update a subscription - Lago\">\u003cmeta data-mint-head property=\"og:description\" content=\"This endpoint allows you to update a subscription.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Lago\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://getlago.com/docs/api-reference/subscriptions/update\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lago-docs.mintlify.app/_mintlify/api/og/v2?division=Subscriptions\u0026amp;title=Update+a+subscription\u0026amp;description=This+endpoint+allows+you+to+update+a+subscription.\u0026amp;theme=eb987f771609ccd12d360d11\u0026amp;signature=bf8c5c0b140decd402864300cda29fa6b8b758d9142583b9fbc4d7f1d3825598\">\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 - Lago\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"This endpoint allows you to update a subscription.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lago-docs.mintlify.app/_mintlify/api/og/v2?division=Subscriptions\u0026amp;title=Update+a+subscription\u0026amp;description=This+endpoint+allows+you+to+update+a+subscription.\u0026amp;theme=eb987f771609ccd12d360d11\u0026amp;signature=bf8c5c0b140decd402864300cda29fa6b8b758d9142583b9fbc4d7f1d3825598\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Lago\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#006CFA\">\u003clink data-mint-head rel=\"canonical\" href=\"https://getlago.com/docs/api-reference/subscriptions/update\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/subscriptions/update.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://getlago.com/#organization\",\"name\":\"Lago\",\"legalName\":\"Get Lago Corp.\",\"url\":\"https://getlago.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://getlago.com/docs/logo/light.svg\"},\"sameAs\":[\"https://github.com/getlago\",\"https://www.linkedin.com/company/getlago\",\"https://x.com/GetLago\",\"https://www.youtube.com/channel/UCp6ltp7n3SgDVsmerJ7O7ZA\"]},{\"@type\":\"WebSite\",\"@id\":\"https://getlago.com/docs#website\",\"name\":\"Lago\",\"url\":\"https://getlago.com/docs\",\"publisher\":{\"@id\":\"https://getlago.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://getlago.com/docs/api-reference/subscriptions/update#webpage\",\"url\":\"https://getlago.com/docs/api-reference/subscriptions/update\",\"name\":\"Update a subscription\",\"description\":\"This endpoint allows you to update a subscription.\",\"dateModified\":\"2026-01-28T09:36:38.983Z\",\"isPartOf\":{\"@id\":\"https://getlago.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://getlago.com/docs/api-reference/subscriptions/update#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://getlago.com/docs/api-reference/subscriptions/update#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://getlago.com/docs/api-reference/intro\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Subscriptions\",\"item\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Update a subscription\",\"item\":\"https://getlago.com/docs/api-reference/subscriptions/update\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://getlago.com/docs/api-reference/subscriptions/update#apireference\",\"headline\":\"Update a subscription\",\"name\":\"Update a subscription\",\"description\":\"This endpoint allows you to update a subscription.\",\"url\":\"https://getlago.com/docs/api-reference/subscriptions/update\",\"mainEntityOfPage\":{\"@id\":\"https://getlago.com/docs/api-reference/subscriptions/update#webpage\"},\"dateModified\":\"2026-01-28T09:36:38.983Z\",\"publisher\":{\"@id\":\"https://getlago.com/#organization\"},\"isPartOf\":{\"@id\":\"https://getlago.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Lago\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Lago","nav":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://getlago.com/blog"},{"anchor":"Community","icon":"slack","href":"https://getlago.com/slack"},{"anchor":"GitHub","icon":"github","href":"https://github.com/getlago/lago"},{"anchor":"Status","icon":"signal-bars","href":"https://status.getlago.com/"}]},"tabs":[{"tab":"Home","pages":[{"title":"Home","href":"/welcome"}]},{"tab":"Guide","pages":[{"title":"Guide","href":"/guide/introduction/welcome-to-lago"}]},{"tab":"API References","groups":[{"group":"API Reference","pages":[{"group":"Getting started","pages":[{"title":"Introduction","href":"/api-reference/intro"},{"title":"API standards","href":"/api-reference/api-standards"},{"title":"API versioning and deprecation policy","href":"/api-reference/versioning"},{"title":"Errors","href":"/api-reference/errors"},{"title":"Pagination","href":"/api-reference/pagination"},{"title":"Rate limits","href":"/api-reference/rate-limits"}]},{"group":"Add-ons","pages":[{"title":"The add-on object","href":"/api-reference/add-ons/add-on-object"},{"openapi":"POST /add_ons","title":"Create an add-on","href":"/api-reference/add-ons/create"},{"openapi":"PUT /add_ons/{code}","title":"Update an add-on","href":"/api-reference/add-ons/update"},{"openapi":"DELETE /add_ons/{code}","title":"Delete an add-on","href":"/api-reference/add-ons/destroy"},{"openapi":"GET /add_ons/{code}","title":"Retrieve an add-on","href":"/api-reference/add-ons/get-specific"},{"openapi":"GET /add_ons","title":"List all add-ons","href":"/api-reference/add-ons/get-all"}]},{"group":"Alerts","pages":[{"title":"The alert object","href":"/api-reference/alerts/alert-object"},{"openapi":"POST /subscriptions/{external_id}/alerts","title":"Create an alert","href":"/api-reference/alerts/create"},{"openapi":"PUT /subscriptions/{external_id}/alerts/{code}","title":"Update an alert","href":"/api-reference/alerts/update"},{"openapi":"DELETE /subscriptions/{external_id}/alerts/{code}","title":"Delete an alert","href":"/api-reference/alerts/delete"},{"openapi":"GET /subscriptions/{external_id}/alerts/{code}","title":"Retrieve an alert","href":"/api-reference/alerts/get-specific"},{"openapi":"GET /subscriptions/{external_id}/alerts","title":"List all alerts","href":"/api-reference/alerts/get-all"}]},{"group":"Audit logs","pages":[{"title":"The activity log object","href":"/api-reference/audit-logs/activity-logs-object"},{"openapi":"GET /activity_logs","title":"List all activity logs","href":"/api-reference/audit-logs/get-all-activity-logs"},{"openapi":"GET /activity_logs/{activity_id}","title":"Retrieve an activity log","href":"/api-reference/audit-logs/get-specific-activity-log"},{"title":"The API log object","href":"/api-reference/audit-logs/api-logs-object"},{"openapi":"GET /api_logs","title":"List all API logs","href":"/api-reference/audit-logs/get-all-api-logs"},{"openapi":"GET /api_logs/{request_id}","title":"Retrieve an API log","href":"/api-reference/audit-logs/get-specific-api-log"}]},{"group":"Billable metrics","pages":[{"title":"The billable metric object","href":"/api-reference/billable-metrics/object"},{"title":"Create a billable metric","openapi":"POST /billable_metrics","href":"/api-reference/billable-metrics/create"},{"title":"Update a billable metric","openapi":"PUT /billable_metrics/{code}","href":"/api-reference/billable-metrics/update"},{"openapi":"DELETE /billable_metrics/{code}","title":"Delete a billable metric","href":"/api-reference/billable-metrics/destroy"},{"openapi":"GET /billable_metrics/{code}","title":"Retrieve a billable metric","href":"/api-reference/billable-metrics/get-specific"},{"openapi":"GET /billable_metrics","title":"List all billable metrics","href":"/api-reference/billable-metrics/get-all"}]},{"group":"Billing entities","pages":[{"title":"The billing entity object","href":"/api-reference/billing-entities/object"},{"title":"Create a billing entity","openapi":"POST /billing_entities","href":"/api-reference/billing-entities/create"},{"title":"Update a billing entity","openapi":"PUT /billing_entities/{code}","href":"/api-reference/billing-entities/update"},{"title":"Retrieve a billing entity","openapi":"GET /billing_entities/{code}","href":"/api-reference/billing-entities/get-specific"},{"title":"List all billing entities","openapi":"GET /billing_entities","href":"/api-reference/billing-entities/get-all"}]},{"group":"Coupons","pages":[{"title":"The coupon object","href":"/api-reference/coupons/coupon-object"},{"openapi":"POST /coupons","title":"Create a coupon","href":"/api-reference/coupons/create"},{"openapi":"PUT /coupons/{code}","title":"Update a coupon","href":"/api-reference/coupons/update"},{"openapi":"DELETE /coupons/{code}","title":"Delete a coupon","href":"/api-reference/coupons/destroy"},{"openapi":"GET /coupons/{code}","title":"Retrieve a coupon","href":"/api-reference/coupons/get-specific"},{"openapi":"GET /coupons","title":"List all coupons","href":"/api-reference/coupons/get-all"},{"title":"The applied coupon object","href":"/api-reference/coupons/applied-coupon-object"},{"openapi":"POST /applied_coupons","title":"Apply a coupon","href":"/api-reference/coupons/apply"},{"openapi":"DELETE /customers/{external_customer_id}/applied_coupons/{applied_coupon_id}","title":"Delete an applied coupon","href":"/api-reference/coupons/destroy-applied-coupon"},{"openapi":"GET /applied_coupons","title":"List all applied coupons","href":"/api-reference/coupons/get-all-applied"}]},{"group":"Credit notes","pages":[{"title":"The credit note object","href":"/api-reference/credit-notes/credit-note-object"},{"openapi":"POST /credit_notes/estimate","title":"Estimate a credit note","href":"/api-reference/credit-notes/estimate"},{"openapi":"POST /credit_notes","title":"Create a credit note","href":"/api-reference/credit-notes/create"},{"openapi":"POST /credit_notes/{lago_id}/download","title":"Download a credit note","href":"/api-reference/credit-notes/download"},{"openapi":"PUT /credit_notes/{lago_id}","title":"Update a credit note","href":"/api-reference/credit-notes/update"},{"openapi":"PUT /credit_notes/{lago_id}/void","title":"Void available credit","href":"/api-reference/credit-notes/void"},{"openapi":"GET /credit_notes/{lago_id}","title":"Retrieve a credit note","href":"/api-reference/credit-notes/get-specific"},{"openapi":"GET /credit_notes","title":"List all credit notes","href":"/api-reference/credit-notes/get-all"},{"group":"Metadata","pages":[{"openapi":"POST /credit_notes/{lago_id}/metadata","title":"Replace all metadata","href":"/api-reference/credit-notes/metadata/create-metadata-cn"},{"openapi":"PATCH /credit_notes/{lago_id}/metadata","title":"Update metadata","href":"/api-reference/credit-notes/metadata/update-metadata-cn"},{"openapi":"DELETE /credit_notes/{lago_id}/metadata/{key}","title":"Delete a metadata","href":"/api-reference/credit-notes/metadata/delete-a-metadata-cn"},{"openapi":"DELETE /credit_notes/{lago_id}/metadata","title":"Delete all metadata","href":"/api-reference/credit-notes/metadata/delete-all-metadata-cn"}]}]},{"group":"Customer usage","pages":[{"title":"The customer usage object","href":"/api-reference/customer-usage/customer-usage-object"},{"openapi":"GET /analytics/usage","title":"Retrieve usages","href":"/api-reference/customer-usage/usages"},{"openapi":"GET /customers/{external_customer_id}/current_usage","title":"Retrieve current usage","href":"/api-reference/customer-usage/get-current"},{"openapi":"GET /customers/{external_customer_id}/projected_usage","title":"Retrieve projected usage","href":"/api-reference/customer-usage/get-projected"},{"openapi":"GET /customers/{external_customer_id}/past_usage","title":"Retrieve past usage","href":"/api-reference/customer-usage/get-past"}]},{"group":"Customers","pages":[{"title":"The customer object","href":"/api-reference/customers/object"},{"openapi":"POST /customers","title":"Create a customer","href":"/api-reference/customers/create"},{"openapi":"POST /customers","title":"Update a customer","href":"/api-reference/customers/update"},{"openapi":"POST /customers/{external_customer_id}/checkout_url","title":"Regenerate checkout URL","href":"/api-reference/customers/psp-checkout-url"},{"openapi":"DELETE /customers/{external_customer_id}","title":"Delete a customer","href":"/api-reference/customers/delete"},{"openapi":"GET /customers/{external_customer_id}","title":"Retrieve a customer","href":"/api-reference/customers/get-specific"},{"openapi":"GET /customers","title":"List all customers","href":"/api-reference/customers/get-all"},{"openapi":"GET /customers/{external_customer_id}/portal_url","title":"Retrieve customer portal URL","href":"/api-reference/customers/customer-portal"}]},{"group":"Entitlements","pages":[{"title":"The feature object","href":"/api-reference/entitlements/features/feature-object"},{"openapi":"POST /features","title":"Create a feature","href":"/api-reference/entitlements/features/create-feature"},{"openapi":"PUT /features/{code}","title":"Update a feature","href":"/api-reference/entitlements/features/update-feature"},{"openapi":"DELETE /features/{code}","title":"Delete a feature","href":"/api-reference/entitlements/features/delete-feature"},{"openapi":"DELETE /features/{code}/privileges/{privilege_code}","title":"Delete a feature privilege","href":"/api-reference/entitlements/features/delete-privilege"},{"openapi":"GET /features/{code}","title":"Retrieve a feature","href":"/api-reference/entitlements/features/get-feature"},{"openapi":"GET /features","title":"List all features","href":"/api-reference/entitlements/features/get-all-features"},{"title":"The plan entitlement object","href":"/api-reference/entitlements/plan-entitlements/plan-entitlement-object"},{"openapi":"POST /plans/{code}/entitlements","title":"Create plan entitlements","href":"/api-reference/entitlements/plan-entitlements/create-plan-entitlement"},{"openapi":"PATCH /plans/{code}/entitlements","title":"Update plan entitlements","href":"/api-reference/entitlements/plan-entitlements/update-plan-entitlement"},{"openapi":"DELETE /plans/{code}/entitlements/{feature_code}","title":"Delete a plan entitlement","href":"/api-reference/entitlements/plan-entitlements/delete-plan-entitlement"},{"openapi":"DELETE /plans/{code}/entitlements/{feature_code}/privileges/{privilege_code}","title":"Delete a plan entitlement privilege","href":"/api-reference/entitlements/plan-entitlements/delete-plan-entitlement-privilege"},{"openapi":"GET /plans/{code}/entitlements/{feature_code}","title":"Retrieve a plan entitlement","href":"/api-reference/entitlements/plan-entitlements/get-specific-plan-entitlement"},{"openapi":"GET /plans/{code}/entitlements","title":"List plan entitlements","href":"/api-reference/entitlements/plan-entitlements/get-all-plan-entitlements"},{"title":"The subscription entitlement object","href":"/api-reference/entitlements/subscription-entitlements/subscription-entitlement-object"},{"openapi":"PATCH /subscriptions/{external_id}/entitlements","title":"Update subscription entitlements","href":"/api-reference/entitlements/subscription-entitlements/update-subscription-entitlement"},{"openapi":"DELETE /subscriptions/{external_id}/entitlements/{feature_code}","title":"Delete a subscription entitlement","href":"/api-reference/entitlements/subscription-entitlements/delete-subscription-entitlement"},{"openapi":"DELETE /subscriptions/{external_id}/entitlements/{feature_code}/privileges/{privilege_code}","title":"Delete a subscription entitlement privilege","href":"/api-reference/entitlements/subscription-entitlements/delete-subscription-entitlement-privilege"},{"openapi":"GET /subscriptions/{external_id}/entitlements","title":"List subscription entitlements","href":"/api-reference/entitlements/subscription-entitlements/get-all-subscription-entitlements"}]},{"group":"Events","pages":[{"title":"The event object","href":"/api-reference/events/event-object"},{"openapi":"POST /events","title":"Send usage event","href":"/api-reference/events/usage"},{"openapi":"POST /events/batch","title":"Batch usage events","href":"/api-reference/events/batch"},{"openapi":"POST /events/estimate_fees","title":"Estimate an upcoming fee","href":"/api-reference/events/estimated-fee"},{"openapi":"GET /events/{transaction_id}","title":"Retrieve an event","href":"/api-reference/events/get-specific"},{"openapi":"GET /events","title":"List all events","href":"/api-reference/events/list-events"}]},{"group":"Fees","pages":[{"title":"The fee object","href":"/api-reference/fees/fee-object"},{"openapi":"PUT /fees/{lago_id}","title":"Update a fee","href":"/api-reference/fees/update-fee"},{"openapi":"DELETE /fees/{lago_id}","title":"Delete a fee","href":"/api-reference/fees/destroy-fee"},{"openapi":"GET /fees/{lago_id}","title":"Retrieve a fee","href":"/api-reference/fees/retrieve-fee"},{"openapi":"GET /fees","title":"List all fees","href":"/api-reference/fees/list-fees"}]},{"group":"Invoices","pages":[{"title":"The invoice object","href":"/api-reference/invoices/invoice-object"},{"openapi":"POST /invoices","title":"Create a one-off invoice","href":"/api-reference/invoices/create-oneoff"},{"openapi":"POST /invoices/preview","title":"Preview an invoice","href":"/api-reference/invoices/preview"},{"openapi":"POST /invoices/{lago_id}/download","title":"Download an invoice","href":"/api-reference/invoices/download"},{"openapi":"POST /invoices/{lago_id}/void","title":"Void an invoice","href":"/api-reference/invoices/void"},{"openapi":"POST /invoices/{lago_id}/retry","title":"Retry an invoice finalization","href":"/api-reference/invoices/retry_finalization"},{"openapi":"POST /invoices/{lago_id}/retry_payment","title":"Retry an invoice payment","href":"/api-reference/invoices/retry"},{"openapi":"POST /invoices/{lago_id}/payment_url","title":"Generate a payment URL","href":"/api-reference/invoices/payment-url"},{"openapi":"PUT /invoices/{lago_id}/refresh","title":"Refresh an invoice","href":"/api-reference/invoices/refresh"},{"openapi":"PUT /invoices/{lago_id}/finalize","title":"Finalize an invoice","href":"/api-reference/invoices/finalize"},{"openapi":"PUT /invoices/{lago_id}","title":"Update an invoice","href":"/api-reference/invoices/update"},{"openapi":"GET /invoices/{lago_id}","title":"Retrieve an invoice","href":"/api-reference/invoices/get-specific"},{"openapi":"GET /invoices","title":"List all invoices","href":"/api-reference/invoices/get-all"}]},{"group":"Organizations","pages":[{"title":"The organization object","href":"/api-reference/organizations/organization-object"},{"openapi":"PUT /organizations","title":"Update organization (deprecated)","href":"/api-reference/organizations/update"}]},{"group":"Payments","pages":[{"title":"The payment object","href":"/api-reference/payments/payment-object"},{"title":"Create a payment","openapi":"POST /payments","href":"/api-reference/payments/create"},{"title":"Retrieve a payment","openapi":"GET /payments/{lago_id}","href":"/api-reference/payments/get-specific"},{"title":"List all payments","openapi":"GET /payments","href":"/api-reference/payments/get-all"}]},{"group":"Payment methods","pages":[{"title":"The payment method object","href":"/api-reference/payment-methods/payment-method-object"},{"openapi":"PUT /customers/{external_customer_id}/payment_methods/{lago_id}/set_as_default","title":"Update a payment method","href":"/api-reference/payment-methods/update"},{"openapi":"DELETE /customers/{external_customer_id}/payment_methods/{lago_id}","title":"Delete a payment method from a customer","href":"/api-reference/payment-methods/delete"},{"openapi":"GET /customers/{external_customer_id}/payment_methods","title":"List all payment methods for a customer","href":"/api-reference/payment-methods/get-all"}]},{"group":"Payment receipts","pages":[{"title":"The payment receipt object","href":"/api-reference/payment-receipts/payment-receipt-object"},{"openapi":"GET /payment_receipts/{lago_id}","title":"Retrieve a payment receipt","href":"/api-reference/payment-receipts/get-specific"},{"openapi":"GET /payment_receipts","title":"List all payment receipts","href":"/api-reference/payment-receipts/get-all"}]},{"group":"Payment requests","pages":[{"title":"The payment request object","href":"/api-reference/payment-requests/payment-request-object"},{"title":"Create a payment request","openapi":"POST /payment_requests","href":"/api-reference/payment-requests/create"},{"title":"List all payment requests","openapi":"GET /payment_requests","href":"/api-reference/payment-requests/get-all"}]},{"group":"Plans","pages":[{"title":"The plan object","href":"/api-reference/plans/object"},{"title":"Create a plan","openapi":"POST /plans","href":"/api-reference/plans/create"},{"title":"Update a plan","openapi":"PUT /plans/{code}","href":"/api-reference/plans/update"},{"openapi":"DELETE /plans/{code}","title":"Delete a plan","href":"/api-reference/plans/destroy"},{"openapi":"GET /plans/{code}","title":"Retrieve a plan","href":"/api-reference/plans/get-specific"},{"openapi":"GET /plans","title":"List all plans","href":"/api-reference/plans/get-all-plans"},{"group":"Charges","pages":[{"title":"The charge object","href":"/api-reference/plans/charges/object"},{"title":"Create a charge","openapi":"POST /plans/{code}/charges","href":"/api-reference/plans/charges/create"},{"title":"Update a charge","openapi":"PUT /plans/{code}/charges/{charge_code}","href":"/api-reference/plans/charges/update"},{"title":"Delete a charge","openapi":"DELETE /plans/{code}/charges/{charge_code}","href":"/api-reference/plans/charges/destroy"},{"title":"Retrieve a charge","openapi":"GET /plans/{code}/charges/{charge_code}","href":"/api-reference/plans/charges/get-specific"},{"title":"List all charges","openapi":"GET /plans/{code}/charges","href":"/api-reference/plans/charges/get-all"},{"group":"Filters","pages":[{"title":"The charge filter object","href":"/api-reference/plans/charges/filters/object"},{"title":"Create a charge filter","openapi":"POST /plans/{code}/charges/{charge_code}/filters","href":"/api-reference/plans/charges/filters/create"},{"title":"Update a charge filter","openapi":"PUT /plans/{code}/charges/{charge_code}/filters/{filter_id}","href":"/api-reference/plans/charges/filters/update"},{"title":"Delete a charge filter","openapi":"DELETE /plans/{code}/charges/{charge_code}/filters/{filter_id}","href":"/api-reference/plans/charges/filters/destroy"},{"title":"Retrieve a charge filter","openapi":"GET /plans/{code}/charges/{charge_code}/filters/{filter_id}","href":"/api-reference/plans/charges/filters/get-specific"},{"title":"List all charge filters","openapi":"GET /plans/{code}/charges/{charge_code}/filters","href":"/api-reference/plans/charges/filters/get-all"}]}]},{"group":"Fixed Charges","pages":[{"title":"The fixed charge object","href":"/api-reference/plans/fixed-charges/object"},{"title":"Create a fixed charge","openapi":"POST /plans/{code}/fixed_charges","href":"/api-reference/plans/fixed-charges/create"},{"title":"Update a fixed charge","openapi":"PUT /plans/{code}/fixed_charges/{fixed_charge_code}","href":"/api-reference/plans/fixed-charges/update"},{"title":"Delete a fixed charge","openapi":"DELETE /plans/{code}/fixed_charges/{fixed_charge_code}","href":"/api-reference/plans/fixed-charges/destroy"},{"title":"Retrieve a fixed charge","openapi":"GET /plans/{code}/fixed_charges/{fixed_charge_code}","href":"/api-reference/plans/fixed-charges/get-specific"},{"title":"List all fixed charges","openapi":"GET /plans/{code}/fixed_charges","href":"/api-reference/plans/fixed-charges/get-all"}]}]},{"group":"Quotes \u0026 Order forms","pages":[{"group":"Quotes","pages":[{"title":"The quote object","href":"/api-reference/quotes/quote-object"},{"title":"The quote version object","href":"/api-reference/quotes/quote-version-object"},{"openapi":"POST /quote_versions/{lago_id}/approve","title":"Approve a quote version","href":"/api-reference/quotes/approve-version"},{"openapi":"POST /quote_versions/{lago_id}/void","title":"Void a quote version","href":"/api-reference/quotes/void-version"},{"openapi":"POST /quote_versions/{lago_id}/clone","title":"Clone a quote version","href":"/api-reference/quotes/clone-version"},{"openapi":"GET /quotes/{lago_id}","title":"Retrieve a quote","href":"/api-reference/quotes/get-specific"},{"openapi":"GET /quotes","title":"List all quotes","href":"/api-reference/quotes/get-all"},{"openapi":"GET /quote_versions/{lago_id}","title":"Retrieve a quote version","href":"/api-reference/quotes/get-specific-version"},{"openapi":"GET /quotes/{lago_id}/versions","title":"List all versions of a quote","href":"/api-reference/quotes/get-all-versions"}]},{"group":"Order forms","pages":[{"title":"The order form object","href":"/api-reference/quotes/order-forms/order-form-object"},{"openapi":"POST /order_forms/{lago_id}/mark_as_signed","title":"Mark an order form as signed","href":"/api-reference/quotes/order-forms/mark-as-signed"},{"openapi":"POST /order_forms/{lago_id}/void","title":"Void an order form","href":"/api-reference/quotes/order-forms/void"},{"openapi":"GET /order_forms/{lago_id}","title":"Retrieve an order form","href":"/api-reference/quotes/order-forms/get-specific"},{"openapi":"GET /order_forms","title":"List all order forms","href":"/api-reference/quotes/order-forms/get-all"}]},{"group":"Orders","pages":[{"title":"The order object","href":"/api-reference/quotes/orders/order-object"},{"openapi":"POST /orders/{lago_id}/execute","title":"Execute an order","href":"/api-reference/quotes/orders/execute"},{"openapi":"GET /orders/{lago_id}","title":"Retrieve an order","href":"/api-reference/quotes/orders/get-specific"},{"openapi":"GET /orders","title":"List all orders","href":"/api-reference/quotes/orders/get-all"}]}]},{"group":"Resources","pages":[{"title":"Currencies","href":"/api-reference/resources/currencies"},{"title":"Timezones","href":"/api-reference/resources/timezones"},{"title":"Document locales","href":"/api-reference/resources/locales"}]},{"group":"Subscriptions","pages":[{"title":"The subscription object","href":"/api-reference/subscriptions/subscription-object"},{"title":"Create a subscription","openapi":"POST /subscriptions","description":"This endpoint assigns a plan to a customer, creating or modifying a subscription. Ideal for initial subscriptions or plan changes (upgrades/downgrades).","href":"/api-reference/subscriptions/assign-plan"},{"title":"Update a subscription","openapi":"PUT /subscriptions/{external_id}","href":"/api-reference/subscriptions/update"},{"title":"Terminate a subscription","openapi":"DELETE /subscriptions/{external_id}","description":"This endpoint allows you to terminate a subscription.","href":"/api-reference/subscriptions/terminate"},{"title":"Retrieve a subscription","openapi":"GET /subscriptions/{external_id}","href":"/api-reference/subscriptions/get-specific"},{"title":"List all subscriptions","openapi":"GET /subscriptions","href":"/api-reference/subscriptions/get-all"},{"group":"Lifetime Usage","pages":[{"title":"The lifetime usage object","href":"/api-reference/subscriptions/lifetime-usage-object"},{"title":"Update subscription lifetime usage","openapi":"PUT /subscriptions/{external_id}/lifetime_usage","href":"/api-reference/subscriptions/update-lifetime-usage"},{"title":"Retrieve subscription lifetime usage","openapi":"GET /subscriptions/{external_id}/lifetime_usage","href":"/api-reference/subscriptions/get-lifetime-usage"}]},{"group":"Charges","pages":[{"title":"The charge object","href":"/api-reference/subscriptions/charges/object"},{"title":"Update a charge","openapi":"PUT /subscriptions/{external_id}/charges/{charge_code}","href":"/api-reference/subscriptions/charges/update"},{"title":"Retrieve a charge","openapi":"GET /subscriptions/{external_id}/charges/{charge_code}","href":"/api-reference/subscriptions/charges/get-specific"},{"title":"List all charges","openapi":"GET /subscriptions/{external_id}/charges","href":"/api-reference/subscriptions/charges/get-all"},{"group":"Filters","pages":[{"title":"The charge filter object","href":"/api-reference/subscriptions/charges/filters/object"},{"title":"Create a charge filter","openapi":"POST /subscriptions/{external_id}/charges/{charge_code}/filters","href":"/api-reference/subscriptions/charges/filters/create"},{"title":"Update a charge filter","openapi":"PUT /subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}","href":"/api-reference/subscriptions/charges/filters/update"},{"title":"Delete a charge filter","openapi":"DELETE /subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}","href":"/api-reference/subscriptions/charges/filters/destroy"},{"title":"Retrieve a charge filter","openapi":"GET /subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}","href":"/api-reference/subscriptions/charges/filters/get-specific"},{"title":"List all charge filters","openapi":"GET /subscriptions/{external_id}/charges/{charge_code}/filters","href":"/api-reference/subscriptions/charges/filters/get-all"}]}]},{"group":"Fixed Charges","pages":[{"title":"The fixed charge object","href":"/api-reference/subscriptions/fixed-charges/object"},{"title":"Update a fixed charge","openapi":"PUT /subscriptions/{external_id}/fixed_charges/{fixed_charge_code}","href":"/api-reference/subscriptions/fixed-charges/update"},{"title":"Retrieve a fixed charge","openapi":"GET /subscriptions/{external_id}/fixed_charges/{fixed_charge_code}","href":"/api-reference/subscriptions/fixed-charges/get-specific"},{"title":"List all fixed charges","openapi":"GET /subscriptions/{external_id}/fixed_charges","href":"/api-reference/subscriptions/fixed-charges/get-all"}]}]},{"group":"Taxes","pages":[{"title":"The tax object","href":"/api-reference/taxes/tax-object"},{"openapi":"POST /taxes","title":"Create a tax rate","href":"/api-reference/taxes/create"},{"openapi":"PUT /taxes/{code}","title":"Update a tax rate","href":"/api-reference/taxes/update"},{"openapi":"DELETE /taxes/{code}","title":"Delete a tax rate","href":"/api-reference/taxes/destroy"},{"openapi":"GET /taxes/{code}","title":"Retrieve a tax rate","href":"/api-reference/taxes/get-specific"},{"openapi":"GET /taxes","title":"List all tax rates","href":"/api-reference/taxes/get-all"}]},{"group":"Wallets","pages":[{"title":"The wallet object","href":"/api-reference/wallets/wallet-object"},{"openapi":"POST /wallets","title":"Create a wallet","href":"/api-reference/wallets/create"},{"openapi":"PUT /wallets/{lago_id}","title":"Update a wallet","href":"/api-reference/wallets/update"},{"openapi":"DELETE /wallets/{lago_id}","title":"Terminate a wallet","href":"/api-reference/wallets/terminate"},{"openapi":"GET /wallets/{lago_id}","title":"Retrieve a wallet","href":"/api-reference/wallets/get-specific"},{"openapi":"GET /wallets","title":"List all wallets","href":"/api-reference/wallets/get-all"},{"group":"Wallets by code","pages":[{"openapi":"POST /customers/{external_customer_id}/wallets","title":"Create a wallet for a customer","href":"/api-reference/wallets/create-for-customer"},{"openapi":"PUT /customers/{external_customer_id}/wallets/{code}","title":"Update a wallet by code","href":"/api-reference/wallets/update-by-code"},{"openapi":"DELETE /customers/{external_customer_id}/wallets/{code}","title":"Terminate a wallet by code","href":"/api-reference/wallets/terminate-by-code"},{"openapi":"GET /customers/{external_customer_id}/wallets/{code}","title":"Retrieve a wallet by code","href":"/api-reference/wallets/get-specific-by-code"},{"openapi":"GET /customers/{external_customer_id}/wallets","title":"List all wallets for a customer","href":"/api-reference/wallets/get-all-for-customer"}]},{"group":"Wallet transactions","pages":[{"title":"The wallet transaction object","href":"/api-reference/wallets/wallet-transaction-object"},{"openapi":"POST /wallet_transactions","title":"Top-up a wallet","href":"/api-reference/wallets/top-up"},{"openapi":"POST /wallet_transactions/{lago_id}/payment_url","title":"Generate a payment URL","href":"/api-reference/wallets/wallet-transaction-payment-url"},{"openapi":"GET /wallet_transactions/{lago_id}","title":"Retrieve a transaction","href":"/api-reference/wallets/get-specific-transaction"},{"openapi":"GET /wallets/{lago_id}/wallet_transactions","title":"List all wallet transactions","href":"/api-reference/wallets/get-all-transactions"},{"openapi":"GET /wallet_transactions/{lago_id}/consumptions","title":"List all consumptions for a wallet transaction","href":"/api-reference/wallets/get-all-consumptions"},{"openapi":"GET /wallet_transactions/{lago_id}/fundings","title":"List all fundings for a wallet transaction","href":"/api-reference/wallets/get-all-fundings"}]},{"group":"Wallet alerts","pages":[{"title":"The wallet alert object","href":"/api-reference/wallets/wallet-alert-object"},{"openapi":"POST /customers/{external_customer_id}/wallets/{wallet_code}/alerts","title":"Create a wallet alert","href":"/api-reference/wallets/create-alert"},{"openapi":"PUT /customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}","title":"Update a wallet alert","href":"/api-reference/wallets/update-alert"},{"openapi":"DELETE /customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}","title":"Delete a wallet alert","href":"/api-reference/wallets/delete-alert"},{"openapi":"GET /customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}","title":"Retrieve a wallet alert","href":"/api-reference/wallets/get-specific-alert"},{"openapi":"GET /customers/{external_customer_id}/wallets/{wallet_code}/alerts","title":"List all wallet alerts","href":"/api-reference/wallets/get-all-alerts"}]}]},{"group":"Webhook endpoints","pages":[{"title":"The webhook endpoint object","href":"/api-reference/webhook-endpoints/webhook-endpoint-object"},{"openapi":"POST /webhook_endpoints","title":"Create a webhook endpoint","href":"/api-reference/webhook-endpoints/create"},{"openapi":"PUT /webhook_endpoints/{lago_id}","title":"Update a webhook endpoint","href":"/api-reference/webhook-endpoints/update"},{"openapi":"DELETE /webhook_endpoints/{lago_id}","title":"Delete a webhook endpoint","href":"/api-reference/webhook-endpoints/destroy"},{"openapi":"GET /webhook_endpoints","title":"List all webhook endpoints","href":"/api-reference/webhook-endpoints/get-all"},{"openapi":"GET /webhook_endpoints/{lago_id}","title":"Retrieve a webhook endpoint","href":"/api-reference/webhook-endpoints/get-specific"}]},{"group":"Webhooks","pages":[{"title":"Format and signature","href":"/api-reference/webhooks/format---signature"},{"title":"Messages","href":"/api-reference/webhooks/messages"}]}]}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/introduction"}]},{"tab":"Templates","pages":[{"title":"Templates","href":"/templates/introduction"}]},{"tab":"FAQ","pages":[{"title":"FAQ","href":"/faq/about-lago"}]},{"tab":"Knowledge Base","href":"https://knowledge.getlago.com"},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/product"}]}]},"basePath":"","title":"Update a subscription - Lago","buildId":"dpl_Acry4NrQAgjcikyFgVE2eJ7XQCAv","deploymentId":"dpl_Acry4NrQAgjcikyFgVE2eJ7XQCAv","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C2Ap4tLG.js","utils-DOQ4WuIX.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-PBLA84v6.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BSX8gB2N.js","snippetPresets-DEKVfaPa.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-BSZ21_fK.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-Bd7Ye-9k.js","shallow-Yd0HfeLO.js","getApiPlaygroundDisplay-CLdBbHLF.js","CodeSnippet-BJnsDPfe.js","CodeSnippets-CdAH7YRl.js","Page-CFXBIa-t.js","getPastedJson-Wsal3Fw6.js","icon-WwS_mnlk.js","MethodPill-CYxxzIKu.js","DuplicateIcon-CejZ8LQc.js","createIcon-DKEFCi_0.js","DynamicMarkdown-BCpKo5ib.js","SectionHeading-ClsMcgQm.js","axios-vUo_bRtp.js","Markdown-BI-KM0cT.js","clsx-Cc5SnnvQ.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DOFIgHLg.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-1_MZUC6c.js"]}