Check determines if a customer has access to a feature based on their current balance. Returns allowed: true if they have sufficient balance, the feature is unlimited, or it’s a boolean feature included in their plan.
If true, atomically records a usage event while checking access. The required_balance value is used as the usage amount. Combines check + track in one call.
Upgrade/upsell information when access is denied. Only present if with_preview was true and allowed is false.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Autumn","colors":{"primary":"#8838ff","light":"#9b5cff","dark":"#8838ff"},"logo":{"light":"https://mintcdn.com/autumn-b9b4c0fb/BOEMpWFJsAdGcii1/assets/logo/autumn-dark.svg?fit=max\u0026auto=format\u0026n=BOEMpWFJsAdGcii1\u0026q=85\u0026s=720bd2227c435e77f2c91cbfcbccd274","dark":"https://mintcdn.com/autumn-b9b4c0fb/BOEMpWFJsAdGcii1/assets/logo/autumn-light.svg?fit=max\u0026auto=format\u0026n=BOEMpWFJsAdGcii1\u0026q=85\u0026s=f700b862e5d0ada8c89a5976d27863fe"},"favicon":"https://mintcdn.com/autumn-b9b4c0fb/ihHX49Ug6NamJ10t/favicon.svg?fit=max\u0026auto=format\u0026n=ihHX49Ug6NamJ10t\u0026q=85\u0026s=b1fd8b3e3086e5a3855a8cf8c45dd57a","api":{"playground":{"display":"interactive"},"examples":{"languages":["typescript","python","bash"]}},"appearance":{"default":"system","strict":false},"background":{"color":{"light":"#FFFFFF","dark":"#0A0A0A"}},"navbar":{"primary":{"type":"button","label":"Dashboard","href":"https://app.useautumn.com"}},"footer":{"socials":{"x":"https://x.com/autumnpricing","github":"https://github.com/useautumn","linkedin":"https://linkedin.com/company/useautumn"}},"fonts":{"heading":{"family":"Inter"},"body":{"family":"Inter"}},"contextual":{"options":["copy","cursor","view"],"display":"header"},"interaction":{"drilldown":true},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Discord","icon":"discord","href":"https://discord.gg/STqxY92zuS"},{"anchor":"GitHub","icon":"github","href":"https://github.com/useautumn/autumn"},{"anchor":"Website","icon":"globe","href":"https://useautumn.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"autumn-b9b4c0fb","hasAudioNarration":false,"actualSubdomain":"autumn-b9b4c0fb","customDomains":["docs.useautumn.com"],"gitSource":{"type":"github","owner":"useautumn","repo":"autumn","deployBranch":"main","contentDirectory":"apps/docs/mintlify","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adf70683d6319f7be04488b","collectionId":"51110cc0-1315-435c-8118-95f0c05e3ce4","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adf70683d6319f7be04488b"},"feedback":{"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adfc480ca1d3c49d2cf24bc","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"API Reference","count":101},{"language":"default","tag":"Documentation","count":64},{"language":"default","tag":"Billing","count":20},{"language":"default","tag":"Configure Pricing","count":19},{"language":"default","tag":"Additional Resources","count":16},{"language":"default","tag":"Customers","count":15},{"language":"default","tag":"Rewards \u0026 Referrals","count":13},{"language":"default","tag":"Balances","count":10},{"language":"default","tag":"Webhook Events","count":10},{"language":"default","tag":"Invoices","count":8}],"searchSettings":{"tuning":{"anchor":{"titleCoverageRelabel":true}}}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","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":"editor-v7-file-tree","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":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"editor-agent-model-picker","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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"language-tabs.css","content":""},{"filePath":"style.css","content":".prose>.api-section{display:none!important}"}],"page":{"pagePath":"api-reference/core/check","slug":"/api-reference/core/check","pageMetadata":{"title":"Check Permissions","openapi":"openapi POST /v1/balances.check","description":"Checks whether a customer currently has enough balance to use a feature.\n\nUse this to gate access before a feature action. Enable sendEvent when you want to check and consume balance atomically in one request.","href":"/api-reference/core/check"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Checks whether a customer currently has enough balance to use a feature.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Use this to gate access before a feature action. Enable sendEvent when you want to check and consume balance atomically in one request.\"\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const DynamicResponseExample=({json,statusCode=`200`})=>{const{CodeBlock,ResponseExample}=_provideComponents()||{};if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);const toCamelCase=str=>{return str.replace(/_([a-z])/g,(_,c)=>c.toUpperCase())};const convertKeysToCamelCase=obj=>{if(Array.isArray(obj)){return obj.map(item=>convertKeysToCamelCase(item))}if(obj!==null\u0026\u0026typeof obj===`object`){return Object.keys(obj).reduce((acc,key)=>{const camelKey=toCamelCase(key);acc[camelKey]=convertKeysToCamelCase(obj[key]);return acc},{})}return obj};const[isTypeScript,setIsTypeScript]=useState(()=>{if(typeof window!==`undefined`){try{const lang=localStorage.getItem(`code`);return JSON.parse(lang)===`typescript`}catch{return true}}return true});useEffect(()=>{const onMintlifyStorage=event=>{if(event.detail?.key===`code`){try{const value=JSON.parse(event.detail.value);setIsTypeScript(value===`typescript`)}catch{}}};const pollInterval=setInterval(()=>{try{const lang=localStorage.getItem(`code`);const value=JSON.parse(lang);setIsTypeScript(value===`typescript`)}catch{}},300);document.addEventListener(`mintlify-localstorage`,onMintlifyStorage);return()=>{document.removeEventListener(`mintlify-localstorage`,onMintlifyStorage);clearInterval(pollInterval)}},[]);const camelCaseJson=useMemo(()=>convertKeysToCamelCase(json),[json]);const snakeCaseString=JSON.stringify(json,null,2);const camelCaseString=JSON.stringify(camelCaseJson,null,2);return _jsx(ResponseExample,{children:isTypeScript?_jsx(CodeBlock,{language:`json`,filename:statusCode,children:camelCaseString}):_jsx(CodeBlock,{language:`json`,filename:statusCode,children:snakeCaseString})})};const DynamicResponseField=({children,name,...props})=>{const{ResponseField}=_provideComponents()||{};if(!ResponseField)_missingMdxReference(`ResponseField`,true);const convertToCamelCase=str=>{if(typeof str!==`string`)return str;return str.replace(/[_-](\\w)/g,(_,c)=>c.toUpperCase())};const[lang,setLang]=useState(()=>{if(typeof window!==`undefined`){const stored=localStorage.getItem(`code`);return stored||`\"typescript\"`}return`\"typescript\"`});useEffect(()=>{const onMintlifyStorage=event=>{const key=event.detail?.key;if(key===`code`){setLang(event.detail.value)}};const pollInterval=setInterval(()=>{const current=localStorage.getItem(`code`);if(current\u0026\u0026current!==lang){setLang(current)}},500);document.addEventListener(`mintlify-localstorage`,onMintlifyStorage);return()=>{document.removeEventListener(`mintlify-localstorage`,onMintlifyStorage);clearInterval(pollInterval)}},[lang]);const resolvedName=useMemo(()=>{try{const value=JSON.parse(lang);const useCamelCase=value===`typescript`;return useCamelCase?convertToCamelCase(name):name}catch{return name}},[name,lang]);return _jsx(ResponseField,{name:resolvedName,...props,children})};const DynamicParamField=({children,body,path,...props})=>{const{ParamField}=_provideComponents()||{};if(!ParamField)_missingMdxReference(`ParamField`,true);const convertToCamelCase=str=>{if(typeof str!==`string`)return str;return str.replace(/[_-](\\w)/g,(_,c)=>c.toUpperCase())};const[lang,setLang]=useState(()=>{if(typeof window!==`undefined`){const stored=localStorage.getItem(`code`);return stored||`\"typescript\"`}return`\"typescript\"`});useEffect(()=>{const onMintlifyStorage=event=>{const key=event.detail?.key;if(key===`code`){setLang(event.detail.value)}};const pollInterval=setInterval(()=>{const current=localStorage.getItem(`code`);if(current\u0026\u0026current!==lang){setLang(current)}},500);document.addEventListener(`mintlify-localstorage`,onMintlifyStorage);return()=>{document.removeEventListener(`mintlify-localstorage`,onMintlifyStorage);clearInterval(pollInterval)}},[lang]);const resolvedBody=useMemo(()=>{try{const value=JSON.parse(lang);const useCamelCase=value===`typescript`;return useCamelCase?convertToCamelCase(body):body}catch{return body}},[body,lang]);const resolvedPath=useMemo(()=>{try{const value=JSON.parse(lang);const useCamelCase=value===`typescript`;return useCamelCase?convertToCamelCase(path):path}catch{return path}},[path,lang]);return _jsx(ParamField,{body:resolvedBody,path:resolvedPath,...props,children})};function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Expandable,Heading,Note,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(Note,{children:_jsxs(_components.p,{children:[`Check determines if a customer has access to a feature based on their current balance. Returns `,_jsx(_components.code,{children:`allowed: true`}),` if they have sufficient balance, the feature is unlimited, or it’s a boolean feature included in their plan.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`common-use-cases`,children:`Common Use Cases`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Check feature access`,numberOfLines:`10`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`allowed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`balance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` autumn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` customerId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cus_123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` featureId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ai_messages\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`allowed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Show upgrade prompt or paywall`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`You have \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`balance`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`remaining`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" messages left`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Check and track atomically`,numberOfLines:`6`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`allowed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` autumn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` customerId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cus_123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` featureId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"api_calls\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` requiredBalance:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sendEvent:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Deducts usage if allowed`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`customer_id`,type:`string`,required:true,children:_jsx(_components.p,{children:`The ID of the customer.`})})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`feature_id`,type:`string`,required:true,children:_jsx(_components.p,{children:`The ID of the feature.`})})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`entity_id`,type:`string`,children:_jsx(_components.p,{children:`The ID of the entity for entity-scoped balances (e.g., per-seat limits).`})})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`required_balance`,type:`number`,children:_jsx(_components.p,{children:`Minimum balance required for access. Returns allowed: false if the customer’s balance is below this value. Defaults to 1.`})})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`properties`,type:`object`,children:_jsx(_components.p,{children:`Additional properties to attach to the usage event if send_event is true.`})})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`send_event`,type:`boolean`,children:_jsx(_components.p,{children:`If true, atomically records a usage event while checking access. The required_balance value is used as the usage amount. Combines check + track in one call.`})})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsxs(DynamicParamField,{body:`lock`,type:`object`,children:[_jsx(_components.p,{children:`Reserve units of a feature upfront by passing a lock_id, then call balances.finalize to confirm or release the hold.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`lock_id`,type:`string`,required:true,children:_jsx(_components.p,{children:`A unique identifier for this lock. Used to finalize the lock later via balances.finalize.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`enabled`,type:`true`,required:true,children:_jsx(_components.p,{children:`Must be true to enable locking.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`expires_at`,type:`number`,children:_jsx(_components.p,{children:`Unix timestamp (ms) when the lock automatically expires and releases the held balance.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`overage_behavior`,type:`'cap' | 'overflow'`,children:_jsx(_components.p,{children:`How to handle a lock that exceeds the available balance. “reject” (default) returns allowed: false and reserves nothing. “cap” reserves only what fits and returns allowed: true. “overflow” reserves the full value: the balance can go negative, though spend limits still apply. balances.finalize reuses the behavior chosen here.`})})})]})]})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`with_preview`,type:`boolean`,children:_jsx(_components.p,{children:`If true, includes upgrade/upsell information in the response when access is denied. Useful for displaying paywalls.`})})}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`allowed`,type:`boolean`,children:_jsx(_components.p,{children:`Whether the customer is allowed to use the feature. True if they have sufficient balance or the feature is unlimited/boolean.`})})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`customer_id`,type:`string`,children:_jsx(_components.p,{children:`The ID of the customer that was checked.`})})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`entity_id`,type:`string | null`,children:_jsx(_components.p,{children:`The ID of the entity, if an entity-scoped check was performed.`})})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`required_balance`,type:`number`,children:_jsx(_components.p,{children:`The required balance that was checked against.`})})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`balance`,type:`object | null`,children:[_jsx(_components.p,{children:`The customer’s balance for this feature. Null if the customer has no balance for this feature.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`feature_id`,type:`string`,children:_jsx(_components.p,{children:`The feature ID this balance is for.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`feature`,type:`object`,children:[_jsx(_components.p,{children:`The full feature object if expanded.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`id`,type:`string`,children:_jsx(_components.p,{children:`The unique identifier for this feature, used in /check and /track calls.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`name`,type:`string`,children:_jsx(_components.p,{children:`Human-readable name displayed in the dashboard and billing UI.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`type`,type:`'boolean' | 'metered' | 'credit_system' | 'ai_credit_system'`,children:_jsx(_components.p,{children:`Feature type: ‘boolean’ for on/off access, ‘metered’ for usage-tracked features, ‘credit_system’ for unified credit pools, ‘ai_credit_system’ for model-based token pricing.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`consumable`,type:`boolean`,children:_jsx(_components.p,{children:`For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`combine`,type:`'sum' | 'max' | 'min'`,children:_jsx(_components.p,{children:`How grants of this feature from several plans combine: ‘sum’ adds them up, ‘max’ / ‘min’ keep the highest / lowest grant among plan items with no price. Omitted when ‘sum’.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`event_names`,type:`string[]`,children:_jsx(_components.p,{children:`Event names that trigger this feature’s balance. Allows multiple features to respond to a single event.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`credit_schema`,type:`object | object | object[]`,children:[_jsx(_components.p,{children:`For classic credit systems: maps metered features to flat or graduated credit costs.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`metered_feature_id`,type:`string | any`,children:_jsx(_components.p,{children:`ID of the metered feature that draws from this credit system.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`billing_units`,type:`number`,children:_jsx(_components.p,{children:`Number of metered-feature units priced together. Defaults to one when omitted.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`dimensions.{key}`,type:`object | object`,children:_jsx(_components.p,{children:`Named rates chosen by event properties. The most specific match sets the rate; with no match the item’s own rate applies.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`multipliers.{key}`,type:`object`,children:[_jsx(_components.p,{children:`Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`match.{key}`,type:`string`,children:_jsx(_components.p,{children:`Event properties this entry applies to. Every key must equal the tracked property, compared as strings.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`factor`,type:`number`,children:_jsx(_components.p,{children:`Multiplies the matched rate. All matching multipliers stack.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`add`,type:`number`,children:_jsx(_components.p,{children:`Added to the rate after every factor is applied, in credits per billing-unit group.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`tier_behavior`,type:`any`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`tiers`,type:`object[]`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`to`,type:`number`,children:_jsx(_components.p,{children:`Inclusive upper usage boundary for this graduated tier. The final tier must be ‘inf’.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`credit_cost`,type:`number`,children:_jsx(_components.p,{children:`Credits consumed per billing-unit group within this tier.`})})})]})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`credit_cost`,type:`number`,children:_jsx(_components.p,{children:`Credits consumed per billing-unit group.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`model_markups.{key}`,type:`object | null`,children:[_jsx(_components.p,{children:`Per-model markup overrides for AI credit systems.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`markup`,type:`number`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`input_cost`,type:`number`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`output_cost`,type:`number`})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`default_markup`,type:`number`,children:_jsx(_components.p,{children:`Default percentage markup for AI credit systems. Use -100 to make usage free.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`provider_markups.{key}`,type:`object | null`,children:[_jsx(_components.p,{children:`Per-provider default markup percentages for AI credit systems.`}),_jsx(Expandable,{title:`properties`,children:_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`markup`,type:`number`})})})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`display`,type:`object`,children:[_jsx(_components.p,{children:`Display names for the feature in billing UI and customer-facing components.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`singular`,type:`string | null`,children:_jsx(_components.p,{children:`Singular form for UI display (e.g., ‘API call’, ‘seat’).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`plural`,type:`string | null`,children:_jsx(_components.p,{children:`Plural form for UI display (e.g., ‘API calls’, ‘seats’).`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`archived`,type:`boolean`,children:_jsx(_components.p,{children:`Whether the feature is archived and hidden from the dashboard.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`processors`,type:`object`,children:[_jsx(_components.p,{children:`Processor mappings for this feature. Present when a Stripe product or meter is set.`}),_jsx(Expandable,{title:`properties`,children:_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`stripe`,type:`object`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`product_id`,type:`string`,children:_jsx(_components.p,{children:`Stripe product ID this feature’s usage prices bill under.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`meter_id`,type:`string`,children:_jsx(_components.p,{children:`Stripe meter ID used to create this feature’s metered price.`})})})]})})})})]})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`granted`,type:`number`,children:_jsx(_components.p,{children:`Total balance granted (included + prepaid).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`remaining`,type:`number`,children:_jsx(_components.p,{children:`Remaining balance available for use.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`usage`,type:`number`,children:_jsx(_components.p,{children:`Total usage consumed in the current period.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`unlimited`,type:`boolean`,children:_jsx(_components.p,{children:`Whether this feature has unlimited usage.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`overage_allowed`,type:`boolean`,children:_jsx(_components.p,{children:`Whether usage beyond the granted balance is allowed (with overage charges).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`max_purchase`,type:`number | null`,children:_jsx(_components.p,{children:`Maximum quantity that can be purchased as a top-up, or null for unlimited.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`next_reset_at`,type:`number | null`,children:_jsx(_components.p,{children:`Timestamp when the balance will reset, or null for no reset.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`breakdown`,type:`object[]`,children:[_jsx(_components.p,{children:`Detailed breakdown of balance sources when stacking multiple plans or grants.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`id`,type:`string`,children:_jsx(_components.p,{children:`The unique identifier for this balance breakdown.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`plan_id`,type:`string | null`,children:_jsx(_components.p,{children:`The plan ID this balance originates from, or null for standalone and pooled balances.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`included_grant`,type:`number`,children:_jsx(_components.p,{children:`Amount granted from the plan’s included usage.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`prepaid_grant`,type:`number`,children:_jsx(_components.p,{children:`Amount granted from prepaid purchases or top-ups.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`remaining`,type:`number`,children:_jsx(_components.p,{children:`Remaining balance available for use.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`usage`,type:`number`,children:_jsx(_components.p,{children:`Amount consumed in the current period.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`unlimited`,type:`boolean`,children:_jsx(_components.p,{children:`Whether this balance has unlimited usage.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`reset`,type:`object | null`,children:[_jsx(_components.p,{children:`Reset configuration for this balance, or null if no reset.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`interval`,type:`'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'`,children:_jsx(_components.p,{children:`The reset interval (hour, day, week, month, etc.) or ‘multiple’ if combined from different intervals.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`interval_count`,type:`number`,children:_jsx(_components.p,{children:`Number of intervals between resets (eg. 2 for bi-monthly).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`resets_at`,type:`number | null`,children:_jsx(_components.p,{children:`Timestamp when the balance will next reset.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`price`,type:`object | null`,children:[_jsx(_components.p,{children:`Pricing configuration if this balance has usage-based pricing.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`amount`,type:`number`,children:_jsx(_components.p,{children:`The per-unit price amount.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`tiers`,type:`object[]`,children:[_jsx(_components.p,{children:`Tiered pricing configuration if applicable.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`to`,type:`number`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`amount`,type:`number`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`flat_amount`,type:`number`})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`tier_behavior`,type:`'graduated' | 'volume'`,children:_jsx(_components.p,{children:`How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`billing_units`,type:`number`,children:_jsx(_components.p,{children:`The number of units per billing increment (eg. $9 / 250 units).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`billing_method`,type:`'prepaid' | 'usage_based'`,children:_jsx(_components.p,{children:`Whether usage is prepaid or billed pay-per-use.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`max_purchase`,type:`number | null`,children:_jsx(_components.p,{children:`Maximum quantity that can be purchased, or null for unlimited.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`expires_at`,type:`number | null`,children:_jsx(_components.p,{children:`Timestamp when this balance expires, or null for no expiration.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`source`,type:`'customer' | 'entity'`,children:_jsx(_components.p,{children:`Where this row’s credits come from: shared at the customer level, or owned by the entity.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`allocation`,type:`object | null`,children:[_jsx(_components.p,{children:`Set when this row’s numbers are the entity’s allocated share of the customer’s credits.`}),_jsx(Expandable,{title:`properties`,children:_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`amount`,type:`number`,children:_jsx(_components.p,{children:`The amount allocated to this entity.`})})})})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`contributions`,type:`object`,children:[_jsxs(_components.p,{children:[`The plans funding this shared pooled balance, usually on the customer’s entities, and how much each adds this cycle and next. Present on pooled rows when expand includes `,_jsx(_components.code,{children:`pooled_contributions`}),`.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`list`,type:`object[]`,children:[_jsx(_components.p,{children:`The first 10 plans contributing to the pool, competing shares first, then newest.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`id`,type:`string`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`entity_id`,type:`string | null`,children:_jsx(_components.p,{children:`Entity holding the contributing plan. Null for customer-level plans.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`entity_name`,type:`string | null`,children:_jsx(_components.p,{children:`Display name of the contributing entity.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`plan_id`,type:`string`,children:_jsx(_components.p,{children:`The plan contributing to the pool.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`plan_name`,type:`string | null`,children:_jsx(_components.p,{children:`Display name of the contributing plan.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`current_contribution`,type:`number`,children:_jsx(_components.p,{children:`Amount this source contributes to the pool this cycle.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`next_cycle_contribution`,type:`number`,children:_jsx(_components.p,{children:`Amount this source will contribute next cycle.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`competes`,type:`boolean`,children:_jsx(_components.p,{children:`True when this source competes under a ‘max’ / ‘min’ feature: only the winning competing share counts, instead of adding up.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`unlimited`,type:`boolean`,children:_jsx(_components.p,{children:`True when this source grants unlimited usage, either as a competing source or as an unlimited share riding a limited pool.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`created_at`,type:`number`})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`total_count`,type:`number`,children:_jsx(_components.p,{children:`Total number of plans contributing to the pool.`})})})]})]})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`rollovers`,type:`object[]`,children:[_jsx(_components.p,{children:`Rollover balances carried over from previous periods.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`granted`,type:`number`,children:_jsx(_components.p,{children:`Amount originally rolled over from a previous period, before any of it was consumed.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`balance`,type:`number`,children:_jsx(_components.p,{children:`Amount of balance rolled over from a previous period.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`expires_at`,type:`number`,children:_jsx(_components.p,{children:`Timestamp when the rollover balance expires.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`allocated`,type:`number`,children:_jsx(_components.p,{children:`Shared credits held for entities by allocations; present only when the customer allocates this feature.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`unallocated`,type:`number`,children:_jsx(_components.p,{children:`Remaining shared credits no allocation holds; any entity may use them.`})})})]})]})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`balances.{key}`,type:`object | null`,children:[_jsx(_components.p,{children:`Map of feature_id to balance for the checked feature and any related features (e.g. linked credit systems).`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`feature_id`,type:`string`,children:_jsx(_components.p,{children:`The feature ID this balance is for.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`feature`,type:`object`,children:[_jsx(_components.p,{children:`The full feature object if expanded.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`id`,type:`string`,children:_jsx(_components.p,{children:`The unique identifier for this feature, used in /check and /track calls.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`name`,type:`string`,children:_jsx(_components.p,{children:`Human-readable name displayed in the dashboard and billing UI.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`type`,type:`'boolean' | 'metered' | 'credit_system' | 'ai_credit_system'`,children:_jsx(_components.p,{children:`Feature type: ‘boolean’ for on/off access, ‘metered’ for usage-tracked features, ‘credit_system’ for unified credit pools, ‘ai_credit_system’ for model-based token pricing.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`consumable`,type:`boolean`,children:_jsx(_components.p,{children:`For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`combine`,type:`'sum' | 'max' | 'min'`,children:_jsx(_components.p,{children:`How grants of this feature from several plans combine: ‘sum’ adds them up, ‘max’ / ‘min’ keep the highest / lowest grant among plan items with no price. Omitted when ‘sum’.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`event_names`,type:`string[]`,children:_jsx(_components.p,{children:`Event names that trigger this feature’s balance. Allows multiple features to respond to a single event.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`credit_schema`,type:`object | object | object[]`,children:[_jsx(_components.p,{children:`For classic credit systems: maps metered features to flat or graduated credit costs.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`metered_feature_id`,type:`string | any`,children:_jsx(_components.p,{children:`ID of the metered feature that draws from this credit system.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`billing_units`,type:`number`,children:_jsx(_components.p,{children:`Number of metered-feature units priced together. Defaults to one when omitted.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`dimensions.{key}`,type:`object | object`,children:_jsx(_components.p,{children:`Named rates chosen by event properties. The most specific match sets the rate; with no match the item’s own rate applies.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`multipliers.{key}`,type:`object`,children:[_jsx(_components.p,{children:`Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`match.{key}`,type:`string`,children:_jsx(_components.p,{children:`Event properties this entry applies to. Every key must equal the tracked property, compared as strings.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`factor`,type:`number`,children:_jsx(_components.p,{children:`Multiplies the matched rate. All matching multipliers stack.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`add`,type:`number`,children:_jsx(_components.p,{children:`Added to the rate after every factor is applied, in credits per billing-unit group.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`tier_behavior`,type:`any`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`tiers`,type:`object[]`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`to`,type:`number`,children:_jsx(_components.p,{children:`Inclusive upper usage boundary for this graduated tier. The final tier must be ‘inf’.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`credit_cost`,type:`number`,children:_jsx(_components.p,{children:`Credits consumed per billing-unit group within this tier.`})})})]})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`credit_cost`,type:`number`,children:_jsx(_components.p,{children:`Credits consumed per billing-unit group.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`model_markups.{key}`,type:`object | null`,children:[_jsx(_components.p,{children:`Per-model markup overrides for AI credit systems.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`markup`,type:`number`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`input_cost`,type:`number`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`output_cost`,type:`number`})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`default_markup`,type:`number`,children:_jsx(_components.p,{children:`Default percentage markup for AI credit systems. Use -100 to make usage free.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`provider_markups.{key}`,type:`object | null`,children:[_jsx(_components.p,{children:`Per-provider default markup percentages for AI credit systems.`}),_jsx(Expandable,{title:`properties`,children:_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`markup`,type:`number`})})})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`display`,type:`object`,children:[_jsx(_components.p,{children:`Display names for the feature in billing UI and customer-facing components.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`singular`,type:`string | null`,children:_jsx(_components.p,{children:`Singular form for UI display (e.g., ‘API call’, ‘seat’).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`plural`,type:`string | null`,children:_jsx(_components.p,{children:`Plural form for UI display (e.g., ‘API calls’, ‘seats’).`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`archived`,type:`boolean`,children:_jsx(_components.p,{children:`Whether the feature is archived and hidden from the dashboard.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`processors`,type:`object`,children:[_jsx(_components.p,{children:`Processor mappings for this feature. Present when a Stripe product or meter is set.`}),_jsx(Expandable,{title:`properties`,children:_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`stripe`,type:`object`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`product_id`,type:`string`,children:_jsx(_components.p,{children:`Stripe product ID this feature’s usage prices bill under.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`meter_id`,type:`string`,children:_jsx(_components.p,{children:`Stripe meter ID used to create this feature’s metered price.`})})})]})})})})]})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`granted`,type:`number`,children:_jsx(_components.p,{children:`Total balance granted (included + prepaid).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`remaining`,type:`number`,children:_jsx(_components.p,{children:`Remaining balance available for use.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`usage`,type:`number`,children:_jsx(_components.p,{children:`Total usage consumed in the current period.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`unlimited`,type:`boolean`,children:_jsx(_components.p,{children:`Whether this feature has unlimited usage.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`overage_allowed`,type:`boolean`,children:_jsx(_components.p,{children:`Whether usage beyond the granted balance is allowed (with overage charges).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`max_purchase`,type:`number | null`,children:_jsx(_components.p,{children:`Maximum quantity that can be purchased as a top-up, or null for unlimited.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`next_reset_at`,type:`number | null`,children:_jsx(_components.p,{children:`Timestamp when the balance will reset, or null for no reset.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`breakdown`,type:`object[]`,children:[_jsx(_components.p,{children:`Detailed breakdown of balance sources when stacking multiple plans or grants.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`id`,type:`string`,children:_jsx(_components.p,{children:`The unique identifier for this balance breakdown.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`plan_id`,type:`string | null`,children:_jsx(_components.p,{children:`The plan ID this balance originates from, or null for standalone and pooled balances.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`included_grant`,type:`number`,children:_jsx(_components.p,{children:`Amount granted from the plan’s included usage.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`prepaid_grant`,type:`number`,children:_jsx(_components.p,{children:`Amount granted from prepaid purchases or top-ups.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`remaining`,type:`number`,children:_jsx(_components.p,{children:`Remaining balance available for use.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`usage`,type:`number`,children:_jsx(_components.p,{children:`Amount consumed in the current period.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`unlimited`,type:`boolean`,children:_jsx(_components.p,{children:`Whether this balance has unlimited usage.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`reset`,type:`object | null`,children:[_jsx(_components.p,{children:`Reset configuration for this balance, or null if no reset.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`interval`,type:`'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'`,children:_jsx(_components.p,{children:`The reset interval (hour, day, week, month, etc.) or ‘multiple’ if combined from different intervals.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`interval_count`,type:`number`,children:_jsx(_components.p,{children:`Number of intervals between resets (eg. 2 for bi-monthly).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`resets_at`,type:`number | null`,children:_jsx(_components.p,{children:`Timestamp when the balance will next reset.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`price`,type:`object | null`,children:[_jsx(_components.p,{children:`Pricing configuration if this balance has usage-based pricing.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`amount`,type:`number`,children:_jsx(_components.p,{children:`The per-unit price amount.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`tiers`,type:`object[]`,children:[_jsx(_components.p,{children:`Tiered pricing configuration if applicable.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`to`,type:`number`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`amount`,type:`number`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`flat_amount`,type:`number`})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`tier_behavior`,type:`'graduated' | 'volume'`,children:_jsx(_components.p,{children:`How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`billing_units`,type:`number`,children:_jsx(_components.p,{children:`The number of units per billing increment (eg. $9 / 250 units).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`billing_method`,type:`'prepaid' | 'usage_based'`,children:_jsx(_components.p,{children:`Whether usage is prepaid or billed pay-per-use.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`max_purchase`,type:`number | null`,children:_jsx(_components.p,{children:`Maximum quantity that can be purchased, or null for unlimited.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`expires_at`,type:`number | null`,children:_jsx(_components.p,{children:`Timestamp when this balance expires, or null for no expiration.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`source`,type:`'customer' | 'entity'`,children:_jsx(_components.p,{children:`Where this row’s credits come from: shared at the customer level, or owned by the entity.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`allocation`,type:`object | null`,children:[_jsx(_components.p,{children:`Set when this row’s numbers are the entity’s allocated share of the customer’s credits.`}),_jsx(Expandable,{title:`properties`,children:_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`amount`,type:`number`,children:_jsx(_components.p,{children:`The amount allocated to this entity.`})})})})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`contributions`,type:`object`,children:[_jsxs(_components.p,{children:[`The plans funding this shared pooled balance, usually on the customer’s entities, and how much each adds this cycle and next. Present on pooled rows when expand includes `,_jsx(_components.code,{children:`pooled_contributions`}),`.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`list`,type:`object[]`,children:[_jsx(_components.p,{children:`The first 10 plans contributing to the pool, competing shares first, then newest.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`id`,type:`string`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`entity_id`,type:`string | null`,children:_jsx(_components.p,{children:`Entity holding the contributing plan. Null for customer-level plans.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`entity_name`,type:`string | null`,children:_jsx(_components.p,{children:`Display name of the contributing entity.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`plan_id`,type:`string`,children:_jsx(_components.p,{children:`The plan contributing to the pool.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`plan_name`,type:`string | null`,children:_jsx(_components.p,{children:`Display name of the contributing plan.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`current_contribution`,type:`number`,children:_jsx(_components.p,{children:`Amount this source contributes to the pool this cycle.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`next_cycle_contribution`,type:`number`,children:_jsx(_components.p,{children:`Amount this source will contribute next cycle.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`competes`,type:`boolean`,children:_jsx(_components.p,{children:`True when this source competes under a ‘max’ / ‘min’ feature: only the winning competing share counts, instead of adding up.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`unlimited`,type:`boolean`,children:_jsx(_components.p,{children:`True when this source grants unlimited usage, either as a competing source or as an unlimited share riding a limited pool.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`created_at`,type:`number`})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`total_count`,type:`number`,children:_jsx(_components.p,{children:`Total number of plans contributing to the pool.`})})})]})]})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`rollovers`,type:`object[]`,children:[_jsx(_components.p,{children:`Rollover balances carried over from previous periods.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`granted`,type:`number`,children:_jsx(_components.p,{children:`Amount originally rolled over from a previous period, before any of it was consumed.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`balance`,type:`number`,children:_jsx(_components.p,{children:`Amount of balance rolled over from a previous period.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`expires_at`,type:`number`,children:_jsx(_components.p,{children:`Timestamp when the rollover balance expires.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`allocated`,type:`number`,children:_jsx(_components.p,{children:`Shared credits held for entities by allocations; present only when the customer allocates this feature.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`unallocated`,type:`number`,children:_jsx(_components.p,{children:`Remaining shared credits no allocation holds; any entity may use them.`})})})]})]})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`flag`,type:`object | null`,children:[_jsx(_components.p,{children:`The flag associated with this check, if any.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`id`,type:`string`,children:_jsx(_components.p,{children:`The unique identifier for this flag.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`plan_id`,type:`string | null`,children:_jsx(_components.p,{children:`The plan ID this flag originates from, or null for standalone flags.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`expires_at`,type:`number | null`,children:_jsx(_components.p,{children:`Timestamp when this flag expires, or null for no expiration.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`feature_id`,type:`string`,children:_jsx(_components.p,{children:`The feature ID this flag is for.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`feature`,type:`object`,children:[_jsx(_components.p,{children:`The full feature object if expanded.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`id`,type:`string`,children:_jsx(_components.p,{children:`The unique identifier for this feature, used in /check and /track calls.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`name`,type:`string`,children:_jsx(_components.p,{children:`Human-readable name displayed in the dashboard and billing UI.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`type`,type:`'boolean' | 'metered' | 'credit_system' | 'ai_credit_system'`,children:_jsx(_components.p,{children:`Feature type: ‘boolean’ for on/off access, ‘metered’ for usage-tracked features, ‘credit_system’ for unified credit pools, ‘ai_credit_system’ for model-based token pricing.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`consumable`,type:`boolean`,children:_jsx(_components.p,{children:`For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`combine`,type:`'sum' | 'max' | 'min'`,children:_jsx(_components.p,{children:`How grants of this feature from several plans combine: ‘sum’ adds them up, ‘max’ / ‘min’ keep the highest / lowest grant among plan items with no price. Omitted when ‘sum’.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`event_names`,type:`string[]`,children:_jsx(_components.p,{children:`Event names that trigger this feature’s balance. Allows multiple features to respond to a single event.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`credit_schema`,type:`object | object | object[]`,children:[_jsx(_components.p,{children:`For classic credit systems: maps metered features to flat or graduated credit costs.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`metered_feature_id`,type:`string | any`,children:_jsx(_components.p,{children:`ID of the metered feature that draws from this credit system.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`billing_units`,type:`number`,children:_jsx(_components.p,{children:`Number of metered-feature units priced together. Defaults to one when omitted.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`dimensions.{key}`,type:`object | object`,children:_jsx(_components.p,{children:`Named rates chosen by event properties. The most specific match sets the rate; with no match the item’s own rate applies.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`multipliers.{key}`,type:`object`,children:[_jsx(_components.p,{children:`Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`match.{key}`,type:`string`,children:_jsx(_components.p,{children:`Event properties this entry applies to. Every key must equal the tracked property, compared as strings.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`factor`,type:`number`,children:_jsx(_components.p,{children:`Multiplies the matched rate. All matching multipliers stack.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`add`,type:`number`,children:_jsx(_components.p,{children:`Added to the rate after every factor is applied, in credits per billing-unit group.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`tier_behavior`,type:`any`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`tiers`,type:`object[]`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`to`,type:`number`,children:_jsx(_components.p,{children:`Inclusive upper usage boundary for this graduated tier. The final tier must be ‘inf’.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`credit_cost`,type:`number`,children:_jsx(_components.p,{children:`Credits consumed per billing-unit group within this tier.`})})})]})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`credit_cost`,type:`number`,children:_jsx(_components.p,{children:`Credits consumed per billing-unit group.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`model_markups.{key}`,type:`object | null`,children:[_jsx(_components.p,{children:`Per-model markup overrides for AI credit systems.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`markup`,type:`number`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`input_cost`,type:`number`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`output_cost`,type:`number`})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`default_markup`,type:`number`,children:_jsx(_components.p,{children:`Default percentage markup for AI credit systems. Use -100 to make usage free.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`provider_markups.{key}`,type:`object | null`,children:[_jsx(_components.p,{children:`Per-provider default markup percentages for AI credit systems.`}),_jsx(Expandable,{title:`properties`,children:_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`markup`,type:`number`})})})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`display`,type:`object`,children:[_jsx(_components.p,{children:`Display names for the feature in billing UI and customer-facing components.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`singular`,type:`string | null`,children:_jsx(_components.p,{children:`Singular form for UI display (e.g., ‘API call’, ‘seat’).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`plural`,type:`string | null`,children:_jsx(_components.p,{children:`Plural form for UI display (e.g., ‘API calls’, ‘seats’).`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`archived`,type:`boolean`,children:_jsx(_components.p,{children:`Whether the feature is archived and hidden from the dashboard.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`processors`,type:`object`,children:[_jsx(_components.p,{children:`Processor mappings for this feature. Present when a Stripe product or meter is set.`}),_jsx(Expandable,{title:`properties`,children:_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`stripe`,type:`object`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`product_id`,type:`string`,children:_jsx(_components.p,{children:`Stripe product ID this feature’s usage prices bill under.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`meter_id`,type:`string`,children:_jsx(_components.p,{children:`Stripe meter ID used to create this feature’s metered price.`})})})]})})})})]})})]})]})})]})]})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`preview`,type:`object`,children:[_jsx(_components.p,{children:`Upgrade/upsell information when access is denied. Only present if with_preview was true and allowed is false.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`scenario`,type:`'usage_limit' | 'feature_flag'`,children:_jsx(_components.p,{children:`The reason access was denied. ‘usage_limit’ means the customer exceeded their balance, ‘feature_flag’ means the feature is not included in their plan.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`title`,type:`string`,children:_jsx(_components.p,{children:`A title suitable for displaying in a paywall or upgrade modal.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`message`,type:`string`,children:_jsx(_components.p,{children:`A message explaining why access was denied.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`feature_id`,type:`string`,children:_jsx(_components.p,{children:`The ID of the feature that was checked.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`feature_name`,type:`string`,children:_jsx(_components.p,{children:`The display name of the feature.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`products`,type:`object[]`,children:[_jsx(_components.p,{children:`Products that would grant access to this feature. Use to display upgrade options.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`id`,type:`string`,children:_jsx(_components.p,{children:`The ID of the product you set when creating the product`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`name`,type:`string`,children:_jsx(_components.p,{children:`The name of the product`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`group`,type:`string | null`,children:_jsx(_components.p,{children:`Product group which this product belongs to`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`env`,type:`'sandbox' | 'live'`,children:_jsx(_components.p,{children:`The environment of the product`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`is_add_on`,type:`boolean`,children:_jsx(_components.p,{children:`Whether the product is an add-on and can be purchased alongside other products`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`is_default`,type:`boolean`,children:_jsx(_components.p,{children:`Whether the product is the default product`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`archived`,type:`boolean`,children:_jsx(_components.p,{children:`Whether this product has been archived and is no longer available`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`version`,type:`number`,children:_jsx(_components.p,{children:`The current version of the product`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`created_at`,type:`number`,children:_jsx(_components.p,{children:`The timestamp of when the product was created in milliseconds since epoch`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`items`,type:`object[]`,children:[_jsx(_components.p,{children:`Array of product items that define the product’s features and pricing`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`type`,type:`'feature' | 'priced_feature' | 'price'`,children:_jsx(_components.p,{children:`The type of the product item`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`feature_id`,type:`string | null`,children:_jsxs(_components.p,{children:[`The feature ID of the product item. If the item is a fixed price, should be `,_jsx(_components.code,{children:`null`})]})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`feature_type`,type:`'single_use' | 'continuous_use' | 'boolean' | 'static'`,children:_jsx(_components.p,{children:`Single use features are used once and then depleted, like API calls or credits. Continuous use features are those being used on an ongoing-basis, like storage or seats.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`included_usage`,type:`number | null`,children:_jsx(_components.p,{children:`The amount of usage included for this feature.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`interval`,type:`'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'`,children:_jsx(_components.p,{children:`The reset or billing interval of the product item. If null, feature will have no reset date, and if there’s a price, it will be billed one-off.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`interval_count`,type:`number | null`,children:_jsx(_components.p,{children:`The interval count of the product item.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`price`,type:`number | null`,children:_jsxs(_components.p,{children:[`The price of the product item. Should be `,_jsx(_components.code,{children:`null`}),` if tiered pricing is set.`]})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`tiers`,type:`any[] | null`,children:_jsx(_components.p,{children:`Tiered pricing for the product item. Not applicable for fixed price items.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`tier_behavior`,type:`'graduated' | 'volume'`,children:_jsx(_components.p,{children:`How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier). Defaults to graduated.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`usage_model`,type:`'prepaid' | 'pay_per_use'`,children:_jsx(_components.p,{children:`Whether the feature should be prepaid upfront or billed for how much they use end of billing period.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`billing_units`,type:`number | null`,children:_jsx(_components.p,{children:`The amount per billing unit (eg. $9 / 250 units)`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`reset_usage_when_enabled`,type:`boolean | null`,children:_jsx(_components.p,{children:`Whether the usage should be reset when the product is enabled.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`entity_feature_id`,type:`string | null`,children:_jsx(_components.p,{children:`The entity feature ID of the product item if applicable.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`display`,type:`object | null`,children:[_jsx(_components.p,{children:`The display of the product item.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`primary_text`,type:`string`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`secondary_text`,type:`string | null`})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`quantity`,type:`number | null`,children:_jsx(_components.p,{children:`Used in customer context. Quantity of the feature the customer has prepaid for.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`next_cycle_quantity`,type:`number | null`,children:_jsx(_components.p,{children:`Used in customer context. Quantity of the feature the customer will prepay for in the next cycle.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`config`,type:`object | null`,children:[_jsx(_components.p,{children:`Configuration for rollover and proration behavior of the feature.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`rollover`,type:`object | null`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`max`,type:`number | null`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`max_percentage`,type:`number | null`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`duration`,type:`'month' | 'forever'`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`length`,type:`number`})})]})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`on_increase`,type:`'bill_immediately' | 'prorate_immediately' | 'prorate_next_cycle' | 'bill_next_cycle'`})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`on_decrease`,type:`'prorate' | 'prorate_immediately' | 'prorate_next_cycle' | 'none' | 'no_prorations'`})})]})]})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`free_trial`,type:`object | null`,children:[_jsx(_components.p,{children:`Free trial configuration for this product, if available`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`duration`,type:`'day' | 'month' | 'year'`,children:_jsx(_components.p,{children:`The duration type of the free trial`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`length`,type:`number`,children:_jsx(_components.p,{children:`The length of the duration type specified`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`unique_fingerprint`,type:`boolean`,children:_jsx(_components.p,{children:`Whether the free trial is limited to one per customer fingerprint`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`card_required`,type:`boolean`,children:_jsx(_components.p,{children:`Whether the free trial requires a card. If false, the customer can attach the product without going through a checkout flow or having a card on file.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`on_end`,type:`'bill' | 'revert'`,children:_jsx(_components.p,{children:`Behavior when the trial ends. ‘bill’ charges the customer (default). ‘revert’ expires the trial and restores the customer’s previous plan.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`trial_available`,type:`boolean | null`,children:_jsx(_components.p,{children:`Used in customer context. Whether the free trial is available for the customer if they were to attach the product.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`base_variant_id`,type:`string | null`,children:_jsx(_components.p,{children:`ID of the base variant this product is derived from`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`billing_controls`,type:`object`,children:[_jsx(_components.p,{children:`Plan-level billing controls used as customer defaults`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`auto_topups`,type:`object[]`,children:[_jsx(_components.p,{children:`List of auto top-up configurations per feature.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`feature_id`,type:`string`,children:_jsx(_components.p,{children:`The ID of the feature (credit balance) to auto top-up.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`enabled`,type:`boolean`,children:_jsx(_components.p,{children:`Whether auto top-up is enabled.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`threshold`,type:`number`,children:_jsx(_components.p,{children:`When the balance drops below this threshold, an auto top-up will be purchased.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`quantity`,type:`number`,children:_jsx(_components.p,{children:`Amount of credits to add per auto top-up.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`purchase_limit`,type:`object`,children:[_jsx(_components.p,{children:`Optional rate limit to cap how often auto top-ups occur.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`interval`,type:`'hour' | 'day' | 'week' | 'month'`,children:_jsx(_components.p,{children:`The time interval for the purchase limit window.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`interval_count`,type:`number`,children:_jsx(_components.p,{children:`Number of intervals in the purchase limit window.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`limit`,type:`number`,children:_jsx(_components.p,{children:`Maximum number of auto top-ups allowed within the interval.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`invoice_mode`,type:`boolean`,children:_jsx(_components.p,{children:`When true, auto top-up creates a send_invoice invoice instead of auto-charging.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`spend_limits`,type:`object[]`,children:[_jsx(_components.p,{children:`List of overage spend limits per feature (caps overage spend).`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`feature_id`,type:`string`,children:_jsx(_components.p,{children:`Optional feature ID this spend limit applies to.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`enabled`,type:`boolean`,children:_jsx(_components.p,{children:`Whether the overage spend limit is enabled.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`limit_type`,type:`'absolute' | 'usage_percentage'`,children:_jsx(_components.p,{children:`How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`overage_limit`,type:`number`,children:_jsx(_components.p,{children:`Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`skip_overage_billing`,type:`boolean`,children:_jsx(_components.p,{children:`When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`usage_limits`,type:`object[]`,children:[_jsx(_components.p,{children:`List of hard usage caps per feature (max units per interval).`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`feature_id`,type:`string`,children:_jsx(_components.p,{children:`The feature this usage limit applies to.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`enabled`,type:`boolean`,children:_jsx(_components.p,{children:`Whether this usage limit is enabled.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`limit`,type:`number`,children:_jsx(_components.p,{children:`Maximum units allowed per interval.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`interval`,type:`'day' | 'week' | 'month' | 'year'`,children:_jsx(_components.p,{children:`Interval for the cap, aligned to the customer’s billing cycle.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`anchor`,type:`'billing_cycle' | 'utc'`,children:_jsx(_components.p,{children:`Window alignment. ‘billing_cycle’ phases the interval to the customer’s renewal time; ‘utc’ aligns to the UTC calendar.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`filter`,type:`object`,children:[_jsx(_components.p,{children:`When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.`}),_jsx(Expandable,{title:`properties`,children:_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`properties.{key}`,type:`string`})})})]})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`usage_alerts`,type:`object[]`,children:[_jsx(_components.p,{children:`List of usage alert configurations per feature.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`feature_id`,type:`string`,children:_jsx(_components.p,{children:`The feature ID this alert applies to.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`enabled`,type:`boolean`,children:_jsx(_components.p,{children:`Whether this usage alert is enabled.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`threshold`,type:`number`,children:_jsx(_components.p,{children:`The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage_percentage or remaining_percentage, this is a percentage (0-100).`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`threshold_type`,type:`'usage' | 'usage_percentage' | 'remaining' | 'remaining_percentage'`,children:_jsx(_components.p,{children:`Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`basis`,type:`'balance' | 'included' | 'recurring' | 'usage_limit'`,children:_jsx(_components.p,{children:`What 100% means. balance: every grant on the feature. included: the plan allowance only. recurring: grants that reset. usage_limit: the cap of the usage limit with the same feature and filter.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`filter`,type:`object`,children:[_jsx(_components.p,{children:`Only valid with basis usage_limit. Points the alert at the usage limit carrying the same filter.`}),_jsx(Expandable,{title:`properties`,children:_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`properties.{key}`,type:`string`})})})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`name`,type:`string`,children:_jsx(_components.p,{children:`Optional user-defined label to distinguish multiple alerts on the same feature.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`overage_allowed`,type:`object[]`,children:[_jsx(_components.p,{children:`List of overage allowed controls per feature. When enabled, usage can exceed balance.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`feature_id`,type:`string`,children:_jsx(_components.p,{children:`The feature ID this overage allowed control applies to.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`enabled`,type:`boolean`,children:_jsx(_components.p,{children:`Whether overage is allowed for this feature.`})})})]})]})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`scenario`,type:`'scheduled' | 'active' | 'new' | 'renew' | 'upgrade' | 'update_prepaid_quantity' | 'downgrade' | 'cancel' | 'expired' | 'past_due'`,children:_jsx(_components.p,{children:`Scenario for when this product is used in attach flows`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`properties`,type:`object`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`is_free`,type:`boolean`,children:_jsx(_components.p,{children:`True if the product has no base price or usage prices`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`is_one_off`,type:`boolean`,children:_jsx(_components.p,{children:`True if the product only contains a one-time price`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`interval_group`,type:`string | null`,children:_jsx(_components.p,{children:`The billing interval group for recurring products (e.g., ‘monthly’, ‘yearly’)`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`has_trial`,type:`boolean | null`,children:_jsx(_components.p,{children:`True if the product includes a free trial`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`updateable`,type:`boolean | null`,children:_jsx(_components.p,{children:`True if the product can be updated after creation (only applicable if there are prepaid recurring prices)`})})})]})})})]})]})})]})]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{DynamicResponseExample,DynamicResponseField,DynamicParamField,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Check Permissions","openapi":"openapi POST /v1/balances.check","description":"Checks whether a customer currently has enough balance to use a feature.\n\nUse this to gate access before a feature action. Enable sendEvent when you want to check and consume balance atomically in one request.","href":"/api-reference/core/check"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[158,4333,")=>null;const DynamicResponseField=()=>null;const DynamicParamField=()=>null;fun"],[4513,4517,"ResponseExample,_Mdx"],[4805,4820,"ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!_MdxComponentBo"],[93071,93561,",`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`200`,numberOfLines:`33`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`33`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"allowed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customer_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cus_123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"entity_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"required_balance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"balance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"feature_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"messages\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"granted\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`100`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"remaining\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`72`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`28`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unlimited\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"overage_allowed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"max_purchase\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"next_reset_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1773851121437`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"breakdown\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cus_ent_39qmLooixXLAqMywgXywjAz96rV\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"plan_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pro_plan\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"included_grant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`100`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prepaid_grant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"remaining\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`72`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`28`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unlimited\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reset\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"interval\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"month\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"resets_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1773851121437`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"expires_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{DynamicResponseExample,DynamicResponseField,DynamicParamField,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.\")}"]]},"mdxExtracts":{"tableOfContents":[{"title":"Common Use Cases","slug":"common-use-cases","depth":3,"children":[]},{"title":"Body Parameters","slug":"body-parameters","depth":3,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]}],"codeExamples":{"response":{"type":"ResponseExample","children":[{"filename":"200","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"33\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"allowed\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"customer_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"cus_123\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"entity_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"required_balance\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"balance\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"feature_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"messages\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"granted\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">100\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"remaining\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">72\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"usage\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">28\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"unlimited\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"overage_allowed\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"max_purchase\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"next_reset_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1773851121437\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"breakdown\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"cus_ent_39qmLooixXLAqMywgXywjAz96rV\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"plan_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"pro_plan\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"included_grant\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">100\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"prepaid_grant\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"remaining\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">72\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"usage\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">28\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"unlimited\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"reset\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"interval\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"month\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"resets_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1773851121437\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"price\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"expires_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":["/_mintlify/custom/autumn-b9b4c0fb/d78b8c063824141d/dynamic-response.js"],"openApiReferenceData":{"operation":{"operationId":"check","description":"Checks whether a customer currently has enough balance to use a feature.\n\nUse this to gate access before a feature action. Enable sendEvent when you want to check and consume balance atomically in one request.","requestBody":"acbb9906-e1eb-4bbd-baf2-f0d0ee37b777","responses":{"200":"760d38de-ad6d-40b3-8c25-ffce93aa2226","202":"d39ff3b8-ed33-4bec-8407-90db59170881"},"x-speakeasy-name-override":"check","parameters":["ba8be925-69c9-40dd-b397-60fbf85f81d0"],"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Autumn } from 'autumn-js'\n\nconst autumn = new Autumn()\n\nconst result = await autumn.check({\n customerId: \"cus_123\",\n featureId: \"messages\",\n});"},{"lang":"python","label":"Python (SDK)","source":"from autumn_sdk import Autumn\n\nautumn = Autumn(secret_key=\"am_sk_test...\")\n\nres = autumn.check(\n customer_id=\"cus_123\",\n feature_id=\"messages\",\n)"}],"method":"post","type":"path","servers":["fe6701f7-be5c-40aa-b244-1a6f83c52f58"],"security":["53876c4e-3cd5-4c7e-b82b-fb98671718cb"],"path":"/v1/balances.check","baseUrlOptions":["https://api.useautumn.com"],"title":"","codeSamples":[{"label":"Typescript (SDK)","lang":"typescript","source":"import { Autumn } from 'autumn-js'\n\nconst autumn = new Autumn()\n\nconst result = await autumn.check({\n customerId: \"cus_123\",\n featureId: \"messages\",\n});"},{"label":"Python (SDK)","lang":"python","source":"from autumn_sdk import Autumn\n\nautumn = Autumn(secret_key=\"am_sk_test...\")\n\nres = autumn.check(\n customer_id=\"cus_123\",\n feature_id=\"messages\",\n)"}],"requestExampleLanguages":["typescript","python","bash"],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExamples":[{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"33","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"allowed\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"true"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"customer_id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"cus_123\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"entity_id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"required_balance\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"1"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"balance\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"feature_id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"messages\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"granted\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"100"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"remaining\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"72"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"usage\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"28"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"unlimited\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"false"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"overage_allowed\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"false"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"max_purchase\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"next_reset_at\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"1773851121437"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"breakdown\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": ["}}]}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" {"}}}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"cus_ent_39qmLooixXLAqMywgXywjAz96rV\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"plan_id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"pro_plan\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"36","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"included_grant\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"100"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"38","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"prepaid_grant\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"0"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"40","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"remaining\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"72"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"42","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"usage\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"28"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"44","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"unlimited\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"false"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"46","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"reset\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"48","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"interval\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"month\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"50","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"resets_at\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"1773851121437"}}]}},"\n",{"type":"span","key":"52","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" },"}}}},"\n",{"type":"span","key":"54","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"price\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"56","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"expires_at\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}}]}},"\n",{"type":"span","key":"58","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"60","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" ]"}}}},"\n",{"type":"span","key":"62","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"64","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"200"}],"responseExampleType":"mdx"},"dependencies":{"parameters":{"ba8be925-69c9-40dd-b397-60fbf85f81d0":{"name":"x-api-version","in":"header","required":true,"schema":{"type":"string","default":"2.6.0","isRequired":true,"uniqueKey":"","typeLabel":"string"},"x-speakeasy-globals-hidden":true}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer_id":{"type":"string","description":"The ID of the customer.","isRequired":true,"uniqueKey":"customer_id","typeLabel":"string"},"feature_id":{"type":"string","description":"The ID of the feature.","isRequired":true,"uniqueKey":"feature_id","typeLabel":"string"},"entity_id":{"type":"string","description":"The ID of the entity for entity-scoped balances (e.g., per-seat limits).","uniqueKey":"entity_id","typeLabel":"string"},"required_balance":{"type":"number","description":"Minimum balance required for access. Returns allowed: false if the customer's balance is below this value. Defaults to 1.","uniqueKey":"required_balance","typeLabel":"number"},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"properties.additionalProperties","typeLabel":"any"},"description":"Additional properties to attach to the usage event if send_event is true.","uniqueKey":"properties","typeLabel":"object"},"send_event":{"type":"boolean","description":"If true, atomically records a usage event while checking access. The required_balance value is used as the usage amount. Combines check + track in one call.","uniqueKey":"send_event","typeLabel":"boolean"},"lock":{"type":"object","properties":{"lock_id":{"type":"string","maxLength":256,"description":"A unique identifier for this lock. Used to finalize the lock later via balances.finalize.","isRequired":true,"uniqueKey":"lock.lock_id","typeLabel":"string"},"enabled":{"const":true,"description":"Must be true to enable locking.","isRequired":true,"uniqueKey":"lock.enabled","typeLabel":"any"},"expires_at":{"type":"number","description":"Unix timestamp (ms) when the lock automatically expires and releases the held balance.","uniqueKey":"lock.expires_at","typeLabel":"number"},"overage_behavior":{"description":"How to handle a lock that exceeds the available balance. \"reject\" (default) returns allowed: false and reserves nothing. \"cap\" reserves only what fits and returns allowed: true. \"overflow\" reserves the full value: the balance can go negative, though spend limits still apply. balances.finalize reuses the behavior chosen here.","enum":["cap","overflow"],"type":"string","uniqueKey":"lock.overage_behavior","typeLabel":"enum\u003cstring>"}},"required":["lock_id","enabled"],"description":"Reserve units of a feature upfront by passing a lock_id, then call balances.finalize to confirm or release the hold.","uniqueKey":"lock","typeLabel":"object"},"with_preview":{"type":"boolean","description":"If true, includes upgrade/upsell information in the response when access is denied. Useful for displaying paywalls.","uniqueKey":"with_preview","typeLabel":"boolean"}},"required":["customer_id","feature_id"],"title":"CheckParams","examples":[{"customer_id":"cus_123","feature_id":"messages"},{"customer_id":"cus_123","feature_id":"messages","required_balance":3,"send_event":true}],"uniqueKey":"","typeLabel":"CheckParams · object"},"example":{"customer_id":"cus_123","feature_id":"messages"},"examples":{"Example":{"title":"Example","value":{"customer_id":"cus_123","feature_id":"messages"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"760d38de-ad6d-40b3-8c25-ffce93aa2226":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"allowed":{"type":"boolean","description":"Whether the customer is allowed to use the feature. True if they have sufficient balance or the feature is unlimited/boolean.","isRequired":true,"uniqueKey":"allowed","typeLabel":"boolean"},"customer_id":{"type":"string","description":"The ID of the customer that was checked.","isRequired":true,"uniqueKey":"customer_id","typeLabel":"string"},"balance":{"oneOf":[{"type":"object","description":"The customer's balance for this feature. Null if the customer has no balance for this feature.","required":["feature_id","granted","remaining","usage","unlimited","overage_allowed","max_purchase","next_reset_at"],"example":{"feature_id":"messages","granted":100,"remaining":72,"usage":28,"unlimited":false,"overage_allowed":false,"max_purchase":null,"next_reset_at":1773851121437,"breakdown":[{"id":"cus_ent_39qmLooixXLAqMywgXywjAz96rV","plan_id":"pro_plan","included_grant":100,"prepaid_grant":0,"remaining":72,"usage":28,"unlimited":false,"reset":{"interval":"month","resets_at":1773851121437},"price":null,"expires_at":null}]},"properties":{"feature_id":{"type":"string","description":"The feature ID this balance is for.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature_id","typeLabel":"string"},"granted":{"type":"number","description":"Total balance granted (included + prepaid).","isRequired":true,"uniqueKey":"balance.oneOf.0.granted","typeLabel":"number"},"remaining":{"type":"number","minimum":0,"description":"Remaining balance available for use.","isRequired":true,"uniqueKey":"balance.oneOf.0.remaining","typeLabel":"number"},"usage":{"type":"number","description":"Total usage consumed in the current period.","isRequired":true,"uniqueKey":"balance.oneOf.0.usage","typeLabel":"number"},"unlimited":{"type":"boolean","description":"Whether this feature has unlimited usage.","isRequired":true,"uniqueKey":"balance.oneOf.0.unlimited","typeLabel":"boolean"},"overage_allowed":{"type":"boolean","description":"Whether usage beyond the granted balance is allowed (with overage charges).","isRequired":true,"uniqueKey":"balance.oneOf.0.overage_allowed","typeLabel":"boolean"},"max_purchase":{"oneOf":[{"type":"number","description":"Maximum quantity that can be purchased as a top-up, or null for unlimited.","isRequired":true,"uniqueKey":"balance.oneOf.0.max_purchase.oneOf.0","typeLabel":"number"},{"type":"null","description":"Maximum quantity that can be purchased as a top-up, or null for unlimited.","isRequired":true,"uniqueKey":"balance.oneOf.0.max_purchase.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.max_purchase","typeLabel":"number | null"},"next_reset_at":{"oneOf":[{"type":"number","description":"Timestamp when the balance will reset, or null for no reset.","isRequired":true,"uniqueKey":"balance.oneOf.0.next_reset_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Timestamp when the balance will reset, or null for no reset.","isRequired":true,"uniqueKey":"balance.oneOf.0.next_reset_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.next_reset_at","typeLabel":"number | null"},"feature":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this feature, used in /check and /track calls.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.id","typeLabel":"string"},"name":{"type":"string","description":"Human-readable name displayed in the dashboard and billing UI.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.name","typeLabel":"string"},"type":{"enum":["boolean","metered","credit_system","ai_credit_system"],"type":"string","description":"Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.type","typeLabel":"enum\u003cstring>"},"consumable":{"type":"boolean","description":"For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage).","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.consumable","typeLabel":"boolean"},"archived":{"type":"boolean","description":"Whether the feature is archived and hidden from the dashboard.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.archived","typeLabel":"boolean"},"combine":{"enum":["sum","max","min"],"type":"string","description":"How grants of this feature from several plans combine: 'sum' adds them up, 'max' / 'min' keep the highest / lowest grant among plan items with no price. Omitted when 'sum'.","uniqueKey":"balance.oneOf.0.feature.combine","typeLabel":"enum\u003cstring>"},"event_names":{"type":"array","items":{"type":"string","uniqueKey":"balance.oneOf.0.feature.event_names.items.[INDEX]","typeLabel":"string"},"description":"Event names that trigger this feature's balance. Allows multiple features to respond to a single event.","uniqueKey":"balance.oneOf.0.feature.event_names","typeLabel":"string[]"},"credit_schema":{"type":"array","items":{"oneOf":[{"type":"object","required":["metered_feature_id","tier_behavior","tiers"],"properties":{"metered_feature_id":{"type":"string","minLength":1,"description":"ID of the metered feature that draws from this credit system.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.metered_feature_id","typeLabel":"string"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers","typeLabel":"object[]"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["metered_feature_id","credit_cost"],"properties":{"metered_feature_id":{"type":"string","minLength":1,"description":"ID of the metered feature that draws from this credit system.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.metered_feature_id","typeLabel":"string"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.credit_cost","typeLabel":"number"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","required":["metered_feature_id","credit_cost"],"properties":{"metered_feature_id":{"const":"","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.metered_feature_id","typeLabel":"any"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.credit_cost","typeLabel":"number"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2","typeLabel":"object"}],"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX]","typeLabel":"object"},"description":"For classic credit systems: maps metered features to flat or graduated credit costs.","uniqueKey":"balance.oneOf.0.feature.credit_schema","typeLabel":"object[]"},"model_markups":{"oneOf":[{"type":"object","description":"Per-model markup overrides for AI credit systems.","additionalProperties":{"type":"object","properties":{"markup":{"type":"number","minimum":-100,"uniqueKey":"balance.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.markup","typeLabel":"number"},"input_cost":{"type":"number","minimum":0,"uniqueKey":"balance.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.input_cost","typeLabel":"number"},"output_cost":{"type":"number","minimum":0,"uniqueKey":"balance.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.output_cost","typeLabel":"number"}},"uniqueKey":"balance.oneOf.0.feature.model_markups.oneOf.0.additionalProperties","typeLabel":"object"},"uniqueKey":"balance.oneOf.0.feature.model_markups.oneOf.0","typeLabel":"object"},{"type":"null","description":"Per-model markup overrides for AI credit systems.","uniqueKey":"balance.oneOf.0.feature.model_markups.oneOf.1","typeLabel":"null"}],"uniqueKey":"balance.oneOf.0.feature.model_markups","typeLabel":"object | null"},"default_markup":{"type":"number","minimum":-100,"description":"Default percentage markup for AI credit systems. Use -100 to make usage free.","uniqueKey":"balance.oneOf.0.feature.default_markup","typeLabel":"number"},"provider_markups":{"oneOf":[{"type":"object","description":"Per-provider default markup percentages for AI credit systems.","additionalProperties":{"type":"object","properties":{"markup":{"type":"number","minimum":-100,"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.provider_markups.oneOf.0.additionalProperties.markup","typeLabel":"number"}},"required":["markup"],"uniqueKey":"balance.oneOf.0.feature.provider_markups.oneOf.0.additionalProperties","typeLabel":"object"},"uniqueKey":"balance.oneOf.0.feature.provider_markups.oneOf.0","typeLabel":"object"},{"type":"null","description":"Per-provider default markup percentages for AI credit systems.","uniqueKey":"balance.oneOf.0.feature.provider_markups.oneOf.1","typeLabel":"null"}],"uniqueKey":"balance.oneOf.0.feature.provider_markups","typeLabel":"object | null"},"display":{"type":"object","properties":{"singular":{"oneOf":[{"type":"string","description":"Singular form for UI display (e.g., 'API call', 'seat').","uniqueKey":"balance.oneOf.0.feature.display.singular.oneOf.0","typeLabel":"string"},{"type":"null","description":"Singular form for UI display (e.g., 'API call', 'seat').","uniqueKey":"balance.oneOf.0.feature.display.singular.oneOf.1","typeLabel":"null"}],"uniqueKey":"balance.oneOf.0.feature.display.singular","typeLabel":"string | null"},"plural":{"oneOf":[{"type":"string","description":"Plural form for UI display (e.g., 'API calls', 'seats').","uniqueKey":"balance.oneOf.0.feature.display.plural.oneOf.0","typeLabel":"string"},{"type":"null","description":"Plural form for UI display (e.g., 'API calls', 'seats').","uniqueKey":"balance.oneOf.0.feature.display.plural.oneOf.1","typeLabel":"null"}],"uniqueKey":"balance.oneOf.0.feature.display.plural","typeLabel":"string | null"}},"description":"Display names for the feature in billing UI and customer-facing components.","uniqueKey":"balance.oneOf.0.feature.display","typeLabel":"object"},"processors":{"type":"object","properties":{"stripe":{"type":"object","properties":{"product_id":{"type":"string","description":"Stripe product ID this feature's usage prices bill under.","uniqueKey":"balance.oneOf.0.feature.processors.stripe.product_id","typeLabel":"string"},"meter_id":{"type":"string","description":"Stripe meter ID used to create this feature's metered price.","uniqueKey":"balance.oneOf.0.feature.processors.stripe.meter_id","typeLabel":"string"}},"uniqueKey":"balance.oneOf.0.feature.processors.stripe","typeLabel":"object"}},"x-atmn-mapping":true,"description":"Processor mappings for this feature. Present when a Stripe product or meter is set.","uniqueKey":"balance.oneOf.0.feature.processors","typeLabel":"object"}},"required":["id","name","type","consumable","archived"],"description":"The full feature object if expanded.","uniqueKey":"balance.oneOf.0.feature","typeLabel":"object"},"breakdown":{"type":"array","items":{"type":"object","properties":{"plan_id":{"oneOf":[{"type":"string","description":"The plan ID this balance originates from, or null for standalone and pooled balances.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].plan_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The plan ID this balance originates from, or null for standalone and pooled balances.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].plan_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].plan_id","typeLabel":"string | null"},"included_grant":{"type":"number","description":"Amount granted from the plan's included usage.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].included_grant","typeLabel":"number"},"prepaid_grant":{"type":"number","description":"Amount granted from prepaid purchases or top-ups.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].prepaid_grant","typeLabel":"number"},"remaining":{"type":"number","description":"Remaining balance available for use.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].remaining","typeLabel":"number"},"usage":{"type":"number","description":"Amount consumed in the current period.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].usage","typeLabel":"number"},"unlimited":{"type":"boolean","description":"Whether this balance has unlimited usage.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].unlimited","typeLabel":"boolean"},"reset":{"oneOf":[{"type":"object","description":"Reset configuration for this balance, or null if no reset.","required":["interval","resets_at"],"properties":{"interval":{"oneOf":[{"type":"string","description":"The reset interval (hour, day, week, month, etc.) or 'multiple' if combined from different intervals.","enum":["one_off","minute","hour","day","week","month","quarter","semi_annual","year"],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.interval.oneOf.0","typeLabel":"enum\u003cstring>"},{"description":"The reset interval (hour, day, week, month, etc.) or 'multiple' if combined from different intervals.","const":"multiple","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.interval.oneOf.1","typeLabel":"any"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.interval","typeLabel":"enum\u003cstring> | any"},"resets_at":{"oneOf":[{"type":"number","description":"Timestamp when the balance will next reset.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.resets_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Timestamp when the balance will next reset.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.resets_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.resets_at","typeLabel":"number | null"},"interval_count":{"type":"number","description":"Number of intervals between resets (eg. 2 for bi-monthly).","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.interval_count","typeLabel":"number"}},"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0","typeLabel":"object"},{"type":"null","description":"Reset configuration for this balance, or null if no reset.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset","typeLabel":"object | null"},"price":{"oneOf":[{"type":"object","description":"Pricing configuration if this balance has usage-based pricing.","required":["billing_units","billing_method","max_purchase"],"properties":{"billing_units":{"type":"number","description":"The number of units per billing increment (eg. $9 / 250 units).","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.billing_units","typeLabel":"number"},"billing_method":{"enum":["prepaid","usage_based"],"type":"string","description":"Whether usage is prepaid or billed pay-per-use.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.billing_method","typeLabel":"enum\u003cstring>"},"max_purchase":{"oneOf":[{"type":"number","description":"Maximum quantity that can be purchased, or null for unlimited.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.max_purchase.oneOf.0","typeLabel":"number"},{"type":"null","description":"Maximum quantity that can be purchased, or null for unlimited.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.max_purchase.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.max_purchase","typeLabel":"number | null"},"amount":{"type":"number","description":"The per-unit price amount.","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.amount","typeLabel":"number"},"tiers":{"type":"array","items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"const":"inf","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"any"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | any"},"amount":{"type":"number","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].amount","typeLabel":"number"},"flat_amount":{"type":"number","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].flat_amount","typeLabel":"number"}},"required":["to","amount"],"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"description":"Tiered pricing configuration if applicable.","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers","typeLabel":"object[]"},"tier_behavior":{"enum":["graduated","volume"],"type":"string","description":"How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier).","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tier_behavior","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0","typeLabel":"object"},{"type":"null","description":"Pricing configuration if this balance has usage-based pricing.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price","typeLabel":"object | null"},"expires_at":{"oneOf":[{"type":"number","description":"Timestamp when this balance expires, or null for no expiration.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].expires_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Timestamp when this balance expires, or null for no expiration.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].expires_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].expires_at","typeLabel":"number | null"},"id":{"type":"string","default":"","description":"The unique identifier for this balance breakdown.","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].id","typeLabel":"string"},"source":{"enum":["customer","entity"],"type":"string","readOnly":true,"description":"Where this row's credits come from: shared at the customer level, or owned by the entity.","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].source","typeLabel":"enum\u003cstring>"},"allocation":{"oneOf":[{"type":"object","description":"Set when this row's numbers are the entity's allocated share of the customer's credits.","required":["amount"],"properties":{"amount":{"type":"number","description":"The amount allocated to this entity.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].allocation.oneOf.0.amount","typeLabel":"number"}},"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].allocation.oneOf.0","typeLabel":"object"},{"type":"null","description":"Set when this row's numbers are the entity's allocated share of the customer's credits.","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].allocation.oneOf.1","typeLabel":"null"}],"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].allocation","typeLabel":"object | null"},"contributions":{"type":"object","properties":{"list":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].id","typeLabel":"string"},"entity_id":{"oneOf":[{"type":"string","description":"Entity holding the contributing plan. Null for customer-level plans.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Entity holding the contributing plan. Null for customer-level plans.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_id","typeLabel":"string | null"},"entity_name":{"oneOf":[{"type":"string","description":"Display name of the contributing entity.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Display name of the contributing entity.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_name","typeLabel":"string | null"},"plan_id":{"type":"string","description":"The plan contributing to the pool.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].plan_id","typeLabel":"string"},"plan_name":{"oneOf":[{"type":"string","description":"Display name of the contributing plan.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].plan_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Display name of the contributing plan.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].plan_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].plan_name","typeLabel":"string | null"},"current_contribution":{"type":"number","description":"Amount this source contributes to the pool this cycle.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].current_contribution","typeLabel":"number"},"next_cycle_contribution":{"type":"number","description":"Amount this source will contribute next cycle.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].next_cycle_contribution","typeLabel":"number"},"competes":{"type":"boolean","description":"True when this source competes under a 'max' / 'min' feature: only the winning competing share counts, instead of adding up.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].competes","typeLabel":"boolean"},"unlimited":{"type":"boolean","description":"True when this source grants unlimited usage, either as a competing source or as an unlimited share riding a limited pool.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].unlimited","typeLabel":"boolean"},"created_at":{"type":"number","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].created_at","typeLabel":"number"}},"required":["id","entity_id","entity_name","plan_id","plan_name","current_contribution","next_cycle_contribution","competes","unlimited","created_at"],"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX]","typeLabel":"object"},"description":"The first 10 plans contributing to the pool, competing shares first, then newest.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list","typeLabel":"object[]"},"total_count":{"type":"number","description":"Total number of plans contributing to the pool.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.total_count","typeLabel":"number"}},"required":["list","total_count"],"description":"The plans funding this shared pooled balance, usually on the customer's entities, and how much each adds this cycle and next. Present on pooled rows when expand includes `pooled_contributions`.","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions","typeLabel":"object"}},"required":["plan_id","included_grant","prepaid_grant","remaining","usage","unlimited","reset","price","expires_at"],"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX]","typeLabel":"object"},"description":"Detailed breakdown of balance sources when stacking multiple plans or grants.","uniqueKey":"balance.oneOf.0.breakdown","typeLabel":"object[]"},"rollovers":{"type":"array","items":{"type":"object","properties":{"granted":{"type":"number","description":"Amount originally rolled over from a previous period, before any of it was consumed.","isRequired":true,"uniqueKey":"balance.oneOf.0.rollovers.items.[INDEX].granted","typeLabel":"number"},"balance":{"type":"number","description":"Amount of balance rolled over from a previous period.","isRequired":true,"uniqueKey":"balance.oneOf.0.rollovers.items.[INDEX].balance","typeLabel":"number"},"expires_at":{"type":"number","description":"Timestamp when the rollover balance expires.","isRequired":true,"uniqueKey":"balance.oneOf.0.rollovers.items.[INDEX].expires_at","typeLabel":"number"}},"required":["granted","balance","expires_at"],"uniqueKey":"balance.oneOf.0.rollovers.items.[INDEX]","typeLabel":"object"},"description":"Rollover balances carried over from previous periods.","uniqueKey":"balance.oneOf.0.rollovers","typeLabel":"object[]"},"allocated":{"type":"number","readOnly":true,"description":"Shared credits held for entities by allocations; present only when the customer allocates this feature.","uniqueKey":"balance.oneOf.0.allocated","typeLabel":"number"},"unallocated":{"type":"number","readOnly":true,"description":"Remaining shared credits no allocation holds; any entity may use them.","uniqueKey":"balance.oneOf.0.unallocated","typeLabel":"number"}},"isRequired":true,"uniqueKey":"balance.oneOf.0","typeLabel":"object"},{"type":"null","description":"The customer's balance for this feature. Null if the customer has no balance for this feature.","isRequired":true,"uniqueKey":"balance.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance","typeLabel":"object | null"},"flag":{"oneOf":[{"type":"object","description":"The flag associated with this check, if any.","required":["id","plan_id","expires_at","feature_id"],"example":{"id":"cus_ent_39qmLooixXLAqMywgXywjAz96rV","plan_id":"pro_plan","expires_at":null,"feature_id":"dashboard"},"properties":{"id":{"type":"string","description":"The unique identifier for this flag.","isRequired":true,"uniqueKey":"flag.oneOf.0.id","typeLabel":"string"},"plan_id":{"oneOf":[{"type":"string","description":"The plan ID this flag originates from, or null for standalone flags.","isRequired":true,"uniqueKey":"flag.oneOf.0.plan_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The plan ID this flag originates from, or null for standalone flags.","isRequired":true,"uniqueKey":"flag.oneOf.0.plan_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"flag.oneOf.0.plan_id","typeLabel":"string | null"},"expires_at":{"oneOf":[{"type":"number","description":"Timestamp when this flag expires, or null for no expiration.","isRequired":true,"uniqueKey":"flag.oneOf.0.expires_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Timestamp when this flag expires, or null for no expiration.","isRequired":true,"uniqueKey":"flag.oneOf.0.expires_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"flag.oneOf.0.expires_at","typeLabel":"number | null"},"feature_id":{"type":"string","description":"The feature ID this flag is for.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature_id","typeLabel":"string"},"feature":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this feature, used in /check and /track calls.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.id","typeLabel":"string"},"name":{"type":"string","description":"Human-readable name displayed in the dashboard and billing UI.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.name","typeLabel":"string"},"type":{"enum":["boolean","metered","credit_system","ai_credit_system"],"type":"string","description":"Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.type","typeLabel":"enum\u003cstring>"},"consumable":{"type":"boolean","description":"For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage).","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.consumable","typeLabel":"boolean"},"archived":{"type":"boolean","description":"Whether the feature is archived and hidden from the dashboard.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.archived","typeLabel":"boolean"},"combine":{"enum":["sum","max","min"],"type":"string","description":"How grants of this feature from several plans combine: 'sum' adds them up, 'max' / 'min' keep the highest / lowest grant among plan items with no price. Omitted when 'sum'.","uniqueKey":"flag.oneOf.0.feature.combine","typeLabel":"enum\u003cstring>"},"event_names":{"type":"array","items":{"type":"string","uniqueKey":"flag.oneOf.0.feature.event_names.items.[INDEX]","typeLabel":"string"},"description":"Event names that trigger this feature's balance. Allows multiple features to respond to a single event.","uniqueKey":"flag.oneOf.0.feature.event_names","typeLabel":"string[]"},"credit_schema":{"type":"array","items":{"oneOf":[{"type":"object","required":["metered_feature_id","tier_behavior","tiers"],"properties":{"metered_feature_id":{"type":"string","minLength":1,"description":"ID of the metered feature that draws from this credit system.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.metered_feature_id","typeLabel":"string"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers","typeLabel":"object[]"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["metered_feature_id","credit_cost"],"properties":{"metered_feature_id":{"type":"string","minLength":1,"description":"ID of the metered feature that draws from this credit system.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.metered_feature_id","typeLabel":"string"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.credit_cost","typeLabel":"number"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","required":["metered_feature_id","credit_cost"],"properties":{"metered_feature_id":{"const":"","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.metered_feature_id","typeLabel":"any"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.credit_cost","typeLabel":"number"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2","typeLabel":"object"}],"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX]","typeLabel":"object"},"description":"For classic credit systems: maps metered features to flat or graduated credit costs.","uniqueKey":"flag.oneOf.0.feature.credit_schema","typeLabel":"object[]"},"model_markups":{"oneOf":[{"type":"object","description":"Per-model markup overrides for AI credit systems.","additionalProperties":{"type":"object","properties":{"markup":{"type":"number","minimum":-100,"uniqueKey":"flag.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.markup","typeLabel":"number"},"input_cost":{"type":"number","minimum":0,"uniqueKey":"flag.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.input_cost","typeLabel":"number"},"output_cost":{"type":"number","minimum":0,"uniqueKey":"flag.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.output_cost","typeLabel":"number"}},"uniqueKey":"flag.oneOf.0.feature.model_markups.oneOf.0.additionalProperties","typeLabel":"object"},"uniqueKey":"flag.oneOf.0.feature.model_markups.oneOf.0","typeLabel":"object"},{"type":"null","description":"Per-model markup overrides for AI credit systems.","uniqueKey":"flag.oneOf.0.feature.model_markups.oneOf.1","typeLabel":"null"}],"uniqueKey":"flag.oneOf.0.feature.model_markups","typeLabel":"object | null"},"default_markup":{"type":"number","minimum":-100,"description":"Default percentage markup for AI credit systems. Use -100 to make usage free.","uniqueKey":"flag.oneOf.0.feature.default_markup","typeLabel":"number"},"provider_markups":{"oneOf":[{"type":"object","description":"Per-provider default markup percentages for AI credit systems.","additionalProperties":{"type":"object","properties":{"markup":{"type":"number","minimum":-100,"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.provider_markups.oneOf.0.additionalProperties.markup","typeLabel":"number"}},"required":["markup"],"uniqueKey":"flag.oneOf.0.feature.provider_markups.oneOf.0.additionalProperties","typeLabel":"object"},"uniqueKey":"flag.oneOf.0.feature.provider_markups.oneOf.0","typeLabel":"object"},{"type":"null","description":"Per-provider default markup percentages for AI credit systems.","uniqueKey":"flag.oneOf.0.feature.provider_markups.oneOf.1","typeLabel":"null"}],"uniqueKey":"flag.oneOf.0.feature.provider_markups","typeLabel":"object | null"},"display":{"type":"object","properties":{"singular":{"oneOf":[{"type":"string","description":"Singular form for UI display (e.g., 'API call', 'seat').","uniqueKey":"flag.oneOf.0.feature.display.singular.oneOf.0","typeLabel":"string"},{"type":"null","description":"Singular form for UI display (e.g., 'API call', 'seat').","uniqueKey":"flag.oneOf.0.feature.display.singular.oneOf.1","typeLabel":"null"}],"uniqueKey":"flag.oneOf.0.feature.display.singular","typeLabel":"string | null"},"plural":{"oneOf":[{"type":"string","description":"Plural form for UI display (e.g., 'API calls', 'seats').","uniqueKey":"flag.oneOf.0.feature.display.plural.oneOf.0","typeLabel":"string"},{"type":"null","description":"Plural form for UI display (e.g., 'API calls', 'seats').","uniqueKey":"flag.oneOf.0.feature.display.plural.oneOf.1","typeLabel":"null"}],"uniqueKey":"flag.oneOf.0.feature.display.plural","typeLabel":"string | null"}},"description":"Display names for the feature in billing UI and customer-facing components.","uniqueKey":"flag.oneOf.0.feature.display","typeLabel":"object"},"processors":{"type":"object","properties":{"stripe":{"type":"object","properties":{"product_id":{"type":"string","description":"Stripe product ID this feature's usage prices bill under.","uniqueKey":"flag.oneOf.0.feature.processors.stripe.product_id","typeLabel":"string"},"meter_id":{"type":"string","description":"Stripe meter ID used to create this feature's metered price.","uniqueKey":"flag.oneOf.0.feature.processors.stripe.meter_id","typeLabel":"string"}},"uniqueKey":"flag.oneOf.0.feature.processors.stripe","typeLabel":"object"}},"x-atmn-mapping":true,"description":"Processor mappings for this feature. Present when a Stripe product or meter is set.","uniqueKey":"flag.oneOf.0.feature.processors","typeLabel":"object"}},"required":["id","name","type","consumable","archived"],"description":"The full feature object if expanded.","uniqueKey":"flag.oneOf.0.feature","typeLabel":"object"}},"isRequired":true,"uniqueKey":"flag.oneOf.0","typeLabel":"object"},{"type":"null","description":"The flag associated with this check, if any.","isRequired":true,"uniqueKey":"flag.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"flag","typeLabel":"object | null"},"entity_id":{"oneOf":[{"type":"string","description":"The ID of the entity, if an entity-scoped check was performed.","uniqueKey":"entity_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The ID of the entity, if an entity-scoped check was performed.","uniqueKey":"entity_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"entity_id","typeLabel":"string | null"},"required_balance":{"type":"number","description":"The required balance that was checked against.","uniqueKey":"required_balance","typeLabel":"number"},"balances":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{"type":"object","required":["feature_id","granted","remaining","usage","unlimited","overage_allowed","max_purchase","next_reset_at"],"example":{"feature_id":"messages","granted":100,"remaining":72,"usage":28,"unlimited":false,"overage_allowed":false,"max_purchase":null,"next_reset_at":1773851121437,"breakdown":[{"id":"cus_ent_39qmLooixXLAqMywgXywjAz96rV","plan_id":"pro_plan","included_grant":100,"prepaid_grant":0,"remaining":72,"usage":28,"unlimited":false,"reset":{"interval":"month","resets_at":1773851121437},"price":null,"expires_at":null}]},"properties":{"feature_id":{"type":"string","description":"The feature ID this balance is for.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature_id","typeLabel":"string"},"granted":{"type":"number","description":"Total balance granted (included + prepaid).","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.granted","typeLabel":"number"},"remaining":{"type":"number","minimum":0,"description":"Remaining balance available for use.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.remaining","typeLabel":"number"},"usage":{"type":"number","description":"Total usage consumed in the current period.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.usage","typeLabel":"number"},"unlimited":{"type":"boolean","description":"Whether this feature has unlimited usage.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.unlimited","typeLabel":"boolean"},"overage_allowed":{"type":"boolean","description":"Whether usage beyond the granted balance is allowed (with overage charges).","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.overage_allowed","typeLabel":"boolean"},"max_purchase":{"oneOf":[{"type":"number","description":"Maximum quantity that can be purchased as a top-up, or null for unlimited.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.max_purchase.oneOf.0","typeLabel":"number"},{"type":"null","description":"Maximum quantity that can be purchased as a top-up, or null for unlimited.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.max_purchase.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.max_purchase","typeLabel":"number | null"},"next_reset_at":{"oneOf":[{"type":"number","description":"Timestamp when the balance will reset, or null for no reset.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.next_reset_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Timestamp when the balance will reset, or null for no reset.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.next_reset_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.next_reset_at","typeLabel":"number | null"},"feature":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this feature, used in /check and /track calls.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.id","typeLabel":"string"},"name":{"type":"string","description":"Human-readable name displayed in the dashboard and billing UI.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.name","typeLabel":"string"},"type":{"enum":["boolean","metered","credit_system","ai_credit_system"],"type":"string","description":"Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.type","typeLabel":"enum\u003cstring>"},"consumable":{"type":"boolean","description":"For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage).","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.consumable","typeLabel":"boolean"},"archived":{"type":"boolean","description":"Whether the feature is archived and hidden from the dashboard.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.archived","typeLabel":"boolean"},"combine":{"enum":["sum","max","min"],"type":"string","description":"How grants of this feature from several plans combine: 'sum' adds them up, 'max' / 'min' keep the highest / lowest grant among plan items with no price. Omitted when 'sum'.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.combine","typeLabel":"enum\u003cstring>"},"event_names":{"type":"array","items":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.event_names.items.[INDEX]","typeLabel":"string"},"description":"Event names that trigger this feature's balance. Allows multiple features to respond to a single event.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.event_names","typeLabel":"string[]"},"credit_schema":{"type":"array","items":{"oneOf":[{"type":"object","required":["metered_feature_id","tier_behavior","tiers"],"properties":{"metered_feature_id":{"type":"string","minLength":1,"description":"ID of the metered feature that draws from this credit system.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.metered_feature_id","typeLabel":"string"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers","typeLabel":"object[]"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["metered_feature_id","credit_cost"],"properties":{"metered_feature_id":{"type":"string","minLength":1,"description":"ID of the metered feature that draws from this credit system.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.metered_feature_id","typeLabel":"string"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.credit_cost","typeLabel":"number"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","required":["metered_feature_id","credit_cost"],"properties":{"metered_feature_id":{"const":"","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.metered_feature_id","typeLabel":"any"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.credit_cost","typeLabel":"number"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2","typeLabel":"object"}],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX]","typeLabel":"object"},"description":"For classic credit systems: maps metered features to flat or graduated credit costs.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema","typeLabel":"object[]"},"model_markups":{"oneOf":[{"type":"object","description":"Per-model markup overrides for AI credit systems.","additionalProperties":{"type":"object","properties":{"markup":{"type":"number","minimum":-100,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.markup","typeLabel":"number"},"input_cost":{"type":"number","minimum":0,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.input_cost","typeLabel":"number"},"output_cost":{"type":"number","minimum":0,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.output_cost","typeLabel":"number"}},"uniqueKey":"balances.additionalProperties.oneOf.0.feature.model_markups.oneOf.0.additionalProperties","typeLabel":"object"},"uniqueKey":"balances.additionalProperties.oneOf.0.feature.model_markups.oneOf.0","typeLabel":"object"},{"type":"null","description":"Per-model markup overrides for AI credit systems.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.model_markups.oneOf.1","typeLabel":"null"}],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.model_markups","typeLabel":"object | null"},"default_markup":{"type":"number","minimum":-100,"description":"Default percentage markup for AI credit systems. Use -100 to make usage free.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.default_markup","typeLabel":"number"},"provider_markups":{"oneOf":[{"type":"object","description":"Per-provider default markup percentages for AI credit systems.","additionalProperties":{"type":"object","properties":{"markup":{"type":"number","minimum":-100,"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.provider_markups.oneOf.0.additionalProperties.markup","typeLabel":"number"}},"required":["markup"],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.provider_markups.oneOf.0.additionalProperties","typeLabel":"object"},"uniqueKey":"balances.additionalProperties.oneOf.0.feature.provider_markups.oneOf.0","typeLabel":"object"},{"type":"null","description":"Per-provider default markup percentages for AI credit systems.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.provider_markups.oneOf.1","typeLabel":"null"}],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.provider_markups","typeLabel":"object | null"},"display":{"type":"object","properties":{"singular":{"oneOf":[{"type":"string","description":"Singular form for UI display (e.g., 'API call', 'seat').","uniqueKey":"balances.additionalProperties.oneOf.0.feature.display.singular.oneOf.0","typeLabel":"string"},{"type":"null","description":"Singular form for UI display (e.g., 'API call', 'seat').","uniqueKey":"balances.additionalProperties.oneOf.0.feature.display.singular.oneOf.1","typeLabel":"null"}],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.display.singular","typeLabel":"string | null"},"plural":{"oneOf":[{"type":"string","description":"Plural form for UI display (e.g., 'API calls', 'seats').","uniqueKey":"balances.additionalProperties.oneOf.0.feature.display.plural.oneOf.0","typeLabel":"string"},{"type":"null","description":"Plural form for UI display (e.g., 'API calls', 'seats').","uniqueKey":"balances.additionalProperties.oneOf.0.feature.display.plural.oneOf.1","typeLabel":"null"}],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.display.plural","typeLabel":"string | null"}},"description":"Display names for the feature in billing UI and customer-facing components.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.display","typeLabel":"object"},"processors":{"type":"object","properties":{"stripe":{"type":"object","properties":{"product_id":{"type":"string","description":"Stripe product ID this feature's usage prices bill under.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.processors.stripe.product_id","typeLabel":"string"},"meter_id":{"type":"string","description":"Stripe meter ID used to create this feature's metered price.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.processors.stripe.meter_id","typeLabel":"string"}},"uniqueKey":"balances.additionalProperties.oneOf.0.feature.processors.stripe","typeLabel":"object"}},"x-atmn-mapping":true,"description":"Processor mappings for this feature. Present when a Stripe product or meter is set.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.processors","typeLabel":"object"}},"required":["id","name","type","consumable","archived"],"description":"The full feature object if expanded.","uniqueKey":"balances.additionalProperties.oneOf.0.feature","typeLabel":"object"},"breakdown":{"type":"array","items":{"type":"object","properties":{"plan_id":{"oneOf":[{"type":"string","description":"The plan ID this balance originates from, or null for standalone and pooled balances.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].plan_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The plan ID this balance originates from, or null for standalone and pooled balances.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].plan_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].plan_id","typeLabel":"string | null"},"included_grant":{"type":"number","description":"Amount granted from the plan's included usage.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].included_grant","typeLabel":"number"},"prepaid_grant":{"type":"number","description":"Amount granted from prepaid purchases or top-ups.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].prepaid_grant","typeLabel":"number"},"remaining":{"type":"number","description":"Remaining balance available for use.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].remaining","typeLabel":"number"},"usage":{"type":"number","description":"Amount consumed in the current period.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].usage","typeLabel":"number"},"unlimited":{"type":"boolean","description":"Whether this balance has unlimited usage.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].unlimited","typeLabel":"boolean"},"reset":{"oneOf":[{"type":"object","description":"Reset configuration for this balance, or null if no reset.","required":["interval","resets_at"],"properties":{"interval":{"oneOf":[{"type":"string","description":"The reset interval (hour, day, week, month, etc.) or 'multiple' if combined from different intervals.","enum":["one_off","minute","hour","day","week","month","quarter","semi_annual","year"],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.interval.oneOf.0","typeLabel":"enum\u003cstring>"},{"description":"The reset interval (hour, day, week, month, etc.) or 'multiple' if combined from different intervals.","const":"multiple","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.interval.oneOf.1","typeLabel":"any"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.interval","typeLabel":"enum\u003cstring> | any"},"resets_at":{"oneOf":[{"type":"number","description":"Timestamp when the balance will next reset.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.resets_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Timestamp when the balance will next reset.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.resets_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.resets_at","typeLabel":"number | null"},"interval_count":{"type":"number","description":"Number of intervals between resets (eg. 2 for bi-monthly).","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.interval_count","typeLabel":"number"}},"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0","typeLabel":"object"},{"type":"null","description":"Reset configuration for this balance, or null if no reset.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset","typeLabel":"object | null"},"price":{"oneOf":[{"type":"object","description":"Pricing configuration if this balance has usage-based pricing.","required":["billing_units","billing_method","max_purchase"],"properties":{"billing_units":{"type":"number","description":"The number of units per billing increment (eg. $9 / 250 units).","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.billing_units","typeLabel":"number"},"billing_method":{"enum":["prepaid","usage_based"],"type":"string","description":"Whether usage is prepaid or billed pay-per-use.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.billing_method","typeLabel":"enum\u003cstring>"},"max_purchase":{"oneOf":[{"type":"number","description":"Maximum quantity that can be purchased, or null for unlimited.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.max_purchase.oneOf.0","typeLabel":"number"},{"type":"null","description":"Maximum quantity that can be purchased, or null for unlimited.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.max_purchase.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.max_purchase","typeLabel":"number | null"},"amount":{"type":"number","description":"The per-unit price amount.","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.amount","typeLabel":"number"},"tiers":{"type":"array","items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"const":"inf","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"any"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | any"},"amount":{"type":"number","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].amount","typeLabel":"number"},"flat_amount":{"type":"number","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].flat_amount","typeLabel":"number"}},"required":["to","amount"],"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"description":"Tiered pricing configuration if applicable.","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers","typeLabel":"object[]"},"tier_behavior":{"enum":["graduated","volume"],"type":"string","description":"How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier).","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tier_behavior","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0","typeLabel":"object"},{"type":"null","description":"Pricing configuration if this balance has usage-based pricing.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price","typeLabel":"object | null"},"expires_at":{"oneOf":[{"type":"number","description":"Timestamp when this balance expires, or null for no expiration.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].expires_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Timestamp when this balance expires, or null for no expiration.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].expires_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].expires_at","typeLabel":"number | null"},"id":{"type":"string","default":"","description":"The unique identifier for this balance breakdown.","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].id","typeLabel":"string"},"source":{"enum":["customer","entity"],"type":"string","readOnly":true,"description":"Where this row's credits come from: shared at the customer level, or owned by the entity.","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].source","typeLabel":"enum\u003cstring>"},"allocation":{"oneOf":[{"type":"object","description":"Set when this row's numbers are the entity's allocated share of the customer's credits.","required":["amount"],"properties":{"amount":{"type":"number","description":"The amount allocated to this entity.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].allocation.oneOf.0.amount","typeLabel":"number"}},"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].allocation.oneOf.0","typeLabel":"object"},{"type":"null","description":"Set when this row's numbers are the entity's allocated share of the customer's credits.","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].allocation.oneOf.1","typeLabel":"null"}],"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].allocation","typeLabel":"object | null"},"contributions":{"type":"object","properties":{"list":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].id","typeLabel":"string"},"entity_id":{"oneOf":[{"type":"string","description":"Entity holding the contributing plan. Null for customer-level plans.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Entity holding the contributing plan. Null for customer-level plans.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_id","typeLabel":"string | null"},"entity_name":{"oneOf":[{"type":"string","description":"Display name of the contributing entity.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Display name of the contributing entity.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_name","typeLabel":"string | null"},"plan_id":{"type":"string","description":"The plan contributing to the pool.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].plan_id","typeLabel":"string"},"plan_name":{"oneOf":[{"type":"string","description":"Display name of the contributing plan.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].plan_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Display name of the contributing plan.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].plan_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].plan_name","typeLabel":"string | null"},"current_contribution":{"type":"number","description":"Amount this source contributes to the pool this cycle.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].current_contribution","typeLabel":"number"},"next_cycle_contribution":{"type":"number","description":"Amount this source will contribute next cycle.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].next_cycle_contribution","typeLabel":"number"},"competes":{"type":"boolean","description":"True when this source competes under a 'max' / 'min' feature: only the winning competing share counts, instead of adding up.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].competes","typeLabel":"boolean"},"unlimited":{"type":"boolean","description":"True when this source grants unlimited usage, either as a competing source or as an unlimited share riding a limited pool.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].unlimited","typeLabel":"boolean"},"created_at":{"type":"number","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].created_at","typeLabel":"number"}},"required":["id","entity_id","entity_name","plan_id","plan_name","current_contribution","next_cycle_contribution","competes","unlimited","created_at"],"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX]","typeLabel":"object"},"description":"The first 10 plans contributing to the pool, competing shares first, then newest.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list","typeLabel":"object[]"},"total_count":{"type":"number","description":"Total number of plans contributing to the pool.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.total_count","typeLabel":"number"}},"required":["list","total_count"],"description":"The plans funding this shared pooled balance, usually on the customer's entities, and how much each adds this cycle and next. Present on pooled rows when expand includes `pooled_contributions`.","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions","typeLabel":"object"}},"required":["plan_id","included_grant","prepaid_grant","remaining","usage","unlimited","reset","price","expires_at"],"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX]","typeLabel":"object"},"description":"Detailed breakdown of balance sources when stacking multiple plans or grants.","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown","typeLabel":"object[]"},"rollovers":{"type":"array","items":{"type":"object","properties":{"granted":{"type":"number","description":"Amount originally rolled over from a previous period, before any of it was consumed.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.rollovers.items.[INDEX].granted","typeLabel":"number"},"balance":{"type":"number","description":"Amount of balance rolled over from a previous period.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.rollovers.items.[INDEX].balance","typeLabel":"number"},"expires_at":{"type":"number","description":"Timestamp when the rollover balance expires.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.rollovers.items.[INDEX].expires_at","typeLabel":"number"}},"required":["granted","balance","expires_at"],"uniqueKey":"balances.additionalProperties.oneOf.0.rollovers.items.[INDEX]","typeLabel":"object"},"description":"Rollover balances carried over from previous periods.","uniqueKey":"balances.additionalProperties.oneOf.0.rollovers","typeLabel":"object[]"},"allocated":{"type":"number","readOnly":true,"description":"Shared credits held for entities by allocations; present only when the customer allocates this feature.","uniqueKey":"balances.additionalProperties.oneOf.0.allocated","typeLabel":"number"},"unallocated":{"type":"number","readOnly":true,"description":"Remaining shared credits no allocation holds; any entity may use them.","uniqueKey":"balances.additionalProperties.oneOf.0.unallocated","typeLabel":"number"}},"uniqueKey":"balances.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"balances.additionalProperties.oneOf.1","typeLabel":"null"}],"uniqueKey":"balances.additionalProperties","typeLabel":"object | null"},"description":"Map of feature_id to balance for the checked feature and any related features (e.g. linked credit systems).","uniqueKey":"balances","typeLabel":"object"},"preview":{"type":"object","properties":{"scenario":{"enum":["usage_limit","feature_flag"],"type":"string","description":"The reason access was denied. 'usage_limit' means the customer exceeded their balance, 'feature_flag' means the feature is not included in their plan.","isRequired":true,"uniqueKey":"preview.scenario","typeLabel":"enum\u003cstring>"},"title":{"type":"string","description":"A title suitable for displaying in a paywall or upgrade modal.","isRequired":true,"uniqueKey":"preview.title","typeLabel":"string"},"message":{"type":"string","description":"A message explaining why access was denied.","isRequired":true,"uniqueKey":"preview.message","typeLabel":"string"},"feature_id":{"type":"string","description":"The ID of the feature that was checked.","isRequired":true,"uniqueKey":"preview.feature_id","typeLabel":"string"},"feature_name":{"type":"string","description":"The display name of the feature.","isRequired":true,"uniqueKey":"preview.feature_name","typeLabel":"string"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the product you set when creating the product","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].id","typeLabel":"string"},"name":{"type":"string","description":"The name of the product","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].name","typeLabel":"string"},"group":{"oneOf":[{"type":"string","description":"Product group which this product belongs to","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].group.oneOf.0","typeLabel":"string"},{"type":"null","description":"Product group which this product belongs to","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].group.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"preview.products.items.[INDEX].group","typeLabel":"string | null"},"env":{"enum":["sandbox","live"],"type":"string","description":"The environment of the product","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].env","typeLabel":"enum\u003cstring>"},"is_add_on":{"type":"boolean","description":"Whether the product is an add-on and can be purchased alongside other products","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].is_add_on","typeLabel":"boolean"},"is_default":{"type":"boolean","description":"Whether the product is the default product","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].is_default","typeLabel":"boolean"},"archived":{"type":"boolean","description":"Whether this product has been archived and is no longer available","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].archived","typeLabel":"boolean"},"version":{"type":"number","description":"The current version of the product","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].version","typeLabel":"number"},"created_at":{"type":"number","description":"The timestamp of when the product was created in milliseconds since epoch","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].created_at","typeLabel":"number"},"items":{"type":"array","items":{"type":"object","properties":{"type":{"oneOf":[{"type":"string","description":"The type of the product item","enum":["feature","priced_feature","price"],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"The type of the product item","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].type.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].type","typeLabel":"enum\u003cstring> | null"},"feature_id":{"oneOf":[{"type":"string","description":"The feature ID of the product item. If the item is a fixed price, should be `null`","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].feature_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The feature ID of the product item. If the item is a fixed price, should be `null`","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].feature_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].feature_id","typeLabel":"string | null"},"feature_type":{"oneOf":[{"type":"string","description":"Single use features are used once and then depleted, like API calls or credits. Continuous use features are those being used on an ongoing-basis, like storage or seats.","enum":["single_use","continuous_use","boolean","static"],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].feature_type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Single use features are used once and then depleted, like API calls or credits. Continuous use features are those being used on an ongoing-basis, like storage or seats.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].feature_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].feature_type","typeLabel":"enum\u003cstring> | null"},"included_usage":{"oneOf":[{"type":"number","description":"The amount of usage included for this feature.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].included_usage.oneOf.0","typeLabel":"number"},{"description":"The amount of usage included for this feature.","const":"inf","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].included_usage.oneOf.1","typeLabel":"any"},{"type":"null","description":"The amount of usage included for this feature.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].included_usage.oneOf.2","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].included_usage","typeLabel":"number | any | null"},"interval":{"oneOf":[{"type":"string","description":"The reset or billing interval of the product item. If null, feature will have no reset date, and if there's a price, it will be billed one-off.","enum":["minute","hour","day","week","month","quarter","semi_annual","year"],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].interval.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"The reset or billing interval of the product item. If null, feature will have no reset date, and if there's a price, it will be billed one-off.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].interval.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].interval","typeLabel":"enum\u003cstring> | null"},"interval_count":{"oneOf":[{"type":"number","description":"The interval count of the product item.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].interval_count.oneOf.0","typeLabel":"number"},{"type":"null","description":"The interval count of the product item.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].interval_count.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].interval_count","typeLabel":"number | null"},"price":{"oneOf":[{"type":"number","description":"The price of the product item. Should be `null` if tiered pricing is set.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].price.oneOf.0","typeLabel":"number"},{"type":"null","description":"The price of the product item. Should be `null` if tiered pricing is set.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].price.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].price","typeLabel":"number | null"},"tiers":{"oneOf":[{"type":"array","items":{"oneOf":[{},{"type":"null","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].tiers.oneOf.0.items.[INDEX].oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].tiers.oneOf.0.items.[INDEX]","typeLabel":"null"},"description":"Tiered pricing for the product item. Not applicable for fixed price items.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].tiers.oneOf.0","typeLabel":"null[]"},{"type":"null","description":"Tiered pricing for the product item. Not applicable for fixed price items.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].tiers.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].tiers","typeLabel":"null[] | null"},"tier_behavior":{"oneOf":[{"type":"string","description":"How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier). Defaults to graduated.","enum":["graduated","volume"],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].tier_behavior.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier). Defaults to graduated.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].tier_behavior.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].tier_behavior","typeLabel":"enum\u003cstring> | null"},"usage_model":{"oneOf":[{"type":"string","description":"Whether the feature should be prepaid upfront or billed for how much they use end of billing period.","enum":["prepaid","pay_per_use"],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].usage_model.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Whether the feature should be prepaid upfront or billed for how much they use end of billing period.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].usage_model.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].usage_model","typeLabel":"enum\u003cstring> | null"},"billing_units":{"oneOf":[{"type":"number","description":"The amount per billing unit (eg. $9 / 250 units)","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].billing_units.oneOf.0","typeLabel":"number"},{"type":"null","description":"The amount per billing unit (eg. $9 / 250 units)","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].billing_units.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].billing_units","typeLabel":"number | null"},"reset_usage_when_enabled":{"oneOf":[{"type":"boolean","description":"Whether the usage should be reset when the product is enabled.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].reset_usage_when_enabled.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the usage should be reset when the product is enabled.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].reset_usage_when_enabled.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].reset_usage_when_enabled","typeLabel":"boolean | null"},"entity_feature_id":{"oneOf":[{"type":"string","description":"The entity feature ID of the product item if applicable.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].entity_feature_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The entity feature ID of the product item if applicable.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].entity_feature_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].entity_feature_id","typeLabel":"string | null"},"display":{"oneOf":[{"type":"object","description":"The display of the product item.","required":["primary_text"],"properties":{"primary_text":{"type":"string","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].display.oneOf.0.primary_text","typeLabel":"string"},"secondary_text":{"oneOf":[{"type":"string","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].display.oneOf.0.secondary_text.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].display.oneOf.0.secondary_text.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].display.oneOf.0.secondary_text","typeLabel":"string | null"}},"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].display.oneOf.0","typeLabel":"object"},{"type":"null","description":"The display of the product item.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].display.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].display","typeLabel":"object | null"},"quantity":{"oneOf":[{"type":"number","description":"Used in customer context. Quantity of the feature the customer has prepaid for.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].quantity.oneOf.0","typeLabel":"number"},{"type":"null","description":"Used in customer context. Quantity of the feature the customer has prepaid for.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].quantity.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].quantity","typeLabel":"number | null"},"next_cycle_quantity":{"oneOf":[{"type":"number","description":"Used in customer context. Quantity of the feature the customer will prepay for in the next cycle.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].next_cycle_quantity.oneOf.0","typeLabel":"number"},{"type":"null","description":"Used in customer context. Quantity of the feature the customer will prepay for in the next cycle.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].next_cycle_quantity.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].next_cycle_quantity","typeLabel":"number | null"},"config":{"oneOf":[{"type":"object","description":"Configuration for rollover and proration behavior of the feature.","properties":{"rollover":{"oneOf":[{"type":"object","required":["length"],"properties":{"length":{"type":"number","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0.length","typeLabel":"number"},"max":{"oneOf":[{"type":"number","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0.max.oneOf.0","typeLabel":"number"},{"type":"null","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0.max.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0.max","typeLabel":"number | null"},"max_percentage":{"oneOf":[{"type":"number","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0.max_percentage.oneOf.0","typeLabel":"number"},{"type":"null","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0.max_percentage.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0.max_percentage","typeLabel":"number | null"},"duration":{"enum":["month","forever"],"type":"string","default":"month","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0.duration","typeLabel":"enum\u003cstring>"}},"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover","typeLabel":"object | null"},"on_increase":{"oneOf":[{"type":"string","enum":["bill_immediately","prorate_immediately","prorate_next_cycle","bill_next_cycle"],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.on_increase.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.on_increase.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.on_increase","typeLabel":"enum\u003cstring> | null"},"on_decrease":{"oneOf":[{"type":"string","enum":["prorate","prorate_immediately","prorate_next_cycle","none","no_prorations"],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.on_decrease.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.on_decrease.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.on_decrease","typeLabel":"enum\u003cstring> | null"}},"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0","typeLabel":"object"},{"type":"null","description":"Configuration for rollover and proration behavior of the feature.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config","typeLabel":"object | null"}},"description":"Product item defining features and pricing within a product","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX]","typeLabel":"object"},"description":"Array of product items that define the product's features and pricing","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].\\items","typeLabel":"object[]"},"free_trial":{"oneOf":[{"type":"object","description":"Free trial configuration for this product, if available","required":["duration","length","unique_fingerprint","card_required"],"properties":{"duration":{"enum":["day","month","year"],"type":"string","description":"The duration type of the free trial","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.duration","typeLabel":"enum\u003cstring>"},"length":{"type":"number","description":"The length of the duration type specified","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.length","typeLabel":"number"},"unique_fingerprint":{"type":"boolean","description":"Whether the free trial is limited to one per customer fingerprint","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.unique_fingerprint","typeLabel":"boolean"},"card_required":{"type":"boolean","description":"Whether the free trial requires a card. If false, the customer can attach the product without going through a checkout flow or having a card on file.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.card_required","typeLabel":"boolean"},"on_end":{"oneOf":[{"type":"string","description":"Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.","enum":["bill","revert"],"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.on_end.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.","uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.on_end.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.on_end","typeLabel":"enum\u003cstring> | null"},"trial_available":{"oneOf":[{"type":"boolean","description":"Used in customer context. Whether the free trial is available for the customer if they were to attach the product.","default":true,"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.trial_available.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Used in customer context. Whether the free trial is available for the customer if they were to attach the product.","uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.trial_available.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.trial_available","typeLabel":"boolean | null"}},"isRequired":true,"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0","typeLabel":"object"},{"type":"null","description":"Free trial configuration for this product, if available","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"preview.products.items.[INDEX].free_trial","typeLabel":"object | null"},"base_variant_id":{"oneOf":[{"type":"string","description":"ID of the base variant this product is derived from","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].base_variant_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"ID of the base variant this product is derived from","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].base_variant_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"preview.products.items.[INDEX].base_variant_id","typeLabel":"string | null"},"billing_controls":{"type":"object","properties":{"auto_topups":{"type":"array","items":{"type":"object","properties":{"feature_id":{"type":"string","description":"The ID of the feature (credit balance) to auto top-up.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].feature_id","typeLabel":"string"},"threshold":{"type":"number","description":"When the balance drops below this threshold, an auto top-up will be purchased.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].threshold","typeLabel":"number"},"quantity":{"type":"number","minimum":1,"description":"Amount of credits to add per auto top-up.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].quantity","typeLabel":"number"},"enabled":{"type":"boolean","default":false,"description":"Whether auto top-up is enabled.","uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].enabled","typeLabel":"boolean"},"purchase_limit":{"type":"object","properties":{"interval":{"enum":["hour","day","week","month"],"type":"string","description":"The time interval for the purchase limit window.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].purchase_limit.interval","typeLabel":"enum\u003cstring>"},"limit":{"type":"number","minimum":1,"description":"Maximum number of auto top-ups allowed within the interval.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].purchase_limit.limit","typeLabel":"number"},"interval_count":{"type":"number","minimum":1,"default":1,"description":"Number of intervals in the purchase limit window.","uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].purchase_limit.interval_count","typeLabel":"number"}},"required":["interval","limit"],"description":"Optional rate limit to cap how often auto top-ups occur.","uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].purchase_limit","typeLabel":"object"},"invoice_mode":{"type":"boolean","description":"When true, auto top-up creates a send_invoice invoice instead of auto-charging.","uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].invoice_mode","typeLabel":"boolean"}},"required":["feature_id","threshold","quantity"],"uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX]","typeLabel":"object"},"description":"List of auto top-up configurations per feature.","uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups","typeLabel":"object[]"},"spend_limits":{"type":"array","items":{"type":"object","properties":{"feature_id":{"type":"string","description":"Optional feature ID this spend limit applies to.","uniqueKey":"preview.products.items.[INDEX].billing_controls.spend_limits.items.[INDEX].feature_id","typeLabel":"string"},"enabled":{"type":"boolean","default":false,"description":"Whether the overage spend limit is enabled.","uniqueKey":"preview.products.items.[INDEX].billing_controls.spend_limits.items.[INDEX].enabled","typeLabel":"boolean"},"limit_type":{"enum":["absolute","usage_percentage"],"type":"string","description":"How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.","uniqueKey":"preview.products.items.[INDEX].billing_controls.spend_limits.items.[INDEX].limit_type","typeLabel":"enum\u003cstring>"},"overage_limit":{"type":"number","minimum":0,"description":"Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.","uniqueKey":"preview.products.items.[INDEX].billing_controls.spend_limits.items.[INDEX].overage_limit","typeLabel":"number"},"skip_overage_billing":{"type":"boolean","description":"When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.","uniqueKey":"preview.products.items.[INDEX].billing_controls.spend_limits.items.[INDEX].skip_overage_billing","typeLabel":"boolean"}},"uniqueKey":"preview.products.items.[INDEX].billing_controls.spend_limits.items.[INDEX]","typeLabel":"object"},"description":"List of overage spend limits per feature (caps overage spend).","uniqueKey":"preview.products.items.[INDEX].billing_controls.spend_limits","typeLabel":"object[]"},"usage_limits":{"type":"array","items":{"type":"object","properties":{"feature_id":{"type":"string","description":"The feature this usage limit applies to.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX].feature_id","typeLabel":"string"},"limit":{"type":"number","minimum":0,"description":"Maximum units allowed per interval.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX].limit","typeLabel":"number"},"interval":{"enum":["day","week","month","year"],"type":"string","description":"Interval for the cap, aligned to the customer's billing cycle.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX].interval","typeLabel":"enum\u003cstring>"},"enabled":{"type":"boolean","default":true,"description":"Whether this usage limit is enabled.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX].enabled","typeLabel":"boolean"},"anchor":{"enum":["billing_cycle","utc"],"type":"string","description":"Window alignment. 'billing_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX].anchor","typeLabel":"enum\u003cstring>"},"filter":{"type":"object","properties":{"properties":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"string","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX].filter.properties.additionalProperties","typeLabel":"string"},"isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX].filter.properties","typeLabel":"object"}},"required":["properties"],"description":"When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX].filter","typeLabel":"object"}},"required":["feature_id","limit","interval"],"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX]","typeLabel":"object"},"description":"List of hard usage caps per feature (max units per interval).","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits","typeLabel":"object[]"},"usage_alerts":{"type":"array","items":{"type":"object","properties":{"threshold":{"type":"number","minimum":0,"description":"The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage_percentage or remaining_percentage, this is a percentage (0-100).","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].threshold","typeLabel":"number"},"threshold_type":{"enum":["usage","usage_percentage","remaining","remaining_percentage"],"type":"string","description":"Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].threshold_type","typeLabel":"enum\u003cstring>"},"feature_id":{"type":"string","description":"The feature ID this alert applies to.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].feature_id","typeLabel":"string"},"enabled":{"type":"boolean","default":true,"description":"Whether this usage alert is enabled.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].enabled","typeLabel":"boolean"},"basis":{"enum":["balance","included","recurring","usage_limit"],"type":"string","default":"balance","description":"What 100% means. balance: every grant on the feature. included: the plan allowance only. recurring: grants that reset. usage_limit: the cap of the usage limit with the same feature and filter.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].basis","typeLabel":"enum\u003cstring>"},"filter":{"type":"object","properties":{"properties":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"string","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].filter.properties.additionalProperties","typeLabel":"string"},"isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].filter.properties","typeLabel":"object"}},"required":["properties"],"description":"Only valid with basis usage_limit. Points the alert at the usage limit carrying the same filter.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].filter","typeLabel":"object"},"name":{"type":"string","description":"Optional user-defined label to distinguish multiple alerts on the same feature.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].name","typeLabel":"string"}},"required":["threshold","threshold_type"],"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX]","typeLabel":"object"},"description":"List of usage alert configurations per feature.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts","typeLabel":"object[]"},"overage_allowed":{"type":"array","items":{"type":"object","properties":{"feature_id":{"type":"string","description":"The feature ID this overage allowed control applies to.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.overage_allowed.items.[INDEX].feature_id","typeLabel":"string"},"enabled":{"type":"boolean","default":false,"description":"Whether overage is allowed for this feature.","uniqueKey":"preview.products.items.[INDEX].billing_controls.overage_allowed.items.[INDEX].enabled","typeLabel":"boolean"}},"required":["feature_id"],"uniqueKey":"preview.products.items.[INDEX].billing_controls.overage_allowed.items.[INDEX]","typeLabel":"object"},"description":"List of overage allowed controls per feature. When enabled, usage can exceed balance.","uniqueKey":"preview.products.items.[INDEX].billing_controls.overage_allowed","typeLabel":"object[]"}},"description":"Plan-level billing controls used as customer defaults","uniqueKey":"preview.products.items.[INDEX].billing_controls","typeLabel":"object"},"scenario":{"enum":["scheduled","active","new","renew","upgrade","update_prepaid_quantity","downgrade","cancel","expired","past_due"],"type":"string","description":"Scenario for when this product is used in attach flows","uniqueKey":"preview.products.items.[INDEX].scenario","typeLabel":"enum\u003cstring>"},"properties":{"type":"object","properties":{"is_free":{"type":"boolean","description":"True if the product has no base price or usage prices","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].properties.is_free","typeLabel":"boolean"},"is_one_off":{"type":"boolean","description":"True if the product only contains a one-time price","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].properties.is_one_off","typeLabel":"boolean"},"interval_group":{"oneOf":[{"type":"string","description":"The billing interval group for recurring products (e.g., 'monthly', 'yearly')","uniqueKey":"preview.products.items.[INDEX].properties.interval_group.oneOf.0","typeLabel":"string"},{"type":"null","description":"The billing interval group for recurring products (e.g., 'monthly', 'yearly')","uniqueKey":"preview.products.items.[INDEX].properties.interval_group.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].properties.interval_group","typeLabel":"string | null"},"has_trial":{"oneOf":[{"type":"boolean","description":"True if the product includes a free trial","uniqueKey":"preview.products.items.[INDEX].properties.has_trial.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"True if the product includes a free trial","uniqueKey":"preview.products.items.[INDEX].properties.has_trial.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].properties.has_trial","typeLabel":"boolean | null"},"updateable":{"oneOf":[{"type":"boolean","description":"True if the product can be updated after creation (only applicable if there are prepaid recurring prices)","uniqueKey":"preview.products.items.[INDEX].properties.updateable.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"True if the product can be updated after creation (only applicable if there are prepaid recurring prices)","uniqueKey":"preview.products.items.[INDEX].properties.updateable.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].properties.updateable","typeLabel":"boolean | null"}},"required":["is_free","is_one_off"],"uniqueKey":"preview.products.items.[INDEX].properties","typeLabel":"object"}},"required":["id","name","group","env","is_add_on","is_default","archived","version","created_at","items","free_trial","base_variant_id"],"uniqueKey":"preview.products.items.[INDEX]","typeLabel":"object"},"description":"Products that would grant access to this feature. Use to display upgrade options.","isRequired":true,"uniqueKey":"preview.products","typeLabel":"object[]"}},"required":["scenario","title","message","feature_id","feature_name","products"],"description":"Upgrade/upsell information when access is denied. Only present if with_preview was true and allowed is false.","uniqueKey":"preview","typeLabel":"object"}},"required":["allowed","customer_id","balance","flag"],"examples":[{"allowed":true,"customer_id":"cus_123","entity_id":null,"required_balance":1,"balance":{"feature_id":"messages","granted":100,"remaining":72,"usage":28,"unlimited":false,"overage_allowed":false,"max_purchase":null,"next_reset_at":1773851121437,"breakdown":[{"id":"cus_ent_39qmLooixXLAqMywgXywjAz96rV","plan_id":"pro_plan","included_grant":100,"prepaid_grant":0,"remaining":72,"usage":28,"unlimited":false,"reset":{"interval":"month","resets_at":1773851121437},"price":null,"expires_at":null}]}}],"uniqueKey":"","typeLabel":"object"},"example":{"allowed":true,"customer_id":"cus_123","entity_id":null,"required_balance":1,"balance":{"feature_id":"messages","granted":100,"remaining":72,"usage":28,"unlimited":false,"overage_allowed":false,"max_purchase":null,"next_reset_at":1773851121437,"breakdown":[{"id":"cus_ent_39qmLooixXLAqMywgXywjAz96rV","plan_id":"pro_plan","included_grant":100,"prepaid_grant":0,"remaining":72,"usage":28,"unlimited":false,"reset":{"interval":"month","resets_at":1773851121437},"price":null,"expires_at":null}]}},"examples":{"Example":{"title":"Example","value":{"allowed":true,"customer_id":"cus_123","entity_id":null,"required_balance":1,"balance":{"feature_id":"messages","granted":100,"remaining":72,"usage":28,"unlimited":false,"overage_allowed":false,"max_purchase":null,"next_reset_at":1773851121437,"breakdown":[{"id":"cus_ent_39qmLooixXLAqMywgXywjAz96rV","plan_id":"pro_plan","included_grant":100,"prepaid_grant":0,"remaining":72,"usage":28,"unlimited":false,"reset":{"interval":"month","resets_at":1773851121437},"price":null,"expires_at":null}]}}}},"exampleType":"examples"}},"exampleType":"examples"},"d39ff3b8-ed33-4bec-8407-90db59170881":{"description":"Accepted. Autumn is experiencing degraded service from a downstream provider, so access was allowed fail-open.","content":{"application/json":{"schema":{"type":"object","properties":{"allowed":{"type":"boolean","description":"Whether the customer is allowed to use the feature. True if they have sufficient balance or the feature is unlimited/boolean.","isRequired":true,"uniqueKey":"allowed","typeLabel":"boolean"},"customer_id":{"type":"string","description":"The ID of the customer that was checked.","isRequired":true,"uniqueKey":"customer_id","typeLabel":"string"},"balance":{"oneOf":[{"type":"object","description":"The customer's balance for this feature. Null if the customer has no balance for this feature.","required":["feature_id","granted","remaining","usage","unlimited","overage_allowed","max_purchase","next_reset_at"],"example":{"feature_id":"messages","granted":100,"remaining":72,"usage":28,"unlimited":false,"overage_allowed":false,"max_purchase":null,"next_reset_at":1773851121437,"breakdown":[{"id":"cus_ent_39qmLooixXLAqMywgXywjAz96rV","plan_id":"pro_plan","included_grant":100,"prepaid_grant":0,"remaining":72,"usage":28,"unlimited":false,"reset":{"interval":"month","resets_at":1773851121437},"price":null,"expires_at":null}]},"properties":{"feature_id":{"type":"string","description":"The feature ID this balance is for.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature_id","typeLabel":"string"},"granted":{"type":"number","description":"Total balance granted (included + prepaid).","isRequired":true,"uniqueKey":"balance.oneOf.0.granted","typeLabel":"number"},"remaining":{"type":"number","minimum":0,"description":"Remaining balance available for use.","isRequired":true,"uniqueKey":"balance.oneOf.0.remaining","typeLabel":"number"},"usage":{"type":"number","description":"Total usage consumed in the current period.","isRequired":true,"uniqueKey":"balance.oneOf.0.usage","typeLabel":"number"},"unlimited":{"type":"boolean","description":"Whether this feature has unlimited usage.","isRequired":true,"uniqueKey":"balance.oneOf.0.unlimited","typeLabel":"boolean"},"overage_allowed":{"type":"boolean","description":"Whether usage beyond the granted balance is allowed (with overage charges).","isRequired":true,"uniqueKey":"balance.oneOf.0.overage_allowed","typeLabel":"boolean"},"max_purchase":{"oneOf":[{"type":"number","description":"Maximum quantity that can be purchased as a top-up, or null for unlimited.","isRequired":true,"uniqueKey":"balance.oneOf.0.max_purchase.oneOf.0","typeLabel":"number"},{"type":"null","description":"Maximum quantity that can be purchased as a top-up, or null for unlimited.","isRequired":true,"uniqueKey":"balance.oneOf.0.max_purchase.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.max_purchase","typeLabel":"number | null"},"next_reset_at":{"oneOf":[{"type":"number","description":"Timestamp when the balance will reset, or null for no reset.","isRequired":true,"uniqueKey":"balance.oneOf.0.next_reset_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Timestamp when the balance will reset, or null for no reset.","isRequired":true,"uniqueKey":"balance.oneOf.0.next_reset_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.next_reset_at","typeLabel":"number | null"},"feature":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this feature, used in /check and /track calls.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.id","typeLabel":"string"},"name":{"type":"string","description":"Human-readable name displayed in the dashboard and billing UI.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.name","typeLabel":"string"},"type":{"enum":["boolean","metered","credit_system","ai_credit_system"],"type":"string","description":"Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.type","typeLabel":"enum\u003cstring>"},"consumable":{"type":"boolean","description":"For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage).","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.consumable","typeLabel":"boolean"},"archived":{"type":"boolean","description":"Whether the feature is archived and hidden from the dashboard.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.archived","typeLabel":"boolean"},"combine":{"enum":["sum","max","min"],"type":"string","description":"How grants of this feature from several plans combine: 'sum' adds them up, 'max' / 'min' keep the highest / lowest grant among plan items with no price. Omitted when 'sum'.","uniqueKey":"balance.oneOf.0.feature.combine","typeLabel":"enum\u003cstring>"},"event_names":{"type":"array","items":{"type":"string","uniqueKey":"balance.oneOf.0.feature.event_names.items.[INDEX]","typeLabel":"string"},"description":"Event names that trigger this feature's balance. Allows multiple features to respond to a single event.","uniqueKey":"balance.oneOf.0.feature.event_names","typeLabel":"string[]"},"credit_schema":{"type":"array","items":{"oneOf":[{"type":"object","required":["metered_feature_id","tier_behavior","tiers"],"properties":{"metered_feature_id":{"type":"string","minLength":1,"description":"ID of the metered feature that draws from this credit system.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.metered_feature_id","typeLabel":"string"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers","typeLabel":"object[]"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["metered_feature_id","credit_cost"],"properties":{"metered_feature_id":{"type":"string","minLength":1,"description":"ID of the metered feature that draws from this credit system.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.metered_feature_id","typeLabel":"string"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.credit_cost","typeLabel":"number"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","required":["metered_feature_id","credit_cost"],"properties":{"metered_feature_id":{"const":"","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.metered_feature_id","typeLabel":"any"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.credit_cost","typeLabel":"number"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2","typeLabel":"object"}],"uniqueKey":"balance.oneOf.0.feature.credit_schema.items.[INDEX]","typeLabel":"object"},"description":"For classic credit systems: maps metered features to flat or graduated credit costs.","uniqueKey":"balance.oneOf.0.feature.credit_schema","typeLabel":"object[]"},"model_markups":{"oneOf":[{"type":"object","description":"Per-model markup overrides for AI credit systems.","additionalProperties":{"type":"object","properties":{"markup":{"type":"number","minimum":-100,"uniqueKey":"balance.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.markup","typeLabel":"number"},"input_cost":{"type":"number","minimum":0,"uniqueKey":"balance.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.input_cost","typeLabel":"number"},"output_cost":{"type":"number","minimum":0,"uniqueKey":"balance.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.output_cost","typeLabel":"number"}},"uniqueKey":"balance.oneOf.0.feature.model_markups.oneOf.0.additionalProperties","typeLabel":"object"},"uniqueKey":"balance.oneOf.0.feature.model_markups.oneOf.0","typeLabel":"object"},{"type":"null","description":"Per-model markup overrides for AI credit systems.","uniqueKey":"balance.oneOf.0.feature.model_markups.oneOf.1","typeLabel":"null"}],"uniqueKey":"balance.oneOf.0.feature.model_markups","typeLabel":"object | null"},"default_markup":{"type":"number","minimum":-100,"description":"Default percentage markup for AI credit systems. Use -100 to make usage free.","uniqueKey":"balance.oneOf.0.feature.default_markup","typeLabel":"number"},"provider_markups":{"oneOf":[{"type":"object","description":"Per-provider default markup percentages for AI credit systems.","additionalProperties":{"type":"object","properties":{"markup":{"type":"number","minimum":-100,"isRequired":true,"uniqueKey":"balance.oneOf.0.feature.provider_markups.oneOf.0.additionalProperties.markup","typeLabel":"number"}},"required":["markup"],"uniqueKey":"balance.oneOf.0.feature.provider_markups.oneOf.0.additionalProperties","typeLabel":"object"},"uniqueKey":"balance.oneOf.0.feature.provider_markups.oneOf.0","typeLabel":"object"},{"type":"null","description":"Per-provider default markup percentages for AI credit systems.","uniqueKey":"balance.oneOf.0.feature.provider_markups.oneOf.1","typeLabel":"null"}],"uniqueKey":"balance.oneOf.0.feature.provider_markups","typeLabel":"object | null"},"display":{"type":"object","properties":{"singular":{"oneOf":[{"type":"string","description":"Singular form for UI display (e.g., 'API call', 'seat').","uniqueKey":"balance.oneOf.0.feature.display.singular.oneOf.0","typeLabel":"string"},{"type":"null","description":"Singular form for UI display (e.g., 'API call', 'seat').","uniqueKey":"balance.oneOf.0.feature.display.singular.oneOf.1","typeLabel":"null"}],"uniqueKey":"balance.oneOf.0.feature.display.singular","typeLabel":"string | null"},"plural":{"oneOf":[{"type":"string","description":"Plural form for UI display (e.g., 'API calls', 'seats').","uniqueKey":"balance.oneOf.0.feature.display.plural.oneOf.0","typeLabel":"string"},{"type":"null","description":"Plural form for UI display (e.g., 'API calls', 'seats').","uniqueKey":"balance.oneOf.0.feature.display.plural.oneOf.1","typeLabel":"null"}],"uniqueKey":"balance.oneOf.0.feature.display.plural","typeLabel":"string | null"}},"description":"Display names for the feature in billing UI and customer-facing components.","uniqueKey":"balance.oneOf.0.feature.display","typeLabel":"object"},"processors":{"type":"object","properties":{"stripe":{"type":"object","properties":{"product_id":{"type":"string","description":"Stripe product ID this feature's usage prices bill under.","uniqueKey":"balance.oneOf.0.feature.processors.stripe.product_id","typeLabel":"string"},"meter_id":{"type":"string","description":"Stripe meter ID used to create this feature's metered price.","uniqueKey":"balance.oneOf.0.feature.processors.stripe.meter_id","typeLabel":"string"}},"uniqueKey":"balance.oneOf.0.feature.processors.stripe","typeLabel":"object"}},"x-atmn-mapping":true,"description":"Processor mappings for this feature. Present when a Stripe product or meter is set.","uniqueKey":"balance.oneOf.0.feature.processors","typeLabel":"object"}},"required":["id","name","type","consumable","archived"],"description":"The full feature object if expanded.","uniqueKey":"balance.oneOf.0.feature","typeLabel":"object"},"breakdown":{"type":"array","items":{"type":"object","properties":{"plan_id":{"oneOf":[{"type":"string","description":"The plan ID this balance originates from, or null for standalone and pooled balances.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].plan_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The plan ID this balance originates from, or null for standalone and pooled balances.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].plan_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].plan_id","typeLabel":"string | null"},"included_grant":{"type":"number","description":"Amount granted from the plan's included usage.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].included_grant","typeLabel":"number"},"prepaid_grant":{"type":"number","description":"Amount granted from prepaid purchases or top-ups.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].prepaid_grant","typeLabel":"number"},"remaining":{"type":"number","description":"Remaining balance available for use.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].remaining","typeLabel":"number"},"usage":{"type":"number","description":"Amount consumed in the current period.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].usage","typeLabel":"number"},"unlimited":{"type":"boolean","description":"Whether this balance has unlimited usage.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].unlimited","typeLabel":"boolean"},"reset":{"oneOf":[{"type":"object","description":"Reset configuration for this balance, or null if no reset.","required":["interval","resets_at"],"properties":{"interval":{"oneOf":[{"type":"string","description":"The reset interval (hour, day, week, month, etc.) or 'multiple' if combined from different intervals.","enum":["one_off","minute","hour","day","week","month","quarter","semi_annual","year"],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.interval.oneOf.0","typeLabel":"enum\u003cstring>"},{"description":"The reset interval (hour, day, week, month, etc.) or 'multiple' if combined from different intervals.","const":"multiple","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.interval.oneOf.1","typeLabel":"any"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.interval","typeLabel":"enum\u003cstring> | any"},"resets_at":{"oneOf":[{"type":"number","description":"Timestamp when the balance will next reset.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.resets_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Timestamp when the balance will next reset.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.resets_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.resets_at","typeLabel":"number | null"},"interval_count":{"type":"number","description":"Number of intervals between resets (eg. 2 for bi-monthly).","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.interval_count","typeLabel":"number"}},"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0","typeLabel":"object"},{"type":"null","description":"Reset configuration for this balance, or null if no reset.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].reset","typeLabel":"object | null"},"price":{"oneOf":[{"type":"object","description":"Pricing configuration if this balance has usage-based pricing.","required":["billing_units","billing_method","max_purchase"],"properties":{"billing_units":{"type":"number","description":"The number of units per billing increment (eg. $9 / 250 units).","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.billing_units","typeLabel":"number"},"billing_method":{"enum":["prepaid","usage_based"],"type":"string","description":"Whether usage is prepaid or billed pay-per-use.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.billing_method","typeLabel":"enum\u003cstring>"},"max_purchase":{"oneOf":[{"type":"number","description":"Maximum quantity that can be purchased, or null for unlimited.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.max_purchase.oneOf.0","typeLabel":"number"},{"type":"null","description":"Maximum quantity that can be purchased, or null for unlimited.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.max_purchase.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.max_purchase","typeLabel":"number | null"},"amount":{"type":"number","description":"The per-unit price amount.","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.amount","typeLabel":"number"},"tiers":{"type":"array","items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"const":"inf","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"any"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | any"},"amount":{"type":"number","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].amount","typeLabel":"number"},"flat_amount":{"type":"number","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].flat_amount","typeLabel":"number"}},"required":["to","amount"],"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"description":"Tiered pricing configuration if applicable.","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers","typeLabel":"object[]"},"tier_behavior":{"enum":["graduated","volume"],"type":"string","description":"How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier).","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tier_behavior","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.0","typeLabel":"object"},{"type":"null","description":"Pricing configuration if this balance has usage-based pricing.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].price","typeLabel":"object | null"},"expires_at":{"oneOf":[{"type":"number","description":"Timestamp when this balance expires, or null for no expiration.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].expires_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Timestamp when this balance expires, or null for no expiration.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].expires_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].expires_at","typeLabel":"number | null"},"id":{"type":"string","default":"","description":"The unique identifier for this balance breakdown.","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].id","typeLabel":"string"},"source":{"enum":["customer","entity"],"type":"string","readOnly":true,"description":"Where this row's credits come from: shared at the customer level, or owned by the entity.","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].source","typeLabel":"enum\u003cstring>"},"allocation":{"oneOf":[{"type":"object","description":"Set when this row's numbers are the entity's allocated share of the customer's credits.","required":["amount"],"properties":{"amount":{"type":"number","description":"The amount allocated to this entity.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].allocation.oneOf.0.amount","typeLabel":"number"}},"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].allocation.oneOf.0","typeLabel":"object"},{"type":"null","description":"Set when this row's numbers are the entity's allocated share of the customer's credits.","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].allocation.oneOf.1","typeLabel":"null"}],"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].allocation","typeLabel":"object | null"},"contributions":{"type":"object","properties":{"list":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].id","typeLabel":"string"},"entity_id":{"oneOf":[{"type":"string","description":"Entity holding the contributing plan. Null for customer-level plans.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Entity holding the contributing plan. Null for customer-level plans.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_id","typeLabel":"string | null"},"entity_name":{"oneOf":[{"type":"string","description":"Display name of the contributing entity.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Display name of the contributing entity.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_name","typeLabel":"string | null"},"plan_id":{"type":"string","description":"The plan contributing to the pool.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].plan_id","typeLabel":"string"},"plan_name":{"oneOf":[{"type":"string","description":"Display name of the contributing plan.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].plan_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Display name of the contributing plan.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].plan_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].plan_name","typeLabel":"string | null"},"current_contribution":{"type":"number","description":"Amount this source contributes to the pool this cycle.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].current_contribution","typeLabel":"number"},"next_cycle_contribution":{"type":"number","description":"Amount this source will contribute next cycle.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].next_cycle_contribution","typeLabel":"number"},"competes":{"type":"boolean","description":"True when this source competes under a 'max' / 'min' feature: only the winning competing share counts, instead of adding up.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].competes","typeLabel":"boolean"},"unlimited":{"type":"boolean","description":"True when this source grants unlimited usage, either as a competing source or as an unlimited share riding a limited pool.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].unlimited","typeLabel":"boolean"},"created_at":{"type":"number","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].created_at","typeLabel":"number"}},"required":["id","entity_id","entity_name","plan_id","plan_name","current_contribution","next_cycle_contribution","competes","unlimited","created_at"],"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX]","typeLabel":"object"},"description":"The first 10 plans contributing to the pool, competing shares first, then newest.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.list","typeLabel":"object[]"},"total_count":{"type":"number","description":"Total number of plans contributing to the pool.","isRequired":true,"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions.total_count","typeLabel":"number"}},"required":["list","total_count"],"description":"The plans funding this shared pooled balance, usually on the customer's entities, and how much each adds this cycle and next. Present on pooled rows when expand includes `pooled_contributions`.","uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX].contributions","typeLabel":"object"}},"required":["plan_id","included_grant","prepaid_grant","remaining","usage","unlimited","reset","price","expires_at"],"uniqueKey":"balance.oneOf.0.breakdown.items.[INDEX]","typeLabel":"object"},"description":"Detailed breakdown of balance sources when stacking multiple plans or grants.","uniqueKey":"balance.oneOf.0.breakdown","typeLabel":"object[]"},"rollovers":{"type":"array","items":{"type":"object","properties":{"granted":{"type":"number","description":"Amount originally rolled over from a previous period, before any of it was consumed.","isRequired":true,"uniqueKey":"balance.oneOf.0.rollovers.items.[INDEX].granted","typeLabel":"number"},"balance":{"type":"number","description":"Amount of balance rolled over from a previous period.","isRequired":true,"uniqueKey":"balance.oneOf.0.rollovers.items.[INDEX].balance","typeLabel":"number"},"expires_at":{"type":"number","description":"Timestamp when the rollover balance expires.","isRequired":true,"uniqueKey":"balance.oneOf.0.rollovers.items.[INDEX].expires_at","typeLabel":"number"}},"required":["granted","balance","expires_at"],"uniqueKey":"balance.oneOf.0.rollovers.items.[INDEX]","typeLabel":"object"},"description":"Rollover balances carried over from previous periods.","uniqueKey":"balance.oneOf.0.rollovers","typeLabel":"object[]"},"allocated":{"type":"number","readOnly":true,"description":"Shared credits held for entities by allocations; present only when the customer allocates this feature.","uniqueKey":"balance.oneOf.0.allocated","typeLabel":"number"},"unallocated":{"type":"number","readOnly":true,"description":"Remaining shared credits no allocation holds; any entity may use them.","uniqueKey":"balance.oneOf.0.unallocated","typeLabel":"number"}},"isRequired":true,"uniqueKey":"balance.oneOf.0","typeLabel":"object"},{"type":"null","description":"The customer's balance for this feature. Null if the customer has no balance for this feature.","isRequired":true,"uniqueKey":"balance.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance","typeLabel":"object | null"},"flag":{"oneOf":[{"type":"object","description":"The flag associated with this check, if any.","required":["id","plan_id","expires_at","feature_id"],"example":{"id":"cus_ent_39qmLooixXLAqMywgXywjAz96rV","plan_id":"pro_plan","expires_at":null,"feature_id":"dashboard"},"properties":{"id":{"type":"string","description":"The unique identifier for this flag.","isRequired":true,"uniqueKey":"flag.oneOf.0.id","typeLabel":"string"},"plan_id":{"oneOf":[{"type":"string","description":"The plan ID this flag originates from, or null for standalone flags.","isRequired":true,"uniqueKey":"flag.oneOf.0.plan_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The plan ID this flag originates from, or null for standalone flags.","isRequired":true,"uniqueKey":"flag.oneOf.0.plan_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"flag.oneOf.0.plan_id","typeLabel":"string | null"},"expires_at":{"oneOf":[{"type":"number","description":"Timestamp when this flag expires, or null for no expiration.","isRequired":true,"uniqueKey":"flag.oneOf.0.expires_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Timestamp when this flag expires, or null for no expiration.","isRequired":true,"uniqueKey":"flag.oneOf.0.expires_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"flag.oneOf.0.expires_at","typeLabel":"number | null"},"feature_id":{"type":"string","description":"The feature ID this flag is for.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature_id","typeLabel":"string"},"feature":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this feature, used in /check and /track calls.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.id","typeLabel":"string"},"name":{"type":"string","description":"Human-readable name displayed in the dashboard and billing UI.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.name","typeLabel":"string"},"type":{"enum":["boolean","metered","credit_system","ai_credit_system"],"type":"string","description":"Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.type","typeLabel":"enum\u003cstring>"},"consumable":{"type":"boolean","description":"For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage).","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.consumable","typeLabel":"boolean"},"archived":{"type":"boolean","description":"Whether the feature is archived and hidden from the dashboard.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.archived","typeLabel":"boolean"},"combine":{"enum":["sum","max","min"],"type":"string","description":"How grants of this feature from several plans combine: 'sum' adds them up, 'max' / 'min' keep the highest / lowest grant among plan items with no price. Omitted when 'sum'.","uniqueKey":"flag.oneOf.0.feature.combine","typeLabel":"enum\u003cstring>"},"event_names":{"type":"array","items":{"type":"string","uniqueKey":"flag.oneOf.0.feature.event_names.items.[INDEX]","typeLabel":"string"},"description":"Event names that trigger this feature's balance. Allows multiple features to respond to a single event.","uniqueKey":"flag.oneOf.0.feature.event_names","typeLabel":"string[]"},"credit_schema":{"type":"array","items":{"oneOf":[{"type":"object","required":["metered_feature_id","tier_behavior","tiers"],"properties":{"metered_feature_id":{"type":"string","minLength":1,"description":"ID of the metered feature that draws from this credit system.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.metered_feature_id","typeLabel":"string"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers","typeLabel":"object[]"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["metered_feature_id","credit_cost"],"properties":{"metered_feature_id":{"type":"string","minLength":1,"description":"ID of the metered feature that draws from this credit system.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.metered_feature_id","typeLabel":"string"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.credit_cost","typeLabel":"number"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","required":["metered_feature_id","credit_cost"],"properties":{"metered_feature_id":{"const":"","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.metered_feature_id","typeLabel":"any"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.credit_cost","typeLabel":"number"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2","typeLabel":"object"}],"uniqueKey":"flag.oneOf.0.feature.credit_schema.items.[INDEX]","typeLabel":"object"},"description":"For classic credit systems: maps metered features to flat or graduated credit costs.","uniqueKey":"flag.oneOf.0.feature.credit_schema","typeLabel":"object[]"},"model_markups":{"oneOf":[{"type":"object","description":"Per-model markup overrides for AI credit systems.","additionalProperties":{"type":"object","properties":{"markup":{"type":"number","minimum":-100,"uniqueKey":"flag.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.markup","typeLabel":"number"},"input_cost":{"type":"number","minimum":0,"uniqueKey":"flag.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.input_cost","typeLabel":"number"},"output_cost":{"type":"number","minimum":0,"uniqueKey":"flag.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.output_cost","typeLabel":"number"}},"uniqueKey":"flag.oneOf.0.feature.model_markups.oneOf.0.additionalProperties","typeLabel":"object"},"uniqueKey":"flag.oneOf.0.feature.model_markups.oneOf.0","typeLabel":"object"},{"type":"null","description":"Per-model markup overrides for AI credit systems.","uniqueKey":"flag.oneOf.0.feature.model_markups.oneOf.1","typeLabel":"null"}],"uniqueKey":"flag.oneOf.0.feature.model_markups","typeLabel":"object | null"},"default_markup":{"type":"number","minimum":-100,"description":"Default percentage markup for AI credit systems. Use -100 to make usage free.","uniqueKey":"flag.oneOf.0.feature.default_markup","typeLabel":"number"},"provider_markups":{"oneOf":[{"type":"object","description":"Per-provider default markup percentages for AI credit systems.","additionalProperties":{"type":"object","properties":{"markup":{"type":"number","minimum":-100,"isRequired":true,"uniqueKey":"flag.oneOf.0.feature.provider_markups.oneOf.0.additionalProperties.markup","typeLabel":"number"}},"required":["markup"],"uniqueKey":"flag.oneOf.0.feature.provider_markups.oneOf.0.additionalProperties","typeLabel":"object"},"uniqueKey":"flag.oneOf.0.feature.provider_markups.oneOf.0","typeLabel":"object"},{"type":"null","description":"Per-provider default markup percentages for AI credit systems.","uniqueKey":"flag.oneOf.0.feature.provider_markups.oneOf.1","typeLabel":"null"}],"uniqueKey":"flag.oneOf.0.feature.provider_markups","typeLabel":"object | null"},"display":{"type":"object","properties":{"singular":{"oneOf":[{"type":"string","description":"Singular form for UI display (e.g., 'API call', 'seat').","uniqueKey":"flag.oneOf.0.feature.display.singular.oneOf.0","typeLabel":"string"},{"type":"null","description":"Singular form for UI display (e.g., 'API call', 'seat').","uniqueKey":"flag.oneOf.0.feature.display.singular.oneOf.1","typeLabel":"null"}],"uniqueKey":"flag.oneOf.0.feature.display.singular","typeLabel":"string | null"},"plural":{"oneOf":[{"type":"string","description":"Plural form for UI display (e.g., 'API calls', 'seats').","uniqueKey":"flag.oneOf.0.feature.display.plural.oneOf.0","typeLabel":"string"},{"type":"null","description":"Plural form for UI display (e.g., 'API calls', 'seats').","uniqueKey":"flag.oneOf.0.feature.display.plural.oneOf.1","typeLabel":"null"}],"uniqueKey":"flag.oneOf.0.feature.display.plural","typeLabel":"string | null"}},"description":"Display names for the feature in billing UI and customer-facing components.","uniqueKey":"flag.oneOf.0.feature.display","typeLabel":"object"},"processors":{"type":"object","properties":{"stripe":{"type":"object","properties":{"product_id":{"type":"string","description":"Stripe product ID this feature's usage prices bill under.","uniqueKey":"flag.oneOf.0.feature.processors.stripe.product_id","typeLabel":"string"},"meter_id":{"type":"string","description":"Stripe meter ID used to create this feature's metered price.","uniqueKey":"flag.oneOf.0.feature.processors.stripe.meter_id","typeLabel":"string"}},"uniqueKey":"flag.oneOf.0.feature.processors.stripe","typeLabel":"object"}},"x-atmn-mapping":true,"description":"Processor mappings for this feature. Present when a Stripe product or meter is set.","uniqueKey":"flag.oneOf.0.feature.processors","typeLabel":"object"}},"required":["id","name","type","consumable","archived"],"description":"The full feature object if expanded.","uniqueKey":"flag.oneOf.0.feature","typeLabel":"object"}},"isRequired":true,"uniqueKey":"flag.oneOf.0","typeLabel":"object"},{"type":"null","description":"The flag associated with this check, if any.","isRequired":true,"uniqueKey":"flag.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"flag","typeLabel":"object | null"},"entity_id":{"oneOf":[{"type":"string","description":"The ID of the entity, if an entity-scoped check was performed.","uniqueKey":"entity_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The ID of the entity, if an entity-scoped check was performed.","uniqueKey":"entity_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"entity_id","typeLabel":"string | null"},"required_balance":{"type":"number","description":"The required balance that was checked against.","uniqueKey":"required_balance","typeLabel":"number"},"balances":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{"type":"object","required":["feature_id","granted","remaining","usage","unlimited","overage_allowed","max_purchase","next_reset_at"],"example":{"feature_id":"messages","granted":100,"remaining":72,"usage":28,"unlimited":false,"overage_allowed":false,"max_purchase":null,"next_reset_at":1773851121437,"breakdown":[{"id":"cus_ent_39qmLooixXLAqMywgXywjAz96rV","plan_id":"pro_plan","included_grant":100,"prepaid_grant":0,"remaining":72,"usage":28,"unlimited":false,"reset":{"interval":"month","resets_at":1773851121437},"price":null,"expires_at":null}]},"properties":{"feature_id":{"type":"string","description":"The feature ID this balance is for.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature_id","typeLabel":"string"},"granted":{"type":"number","description":"Total balance granted (included + prepaid).","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.granted","typeLabel":"number"},"remaining":{"type":"number","minimum":0,"description":"Remaining balance available for use.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.remaining","typeLabel":"number"},"usage":{"type":"number","description":"Total usage consumed in the current period.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.usage","typeLabel":"number"},"unlimited":{"type":"boolean","description":"Whether this feature has unlimited usage.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.unlimited","typeLabel":"boolean"},"overage_allowed":{"type":"boolean","description":"Whether usage beyond the granted balance is allowed (with overage charges).","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.overage_allowed","typeLabel":"boolean"},"max_purchase":{"oneOf":[{"type":"number","description":"Maximum quantity that can be purchased as a top-up, or null for unlimited.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.max_purchase.oneOf.0","typeLabel":"number"},{"type":"null","description":"Maximum quantity that can be purchased as a top-up, or null for unlimited.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.max_purchase.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.max_purchase","typeLabel":"number | null"},"next_reset_at":{"oneOf":[{"type":"number","description":"Timestamp when the balance will reset, or null for no reset.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.next_reset_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Timestamp when the balance will reset, or null for no reset.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.next_reset_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.next_reset_at","typeLabel":"number | null"},"feature":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this feature, used in /check and /track calls.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.id","typeLabel":"string"},"name":{"type":"string","description":"Human-readable name displayed in the dashboard and billing UI.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.name","typeLabel":"string"},"type":{"enum":["boolean","metered","credit_system","ai_credit_system"],"type":"string","description":"Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.type","typeLabel":"enum\u003cstring>"},"consumable":{"type":"boolean","description":"For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage).","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.consumable","typeLabel":"boolean"},"archived":{"type":"boolean","description":"Whether the feature is archived and hidden from the dashboard.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.archived","typeLabel":"boolean"},"combine":{"enum":["sum","max","min"],"type":"string","description":"How grants of this feature from several plans combine: 'sum' adds them up, 'max' / 'min' keep the highest / lowest grant among plan items with no price. Omitted when 'sum'.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.combine","typeLabel":"enum\u003cstring>"},"event_names":{"type":"array","items":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.event_names.items.[INDEX]","typeLabel":"string"},"description":"Event names that trigger this feature's balance. Allows multiple features to respond to a single event.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.event_names","typeLabel":"string[]"},"credit_schema":{"type":"array","items":{"oneOf":[{"type":"object","required":["metered_feature_id","tier_behavior","tiers"],"properties":{"metered_feature_id":{"type":"string","minLength":1,"description":"ID of the metered feature that draws from this credit system.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.metered_feature_id","typeLabel":"string"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.tiers","typeLabel":"object[]"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["metered_feature_id","credit_cost"],"properties":{"metered_feature_id":{"type":"string","minLength":1,"description":"ID of the metered feature that draws from this credit system.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.metered_feature_id","typeLabel":"string"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.credit_cost","typeLabel":"number"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","required":["metered_feature_id","credit_cost"],"properties":{"metered_feature_id":{"const":"","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.metered_feature_id","typeLabel":"any"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.credit_cost","typeLabel":"number"},"billing_units":{"type":"number","exclusiveMinimum":0,"description":"Number of metered-feature units priced together. Defaults to one when omitted.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.billing_units","typeLabel":"number"},"dimensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"oneOf":[{"type":"object","required":["match","tier_behavior","tiers"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.match","typeLabel":"object"},"tier_behavior":{"const":"graduated","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tier_behavior","typeLabel":"any"},"tiers":{"type":"array","minItems":1,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"type":"string","description":"Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.","enum":["inf"],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | enum\u003cstring>"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group within this tier.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX].credit_cost","typeLabel":"number"}},"required":["to","credit_cost"],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.tiers","typeLabel":"object[]"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","required":["match","credit_cost"],"properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.match","typeLabel":"object"},"credit_cost":{"type":"number","minimum":0,"description":"Credits consumed per billing-unit group when this dimension matches.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.credit_cost","typeLabel":"number"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Breaks ties between dimensions that match the same number of keys. Higher wins.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1.priority","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties.oneOf.1","typeLabel":"object"}],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions.additionalProperties","typeLabel":"object"},"description":"Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.dimensions","typeLabel":"object"},"multipliers":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","properties":{"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.match.additionalProperties","typeLabel":"string"},"description":"Event properties this entry applies to. Every key must equal the tracked property, compared as strings.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.match","typeLabel":"object"},"factor":{"type":"number","exclusiveMinimum":0,"description":"Multiplies the matched rate. All matching multipliers stack.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.factor","typeLabel":"number"},"add":{"type":"number","description":"Added to the rate after every factor is applied, in credits per billing-unit group.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties.add","typeLabel":"number"}},"required":["match"],"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers.additionalProperties","typeLabel":"object"},"description":"Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2.multipliers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX].oneOf.2","typeLabel":"object"}],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema.items.[INDEX]","typeLabel":"object"},"description":"For classic credit systems: maps metered features to flat or graduated credit costs.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.credit_schema","typeLabel":"object[]"},"model_markups":{"oneOf":[{"type":"object","description":"Per-model markup overrides for AI credit systems.","additionalProperties":{"type":"object","properties":{"markup":{"type":"number","minimum":-100,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.markup","typeLabel":"number"},"input_cost":{"type":"number","minimum":0,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.input_cost","typeLabel":"number"},"output_cost":{"type":"number","minimum":0,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.model_markups.oneOf.0.additionalProperties.output_cost","typeLabel":"number"}},"uniqueKey":"balances.additionalProperties.oneOf.0.feature.model_markups.oneOf.0.additionalProperties","typeLabel":"object"},"uniqueKey":"balances.additionalProperties.oneOf.0.feature.model_markups.oneOf.0","typeLabel":"object"},{"type":"null","description":"Per-model markup overrides for AI credit systems.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.model_markups.oneOf.1","typeLabel":"null"}],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.model_markups","typeLabel":"object | null"},"default_markup":{"type":"number","minimum":-100,"description":"Default percentage markup for AI credit systems. Use -100 to make usage free.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.default_markup","typeLabel":"number"},"provider_markups":{"oneOf":[{"type":"object","description":"Per-provider default markup percentages for AI credit systems.","additionalProperties":{"type":"object","properties":{"markup":{"type":"number","minimum":-100,"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.feature.provider_markups.oneOf.0.additionalProperties.markup","typeLabel":"number"}},"required":["markup"],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.provider_markups.oneOf.0.additionalProperties","typeLabel":"object"},"uniqueKey":"balances.additionalProperties.oneOf.0.feature.provider_markups.oneOf.0","typeLabel":"object"},{"type":"null","description":"Per-provider default markup percentages for AI credit systems.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.provider_markups.oneOf.1","typeLabel":"null"}],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.provider_markups","typeLabel":"object | null"},"display":{"type":"object","properties":{"singular":{"oneOf":[{"type":"string","description":"Singular form for UI display (e.g., 'API call', 'seat').","uniqueKey":"balances.additionalProperties.oneOf.0.feature.display.singular.oneOf.0","typeLabel":"string"},{"type":"null","description":"Singular form for UI display (e.g., 'API call', 'seat').","uniqueKey":"balances.additionalProperties.oneOf.0.feature.display.singular.oneOf.1","typeLabel":"null"}],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.display.singular","typeLabel":"string | null"},"plural":{"oneOf":[{"type":"string","description":"Plural form for UI display (e.g., 'API calls', 'seats').","uniqueKey":"balances.additionalProperties.oneOf.0.feature.display.plural.oneOf.0","typeLabel":"string"},{"type":"null","description":"Plural form for UI display (e.g., 'API calls', 'seats').","uniqueKey":"balances.additionalProperties.oneOf.0.feature.display.plural.oneOf.1","typeLabel":"null"}],"uniqueKey":"balances.additionalProperties.oneOf.0.feature.display.plural","typeLabel":"string | null"}},"description":"Display names for the feature in billing UI and customer-facing components.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.display","typeLabel":"object"},"processors":{"type":"object","properties":{"stripe":{"type":"object","properties":{"product_id":{"type":"string","description":"Stripe product ID this feature's usage prices bill under.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.processors.stripe.product_id","typeLabel":"string"},"meter_id":{"type":"string","description":"Stripe meter ID used to create this feature's metered price.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.processors.stripe.meter_id","typeLabel":"string"}},"uniqueKey":"balances.additionalProperties.oneOf.0.feature.processors.stripe","typeLabel":"object"}},"x-atmn-mapping":true,"description":"Processor mappings for this feature. Present when a Stripe product or meter is set.","uniqueKey":"balances.additionalProperties.oneOf.0.feature.processors","typeLabel":"object"}},"required":["id","name","type","consumable","archived"],"description":"The full feature object if expanded.","uniqueKey":"balances.additionalProperties.oneOf.0.feature","typeLabel":"object"},"breakdown":{"type":"array","items":{"type":"object","properties":{"plan_id":{"oneOf":[{"type":"string","description":"The plan ID this balance originates from, or null for standalone and pooled balances.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].plan_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The plan ID this balance originates from, or null for standalone and pooled balances.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].plan_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].plan_id","typeLabel":"string | null"},"included_grant":{"type":"number","description":"Amount granted from the plan's included usage.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].included_grant","typeLabel":"number"},"prepaid_grant":{"type":"number","description":"Amount granted from prepaid purchases or top-ups.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].prepaid_grant","typeLabel":"number"},"remaining":{"type":"number","description":"Remaining balance available for use.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].remaining","typeLabel":"number"},"usage":{"type":"number","description":"Amount consumed in the current period.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].usage","typeLabel":"number"},"unlimited":{"type":"boolean","description":"Whether this balance has unlimited usage.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].unlimited","typeLabel":"boolean"},"reset":{"oneOf":[{"type":"object","description":"Reset configuration for this balance, or null if no reset.","required":["interval","resets_at"],"properties":{"interval":{"oneOf":[{"type":"string","description":"The reset interval (hour, day, week, month, etc.) or 'multiple' if combined from different intervals.","enum":["one_off","minute","hour","day","week","month","quarter","semi_annual","year"],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.interval.oneOf.0","typeLabel":"enum\u003cstring>"},{"description":"The reset interval (hour, day, week, month, etc.) or 'multiple' if combined from different intervals.","const":"multiple","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.interval.oneOf.1","typeLabel":"any"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.interval","typeLabel":"enum\u003cstring> | any"},"resets_at":{"oneOf":[{"type":"number","description":"Timestamp when the balance will next reset.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.resets_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Timestamp when the balance will next reset.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.resets_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.resets_at","typeLabel":"number | null"},"interval_count":{"type":"number","description":"Number of intervals between resets (eg. 2 for bi-monthly).","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0.interval_count","typeLabel":"number"}},"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.0","typeLabel":"object"},{"type":"null","description":"Reset configuration for this balance, or null if no reset.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].reset","typeLabel":"object | null"},"price":{"oneOf":[{"type":"object","description":"Pricing configuration if this balance has usage-based pricing.","required":["billing_units","billing_method","max_purchase"],"properties":{"billing_units":{"type":"number","description":"The number of units per billing increment (eg. $9 / 250 units).","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.billing_units","typeLabel":"number"},"billing_method":{"enum":["prepaid","usage_based"],"type":"string","description":"Whether usage is prepaid or billed pay-per-use.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.billing_method","typeLabel":"enum\u003cstring>"},"max_purchase":{"oneOf":[{"type":"number","description":"Maximum quantity that can be purchased, or null for unlimited.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.max_purchase.oneOf.0","typeLabel":"number"},{"type":"null","description":"Maximum quantity that can be purchased, or null for unlimited.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.max_purchase.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.max_purchase","typeLabel":"number | null"},"amount":{"type":"number","description":"The per-unit price amount.","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.amount","typeLabel":"number"},"tiers":{"type":"array","items":{"type":"object","properties":{"to":{"oneOf":[{"type":"number","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].to.oneOf.0","typeLabel":"number"},{"const":"inf","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].to.oneOf.1","typeLabel":"any"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].to","typeLabel":"number | any"},"amount":{"type":"number","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].amount","typeLabel":"number"},"flat_amount":{"type":"number","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX].flat_amount","typeLabel":"number"}},"required":["to","amount"],"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers.items.[INDEX]","typeLabel":"object"},"description":"Tiered pricing configuration if applicable.","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tiers","typeLabel":"object[]"},"tier_behavior":{"enum":["graduated","volume"],"type":"string","description":"How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier).","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0.tier_behavior","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.0","typeLabel":"object"},{"type":"null","description":"Pricing configuration if this balance has usage-based pricing.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].price","typeLabel":"object | null"},"expires_at":{"oneOf":[{"type":"number","description":"Timestamp when this balance expires, or null for no expiration.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].expires_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Timestamp when this balance expires, or null for no expiration.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].expires_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].expires_at","typeLabel":"number | null"},"id":{"type":"string","default":"","description":"The unique identifier for this balance breakdown.","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].id","typeLabel":"string"},"source":{"enum":["customer","entity"],"type":"string","readOnly":true,"description":"Where this row's credits come from: shared at the customer level, or owned by the entity.","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].source","typeLabel":"enum\u003cstring>"},"allocation":{"oneOf":[{"type":"object","description":"Set when this row's numbers are the entity's allocated share of the customer's credits.","required":["amount"],"properties":{"amount":{"type":"number","description":"The amount allocated to this entity.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].allocation.oneOf.0.amount","typeLabel":"number"}},"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].allocation.oneOf.0","typeLabel":"object"},{"type":"null","description":"Set when this row's numbers are the entity's allocated share of the customer's credits.","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].allocation.oneOf.1","typeLabel":"null"}],"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].allocation","typeLabel":"object | null"},"contributions":{"type":"object","properties":{"list":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].id","typeLabel":"string"},"entity_id":{"oneOf":[{"type":"string","description":"Entity holding the contributing plan. Null for customer-level plans.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Entity holding the contributing plan. Null for customer-level plans.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_id","typeLabel":"string | null"},"entity_name":{"oneOf":[{"type":"string","description":"Display name of the contributing entity.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Display name of the contributing entity.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].entity_name","typeLabel":"string | null"},"plan_id":{"type":"string","description":"The plan contributing to the pool.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].plan_id","typeLabel":"string"},"plan_name":{"oneOf":[{"type":"string","description":"Display name of the contributing plan.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].plan_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Display name of the contributing plan.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].plan_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].plan_name","typeLabel":"string | null"},"current_contribution":{"type":"number","description":"Amount this source contributes to the pool this cycle.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].current_contribution","typeLabel":"number"},"next_cycle_contribution":{"type":"number","description":"Amount this source will contribute next cycle.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].next_cycle_contribution","typeLabel":"number"},"competes":{"type":"boolean","description":"True when this source competes under a 'max' / 'min' feature: only the winning competing share counts, instead of adding up.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].competes","typeLabel":"boolean"},"unlimited":{"type":"boolean","description":"True when this source grants unlimited usage, either as a competing source or as an unlimited share riding a limited pool.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].unlimited","typeLabel":"boolean"},"created_at":{"type":"number","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX].created_at","typeLabel":"number"}},"required":["id","entity_id","entity_name","plan_id","plan_name","current_contribution","next_cycle_contribution","competes","unlimited","created_at"],"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list.items.[INDEX]","typeLabel":"object"},"description":"The first 10 plans contributing to the pool, competing shares first, then newest.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.list","typeLabel":"object[]"},"total_count":{"type":"number","description":"Total number of plans contributing to the pool.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions.total_count","typeLabel":"number"}},"required":["list","total_count"],"description":"The plans funding this shared pooled balance, usually on the customer's entities, and how much each adds this cycle and next. Present on pooled rows when expand includes `pooled_contributions`.","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX].contributions","typeLabel":"object"}},"required":["plan_id","included_grant","prepaid_grant","remaining","usage","unlimited","reset","price","expires_at"],"uniqueKey":"balances.additionalProperties.oneOf.0.breakdown.items.[INDEX]","typeLabel":"object"},"description":"Detailed breakdown of balance sources when stacking multiple plans or grants.","uniqueKey":"balances.additionalProperties.oneOf.0.breakdown","typeLabel":"object[]"},"rollovers":{"type":"array","items":{"type":"object","properties":{"granted":{"type":"number","description":"Amount originally rolled over from a previous period, before any of it was consumed.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.rollovers.items.[INDEX].granted","typeLabel":"number"},"balance":{"type":"number","description":"Amount of balance rolled over from a previous period.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.rollovers.items.[INDEX].balance","typeLabel":"number"},"expires_at":{"type":"number","description":"Timestamp when the rollover balance expires.","isRequired":true,"uniqueKey":"balances.additionalProperties.oneOf.0.rollovers.items.[INDEX].expires_at","typeLabel":"number"}},"required":["granted","balance","expires_at"],"uniqueKey":"balances.additionalProperties.oneOf.0.rollovers.items.[INDEX]","typeLabel":"object"},"description":"Rollover balances carried over from previous periods.","uniqueKey":"balances.additionalProperties.oneOf.0.rollovers","typeLabel":"object[]"},"allocated":{"type":"number","readOnly":true,"description":"Shared credits held for entities by allocations; present only when the customer allocates this feature.","uniqueKey":"balances.additionalProperties.oneOf.0.allocated","typeLabel":"number"},"unallocated":{"type":"number","readOnly":true,"description":"Remaining shared credits no allocation holds; any entity may use them.","uniqueKey":"balances.additionalProperties.oneOf.0.unallocated","typeLabel":"number"}},"uniqueKey":"balances.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"balances.additionalProperties.oneOf.1","typeLabel":"null"}],"uniqueKey":"balances.additionalProperties","typeLabel":"object | null"},"description":"Map of feature_id to balance for the checked feature and any related features (e.g. linked credit systems).","uniqueKey":"balances","typeLabel":"object"},"preview":{"type":"object","properties":{"scenario":{"enum":["usage_limit","feature_flag"],"type":"string","description":"The reason access was denied. 'usage_limit' means the customer exceeded their balance, 'feature_flag' means the feature is not included in their plan.","isRequired":true,"uniqueKey":"preview.scenario","typeLabel":"enum\u003cstring>"},"title":{"type":"string","description":"A title suitable for displaying in a paywall or upgrade modal.","isRequired":true,"uniqueKey":"preview.title","typeLabel":"string"},"message":{"type":"string","description":"A message explaining why access was denied.","isRequired":true,"uniqueKey":"preview.message","typeLabel":"string"},"feature_id":{"type":"string","description":"The ID of the feature that was checked.","isRequired":true,"uniqueKey":"preview.feature_id","typeLabel":"string"},"feature_name":{"type":"string","description":"The display name of the feature.","isRequired":true,"uniqueKey":"preview.feature_name","typeLabel":"string"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the product you set when creating the product","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].id","typeLabel":"string"},"name":{"type":"string","description":"The name of the product","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].name","typeLabel":"string"},"group":{"oneOf":[{"type":"string","description":"Product group which this product belongs to","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].group.oneOf.0","typeLabel":"string"},{"type":"null","description":"Product group which this product belongs to","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].group.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"preview.products.items.[INDEX].group","typeLabel":"string | null"},"env":{"enum":["sandbox","live"],"type":"string","description":"The environment of the product","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].env","typeLabel":"enum\u003cstring>"},"is_add_on":{"type":"boolean","description":"Whether the product is an add-on and can be purchased alongside other products","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].is_add_on","typeLabel":"boolean"},"is_default":{"type":"boolean","description":"Whether the product is the default product","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].is_default","typeLabel":"boolean"},"archived":{"type":"boolean","description":"Whether this product has been archived and is no longer available","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].archived","typeLabel":"boolean"},"version":{"type":"number","description":"The current version of the product","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].version","typeLabel":"number"},"created_at":{"type":"number","description":"The timestamp of when the product was created in milliseconds since epoch","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].created_at","typeLabel":"number"},"items":{"type":"array","items":{"type":"object","properties":{"type":{"oneOf":[{"type":"string","description":"The type of the product item","enum":["feature","priced_feature","price"],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"The type of the product item","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].type.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].type","typeLabel":"enum\u003cstring> | null"},"feature_id":{"oneOf":[{"type":"string","description":"The feature ID of the product item. If the item is a fixed price, should be `null`","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].feature_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The feature ID of the product item. If the item is a fixed price, should be `null`","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].feature_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].feature_id","typeLabel":"string | null"},"feature_type":{"oneOf":[{"type":"string","description":"Single use features are used once and then depleted, like API calls or credits. Continuous use features are those being used on an ongoing-basis, like storage or seats.","enum":["single_use","continuous_use","boolean","static"],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].feature_type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Single use features are used once and then depleted, like API calls or credits. Continuous use features are those being used on an ongoing-basis, like storage or seats.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].feature_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].feature_type","typeLabel":"enum\u003cstring> | null"},"included_usage":{"oneOf":[{"type":"number","description":"The amount of usage included for this feature.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].included_usage.oneOf.0","typeLabel":"number"},{"description":"The amount of usage included for this feature.","const":"inf","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].included_usage.oneOf.1","typeLabel":"any"},{"type":"null","description":"The amount of usage included for this feature.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].included_usage.oneOf.2","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].included_usage","typeLabel":"number | any | null"},"interval":{"oneOf":[{"type":"string","description":"The reset or billing interval of the product item. If null, feature will have no reset date, and if there's a price, it will be billed one-off.","enum":["minute","hour","day","week","month","quarter","semi_annual","year"],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].interval.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"The reset or billing interval of the product item. If null, feature will have no reset date, and if there's a price, it will be billed one-off.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].interval.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].interval","typeLabel":"enum\u003cstring> | null"},"interval_count":{"oneOf":[{"type":"number","description":"The interval count of the product item.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].interval_count.oneOf.0","typeLabel":"number"},{"type":"null","description":"The interval count of the product item.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].interval_count.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].interval_count","typeLabel":"number | null"},"price":{"oneOf":[{"type":"number","description":"The price of the product item. Should be `null` if tiered pricing is set.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].price.oneOf.0","typeLabel":"number"},{"type":"null","description":"The price of the product item. Should be `null` if tiered pricing is set.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].price.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].price","typeLabel":"number | null"},"tiers":{"oneOf":[{"type":"array","items":{"oneOf":[{},{"type":"null","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].tiers.oneOf.0.items.[INDEX].oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].tiers.oneOf.0.items.[INDEX]","typeLabel":"null"},"description":"Tiered pricing for the product item. Not applicable for fixed price items.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].tiers.oneOf.0","typeLabel":"null[]"},{"type":"null","description":"Tiered pricing for the product item. Not applicable for fixed price items.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].tiers.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].tiers","typeLabel":"null[] | null"},"tier_behavior":{"oneOf":[{"type":"string","description":"How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier). Defaults to graduated.","enum":["graduated","volume"],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].tier_behavior.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier). Defaults to graduated.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].tier_behavior.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].tier_behavior","typeLabel":"enum\u003cstring> | null"},"usage_model":{"oneOf":[{"type":"string","description":"Whether the feature should be prepaid upfront or billed for how much they use end of billing period.","enum":["prepaid","pay_per_use"],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].usage_model.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Whether the feature should be prepaid upfront or billed for how much they use end of billing period.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].usage_model.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].usage_model","typeLabel":"enum\u003cstring> | null"},"billing_units":{"oneOf":[{"type":"number","description":"The amount per billing unit (eg. $9 / 250 units)","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].billing_units.oneOf.0","typeLabel":"number"},{"type":"null","description":"The amount per billing unit (eg. $9 / 250 units)","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].billing_units.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].billing_units","typeLabel":"number | null"},"reset_usage_when_enabled":{"oneOf":[{"type":"boolean","description":"Whether the usage should be reset when the product is enabled.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].reset_usage_when_enabled.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the usage should be reset when the product is enabled.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].reset_usage_when_enabled.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].reset_usage_when_enabled","typeLabel":"boolean | null"},"entity_feature_id":{"oneOf":[{"type":"string","description":"The entity feature ID of the product item if applicable.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].entity_feature_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The entity feature ID of the product item if applicable.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].entity_feature_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].entity_feature_id","typeLabel":"string | null"},"display":{"oneOf":[{"type":"object","description":"The display of the product item.","required":["primary_text"],"properties":{"primary_text":{"type":"string","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].display.oneOf.0.primary_text","typeLabel":"string"},"secondary_text":{"oneOf":[{"type":"string","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].display.oneOf.0.secondary_text.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].display.oneOf.0.secondary_text.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].display.oneOf.0.secondary_text","typeLabel":"string | null"}},"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].display.oneOf.0","typeLabel":"object"},{"type":"null","description":"The display of the product item.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].display.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].display","typeLabel":"object | null"},"quantity":{"oneOf":[{"type":"number","description":"Used in customer context. Quantity of the feature the customer has prepaid for.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].quantity.oneOf.0","typeLabel":"number"},{"type":"null","description":"Used in customer context. Quantity of the feature the customer has prepaid for.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].quantity.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].quantity","typeLabel":"number | null"},"next_cycle_quantity":{"oneOf":[{"type":"number","description":"Used in customer context. Quantity of the feature the customer will prepay for in the next cycle.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].next_cycle_quantity.oneOf.0","typeLabel":"number"},{"type":"null","description":"Used in customer context. Quantity of the feature the customer will prepay for in the next cycle.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].next_cycle_quantity.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].next_cycle_quantity","typeLabel":"number | null"},"config":{"oneOf":[{"type":"object","description":"Configuration for rollover and proration behavior of the feature.","properties":{"rollover":{"oneOf":[{"type":"object","required":["length"],"properties":{"length":{"type":"number","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0.length","typeLabel":"number"},"max":{"oneOf":[{"type":"number","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0.max.oneOf.0","typeLabel":"number"},{"type":"null","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0.max.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0.max","typeLabel":"number | null"},"max_percentage":{"oneOf":[{"type":"number","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0.max_percentage.oneOf.0","typeLabel":"number"},{"type":"null","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0.max_percentage.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0.max_percentage","typeLabel":"number | null"},"duration":{"enum":["month","forever"],"type":"string","default":"month","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0.duration","typeLabel":"enum\u003cstring>"}},"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.rollover","typeLabel":"object | null"},"on_increase":{"oneOf":[{"type":"string","enum":["bill_immediately","prorate_immediately","prorate_next_cycle","bill_next_cycle"],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.on_increase.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.on_increase.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.on_increase","typeLabel":"enum\u003cstring> | null"},"on_decrease":{"oneOf":[{"type":"string","enum":["prorate","prorate_immediately","prorate_next_cycle","none","no_prorations"],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.on_decrease.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.on_decrease.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0.on_decrease","typeLabel":"enum\u003cstring> | null"}},"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.0","typeLabel":"object"},{"type":"null","description":"Configuration for rollover and proration behavior of the feature.","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX].config","typeLabel":"object | null"}},"description":"Product item defining features and pricing within a product","uniqueKey":"preview.products.items.[INDEX].\\items.items.[INDEX]","typeLabel":"object"},"description":"Array of product items that define the product's features and pricing","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].\\items","typeLabel":"object[]"},"free_trial":{"oneOf":[{"type":"object","description":"Free trial configuration for this product, if available","required":["duration","length","unique_fingerprint","card_required"],"properties":{"duration":{"enum":["day","month","year"],"type":"string","description":"The duration type of the free trial","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.duration","typeLabel":"enum\u003cstring>"},"length":{"type":"number","description":"The length of the duration type specified","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.length","typeLabel":"number"},"unique_fingerprint":{"type":"boolean","description":"Whether the free trial is limited to one per customer fingerprint","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.unique_fingerprint","typeLabel":"boolean"},"card_required":{"type":"boolean","description":"Whether the free trial requires a card. If false, the customer can attach the product without going through a checkout flow or having a card on file.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.card_required","typeLabel":"boolean"},"on_end":{"oneOf":[{"type":"string","description":"Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.","enum":["bill","revert"],"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.on_end.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.","uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.on_end.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.on_end","typeLabel":"enum\u003cstring> | null"},"trial_available":{"oneOf":[{"type":"boolean","description":"Used in customer context. Whether the free trial is available for the customer if they were to attach the product.","default":true,"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.trial_available.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Used in customer context. Whether the free trial is available for the customer if they were to attach the product.","uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.trial_available.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0.trial_available","typeLabel":"boolean | null"}},"isRequired":true,"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.0","typeLabel":"object"},{"type":"null","description":"Free trial configuration for this product, if available","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].free_trial.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"preview.products.items.[INDEX].free_trial","typeLabel":"object | null"},"base_variant_id":{"oneOf":[{"type":"string","description":"ID of the base variant this product is derived from","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].base_variant_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"ID of the base variant this product is derived from","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].base_variant_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"preview.products.items.[INDEX].base_variant_id","typeLabel":"string | null"},"billing_controls":{"type":"object","properties":{"auto_topups":{"type":"array","items":{"type":"object","properties":{"feature_id":{"type":"string","description":"The ID of the feature (credit balance) to auto top-up.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].feature_id","typeLabel":"string"},"threshold":{"type":"number","description":"When the balance drops below this threshold, an auto top-up will be purchased.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].threshold","typeLabel":"number"},"quantity":{"type":"number","minimum":1,"description":"Amount of credits to add per auto top-up.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].quantity","typeLabel":"number"},"enabled":{"type":"boolean","default":false,"description":"Whether auto top-up is enabled.","uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].enabled","typeLabel":"boolean"},"purchase_limit":{"type":"object","properties":{"interval":{"enum":["hour","day","week","month"],"type":"string","description":"The time interval for the purchase limit window.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].purchase_limit.interval","typeLabel":"enum\u003cstring>"},"limit":{"type":"number","minimum":1,"description":"Maximum number of auto top-ups allowed within the interval.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].purchase_limit.limit","typeLabel":"number"},"interval_count":{"type":"number","minimum":1,"default":1,"description":"Number of intervals in the purchase limit window.","uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].purchase_limit.interval_count","typeLabel":"number"}},"required":["interval","limit"],"description":"Optional rate limit to cap how often auto top-ups occur.","uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].purchase_limit","typeLabel":"object"},"invoice_mode":{"type":"boolean","description":"When true, auto top-up creates a send_invoice invoice instead of auto-charging.","uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX].invoice_mode","typeLabel":"boolean"}},"required":["feature_id","threshold","quantity"],"uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups.items.[INDEX]","typeLabel":"object"},"description":"List of auto top-up configurations per feature.","uniqueKey":"preview.products.items.[INDEX].billing_controls.auto_topups","typeLabel":"object[]"},"spend_limits":{"type":"array","items":{"type":"object","properties":{"feature_id":{"type":"string","description":"Optional feature ID this spend limit applies to.","uniqueKey":"preview.products.items.[INDEX].billing_controls.spend_limits.items.[INDEX].feature_id","typeLabel":"string"},"enabled":{"type":"boolean","default":false,"description":"Whether the overage spend limit is enabled.","uniqueKey":"preview.products.items.[INDEX].billing_controls.spend_limits.items.[INDEX].enabled","typeLabel":"boolean"},"limit_type":{"enum":["absolute","usage_percentage"],"type":"string","description":"How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.","uniqueKey":"preview.products.items.[INDEX].billing_controls.spend_limits.items.[INDEX].limit_type","typeLabel":"enum\u003cstring>"},"overage_limit":{"type":"number","minimum":0,"description":"Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.","uniqueKey":"preview.products.items.[INDEX].billing_controls.spend_limits.items.[INDEX].overage_limit","typeLabel":"number"},"skip_overage_billing":{"type":"boolean","description":"When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.","uniqueKey":"preview.products.items.[INDEX].billing_controls.spend_limits.items.[INDEX].skip_overage_billing","typeLabel":"boolean"}},"uniqueKey":"preview.products.items.[INDEX].billing_controls.spend_limits.items.[INDEX]","typeLabel":"object"},"description":"List of overage spend limits per feature (caps overage spend).","uniqueKey":"preview.products.items.[INDEX].billing_controls.spend_limits","typeLabel":"object[]"},"usage_limits":{"type":"array","items":{"type":"object","properties":{"feature_id":{"type":"string","description":"The feature this usage limit applies to.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX].feature_id","typeLabel":"string"},"limit":{"type":"number","minimum":0,"description":"Maximum units allowed per interval.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX].limit","typeLabel":"number"},"interval":{"enum":["day","week","month","year"],"type":"string","description":"Interval for the cap, aligned to the customer's billing cycle.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX].interval","typeLabel":"enum\u003cstring>"},"enabled":{"type":"boolean","default":true,"description":"Whether this usage limit is enabled.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX].enabled","typeLabel":"boolean"},"anchor":{"enum":["billing_cycle","utc"],"type":"string","description":"Window alignment. 'billing_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX].anchor","typeLabel":"enum\u003cstring>"},"filter":{"type":"object","properties":{"properties":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"string","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX].filter.properties.additionalProperties","typeLabel":"string"},"isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX].filter.properties","typeLabel":"object"}},"required":["properties"],"description":"When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX].filter","typeLabel":"object"}},"required":["feature_id","limit","interval"],"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits.items.[INDEX]","typeLabel":"object"},"description":"List of hard usage caps per feature (max units per interval).","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_limits","typeLabel":"object[]"},"usage_alerts":{"type":"array","items":{"type":"object","properties":{"threshold":{"type":"number","minimum":0,"description":"The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage_percentage or remaining_percentage, this is a percentage (0-100).","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].threshold","typeLabel":"number"},"threshold_type":{"enum":["usage","usage_percentage","remaining","remaining_percentage"],"type":"string","description":"Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].threshold_type","typeLabel":"enum\u003cstring>"},"feature_id":{"type":"string","description":"The feature ID this alert applies to.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].feature_id","typeLabel":"string"},"enabled":{"type":"boolean","default":true,"description":"Whether this usage alert is enabled.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].enabled","typeLabel":"boolean"},"basis":{"enum":["balance","included","recurring","usage_limit"],"type":"string","default":"balance","description":"What 100% means. balance: every grant on the feature. included: the plan allowance only. recurring: grants that reset. usage_limit: the cap of the usage limit with the same feature and filter.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].basis","typeLabel":"enum\u003cstring>"},"filter":{"type":"object","properties":{"properties":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"string","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].filter.properties.additionalProperties","typeLabel":"string"},"isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].filter.properties","typeLabel":"object"}},"required":["properties"],"description":"Only valid with basis usage_limit. Points the alert at the usage limit carrying the same filter.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].filter","typeLabel":"object"},"name":{"type":"string","description":"Optional user-defined label to distinguish multiple alerts on the same feature.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX].name","typeLabel":"string"}},"required":["threshold","threshold_type"],"uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts.items.[INDEX]","typeLabel":"object"},"description":"List of usage alert configurations per feature.","uniqueKey":"preview.products.items.[INDEX].billing_controls.usage_alerts","typeLabel":"object[]"},"overage_allowed":{"type":"array","items":{"type":"object","properties":{"feature_id":{"type":"string","description":"The feature ID this overage allowed control applies to.","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].billing_controls.overage_allowed.items.[INDEX].feature_id","typeLabel":"string"},"enabled":{"type":"boolean","default":false,"description":"Whether overage is allowed for this feature.","uniqueKey":"preview.products.items.[INDEX].billing_controls.overage_allowed.items.[INDEX].enabled","typeLabel":"boolean"}},"required":["feature_id"],"uniqueKey":"preview.products.items.[INDEX].billing_controls.overage_allowed.items.[INDEX]","typeLabel":"object"},"description":"List of overage allowed controls per feature. When enabled, usage can exceed balance.","uniqueKey":"preview.products.items.[INDEX].billing_controls.overage_allowed","typeLabel":"object[]"}},"description":"Plan-level billing controls used as customer defaults","uniqueKey":"preview.products.items.[INDEX].billing_controls","typeLabel":"object"},"scenario":{"enum":["scheduled","active","new","renew","upgrade","update_prepaid_quantity","downgrade","cancel","expired","past_due"],"type":"string","description":"Scenario for when this product is used in attach flows","uniqueKey":"preview.products.items.[INDEX].scenario","typeLabel":"enum\u003cstring>"},"properties":{"type":"object","properties":{"is_free":{"type":"boolean","description":"True if the product has no base price or usage prices","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].properties.is_free","typeLabel":"boolean"},"is_one_off":{"type":"boolean","description":"True if the product only contains a one-time price","isRequired":true,"uniqueKey":"preview.products.items.[INDEX].properties.is_one_off","typeLabel":"boolean"},"interval_group":{"oneOf":[{"type":"string","description":"The billing interval group for recurring products (e.g., 'monthly', 'yearly')","uniqueKey":"preview.products.items.[INDEX].properties.interval_group.oneOf.0","typeLabel":"string"},{"type":"null","description":"The billing interval group for recurring products (e.g., 'monthly', 'yearly')","uniqueKey":"preview.products.items.[INDEX].properties.interval_group.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].properties.interval_group","typeLabel":"string | null"},"has_trial":{"oneOf":[{"type":"boolean","description":"True if the product includes a free trial","uniqueKey":"preview.products.items.[INDEX].properties.has_trial.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"True if the product includes a free trial","uniqueKey":"preview.products.items.[INDEX].properties.has_trial.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].properties.has_trial","typeLabel":"boolean | null"},"updateable":{"oneOf":[{"type":"boolean","description":"True if the product can be updated after creation (only applicable if there are prepaid recurring prices)","uniqueKey":"preview.products.items.[INDEX].properties.updateable.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"True if the product can be updated after creation (only applicable if there are prepaid recurring prices)","uniqueKey":"preview.products.items.[INDEX].properties.updateable.oneOf.1","typeLabel":"null"}],"uniqueKey":"preview.products.items.[INDEX].properties.updateable","typeLabel":"boolean | null"}},"required":["is_free","is_one_off"],"uniqueKey":"preview.products.items.[INDEX].properties","typeLabel":"object"}},"required":["id","name","group","env","is_add_on","is_default","archived","version","created_at","items","free_trial","base_variant_id"],"uniqueKey":"preview.products.items.[INDEX]","typeLabel":"object"},"description":"Products that would grant access to this feature. Use to display upgrade options.","isRequired":true,"uniqueKey":"preview.products","typeLabel":"object[]"}},"required":["scenario","title","message","feature_id","feature_name","products"],"description":"Upgrade/upsell information when access is denied. Only present if with_preview was true and allowed is false.","uniqueKey":"preview","typeLabel":"object"}},"required":["allowed","customer_id","balance","flag"],"examples":[{"allowed":true,"customer_id":"cus_123","entity_id":null,"required_balance":1,"balance":{"feature_id":"messages","granted":100,"remaining":72,"usage":28,"unlimited":false,"overage_allowed":false,"max_purchase":null,"next_reset_at":1773851121437,"breakdown":[{"id":"cus_ent_39qmLooixXLAqMywgXywjAz96rV","plan_id":"pro_plan","included_grant":100,"prepaid_grant":0,"remaining":72,"usage":28,"unlimited":false,"reset":{"interval":"month","resets_at":1773851121437},"price":null,"expires_at":null}]}}],"uniqueKey":"","typeLabel":"object"},"example":{"allowed":true,"customer_id":"cus_123","entity_id":null,"required_balance":1,"balance":{"feature_id":"messages","granted":100,"remaining":72,"usage":28,"unlimited":false,"overage_allowed":false,"max_purchase":null,"next_reset_at":1773851121437,"breakdown":[{"id":"cus_ent_39qmLooixXLAqMywgXywjAz96rV","plan_id":"pro_plan","included_grant":100,"prepaid_grant":0,"remaining":72,"usage":28,"unlimited":false,"reset":{"interval":"month","resets_at":1773851121437},"price":null,"expires_at":null}]}},"examples":{"Example":{"title":"Example","value":{"allowed":true,"customer_id":"cus_123","entity_id":null,"required_balance":1,"balance":{"feature_id":"messages","granted":100,"remaining":72,"usage":28,"unlimited":false,"overage_allowed":false,"max_purchase":null,"next_reset_at":1773851121437,"breakdown":[{"id":"cus_ent_39qmLooixXLAqMywgXywjAz96rV","plan_id":"pro_plan","included_grant":100,"prepaid_grant":0,"remaining":72,"usage":28,"unlimited":false,"reset":{"interval":"month","resets_at":1773851121437},"price":null,"expires_at":null}]}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"53876c4e-3cd5-4c7e-b82b-fb98671718cb":{"secretKey":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"secretKey"}}},"servers":{"fe6701f7-be5c-40aa-b244-1a6f83c52f58":{"url":"https://api.useautumn.com","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"secretKey"},"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":"secretKey","name":"Authorization"}],"title":"secretKey"}]},"originalFileLocation":"api/openapi.yml"},"subdomain":"autumn-b9b4c0fb","siteName":"Autumn","title":"Check Permissions - Autumn","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-26T11:21:46.407Z","originalFileLocation":"api-reference/core/check.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=\"Checks whether a customer currently has enough balance to use a feature. Use this to gate access before a feature action. Enable sendEvent when you want to check and consume balance atomically in one request.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Autumn\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Check Permissions - Autumn\">\u003cmeta data-mint-head property=\"og:description\" content=\"Checks whether a customer currently has enough balance to use a feature. Use this to gate access before a feature action. Enable sendEvent when you want to check and consume balance atomically in one request.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Autumn\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.useautumn.com/api-reference/core/check\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://autumn-b9b4c0fb.mintlify.app/_mintlify/api/og/v2?division=Balances\u0026amp;title=Check+Permissions\u0026amp;description=Checks+whether+a+customer+currently+has+enough+balance+to+use+a+feature.%0A%0AUse+this+to+gate+access+before+a+feature+action.+Enable+sendEvent+when+you+want+to+che\u0026amp;theme=3bf7e6d15826cac91d0b643c\u0026amp;signature=2e2bbf81551c5ad196a881345d0e9e7059efd3f7280715e2b592de9b85659a10\">\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=\"Check Permissions - Autumn\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Checks whether a customer currently has enough balance to use a feature. Use this to gate access before a feature action. Enable sendEvent when you want to check and consume balance atomically in one request.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://autumn-b9b4c0fb.mintlify.app/_mintlify/api/og/v2?division=Balances\u0026amp;title=Check+Permissions\u0026amp;description=Checks+whether+a+customer+currently+has+enough+balance+to+use+a+feature.%0A%0AUse+this+to+gate+access+before+a+feature+action.+Enable+sendEvent+when+you+want+to+che\u0026amp;theme=3bf7e6d15826cac91d0b643c\u0026amp;signature=2e2bbf81551c5ad196a881345d0e9e7059efd3f7280715e2b592de9b85659a10\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Autumn\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#8838ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.useautumn.com/api-reference/core/check\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/core/check.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.useautumn.com/#organization\",\"name\":\"Autumn\",\"url\":\"https://docs.useautumn.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/autumn-b9b4c0fb/BOEMpWFJsAdGcii1/assets/logo/autumn-dark.svg?fit=max\u0026auto=format\u0026n=BOEMpWFJsAdGcii1\u0026q=85\u0026s=720bd2227c435e77f2c91cbfcbccd274\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.useautumn.com#website\",\"name\":\"Autumn\",\"url\":\"https://docs.useautumn.com\",\"publisher\":{\"@id\":\"https://docs.useautumn.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.useautumn.com/api-reference/core/check#webpage\",\"url\":\"https://docs.useautumn.com/api-reference/core/check\",\"name\":\"Check Permissions\",\"description\":\"Checks whether a customer currently has enough balance to use a feature. Use this to gate access before a feature action. Enable sendEvent when you want to check and consume balance atomically in one request.\",\"dateModified\":\"2026-10-26T11:21:46.407Z\",\"isPartOf\":{\"@id\":\"https://docs.useautumn.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.useautumn.com/api-reference/core/check#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.useautumn.com/api-reference/core/check#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Autumn\",\"item\":\"https://docs.useautumn.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Check Permissions\",\"item\":\"https://docs.useautumn.com/api-reference/core/check\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.useautumn.com/api-reference/core/check#apireference\",\"headline\":\"Check Permissions\",\"name\":\"Check Permissions\",\"description\":\"Checks whether a customer currently has enough balance to use a feature. Use this to gate access before a feature action. Enable sendEvent when you want to check and consume balance atomically in one request.\",\"url\":\"https://docs.useautumn.com/api-reference/core/check\",\"mainEntityOfPage\":{\"@id\":\"https://docs.useautumn.com/api-reference/core/check#webpage\"},\"dateModified\":\"2026-10-26T11:21:46.407Z\",\"publisher\":{\"@id\":\"https://docs.useautumn.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.useautumn.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Autumn\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Autumn","nav":{"global":{"anchors":[{"anchor":"Discord","icon":"discord","href":"https://discord.gg/STqxY92zuS"},{"anchor":"GitHub","icon":"github","href":"https://github.com/useautumn/autumn"},{"anchor":"Website","icon":"globe","href":"https://useautumn.com"}]},"tabs":[{"tab":"Documentation","icon":"folder-open","pages":[{"title":"Documentation","href":"/welcome"}]},{"tab":"Examples","icon":"graduation-cap","pages":[{"title":"Examples","href":"/examples/monetary-credits"}]},{"tab":"CLI","icon":"square-terminal","pages":[{"title":"CLI","href":"/cli/getting-started"}]},{"tab":"API Reference","icon":"display-code","groups":[{"group":"Billing","pages":[{"title":"Attach","openapi":"openapi POST /v1/billing.attach","href":"/api-reference/billing/attach"},{"title":"Update Subscription","openapi":"openapi POST /v1/billing.update","href":"/api-reference/billing/billingUpdate"},{"title":"Open Customer Portal","openapi":"openapi POST /v1/billing.open_customer_portal","href":"/api-reference/billing/openCustomerPortal"},{"title":"Setup Payment","openapi":"openapi POST /v1/billing.setup_payment","href":"/api-reference/billing/setupPayment"},{"title":"Multi Attach","openapi":"openapi POST /v1/billing.multi_attach","href":"/api-reference/billing/multiAttach"},{"title":"Multi Update","openapi":"openapi POST /v1/billing.multi_update","href":"/api-reference/billing/multiUpdate"},{"title":"Create Schedule","openapi":"openapi POST /v1/billing.create_schedule","href":"/api-reference/billing/createSchedule"},{"title":"Verify","openapi":"openapi POST /v1/billing.verify","href":"/api-reference/billing/verify"},{"title":"Import","openapi":"openapi POST /v1/billing.import","href":"/api-reference/billing/import"},{"group":"Previews","pages":[{"title":"Preview Attach","openapi":"openapi POST /v1/billing.preview_attach","href":"/api-reference/billing/previewAttach"},{"title":"Preview Update","openapi":"openapi POST /v1/billing.preview_update","href":"/api-reference/billing/previewUpdate"},{"title":"Preview Multi Attach","openapi":"openapi POST /v1/billing.preview_multi_attach","href":"/api-reference/billing/previewMultiAttach"},{"title":"Preview Multi Update","openapi":"openapi POST /v1/billing.preview_multi_update","href":"/api-reference/billing/previewMultiUpdate"}]},{"group":"Licenses","pages":[{"title":"Attach License","openapi":"openapi POST /v1/licenses.attach","href":"/api-reference/licenses/attachLicense"},{"title":"Release License","openapi":"openapi POST /v1/licenses.release","href":"/api-reference/licenses/releaseLicense"},{"title":"List Licenses","openapi":"openapi POST /v1/licenses.list","href":"/api-reference/licenses/listLicenses"},{"title":"List License Assignments","openapi":"openapi POST /v1/licenses.list_assignments","description":"Lists license assignments for a customer.","href":"/api-reference/licenses/listLicenseAssignments"}]}]},{"group":"Balances","pages":[{"title":"Check Permissions","openapi":"openapi POST /v1/balances.check","href":"/api-reference/core/check"},{"title":"Track Usage","openapi":"openapi POST /v1/balances.track","description":"Records usage for a customer feature. Queued by default; pass async: false to apply it before responding with updated balances.\n\nUse this after an action happens to decrement usage, or send a negative value to credit balance back.","href":"/api-reference/core/track"},{"title":"Batch Track Usage","openapi":"openapi POST /v1/balances.batch_track","href":"/api-reference/core/batchTrack"},{"title":"List Balances","openapi":"openapi POST /v1/balances.list","href":"/api-reference/balances/listBalances"},{"title":"Create Balance","openapi":"openapi POST /v1/balances.create","href":"/api-reference/balances/createBalance"},{"title":"Update Balance","openapi":"openapi POST /v1/balances.update","href":"/api-reference/balances/updateBalance"},{"title":"Delete Balance","openapi":"openapi POST /v1/balances.delete","href":"/api-reference/balances/deleteBalance"},{"title":"Finalize Lock","openapi":"openapi POST /v1/balances.finalize","href":"/api-reference/balances/finalizeLock"}]},{"group":"Customers","pages":[{"title":"Get or Create Customer","openapi":"openapi POST /v1/customers.get_or_create","href":"/api-reference/customers/getOrCreateCustomer"},{"title":"Get Customer","openapi":"openapi POST /v1/customers.get","href":"/api-reference/customers/getCustomer"},{"title":"List Customers","openapi":"openapi POST /v1/customers.list","href":"/api-reference/customers/listCustomers"},{"title":"List Subscriptions","openapi":"openapi POST /v1/subscriptions.list","href":"/api-reference/customers/listSubscriptions"},{"title":"List Purchases","openapi":"openapi POST /v1/purchases.list","href":"/api-reference/customers/listPurchases"},{"title":"Update Customer","openapi":"openapi POST /v1/customers.update","href":"/api-reference/customers/updateCustomer"},{"title":"Delete Customer","openapi":"openapi POST /v1/customers.delete","href":"/api-reference/customers/deleteCustomer"}]},{"group":"Invoices","pages":[{"title":"List Invoices","openapi":"openapi POST /v1/invoices.list","href":"/api-reference/invoices/listInvoices"},{"title":"Create Invoice","openapi":"openapi POST /v1/invoices.create","href":"/api-reference/invoices/createInvoice"},{"title":"Mark Invoice as Paid","openapi":"openapi POST /v1/invoices.pay","href":"/api-reference/invoices/payInvoice"},{"title":"Void Invoice","openapi":"openapi POST /v1/invoices.void","href":"/api-reference/invoices/voidInvoice"},{"title":"Reissue Invoice","openapi":"openapi POST /v1/invoices.reissue","href":"/api-reference/invoices/reissueInvoice"},{"title":"Issue Credit Note","openapi":"openapi POST /v1/invoices.issue_credit_note","href":"/api-reference/invoices/issueCreditNote"},{"title":"Backfill Invoices","openapi":"openapi POST /v1/invoices.insert","href":"/api-reference/invoices/insertInvoices"},{"title":"List Invoice Templates","openapi":"openapi POST /v1/invoices.listTemplates","href":"/api-reference/invoices/listInvoiceTemplates"}]},{"group":"Authorization","pages":[{"title":"Mint","openapi":"openapi POST /v1/keys.mint","href":"/api-reference/keys/mintKey"},{"title":"Refresh","openapi":"openapi POST /v1/keys.refresh","href":"/api-reference/keys/refreshKey"},{"title":"Revoke","openapi":"openapi POST /v1/keys.revoke","href":"/api-reference/keys/revokeKey"}]},{"group":"Events","pages":[{"title":"List Events","openapi":"openapi POST /v1/events.list","href":"/api-reference/events/listEvents"},{"title":"Aggregate Events","openapi":"openapi POST /v1/events.aggregate","href":"/api-reference/events/aggregateEvents"}]},{"group":"Logs","pages":[{"title":"Search Request Logs","openapi":"openapi POST /v1/logs.search","href":"/api-reference/logs/searchRequestLogs"}]},{"group":"Entities","pages":[{"title":"Get Entity","openapi":"openapi POST /v1/entities.get","href":"/api-reference/entities/getEntity"},{"title":"List Entities","openapi":"openapi POST /v1/entities.list","href":"/api-reference/entities/listEntities"},{"title":"Create Entity","openapi":"openapi POST /v1/entities.create","href":"/api-reference/entities/createEntity"},{"title":"Update Entity","openapi":"openapi POST /v1/entities.update","href":"/api-reference/entities/updateEntity"},{"title":"Delete Entity","openapi":"openapi POST /v1/entities.delete","href":"/api-reference/entities/deleteEntity"}]},{"group":"Accounts","pages":[{"title":"Get Account","openapi":"openapi POST /v1/accounts.get","href":"/api-reference/accounts/getAccount"},{"title":"Update Account","openapi":"openapi POST /v1/accounts.update","href":"/api-reference/accounts/updateAccount"}]},{"group":"Plans","pages":[{"title":"Get a plan","openapi":"openapi POST /v1/plans.get","href":"/api-reference/plans/getPlan"},{"title":"List all plans","openapi":"openapi POST /v1/plans.list","href":"/api-reference/plans/listPlans"},{"title":"Create a plan","openapi":"openapi POST /v1/plans.create","href":"/api-reference/plans/createPlan"},{"title":"Update a plan","openapi":"openapi POST /v1/plans.update","href":"/api-reference/plans/updatePlan"},{"title":"Delete a plan","openapi":"openapi POST /v1/plans.delete","href":"/api-reference/plans/deletePlan"}]},{"group":"Features","pages":[{"title":"Get Feature","openapi":"openapi POST /v1/features.get","href":"/api-reference/features/getFeature"},{"title":"List Features","openapi":"openapi POST /v1/features.list","href":"/api-reference/features/listFeatures"},{"title":"Create Feature","openapi":"openapi POST /v1/features.create","href":"/api-reference/features/createFeature"},{"title":"Update Feature","openapi":"openapi POST /v1/features.update","href":"/api-reference/features/updateFeature"},{"title":"Delete Feature","openapi":"openapi POST /v1/features.delete","href":"/api-reference/features/deleteFeature"}]},{"group":"Rewards \u0026 Referrals","pages":[{"title":"Create Referral Program","openapi":"openapi POST /v1/referral_programs.create","href":"/api-reference/referrals/createReferralProgram"},{"title":"List Referral Programs","openapi":"openapi POST /v1/referral_programs.list","href":"/api-reference/referrals/listReferralPrograms"},{"title":"Get Referral Program","openapi":"openapi POST /v1/referral_programs.get","href":"/api-reference/referrals/getReferralProgram"},{"title":"Update Referral Program","openapi":"openapi POST /v1/referral_programs.update","href":"/api-reference/referrals/updateReferralProgram"},{"title":"Delete Referral Program","openapi":"openapi POST /v1/referral_programs.delete","href":"/api-reference/referrals/deleteReferralProgram"},{"title":"Create Referral Code","openapi":"openapi POST /v1/referrals.create_code","href":"/api-reference/referrals/createReferralCode"},{"title":"Redeem Referral Code","openapi":"openapi POST /v1/referrals.redeem_code","href":"/api-reference/referrals/redeemReferralCode"},{"title":"Create Reward","openapi":"openapi POST /v1/rewards.create","href":"/api-reference/rewards/createReward"},{"title":"List Rewards","openapi":"openapi POST /v1/rewards.list","href":"/api-reference/rewards/listRewards"},{"title":"Get Reward","openapi":"openapi POST /v1/rewards.get","href":"/api-reference/rewards/getReward"},{"title":"Update Reward","openapi":"openapi POST /v1/rewards.update","href":"/api-reference/rewards/updateReward"},{"title":"Delete Reward","openapi":"openapi POST /v1/rewards.delete","href":"/api-reference/rewards/deleteReward"},{"title":"Redeem Reward Code","openapi":"openapi POST /v1/rewards.redeem","href":"/api-reference/rewards/redeemRewardCode"}]},{"group":"Webhooks","pages":[{"title":"Get Webhook","openapi":"openapi POST /v1/webhooks.get","href":"/api-reference/webhooks/getWebhook"},{"title":"List Webhooks","openapi":"openapi POST /v1/webhooks.list","href":"/api-reference/webhooks/listWebhooks"},{"title":"Create Webhook","openapi":"openapi POST /v1/webhooks.create","href":"/api-reference/webhooks/createWebhook"},{"title":"Update Webhook","openapi":"openapi POST /v1/webhooks.update","href":"/api-reference/webhooks/updateWebhook"},{"title":"Delete Webhook","openapi":"openapi POST /v1/webhooks.delete","href":"/api-reference/webhooks/deleteWebhook"},{"title":"Sync Webhooks","openapi":"openapi POST /v1/webhooks.sync","href":"/api-reference/webhooks/syncWebhooks"},{"group":"Previews","pages":[{"title":"Preview Sync Webhooks","openapi":"openapi POST /v1/webhooks.preview_sync","href":"/api-reference/webhooks/previewSyncWebhooks"}]}]},{"group":"Webhook Events","pages":[{"group":"Balances","pages":[{"title":"Usage Alert Triggered","openapi":"api/openapi.yml webhook balances.usage_alert_triggered","href":"/api-reference/webhooks/balancesUsageAlertTriggered"},{"title":"Limit Reached","openapi":"api/openapi.yml webhook balances.limit_reached","href":"/api-reference/webhooks/balancesLimitReached"}]},{"group":"Billing","pages":[{"title":"Auto Top-Up Failed","openapi":"api/openapi.yml webhook billing.auto_topup_failed","href":"/api-reference/webhooks/billingAutoTopupFailed"},{"title":"Auto Top-Up Succeeded","openapi":"api/openapi.yml webhook billing.auto_topup_succeeded","href":"/api-reference/webhooks/billingAutoTopupSucceeded"},{"title":"Plans Updated","openapi":"api/openapi.yml webhook billing.updated","href":"/api-reference/webhooks/billingUpdated"}]},{"group":"Invoice","pages":[{"title":"Invoice Finalized","openapi":"api/openapi.yml webhook invoice.finalized","href":"/api-reference/webhooks/invoiceFinalized"}]},{"group":"Vercel","pages":[{"title":"Resource Deleted","openapi":"api/openapi.yml webhook vercel.resources.deleted","href":"/api-reference/webhooks/vercelResourcesDeleted"},{"title":"Resource Provisioned","openapi":"api/openapi.yml webhook vercel.resources.provisioned","href":"/api-reference/webhooks/vercelResourcesProvisioned"},{"title":"Rotate Secrets","openapi":"api/openapi.yml webhook vercel.resources.rotate_secrets","href":"/api-reference/webhooks/vercelResourcesRotateSecrets"},{"title":"Webhook Event","openapi":"api/openapi.yml webhook vercel.webhooks.event","href":"/api-reference/webhooks/vercelWebhooksEvent"}]}]},{"group":"Platform (Beta)","pages":[{"title":"Overview","href":"/api-reference/platform/overview"},{"title":"Create Organization","openapi":"platform POST /platform/organizations","href":"/api-reference/platform/create-organization"},{"title":"Generate Stripe OAuth URL","openapi":"platform POST /platform/oauth_url","href":"/api-reference/platform/oauth-url"},{"title":"Get Stripe Connection","openapi":"openapi POST /v1/platform.get_stripe_connection","href":"/api-reference/platform/getStripeConnection"},{"title":"Disconnect Stripe","openapi":"openapi POST /v1/platform.disconnect_stripe","href":"/api-reference/platform/disconnectStripe"},{"title":"Update Connected Stripe Account","openapi":"platform POST /platform/organizations/stripe","href":"/api-reference/platform/update-stripe"},{"title":"List Users","openapi":"platform GET /platform/users","href":"/api-reference/platform/list-users"},{"title":"List Organizations","openapi":"platform GET /platform/organizations","href":"/api-reference/platform/list-orgs"}]}]},{"tab":"Changelog","icon":"list-ol","pages":[{"title":"Changelog","href":"/changelog/changelog"}]}]},"title":"Check Permissions - Autumn","buildId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","deploymentId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-rfhihCWU.js","utils-BmH1XFxk.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BcNsxPKB.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BAES3tkd.js","snippetPresets-DCMQBKLP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D6l_bzE9.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BOktbnNh.js","shallow-BCs8SgM7.js","getApiPlaygroundDisplay-DEmW5bJB.js","CodeSnippet-CpZOpB9C.js","CodeSnippets-BOBDqibl.js","Page-D5fEM6aW.js","getPastedJson-DH2JBvmr.js","icon-BBJH-kKh.js","MethodPill-D2Sd5NLC.js","DuplicateIcon-CGgfL2qN.js","createIcon-BKudBBzi.js","DynamicMarkdown-85clUA0i.js","SectionHeading-D0JiMgDx.js","axios-vUo_bRtp.js","Markdown-Cfiy0xZO.js","clsx-rL8ZCCw4.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-aeztFa9U.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BywkCr5C.js"]}