from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.invoices.update_invoice_payment_status(id="<id>", payment_status="INITIATED")
# Handle response
print(res)
import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.invoices.updateInvoicePaymentStatus("<id>", {
paymentStatus: "INITIATED",
});
console.log(result);
}
run();
from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.invoices.update_invoice_payment_status(id="<id>", payment_status="INITIATED")
# Handle response
print(res)
import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.invoices.updateInvoicePaymentStatus("<id>", {
paymentStatus: "INITIATED",
});
console.log(result);
}
run();
adjustment_amount is the total sum of credit notes of type "adjustment".
These are non-cash reductions applied to the invoice (e.g. goodwill credit, billing correction).
is_manually_edited is true once a user has manually added, edited, or removed a line item on this draft invoice.
Once set, automated recomputation of this invoice's line items must no-op rather than overwrite the manual edit.
recalculated_invoice_id is the ID of the replacement invoice created when this invoice was voided and recalculated.
When set, it forms a parent→child link from this (voided) invoice to the new replacement invoice.
subscription_customer_id is the subscription owner's customer ID (Subscription.CustomerID).
It may differ from customer_id when the subscription uses an invoicing customer. Set internally; nullable in DB.
voided_at is the timestamp when this invoice was voided or cancelled
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Flexprice","colors":{"primary":"#15547c","light":"#2580b5","dark":"#134a6b"},"logo":{"light":"https://mintcdn.com/flexprice/Qokjirde4CQUcFy8/images/FlexpriceWordMarkDark.png?fit=max\u0026auto=format\u0026n=Qokjirde4CQUcFy8\u0026q=85\u0026s=d706a1b6139418c2d57ba902fb0b6de4","dark":"https://mintcdn.com/flexprice/Qokjirde4CQUcFy8/images/FlexpriceWordMarkLight.png?fit=max\u0026auto=format\u0026n=Qokjirde4CQUcFy8\u0026q=85\u0026s=3fe3d9881552f4ebecb6f6aa7cfe2f66"},"favicon":"https://mintcdn.com/flexprice/Qokjirde4CQUcFy8/doc.png?fit=max\u0026auto=format\u0026n=Qokjirde4CQUcFy8\u0026q=85\u0026s=7e9ab0952b828b96d03f9298571462a4","api":{"examples":{"languages":["curl","python","typescript","go"]}},"background":{"decoration":"gradient","color":{"light":"#fffdf8","dark":"#010b13"}},"navbar":{"links":[],"primary":{"type":"button","label":"Dashboard","href":"https://admin.flexprice.io/"}},"footer":{"socials":{"github":"https://github.com/flexprice/flexprice","linkedin":"https://www.linkedin.com/company/flexpriceio","website":"https://flexprice.io/","x":"https://x.com/tryflexprice"}},"fonts":{"family":"Geist"},"integrations":{"ga4":{"measurementId":"G-9RV8NDCXNN"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Support","icon":"https://mintlify.s3.us-west-1.amazonaws.com/flexprice/images/anchors/mail.svg","href":"mailto:support@flexprice.io"},{"anchor":"Community","icon":"https://mintlify.s3.us-west-1.amazonaws.com/flexprice/images/anchors/slack.svg","href":"https://join.slack.com/t/flexpricecommunity/shared_invite/zt-39uat51l0-n8JmSikHZP~bHJNXladeaQ"},{"anchor":"Website","icon":"https://mintlify.s3.us-west-1.amazonaws.com/flexprice/images/anchors/flexprice.svg","href":"https://flexprice.io/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"flexprice","hasAudioNarration":false,"actualSubdomain":"flexprice","customDomains":["docs.flexprice.io"],"gitSource":{"type":"github","owner":"flexprice","repo":"flexprice-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adb5c47a0e78eb4aee8f95c","collectionId":"da2d6ec5-0a60-46e2-9ea7-aff6d0cc5f88","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adb5c47a0e78eb4aee8f95c"},"feedback":{"thumbs":false,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6adb5c47a0e78eb4aee8f95c","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"API Reference","count":300},{"language":"default","tag":"Resources","count":297},{"language":"default","tag":"Developers","count":142},{"language":"default","tag":"Documentation","count":118},{"language":"default","tag":"Integrations","count":102},{"language":"default","tag":"Webhook Events","count":62},{"language":"default","tag":"Subscriptions","count":45},{"language":"default","tag":"CLI","count":38},{"language":"default","tag":"Command reference","count":34},{"language":"default","tag":"Pricing and Packaging","count":25}]},"assistantConfig":{"enableStarterQuestions":false,"deflection":{"enabled":true,"email":"support@flexprice.io","showHelpButton":true}},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"workos-sso-scim","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-enabled","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}],"privacy":{"consentBanner":{"enabled":false}},"isAtlas":false,"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"/* latin-ext */\n@font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/dmsans/v17/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6h9Q.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/dmsans/v17/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K4.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* latin-ext */\n@font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/dmsans/v17/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6h9Q.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/dmsans/v17/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K4.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* latin-ext */\n@font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/dmsans/v17/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6h9Q.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/dmsans/v17/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K4.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* latin-ext */\n@font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/dmsans/v17/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6h9Q.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/dmsans/v17/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K4.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\nh1{font-family:'DM Sans',sans-serif;font-weight:700!important;letter-spacing:-.01em!important}.page-title,.section-title,.title,[data-title]{font-family:'DM Sans',sans-serif;font-weight:400;letter-spacing:.025em!important}.nav-logo{height:22px}[class*=Navbar] a[href*=\"admin.flexprice.io\"],[class*=nav] a[href*=\"admin.flexprice.io\"]{background-color:#134a6b!important;color:#fff!important;font-weight:500;border-radius:6px;padding:.5rem 1rem}[class*=Navbar] a[href*=\"admin.flexprice.io\"]:hover,[class*=nav] a[href*=\"admin.flexprice.io\"]:hover{background-color:#0d3d5c!important;color:#fff!important}.\\32xl\\:max-w-2xl,.content-area{max-width:50rem!important}.nav-anchor:hover>div{background-color:rgba(21,84,124,.08)!important}.dark .nav-anchor:hover>div{background-color:rgba(255,255,255,.08)!important}.nav-anchor img{background-color:transparent!important}.dark .nav-anchor img[src*=\"anchors/flexprice\"]{filter:brightness(0) invert(1)}"}],"page":{"pagePath":"api-reference/invoices/update-invoice-payment-status","slug":"/api-reference/invoices/update-invoice-payment-status","pageMetadata":{"title":"Update invoice payment status","description":"Use when reconciling payment status from an external gateway or manual entry (e.g. mark paid after bank confirmation).","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /invoices/{id}/payment","href":"/api-reference/invoices/update-invoice-payment-status","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Use when reconciling payment status from an external gateway or manual entry (e.g. mark paid after bank confirmation).\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update invoice payment status","description":"Use when reconciling payment status from an external gateway or manual entry (e.g. mark paid after bank confirmation).","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /invoices/{id}/payment","href":"/api-reference/invoices/update-invoice-payment-status","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/flexprice/c6cd5bf06bcd0181/reo-tracking.js"],"openApiReferenceData":{"operation":{"tags":["Invoices"],"summary":"Update invoice payment status","description":"Use when reconciling payment status from an external gateway or manual entry (e.g. mark paid after bank confirmation).","operationId":"updateInvoicePaymentStatus","parameters":["1ed32475-c222-4276-8b9e-3630fd00fb1d"],"requestBody":"fa3737d0-9b56-4036-916d-97873feb577a","responses":{"200":"6c87c451-14bc-4eab-9c8d-9de46f4de9a5","400":"51970d7e-26cf-4471-9103-6f88c5c3557b","404":"32498f69-d1b5-4c96-a269-1fa16b05b2a7","500":"a2a0051b-8173-4cb2-bc02-902a94661270"},"security":["dc28e240-ca48-4347-adc2-7dfa47ac0f00"],"x-codegen-request-body-name":"request","x-codeSamples":[{"lang":"go","label":"Go","source":"package main\n\nimport(\n\t\"context\"\n\tflexprice \"github.com/flexprice/go-sdk/v2\"\n\t\"github.com/flexprice/go-sdk/v2/models/types\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := flexprice.New(\n flexprice.WithSecurity(\"\u003cYOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Invoices.UpdateInvoicePaymentStatus(ctx, \"\u003cid>\", types.UpdatePaymentStatusRequest{\n PaymentStatus: types.PaymentStatusInitiated,\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.InvoiceResponse != nil {\n // handle response\n }\n}"},{"lang":"python","label":"Python","source":"from flexprice import Flexprice\n\n\nwith Flexprice(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE>\",\n) as f_client:\n\n res = f_client.invoices.update_invoice_payment_status(id=\"\u003cid>\", payment_status=\"INITIATED\")\n\n # Handle response\n print(res)"},{"lang":"typescript","label":"TypeScript","source":"import { Flexprice } from \"@flexprice/sdk\";\n\nconst flexprice = new Flexprice({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await flexprice.invoices.updateInvoicePaymentStatus(\"\u003cid>\", {\n paymentStatus: \"INITIATED\",\n });\n\n console.log(result);\n}\n\nrun();"}],"method":"put","type":"path","servers":["c3a552c0-fb0d-4192-bbfb-41d490814c91","8d9b0e10-8210-4fd4-9d91-5200cae97a59"],"path":"/invoices/{id}/payment","baseUrlOptions":["https://us.api.flexprice.io/v1","https://api.cloud.flexprice.io/v1"],"title":"Update invoice payment status","codeSamples":[{"label":"Go","lang":"go","source":"package main\n\nimport(\n\t\"context\"\n\tflexprice \"github.com/flexprice/go-sdk/v2\"\n\t\"github.com/flexprice/go-sdk/v2/models/types\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := flexprice.New(\n flexprice.WithSecurity(\"\u003cYOUR_API_KEY_HERE>\"),\n )\n\n res, err := s.Invoices.UpdateInvoicePaymentStatus(ctx, \"\u003cid>\", types.UpdatePaymentStatusRequest{\n PaymentStatus: types.PaymentStatusInitiated,\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.InvoiceResponse != nil {\n // handle response\n }\n}"},{"label":"Python","lang":"python","source":"from flexprice import Flexprice\n\n\nwith Flexprice(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE>\",\n) as f_client:\n\n res = f_client.invoices.update_invoice_payment_status(id=\"\u003cid>\", payment_status=\"INITIATED\")\n\n # Handle response\n print(res)"},{"label":"TypeScript","lang":"typescript","source":"import { Flexprice } from \"@flexprice/sdk\";\n\nconst flexprice = new Flexprice({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await flexprice.invoices.updateInvoicePaymentStatus(\"\u003cid>\", {\n paymentStatus: \"INITIATED\",\n });\n\n console.log(result);\n}\n\nrun();"}],"requestExampleLanguages":["bash","python","typescript","go"],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"1ed32475-c222-4276-8b9e-3630fd00fb1d":{"name":"id","in":"path","description":"Invoice ID","required":true,"schema":{"type":"string","isRequired":true,"description":"Invoice ID","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"description":"Payment Status Update Request","content":{"application/json":{"schema":{"required":["payment_status"],"type":"object","properties":{"payment_status":{"type":"string","enum":["INITIATED","PENDING","PROCESSING","SUCCEEDED","OVERPAID","FAILED","REFUNDED","PARTIALLY_REFUNDED","VOIDED"],"x-enum-varnames":["PaymentStatusInitiated","PaymentStatusPending","PaymentStatusProcessing","PaymentStatusSucceeded","PaymentStatusOverpaid","PaymentStatusFailed","PaymentStatusRefunded","PaymentStatusPartiallyRefunded","PaymentStatusVoided"],"x-speakeasy-name-override":"PaymentStatus","isRequired":true,"uniqueKey":"payment_status","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"amount is the optional payment amount to record","uniqueKey":"amount","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"amount":"\u003cstring>"}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"6c87c451-14bc-4eab-9c8d-9de46f4de9a5":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"adjustment_amount":{"type":"string","description":"adjustment_amount is the total sum of credit notes of type \"adjustment\".\nThese are non-cash reductions applied to the invoice (e.g. goodwill credit, billing correction).","uniqueKey":"adjustment_amount","typeLabel":"string"},"amount_due":{"type":"string","description":"amount_due is the total amount that needs to be paid for this invoice","uniqueKey":"amount_due","typeLabel":"string"},"amount_paid":{"type":"string","description":"amount_paid is the amount that has already been paid towards this invoice","uniqueKey":"amount_paid","typeLabel":"string"},"amount_remaining":{"type":"string","description":"amount_remaining is the outstanding amount still owed on this invoice (calculated as amount_due minus amount_paid)","uniqueKey":"amount_remaining","typeLabel":"string"},"billing_period":{"type":"string","description":"billing_period describes the billing period this invoice covers (e.g., \"January 2024\", \"Q1 2024\")","uniqueKey":"billing_period","typeLabel":"string"},"billing_reason":{"type":"string","description":"billing_reason indicates why this invoice was generated (e.g., \"subscription_billing\", \"manual_charge\")","uniqueKey":"billing_reason","typeLabel":"string"},"billing_sequence":{"type":"integer","description":"billing_sequence is the sequential number indicating the billing cycle for subscription invoices","uniqueKey":"billing_sequence","typeLabel":"integer"},"checkout_session":{"type":"object","properties":{"action":{"type":"string","enum":["create_subscription","modify_subscription","wallet_topup","add_addon","pay_invoice"],"x-enum-varnames":["CheckoutActionCreateSubscription","CheckoutActionModifySubscription","CheckoutActionWalletTopup","CheckoutActionAddAddon","CheckoutActionPayInvoice"],"x-speakeasy-name-override":"CheckoutAction","uniqueKey":"checkout_session.action","typeLabel":"enum\u003cstring>"},"cancel_url":{"type":"string","uniqueKey":"checkout_session.cancel_url","typeLabel":"string"},"cancelled_at":{"type":"string","format":"date-time","uniqueKey":"checkout_session.cancelled_at","typeLabel":"string\u003cdate-time>"},"checkout_invoice_id":{"type":"string","uniqueKey":"checkout_session.checkout_invoice_id","typeLabel":"string"},"checkout_payment_id":{"type":"string","uniqueKey":"checkout_session.checkout_payment_id","typeLabel":"string"},"checkout_status":{"type":"string","enum":["initiated","pending","completed","failed","expired"],"x-enum-varnames":["CheckoutStatusInitiated","CheckoutStatusPending","CheckoutStatusCompleted","CheckoutStatusFailed","CheckoutStatusExpired"],"x-speakeasy-name-override":"CheckoutStatus","uniqueKey":"checkout_session.checkout_status","typeLabel":"enum\u003cstring>"},"completed_at":{"type":"string","format":"date-time","uniqueKey":"checkout_session.completed_at","typeLabel":"string\u003cdate-time>"},"created_at":{"type":"string","format":"date-time","uniqueKey":"checkout_session.created_at","typeLabel":"string\u003cdate-time>"},"customer_id":{"type":"string","uniqueKey":"checkout_session.customer_id","typeLabel":"string"},"entity_creation_result":{"type":"object","properties":{"entity_id":{"type":"string","uniqueKey":"checkout_session.entity_creation_result.entity_id","typeLabel":"string"},"status":{"type":"string","enum":["created","superseded","failed_already_exists"],"x-enum-varnames":["EntityCreationStatusCreated","EntityCreationStatusSuperseded","EntityCreationStatusFailedAlreadyExists"],"x-speakeasy-name-override":"EntityCreationStatus","uniqueKey":"checkout_session.entity_creation_result.status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"checkout_session.entity_creation_result","typeLabel":"object"},"expires_at":{"type":"string","format":"date-time","uniqueKey":"checkout_session.expires_at","typeLabel":"string\u003cdate-time>"},"failure_reason":{"type":"string","uniqueKey":"checkout_session.failure_reason","typeLabel":"string"},"failure_url":{"type":"string","uniqueKey":"checkout_session.failure_url","typeLabel":"string"},"id":{"type":"string","uniqueKey":"checkout_session.id","typeLabel":"string"},"idempotency_key":{"type":"string","uniqueKey":"checkout_session.idempotency_key","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"checkout_session.metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"checkout_session.metadata","typeLabel":"object"},"next_poll_after_ms":{"type":"integer","description":"NextPollAfterMs is how long a client should wait before reading again.\nZero means stop — either the session is terminal, or this response did not\ncome from a polling read.","uniqueKey":"checkout_session.next_poll_after_ms","typeLabel":"integer"},"payment":{"type":"object","properties":{"gateway":{"type":"string","uniqueKey":"checkout_session.payment.gateway","typeLabel":"string"},"id":{"type":"string","uniqueKey":"checkout_session.payment.id","typeLabel":"string"},"status":{"type":"string","enum":["INITIATED","PENDING","PROCESSING","SUCCEEDED","OVERPAID","FAILED","REFUNDED","PARTIALLY_REFUNDED","VOIDED"],"x-enum-varnames":["PaymentStatusInitiated","PaymentStatusPending","PaymentStatusProcessing","PaymentStatusSucceeded","PaymentStatusOverpaid","PaymentStatusFailed","PaymentStatusRefunded","PaymentStatusPartiallyRefunded","PaymentStatusVoided"],"x-speakeasy-name-override":"PaymentStatus","uniqueKey":"checkout_session.payment.status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"checkout_session.payment","typeLabel":"object"},"payment_action":{"type":"object","properties":{"type":{"type":"string","enum":["checkout_url","payment_link"],"x-enum-varnames":["PaymentActionTypeCheckoutURL","PaymentActionTypePaymentLink"],"x-speakeasy-name-override":"PaymentActionType","uniqueKey":"checkout_session.payment_action.type","typeLabel":"enum\u003cstring>"},"url":{"type":"string","uniqueKey":"checkout_session.payment_action.url","typeLabel":"string"}},"x-speakeasy-name-override":"PaymentAction","uniqueKey":"checkout_session.payment_action","typeLabel":"object"},"payment_provider":{"type":"string","enum":["razorpay","chargebee","stripe"],"x-enum-varnames":["CheckoutPaymentProviderRazorpay","CheckoutPaymentProviderChargebee","CheckoutPaymentProviderStripe"],"x-speakeasy-name-override":"CheckoutPaymentProvider","uniqueKey":"checkout_session.payment_provider","typeLabel":"enum\u003cstring>"},"stale":{"type":"boolean","description":"Stale reports that this response is stored state that was not checked against\nthe payment provider on this request — the read was debounced, or the gateway\ndid not answer. A UI should say \"still checking\" rather than presenting a\nstale answer as fact.","uniqueKey":"checkout_session.stale","typeLabel":"boolean"},"success_url":{"type":"string","uniqueKey":"checkout_session.success_url","typeLabel":"string"},"terminal":{"type":"boolean","description":"Terminal reports whether the session has finished. Clients poll until this is\ntrue rather than hardcoding the status set, which would go stale if a status\nis ever added.","uniqueKey":"checkout_session.terminal","typeLabel":"boolean"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"checkout_session.updated_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"checkout_session","typeLabel":"object"},"coupon_applications":{"type":"array","description":"coupon_applications contains the coupon applications associated with this invoice (overrides embedded field)","items":{"type":"object","properties":{"applied_at":{"type":"string","format":"date-time","uniqueKey":"coupon_applications.items.[INDEX].applied_at","typeLabel":"string\u003cdate-time>"},"coupon_association_id":{"type":"string","uniqueKey":"coupon_applications.items.[INDEX].coupon_association_id","typeLabel":"string"},"coupon_id":{"type":"string","uniqueKey":"coupon_applications.items.[INDEX].coupon_id","typeLabel":"string"},"coupon_snapshot":{"type":"object","additionalProperties":true,"uniqueKey":"coupon_applications.items.[INDEX].coupon_snapshot","typeLabel":"object"},"created_at":{"type":"string","format":"date-time","uniqueKey":"coupon_applications.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"coupon_applications.items.[INDEX].created_by","typeLabel":"string"},"currency":{"type":"string","uniqueKey":"coupon_applications.items.[INDEX].currency","typeLabel":"string"},"discount_percentage":{"type":"string","uniqueKey":"coupon_applications.items.[INDEX].discount_percentage","typeLabel":"string"},"discount_type":{"type":"string","enum":["fixed","percentage"],"x-enum-varnames":["CouponTypeFixed","CouponTypePercentage"],"x-speakeasy-name-override":"CouponType","uniqueKey":"coupon_applications.items.[INDEX].discount_type","typeLabel":"enum\u003cstring>"},"discounted_amount":{"type":"string","uniqueKey":"coupon_applications.items.[INDEX].discounted_amount","typeLabel":"string"},"environment_id":{"type":"string","uniqueKey":"coupon_applications.items.[INDEX].environment_id","typeLabel":"string"},"final_price":{"type":"string","uniqueKey":"coupon_applications.items.[INDEX].final_price","typeLabel":"string"},"id":{"type":"string","uniqueKey":"coupon_applications.items.[INDEX].id","typeLabel":"string"},"invoice_id":{"type":"string","uniqueKey":"coupon_applications.items.[INDEX].invoice_id","typeLabel":"string"},"invoice_line_item_id":{"type":"string","uniqueKey":"coupon_applications.items.[INDEX].invoice_line_item_id","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"coupon_applications.items.[INDEX].metadata.additionalProperties","typeLabel":"string"},"uniqueKey":"coupon_applications.items.[INDEX].metadata","typeLabel":"object"},"original_price":{"type":"string","uniqueKey":"coupon_applications.items.[INDEX].original_price","typeLabel":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"coupon_applications.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"subscription_id":{"type":"string","uniqueKey":"coupon_applications.items.[INDEX].subscription_id","typeLabel":"string"},"tenant_id":{"type":"string","uniqueKey":"coupon_applications.items.[INDEX].tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"coupon_applications.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"coupon_applications.items.[INDEX].updated_by","typeLabel":"string"}},"uniqueKey":"coupon_applications.items.[INDEX]","typeLabel":"object"},"uniqueKey":"coupon_applications","typeLabel":"object[]"},"created_at":{"type":"string","format":"date-time","uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"created_by","typeLabel":"string"},"currency":{"type":"string","description":"currency is the three-letter ISO currency code (e.g., USD, EUR, GBP) that applies to all monetary amounts on this invoice","uniqueKey":"currency","typeLabel":"string"},"custom_currency":{"type":"object","properties":{"amount_due":{"type":"string","uniqueKey":"custom_currency.amount_due","typeLabel":"string"},"code":{"type":"string","uniqueKey":"custom_currency.code","typeLabel":"string"},"rate":{"type":"string","description":"fiat per 1 unit of Code; the live factor while draft, frozen at finalization","uniqueKey":"custom_currency.rate","typeLabel":"string"},"subtotal":{"type":"string","uniqueKey":"custom_currency.subtotal","typeLabel":"string"},"total":{"type":"string","uniqueKey":"custom_currency.total","typeLabel":"string"},"total_discount":{"type":"string","uniqueKey":"custom_currency.total_discount","typeLabel":"string"},"total_prepaid_credits_applied":{"type":"string","uniqueKey":"custom_currency.total_prepaid_credits_applied","typeLabel":"string"},"total_tax":{"type":"string","uniqueKey":"custom_currency.total_tax","typeLabel":"string"}},"x-speakeasy-name-override":"CustomCurrency","uniqueKey":"custom_currency","typeLabel":"object"},"customer":{"type":"object","properties":{"address_city":{"type":"string","description":"AddressCity is the city of the customer's address","uniqueKey":"customer.address_city","typeLabel":"string"},"address_country":{"type":"string","description":"AddressCountry is the country of the customer's address (ISO 3166-1 alpha-2)","uniqueKey":"customer.address_country","typeLabel":"string"},"address_line1":{"type":"string","description":"AddressLine1 is the first line of the customer's address","uniqueKey":"customer.address_line1","typeLabel":"string"},"address_line2":{"type":"string","description":"AddressLine2 is the second line of the customer's address","uniqueKey":"customer.address_line2","typeLabel":"string"},"address_postal_code":{"type":"string","description":"AddressPostalCode is the postal code of the customer's address","uniqueKey":"customer.address_postal_code","typeLabel":"string"},"address_state":{"type":"string","description":"AddressState is the state of the customer's address","uniqueKey":"customer.address_state","typeLabel":"string"},"billing_currency":{"type":"string","description":"BillingCurrency is the fiat currency invoices are issued in; nil means charge currency is used as-is.","uniqueKey":"customer.billing_currency","typeLabel":"string"},"contact":{"type":"string","description":"Contact is an optional contact number for the customer (e.g. phone)","uniqueKey":"customer.contact","typeLabel":"string"},"contact_persons":{"type":"array","items":{"required":["first_name"],"type":"object","properties":{"first_name":{"maxLength":100,"type":"string","isRequired":true,"uniqueKey":"customer.contact_persons.items.[INDEX].first_name","typeLabel":"string"},"department":{"maxLength":100,"type":"string","uniqueKey":"customer.contact_persons.items.[INDEX].department","typeLabel":"string"},"designation":{"maxLength":100,"type":"string","uniqueKey":"customer.contact_persons.items.[INDEX].designation","typeLabel":"string"},"email":{"type":"string","uniqueKey":"customer.contact_persons.items.[INDEX].email","typeLabel":"string"},"id":{"type":"string","uniqueKey":"customer.contact_persons.items.[INDEX].id","typeLabel":"string"},"is_primary":{"type":"boolean","uniqueKey":"customer.contact_persons.items.[INDEX].is_primary","typeLabel":"boolean"},"last_name":{"maxLength":100,"type":"string","uniqueKey":"customer.contact_persons.items.[INDEX].last_name","typeLabel":"string"},"mobile":{"maxLength":20,"type":"string","uniqueKey":"customer.contact_persons.items.[INDEX].mobile","typeLabel":"string"},"salutation":{"maxLength":25,"type":"string","uniqueKey":"customer.contact_persons.items.[INDEX].salutation","typeLabel":"string"}},"uniqueKey":"customer.contact_persons.items.[INDEX]","typeLabel":"object"},"uniqueKey":"customer.contact_persons","typeLabel":"object[]"},"created_at":{"type":"string","format":"date-time","uniqueKey":"customer.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"customer.created_by","typeLabel":"string"},"email":{"type":"string","description":"Email is the email of the customer","uniqueKey":"customer.email","typeLabel":"string"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the customer","uniqueKey":"customer.environment_id","typeLabel":"string"},"external_id":{"type":"string","description":"ExternalID is the external identifier for the customer","uniqueKey":"customer.external_id","typeLabel":"string"},"id":{"type":"string","description":"ID is the unique identifier for the customer","uniqueKey":"customer.id","typeLabel":"string"},"integrations":{"type":"array","items":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","uniqueKey":"customer.integrations.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"customer.integrations.items.[INDEX].created_by","typeLabel":"string"},"entity_id":{"type":"string","uniqueKey":"customer.integrations.items.[INDEX].entity_id","typeLabel":"string"},"entity_type":{"type":"string","enum":["customer","plan","invoice","subscription","payment","credit_note","addon","item","item_price","price","invoice_line_item","subscription_line_item"],"x-enum-varnames":["IntegrationEntityTypeCustomer","IntegrationEntityTypePlan","IntegrationEntityTypeInvoice","IntegrationEntityTypeSubscription","IntegrationEntityTypePayment","IntegrationEntityTypeCreditNote","IntegrationEntityTypeAddon","IntegrationEntityTypeItem","IntegrationEntityTypeItemPrice","IntegrationEntityTypePrice","IntegrationEntityTypeInvoiceLineItem","IntegrationEntityTypeSubscriptionLineItem"],"x-speakeasy-name-override":"IntegrationEntityType","uniqueKey":"customer.integrations.items.[INDEX].entity_type","typeLabel":"enum\u003cstring>"},"environment_id":{"type":"string","uniqueKey":"customer.integrations.items.[INDEX].environment_id","typeLabel":"string"},"id":{"type":"string","uniqueKey":"customer.integrations.items.[INDEX].id","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":true,"uniqueKey":"customer.integrations.items.[INDEX].metadata","typeLabel":"object"},"provider_entity_id":{"type":"string","uniqueKey":"customer.integrations.items.[INDEX].provider_entity_id","typeLabel":"string"},"provider_type":{"type":"string","uniqueKey":"customer.integrations.items.[INDEX].provider_type","typeLabel":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"customer.integrations.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"customer.integrations.items.[INDEX].tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"customer.integrations.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"customer.integrations.items.[INDEX].updated_by","typeLabel":"string"}},"uniqueKey":"customer.integrations.items.[INDEX]","typeLabel":"object"},"uniqueKey":"customer.integrations","typeLabel":"object[]"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"customer.metadata.additionalProperties","typeLabel":"string"},"description":"Metadata","uniqueKey":"customer.metadata","typeLabel":"object"},"name":{"type":"string","description":"Name is the name of the customer","uniqueKey":"customer.name","typeLabel":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"customer.status","typeLabel":"enum\u003cstring>"},"tax_treatment":{"type":"string","enum":["taxable","exempt"],"x-enum-varnames":["TaxTreatmentTaxable","TaxTreatmentExempt"],"x-speakeasy-name-override":"TaxTreatment","uniqueKey":"customer.tax_treatment","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"customer.tenant_id","typeLabel":"string"},"timezone":{"type":"string","description":"Timezone is the customer's IANA timezone name (e.g. \"Asia/Kolkata\").\nDefaults to \"UTC\". Inherited by subscriptions at creation time.","uniqueKey":"customer.timezone","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"customer.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"customer.updated_by","typeLabel":"string"}},"description":"Customer response object containing all customer information","uniqueKey":"customer","typeLabel":"object"},"customer_id":{"type":"string","description":"customer_id is the ID of the customer who will receive this invoice","uniqueKey":"customer_id","typeLabel":"string"},"description":{"type":"string","description":"description is an optional description or notes about this invoice","uniqueKey":"description","typeLabel":"string"},"due_date":{"type":"string","description":"due_date is the date when payment for this invoice is due","format":"date-time","uniqueKey":"due_date","typeLabel":"string\u003cdate-time>"},"environment_id":{"type":"string","description":"environment_id is the ID of the environment this invoice belongs to (for multi-environment setups)","uniqueKey":"environment_id","typeLabel":"string"},"finalized_at":{"type":"string","description":"finalized_at is the timestamp when this invoice was finalized and made ready for payment","format":"date-time","uniqueKey":"finalized_at","typeLabel":"string\u003cdate-time>"},"fx_conversion":{"type":"object","properties":{"billing_currency":{"type":"string","description":"BillingCurrency is the currency the invoice was issued in.","uniqueKey":"fx_conversion.billing_currency","typeLabel":"string"},"charge_currency":{"type":"string","description":"ChargeCurrency is the invoice's original (draft) currency.","uniqueKey":"fx_conversion.charge_currency","typeLabel":"string"},"converted_at":{"type":"string","description":"ConvertedAt is when the conversion ran.","format":"date-time","uniqueKey":"fx_conversion.converted_at","typeLabel":"string\u003cdate-time>"},"rate":{"type":"string","description":"Rate is the frozen rate: billing per 1 charge unit.","uniqueKey":"fx_conversion.rate","typeLabel":"string"},"rate_id":{"type":"string","description":"RateID is the fx_rates row used, for reference only; never read again.","uniqueKey":"fx_conversion.rate_id","typeLabel":"string"},"scope":{"type":"string","enum":["tenant","customer","subscription"],"x-enum-varnames":["FXRateScopeTenant","FXRateScopeCustomer","FXRateScopeSubscription"],"x-speakeasy-name-override":"FXRateScope","uniqueKey":"fx_conversion.scope","typeLabel":"enum\u003cstring>"},"source":{"type":"object","properties":{"net":{"type":"string","uniqueKey":"fx_conversion.source.net","typeLabel":"string"},"subtotal":{"type":"string","uniqueKey":"fx_conversion.source.subtotal","typeLabel":"string"},"total_discount":{"type":"string","uniqueKey":"fx_conversion.source.total_discount","typeLabel":"string"},"total_prepaid_credits_applied":{"type":"string","uniqueKey":"fx_conversion.source.total_prepaid_credits_applied","typeLabel":"string"}},"x-speakeasy-name-override":"FxConversionSource","uniqueKey":"fx_conversion.source","typeLabel":"object"}},"x-speakeasy-name-override":"FxConversion","uniqueKey":"fx_conversion","typeLabel":"object"},"hosted_invoice_url":{"type":"string","description":"hosted_invoice_url is the page where the customer can view, download and pay this invoice","uniqueKey":"hosted_invoice_url","typeLabel":"string"},"id":{"type":"string","description":"id is the unique identifier for this invoice","uniqueKey":"id","typeLabel":"string"},"idempotency_key":{"type":"string","description":"idempotency_key is a unique key used to prevent duplicate invoice creation when retrying API calls","uniqueKey":"idempotency_key","typeLabel":"string"},"invoice_number":{"type":"string","description":"invoice_number is the human-readable invoice number displayed to customers (e.g., INV-2024-001)","uniqueKey":"invoice_number","typeLabel":"string"},"invoice_pdf_url":{"type":"string","description":"invoice_pdf_url is the URL where customers can download the PDF version of this invoice","uniqueKey":"invoice_pdf_url","typeLabel":"string"},"invoice_status":{"type":"string","enum":["DRAFT","FINALIZED","VOIDED","SKIPPED"],"x-enum-varnames":["InvoiceStatusDraft","InvoiceStatusFinalized","InvoiceStatusVoided","InvoiceStatusSkipped"],"x-speakeasy-name-override":"InvoiceStatus","uniqueKey":"invoice_status","typeLabel":"enum\u003cstring>"},"invoice_type":{"type":"string","enum":["SUBSCRIPTION","ONE_OFF","CREDIT"],"x-enum-varnames":["InvoiceTypeSubscription","InvoiceTypeOneOff","InvoiceTypeCredit"],"x-speakeasy-name-override":"InvoiceType","uniqueKey":"invoice_type","typeLabel":"enum\u003cstring>"},"is_manually_edited":{"type":"boolean","description":"is_manually_edited is true once a user has manually added, edited, or removed a line item on this draft invoice.\nOnce set, automated recomputation of this invoice's line items must no-op rather than overwrite the manual edit.","uniqueKey":"is_manually_edited","typeLabel":"boolean"},"issue_date":{"type":"string","description":"issue_date is the user-facing date of the invoice. Defaults to created_at if not set.","format":"date-time","uniqueKey":"issue_date","typeLabel":"string\u003cdate-time>"},"last_computed_at":{"type":"string","description":"last_computed_at is the timestamp when this invoice was last computed by ComputeInvoice","format":"date-time","uniqueKey":"last_computed_at","typeLabel":"string\u003cdate-time>"},"line_items":{"type":"array","description":"line_items contains the individual items that make up this invoice (overrides embedded field)","items":{"type":"object","properties":{"adjusted_entitlement_quantity":{"type":"string","description":"adjusted_entitlement_quantity is the entitlement-covered portion deducted from raw usage.\nNil when no entitlement was applied. Raw usage = Quantity + AdjustedEntitlementQuantity.","uniqueKey":"line_items.items.[INDEX].adjusted_entitlement_quantity","typeLabel":"string"},"amount":{"type":"string","uniqueKey":"line_items.items.[INDEX].amount","typeLabel":"string"},"commitment_info":{"type":"object","properties":{"amount":{"type":"string","uniqueKey":"line_items.items.[INDEX].commitment_info.amount","typeLabel":"string"},"computed_commitment_utilized_amount":{"type":"string","uniqueKey":"line_items.items.[INDEX].commitment_info.computed_commitment_utilized_amount","typeLabel":"string"},"computed_overage_amount":{"type":"string","uniqueKey":"line_items.items.[INDEX].commitment_info.computed_overage_amount","typeLabel":"string"},"computed_true_up_amount":{"type":"string","description":"total_cost = computed_commitment_utilized_amount + computed_overage_amount + computed_true_up_amount","uniqueKey":"line_items.items.[INDEX].commitment_info.computed_true_up_amount","typeLabel":"string"},"duration":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod","uniqueKey":"line_items.items.[INDEX].commitment_info.duration","typeLabel":"enum\u003cstring>"},"is_windowed":{"type":"boolean","uniqueKey":"line_items.items.[INDEX].commitment_info.is_windowed","typeLabel":"boolean"},"overage_factor":{"type":"string","uniqueKey":"line_items.items.[INDEX].commitment_info.overage_factor","typeLabel":"string"},"quantity":{"type":"string","description":"Only used for quantity-based commitments","uniqueKey":"line_items.items.[INDEX].commitment_info.quantity","typeLabel":"string"},"true_up_enabled":{"type":"boolean","uniqueKey":"line_items.items.[INDEX].commitment_info.true_up_enabled","typeLabel":"boolean"},"type":{"type":"string","enum":["amount","quantity"],"x-enum-varnames":["COMMITMENT_TYPE_AMOUNT","COMMITMENT_TYPE_QUANTITY"],"x-speakeasy-name-override":"CommitmentType","uniqueKey":"line_items.items.[INDEX].commitment_info.type","typeLabel":"enum\u003cstring>"}},"x-speakeasy-name-override":"CommitmentInfo","uniqueKey":"line_items.items.[INDEX].commitment_info","typeLabel":"object"},"created_at":{"type":"string","format":"date-time","uniqueKey":"line_items.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"line_items.items.[INDEX].created_by","typeLabel":"string"},"currency":{"type":"string","uniqueKey":"line_items.items.[INDEX].currency","typeLabel":"string"},"custom_currency":{"type":"object","properties":{"amount":{"type":"string","uniqueKey":"line_items.items.[INDEX].custom_currency.amount","typeLabel":"string"},"invoice_level_discount":{"type":"string","uniqueKey":"line_items.items.[INDEX].custom_currency.invoice_level_discount","typeLabel":"string"},"line_item_discount":{"type":"string","uniqueKey":"line_items.items.[INDEX].custom_currency.line_item_discount","typeLabel":"string"},"prepaid_credits_applied":{"type":"string","uniqueKey":"line_items.items.[INDEX].custom_currency.prepaid_credits_applied","typeLabel":"string"}},"x-speakeasy-name-override":"CustomCurrencyLineItem","uniqueKey":"line_items.items.[INDEX].custom_currency","typeLabel":"object"},"customer_id":{"type":"string","uniqueKey":"line_items.items.[INDEX].customer_id","typeLabel":"string"},"display_name":{"type":"string","uniqueKey":"line_items.items.[INDEX].display_name","typeLabel":"string"},"entity_id":{"type":"string","uniqueKey":"line_items.items.[INDEX].entity_id","typeLabel":"string"},"entity_type":{"type":"string","uniqueKey":"line_items.items.[INDEX].entity_type","typeLabel":"string"},"environment_id":{"type":"string","uniqueKey":"line_items.items.[INDEX].environment_id","typeLabel":"string"},"fx_conversion":{"type":"object","properties":{"billing_currency":{"type":"string","description":"BillingCurrency is the currency the invoice was issued in.","uniqueKey":"line_items.items.[INDEX].fx_conversion.billing_currency","typeLabel":"string"},"charge_currency":{"type":"string","description":"ChargeCurrency is the invoice's original (draft) currency.","uniqueKey":"line_items.items.[INDEX].fx_conversion.charge_currency","typeLabel":"string"},"converted_at":{"type":"string","description":"ConvertedAt is when the conversion ran.","format":"date-time","uniqueKey":"line_items.items.[INDEX].fx_conversion.converted_at","typeLabel":"string\u003cdate-time>"},"rate":{"type":"string","description":"Rate is the frozen rate: billing per 1 charge unit.","uniqueKey":"line_items.items.[INDEX].fx_conversion.rate","typeLabel":"string"},"rate_id":{"type":"string","description":"RateID is the fx_rates row used, for reference only; never read again.","uniqueKey":"line_items.items.[INDEX].fx_conversion.rate_id","typeLabel":"string"},"scope":{"type":"string","enum":["tenant","customer","subscription"],"x-enum-varnames":["FXRateScopeTenant","FXRateScopeCustomer","FXRateScopeSubscription"],"x-speakeasy-name-override":"FXRateScope","uniqueKey":"line_items.items.[INDEX].fx_conversion.scope","typeLabel":"enum\u003cstring>"},"source":{"type":"object","properties":{"net":{"type":"string","uniqueKey":"line_items.items.[INDEX].fx_conversion.source.net","typeLabel":"string"},"subtotal":{"type":"string","uniqueKey":"line_items.items.[INDEX].fx_conversion.source.subtotal","typeLabel":"string"},"total_discount":{"type":"string","uniqueKey":"line_items.items.[INDEX].fx_conversion.source.total_discount","typeLabel":"string"},"total_prepaid_credits_applied":{"type":"string","uniqueKey":"line_items.items.[INDEX].fx_conversion.source.total_prepaid_credits_applied","typeLabel":"string"}},"x-speakeasy-name-override":"FxConversionSource","uniqueKey":"line_items.items.[INDEX].fx_conversion.source","typeLabel":"object"}},"x-speakeasy-name-override":"FxConversion","uniqueKey":"line_items.items.[INDEX].fx_conversion","typeLabel":"object"},"id":{"type":"string","uniqueKey":"line_items.items.[INDEX].id","typeLabel":"string"},"invoice_id":{"type":"string","uniqueKey":"line_items.items.[INDEX].invoice_id","typeLabel":"string"},"invoice_level_discount":{"type":"string","description":"invoice_level_discount is the discount amount in invoice currency applied to all line items on the invoice.","uniqueKey":"line_items.items.[INDEX].invoice_level_discount","typeLabel":"string"},"line_item_discount":{"type":"string","description":"line_item_discount is the discount amount in invoice currency applied directly to this line item.","uniqueKey":"line_items.items.[INDEX].line_item_discount","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"line_items.items.[INDEX].metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"line_items.items.[INDEX].metadata","typeLabel":"object"},"meter_display_name":{"type":"string","uniqueKey":"line_items.items.[INDEX].meter_display_name","typeLabel":"string"},"meter_id":{"type":"string","uniqueKey":"line_items.items.[INDEX].meter_id","typeLabel":"string"},"parent_line_item_id":{"type":"string","description":"parent_line_item_id links this line item to the line item it replaced, if it was created by editing\nan existing line item. Forms a linked-list chain across edits; nil for line items that were never edited.","uniqueKey":"line_items.items.[INDEX].parent_line_item_id","typeLabel":"string"},"period_end":{"type":"string","format":"date-time","uniqueKey":"line_items.items.[INDEX].period_end","typeLabel":"string\u003cdate-time>"},"period_start":{"type":"string","format":"date-time","uniqueKey":"line_items.items.[INDEX].period_start","typeLabel":"string\u003cdate-time>"},"plan_display_name":{"type":"string","uniqueKey":"line_items.items.[INDEX].plan_display_name","typeLabel":"string"},"prepaid_credits_applied":{"type":"string","description":"prepaid_credits_applied is the amount in invoice currency reduced from this line item due to prepaid credits application.","uniqueKey":"line_items.items.[INDEX].prepaid_credits_applied","typeLabel":"string"},"price_id":{"type":"string","uniqueKey":"line_items.items.[INDEX].price_id","typeLabel":"string"},"price_type":{"type":"string","uniqueKey":"line_items.items.[INDEX].price_type","typeLabel":"string"},"price_unit":{"type":"string","uniqueKey":"line_items.items.[INDEX].price_unit","typeLabel":"string"},"price_unit_amount":{"type":"string","uniqueKey":"line_items.items.[INDEX].price_unit_amount","typeLabel":"string"},"price_unit_id":{"type":"string","uniqueKey":"line_items.items.[INDEX].price_unit_id","typeLabel":"string"},"quantity":{"type":"string","uniqueKey":"line_items.items.[INDEX].quantity","typeLabel":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"line_items.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"subscription_id":{"type":"string","uniqueKey":"line_items.items.[INDEX].subscription_id","typeLabel":"string"},"subscription_line_item_id":{"type":"string","description":"sub_line_item_id links this invoice line item to the subscription_line_item that generated it.","uniqueKey":"line_items.items.[INDEX].subscription_line_item_id","typeLabel":"string"},"tenant_id":{"type":"string","uniqueKey":"line_items.items.[INDEX].tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"line_items.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"line_items.items.[INDEX].updated_by","typeLabel":"string"},"usage_analytics":{"type":"array","description":"usage_analytics contains usage analytics for this line item (legacy - grouped by source)","items":{"type":"object","properties":{"cost":{"type":"string","description":"cost is the cost attributed to this source for the line item","uniqueKey":"line_items.items.[INDEX].usage_analytics.items.[INDEX].cost","typeLabel":"string"},"event_count":{"type":"integer","description":"event_count is the number of events from this source (optional)","uniqueKey":"line_items.items.[INDEX].usage_analytics.items.[INDEX].event_count","typeLabel":"integer"},"percentage":{"type":"string","description":"percentage is the percentage of total line item cost from this source (optional)","uniqueKey":"line_items.items.[INDEX].usage_analytics.items.[INDEX].percentage","typeLabel":"string"},"source":{"type":"string","description":"source is the name of the event source","uniqueKey":"line_items.items.[INDEX].usage_analytics.items.[INDEX].source","typeLabel":"string"},"usage":{"type":"string","description":"usage is the total usage amount from this source (optional, for additional context)","uniqueKey":"line_items.items.[INDEX].usage_analytics.items.[INDEX].usage","typeLabel":"string"}},"uniqueKey":"line_items.items.[INDEX].usage_analytics.items.[INDEX]","typeLabel":"object"},"uniqueKey":"line_items.items.[INDEX].usage_analytics","typeLabel":"object[]"},"usage_breakdown":{"type":"array","description":"usage_breakdown contains flexible usage breakdown for this line item (supports any grouping)","items":{"type":"object","properties":{"cost":{"type":"string","description":"cost is the cost attributed to this group for the line item","uniqueKey":"line_items.items.[INDEX].usage_breakdown.items.[INDEX].cost","typeLabel":"string"},"event_count":{"type":"integer","description":"event_count is the number of events from this group (optional)","uniqueKey":"line_items.items.[INDEX].usage_breakdown.items.[INDEX].event_count","typeLabel":"integer"},"grouped_by":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"line_items.items.[INDEX].usage_breakdown.items.[INDEX].grouped_by.additionalProperties","typeLabel":"string"},"description":"grouped_by contains the grouping field values (e.g., {\"source\": \"api\", \"org_id\": \"org123\"})","uniqueKey":"line_items.items.[INDEX].usage_breakdown.items.[INDEX].grouped_by","typeLabel":"object"},"percentage":{"type":"string","description":"percentage is the percentage of total line item cost from this group (optional)","uniqueKey":"line_items.items.[INDEX].usage_breakdown.items.[INDEX].percentage","typeLabel":"string"},"usage":{"type":"string","description":"usage is the total usage amount from this group (optional, for additional context)","uniqueKey":"line_items.items.[INDEX].usage_breakdown.items.[INDEX].usage","typeLabel":"string"}},"uniqueKey":"line_items.items.[INDEX].usage_breakdown.items.[INDEX]","typeLabel":"object"},"uniqueKey":"line_items.items.[INDEX].usage_breakdown","typeLabel":"object[]"}},"uniqueKey":"line_items.items.[INDEX]","typeLabel":"object"},"uniqueKey":"line_items","typeLabel":"object[]"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"metadata","typeLabel":"object"},"overpaid_amount":{"type":"string","description":"overpaid_amount is the amount overpaid if payment_status is OVERPAID (amount_paid - total)","uniqueKey":"overpaid_amount","typeLabel":"string"},"paid_at":{"type":"string","description":"paid_at is the timestamp when this invoice was fully paid","format":"date-time","uniqueKey":"paid_at","typeLabel":"string\u003cdate-time>"},"payment_status":{"type":"string","enum":["INITIATED","PENDING","PROCESSING","SUCCEEDED","OVERPAID","FAILED","REFUNDED","PARTIALLY_REFUNDED","VOIDED"],"x-enum-varnames":["PaymentStatusInitiated","PaymentStatusPending","PaymentStatusProcessing","PaymentStatusSucceeded","PaymentStatusOverpaid","PaymentStatusFailed","PaymentStatusRefunded","PaymentStatusPartiallyRefunded","PaymentStatusVoided"],"x-speakeasy-name-override":"PaymentStatus","uniqueKey":"payment_status","typeLabel":"enum\u003cstring>"},"period_end":{"type":"string","description":"period_end is the end date of the billing period covered by this invoice","format":"date-time","uniqueKey":"period_end","typeLabel":"string\u003cdate-time>"},"period_start":{"type":"string","description":"period_start is the start date of the billing period covered by this invoice","format":"date-time","uniqueKey":"period_start","typeLabel":"string\u003cdate-time>"},"recalculated_invoice_id":{"type":"string","description":"recalculated_invoice_id is the ID of the replacement invoice created when this invoice was voided and recalculated.\nWhen set, it forms a parent→child link from this (voided) invoice to the new replacement invoice.","uniqueKey":"recalculated_invoice_id","typeLabel":"string"},"refunded_amount":{"type":"string","description":"refunded_amount is the total sum of credit notes of type \"refund\".\nThese are actual refunds issued to the customer.","uniqueKey":"refunded_amount","typeLabel":"string"},"source_type":{"type":"string","enum":["checkout"],"x-enum-varnames":["InvoiceSourceTypeCheckout"],"x-speakeasy-name-override":"InvoiceSourceType","uniqueKey":"source_type","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"status","typeLabel":"enum\u003cstring>"},"subscription":{"type":"object","properties":{"active_pause_id":{"type":"string","description":"ActivePauseID references the current active pause configuration\nThis will be null if no pause is active or scheduled","uniqueKey":"subscription.active_pause_id","typeLabel":"string"},"auto_invoice_threshold":{"type":"string","description":"AutoInvoiceThreshold is the usage amount (in subscription currency) that triggers\nan intermediate invoice. Overrides the plan-level threshold when set.\nNil means: inherit from the plan's threshold (which may also be nil = disabled).","uniqueKey":"subscription.auto_invoice_threshold","typeLabel":"string"},"billing_anchor":{"type":"string","description":"BillingAnchor is the reference point that aligns future billing cycle dates.\nIt sets the day of week for week intervals, the day of month for month and year intervals,\nand the month of year for year intervals. The timestamp is in UTC format.","format":"date-time","uniqueKey":"subscription.billing_anchor","typeLabel":"string\u003cdate-time>"},"billing_cadence":{"type":"string","enum":["RECURRING"],"x-enum-varnames":["BILLING_CADENCE_RECURRING"],"x-speakeasy-name-override":"BillingCadence","uniqueKey":"subscription.billing_cadence","typeLabel":"enum\u003cstring>"},"billing_cycle":{"type":"string","enum":["anniversary","calendar"],"x-enum-varnames":["BillingCycleAnniversary","BillingCycleCalendar"],"x-speakeasy-name-override":"BillingCycle","uniqueKey":"subscription.billing_cycle","typeLabel":"enum\u003cstring>"},"billing_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod","uniqueKey":"subscription.billing_period","typeLabel":"enum\u003cstring>"},"billing_period_count":{"type":"integer","description":"BillingPeriodCount is the total number units of the billing period.","uniqueKey":"subscription.billing_period_count","typeLabel":"integer"},"cancel_at":{"type":"string","description":"CancelAt is the date the subscription will be canceled","format":"date-time","uniqueKey":"subscription.cancel_at","typeLabel":"string\u003cdate-time>"},"cancel_at_period_end":{"type":"boolean","description":"CancelAtPeriodEnd is whether the subscription was canceled at the end of the current period","uniqueKey":"subscription.cancel_at_period_end","typeLabel":"boolean"},"cancelled_at":{"type":"string","description":"CanceledAt is the date the subscription was canceled","format":"date-time","uniqueKey":"subscription.cancelled_at","typeLabel":"string\u003cdate-time>"},"checkout_session":{"type":"object","properties":{"action":{"type":"string","enum":["create_subscription","modify_subscription","wallet_topup","add_addon","pay_invoice"],"x-enum-varnames":["CheckoutActionCreateSubscription","CheckoutActionModifySubscription","CheckoutActionWalletTopup","CheckoutActionAddAddon","CheckoutActionPayInvoice"],"x-speakeasy-name-override":"CheckoutAction","uniqueKey":"subscription.checkout_session.action","typeLabel":"enum\u003cstring>"},"cancel_url":{"type":"string","uniqueKey":"subscription.checkout_session.cancel_url","typeLabel":"string"},"cancelled_at":{"type":"string","format":"date-time","uniqueKey":"subscription.checkout_session.cancelled_at","typeLabel":"string\u003cdate-time>"},"checkout_invoice_id":{"type":"string","uniqueKey":"subscription.checkout_session.checkout_invoice_id","typeLabel":"string"},"checkout_payment_id":{"type":"string","uniqueKey":"subscription.checkout_session.checkout_payment_id","typeLabel":"string"},"checkout_status":{"type":"string","enum":["initiated","pending","completed","failed","expired"],"x-enum-varnames":["CheckoutStatusInitiated","CheckoutStatusPending","CheckoutStatusCompleted","CheckoutStatusFailed","CheckoutStatusExpired"],"x-speakeasy-name-override":"CheckoutStatus","uniqueKey":"subscription.checkout_session.checkout_status","typeLabel":"enum\u003cstring>"},"completed_at":{"type":"string","format":"date-time","uniqueKey":"subscription.checkout_session.completed_at","typeLabel":"string\u003cdate-time>"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.checkout_session.created_at","typeLabel":"string\u003cdate-time>"},"customer_id":{"type":"string","uniqueKey":"subscription.checkout_session.customer_id","typeLabel":"string"},"entity_creation_result":{"type":"object","properties":{"entity_id":{"type":"string","uniqueKey":"subscription.checkout_session.entity_creation_result.entity_id","typeLabel":"string"},"status":{"type":"string","enum":["created","superseded","failed_already_exists"],"x-enum-varnames":["EntityCreationStatusCreated","EntityCreationStatusSuperseded","EntityCreationStatusFailedAlreadyExists"],"x-speakeasy-name-override":"EntityCreationStatus","uniqueKey":"subscription.checkout_session.entity_creation_result.status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"subscription.checkout_session.entity_creation_result","typeLabel":"object"},"expires_at":{"type":"string","format":"date-time","uniqueKey":"subscription.checkout_session.expires_at","typeLabel":"string\u003cdate-time>"},"failure_reason":{"type":"string","uniqueKey":"subscription.checkout_session.failure_reason","typeLabel":"string"},"failure_url":{"type":"string","uniqueKey":"subscription.checkout_session.failure_url","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.checkout_session.id","typeLabel":"string"},"idempotency_key":{"type":"string","uniqueKey":"subscription.checkout_session.idempotency_key","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.checkout_session.metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"subscription.checkout_session.metadata","typeLabel":"object"},"next_poll_after_ms":{"type":"integer","description":"NextPollAfterMs is how long a client should wait before reading again.\nZero means stop — either the session is terminal, or this response did not\ncome from a polling read.","uniqueKey":"subscription.checkout_session.next_poll_after_ms","typeLabel":"integer"},"payment":{"type":"object","properties":{"gateway":{"type":"string","uniqueKey":"subscription.checkout_session.payment.gateway","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.checkout_session.payment.id","typeLabel":"string"},"status":{"type":"string","enum":["INITIATED","PENDING","PROCESSING","SUCCEEDED","OVERPAID","FAILED","REFUNDED","PARTIALLY_REFUNDED","VOIDED"],"x-enum-varnames":["PaymentStatusInitiated","PaymentStatusPending","PaymentStatusProcessing","PaymentStatusSucceeded","PaymentStatusOverpaid","PaymentStatusFailed","PaymentStatusRefunded","PaymentStatusPartiallyRefunded","PaymentStatusVoided"],"x-speakeasy-name-override":"PaymentStatus","uniqueKey":"subscription.checkout_session.payment.status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"subscription.checkout_session.payment","typeLabel":"object"},"payment_action":{"type":"object","properties":{"type":{"type":"string","enum":["checkout_url","payment_link"],"x-enum-varnames":["PaymentActionTypeCheckoutURL","PaymentActionTypePaymentLink"],"x-speakeasy-name-override":"PaymentActionType","uniqueKey":"subscription.checkout_session.payment_action.type","typeLabel":"enum\u003cstring>"},"url":{"type":"string","uniqueKey":"subscription.checkout_session.payment_action.url","typeLabel":"string"}},"x-speakeasy-name-override":"PaymentAction","uniqueKey":"subscription.checkout_session.payment_action","typeLabel":"object"},"payment_provider":{"type":"string","enum":["razorpay","chargebee","stripe"],"x-enum-varnames":["CheckoutPaymentProviderRazorpay","CheckoutPaymentProviderChargebee","CheckoutPaymentProviderStripe"],"x-speakeasy-name-override":"CheckoutPaymentProvider","uniqueKey":"subscription.checkout_session.payment_provider","typeLabel":"enum\u003cstring>"},"stale":{"type":"boolean","description":"Stale reports that this response is stored state that was not checked against\nthe payment provider on this request — the read was debounced, or the gateway\ndid not answer. A UI should say \"still checking\" rather than presenting a\nstale answer as fact.","uniqueKey":"subscription.checkout_session.stale","typeLabel":"boolean"},"success_url":{"type":"string","uniqueKey":"subscription.checkout_session.success_url","typeLabel":"string"},"terminal":{"type":"boolean","description":"Terminal reports whether the session has finished. Clients poll until this is\ntrue rather than hardcoding the status set, which would go stale if a status\nis ever added.","uniqueKey":"subscription.checkout_session.terminal","typeLabel":"boolean"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.checkout_session.updated_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"subscription.checkout_session","typeLabel":"object"},"collection_method":{"type":"string","description":"CollectionMethod determines how invoices are collected","uniqueKey":"subscription.collection_method","typeLabel":"string"},"commitment_amount":{"type":"string","description":"CommitmentAmount is the minimum amount a customer commits to paying for a billing period","uniqueKey":"subscription.commitment_amount","typeLabel":"string"},"commitment_duration":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod","uniqueKey":"subscription.commitment_duration","typeLabel":"enum\u003cstring>"},"coupon_associations":{"type":"array","description":"CouponAssociations are the coupon associations for this subscription","items":{"type":"object","properties":{"coupon":{"type":"object","properties":{"amount_off":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.amount_off","typeLabel":"string"},"cadence":{"type":"string","enum":["once","repeated","forever"],"x-enum-varnames":["CouponCadenceOnce","CouponCadenceRepeated","CouponCadenceForever"],"x-speakeasy-name-override":"CouponCadence","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.cadence","typeLabel":"enum\u003cstring>"},"coupon_code":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.coupon_code","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.created_by","typeLabel":"string"},"currency":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.currency","typeLabel":"string"},"duration_in_periods":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.duration_in_periods","typeLabel":"integer"},"environment_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.environment_id","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.id","typeLabel":"string"},"max_redemptions":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.max_redemptions","typeLabel":"integer"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.metadata.additionalProperties","typeLabel":"string"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.metadata","typeLabel":"object"},"name":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.name","typeLabel":"string"},"percentage_off":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.percentage_off","typeLabel":"string"},"redeem_after":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.redeem_after","typeLabel":"string"},"redeem_before":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.redeem_before","typeLabel":"string"},"rules":{"type":"object","additionalProperties":true,"uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.rules","typeLabel":"object"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.status","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.tenant_id","typeLabel":"string"},"total_redemptions":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.total_redemptions","typeLabel":"integer"},"type":{"type":"string","enum":["fixed","percentage"],"x-enum-varnames":["CouponTypeFixed","CouponTypePercentage"],"x-speakeasy-name-override":"CouponType","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.type","typeLabel":"enum\u003cstring>"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon.updated_by","typeLabel":"string"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon","typeLabel":"object"},"coupon_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].coupon_id","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].created_by","typeLabel":"string"},"end_date":{"type":"string","description":"Optional","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].end_date","typeLabel":"string\u003cdate-time>"},"environment_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].environment_id","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].id","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].metadata.additionalProperties","typeLabel":"string"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].metadata","typeLabel":"object"},"start_date":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].start_date","typeLabel":"string\u003cdate-time>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.coupon_associations.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"subscription_id":{"type":"string","description":"Mandatory","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_id","typeLabel":"string"},"subscription_line_item":{"type":"object","properties":{"addon_association_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.addon_association_id","typeLabel":"string"},"billing_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.billing_period","typeLabel":"enum\u003cstring>"},"billing_period_count":{"type":"integer","description":"from price at create; default 1","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.billing_period_count","typeLabel":"integer"},"commitment_amount":{"type":"string","description":"Commitment fields","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_amount","typeLabel":"string"},"commitment_duration":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_duration","typeLabel":"enum\u003cstring>"},"commitment_overage_factor":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_overage_factor","typeLabel":"string"},"commitment_quantity":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_quantity","typeLabel":"string"},"commitment_time_buckets":{"type":"array","items":{"type":"object","properties":{"commitment_type":{"type":"string","enum":["amount","quantity"],"x-enum-varnames":["COMMITMENT_TYPE_AMOUNT","COMMITMENT_TYPE_QUANTITY"],"x-speakeasy-name-override":"CommitmentType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_time_buckets.items.[INDEX].commitment_type","typeLabel":"enum\u003cstring>"},"commitment_value":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_time_buckets.items.[INDEX].commitment_value","typeLabel":"string"},"end":{"type":"object","properties":{"hour":{"maximum":24,"minimum":0,"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_time_buckets.items.[INDEX].end.hour","typeLabel":"integer"},"minute":{"maximum":59,"minimum":0,"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_time_buckets.items.[INDEX].end.minute","typeLabel":"integer"}},"x-speakeasy-name-override":"Bucket","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_time_buckets.items.[INDEX].end","typeLabel":"object"},"id":{"type":"string","description":"ID is server-assigned. Stable for the lifetime of the line item;\ninvoice breakdown and analytics responses reference this ID.","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_time_buckets.items.[INDEX].id","typeLabel":"string"},"overage_factor":{"type":"number","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_time_buckets.items.[INDEX].overage_factor","typeLabel":"number"},"price_id":{"type":"string","description":"PriceID is the SUBSCRIPTION-scoped price created at bucket-creation time.\nImmutable post-create; changing pricing requires a successor line item.","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_time_buckets.items.[INDEX].price_id","typeLabel":"string"},"start":{"type":"object","properties":{"hour":{"maximum":24,"minimum":0,"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_time_buckets.items.[INDEX].start.hour","typeLabel":"integer"},"minute":{"maximum":59,"minimum":0,"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_time_buckets.items.[INDEX].start.minute","typeLabel":"integer"}},"x-speakeasy-name-override":"Bucket","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_time_buckets.items.[INDEX].start","typeLabel":"object"},"true_up_enabled":{"type":"boolean","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_time_buckets.items.[INDEX].true_up_enabled","typeLabel":"boolean"}},"x-speakeasy-name-override":"TimeOfDayBucket","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_time_buckets.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_time_buckets","typeLabel":"object[]"},"commitment_true_up_enabled":{"type":"boolean","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_true_up_enabled","typeLabel":"boolean"},"commitment_type":{"type":"string","enum":["amount","quantity"],"x-enum-varnames":["COMMITMENT_TYPE_AMOUNT","COMMITMENT_TYPE_QUANTITY"],"x-speakeasy-name-override":"CommitmentType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_type","typeLabel":"enum\u003cstring>"},"commitment_windowed":{"type":"boolean","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.commitment_windowed","typeLabel":"boolean"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.created_by","typeLabel":"string"},"currency":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.currency","typeLabel":"string"},"customer_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.customer_id","typeLabel":"string"},"display_name":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.display_name","typeLabel":"string"},"end_date":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.end_date","typeLabel":"string\u003cdate-time>"},"entity_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.entity_id","typeLabel":"string"},"entity_type":{"type":"string","enum":["plan","addon","subscription"],"x-enum-varnames":["SubscriptionLineItemEntityTypePlan","SubscriptionLineItemEntityTypeAddon","SubscriptionLineItemEntityTypeSubscription"],"x-speakeasy-name-override":"SubscriptionLineItemEntityType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.entity_type","typeLabel":"enum\u003cstring>"},"environment_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.environment_id","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.id","typeLabel":"string"},"invoice_cadence":{"type":"string","enum":["ARREAR","ADVANCE"],"x-enum-varnames":["InvoiceCadenceArrear","InvoiceCadenceAdvance"],"x-speakeasy-name-override":"InvoiceCadence","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.invoice_cadence","typeLabel":"enum\u003cstring>"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.metadata.additionalProperties","typeLabel":"string"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.metadata","typeLabel":"object"},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.aggregation.bucket_size","typeLabel":"enum\u003cstring>"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel).","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.aggregation.expression","typeLabel":"string"},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set.","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.aggregation.field","typeLabel":"string"},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total.","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.aggregation.group_by","typeLabel":"string"},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null.","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.aggregation.multiplier","typeLabel":"string"},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.aggregation.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.aggregation","typeLabel":"object"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.created_by","typeLabel":"string"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the meter","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.environment_id","typeLabel":"string"},"event_name":{"type":"string","description":"EventName is the unique identifier for the event that this meter is tracking\nIt is a mandatory field in the events table and hence being used as the primary matching field\nWe can have multiple meters tracking the same event but with different filters and aggregation","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.event_name","typeLabel":"string"},"filters":{"type":"array","description":"Filters define the criteria for the meter to be applied on the events before aggregation\nIt also defines the possible values on which later the charges will be applied","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.filters.items.[INDEX].key","typeLabel":"string"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.filters.items.[INDEX].values.items.[INDEX]","typeLabel":"string"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.filters.items.[INDEX].values","typeLabel":"string[]"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.filters.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.filters","typeLabel":"object[]"},"id":{"type":"string","description":"ID is the unique identifier for the meter","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.id","typeLabel":"string"},"name":{"type":"string","description":"Name is the display name of the meter","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.name","typeLabel":"string"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.reset_usage","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.status","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter.updated_by","typeLabel":"string"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter","typeLabel":"object"},"meter_display_name":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter_display_name","typeLabel":"string"},"meter_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.meter_id","typeLabel":"string"},"plan_display_name":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.plan_display_name","typeLabel":"string"},"price":{"type":"object","properties":{"addon":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.created_by","typeLabel":"string"},"credit_grants":{"type":"array","items":{"type":"object","properties":{"addon_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].addon_id","typeLabel":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].cadence","typeLabel":"enum\u003cstring>"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].conversion_rate","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].created_by","typeLabel":"string"},"credit_grant_anchor":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].credit_grant_anchor","typeLabel":"string\u003cdate-time>"},"credits":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].credits","typeLabel":"string"},"end_date":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].end_date","typeLabel":"string\u003cdate-time>"},"environment_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].environment_id","typeLabel":"string"},"expiration_duration":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].expiration_duration","typeLabel":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].expiration_duration_unit","typeLabel":"enum\u003cstring>"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].expiration_type","typeLabel":"enum\u003cstring>"},"id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].id","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].metadata","typeLabel":"object"},"name":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].name","typeLabel":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].period","typeLabel":"enum\u003cstring>"},"period_count":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].period_count","typeLabel":"integer"},"plan_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].plan_id","typeLabel":"string"},"priority":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].priority","typeLabel":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].scope","typeLabel":"enum\u003cstring>"},"start_date":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].start_date","typeLabel":"string\u003cdate-time>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"subscription_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].subscription_id","typeLabel":"string"},"tenant_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].tenant_id","typeLabel":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].topup_conversion_rate","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX].updated_by","typeLabel":"string"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.credit_grants","typeLabel":"object[]"},"description":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.description","typeLabel":"string"},"entitlements":{"type":"array","items":{"type":"object","properties":{"addon":{"oneOf":[{"$circularRef":"6c04a6f7-e9a8-4aa6-bb72-c876420f4348"}],"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].addon","typeLabel":"any"},"aggregation_mode":{"type":"string","enum":["additive","parallel"],"x-enum-varnames":["EntitlementAggregationModeAdditive","EntitlementAggregationModeParallel"],"x-speakeasy-name-override":"EntitlementAggregationMode","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].aggregation_mode","typeLabel":"enum\u003cstring>"},"config_value":{"type":"object","additionalProperties":true,"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].config_value","typeLabel":"object"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].created_by","typeLabel":"string"},"display_order":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].display_order","typeLabel":"integer"},"end_date":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].end_date","typeLabel":"string\u003cdate-time>"},"entity_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].entity_id","typeLabel":"string"},"entity_type":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["ENTITLEMENT_ENTITY_TYPE_PLAN","ENTITLEMENT_ENTITY_TYPE_SUBSCRIPTION","ENTITLEMENT_ENTITY_TYPE_ADDON"],"x-speakeasy-name-override":"EntitlementEntityType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].entity_type","typeLabel":"enum\u003cstring>"},"environment_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].environment_id","typeLabel":"string"},"feature":{"type":"object","properties":{"alert_settings":{"type":"object","properties":{"alert_enabled":{"type":"boolean","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.alert_settings.alert_enabled","typeLabel":"boolean"},"alert_threshold_type":{"type":"string","enum":["absolute","percentage"],"x-enum-varnames":["AlertThresholdTypeAbsolute","AlertThresholdTypePercentage"],"x-speakeasy-name-override":"AlertThresholdType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.alert_settings.alert_threshold_type","typeLabel":"enum\u003cstring>"},"critical":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.alert_settings.critical.condition","typeLabel":"enum\u003cstring>"},"threshold":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.alert_settings.critical.threshold","typeLabel":"string"}},"x-speakeasy-name-override":"AlertThreshold","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.alert_settings.critical","typeLabel":"object"},"info":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.alert_settings.info.condition","typeLabel":"enum\u003cstring>"},"threshold":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.alert_settings.info.threshold","typeLabel":"string"}},"x-speakeasy-name-override":"AlertThreshold","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.alert_settings.info","typeLabel":"object"},"warning":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.alert_settings.warning.condition","typeLabel":"enum\u003cstring>"},"threshold":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.alert_settings.warning.threshold","typeLabel":"string"}},"x-speakeasy-name-override":"AlertThreshold","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.alert_settings.warning","typeLabel":"object"}},"x-speakeasy-name-override":"AlertSettings","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.alert_settings","typeLabel":"object"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.created_by","typeLabel":"string"},"description":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.description","typeLabel":"string"},"environment_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.environment_id","typeLabel":"string"},"group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.group.created_at","typeLabel":"string\u003cdate-time>"},"entity_ids":{"type":"array","items":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.group.entity_ids.items.[INDEX]","typeLabel":"string"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.group.entity_ids","typeLabel":"string[]"},"entity_type":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.group.entity_type","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.group.id","typeLabel":"string"},"lookup_key":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.group.lookup_key","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.group.metadata.additionalProperties","typeLabel":"string"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.group.metadata","typeLabel":"object"},"name":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.group.name","typeLabel":"string"},"status":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.group.status","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.group.updated_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.group","typeLabel":"object"},"group_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.group_id","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.id","typeLabel":"string"},"lookup_key":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.lookup_key","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.metadata","typeLabel":"object"},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.aggregation.bucket_size","typeLabel":"enum\u003cstring>"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel).","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.aggregation.expression","typeLabel":"string"},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set.","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.aggregation.field","typeLabel":"string"},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total.","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.aggregation.group_by","typeLabel":"string"},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null.","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.aggregation.multiplier","typeLabel":"string"},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.aggregation.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.aggregation","typeLabel":"object"},"created_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.created_at","typeLabel":"string\u003cdate-time>"},"event_name":{"type":"string","example":"api_request","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.event_name","typeLabel":"string"},"filters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.filters.items.[INDEX].key","typeLabel":"string"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.filters.items.[INDEX].values.items.[INDEX]","typeLabel":"string"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.filters.items.[INDEX].values","typeLabel":"string[]"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.filters.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.filters","typeLabel":"object[]"},"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.id","typeLabel":"string"},"name":{"type":"string","example":"API Usage Meter","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.name","typeLabel":"string"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.reset_usage","typeLabel":"enum\u003cstring>"},"status":{"type":"string","example":"published","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.status","typeLabel":"string"},"tenant_id":{"type":"string","example":"tenant123","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.tenant_id","typeLabel":"string"},"updated_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter.updated_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter","typeLabel":"object"},"meter_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.meter_id","typeLabel":"string"},"name":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.name","typeLabel":"string"},"reporting_unit":{"type":"object","properties":{"conversion_rate":{"type":"number","description":"Multiplier: reporting_unit_value = unit_value * conversion_rate; must be > 0","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.reporting_unit.conversion_rate","typeLabel":"number"},"unit_plural":{"type":"string","description":"Display unit label, plural (e.g. \"seconds\")","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.reporting_unit.unit_plural","typeLabel":"string"},"unit_singular":{"type":"string","description":"Display unit label, singular (e.g. \"second\")","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.reporting_unit.unit_singular","typeLabel":"string"}},"x-speakeasy-name-override":"ReportingUnit","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.reporting_unit","typeLabel":"object"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.status","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.tenant_id","typeLabel":"string"},"type":{"type":"string","enum":["metered","boolean","static","config"],"x-enum-varnames":["FeatureTypeMetered","FeatureTypeBoolean","FeatureTypeStatic","FeatureTypeConfig"],"x-speakeasy-name-override":"FeatureType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.type","typeLabel":"enum\u003cstring>"},"unit_plural":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.unit_plural","typeLabel":"string"},"unit_singular":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.unit_singular","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature.updated_by","typeLabel":"string"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature","typeLabel":"object"},"feature_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature_id","typeLabel":"string"},"feature_type":{"type":"string","enum":["metered","boolean","static","config"],"x-enum-varnames":["FeatureTypeMetered","FeatureTypeBoolean","FeatureTypeStatic","FeatureTypeConfig"],"x-speakeasy-name-override":"FeatureType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].feature_type","typeLabel":"enum\u003cstring>"},"grant_allocation_behavior":{"type":"string","enum":["first_usage","unit_start"],"x-enum-varnames":["EntitlementGrantAllocationBehaviorFirstUsage","EntitlementGrantAllocationBehaviorUnitStart"],"x-speakeasy-name-override":"EntitlementGrantAllocationBehavior","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].grant_allocation_behavior","typeLabel":"enum\u003cstring>"},"grant_duration_unit":{"type":"string","enum":["hour","day","week","subscription_period"],"x-enum-varnames":["EntitlementGrantDurationUnitHour","EntitlementGrantDurationUnitDay","EntitlementGrantDurationUnitWeek","EntitlementGrantDurationUnitSubscriptionPeriod"],"x-speakeasy-name-override":"EntitlementGrantDurationUnit","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].grant_duration_unit","typeLabel":"enum\u003cstring>"},"grant_duration_value":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].grant_duration_value","typeLabel":"integer"},"grant_measure":{"type":"string","enum":["quantity","amount"],"x-enum-varnames":["EntitlementGrantMeasureQuantity","EntitlementGrantMeasureAmount"],"x-speakeasy-name-override":"EntitlementGrantMeasure","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].grant_measure","typeLabel":"enum\u003cstring>"},"grant_quota":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].grant_quota","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].id","typeLabel":"string"},"is_enabled":{"type":"boolean","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].is_enabled","typeLabel":"boolean"},"is_soft_limit":{"type":"boolean","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].is_soft_limit","typeLabel":"boolean"},"parent_entitlement_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].parent_entitlement_id","typeLabel":"string"},"plan":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.created_by","typeLabel":"string"},"credit_grants":{"type":"array","items":{"type":"object","properties":{"addon_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].addon_id","typeLabel":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].cadence","typeLabel":"enum\u003cstring>"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].conversion_rate","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].created_by","typeLabel":"string"},"credit_grant_anchor":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].credit_grant_anchor","typeLabel":"string\u003cdate-time>"},"credits":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].credits","typeLabel":"string"},"end_date":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].end_date","typeLabel":"string\u003cdate-time>"},"environment_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].environment_id","typeLabel":"string"},"expiration_duration":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].expiration_duration","typeLabel":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].expiration_duration_unit","typeLabel":"enum\u003cstring>"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].expiration_type","typeLabel":"enum\u003cstring>"},"id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].id","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].metadata","typeLabel":"object"},"name":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].name","typeLabel":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].period","typeLabel":"enum\u003cstring>"},"period_count":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].period_count","typeLabel":"integer"},"plan_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].plan_id","typeLabel":"string"},"priority":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].priority","typeLabel":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].scope","typeLabel":"enum\u003cstring>"},"start_date":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].start_date","typeLabel":"string\u003cdate-time>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"subscription_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].subscription_id","typeLabel":"string"},"tenant_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].tenant_id","typeLabel":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].topup_conversion_rate","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX].updated_by","typeLabel":"string"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.credit_grants","typeLabel":"object[]"},"description":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.description","typeLabel":"string"},"display_order":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.display_order","typeLabel":"integer"},"entitlements":{"type":"array","items":{"$circularRef":"1c99a94f-ba2d-4aeb-aec5-928f5daeddec"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.entitlements","typeLabel":"array"},"environment_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.environment_id","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.id","typeLabel":"string"},"lookup_key":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.lookup_key","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.metadata","typeLabel":"object"},"name":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.name","typeLabel":"string"},"price_sync_status":{"type":"object","properties":{"current_sequence":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.price_sync_status.current_sequence","typeLabel":"integer"},"synced":{"type":"boolean","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.price_sync_status.synced","typeLabel":"boolean"},"unsynced_subscription_count":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.price_sync_status.unsynced_subscription_count","typeLabel":"integer"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.price_sync_status","typeLabel":"object"},"prices":{"type":"array","description":"TODO: Add inline addons","items":{"$circularRef":"0dc125d7-6bd8-40a5-8d18-2c0190dcf082"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.prices","typeLabel":"array"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.status","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan.updated_by","typeLabel":"string"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan","typeLabel":"object"},"plan_id":{"type":"string","description":"TODO: Remove this once we have a proper entitlement entity type","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].plan_id","typeLabel":"string"},"start_date":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].start_date","typeLabel":"string\u003cdate-time>"},"static_value":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].static_value","typeLabel":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].updated_by","typeLabel":"string"},"usage_limit":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].usage_limit","typeLabel":"integer"},"usage_reset_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","NEVER"],"x-enum-varnames":["ENTITLEMENT_USAGE_RESET_PERIOD_MONTHLY","ENTITLEMENT_USAGE_RESET_PERIOD_ANNUAL","ENTITLEMENT_USAGE_RESET_PERIOD_WEEKLY","ENTITLEMENT_USAGE_RESET_PERIOD_DAILY","ENTITLEMENT_USAGE_RESET_PERIOD_QUARTER","ENTITLEMENT_USAGE_RESET_PERIOD_HALF_YEAR","ENTITLEMENT_USAGE_RESET_PERIOD_NEVER"],"x-speakeasy-name-override":"EntitlementUsageResetPeriod","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX].usage_reset_period","typeLabel":"enum\u003cstring>"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.entitlements","typeLabel":"object[]"},"environment_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.environment_id","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.id","typeLabel":"string"},"lookup_key":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.lookup_key","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":true,"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.metadata","typeLabel":"object"},"name":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.name","typeLabel":"string"},"price_sync_status":{"type":"object","properties":{"current_sequence":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.price_sync_status.current_sequence","typeLabel":"integer"},"synced":{"type":"boolean","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.price_sync_status.synced","typeLabel":"boolean"},"unsynced_association_count":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.price_sync_status.unsynced_association_count","typeLabel":"integer"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.price_sync_status","typeLabel":"object"},"prices":{"type":"array","description":"Optional expanded fields","items":{"$circularRef":"0dc125d7-6bd8-40a5-8d18-2c0190dcf082"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.prices","typeLabel":"array"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.status","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon.updated_by","typeLabel":"string"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.addon","typeLabel":"object"},"amount":{"type":"string","description":"Amount stored in main currency units (e.g., dollars, not cents)\nFor USD: 12.50 means $12.50","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.amount","typeLabel":"string"},"billing_cadence":{"type":"string","enum":["RECURRING"],"x-enum-varnames":["BILLING_CADENCE_RECURRING"],"x-speakeasy-name-override":"BillingCadence","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.billing_cadence","typeLabel":"enum\u003cstring>"},"billing_model":{"type":"string","enum":["FLAT_FEE","PACKAGE","TIERED"],"x-enum-varnames":["BILLING_MODEL_FLAT_FEE","BILLING_MODEL_PACKAGE","BILLING_MODEL_TIERED"],"x-speakeasy-name-override":"BillingModel","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.billing_model","typeLabel":"enum\u003cstring>"},"billing_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.billing_period","typeLabel":"enum\u003cstring>"},"billing_period_count":{"type":"integer","description":"BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.billing_period_count","typeLabel":"integer"},"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.bucket_size","typeLabel":"enum\u003cstring>"},"conversion_rate":{"type":"string","description":"ConversionRate is the conversion rate of the price unit to the fiat currency","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.conversion_rate","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.created_by","typeLabel":"string"},"currency":{"type":"string","description":"Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.currency","typeLabel":"string"},"description":{"type":"string","description":"Description of the price","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.description","typeLabel":"string"},"display_amount":{"type":"string","description":"DisplayAmount is the formatted amount with currency symbol\nFor USD: $12.50","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.display_amount","typeLabel":"string"},"display_name":{"type":"string","description":"DisplayName is the name of the price","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.display_name","typeLabel":"string"},"display_price_unit_amount":{"type":"string","description":"DisplayPriceUnitAmount is the formatted amount of the price unit","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.display_price_unit_amount","typeLabel":"string"},"end_date":{"type":"string","description":"EndDate is the end date of the price","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.end_date","typeLabel":"string\u003cdate-time>"},"entity_id":{"type":"string","description":"EntityID holds the value of the \"entity_id\" field.","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.entity_id","typeLabel":"string"},"entity_type":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON","PRICE","COSTSHEET"],"x-enum-varnames":["PRICE_ENTITY_TYPE_PLAN","PRICE_ENTITY_TYPE_SUBSCRIPTION","PRICE_ENTITY_TYPE_ADDON","PRICE_ENTITY_TYPE_PRICE","PRICE_ENTITY_TYPE_COSTSHEET"],"x-speakeasy-name-override":"PriceEntityType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.entity_type","typeLabel":"enum\u003cstring>"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the price","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.environment_id","typeLabel":"string"},"feature":{"type":"object","properties":{"reporting_unit":{"type":"object","properties":{"conversion_rate":{"type":"number","description":"Multiplier: reporting_unit_value = unit_value * conversion_rate; must be > 0","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.feature.reporting_unit.conversion_rate","typeLabel":"number"},"unit_plural":{"type":"string","description":"Display unit label, plural (e.g. \"seconds\")","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.feature.reporting_unit.unit_plural","typeLabel":"string"},"unit_singular":{"type":"string","description":"Display unit label, singular (e.g. \"second\")","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.feature.reporting_unit.unit_singular","typeLabel":"string"}},"x-speakeasy-name-override":"ReportingUnit","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.feature.reporting_unit","typeLabel":"object"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.feature","typeLabel":"object"},"group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.group.created_at","typeLabel":"string\u003cdate-time>"},"entity_ids":{"type":"array","items":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.group.entity_ids.items.[INDEX]","typeLabel":"string"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.group.entity_ids","typeLabel":"string[]"},"entity_type":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.group.entity_type","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.group.id","typeLabel":"string"},"lookup_key":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.group.lookup_key","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.group.metadata.additionalProperties","typeLabel":"string"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.group.metadata","typeLabel":"object"},"name":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.group.name","typeLabel":"string"},"status":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.group.status","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.group.updated_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.group","typeLabel":"object"},"group_id":{"type":"string","description":"GroupID references the group this price belongs to","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.group_id","typeLabel":"string"},"id":{"type":"string","description":"ID uuid identifier for the price","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.id","typeLabel":"string"},"invoice_cadence":{"type":"string","enum":["ARREAR","ADVANCE"],"x-enum-varnames":["InvoiceCadenceArrear","InvoiceCadenceAdvance"],"x-speakeasy-name-override":"InvoiceCadence","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.invoice_cadence","typeLabel":"enum\u003cstring>"},"lookup_key":{"type":"string","description":"LookupKey used for looking up the price in the database","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.lookup_key","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.metadata.additionalProperties","typeLabel":"string"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.metadata","typeLabel":"object"},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.aggregation.bucket_size","typeLabel":"enum\u003cstring>"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel).","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.aggregation.expression","typeLabel":"string"},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set.","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.aggregation.field","typeLabel":"string"},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total.","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.aggregation.group_by","typeLabel":"string"},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null.","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.aggregation.multiplier","typeLabel":"string"},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.aggregation.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.aggregation","typeLabel":"object"},"created_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.created_at","typeLabel":"string\u003cdate-time>"},"event_name":{"type":"string","example":"api_request","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.event_name","typeLabel":"string"},"filters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.filters.items.[INDEX].key","typeLabel":"string"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.filters.items.[INDEX].values.items.[INDEX]","typeLabel":"string"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.filters.items.[INDEX].values","typeLabel":"string[]"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.filters.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.filters","typeLabel":"object[]"},"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.id","typeLabel":"string"},"name":{"type":"string","example":"API Usage Meter","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.name","typeLabel":"string"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.reset_usage","typeLabel":"enum\u003cstring>"},"status":{"type":"string","example":"published","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.status","typeLabel":"string"},"tenant_id":{"type":"string","example":"tenant123","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.tenant_id","typeLabel":"string"},"updated_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter.updated_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter","typeLabel":"object"},"meter_id":{"type":"string","description":"MeterID is the id of the meter for usage based pricing","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.meter_id","typeLabel":"string"},"min_quantity":{"oneOf":[{"type":"string","description":"MinQuantity is the minimum quantity of the price","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.min_quantity.oneOf.0","typeLabel":"string"},{"type":"null","description":"MinQuantity is the minimum quantity of the price","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.min_quantity.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.min_quantity","typeLabel":"string | null"},"parent_price_id":{"type":"string","description":"ParentPriceID references the root price (always set for price lineage tracking)","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.parent_price_id","typeLabel":"string"},"plan":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.created_by","typeLabel":"string"},"credit_grants":{"type":"array","items":{"type":"object","properties":{"addon_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].addon_id","typeLabel":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].cadence","typeLabel":"enum\u003cstring>"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].conversion_rate","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].created_by","typeLabel":"string"},"credit_grant_anchor":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].credit_grant_anchor","typeLabel":"string\u003cdate-time>"},"credits":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].credits","typeLabel":"string"},"end_date":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].end_date","typeLabel":"string\u003cdate-time>"},"environment_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].environment_id","typeLabel":"string"},"expiration_duration":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].expiration_duration","typeLabel":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].expiration_duration_unit","typeLabel":"enum\u003cstring>"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].expiration_type","typeLabel":"enum\u003cstring>"},"id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].id","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].metadata","typeLabel":"object"},"name":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].name","typeLabel":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].period","typeLabel":"enum\u003cstring>"},"period_count":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].period_count","typeLabel":"integer"},"plan_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].plan_id","typeLabel":"string"},"priority":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].priority","typeLabel":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].scope","typeLabel":"enum\u003cstring>"},"start_date":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].start_date","typeLabel":"string\u003cdate-time>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"subscription_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].subscription_id","typeLabel":"string"},"tenant_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].tenant_id","typeLabel":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].topup_conversion_rate","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX].updated_by","typeLabel":"string"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.credit_grants","typeLabel":"object[]"},"description":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.description","typeLabel":"string"},"display_order":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.display_order","typeLabel":"integer"},"entitlements":{"type":"array","items":{"$circularRef":"1c99a94f-ba2d-4aeb-aec5-928f5daeddec"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.entitlements","typeLabel":"array"},"environment_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.environment_id","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.id","typeLabel":"string"},"lookup_key":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.lookup_key","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.metadata","typeLabel":"object"},"name":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.name","typeLabel":"string"},"price_sync_status":{"type":"object","properties":{"current_sequence":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.price_sync_status.current_sequence","typeLabel":"integer"},"synced":{"type":"boolean","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.price_sync_status.synced","typeLabel":"boolean"},"unsynced_subscription_count":{"type":"integer","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.price_sync_status.unsynced_subscription_count","typeLabel":"integer"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.price_sync_status","typeLabel":"object"},"prices":{"type":"array","description":"TODO: Add inline addons","items":{"$circularRef":"0dc125d7-6bd8-40a5-8d18-2c0190dcf082"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.prices","typeLabel":"array"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.status","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan.updated_by","typeLabel":"string"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.plan","typeLabel":"object"},"price_unit":{"type":"string","description":"PriceUnit is the code of the price unit (e.g., 'btc', 'eth')","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.price_unit","typeLabel":"string"},"price_unit_amount":{"type":"string","description":"PriceUnitAmount is the amount of the price unit","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.price_unit_amount","typeLabel":"string"},"price_unit_id":{"type":"string","description":"PriceUnitID is the id of the price unit (for CUSTOM type)","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.price_unit_id","typeLabel":"string"},"price_unit_tiers":{"type":"array","description":"PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED","items":{"type":"object","properties":{"flat_amount":{"type":"string","description":"flat_amount is the flat amount for the given tier (optional)\nApplied on top of unit_amount*quantity. Useful for cases like \"2.7$ + 5c\"","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.price_unit_tiers.items.[INDEX].flat_amount","typeLabel":"string"},"unit_amount":{"type":"string","description":"unit_amount is the amount per unit for the given tier","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.price_unit_tiers.items.[INDEX].unit_amount","typeLabel":"string"},"up_to":{"type":"integer","description":"up_to is the quantity up to which this tier applies. It is null for the last tier.\nIMPORTANT: Tier boundaries are INCLUSIVE.\n- If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier\n- This behavior is consistent across both VOLUME and SLAB tier modes","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.price_unit_tiers.items.[INDEX].up_to","typeLabel":"integer"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.price_unit_tiers.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.price_unit_tiers","typeLabel":"object[]"},"price_unit_type":{"type":"string","enum":["FIAT","CUSTOM"],"x-enum-varnames":["PRICE_UNIT_TYPE_FIAT","PRICE_UNIT_TYPE_CUSTOM"],"x-speakeasy-name-override":"PriceUnitType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.price_unit_type","typeLabel":"enum\u003cstring>"},"pricing_unit":{"type":"object","properties":{"base_currency":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.pricing_unit.base_currency","typeLabel":"string"},"code":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.pricing_unit.code","typeLabel":"string"},"conversion_rate":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.pricing_unit.conversion_rate","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.pricing_unit.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.pricing_unit.created_by","typeLabel":"string"},"environment_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.pricing_unit.environment_id","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.pricing_unit.id","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.pricing_unit.metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.pricing_unit.metadata","typeLabel":"object"},"name":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.pricing_unit.name","typeLabel":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.pricing_unit.status","typeLabel":"enum\u003cstring>"},"symbol":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.pricing_unit.symbol","typeLabel":"string"},"tenant_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.pricing_unit.tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.pricing_unit.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.pricing_unit.updated_by","typeLabel":"string"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.pricing_unit","typeLabel":"object"},"sequence":{"type":"integer","description":"Sequence is the monotonic stamp bumped on every state change that\nsubscription line items need to react to. Read by the plan-price sync;\nset by the database (DEFAULT nextval) on create and by the price\nrepository on termination / compatibility-affecting edits.","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.sequence","typeLabel":"integer"},"start_date":{"type":"string","description":"StartDate is the start date of the price","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.start_date","typeLabel":"string\u003cdate-time>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.status","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.tenant_id","typeLabel":"string"},"tier_mode":{"type":"string","enum":["VOLUME","SLAB"],"x-enum-varnames":["BILLING_TIER_VOLUME","BILLING_TIER_SLAB"],"x-speakeasy-name-override":"BillingTier","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.tier_mode","typeLabel":"enum\u003cstring>"},"tiers":{"type":"array","items":{"type":"object","properties":{"flat_amount":{"type":"string","description":"flat_amount is the flat amount for the given tier (optional)\nApplied on top of unit_amount*quantity. Useful for cases like \"2.7$ + 5c\"","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.tiers.items.[INDEX].flat_amount","typeLabel":"string"},"unit_amount":{"type":"string","description":"unit_amount is the amount per unit for the given tier","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.tiers.items.[INDEX].unit_amount","typeLabel":"string"},"up_to":{"type":"integer","description":"up_to is the quantity up to which this tier applies. It is null for the last tier.\nIMPORTANT: Tier boundaries are INCLUSIVE.\n- If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier\n- This behavior is consistent across both VOLUME and SLAB tier modes","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.tiers.items.[INDEX].up_to","typeLabel":"integer"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.tiers.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.tiers","typeLabel":"object[]"},"transform_quantity":{"type":"object","properties":{"divide_by":{"type":"integer","description":"Divide quantity by this number","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.transform_quantity.divide_by","typeLabel":"integer"},"round":{"type":"string","enum":["up","down"],"x-enum-varnames":["ROUND_UP","ROUND_DOWN"],"x-speakeasy-name-override":"RoundType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.transform_quantity.round","typeLabel":"enum\u003cstring>"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.transform_quantity","typeLabel":"object"},"trial_period_days":{"type":"integer","description":"TrialPeriodDays is the number of days for the trial period\nNote: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.trial_period_days","typeLabel":"integer"},"type":{"type":"string","enum":["USAGE","FIXED"],"x-enum-varnames":["PRICE_TYPE_USAGE","PRICE_TYPE_FIXED"],"x-speakeasy-name-override":"PriceType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.type","typeLabel":"enum\u003cstring>"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price.updated_by","typeLabel":"string"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price","typeLabel":"object"},"price_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price_id","typeLabel":"string"},"price_type":{"type":"string","enum":["USAGE","FIXED"],"x-enum-varnames":["PRICE_TYPE_USAGE","PRICE_TYPE_FIXED"],"x-speakeasy-name-override":"PriceType","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price_type","typeLabel":"enum\u003cstring>"},"price_unit":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price_unit","typeLabel":"string"},"price_unit_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.price_unit_id","typeLabel":"string"},"quantity":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.quantity","typeLabel":"string"},"start_date":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.start_date","typeLabel":"string\u003cdate-time>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.status","typeLabel":"enum\u003cstring>"},"subscription_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.subscription_id","typeLabel":"string"},"subscription_phase_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.subscription_phase_id","typeLabel":"string"},"tenant_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item.updated_by","typeLabel":"string"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item","typeLabel":"object"},"subscription_line_item_id":{"type":"string","description":"Optional","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_line_item_id","typeLabel":"string"},"subscription_phase_id":{"type":"string","description":"Optional","uniqueKey":"subscription.coupon_associations.items.[INDEX].subscription_phase_id","typeLabel":"string"},"tenant_id":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.coupon_associations.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.coupon_associations.items.[INDEX].updated_by","typeLabel":"string"}},"uniqueKey":"subscription.coupon_associations.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.coupon_associations","typeLabel":"object[]"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.created_by","typeLabel":"string"},"credit_grants":{"type":"array","description":"Credit grants are the credit grants for this subscription","items":{"type":"object","properties":{"addon_id":{"type":"string","uniqueKey":"subscription.credit_grants.items.[INDEX].addon_id","typeLabel":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence","uniqueKey":"subscription.credit_grants.items.[INDEX].cadence","typeLabel":"enum\u003cstring>"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits","uniqueKey":"subscription.credit_grants.items.[INDEX].conversion_rate","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.credit_grants.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.credit_grants.items.[INDEX].created_by","typeLabel":"string"},"credit_grant_anchor":{"type":"string","format":"date-time","uniqueKey":"subscription.credit_grants.items.[INDEX].credit_grant_anchor","typeLabel":"string\u003cdate-time>"},"credits":{"type":"string","uniqueKey":"subscription.credit_grants.items.[INDEX].credits","typeLabel":"string"},"end_date":{"type":"string","format":"date-time","uniqueKey":"subscription.credit_grants.items.[INDEX].end_date","typeLabel":"string\u003cdate-time>"},"environment_id":{"type":"string","uniqueKey":"subscription.credit_grants.items.[INDEX].environment_id","typeLabel":"string"},"expiration_duration":{"type":"integer","uniqueKey":"subscription.credit_grants.items.[INDEX].expiration_duration","typeLabel":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit","uniqueKey":"subscription.credit_grants.items.[INDEX].expiration_duration_unit","typeLabel":"enum\u003cstring>"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType","uniqueKey":"subscription.credit_grants.items.[INDEX].expiration_type","typeLabel":"enum\u003cstring>"},"id":{"type":"string","uniqueKey":"subscription.credit_grants.items.[INDEX].id","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.credit_grants.items.[INDEX].metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"subscription.credit_grants.items.[INDEX].metadata","typeLabel":"object"},"name":{"type":"string","uniqueKey":"subscription.credit_grants.items.[INDEX].name","typeLabel":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod","uniqueKey":"subscription.credit_grants.items.[INDEX].period","typeLabel":"enum\u003cstring>"},"period_count":{"type":"integer","uniqueKey":"subscription.credit_grants.items.[INDEX].period_count","typeLabel":"integer"},"plan_id":{"type":"string","uniqueKey":"subscription.credit_grants.items.[INDEX].plan_id","typeLabel":"string"},"priority":{"type":"integer","uniqueKey":"subscription.credit_grants.items.[INDEX].priority","typeLabel":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope","uniqueKey":"subscription.credit_grants.items.[INDEX].scope","typeLabel":"enum\u003cstring>"},"start_date":{"type":"string","format":"date-time","uniqueKey":"subscription.credit_grants.items.[INDEX].start_date","typeLabel":"string\u003cdate-time>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.credit_grants.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"subscription_id":{"type":"string","uniqueKey":"subscription.credit_grants.items.[INDEX].subscription_id","typeLabel":"string"},"tenant_id":{"type":"string","uniqueKey":"subscription.credit_grants.items.[INDEX].tenant_id","typeLabel":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits","uniqueKey":"subscription.credit_grants.items.[INDEX].topup_conversion_rate","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.credit_grants.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.credit_grants.items.[INDEX].updated_by","typeLabel":"string"}},"uniqueKey":"subscription.credit_grants.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.credit_grants","typeLabel":"object[]"},"currency":{"type":"string","description":"Currency is the currency of the subscription in lowercase 3 digit ISO codes","uniqueKey":"subscription.currency","typeLabel":"string"},"current_period_end":{"type":"string","description":"CurrentPeriodEnd is the end of the current period that the subscription has been invoiced for.\nAt the end of this period, a new invoice will be created.","format":"date-time","uniqueKey":"subscription.current_period_end","typeLabel":"string\u003cdate-time>"},"current_period_start":{"type":"string","description":"CurrentPeriodStart is the end of the current period that the subscription has been invoiced for.\nAt the end of this period, a new invoice will be created.","format":"date-time","uniqueKey":"subscription.current_period_start","typeLabel":"string\u003cdate-time>"},"customer":{"type":"object","properties":{"address_city":{"type":"string","description":"AddressCity is the city of the customer's address","uniqueKey":"subscription.customer.address_city","typeLabel":"string"},"address_country":{"type":"string","description":"AddressCountry is the country of the customer's address (ISO 3166-1 alpha-2)","uniqueKey":"subscription.customer.address_country","typeLabel":"string"},"address_line1":{"type":"string","description":"AddressLine1 is the first line of the customer's address","uniqueKey":"subscription.customer.address_line1","typeLabel":"string"},"address_line2":{"type":"string","description":"AddressLine2 is the second line of the customer's address","uniqueKey":"subscription.customer.address_line2","typeLabel":"string"},"address_postal_code":{"type":"string","description":"AddressPostalCode is the postal code of the customer's address","uniqueKey":"subscription.customer.address_postal_code","typeLabel":"string"},"address_state":{"type":"string","description":"AddressState is the state of the customer's address","uniqueKey":"subscription.customer.address_state","typeLabel":"string"},"billing_currency":{"type":"string","description":"BillingCurrency is the fiat currency invoices are issued in; nil means charge currency is used as-is.","uniqueKey":"subscription.customer.billing_currency","typeLabel":"string"},"contact":{"type":"string","description":"Contact is an optional contact number for the customer (e.g. phone)","uniqueKey":"subscription.customer.contact","typeLabel":"string"},"contact_persons":{"type":"array","items":{"required":["first_name"],"type":"object","properties":{"first_name":{"maxLength":100,"type":"string","isRequired":true,"uniqueKey":"subscription.customer.contact_persons.items.[INDEX].first_name","typeLabel":"string"},"department":{"maxLength":100,"type":"string","uniqueKey":"subscription.customer.contact_persons.items.[INDEX].department","typeLabel":"string"},"designation":{"maxLength":100,"type":"string","uniqueKey":"subscription.customer.contact_persons.items.[INDEX].designation","typeLabel":"string"},"email":{"type":"string","uniqueKey":"subscription.customer.contact_persons.items.[INDEX].email","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.customer.contact_persons.items.[INDEX].id","typeLabel":"string"},"is_primary":{"type":"boolean","uniqueKey":"subscription.customer.contact_persons.items.[INDEX].is_primary","typeLabel":"boolean"},"last_name":{"maxLength":100,"type":"string","uniqueKey":"subscription.customer.contact_persons.items.[INDEX].last_name","typeLabel":"string"},"mobile":{"maxLength":20,"type":"string","uniqueKey":"subscription.customer.contact_persons.items.[INDEX].mobile","typeLabel":"string"},"salutation":{"maxLength":25,"type":"string","uniqueKey":"subscription.customer.contact_persons.items.[INDEX].salutation","typeLabel":"string"}},"uniqueKey":"subscription.customer.contact_persons.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.customer.contact_persons","typeLabel":"object[]"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.customer.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.customer.created_by","typeLabel":"string"},"email":{"type":"string","description":"Email is the email of the customer","uniqueKey":"subscription.customer.email","typeLabel":"string"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the customer","uniqueKey":"subscription.customer.environment_id","typeLabel":"string"},"external_id":{"type":"string","description":"ExternalID is the external identifier for the customer","uniqueKey":"subscription.customer.external_id","typeLabel":"string"},"id":{"type":"string","description":"ID is the unique identifier for the customer","uniqueKey":"subscription.customer.id","typeLabel":"string"},"integrations":{"type":"array","items":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.customer.integrations.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.customer.integrations.items.[INDEX].created_by","typeLabel":"string"},"entity_id":{"type":"string","uniqueKey":"subscription.customer.integrations.items.[INDEX].entity_id","typeLabel":"string"},"entity_type":{"type":"string","enum":["customer","plan","invoice","subscription","payment","credit_note","addon","item","item_price","price","invoice_line_item","subscription_line_item"],"x-enum-varnames":["IntegrationEntityTypeCustomer","IntegrationEntityTypePlan","IntegrationEntityTypeInvoice","IntegrationEntityTypeSubscription","IntegrationEntityTypePayment","IntegrationEntityTypeCreditNote","IntegrationEntityTypeAddon","IntegrationEntityTypeItem","IntegrationEntityTypeItemPrice","IntegrationEntityTypePrice","IntegrationEntityTypeInvoiceLineItem","IntegrationEntityTypeSubscriptionLineItem"],"x-speakeasy-name-override":"IntegrationEntityType","uniqueKey":"subscription.customer.integrations.items.[INDEX].entity_type","typeLabel":"enum\u003cstring>"},"environment_id":{"type":"string","uniqueKey":"subscription.customer.integrations.items.[INDEX].environment_id","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.customer.integrations.items.[INDEX].id","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":true,"uniqueKey":"subscription.customer.integrations.items.[INDEX].metadata","typeLabel":"object"},"provider_entity_id":{"type":"string","uniqueKey":"subscription.customer.integrations.items.[INDEX].provider_entity_id","typeLabel":"string"},"provider_type":{"type":"string","uniqueKey":"subscription.customer.integrations.items.[INDEX].provider_type","typeLabel":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.customer.integrations.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"subscription.customer.integrations.items.[INDEX].tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.customer.integrations.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.customer.integrations.items.[INDEX].updated_by","typeLabel":"string"}},"uniqueKey":"subscription.customer.integrations.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.customer.integrations","typeLabel":"object[]"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.customer.metadata.additionalProperties","typeLabel":"string"},"description":"Metadata","uniqueKey":"subscription.customer.metadata","typeLabel":"object"},"name":{"type":"string","description":"Name is the name of the customer","uniqueKey":"subscription.customer.name","typeLabel":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.customer.status","typeLabel":"enum\u003cstring>"},"tax_treatment":{"type":"string","enum":["taxable","exempt"],"x-enum-varnames":["TaxTreatmentTaxable","TaxTreatmentExempt"],"x-speakeasy-name-override":"TaxTreatment","uniqueKey":"subscription.customer.tax_treatment","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"subscription.customer.tenant_id","typeLabel":"string"},"timezone":{"type":"string","description":"Timezone is the customer's IANA timezone name (e.g. \"Asia/Kolkata\").\nDefaults to \"UTC\". Inherited by subscriptions at creation time.","uniqueKey":"subscription.customer.timezone","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.customer.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.customer.updated_by","typeLabel":"string"}},"description":"Customer response object containing all customer information","uniqueKey":"subscription.customer","typeLabel":"object"},"customer_id":{"type":"string","description":"CustomerID is the identifier for the customer in our system","uniqueKey":"subscription.customer_id","typeLabel":"string"},"enable_true_up":{"type":"boolean","uniqueKey":"subscription.enable_true_up","typeLabel":"boolean"},"end_date":{"type":"string","description":"EndDate is the end date of the subscription","format":"date-time","uniqueKey":"subscription.end_date","typeLabel":"string\u003cdate-time>"},"entitlements":{"type":"array","description":"Entitlements is populated only when the caller adds \"entitlements\" to\nthe search filter's expand string. Each entry is a feature with its\naggregated entitlement info (same shape as CustomerEntitlementsResponse.Features).","items":{"type":"object","properties":{"entitlement":{"type":"object","properties":{"aggregation_mode":{"type":"string","enum":["additive","parallel"],"x-enum-varnames":["EntitlementAggregationModeAdditive","EntitlementAggregationModeParallel"],"x-speakeasy-name-override":"EntitlementAggregationMode","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.aggregation_mode","typeLabel":"enum\u003cstring>"},"buckets":{"type":"array","items":{"type":"object","properties":{"entitlement_id":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.buckets.items.[INDEX].entitlement_id","typeLabel":"string"},"grant_duration_unit":{"type":"string","enum":["hour","day","week","subscription_period"],"x-enum-varnames":["EntitlementGrantDurationUnitHour","EntitlementGrantDurationUnitDay","EntitlementGrantDurationUnitWeek","EntitlementGrantDurationUnitSubscriptionPeriod"],"x-speakeasy-name-override":"EntitlementGrantDurationUnit","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.buckets.items.[INDEX].grant_duration_unit","typeLabel":"enum\u003cstring>"},"grant_duration_value":{"type":"integer","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.buckets.items.[INDEX].grant_duration_value","typeLabel":"integer"},"grant_measure":{"type":"string","enum":["quantity","amount"],"x-enum-varnames":["EntitlementGrantMeasureQuantity","EntitlementGrantMeasureAmount"],"x-speakeasy-name-override":"EntitlementGrantMeasure","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.buckets.items.[INDEX].grant_measure","typeLabel":"enum\u003cstring>"},"grant_quota":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.buckets.items.[INDEX].grant_quota","typeLabel":"string"},"grant_unlimited":{"type":"boolean","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.buckets.items.[INDEX].grant_unlimited","typeLabel":"boolean"},"source_entity_id":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.buckets.items.[INDEX].source_entity_id","typeLabel":"string"},"usage_limit":{"type":"integer","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.buckets.items.[INDEX].usage_limit","typeLabel":"integer"}},"uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.buckets.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.buckets","typeLabel":"object[]"},"config_values":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.config_values.items.[INDEX].additionalProperties","typeLabel":"object"},"uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.config_values.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.config_values","typeLabel":"object[]"},"grant_duration_unit":{"type":"string","enum":["hour","day","week","subscription_period"],"x-enum-varnames":["EntitlementGrantDurationUnitHour","EntitlementGrantDurationUnitDay","EntitlementGrantDurationUnitWeek","EntitlementGrantDurationUnitSubscriptionPeriod"],"x-speakeasy-name-override":"EntitlementGrantDurationUnit","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_duration_unit","typeLabel":"enum\u003cstring>"},"grant_duration_value":{"type":"integer","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_duration_value","typeLabel":"integer"},"grant_measure":{"type":"string","enum":["quantity","amount"],"x-enum-varnames":["EntitlementGrantMeasureQuantity","EntitlementGrantMeasureAmount"],"x-speakeasy-name-override":"EntitlementGrantMeasure","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_measure","typeLabel":"enum\u003cstring>"},"grant_quota":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_quota","typeLabel":"string"},"grant_state":{"type":"object","properties":{"allowances":{"type":"array","items":{"type":"object","properties":{"entitlement_id":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_state.allowances.items.[INDEX].entitlement_id","typeLabel":"string"},"grant_id":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_state.allowances.items.[INDEX].grant_id","typeLabel":"string"},"is_active":{"type":"boolean","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_state.allowances.items.[INDEX].is_active","typeLabel":"boolean"},"last_computed_at":{"type":"string","format":"date-time","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_state.allowances.items.[INDEX].last_computed_at","typeLabel":"string\u003cdate-time>"},"measure":{"type":"string","enum":["quantity","amount"],"x-enum-varnames":["EntitlementGrantMeasureQuantity","EntitlementGrantMeasureAmount"],"x-speakeasy-name-override":"EntitlementGrantMeasure","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_state.allowances.items.[INDEX].measure","typeLabel":"enum\u003cstring>"},"quota":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_state.allowances.items.[INDEX].quota","typeLabel":"string"},"quota_crossed_at":{"type":"string","format":"date-time","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_state.allowances.items.[INDEX].quota_crossed_at","typeLabel":"string\u003cdate-time>"},"remaining":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_state.allowances.items.[INDEX].remaining","typeLabel":"string"},"status":{"type":"string","enum":["active","exhausted"],"x-enum-varnames":["EntitlementGrantStatusActive","EntitlementGrantStatusExhausted"],"x-speakeasy-name-override":"EntitlementGrantStatus","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_state.allowances.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"unlimited":{"type":"boolean","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_state.allowances.items.[INDEX].unlimited","typeLabel":"boolean"},"usage":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_state.allowances.items.[INDEX].usage","typeLabel":"string"},"valid_from":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_state.allowances.items.[INDEX].valid_from","typeLabel":"string"},"valid_to":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_state.allowances.items.[INDEX].valid_to","typeLabel":"string"}},"uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_state.allowances.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_state.allowances","typeLabel":"object[]"}},"uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_state","typeLabel":"object"},"grant_unlimited":{"type":"boolean","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.grant_unlimited","typeLabel":"boolean"},"is_enabled":{"type":"boolean","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.is_enabled","typeLabel":"boolean"},"is_soft_limit":{"type":"boolean","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.is_soft_limit","typeLabel":"boolean"},"static_values":{"type":"array","items":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.static_values.items.[INDEX]","typeLabel":"string"},"uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.static_values","typeLabel":"string[]"},"usage_limit":{"type":"integer","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.usage_limit","typeLabel":"integer"},"usage_reset_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","NEVER"],"x-enum-varnames":["ENTITLEMENT_USAGE_RESET_PERIOD_MONTHLY","ENTITLEMENT_USAGE_RESET_PERIOD_ANNUAL","ENTITLEMENT_USAGE_RESET_PERIOD_WEEKLY","ENTITLEMENT_USAGE_RESET_PERIOD_DAILY","ENTITLEMENT_USAGE_RESET_PERIOD_QUARTER","ENTITLEMENT_USAGE_RESET_PERIOD_HALF_YEAR","ENTITLEMENT_USAGE_RESET_PERIOD_NEVER"],"x-speakeasy-name-override":"EntitlementUsageResetPeriod","uniqueKey":"subscription.entitlements.items.[INDEX].entitlement.usage_reset_period","typeLabel":"enum\u003cstring>"}},"uniqueKey":"subscription.entitlements.items.[INDEX].entitlement","typeLabel":"object"},"feature":{"type":"object","properties":{"alert_settings":{"type":"object","properties":{"alert_enabled":{"type":"boolean","uniqueKey":"subscription.entitlements.items.[INDEX].feature.alert_settings.alert_enabled","typeLabel":"boolean"},"alert_threshold_type":{"type":"string","enum":["absolute","percentage"],"x-enum-varnames":["AlertThresholdTypeAbsolute","AlertThresholdTypePercentage"],"x-speakeasy-name-override":"AlertThresholdType","uniqueKey":"subscription.entitlements.items.[INDEX].feature.alert_settings.alert_threshold_type","typeLabel":"enum\u003cstring>"},"critical":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition","uniqueKey":"subscription.entitlements.items.[INDEX].feature.alert_settings.critical.condition","typeLabel":"enum\u003cstring>"},"threshold":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.alert_settings.critical.threshold","typeLabel":"string"}},"x-speakeasy-name-override":"AlertThreshold","uniqueKey":"subscription.entitlements.items.[INDEX].feature.alert_settings.critical","typeLabel":"object"},"info":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition","uniqueKey":"subscription.entitlements.items.[INDEX].feature.alert_settings.info.condition","typeLabel":"enum\u003cstring>"},"threshold":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.alert_settings.info.threshold","typeLabel":"string"}},"x-speakeasy-name-override":"AlertThreshold","uniqueKey":"subscription.entitlements.items.[INDEX].feature.alert_settings.info","typeLabel":"object"},"warning":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition","uniqueKey":"subscription.entitlements.items.[INDEX].feature.alert_settings.warning.condition","typeLabel":"enum\u003cstring>"},"threshold":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.alert_settings.warning.threshold","typeLabel":"string"}},"x-speakeasy-name-override":"AlertThreshold","uniqueKey":"subscription.entitlements.items.[INDEX].feature.alert_settings.warning","typeLabel":"object"}},"x-speakeasy-name-override":"AlertSettings","uniqueKey":"subscription.entitlements.items.[INDEX].feature.alert_settings","typeLabel":"object"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.entitlements.items.[INDEX].feature.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.created_by","typeLabel":"string"},"description":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.description","typeLabel":"string"},"environment_id":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.environment_id","typeLabel":"string"},"group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.entitlements.items.[INDEX].feature.group.created_at","typeLabel":"string\u003cdate-time>"},"entity_ids":{"type":"array","items":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.group.entity_ids.items.[INDEX]","typeLabel":"string"},"uniqueKey":"subscription.entitlements.items.[INDEX].feature.group.entity_ids","typeLabel":"string[]"},"entity_type":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.group.entity_type","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.group.id","typeLabel":"string"},"lookup_key":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.group.lookup_key","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.group.metadata.additionalProperties","typeLabel":"string"},"uniqueKey":"subscription.entitlements.items.[INDEX].feature.group.metadata","typeLabel":"object"},"name":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.group.name","typeLabel":"string"},"status":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.group.status","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.entitlements.items.[INDEX].feature.group.updated_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"subscription.entitlements.items.[INDEX].feature.group","typeLabel":"object"},"group_id":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.group_id","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.id","typeLabel":"string"},"lookup_key":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.lookup_key","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"subscription.entitlements.items.[INDEX].feature.metadata","typeLabel":"object"},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.aggregation.bucket_size","typeLabel":"enum\u003cstring>"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel).","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.aggregation.expression","typeLabel":"string"},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set.","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.aggregation.field","typeLabel":"string"},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total.","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.aggregation.group_by","typeLabel":"string"},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null.","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.aggregation.multiplier","typeLabel":"string"},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.aggregation.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.aggregation","typeLabel":"object"},"created_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.created_at","typeLabel":"string\u003cdate-time>"},"event_name":{"type":"string","example":"api_request","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.event_name","typeLabel":"string"},"filters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.filters.items.[INDEX].key","typeLabel":"string"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.filters.items.[INDEX].values.items.[INDEX]","typeLabel":"string"},"uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.filters.items.[INDEX].values","typeLabel":"string[]"}},"uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.filters.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.filters","typeLabel":"object[]"},"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.id","typeLabel":"string"},"name":{"type":"string","example":"API Usage Meter","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.name","typeLabel":"string"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.reset_usage","typeLabel":"enum\u003cstring>"},"status":{"type":"string","example":"published","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.status","typeLabel":"string"},"tenant_id":{"type":"string","example":"tenant123","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.tenant_id","typeLabel":"string"},"updated_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter.updated_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter","typeLabel":"object"},"meter_id":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.meter_id","typeLabel":"string"},"name":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.name","typeLabel":"string"},"reporting_unit":{"type":"object","properties":{"conversion_rate":{"type":"number","description":"Multiplier: reporting_unit_value = unit_value * conversion_rate; must be > 0","uniqueKey":"subscription.entitlements.items.[INDEX].feature.reporting_unit.conversion_rate","typeLabel":"number"},"unit_plural":{"type":"string","description":"Display unit label, plural (e.g. \"seconds\")","uniqueKey":"subscription.entitlements.items.[INDEX].feature.reporting_unit.unit_plural","typeLabel":"string"},"unit_singular":{"type":"string","description":"Display unit label, singular (e.g. \"second\")","uniqueKey":"subscription.entitlements.items.[INDEX].feature.reporting_unit.unit_singular","typeLabel":"string"}},"x-speakeasy-name-override":"ReportingUnit","uniqueKey":"subscription.entitlements.items.[INDEX].feature.reporting_unit","typeLabel":"object"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.entitlements.items.[INDEX].feature.status","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.tenant_id","typeLabel":"string"},"type":{"type":"string","enum":["metered","boolean","static","config"],"x-enum-varnames":["FeatureTypeMetered","FeatureTypeBoolean","FeatureTypeStatic","FeatureTypeConfig"],"x-speakeasy-name-override":"FeatureType","uniqueKey":"subscription.entitlements.items.[INDEX].feature.type","typeLabel":"enum\u003cstring>"},"unit_plural":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.unit_plural","typeLabel":"string"},"unit_singular":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.unit_singular","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.entitlements.items.[INDEX].feature.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].feature.updated_by","typeLabel":"string"}},"uniqueKey":"subscription.entitlements.items.[INDEX].feature","typeLabel":"object"},"sources":{"type":"array","items":{"type":"object","properties":{"config_value":{"type":"object","additionalProperties":true,"uniqueKey":"subscription.entitlements.items.[INDEX].sources.items.[INDEX].config_value","typeLabel":"object"},"entitlement_id":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].sources.items.[INDEX].entitlement_id","typeLabel":"string"},"entity_id":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].sources.items.[INDEX].entity_id","typeLabel":"string"},"entity_name":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].sources.items.[INDEX].entity_name","typeLabel":"string"},"entity_type":{"type":"string","enum":["plan","addon","subscription"],"x-enum-varnames":["EntitlementSourceEntityTypePlan","EntitlementSourceEntityTypeAddon","EntitlementSourceEntityTypeSubscription"],"uniqueKey":"subscription.entitlements.items.[INDEX].sources.items.[INDEX].entity_type","typeLabel":"enum\u003cstring>"},"is_enabled":{"type":"boolean","uniqueKey":"subscription.entitlements.items.[INDEX].sources.items.[INDEX].is_enabled","typeLabel":"boolean"},"quantity":{"type":"integer","uniqueKey":"subscription.entitlements.items.[INDEX].sources.items.[INDEX].quantity","typeLabel":"integer"},"static_value":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].sources.items.[INDEX].static_value","typeLabel":"string"},"subscription_id":{"type":"string","uniqueKey":"subscription.entitlements.items.[INDEX].sources.items.[INDEX].subscription_id","typeLabel":"string"},"usage_limit":{"type":"integer","uniqueKey":"subscription.entitlements.items.[INDEX].sources.items.[INDEX].usage_limit","typeLabel":"integer"},"usage_reset_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod","uniqueKey":"subscription.entitlements.items.[INDEX].sources.items.[INDEX].usage_reset_period","typeLabel":"enum\u003cstring>"}},"uniqueKey":"subscription.entitlements.items.[INDEX].sources.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.entitlements.items.[INDEX].sources","typeLabel":"object[]"}},"uniqueKey":"subscription.entitlements.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.entitlements","typeLabel":"object[]"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the subscription","uniqueKey":"subscription.environment_id","typeLabel":"string"},"gateway_payment_method_id":{"type":"string","description":"GatewayPaymentMethodID is the gateway payment method ID for this subscription","uniqueKey":"subscription.gateway_payment_method_id","typeLabel":"string"},"id":{"type":"string","description":"ID is the unique identifier for the subscription","uniqueKey":"subscription.id","typeLabel":"string"},"invoicing_customer_id":{"type":"string","description":"InvoicingCustomerID is the customer ID to use for invoicing\nThis can differ from the subscription customer (e.g., parent company invoicing for child company)","uniqueKey":"subscription.invoicing_customer_id","typeLabel":"string"},"latest_invoice":{"oneOf":[{"$circularRef":"d50c71bf-2b9a-41df-ba09-3621d0d9d197"}],"uniqueKey":"subscription.latest_invoice","typeLabel":"any"},"line_item_grouping":{"type":"string","enum":["per_charge_period","per_billing_period"],"x-enum-varnames":["LineItemGroupingPerChargePeriod","LineItemGroupingPerBillingPeriod"],"x-speakeasy-name-override":"LineItemGrouping","uniqueKey":"subscription.line_item_grouping","typeLabel":"enum\u003cstring>"},"line_items":{"type":"array","items":{"type":"object","properties":{"addon_association_id":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].addon_association_id","typeLabel":"string"},"billing_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod","uniqueKey":"subscription.line_items.items.[INDEX].billing_period","typeLabel":"enum\u003cstring>"},"billing_period_count":{"type":"integer","description":"from price at create; default 1","uniqueKey":"subscription.line_items.items.[INDEX].billing_period_count","typeLabel":"integer"},"commitment_amount":{"type":"string","description":"Commitment fields","uniqueKey":"subscription.line_items.items.[INDEX].commitment_amount","typeLabel":"string"},"commitment_duration":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod","uniqueKey":"subscription.line_items.items.[INDEX].commitment_duration","typeLabel":"enum\u003cstring>"},"commitment_overage_factor":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].commitment_overage_factor","typeLabel":"string"},"commitment_quantity":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].commitment_quantity","typeLabel":"string"},"commitment_time_buckets":{"type":"array","items":{"type":"object","properties":{"commitment_type":{"type":"string","enum":["amount","quantity"],"x-enum-varnames":["COMMITMENT_TYPE_AMOUNT","COMMITMENT_TYPE_QUANTITY"],"x-speakeasy-name-override":"CommitmentType","uniqueKey":"subscription.line_items.items.[INDEX].commitment_time_buckets.items.[INDEX].commitment_type","typeLabel":"enum\u003cstring>"},"commitment_value":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].commitment_time_buckets.items.[INDEX].commitment_value","typeLabel":"string"},"end":{"type":"object","properties":{"hour":{"maximum":24,"minimum":0,"type":"integer","uniqueKey":"subscription.line_items.items.[INDEX].commitment_time_buckets.items.[INDEX].end.hour","typeLabel":"integer"},"minute":{"maximum":59,"minimum":0,"type":"integer","uniqueKey":"subscription.line_items.items.[INDEX].commitment_time_buckets.items.[INDEX].end.minute","typeLabel":"integer"}},"x-speakeasy-name-override":"Bucket","uniqueKey":"subscription.line_items.items.[INDEX].commitment_time_buckets.items.[INDEX].end","typeLabel":"object"},"id":{"type":"string","description":"ID is server-assigned. Stable for the lifetime of the line item;\ninvoice breakdown and analytics responses reference this ID.","uniqueKey":"subscription.line_items.items.[INDEX].commitment_time_buckets.items.[INDEX].id","typeLabel":"string"},"overage_factor":{"type":"number","uniqueKey":"subscription.line_items.items.[INDEX].commitment_time_buckets.items.[INDEX].overage_factor","typeLabel":"number"},"price_id":{"type":"string","description":"PriceID is the SUBSCRIPTION-scoped price created at bucket-creation time.\nImmutable post-create; changing pricing requires a successor line item.","uniqueKey":"subscription.line_items.items.[INDEX].commitment_time_buckets.items.[INDEX].price_id","typeLabel":"string"},"start":{"type":"object","properties":{"hour":{"maximum":24,"minimum":0,"type":"integer","uniqueKey":"subscription.line_items.items.[INDEX].commitment_time_buckets.items.[INDEX].start.hour","typeLabel":"integer"},"minute":{"maximum":59,"minimum":0,"type":"integer","uniqueKey":"subscription.line_items.items.[INDEX].commitment_time_buckets.items.[INDEX].start.minute","typeLabel":"integer"}},"x-speakeasy-name-override":"Bucket","uniqueKey":"subscription.line_items.items.[INDEX].commitment_time_buckets.items.[INDEX].start","typeLabel":"object"},"true_up_enabled":{"type":"boolean","uniqueKey":"subscription.line_items.items.[INDEX].commitment_time_buckets.items.[INDEX].true_up_enabled","typeLabel":"boolean"}},"x-speakeasy-name-override":"TimeOfDayBucket","uniqueKey":"subscription.line_items.items.[INDEX].commitment_time_buckets.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.line_items.items.[INDEX].commitment_time_buckets","typeLabel":"object[]"},"commitment_true_up_enabled":{"type":"boolean","uniqueKey":"subscription.line_items.items.[INDEX].commitment_true_up_enabled","typeLabel":"boolean"},"commitment_type":{"type":"string","enum":["amount","quantity"],"x-enum-varnames":["COMMITMENT_TYPE_AMOUNT","COMMITMENT_TYPE_QUANTITY"],"x-speakeasy-name-override":"CommitmentType","uniqueKey":"subscription.line_items.items.[INDEX].commitment_type","typeLabel":"enum\u003cstring>"},"commitment_windowed":{"type":"boolean","uniqueKey":"subscription.line_items.items.[INDEX].commitment_windowed","typeLabel":"boolean"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.line_items.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].created_by","typeLabel":"string"},"currency":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].currency","typeLabel":"string"},"customer_id":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].customer_id","typeLabel":"string"},"display_name":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].display_name","typeLabel":"string"},"end_date":{"type":"string","format":"date-time","uniqueKey":"subscription.line_items.items.[INDEX].end_date","typeLabel":"string\u003cdate-time>"},"entity_id":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].entity_id","typeLabel":"string"},"entity_type":{"type":"string","enum":["plan","addon","subscription"],"x-enum-varnames":["SubscriptionLineItemEntityTypePlan","SubscriptionLineItemEntityTypeAddon","SubscriptionLineItemEntityTypeSubscription"],"x-speakeasy-name-override":"SubscriptionLineItemEntityType","uniqueKey":"subscription.line_items.items.[INDEX].entity_type","typeLabel":"enum\u003cstring>"},"environment_id":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].environment_id","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].id","typeLabel":"string"},"invoice_cadence":{"type":"string","enum":["ARREAR","ADVANCE"],"x-enum-varnames":["InvoiceCadenceArrear","InvoiceCadenceAdvance"],"x-speakeasy-name-override":"InvoiceCadence","uniqueKey":"subscription.line_items.items.[INDEX].invoice_cadence","typeLabel":"enum\u003cstring>"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].metadata.additionalProperties","typeLabel":"string"},"uniqueKey":"subscription.line_items.items.[INDEX].metadata","typeLabel":"object"},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize","uniqueKey":"subscription.line_items.items.[INDEX].meter.aggregation.bucket_size","typeLabel":"enum\u003cstring>"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel).","uniqueKey":"subscription.line_items.items.[INDEX].meter.aggregation.expression","typeLabel":"string"},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set.","uniqueKey":"subscription.line_items.items.[INDEX].meter.aggregation.field","typeLabel":"string"},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total.","uniqueKey":"subscription.line_items.items.[INDEX].meter.aggregation.group_by","typeLabel":"string"},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null.","uniqueKey":"subscription.line_items.items.[INDEX].meter.aggregation.multiplier","typeLabel":"string"},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType","uniqueKey":"subscription.line_items.items.[INDEX].meter.aggregation.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"subscription.line_items.items.[INDEX].meter.aggregation","typeLabel":"object"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.line_items.items.[INDEX].meter.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].meter.created_by","typeLabel":"string"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the meter","uniqueKey":"subscription.line_items.items.[INDEX].meter.environment_id","typeLabel":"string"},"event_name":{"type":"string","description":"EventName is the unique identifier for the event that this meter is tracking\nIt is a mandatory field in the events table and hence being used as the primary matching field\nWe can have multiple meters tracking the same event but with different filters and aggregation","uniqueKey":"subscription.line_items.items.[INDEX].meter.event_name","typeLabel":"string"},"filters":{"type":"array","description":"Filters define the criteria for the meter to be applied on the events before aggregation\nIt also defines the possible values on which later the charges will be applied","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys","uniqueKey":"subscription.line_items.items.[INDEX].meter.filters.items.[INDEX].key","typeLabel":"string"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].meter.filters.items.[INDEX].values.items.[INDEX]","typeLabel":"string"},"uniqueKey":"subscription.line_items.items.[INDEX].meter.filters.items.[INDEX].values","typeLabel":"string[]"}},"uniqueKey":"subscription.line_items.items.[INDEX].meter.filters.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.line_items.items.[INDEX].meter.filters","typeLabel":"object[]"},"id":{"type":"string","description":"ID is the unique identifier for the meter","uniqueKey":"subscription.line_items.items.[INDEX].meter.id","typeLabel":"string"},"name":{"type":"string","description":"Name is the display name of the meter","uniqueKey":"subscription.line_items.items.[INDEX].meter.name","typeLabel":"string"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage","uniqueKey":"subscription.line_items.items.[INDEX].meter.reset_usage","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.line_items.items.[INDEX].meter.status","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].meter.tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.line_items.items.[INDEX].meter.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].meter.updated_by","typeLabel":"string"}},"uniqueKey":"subscription.line_items.items.[INDEX].meter","typeLabel":"object"},"meter_display_name":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].meter_display_name","typeLabel":"string"},"meter_id":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].meter_id","typeLabel":"string"},"plan_display_name":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].plan_display_name","typeLabel":"string"},"price":{"type":"object","properties":{"amount":{"type":"string","description":"Amount stored in main currency units (e.g., dollars, not cents)\nFor USD: 12.50 means $12.50","uniqueKey":"subscription.line_items.items.[INDEX].price.amount","typeLabel":"string"},"billing_cadence":{"type":"string","enum":["RECURRING"],"x-enum-varnames":["BILLING_CADENCE_RECURRING"],"x-speakeasy-name-override":"BillingCadence","uniqueKey":"subscription.line_items.items.[INDEX].price.billing_cadence","typeLabel":"enum\u003cstring>"},"billing_model":{"type":"string","enum":["FLAT_FEE","PACKAGE","TIERED"],"x-enum-varnames":["BILLING_MODEL_FLAT_FEE","BILLING_MODEL_PACKAGE","BILLING_MODEL_TIERED"],"x-speakeasy-name-override":"BillingModel","uniqueKey":"subscription.line_items.items.[INDEX].price.billing_model","typeLabel":"enum\u003cstring>"},"billing_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod","uniqueKey":"subscription.line_items.items.[INDEX].price.billing_period","typeLabel":"enum\u003cstring>"},"billing_period_count":{"type":"integer","description":"BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12","uniqueKey":"subscription.line_items.items.[INDEX].price.billing_period_count","typeLabel":"integer"},"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize","uniqueKey":"subscription.line_items.items.[INDEX].price.bucket_size","typeLabel":"enum\u003cstring>"},"conversion_rate":{"type":"string","description":"ConversionRate is the conversion rate of the price unit to the fiat currency","uniqueKey":"subscription.line_items.items.[INDEX].price.conversion_rate","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.line_items.items.[INDEX].price.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].price.created_by","typeLabel":"string"},"currency":{"type":"string","description":"Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp","uniqueKey":"subscription.line_items.items.[INDEX].price.currency","typeLabel":"string"},"description":{"type":"string","description":"Description of the price","uniqueKey":"subscription.line_items.items.[INDEX].price.description","typeLabel":"string"},"display_amount":{"type":"string","description":"DisplayAmount is the formatted amount with currency symbol\nFor USD: $12.50","uniqueKey":"subscription.line_items.items.[INDEX].price.display_amount","typeLabel":"string"},"display_name":{"type":"string","description":"DisplayName is the name of the price","uniqueKey":"subscription.line_items.items.[INDEX].price.display_name","typeLabel":"string"},"display_price_unit_amount":{"type":"string","description":"DisplayPriceUnitAmount is the formatted amount of the price unit","uniqueKey":"subscription.line_items.items.[INDEX].price.display_price_unit_amount","typeLabel":"string"},"end_date":{"type":"string","description":"EndDate is the end date of the price","format":"date-time","uniqueKey":"subscription.line_items.items.[INDEX].price.end_date","typeLabel":"string\u003cdate-time>"},"entity_id":{"type":"string","description":"EntityID holds the value of the \"entity_id\" field.","uniqueKey":"subscription.line_items.items.[INDEX].price.entity_id","typeLabel":"string"},"entity_type":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON","PRICE","COSTSHEET"],"x-enum-varnames":["PRICE_ENTITY_TYPE_PLAN","PRICE_ENTITY_TYPE_SUBSCRIPTION","PRICE_ENTITY_TYPE_ADDON","PRICE_ENTITY_TYPE_PRICE","PRICE_ENTITY_TYPE_COSTSHEET"],"x-speakeasy-name-override":"PriceEntityType","uniqueKey":"subscription.line_items.items.[INDEX].price.entity_type","typeLabel":"enum\u003cstring>"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the price","uniqueKey":"subscription.line_items.items.[INDEX].price.environment_id","typeLabel":"string"},"group_id":{"type":"string","description":"GroupID references the group this price belongs to","uniqueKey":"subscription.line_items.items.[INDEX].price.group_id","typeLabel":"string"},"id":{"type":"string","description":"ID uuid identifier for the price","uniqueKey":"subscription.line_items.items.[INDEX].price.id","typeLabel":"string"},"invoice_cadence":{"type":"string","enum":["ARREAR","ADVANCE"],"x-enum-varnames":["InvoiceCadenceArrear","InvoiceCadenceAdvance"],"x-speakeasy-name-override":"InvoiceCadence","uniqueKey":"subscription.line_items.items.[INDEX].price.invoice_cadence","typeLabel":"enum\u003cstring>"},"lookup_key":{"type":"string","description":"LookupKey used for looking up the price in the database","uniqueKey":"subscription.line_items.items.[INDEX].price.lookup_key","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].price.metadata.additionalProperties","typeLabel":"string"},"uniqueKey":"subscription.line_items.items.[INDEX].price.metadata","typeLabel":"object"},"meter_id":{"type":"string","description":"MeterID is the id of the meter for usage based pricing","uniqueKey":"subscription.line_items.items.[INDEX].price.meter_id","typeLabel":"string"},"min_quantity":{"oneOf":[{"type":"string","description":"MinQuantity is the minimum quantity of the price","uniqueKey":"subscription.line_items.items.[INDEX].price.min_quantity.oneOf.0","typeLabel":"string"},{"type":"null","description":"MinQuantity is the minimum quantity of the price","uniqueKey":"subscription.line_items.items.[INDEX].price.min_quantity.oneOf.1","typeLabel":"null"}],"uniqueKey":"subscription.line_items.items.[INDEX].price.min_quantity","typeLabel":"string | null"},"parent_price_id":{"type":"string","description":"ParentPriceID references the root price (always set for price lineage tracking)","uniqueKey":"subscription.line_items.items.[INDEX].price.parent_price_id","typeLabel":"string"},"price_unit":{"type":"string","description":"PriceUnit is the code of the price unit (e.g., 'btc', 'eth')","uniqueKey":"subscription.line_items.items.[INDEX].price.price_unit","typeLabel":"string"},"price_unit_amount":{"type":"string","description":"PriceUnitAmount is the amount of the price unit","uniqueKey":"subscription.line_items.items.[INDEX].price.price_unit_amount","typeLabel":"string"},"price_unit_id":{"type":"string","description":"PriceUnitID is the id of the price unit (for CUSTOM type)","uniqueKey":"subscription.line_items.items.[INDEX].price.price_unit_id","typeLabel":"string"},"price_unit_tiers":{"type":"array","description":"PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED","items":{"type":"object","properties":{"flat_amount":{"type":"string","description":"flat_amount is the flat amount for the given tier (optional)\nApplied on top of unit_amount*quantity. Useful for cases like \"2.7$ + 5c\"","uniqueKey":"subscription.line_items.items.[INDEX].price.price_unit_tiers.items.[INDEX].flat_amount","typeLabel":"string"},"unit_amount":{"type":"string","description":"unit_amount is the amount per unit for the given tier","uniqueKey":"subscription.line_items.items.[INDEX].price.price_unit_tiers.items.[INDEX].unit_amount","typeLabel":"string"},"up_to":{"type":"integer","description":"up_to is the quantity up to which this tier applies. It is null for the last tier.\nIMPORTANT: Tier boundaries are INCLUSIVE.\n- If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier\n- This behavior is consistent across both VOLUME and SLAB tier modes","uniqueKey":"subscription.line_items.items.[INDEX].price.price_unit_tiers.items.[INDEX].up_to","typeLabel":"integer"}},"uniqueKey":"subscription.line_items.items.[INDEX].price.price_unit_tiers.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.line_items.items.[INDEX].price.price_unit_tiers","typeLabel":"object[]"},"price_unit_type":{"type":"string","enum":["FIAT","CUSTOM"],"x-enum-varnames":["PRICE_UNIT_TYPE_FIAT","PRICE_UNIT_TYPE_CUSTOM"],"x-speakeasy-name-override":"PriceUnitType","uniqueKey":"subscription.line_items.items.[INDEX].price.price_unit_type","typeLabel":"enum\u003cstring>"},"sequence":{"type":"integer","description":"Sequence is the monotonic stamp bumped on every state change that\nsubscription line items need to react to. Read by the plan-price sync;\nset by the database (DEFAULT nextval) on create and by the price\nrepository on termination / compatibility-affecting edits.","uniqueKey":"subscription.line_items.items.[INDEX].price.sequence","typeLabel":"integer"},"start_date":{"type":"string","description":"StartDate is the start date of the price","format":"date-time","uniqueKey":"subscription.line_items.items.[INDEX].price.start_date","typeLabel":"string\u003cdate-time>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.line_items.items.[INDEX].price.status","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].price.tenant_id","typeLabel":"string"},"tier_mode":{"type":"string","enum":["VOLUME","SLAB"],"x-enum-varnames":["BILLING_TIER_VOLUME","BILLING_TIER_SLAB"],"x-speakeasy-name-override":"BillingTier","uniqueKey":"subscription.line_items.items.[INDEX].price.tier_mode","typeLabel":"enum\u003cstring>"},"tiers":{"type":"array","items":{"type":"object","properties":{"flat_amount":{"type":"string","description":"flat_amount is the flat amount for the given tier (optional)\nApplied on top of unit_amount*quantity. Useful for cases like \"2.7$ + 5c\"","uniqueKey":"subscription.line_items.items.[INDEX].price.tiers.items.[INDEX].flat_amount","typeLabel":"string"},"unit_amount":{"type":"string","description":"unit_amount is the amount per unit for the given tier","uniqueKey":"subscription.line_items.items.[INDEX].price.tiers.items.[INDEX].unit_amount","typeLabel":"string"},"up_to":{"type":"integer","description":"up_to is the quantity up to which this tier applies. It is null for the last tier.\nIMPORTANT: Tier boundaries are INCLUSIVE.\n- If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier\n- This behavior is consistent across both VOLUME and SLAB tier modes","uniqueKey":"subscription.line_items.items.[INDEX].price.tiers.items.[INDEX].up_to","typeLabel":"integer"}},"uniqueKey":"subscription.line_items.items.[INDEX].price.tiers.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.line_items.items.[INDEX].price.tiers","typeLabel":"object[]"},"transform_quantity":{"type":"object","properties":{"divide_by":{"type":"integer","description":"Divide quantity by this number","uniqueKey":"subscription.line_items.items.[INDEX].price.transform_quantity.divide_by","typeLabel":"integer"},"round":{"type":"string","enum":["up","down"],"x-enum-varnames":["ROUND_UP","ROUND_DOWN"],"x-speakeasy-name-override":"RoundType","uniqueKey":"subscription.line_items.items.[INDEX].price.transform_quantity.round","typeLabel":"enum\u003cstring>"}},"uniqueKey":"subscription.line_items.items.[INDEX].price.transform_quantity","typeLabel":"object"},"trial_period_days":{"type":"integer","description":"TrialPeriodDays is the number of days for the trial period\nNote: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)","uniqueKey":"subscription.line_items.items.[INDEX].price.trial_period_days","typeLabel":"integer"},"type":{"type":"string","enum":["USAGE","FIXED"],"x-enum-varnames":["PRICE_TYPE_USAGE","PRICE_TYPE_FIXED"],"x-speakeasy-name-override":"PriceType","uniqueKey":"subscription.line_items.items.[INDEX].price.type","typeLabel":"enum\u003cstring>"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.line_items.items.[INDEX].price.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].price.updated_by","typeLabel":"string"}},"uniqueKey":"subscription.line_items.items.[INDEX].price","typeLabel":"object"},"price_id":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].price_id","typeLabel":"string"},"price_type":{"type":"string","enum":["USAGE","FIXED"],"x-enum-varnames":["PRICE_TYPE_USAGE","PRICE_TYPE_FIXED"],"x-speakeasy-name-override":"PriceType","uniqueKey":"subscription.line_items.items.[INDEX].price_type","typeLabel":"enum\u003cstring>"},"price_unit":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].price_unit","typeLabel":"string"},"price_unit_id":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].price_unit_id","typeLabel":"string"},"quantity":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].quantity","typeLabel":"string"},"start_date":{"type":"string","format":"date-time","uniqueKey":"subscription.line_items.items.[INDEX].start_date","typeLabel":"string\u003cdate-time>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.line_items.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"subscription_id":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].subscription_id","typeLabel":"string"},"subscription_phase_id":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].subscription_phase_id","typeLabel":"string"},"tenant_id":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.line_items.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.line_items.items.[INDEX].updated_by","typeLabel":"string"}},"uniqueKey":"subscription.line_items.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.line_items","typeLabel":"object[]"},"lookup_key":{"type":"string","description":"LookupKey is the key used to lookup the subscription in our system","uniqueKey":"subscription.lookup_key","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"subscription.metadata","typeLabel":"object"},"overage_factor":{"type":"string","description":"OverageFactor is a multiplier applied to usage beyond the commitment amount","uniqueKey":"subscription.overage_factor","typeLabel":"string"},"parent_subscription_id":{"type":"string","description":"ParentSubscriptionID is the parent subscription ID for hierarchy (e.g. child subscription under a parent)","uniqueKey":"subscription.parent_subscription_id","typeLabel":"string"},"pause_status":{"type":"string","enum":["none","active","scheduled","completed","cancelled"],"x-enum-varnames":["PauseStatusNone","PauseStatusActive","PauseStatusScheduled","PauseStatusCompleted","PauseStatusCancelled"],"x-speakeasy-name-override":"PauseStatus","uniqueKey":"subscription.pause_status","typeLabel":"enum\u003cstring>"},"pauses":{"type":"array","items":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.pauses.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.pauses.items.[INDEX].created_by","typeLabel":"string"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the pause","uniqueKey":"subscription.pauses.items.[INDEX].environment_id","typeLabel":"string"},"id":{"type":"string","description":"ID is the unique identifier for the subscription pause","uniqueKey":"subscription.pauses.items.[INDEX].id","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.pauses.items.[INDEX].metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"subscription.pauses.items.[INDEX].metadata","typeLabel":"object"},"original_period_end":{"type":"string","description":"OriginalPeriodEnd is the end of the billing period when the pause was created","format":"date-time","uniqueKey":"subscription.pauses.items.[INDEX].original_period_end","typeLabel":"string\u003cdate-time>"},"original_period_start":{"type":"string","description":"OriginalPeriodStart is the start of the billing period when the pause was created","format":"date-time","uniqueKey":"subscription.pauses.items.[INDEX].original_period_start","typeLabel":"string\u003cdate-time>"},"pause_end":{"type":"string","description":"PauseEnd is when the pause will end (null for indefinite)","format":"date-time","uniqueKey":"subscription.pauses.items.[INDEX].pause_end","typeLabel":"string\u003cdate-time>"},"pause_mode":{"type":"string","enum":["immediate","scheduled","period_end"],"x-enum-varnames":["PauseModeImmediate","PauseModeScheduled","PauseModePeriodEnd"],"x-speakeasy-name-override":"PauseMode","uniqueKey":"subscription.pauses.items.[INDEX].pause_mode","typeLabel":"enum\u003cstring>"},"pause_start":{"type":"string","description":"PauseStart is when the pause actually started","format":"date-time","uniqueKey":"subscription.pauses.items.[INDEX].pause_start","typeLabel":"string\u003cdate-time>"},"pause_status":{"type":"string","enum":["none","active","scheduled","completed","cancelled"],"x-enum-varnames":["PauseStatusNone","PauseStatusActive","PauseStatusScheduled","PauseStatusCompleted","PauseStatusCancelled"],"x-speakeasy-name-override":"PauseStatus","uniqueKey":"subscription.pauses.items.[INDEX].pause_status","typeLabel":"enum\u003cstring>"},"reason":{"type":"string","description":"Reason is the reason for pausing","uniqueKey":"subscription.pauses.items.[INDEX].reason","typeLabel":"string"},"resume_mode":{"type":"string","enum":["immediate","scheduled","auto"],"x-enum-varnames":["ResumeModeImmediate","ResumeModeScheduled","ResumeModeAuto"],"x-speakeasy-name-override":"ResumeMode","uniqueKey":"subscription.pauses.items.[INDEX].resume_mode","typeLabel":"enum\u003cstring>"},"resumed_at":{"type":"string","description":"ResumedAt is when the pause was actually ended (if manually resumed)","format":"date-time","uniqueKey":"subscription.pauses.items.[INDEX].resumed_at","typeLabel":"string\u003cdate-time>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.pauses.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"subscription_id":{"type":"string","description":"SubscriptionID is the identifier for the subscription","uniqueKey":"subscription.pauses.items.[INDEX].subscription_id","typeLabel":"string"},"tenant_id":{"type":"string","uniqueKey":"subscription.pauses.items.[INDEX].tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.pauses.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.pauses.items.[INDEX].updated_by","typeLabel":"string"}},"uniqueKey":"subscription.pauses.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.pauses","typeLabel":"object[]"},"payment_behavior":{"type":"string","description":"PaymentBehavior determines how subscription payments are handled","uniqueKey":"subscription.payment_behavior","typeLabel":"string"},"payment_terms":{"type":"string","enum":["15 NET","30 NET","45 NET","60 NET","75 NET","90 NET","END_OF_MONTH","END_OF_NEXT_MONTH"],"x-enum-varnames":["PaymentTerms15Net","PaymentTerms30Net","PaymentTerms45Net","PaymentTerms60Net","PaymentTerms75Net","PaymentTerms90Net","PaymentTermsEndOfMonth","PaymentTermsEndOfNextMonth"],"x-speakeasy-name-override":"PaymentTerms","uniqueKey":"subscription.payment_terms","typeLabel":"enum\u003cstring>"},"phases":{"type":"array","description":"Phases are the subscription phases for this subscription","items":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.phases.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.phases.items.[INDEX].created_by","typeLabel":"string"},"end_date":{"type":"string","description":"EndDate is when the phase ends (nil if phase is still active or indefinite)","format":"date-time","uniqueKey":"subscription.phases.items.[INDEX].end_date","typeLabel":"string\u003cdate-time>"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the phase","uniqueKey":"subscription.phases.items.[INDEX].environment_id","typeLabel":"string"},"id":{"type":"string","description":"ID is the unique identifier for the subscription phase","uniqueKey":"subscription.phases.items.[INDEX].id","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.phases.items.[INDEX].metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"subscription.phases.items.[INDEX].metadata","typeLabel":"object"},"start_date":{"type":"string","description":"StartDate is when the phase starts","format":"date-time","uniqueKey":"subscription.phases.items.[INDEX].start_date","typeLabel":"string\u003cdate-time>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.phases.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"subscription_id":{"type":"string","description":"SubscriptionID is the identifier for the subscription","uniqueKey":"subscription.phases.items.[INDEX].subscription_id","typeLabel":"string"},"tenant_id":{"type":"string","uniqueKey":"subscription.phases.items.[INDEX].tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.phases.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.phases.items.[INDEX].updated_by","typeLabel":"string"}},"uniqueKey":"subscription.phases.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.phases","typeLabel":"object[]"},"plan":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.plan.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.plan.created_by","typeLabel":"string"},"credit_grants":{"type":"array","items":{"type":"object","properties":{"addon_id":{"type":"string","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].addon_id","typeLabel":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].cadence","typeLabel":"enum\u003cstring>"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].conversion_rate","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].created_by","typeLabel":"string"},"credit_grant_anchor":{"type":"string","format":"date-time","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].credit_grant_anchor","typeLabel":"string\u003cdate-time>"},"credits":{"type":"string","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].credits","typeLabel":"string"},"end_date":{"type":"string","format":"date-time","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].end_date","typeLabel":"string\u003cdate-time>"},"environment_id":{"type":"string","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].environment_id","typeLabel":"string"},"expiration_duration":{"type":"integer","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].expiration_duration","typeLabel":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].expiration_duration_unit","typeLabel":"enum\u003cstring>"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].expiration_type","typeLabel":"enum\u003cstring>"},"id":{"type":"string","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].id","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].metadata","typeLabel":"object"},"name":{"type":"string","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].name","typeLabel":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].period","typeLabel":"enum\u003cstring>"},"period_count":{"type":"integer","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].period_count","typeLabel":"integer"},"plan_id":{"type":"string","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].plan_id","typeLabel":"string"},"priority":{"type":"integer","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].priority","typeLabel":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].scope","typeLabel":"enum\u003cstring>"},"start_date":{"type":"string","format":"date-time","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].start_date","typeLabel":"string\u003cdate-time>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"subscription_id":{"type":"string","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].subscription_id","typeLabel":"string"},"tenant_id":{"type":"string","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].tenant_id","typeLabel":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].topup_conversion_rate","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.plan.credit_grants.items.[INDEX].updated_by","typeLabel":"string"}},"uniqueKey":"subscription.plan.credit_grants.items.[INDEX]","typeLabel":"object"},"uniqueKey":"subscription.plan.credit_grants","typeLabel":"object[]"},"description":{"type":"string","uniqueKey":"subscription.plan.description","typeLabel":"string"},"display_order":{"type":"integer","uniqueKey":"subscription.plan.display_order","typeLabel":"integer"},"entitlements":{"type":"array","items":{"$circularRef":"1c99a94f-ba2d-4aeb-aec5-928f5daeddec"},"uniqueKey":"subscription.plan.entitlements","typeLabel":"array"},"environment_id":{"type":"string","uniqueKey":"subscription.plan.environment_id","typeLabel":"string"},"id":{"type":"string","uniqueKey":"subscription.plan.id","typeLabel":"string"},"lookup_key":{"type":"string","uniqueKey":"subscription.plan.lookup_key","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"subscription.plan.metadata.additionalProperties","typeLabel":"string"},"x-speakeasy-name-override":"Metadata","uniqueKey":"subscription.plan.metadata","typeLabel":"object"},"name":{"type":"string","uniqueKey":"subscription.plan.name","typeLabel":"string"},"price_sync_status":{"type":"object","properties":{"current_sequence":{"type":"integer","uniqueKey":"subscription.plan.price_sync_status.current_sequence","typeLabel":"integer"},"synced":{"type":"boolean","uniqueKey":"subscription.plan.price_sync_status.synced","typeLabel":"boolean"},"unsynced_subscription_count":{"type":"integer","uniqueKey":"subscription.plan.price_sync_status.unsynced_subscription_count","typeLabel":"integer"}},"uniqueKey":"subscription.plan.price_sync_status","typeLabel":"object"},"prices":{"type":"array","description":"TODO: Add inline addons","items":{"$circularRef":"0dc125d7-6bd8-40a5-8d18-2c0190dcf082"},"uniqueKey":"subscription.plan.prices","typeLabel":"array"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.plan.status","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"subscription.plan.tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.plan.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.plan.updated_by","typeLabel":"string"}},"uniqueKey":"subscription.plan","typeLabel":"object"},"plan_id":{"type":"string","description":"PlanID is the identifier for the plan in our system","uniqueKey":"subscription.plan_id","typeLabel":"string"},"proration_behavior":{"type":"string","enum":["create_prorations","none"],"x-enum-comments":{"ProrationBehaviorCreateProrations":"Default: Create credits/charges on invoice","ProrationBehaviorNone":"Calculate but don't apply (e.g., for previews)"},"x-enum-varnames":["ProrationBehaviorCreateProrations","ProrationBehaviorNone"],"x-speakeasy-name-override":"ProrationBehavior","uniqueKey":"subscription.proration_behavior","typeLabel":"enum\u003cstring>"},"start_date":{"type":"string","description":"StartDate is the start date of the subscription","format":"date-time","uniqueKey":"subscription.start_date","typeLabel":"string\u003cdate-time>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"subscription.status","typeLabel":"enum\u003cstring>"},"subscription_status":{"type":"string","enum":["active","paused","cancelled","incomplete","trialing","draft"],"x-enum-varnames":["SubscriptionStatusActive","SubscriptionStatusPaused","SubscriptionStatusCancelled","SubscriptionStatusIncomplete","SubscriptionStatusTrialing","SubscriptionStatusDraft"],"x-speakeasy-name-override":"SubscriptionStatus","uniqueKey":"subscription.subscription_status","typeLabel":"enum\u003cstring>"},"subscription_type":{"type":"string","enum":["standalone","delegated_invoicing","parent","inherited","grouped_invoicing"],"x-enum-varnames":["SubscriptionTypeStandalone","SubscriptionTypeDelegatedInvoicing","SubscriptionTypeParent","SubscriptionTypeInherited","SubscriptionTypeGroupedInvoicing"],"x-speakeasy-name-override":"SubscriptionType","uniqueKey":"subscription.subscription_type","typeLabel":"enum\u003cstring>"},"synced_price_sequence":{"type":"integer","description":"SyncedPriceSequence is the plan-price sequence up to which this\nsubscription's line items have been reconciled. Bumped by the\nplan-price sync after a successful pass.","uniqueKey":"subscription.synced_price_sequence","typeLabel":"integer"},"tenant_id":{"type":"string","uniqueKey":"subscription.tenant_id","typeLabel":"string"},"timezone":{"type":"string","uniqueKey":"subscription.timezone","typeLabel":"string"},"trial_end":{"type":"string","description":"TrialEnd is the end date of the trial period","format":"date-time","uniqueKey":"subscription.trial_end","typeLabel":"string\u003cdate-time>"},"trial_start":{"type":"string","description":"TrialStart is the start date of the trial period","format":"date-time","uniqueKey":"subscription.trial_start","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"subscription.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"subscription.updated_by","typeLabel":"string"},"version":{"type":"integer","description":"Version is used for optimistic locking","uniqueKey":"subscription.version","typeLabel":"integer"}},"uniqueKey":"subscription","typeLabel":"object"},"subscription_customer_id":{"type":"string","description":"subscription_customer_id is the subscription owner's customer ID (Subscription.CustomerID).\nIt may differ from customer_id when the subscription uses an invoicing customer. Set internally; nullable in DB.","uniqueKey":"subscription_customer_id","typeLabel":"string"},"subscription_id":{"type":"string","description":"subscription_id is the ID of the subscription this invoice is associated with (only present for subscription-based invoices)","uniqueKey":"subscription_id","typeLabel":"string"},"subtotal":{"type":"string","description":"subtotal is the sum of all line items before any taxes, discounts, or additional fees","uniqueKey":"subtotal","typeLabel":"string"},"tax_exemption_reason_code":{"type":"string","enum":["customer_exempt","no_tax_configured","reverse_charge","not_collecting","not_subject_to_tax","not_supported"],"x-enum-varnames":["TaxExemptionReasonCustomerExempt","TaxExemptionReasonNoTaxConfigured","TaxExemptionReasonReverseCharge","TaxExemptionReasonNotCollecting","TaxExemptionReasonNotSubjectToTax","TaxExemptionReasonNotSupported"],"x-speakeasy-name-override":"TaxExemptionReasonCode","uniqueKey":"tax_exemption_reason_code","typeLabel":"enum\u003cstring>"},"tax_summary":{"type":"object","properties":{"exclusive_tax":{"type":"string","uniqueKey":"tax_summary.exclusive_tax","typeLabel":"string"},"exemption":{"type":"object","properties":{"reason":{"type":"string","uniqueKey":"tax_summary.exemption.reason","typeLabel":"string"},"reason_code":{"type":"string","enum":["customer_exempt","no_tax_configured","reverse_charge","not_collecting","not_subject_to_tax","not_supported"],"x-enum-varnames":["TaxExemptionReasonCustomerExempt","TaxExemptionReasonNoTaxConfigured","TaxExemptionReasonReverseCharge","TaxExemptionReasonNotCollecting","TaxExemptionReasonNotSubjectToTax","TaxExemptionReasonNotSupported"],"x-speakeasy-name-override":"TaxExemptionReasonCode","uniqueKey":"tax_summary.exemption.reason_code","typeLabel":"enum\u003cstring>"}},"uniqueKey":"tax_summary.exemption","typeLabel":"object"},"inclusive_tax":{"type":"string","uniqueKey":"tax_summary.inclusive_tax","typeLabel":"string"},"total_tax":{"type":"string","uniqueKey":"tax_summary.total_tax","typeLabel":"string"}},"uniqueKey":"tax_summary","typeLabel":"object"},"taxes":{"type":"array","description":"tax_applied_records contains the tax applied records associated with this invoice","items":{"type":"object","properties":{"applied_at":{"type":"string","format":"date-time","uniqueKey":"taxes.items.[INDEX].applied_at","typeLabel":"string\u003cdate-time>"},"created_at":{"type":"string","format":"date-time","uniqueKey":"taxes.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"taxes.items.[INDEX].created_by","typeLabel":"string"},"currency":{"type":"string","uniqueKey":"taxes.items.[INDEX].currency","typeLabel":"string"},"entity_id":{"type":"string","uniqueKey":"taxes.items.[INDEX].entity_id","typeLabel":"string"},"entity_type":{"type":"string","enum":["customer","subscription","invoice","tenant","credit_note"],"x-enum-varnames":["TaxRateEntityTypeCustomer","TaxRateEntityTypeSubscription","TaxRateEntityTypeInvoice","TaxRateEntityTypeTenant","TaxRateEntityTypeCreditNote"],"x-speakeasy-name-override":"TaxRateEntityType","uniqueKey":"taxes.items.[INDEX].entity_type","typeLabel":"enum\u003cstring>"},"environment_id":{"type":"string","uniqueKey":"taxes.items.[INDEX].environment_id","typeLabel":"string"},"external_tax_details":{"type":"object","properties":{"calculation_expires_at":{"type":"string","description":"CalculationExpiresAt is when the calculation can no longer be filed, RFC3339.","format":"date-time","uniqueKey":"taxes.items.[INDEX].external_tax_details.calculation_expires_at","typeLabel":"string\u003cdate-time>"},"calculation_id":{"type":"string","description":"CalculationID is the provider calculation this row was written from. Commit files it.","uniqueKey":"taxes.items.[INDEX].external_tax_details.calculation_id","typeLabel":"string"},"display_name":{"type":"string","description":"DisplayName is the engine's own name for the tax, such as\n\"Integrated goods and services tax (IGST)\".","uniqueKey":"taxes.items.[INDEX].external_tax_details.display_name","typeLabel":"string"},"jurisdiction":{"type":"object","properties":{"country":{"type":"string","uniqueKey":"taxes.items.[INDEX].external_tax_details.jurisdiction.country","typeLabel":"string"},"display_name":{"type":"string","uniqueKey":"taxes.items.[INDEX].external_tax_details.jurisdiction.display_name","typeLabel":"string"},"level":{"type":"string","uniqueKey":"taxes.items.[INDEX].external_tax_details.jurisdiction.level","typeLabel":"string"},"state":{"type":"string","uniqueKey":"taxes.items.[INDEX].external_tax_details.jurisdiction.state","typeLabel":"string"}},"x-speakeasy-name-override":"TaxJurisdiction","uniqueKey":"taxes.items.[INDEX].external_tax_details.jurisdiction","typeLabel":"object"},"percentage":{"type":"string","description":"Percentage is the resolved rate, such as \"18.0\". This is what was charged, not the\nrate that would apply if the tax were imposed.","uniqueKey":"taxes.items.[INDEX].external_tax_details.percentage","typeLabel":"string"},"reference":{"type":"string","description":"Reference is what this row's provider transaction was filed under. It is unique across\nevery transaction on the account, so it is also the only way back to a transaction whose\nid failed to land here.","uniqueKey":"taxes.items.[INDEX].external_tax_details.reference","typeLabel":"string"},"reversal":{"type":"object","properties":{"mode":{"type":"string","enum":["full","partial"],"x-enum-varnames":["TaxReversalModeFull","TaxReversalModePartial"],"x-speakeasy-name-override":"TaxReversalMode","uniqueKey":"taxes.items.[INDEX].external_tax_details.reversal.mode","typeLabel":"enum\u003cstring>"},"original_transaction":{"type":"string","uniqueKey":"taxes.items.[INDEX].external_tax_details.reversal.original_transaction","typeLabel":"string"}},"x-speakeasy-name-override":"TaxReversal","uniqueKey":"taxes.items.[INDEX].external_tax_details.reversal","typeLabel":"object"},"sourcing":{"type":"string","description":"Sourcing is whether the jurisdiction followed the seller's address or the buyer's.","uniqueKey":"taxes.items.[INDEX].external_tax_details.sourcing","typeLabel":"string"},"tax_code":{"type":"string","description":"TaxCode is the product tax category the engine priced against, such as txcd_10000000.\nIt belongs to the line rather than the rate, so today every row on an invoice carries\nthe account default. It only varies once tax is calculated per line item.","uniqueKey":"taxes.items.[INDEX].external_tax_details.tax_code","typeLabel":"string"},"tax_type":{"type":"string","description":"TaxType is the tax family, such as vat, igst or sales_tax.","uniqueKey":"taxes.items.[INDEX].external_tax_details.tax_type","typeLabel":"string"},"taxability_reason":{"type":"string","description":"TaxabilityReason is why the engine charged what it did, such as standard_rated or\nreverse_charge. Recorded, not yet rendered.","uniqueKey":"taxes.items.[INDEX].external_tax_details.taxability_reason","typeLabel":"string"}},"x-speakeasy-name-override":"ExternalTaxDetails","uniqueKey":"taxes.items.[INDEX].external_tax_details","typeLabel":"object"},"id":{"type":"string","uniqueKey":"taxes.items.[INDEX].id","typeLabel":"string"},"idempotency_key":{"type":"string","uniqueKey":"taxes.items.[INDEX].idempotency_key","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"taxes.items.[INDEX].metadata.additionalProperties","typeLabel":"string"},"uniqueKey":"taxes.items.[INDEX].metadata","typeLabel":"object"},"provider":{"type":"string","enum":["flexprice","stripe"],"x-enum-varnames":["TaxProviderFlexprice","TaxProviderStripe"],"x-speakeasy-name-override":"TaxProvider","uniqueKey":"taxes.items.[INDEX].provider","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"taxes.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"tax_amount":{"type":"string","uniqueKey":"taxes.items.[INDEX].tax_amount","typeLabel":"string"},"tax_association_id":{"type":"string","uniqueKey":"taxes.items.[INDEX].tax_association_id","typeLabel":"string"},"tax_behavior":{"type":"string","enum":["inclusive","exclusive"],"x-enum-varnames":["TaxBehaviorInclusive","TaxBehaviorExclusive"],"x-speakeasy-name-override":"TaxBehavior","uniqueKey":"taxes.items.[INDEX].tax_behavior","typeLabel":"enum\u003cstring>"},"tax_rate":{"type":"object","properties":{"code":{"type":"string","uniqueKey":"taxes.items.[INDEX].tax_rate.code","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","uniqueKey":"taxes.items.[INDEX].tax_rate.created_at","typeLabel":"string\u003cdate-time>"},"created_by":{"type":"string","uniqueKey":"taxes.items.[INDEX].tax_rate.created_by","typeLabel":"string"},"description":{"type":"string","uniqueKey":"taxes.items.[INDEX].tax_rate.description","typeLabel":"string"},"environment_id":{"type":"string","uniqueKey":"taxes.items.[INDEX].tax_rate.environment_id","typeLabel":"string"},"id":{"type":"string","uniqueKey":"taxes.items.[INDEX].tax_rate.id","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"taxes.items.[INDEX].tax_rate.metadata.additionalProperties","typeLabel":"string"},"uniqueKey":"taxes.items.[INDEX].tax_rate.metadata","typeLabel":"object"},"name":{"type":"string","uniqueKey":"taxes.items.[INDEX].tax_rate.name","typeLabel":"string"},"percentage_value":{"type":"string","uniqueKey":"taxes.items.[INDEX].tax_rate.percentage_value","typeLabel":"string"},"scope":{"type":"string","enum":["INTERNAL","EXTERNAL","ONETIME"],"x-enum-varnames":["TaxRateScopeInternal","TaxRateScopeExternal","TaxRateScopeOneTime"],"x-speakeasy-name-override":"TaxRateScope","uniqueKey":"taxes.items.[INDEX].tax_rate.scope","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status","uniqueKey":"taxes.items.[INDEX].tax_rate.status","typeLabel":"enum\u003cstring>"},"tax_rate_status":{"type":"string","enum":["ACTIVE","INACTIVE"],"x-enum-varnames":["TaxRateStatusActive","TaxRateStatusInactive"],"x-speakeasy-name-override":"TaxRateStatus","uniqueKey":"taxes.items.[INDEX].tax_rate.tax_rate_status","typeLabel":"enum\u003cstring>"},"tax_rate_type":{"type":"string","enum":["percentage"],"x-enum-varnames":["TaxRateTypePercentage"],"x-speakeasy-name-override":"TaxRateType","uniqueKey":"taxes.items.[INDEX].tax_rate.tax_rate_type","typeLabel":"enum\u003cstring>"},"tenant_id":{"type":"string","uniqueKey":"taxes.items.[INDEX].tax_rate.tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"taxes.items.[INDEX].tax_rate.updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"taxes.items.[INDEX].tax_rate.updated_by","typeLabel":"string"}},"uniqueKey":"taxes.items.[INDEX].tax_rate","typeLabel":"object"},"tax_rate_id":{"type":"string","description":"Null when an external engine calculated the tax: there is no Flexprice rate to point at.","uniqueKey":"taxes.items.[INDEX].tax_rate_id","typeLabel":"string"},"tax_transaction_id":{"type":"string","description":"TaxTransactionID is the provider transaction recording the filed tax, stamped at commit.","uniqueKey":"taxes.items.[INDEX].tax_transaction_id","typeLabel":"string"},"tax_transaction_type":{"type":"string","enum":["filing","reversal"],"x-enum-varnames":["TaxTransactionTypeFiling","TaxTransactionTypeReversal"],"x-speakeasy-name-override":"TaxTransactionType","uniqueKey":"taxes.items.[INDEX].tax_transaction_type","typeLabel":"enum\u003cstring>"},"taxable_amount":{"type":"string","uniqueKey":"taxes.items.[INDEX].taxable_amount","typeLabel":"string"},"tenant_id":{"type":"string","uniqueKey":"taxes.items.[INDEX].tenant_id","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"taxes.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"taxes.items.[INDEX].updated_by","typeLabel":"string"}},"uniqueKey":"taxes.items.[INDEX]","typeLabel":"object"},"uniqueKey":"taxes","typeLabel":"object[]"},"tenant_id":{"type":"string","uniqueKey":"tenant_id","typeLabel":"string"},"total":{"type":"string","description":"total is the final amount including taxes, fees, and discounts","uniqueKey":"total","typeLabel":"string"},"total_discount":{"type":"string","description":"total_discount is the sum of all coupon discounts applied to the invoice","uniqueKey":"total_discount","typeLabel":"string"},"total_prepaid_credits_applied":{"type":"string","description":"total_prepaid_credits_applied is the total amount of prepaid credits applied to this invoice.","uniqueKey":"total_prepaid_credits_applied","typeLabel":"string"},"total_tax":{"type":"string","description":"total_tax is the sum of all taxes combined at the invoice level.","uniqueKey":"total_tax","typeLabel":"string"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"updated_at","typeLabel":"string\u003cdate-time>"},"updated_by":{"type":"string","uniqueKey":"updated_by","typeLabel":"string"},"version":{"type":"integer","description":"version is the version number for tracking changes to this invoice","uniqueKey":"version","typeLabel":"integer"},"voided_at":{"type":"string","description":"voided_at is the timestamp when this invoice was voided or cancelled","format":"date-time","uniqueKey":"voided_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"adjustment_amount":"\u003cstring>","amount_due":"\u003cstring>","amount_paid":"\u003cstring>","amount_remaining":"\u003cstring>","billing_period":"\u003cstring>","billing_reason":"\u003cstring>","billing_sequence":123,"checkout_session":{"action":"create_subscription","cancel_url":"\u003cstring>","cancelled_at":"2023-11-07T05:31:56Z","checkout_invoice_id":"\u003cstring>","checkout_payment_id":"\u003cstring>","checkout_status":"initiated","completed_at":"2023-11-07T05:31:56Z","created_at":"2023-11-07T05:31:56Z","customer_id":"\u003cstring>","entity_creation_result":{"entity_id":"\u003cstring>","status":"created"},"expires_at":"2023-11-07T05:31:56Z","failure_reason":"\u003cstring>","failure_url":"\u003cstring>","id":"\u003cstring>","idempotency_key":"\u003cstring>","metadata":{},"next_poll_after_ms":123,"payment":{"gateway":"\u003cstring>","id":"\u003cstring>","status":"INITIATED"},"payment_action":{"type":"checkout_url","url":"\u003cstring>"},"payment_provider":"razorpay","stale":true,"success_url":"\u003cstring>","terminal":true,"updated_at":"2023-11-07T05:31:56Z"},"coupon_applications":[{"applied_at":"2023-11-07T05:31:56Z","coupon_association_id":"\u003cstring>","coupon_id":"\u003cstring>","coupon_snapshot":{},"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","currency":"\u003cstring>","discount_percentage":"\u003cstring>","discount_type":"fixed","discounted_amount":"\u003cstring>","environment_id":"\u003cstring>","final_price":"\u003cstring>","id":"\u003cstring>","invoice_id":"\u003cstring>","invoice_line_item_id":"\u003cstring>","metadata":{},"original_price":"\u003cstring>","status":"published","subscription_id":"\u003cstring>","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"}],"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","currency":"\u003cstring>","custom_currency":{"amount_due":"\u003cstring>","code":"\u003cstring>","rate":"\u003cstring>","subtotal":"\u003cstring>","total":"\u003cstring>","total_discount":"\u003cstring>","total_prepaid_credits_applied":"\u003cstring>","total_tax":"\u003cstring>"},"customer":{"address_city":"\u003cstring>","address_country":"\u003cstring>","address_line1":"\u003cstring>","address_line2":"\u003cstring>","address_postal_code":"\u003cstring>","address_state":"\u003cstring>","billing_currency":"\u003cstring>","contact":"\u003cstring>","contact_persons":[{"first_name":"\u003cstring>","department":"\u003cstring>","designation":"\u003cstring>","email":"\u003cstring>","id":"\u003cstring>","is_primary":true,"last_name":"\u003cstring>","mobile":"\u003cstring>","salutation":"\u003cstring>"}],"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","email":"\u003cstring>","environment_id":"\u003cstring>","external_id":"\u003cstring>","id":"\u003cstring>","integrations":[{"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","entity_id":"\u003cstring>","entity_type":"customer","environment_id":"\u003cstring>","id":"\u003cstring>","metadata":{},"provider_entity_id":"\u003cstring>","provider_type":"\u003cstring>","status":"published","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"}],"metadata":{},"name":"\u003cstring>","status":"published","tax_treatment":"taxable","tenant_id":"\u003cstring>","timezone":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"},"customer_id":"\u003cstring>","description":"\u003cstring>","due_date":"2023-11-07T05:31:56Z","environment_id":"\u003cstring>","finalized_at":"2023-11-07T05:31:56Z","fx_conversion":{"billing_currency":"\u003cstring>","charge_currency":"\u003cstring>","converted_at":"2023-11-07T05:31:56Z","rate":"\u003cstring>","rate_id":"\u003cstring>","scope":"tenant","source":{"net":"\u003cstring>","subtotal":"\u003cstring>","total_discount":"\u003cstring>","total_prepaid_credits_applied":"\u003cstring>"}},"hosted_invoice_url":"\u003cstring>","id":"\u003cstring>","idempotency_key":"\u003cstring>","invoice_number":"\u003cstring>","invoice_pdf_url":"\u003cstring>","invoice_status":"DRAFT","invoice_type":"SUBSCRIPTION","is_manually_edited":true,"issue_date":"2023-11-07T05:31:56Z","last_computed_at":"2023-11-07T05:31:56Z","line_items":[{"adjusted_entitlement_quantity":"\u003cstring>","amount":"\u003cstring>","commitment_info":{"amount":"\u003cstring>","computed_commitment_utilized_amount":"\u003cstring>","computed_overage_amount":"\u003cstring>","computed_true_up_amount":"\u003cstring>","duration":"MONTHLY","is_windowed":true,"overage_factor":"\u003cstring>","quantity":"\u003cstring>","true_up_enabled":true,"type":"amount"},"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","currency":"\u003cstring>","custom_currency":{"amount":"\u003cstring>","invoice_level_discount":"\u003cstring>","line_item_discount":"\u003cstring>","prepaid_credits_applied":"\u003cstring>"},"customer_id":"\u003cstring>","display_name":"\u003cstring>","entity_id":"\u003cstring>","entity_type":"\u003cstring>","environment_id":"\u003cstring>","fx_conversion":{"billing_currency":"\u003cstring>","charge_currency":"\u003cstring>","converted_at":"2023-11-07T05:31:56Z","rate":"\u003cstring>","rate_id":"\u003cstring>","scope":"tenant","source":{"net":"\u003cstring>","subtotal":"\u003cstring>","total_discount":"\u003cstring>","total_prepaid_credits_applied":"\u003cstring>"}},"id":"\u003cstring>","invoice_id":"\u003cstring>","invoice_level_discount":"\u003cstring>","line_item_discount":"\u003cstring>","metadata":{},"meter_display_name":"\u003cstring>","meter_id":"\u003cstring>","parent_line_item_id":"\u003cstring>","period_end":"2023-11-07T05:31:56Z","period_start":"2023-11-07T05:31:56Z","plan_display_name":"\u003cstring>","prepaid_credits_applied":"\u003cstring>","price_id":"\u003cstring>","price_type":"\u003cstring>","price_unit":"\u003cstring>","price_unit_amount":"\u003cstring>","price_unit_id":"\u003cstring>","quantity":"\u003cstring>","status":"published","subscription_id":"\u003cstring>","subscription_line_item_id":"\u003cstring>","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>","usage_analytics":[{"cost":"\u003cstring>","event_count":123,"percentage":"\u003cstring>","source":"\u003cstring>","usage":"\u003cstring>"}],"usage_breakdown":[{"cost":"\u003cstring>","event_count":123,"grouped_by":{},"percentage":"\u003cstring>","usage":"\u003cstring>"}]}],"metadata":{},"overpaid_amount":"\u003cstring>","paid_at":"2023-11-07T05:31:56Z","payment_status":"INITIATED","period_end":"2023-11-07T05:31:56Z","period_start":"2023-11-07T05:31:56Z","recalculated_invoice_id":"\u003cstring>","refunded_amount":"\u003cstring>","source_type":"checkout","status":"published","subscription":{"active_pause_id":"\u003cstring>","auto_invoice_threshold":"\u003cstring>","billing_anchor":"2023-11-07T05:31:56Z","billing_cadence":"RECURRING","billing_cycle":"anniversary","billing_period":"MONTHLY","billing_period_count":123,"cancel_at":"2023-11-07T05:31:56Z","cancel_at_period_end":true,"cancelled_at":"2023-11-07T05:31:56Z","checkout_session":{"action":"create_subscription","cancel_url":"\u003cstring>","cancelled_at":"2023-11-07T05:31:56Z","checkout_invoice_id":"\u003cstring>","checkout_payment_id":"\u003cstring>","checkout_status":"initiated","completed_at":"2023-11-07T05:31:56Z","created_at":"2023-11-07T05:31:56Z","customer_id":"\u003cstring>","entity_creation_result":{"entity_id":"\u003cstring>","status":"created"},"expires_at":"2023-11-07T05:31:56Z","failure_reason":"\u003cstring>","failure_url":"\u003cstring>","id":"\u003cstring>","idempotency_key":"\u003cstring>","metadata":{},"next_poll_after_ms":123,"payment":{"gateway":"\u003cstring>","id":"\u003cstring>","status":"INITIATED"},"payment_action":{"type":"checkout_url","url":"\u003cstring>"},"payment_provider":"razorpay","stale":true,"success_url":"\u003cstring>","terminal":true,"updated_at":"2023-11-07T05:31:56Z"},"collection_method":"\u003cstring>","commitment_amount":"\u003cstring>","commitment_duration":"MONTHLY","coupon_associations":[{"coupon":{"amount_off":"\u003cstring>","cadence":"once","coupon_code":"\u003cstring>","created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","currency":"\u003cstring>","duration_in_periods":123,"environment_id":"\u003cstring>","id":"\u003cstring>","max_redemptions":123,"metadata":{},"name":"\u003cstring>","percentage_off":"\u003cstring>","redeem_after":"\u003cstring>","redeem_before":"\u003cstring>","rules":{},"status":"published","tenant_id":"\u003cstring>","total_redemptions":123,"type":"fixed","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"},"coupon_id":"\u003cstring>","created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","end_date":"2023-11-07T05:31:56Z","environment_id":"\u003cstring>","id":"\u003cstring>","metadata":{},"start_date":"2023-11-07T05:31:56Z","status":"published","subscription_id":"\u003cstring>","subscription_line_item":{"addon_association_id":"\u003cstring>","billing_period":"MONTHLY","billing_period_count":123,"commitment_amount":"\u003cstring>","commitment_duration":"MONTHLY","commitment_overage_factor":"\u003cstring>","commitment_quantity":"\u003cstring>","commitment_time_buckets":[{"commitment_type":"amount","commitment_value":"\u003cstring>","end":{"hour":12,"minute":29},"id":"\u003cstring>","overage_factor":123,"price_id":"\u003cstring>","start":{"hour":12,"minute":29},"true_up_enabled":true}],"commitment_true_up_enabled":true,"commitment_type":"amount","commitment_windowed":true,"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","currency":"\u003cstring>","customer_id":"\u003cstring>","display_name":"\u003cstring>","end_date":"2023-11-07T05:31:56Z","entity_id":"\u003cstring>","entity_type":"plan","environment_id":"\u003cstring>","id":"\u003cstring>","invoice_cadence":"ARREAR","metadata":{},"meter":{"aggregation":{"bucket_size":"MINUTE","expression":"\u003cstring>","field":"\u003cstring>","group_by":"\u003cstring>","multiplier":"\u003cstring>","type":"COUNT"},"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","environment_id":"\u003cstring>","event_name":"\u003cstring>","filters":[{"key":"\u003cstring>","values":["\u003cstring>"]}],"id":"\u003cstring>","name":"\u003cstring>","reset_usage":"BILLING_PERIOD","status":"published","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"},"meter_display_name":"\u003cstring>","meter_id":"\u003cstring>","plan_display_name":"\u003cstring>","price":{"addon":{"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","credit_grants":[{"addon_id":"\u003cstring>","cadence":"ONETIME","conversion_rate":"\u003cstring>","created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","credit_grant_anchor":"2023-11-07T05:31:56Z","credits":"\u003cstring>","end_date":"2023-11-07T05:31:56Z","environment_id":"\u003cstring>","expiration_duration":123,"expiration_duration_unit":"DAY","expiration_type":"NEVER","id":"\u003cstring>","metadata":{},"name":"\u003cstring>","period":"DAILY","period_count":123,"plan_id":"\u003cstring>","priority":123,"scope":"PLAN","start_date":"2023-11-07T05:31:56Z","status":"published","subscription_id":"\u003cstring>","tenant_id":"\u003cstring>","topup_conversion_rate":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"}],"description":"\u003cstring>","entitlements":[{"addon":"\u003cunknown>","aggregation_mode":"additive","config_value":{},"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","display_order":123,"end_date":"2023-11-07T05:31:56Z","entity_id":"\u003cstring>","entity_type":"PLAN","environment_id":"\u003cstring>","feature":{"alert_settings":{"alert_enabled":true,"alert_threshold_type":"absolute","critical":{"condition":"above","threshold":"\u003cstring>"},"info":{"condition":"above","threshold":"\u003cstring>"},"warning":{"condition":"above","threshold":"\u003cstring>"}},"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","description":"\u003cstring>","environment_id":"\u003cstring>","group":{"created_at":"2023-11-07T05:31:56Z","entity_ids":["\u003cstring>"],"entity_type":"\u003cstring>","id":"\u003cstring>","lookup_key":"\u003cstring>","metadata":{},"name":"\u003cstring>","status":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z"},"group_id":"\u003cstring>","id":"\u003cstring>","lookup_key":"\u003cstring>","metadata":{},"meter":{"aggregation":{"bucket_size":"MINUTE","expression":"\u003cstring>","field":"\u003cstring>","group_by":"\u003cstring>","multiplier":"\u003cstring>","type":"COUNT"},"created_at":"2024-03-20T15:04:05Z","event_name":"api_request","filters":[{"key":"\u003cstring>","values":["\u003cstring>"]}],"id":"550e8400-e29b-41d4-a716-446655440000","name":"API Usage Meter","reset_usage":"BILLING_PERIOD","status":"published","tenant_id":"tenant123","updated_at":"2024-03-20T15:04:05Z"},"meter_id":"\u003cstring>","name":"\u003cstring>","reporting_unit":{"conversion_rate":123,"unit_plural":"\u003cstring>","unit_singular":"\u003cstring>"},"status":"published","tenant_id":"\u003cstring>","type":"metered","unit_plural":"\u003cstring>","unit_singular":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"},"feature_id":"\u003cstring>","feature_type":"metered","grant_allocation_behavior":"first_usage","grant_duration_unit":"hour","grant_duration_value":123,"grant_measure":"quantity","grant_quota":"\u003cstring>","id":"\u003cstring>","is_enabled":true,"is_soft_limit":true,"parent_entitlement_id":"\u003cstring>","plan":{"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","credit_grants":[{"addon_id":"\u003cstring>","cadence":"ONETIME","conversion_rate":"\u003cstring>","created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","credit_grant_anchor":"2023-11-07T05:31:56Z","credits":"\u003cstring>","end_date":"2023-11-07T05:31:56Z","environment_id":"\u003cstring>","expiration_duration":123,"expiration_duration_unit":"DAY","expiration_type":"NEVER","id":"\u003cstring>","metadata":{},"name":"\u003cstring>","period":"DAILY","period_count":123,"plan_id":"\u003cstring>","priority":123,"scope":"PLAN","start_date":"2023-11-07T05:31:56Z","status":"published","subscription_id":"\u003cstring>","tenant_id":"\u003cstring>","topup_conversion_rate":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"}],"description":"\u003cstring>","display_order":123,"entitlements":"\u003carray>","environment_id":"\u003cstring>","id":"\u003cstring>","lookup_key":"\u003cstring>","metadata":{},"name":"\u003cstring>","price_sync_status":{"current_sequence":123,"synced":true,"unsynced_subscription_count":123},"prices":"\u003carray>","status":"published","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"},"plan_id":"\u003cstring>","start_date":"2023-11-07T05:31:56Z","static_value":"\u003cstring>","status":"published","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>","usage_limit":123,"usage_reset_period":"MONTHLY"}],"environment_id":"\u003cstring>","id":"\u003cstring>","lookup_key":"\u003cstring>","metadata":{},"name":"\u003cstring>","price_sync_status":{"current_sequence":123,"synced":true,"unsynced_association_count":123},"prices":"\u003carray>","status":"published","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"},"amount":"\u003cstring>","billing_cadence":"RECURRING","billing_model":"FLAT_FEE","billing_period":"MONTHLY","billing_period_count":123,"bucket_size":"MINUTE","conversion_rate":"\u003cstring>","created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","currency":"\u003cstring>","description":"\u003cstring>","display_amount":"\u003cstring>","display_name":"\u003cstring>","display_price_unit_amount":"\u003cstring>","end_date":"2023-11-07T05:31:56Z","entity_id":"\u003cstring>","entity_type":"PLAN","environment_id":"\u003cstring>","feature":{"reporting_unit":{"conversion_rate":123,"unit_plural":"\u003cstring>","unit_singular":"\u003cstring>"}},"group":{"created_at":"2023-11-07T05:31:56Z","entity_ids":["\u003cstring>"],"entity_type":"\u003cstring>","id":"\u003cstring>","lookup_key":"\u003cstring>","metadata":{},"name":"\u003cstring>","status":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z"},"group_id":"\u003cstring>","id":"\u003cstring>","invoice_cadence":"ARREAR","lookup_key":"\u003cstring>","metadata":{},"meter":{"aggregation":{"bucket_size":"MINUTE","expression":"\u003cstring>","field":"\u003cstring>","group_by":"\u003cstring>","multiplier":"\u003cstring>","type":"COUNT"},"created_at":"2024-03-20T15:04:05Z","event_name":"api_request","filters":[{"key":"\u003cstring>","values":["\u003cstring>"]}],"id":"550e8400-e29b-41d4-a716-446655440000","name":"API Usage Meter","reset_usage":"BILLING_PERIOD","status":"published","tenant_id":"tenant123","updated_at":"2024-03-20T15:04:05Z"},"meter_id":"\u003cstring>","min_quantity":"\u003cstring>","parent_price_id":"\u003cstring>","plan":{"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","credit_grants":[{"addon_id":"\u003cstring>","cadence":"ONETIME","conversion_rate":"\u003cstring>","created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","credit_grant_anchor":"2023-11-07T05:31:56Z","credits":"\u003cstring>","end_date":"2023-11-07T05:31:56Z","environment_id":"\u003cstring>","expiration_duration":123,"expiration_duration_unit":"DAY","expiration_type":"NEVER","id":"\u003cstring>","metadata":{},"name":"\u003cstring>","period":"DAILY","period_count":123,"plan_id":"\u003cstring>","priority":123,"scope":"PLAN","start_date":"2023-11-07T05:31:56Z","status":"published","subscription_id":"\u003cstring>","tenant_id":"\u003cstring>","topup_conversion_rate":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"}],"description":"\u003cstring>","display_order":123,"entitlements":"\u003carray>","environment_id":"\u003cstring>","id":"\u003cstring>","lookup_key":"\u003cstring>","metadata":{},"name":"\u003cstring>","price_sync_status":{"current_sequence":123,"synced":true,"unsynced_subscription_count":123},"prices":"\u003carray>","status":"published","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"},"price_unit":"\u003cstring>","price_unit_amount":"\u003cstring>","price_unit_id":"\u003cstring>","price_unit_tiers":[{"flat_amount":"\u003cstring>","unit_amount":"\u003cstring>","up_to":123}],"price_unit_type":"FIAT","pricing_unit":{"base_currency":"\u003cstring>","code":"\u003cstring>","conversion_rate":"\u003cstring>","created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","environment_id":"\u003cstring>","id":"\u003cstring>","metadata":{},"name":"\u003cstring>","status":"published","symbol":"\u003cstring>","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"},"sequence":123,"start_date":"2023-11-07T05:31:56Z","status":"published","tenant_id":"\u003cstring>","tier_mode":"VOLUME","tiers":[{"flat_amount":"\u003cstring>","unit_amount":"\u003cstring>","up_to":123}],"transform_quantity":{"divide_by":123,"round":"up"},"trial_period_days":123,"type":"USAGE","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"},"price_id":"\u003cstring>","price_type":"USAGE","price_unit":"\u003cstring>","price_unit_id":"\u003cstring>","quantity":"\u003cstring>","start_date":"2023-11-07T05:31:56Z","status":"published","subscription_id":"\u003cstring>","subscription_phase_id":"\u003cstring>","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"},"subscription_line_item_id":"\u003cstring>","subscription_phase_id":"\u003cstring>","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"}],"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","credit_grants":[{"addon_id":"\u003cstring>","cadence":"ONETIME","conversion_rate":"\u003cstring>","created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","credit_grant_anchor":"2023-11-07T05:31:56Z","credits":"\u003cstring>","end_date":"2023-11-07T05:31:56Z","environment_id":"\u003cstring>","expiration_duration":123,"expiration_duration_unit":"DAY","expiration_type":"NEVER","id":"\u003cstring>","metadata":{},"name":"\u003cstring>","period":"DAILY","period_count":123,"plan_id":"\u003cstring>","priority":123,"scope":"PLAN","start_date":"2023-11-07T05:31:56Z","status":"published","subscription_id":"\u003cstring>","tenant_id":"\u003cstring>","topup_conversion_rate":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"}],"currency":"\u003cstring>","current_period_end":"2023-11-07T05:31:56Z","current_period_start":"2023-11-07T05:31:56Z","customer":{"address_city":"\u003cstring>","address_country":"\u003cstring>","address_line1":"\u003cstring>","address_line2":"\u003cstring>","address_postal_code":"\u003cstring>","address_state":"\u003cstring>","billing_currency":"\u003cstring>","contact":"\u003cstring>","contact_persons":[{"first_name":"\u003cstring>","department":"\u003cstring>","designation":"\u003cstring>","email":"\u003cstring>","id":"\u003cstring>","is_primary":true,"last_name":"\u003cstring>","mobile":"\u003cstring>","salutation":"\u003cstring>"}],"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","email":"\u003cstring>","environment_id":"\u003cstring>","external_id":"\u003cstring>","id":"\u003cstring>","integrations":[{"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","entity_id":"\u003cstring>","entity_type":"customer","environment_id":"\u003cstring>","id":"\u003cstring>","metadata":{},"provider_entity_id":"\u003cstring>","provider_type":"\u003cstring>","status":"published","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"}],"metadata":{},"name":"\u003cstring>","status":"published","tax_treatment":"taxable","tenant_id":"\u003cstring>","timezone":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"},"customer_id":"\u003cstring>","enable_true_up":true,"end_date":"2023-11-07T05:31:56Z","entitlements":[{"entitlement":{"aggregation_mode":"additive","buckets":[{"entitlement_id":"\u003cstring>","grant_duration_unit":"hour","grant_duration_value":123,"grant_measure":"quantity","grant_quota":"\u003cstring>","grant_unlimited":true,"source_entity_id":"\u003cstring>","usage_limit":123}],"config_values":[{}],"grant_duration_unit":"hour","grant_duration_value":123,"grant_measure":"quantity","grant_quota":"\u003cstring>","grant_state":{"allowances":[{"entitlement_id":"\u003cstring>","grant_id":"\u003cstring>","is_active":true,"last_computed_at":"2023-11-07T05:31:56Z","measure":"quantity","quota":"\u003cstring>","quota_crossed_at":"2023-11-07T05:31:56Z","remaining":"\u003cstring>","status":"active","unlimited":true,"usage":"\u003cstring>","valid_from":"\u003cstring>","valid_to":"\u003cstring>"}]},"grant_unlimited":true,"is_enabled":true,"is_soft_limit":true,"static_values":["\u003cstring>"],"usage_limit":123,"usage_reset_period":"MONTHLY"},"feature":{"alert_settings":{"alert_enabled":true,"alert_threshold_type":"absolute","critical":{"condition":"above","threshold":"\u003cstring>"},"info":{"condition":"above","threshold":"\u003cstring>"},"warning":{"condition":"above","threshold":"\u003cstring>"}},"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","description":"\u003cstring>","environment_id":"\u003cstring>","group":{"created_at":"2023-11-07T05:31:56Z","entity_ids":["\u003cstring>"],"entity_type":"\u003cstring>","id":"\u003cstring>","lookup_key":"\u003cstring>","metadata":{},"name":"\u003cstring>","status":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z"},"group_id":"\u003cstring>","id":"\u003cstring>","lookup_key":"\u003cstring>","metadata":{},"meter":{"aggregation":{"bucket_size":"MINUTE","expression":"\u003cstring>","field":"\u003cstring>","group_by":"\u003cstring>","multiplier":"\u003cstring>","type":"COUNT"},"created_at":"2024-03-20T15:04:05Z","event_name":"api_request","filters":[{"key":"\u003cstring>","values":["\u003cstring>"]}],"id":"550e8400-e29b-41d4-a716-446655440000","name":"API Usage Meter","reset_usage":"BILLING_PERIOD","status":"published","tenant_id":"tenant123","updated_at":"2024-03-20T15:04:05Z"},"meter_id":"\u003cstring>","name":"\u003cstring>","reporting_unit":{"conversion_rate":123,"unit_plural":"\u003cstring>","unit_singular":"\u003cstring>"},"status":"published","tenant_id":"\u003cstring>","type":"metered","unit_plural":"\u003cstring>","unit_singular":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"},"sources":[{"config_value":{},"entitlement_id":"\u003cstring>","entity_id":"\u003cstring>","entity_name":"\u003cstring>","entity_type":"plan","is_enabled":true,"quantity":123,"static_value":"\u003cstring>","subscription_id":"\u003cstring>","usage_limit":123,"usage_reset_period":"MONTHLY"}]}],"environment_id":"\u003cstring>","gateway_payment_method_id":"\u003cstring>","id":"\u003cstring>","invoicing_customer_id":"\u003cstring>","latest_invoice":"\u003cunknown>","line_item_grouping":"per_charge_period","line_items":[{"addon_association_id":"\u003cstring>","billing_period":"MONTHLY","billing_period_count":123,"commitment_amount":"\u003cstring>","commitment_duration":"MONTHLY","commitment_overage_factor":"\u003cstring>","commitment_quantity":"\u003cstring>","commitment_time_buckets":[{"commitment_type":"amount","commitment_value":"\u003cstring>","end":{"hour":12,"minute":29},"id":"\u003cstring>","overage_factor":123,"price_id":"\u003cstring>","start":{"hour":12,"minute":29},"true_up_enabled":true}],"commitment_true_up_enabled":true,"commitment_type":"amount","commitment_windowed":true,"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","currency":"\u003cstring>","customer_id":"\u003cstring>","display_name":"\u003cstring>","end_date":"2023-11-07T05:31:56Z","entity_id":"\u003cstring>","entity_type":"plan","environment_id":"\u003cstring>","id":"\u003cstring>","invoice_cadence":"ARREAR","metadata":{},"meter":{"aggregation":{"bucket_size":"MINUTE","expression":"\u003cstring>","field":"\u003cstring>","group_by":"\u003cstring>","multiplier":"\u003cstring>","type":"COUNT"},"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","environment_id":"\u003cstring>","event_name":"\u003cstring>","filters":[{"key":"\u003cstring>","values":["\u003cstring>"]}],"id":"\u003cstring>","name":"\u003cstring>","reset_usage":"BILLING_PERIOD","status":"published","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"},"meter_display_name":"\u003cstring>","meter_id":"\u003cstring>","plan_display_name":"\u003cstring>","price":{"amount":"\u003cstring>","billing_cadence":"RECURRING","billing_model":"FLAT_FEE","billing_period":"MONTHLY","billing_period_count":123,"bucket_size":"MINUTE","conversion_rate":"\u003cstring>","created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","currency":"\u003cstring>","description":"\u003cstring>","display_amount":"\u003cstring>","display_name":"\u003cstring>","display_price_unit_amount":"\u003cstring>","end_date":"2023-11-07T05:31:56Z","entity_id":"\u003cstring>","entity_type":"PLAN","environment_id":"\u003cstring>","group_id":"\u003cstring>","id":"\u003cstring>","invoice_cadence":"ARREAR","lookup_key":"\u003cstring>","metadata":{},"meter_id":"\u003cstring>","min_quantity":"\u003cstring>","parent_price_id":"\u003cstring>","price_unit":"\u003cstring>","price_unit_amount":"\u003cstring>","price_unit_id":"\u003cstring>","price_unit_tiers":[{"flat_amount":"\u003cstring>","unit_amount":"\u003cstring>","up_to":123}],"price_unit_type":"FIAT","sequence":123,"start_date":"2023-11-07T05:31:56Z","status":"published","tenant_id":"\u003cstring>","tier_mode":"VOLUME","tiers":[{"flat_amount":"\u003cstring>","unit_amount":"\u003cstring>","up_to":123}],"transform_quantity":{"divide_by":123,"round":"up"},"trial_period_days":123,"type":"USAGE","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"},"price_id":"\u003cstring>","price_type":"USAGE","price_unit":"\u003cstring>","price_unit_id":"\u003cstring>","quantity":"\u003cstring>","start_date":"2023-11-07T05:31:56Z","status":"published","subscription_id":"\u003cstring>","subscription_phase_id":"\u003cstring>","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"}],"lookup_key":"\u003cstring>","metadata":{},"overage_factor":"\u003cstring>","parent_subscription_id":"\u003cstring>","pause_status":"none","pauses":[{"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","environment_id":"\u003cstring>","id":"\u003cstring>","metadata":{},"original_period_end":"2023-11-07T05:31:56Z","original_period_start":"2023-11-07T05:31:56Z","pause_end":"2023-11-07T05:31:56Z","pause_mode":"immediate","pause_start":"2023-11-07T05:31:56Z","pause_status":"none","reason":"\u003cstring>","resume_mode":"immediate","resumed_at":"2023-11-07T05:31:56Z","status":"published","subscription_id":"\u003cstring>","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"}],"payment_behavior":"\u003cstring>","payment_terms":"15 NET","phases":[{"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","end_date":"2023-11-07T05:31:56Z","environment_id":"\u003cstring>","id":"\u003cstring>","metadata":{},"start_date":"2023-11-07T05:31:56Z","status":"published","subscription_id":"\u003cstring>","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"}],"plan":{"created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","credit_grants":[{"addon_id":"\u003cstring>","cadence":"ONETIME","conversion_rate":"\u003cstring>","created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","credit_grant_anchor":"2023-11-07T05:31:56Z","credits":"\u003cstring>","end_date":"2023-11-07T05:31:56Z","environment_id":"\u003cstring>","expiration_duration":123,"expiration_duration_unit":"DAY","expiration_type":"NEVER","id":"\u003cstring>","metadata":{},"name":"\u003cstring>","period":"DAILY","period_count":123,"plan_id":"\u003cstring>","priority":123,"scope":"PLAN","start_date":"2023-11-07T05:31:56Z","status":"published","subscription_id":"\u003cstring>","tenant_id":"\u003cstring>","topup_conversion_rate":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"}],"description":"\u003cstring>","display_order":123,"entitlements":"\u003carray>","environment_id":"\u003cstring>","id":"\u003cstring>","lookup_key":"\u003cstring>","metadata":{},"name":"\u003cstring>","price_sync_status":{"current_sequence":123,"synced":true,"unsynced_subscription_count":123},"prices":"\u003carray>","status":"published","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"},"plan_id":"\u003cstring>","proration_behavior":"create_prorations","start_date":"2023-11-07T05:31:56Z","status":"published","subscription_status":"active","subscription_type":"standalone","synced_price_sequence":123,"tenant_id":"\u003cstring>","timezone":"\u003cstring>","trial_end":"2023-11-07T05:31:56Z","trial_start":"2023-11-07T05:31:56Z","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>","version":123},"subscription_customer_id":"\u003cstring>","subscription_id":"\u003cstring>","subtotal":"\u003cstring>","tax_exemption_reason_code":"customer_exempt","tax_summary":{"exclusive_tax":"\u003cstring>","exemption":{"reason":"\u003cstring>","reason_code":"customer_exempt"},"inclusive_tax":"\u003cstring>","total_tax":"\u003cstring>"},"taxes":[{"applied_at":"2023-11-07T05:31:56Z","created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","currency":"\u003cstring>","entity_id":"\u003cstring>","entity_type":"customer","environment_id":"\u003cstring>","external_tax_details":{"calculation_expires_at":"2023-11-07T05:31:56Z","calculation_id":"\u003cstring>","display_name":"\u003cstring>","jurisdiction":{"country":"\u003cstring>","display_name":"\u003cstring>","level":"\u003cstring>","state":"\u003cstring>"},"percentage":"\u003cstring>","reference":"\u003cstring>","reversal":{"mode":"full","original_transaction":"\u003cstring>"},"sourcing":"\u003cstring>","tax_code":"\u003cstring>","tax_type":"\u003cstring>","taxability_reason":"\u003cstring>"},"id":"\u003cstring>","idempotency_key":"\u003cstring>","metadata":{},"provider":"flexprice","status":"published","tax_amount":"\u003cstring>","tax_association_id":"\u003cstring>","tax_behavior":"inclusive","tax_rate":{"code":"\u003cstring>","created_at":"2023-11-07T05:31:56Z","created_by":"\u003cstring>","description":"\u003cstring>","environment_id":"\u003cstring>","id":"\u003cstring>","metadata":{},"name":"\u003cstring>","percentage_value":"\u003cstring>","scope":"INTERNAL","status":"published","tax_rate_status":"ACTIVE","tax_rate_type":"percentage","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"},"tax_rate_id":"\u003cstring>","tax_transaction_id":"\u003cstring>","tax_transaction_type":"filing","taxable_amount":"\u003cstring>","tenant_id":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>"}],"tenant_id":"\u003cstring>","total":"\u003cstring>","total_discount":"\u003cstring>","total_prepaid_credits_applied":"\u003cstring>","total_tax":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z","updated_by":"\u003cstring>","version":123,"voided_at":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"51970d7e-26cf-4471-9103-6f88c5c3557b":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["http_client_error","system_error","internal_error","not_found","already_exists","version_conflict","validation_error","invalid_operation","permission_denied","database_error","service_unavailable","too_many_requests","not_implemented"],"x-enum-varnames":["ErrCodeHTTPClient","ErrCodeSystemError","ErrCodeInternalError","ErrCodeNotFound","ErrCodeAlreadyExists","ErrCodeVersionConflict","ErrCodeValidation","ErrCodeInvalidOperation","ErrCodePermissionDenied","ErrCodeDatabase","ErrCodeServiceUnavailable","ErrCodeTooManyRequests","ErrCodeNotImplemented"],"x-speakeasy-name-override":"ErrorCode","uniqueKey":"code","typeLabel":"enum\u003cstring>"},"http_status_code":{"type":"integer","uniqueKey":"http_status_code","typeLabel":"integer"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"x-speakeasy-name-override":"ErrorResponse","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"http_client_error","http_status_code":123,"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"32498f69-d1b5-4c96-a269-1fa16b05b2a7":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["http_client_error","system_error","internal_error","not_found","already_exists","version_conflict","validation_error","invalid_operation","permission_denied","database_error","service_unavailable","too_many_requests","not_implemented"],"x-enum-varnames":["ErrCodeHTTPClient","ErrCodeSystemError","ErrCodeInternalError","ErrCodeNotFound","ErrCodeAlreadyExists","ErrCodeVersionConflict","ErrCodeValidation","ErrCodeInvalidOperation","ErrCodePermissionDenied","ErrCodeDatabase","ErrCodeServiceUnavailable","ErrCodeTooManyRequests","ErrCodeNotImplemented"],"x-speakeasy-name-override":"ErrorCode","uniqueKey":"code","typeLabel":"enum\u003cstring>"},"http_status_code":{"type":"integer","uniqueKey":"http_status_code","typeLabel":"integer"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"x-speakeasy-name-override":"ErrorResponse","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"http_client_error","http_status_code":123,"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"a2a0051b-8173-4cb2-bc02-902a94661270":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["http_client_error","system_error","internal_error","not_found","already_exists","version_conflict","validation_error","invalid_operation","permission_denied","database_error","service_unavailable","too_many_requests","not_implemented"],"x-enum-varnames":["ErrCodeHTTPClient","ErrCodeSystemError","ErrCodeInternalError","ErrCodeNotFound","ErrCodeAlreadyExists","ErrCodeVersionConflict","ErrCodeValidation","ErrCodeInvalidOperation","ErrCodePermissionDenied","ErrCodeDatabase","ErrCodeServiceUnavailable","ErrCodeTooManyRequests","ErrCodeNotImplemented"],"x-speakeasy-name-override":"ErrorCode","uniqueKey":"code","typeLabel":"enum\u003cstring>"},"http_status_code":{"type":"integer","uniqueKey":"http_status_code","typeLabel":"integer"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"x-speakeasy-name-override":"ErrorResponse","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"http_client_error","http_status_code":123,"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"dc28e240-ca48-4347-adc2-7dfa47ac0f00":{"ApiKeyAuth":{"type":"apiKey","description":"Enter your API key in the format *x-api-key \u0026lt;api-key\u0026gt;**","name":"x-api-key","in":"header","scopes":[],"schemeName":"ApiKeyAuth"}}},"servers":{"c3a552c0-fb0d-4192-bbfb-41d490814c91":{"url":"https://us.api.flexprice.io/v1","description":"US Region"},"8d9b0e10-8210-4fd4-9d91-5200cae97a59":{"url":"https://api.cloud.flexprice.io/v1","description":"India Region"}},"schemas":{"6c04a6f7-e9a8-4aa6-bb72-c876420f4348":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grants":{"type":"array","items":{"type":"object","properties":{"addon_id":{"type":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grant_anchor":{"type":"string","format":"date-time"},"credits":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"expiration_duration":{"type":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod"},"period_count":{"type":"integer"},"plan_id":{"type":"string"},"priority":{"type":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope"},"start_date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"tenant_id":{"type":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"description":{"type":"string"},"entitlements":{"type":"array","items":{"type":"object","properties":{"addon":{"oneOf":[{}]},"aggregation_mode":{"type":"string","enum":["additive","parallel"],"x-enum-varnames":["EntitlementAggregationModeAdditive","EntitlementAggregationModeParallel"],"x-speakeasy-name-override":"EntitlementAggregationMode"},"config_value":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"display_order":{"type":"integer"},"end_date":{"type":"string","format":"date-time"},"entity_id":{"type":"string"},"entity_type":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["ENTITLEMENT_ENTITY_TYPE_PLAN","ENTITLEMENT_ENTITY_TYPE_SUBSCRIPTION","ENTITLEMENT_ENTITY_TYPE_ADDON"],"x-speakeasy-name-override":"EntitlementEntityType"},"environment_id":{"type":"string"},"feature":{"type":"object","properties":{"alert_settings":{"type":"object","properties":{"alert_enabled":{"type":"boolean"},"alert_threshold_type":{"type":"string","enum":["absolute","percentage"],"x-enum-varnames":["AlertThresholdTypeAbsolute","AlertThresholdTypePercentage"],"x-speakeasy-name-override":"AlertThresholdType"},"critical":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition"},"threshold":{"type":"string"}},"x-speakeasy-name-override":"AlertThreshold"},"info":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition"},"threshold":{"type":"string"}},"x-speakeasy-name-override":"AlertThreshold"},"warning":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition"},"threshold":{"type":"string"}},"x-speakeasy-name-override":"AlertThreshold"}},"x-speakeasy-name-override":"AlertSettings"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"description":{"type":"string"},"environment_id":{"type":"string"},"group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"entity_ids":{"type":"array","items":{"type":"string"}},"entity_type":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"status":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"group_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel)."},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set."},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total."},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null."},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType"}}},"created_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"},"event_name":{"type":"string","example":"api_request"},"filters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string"}}}}},"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","example":"API Usage Meter"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage"},"status":{"type":"string","example":"published"},"tenant_id":{"type":"string","example":"tenant123"},"updated_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"}}},"meter_id":{"type":"string"},"name":{"type":"string"},"reporting_unit":{"type":"object","properties":{"conversion_rate":{"type":"number","description":"Multiplier: reporting_unit_value = unit_value * conversion_rate; must be > 0"},"unit_plural":{"type":"string","description":"Display unit label, plural (e.g. \"seconds\")"},"unit_singular":{"type":"string","description":"Display unit label, singular (e.g. \"second\")"}},"x-speakeasy-name-override":"ReportingUnit"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"type":{"type":"string","enum":["metered","boolean","static","config"],"x-enum-varnames":["FeatureTypeMetered","FeatureTypeBoolean","FeatureTypeStatic","FeatureTypeConfig"],"x-speakeasy-name-override":"FeatureType"},"unit_plural":{"type":"string"},"unit_singular":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"feature_id":{"type":"string"},"feature_type":{"type":"string","enum":["metered","boolean","static","config"],"x-enum-varnames":["FeatureTypeMetered","FeatureTypeBoolean","FeatureTypeStatic","FeatureTypeConfig"],"x-speakeasy-name-override":"FeatureType"},"grant_allocation_behavior":{"type":"string","enum":["first_usage","unit_start"],"x-enum-varnames":["EntitlementGrantAllocationBehaviorFirstUsage","EntitlementGrantAllocationBehaviorUnitStart"],"x-speakeasy-name-override":"EntitlementGrantAllocationBehavior"},"grant_duration_unit":{"type":"string","enum":["hour","day","week","subscription_period"],"x-enum-varnames":["EntitlementGrantDurationUnitHour","EntitlementGrantDurationUnitDay","EntitlementGrantDurationUnitWeek","EntitlementGrantDurationUnitSubscriptionPeriod"],"x-speakeasy-name-override":"EntitlementGrantDurationUnit"},"grant_duration_value":{"type":"integer"},"grant_measure":{"type":"string","enum":["quantity","amount"],"x-enum-varnames":["EntitlementGrantMeasureQuantity","EntitlementGrantMeasureAmount"],"x-speakeasy-name-override":"EntitlementGrantMeasure"},"grant_quota":{"type":"string"},"id":{"type":"string"},"is_enabled":{"type":"boolean"},"is_soft_limit":{"type":"boolean"},"parent_entitlement_id":{"type":"string"},"plan":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grants":{"type":"array","items":{"type":"object","properties":{"addon_id":{"type":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grant_anchor":{"type":"string","format":"date-time"},"credits":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"expiration_duration":{"type":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod"},"period_count":{"type":"integer"},"plan_id":{"type":"string"},"priority":{"type":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope"},"start_date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"tenant_id":{"type":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"description":{"type":"string"},"display_order":{"type":"integer"},"entitlements":{"type":"array","items":{"$circularRef":"1c99a94f-ba2d-4aeb-aec5-928f5daeddec"}},"environment_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"price_sync_status":{"type":"object","properties":{"current_sequence":{"type":"integer"},"synced":{"type":"boolean"},"unsynced_subscription_count":{"type":"integer"}}},"prices":{"type":"array","description":"TODO: Add inline addons","items":{"type":"object","properties":{"addon":{"oneOf":[{}]},"amount":{"type":"string","description":"Amount stored in main currency units (e.g., dollars, not cents)\nFor USD: 12.50 means $12.50"},"billing_cadence":{"type":"string","enum":["RECURRING"],"x-enum-varnames":["BILLING_CADENCE_RECURRING"],"x-speakeasy-name-override":"BillingCadence"},"billing_model":{"type":"string","enum":["FLAT_FEE","PACKAGE","TIERED"],"x-enum-varnames":["BILLING_MODEL_FLAT_FEE","BILLING_MODEL_PACKAGE","BILLING_MODEL_TIERED"],"x-speakeasy-name-override":"BillingModel"},"billing_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod"},"billing_period_count":{"type":"integer","description":"BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12"},"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"conversion_rate":{"type":"string","description":"ConversionRate is the conversion rate of the price unit to the fiat currency"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"currency":{"type":"string","description":"Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp"},"description":{"type":"string","description":"Description of the price"},"display_amount":{"type":"string","description":"DisplayAmount is the formatted amount with currency symbol\nFor USD: $12.50"},"display_name":{"type":"string","description":"DisplayName is the name of the price"},"display_price_unit_amount":{"type":"string","description":"DisplayPriceUnitAmount is the formatted amount of the price unit"},"end_date":{"type":"string","description":"EndDate is the end date of the price","format":"date-time"},"entity_id":{"type":"string","description":"EntityID holds the value of the \"entity_id\" field."},"entity_type":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON","PRICE","COSTSHEET"],"x-enum-varnames":["PRICE_ENTITY_TYPE_PLAN","PRICE_ENTITY_TYPE_SUBSCRIPTION","PRICE_ENTITY_TYPE_ADDON","PRICE_ENTITY_TYPE_PRICE","PRICE_ENTITY_TYPE_COSTSHEET"],"x-speakeasy-name-override":"PriceEntityType"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the price"},"feature":{"type":"object","properties":{"reporting_unit":{"type":"object","properties":{"conversion_rate":{"type":"number","description":"Multiplier: reporting_unit_value = unit_value * conversion_rate; must be > 0"},"unit_plural":{"type":"string","description":"Display unit label, plural (e.g. \"seconds\")"},"unit_singular":{"type":"string","description":"Display unit label, singular (e.g. \"second\")"}},"x-speakeasy-name-override":"ReportingUnit"}}},"group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"entity_ids":{"type":"array","items":{"type":"string"}},"entity_type":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"status":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"group_id":{"type":"string","description":"GroupID references the group this price belongs to"},"id":{"type":"string","description":"ID uuid identifier for the price"},"invoice_cadence":{"type":"string","enum":["ARREAR","ADVANCE"],"x-enum-varnames":["InvoiceCadenceArrear","InvoiceCadenceAdvance"],"x-speakeasy-name-override":"InvoiceCadence"},"lookup_key":{"type":"string","description":"LookupKey used for looking up the price in the database"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel)."},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set."},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total."},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null."},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType"}}},"created_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"},"event_name":{"type":"string","example":"api_request"},"filters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string"}}}}},"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","example":"API Usage Meter"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage"},"status":{"type":"string","example":"published"},"tenant_id":{"type":"string","example":"tenant123"},"updated_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"}}},"meter_id":{"type":"string","description":"MeterID is the id of the meter for usage based pricing"},"min_quantity":{"oneOf":[{"type":"string","description":"MinQuantity is the minimum quantity of the price"},{"type":"null","description":"MinQuantity is the minimum quantity of the price"}]},"parent_price_id":{"type":"string","description":"ParentPriceID references the root price (always set for price lineage tracking)"},"plan":{"oneOf":[{}]},"price_unit":{"type":"string","description":"PriceUnit is the code of the price unit (e.g., 'btc', 'eth')"},"price_unit_amount":{"type":"string","description":"PriceUnitAmount is the amount of the price unit"},"price_unit_id":{"type":"string","description":"PriceUnitID is the id of the price unit (for CUSTOM type)"},"price_unit_tiers":{"type":"array","description":"PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED","items":{"type":"object","properties":{"flat_amount":{"type":"string","description":"flat_amount is the flat amount for the given tier (optional)\nApplied on top of unit_amount*quantity. Useful for cases like \"2.7$ + 5c\""},"unit_amount":{"type":"string","description":"unit_amount is the amount per unit for the given tier"},"up_to":{"type":"integer","description":"up_to is the quantity up to which this tier applies. It is null for the last tier.\nIMPORTANT: Tier boundaries are INCLUSIVE.\n- If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier\n- This behavior is consistent across both VOLUME and SLAB tier modes"}}}},"price_unit_type":{"type":"string","enum":["FIAT","CUSTOM"],"x-enum-varnames":["PRICE_UNIT_TYPE_FIAT","PRICE_UNIT_TYPE_CUSTOM"],"x-speakeasy-name-override":"PriceUnitType"},"pricing_unit":{"type":"object","properties":{"base_currency":{"type":"string"},"code":{"type":"string"},"conversion_rate":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"environment_id":{"type":"string"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"symbol":{"type":"string"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"sequence":{"type":"integer","description":"Sequence is the monotonic stamp bumped on every state change that\nsubscription line items need to react to. Read by the plan-price sync;\nset by the database (DEFAULT nextval) on create and by the price\nrepository on termination / compatibility-affecting edits."},"start_date":{"type":"string","description":"StartDate is the start date of the price","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"tier_mode":{"type":"string","enum":["VOLUME","SLAB"],"x-enum-varnames":["BILLING_TIER_VOLUME","BILLING_TIER_SLAB"],"x-speakeasy-name-override":"BillingTier"},"tiers":{"type":"array","items":{"type":"object","properties":{"flat_amount":{"type":"string","description":"flat_amount is the flat amount for the given tier (optional)\nApplied on top of unit_amount*quantity. Useful for cases like \"2.7$ + 5c\""},"unit_amount":{"type":"string","description":"unit_amount is the amount per unit for the given tier"},"up_to":{"type":"integer","description":"up_to is the quantity up to which this tier applies. It is null for the last tier.\nIMPORTANT: Tier boundaries are INCLUSIVE.\n- If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier\n- This behavior is consistent across both VOLUME and SLAB tier modes"}}}},"transform_quantity":{"type":"object","properties":{"divide_by":{"type":"integer","description":"Divide quantity by this number"},"round":{"type":"string","enum":["up","down"],"x-enum-varnames":["ROUND_UP","ROUND_DOWN"],"x-speakeasy-name-override":"RoundType"}}},"trial_period_days":{"type":"integer","description":"TrialPeriodDays is the number of days for the trial period\nNote: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)"},"type":{"type":"string","enum":["USAGE","FIXED"],"x-enum-varnames":["PRICE_TYPE_USAGE","PRICE_TYPE_FIXED"],"x-speakeasy-name-override":"PriceType"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"plan_id":{"type":"string","description":"TODO: Remove this once we have a proper entitlement entity type"},"start_date":{"type":"string","format":"date-time"},"static_value":{"type":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"},"usage_limit":{"type":"integer"},"usage_reset_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","NEVER"],"x-enum-varnames":["ENTITLEMENT_USAGE_RESET_PERIOD_MONTHLY","ENTITLEMENT_USAGE_RESET_PERIOD_ANNUAL","ENTITLEMENT_USAGE_RESET_PERIOD_WEEKLY","ENTITLEMENT_USAGE_RESET_PERIOD_DAILY","ENTITLEMENT_USAGE_RESET_PERIOD_QUARTER","ENTITLEMENT_USAGE_RESET_PERIOD_HALF_YEAR","ENTITLEMENT_USAGE_RESET_PERIOD_NEVER"],"x-speakeasy-name-override":"EntitlementUsageResetPeriod"}}}},"environment_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":true},"name":{"type":"string"},"price_sync_status":{"type":"object","properties":{"current_sequence":{"type":"integer"},"synced":{"type":"boolean"},"unsynced_association_count":{"type":"integer"}}},"prices":{"type":"array","description":"Optional expanded fields","items":{"type":"object","properties":{"addon":{"oneOf":[{}]},"amount":{"type":"string","description":"Amount stored in main currency units (e.g., dollars, not cents)\nFor USD: 12.50 means $12.50"},"billing_cadence":{"type":"string","enum":["RECURRING"],"x-enum-varnames":["BILLING_CADENCE_RECURRING"],"x-speakeasy-name-override":"BillingCadence"},"billing_model":{"type":"string","enum":["FLAT_FEE","PACKAGE","TIERED"],"x-enum-varnames":["BILLING_MODEL_FLAT_FEE","BILLING_MODEL_PACKAGE","BILLING_MODEL_TIERED"],"x-speakeasy-name-override":"BillingModel"},"billing_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod"},"billing_period_count":{"type":"integer","description":"BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12"},"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"conversion_rate":{"type":"string","description":"ConversionRate is the conversion rate of the price unit to the fiat currency"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"currency":{"type":"string","description":"Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp"},"description":{"type":"string","description":"Description of the price"},"display_amount":{"type":"string","description":"DisplayAmount is the formatted amount with currency symbol\nFor USD: $12.50"},"display_name":{"type":"string","description":"DisplayName is the name of the price"},"display_price_unit_amount":{"type":"string","description":"DisplayPriceUnitAmount is the formatted amount of the price unit"},"end_date":{"type":"string","description":"EndDate is the end date of the price","format":"date-time"},"entity_id":{"type":"string","description":"EntityID holds the value of the \"entity_id\" field."},"entity_type":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON","PRICE","COSTSHEET"],"x-enum-varnames":["PRICE_ENTITY_TYPE_PLAN","PRICE_ENTITY_TYPE_SUBSCRIPTION","PRICE_ENTITY_TYPE_ADDON","PRICE_ENTITY_TYPE_PRICE","PRICE_ENTITY_TYPE_COSTSHEET"],"x-speakeasy-name-override":"PriceEntityType"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the price"},"feature":{"type":"object","properties":{"reporting_unit":{"type":"object","properties":{"conversion_rate":{"type":"number","description":"Multiplier: reporting_unit_value = unit_value * conversion_rate; must be > 0"},"unit_plural":{"type":"string","description":"Display unit label, plural (e.g. \"seconds\")"},"unit_singular":{"type":"string","description":"Display unit label, singular (e.g. \"second\")"}},"x-speakeasy-name-override":"ReportingUnit"}}},"group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"entity_ids":{"type":"array","items":{"type":"string"}},"entity_type":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"status":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"group_id":{"type":"string","description":"GroupID references the group this price belongs to"},"id":{"type":"string","description":"ID uuid identifier for the price"},"invoice_cadence":{"type":"string","enum":["ARREAR","ADVANCE"],"x-enum-varnames":["InvoiceCadenceArrear","InvoiceCadenceAdvance"],"x-speakeasy-name-override":"InvoiceCadence"},"lookup_key":{"type":"string","description":"LookupKey used for looking up the price in the database"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel)."},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set."},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total."},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null."},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType"}}},"created_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"},"event_name":{"type":"string","example":"api_request"},"filters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string"}}}}},"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","example":"API Usage Meter"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage"},"status":{"type":"string","example":"published"},"tenant_id":{"type":"string","example":"tenant123"},"updated_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"}}},"meter_id":{"type":"string","description":"MeterID is the id of the meter for usage based pricing"},"min_quantity":{"oneOf":[{"type":"string","description":"MinQuantity is the minimum quantity of the price"},{"type":"null","description":"MinQuantity is the minimum quantity of the price"}]},"parent_price_id":{"type":"string","description":"ParentPriceID references the root price (always set for price lineage tracking)"},"plan":{"oneOf":[{}]},"price_unit":{"type":"string","description":"PriceUnit is the code of the price unit (e.g., 'btc', 'eth')"},"price_unit_amount":{"type":"string","description":"PriceUnitAmount is the amount of the price unit"},"price_unit_id":{"type":"string","description":"PriceUnitID is the id of the price unit (for CUSTOM type)"},"price_unit_tiers":{"type":"array","description":"PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED","items":{"type":"object","properties":{"flat_amount":{"type":"string","description":"flat_amount is the flat amount for the given tier (optional)\nApplied on top of unit_amount*quantity. Useful for cases like \"2.7$ + 5c\""},"unit_amount":{"type":"string","description":"unit_amount is the amount per unit for the given tier"},"up_to":{"type":"integer","description":"up_to is the quantity up to which this tier applies. It is null for the last tier.\nIMPORTANT: Tier boundaries are INCLUSIVE.\n- If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier\n- This behavior is consistent across both VOLUME and SLAB tier modes"}}}},"price_unit_type":{"type":"string","enum":["FIAT","CUSTOM"],"x-enum-varnames":["PRICE_UNIT_TYPE_FIAT","PRICE_UNIT_TYPE_CUSTOM"],"x-speakeasy-name-override":"PriceUnitType"},"pricing_unit":{"type":"object","properties":{"base_currency":{"type":"string"},"code":{"type":"string"},"conversion_rate":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"environment_id":{"type":"string"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"symbol":{"type":"string"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"sequence":{"type":"integer","description":"Sequence is the monotonic stamp bumped on every state change that\nsubscription line items need to react to. Read by the plan-price sync;\nset by the database (DEFAULT nextval) on create and by the price\nrepository on termination / compatibility-affecting edits."},"start_date":{"type":"string","description":"StartDate is the start date of the price","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"tier_mode":{"type":"string","enum":["VOLUME","SLAB"],"x-enum-varnames":["BILLING_TIER_VOLUME","BILLING_TIER_SLAB"],"x-speakeasy-name-override":"BillingTier"},"tiers":{"type":"array","items":{"type":"object","properties":{"flat_amount":{"type":"string","description":"flat_amount is the flat amount for the given tier (optional)\nApplied on top of unit_amount*quantity. Useful for cases like \"2.7$ + 5c\""},"unit_amount":{"type":"string","description":"unit_amount is the amount per unit for the given tier"},"up_to":{"type":"integer","description":"up_to is the quantity up to which this tier applies. It is null for the last tier.\nIMPORTANT: Tier boundaries are INCLUSIVE.\n- If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier\n- This behavior is consistent across both VOLUME and SLAB tier modes"}}}},"transform_quantity":{"type":"object","properties":{"divide_by":{"type":"integer","description":"Divide quantity by this number"},"round":{"type":"string","enum":["up","down"],"x-enum-varnames":["ROUND_UP","ROUND_DOWN"],"x-speakeasy-name-override":"RoundType"}}},"trial_period_days":{"type":"integer","description":"TrialPeriodDays is the number of days for the trial period\nNote: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)"},"type":{"type":"string","enum":["USAGE","FIXED"],"x-enum-varnames":["PRICE_TYPE_USAGE","PRICE_TYPE_FIXED"],"x-speakeasy-name-override":"PriceType"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"1c99a94f-ba2d-4aeb-aec5-928f5daeddec":{"type":"object","properties":{"addon":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grants":{"type":"array","items":{"type":"object","properties":{"addon_id":{"type":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grant_anchor":{"type":"string","format":"date-time"},"credits":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"expiration_duration":{"type":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod"},"period_count":{"type":"integer"},"plan_id":{"type":"string"},"priority":{"type":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope"},"start_date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"tenant_id":{"type":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"description":{"type":"string"},"entitlements":{"type":"array","items":{"$circularRef":"1c99a94f-ba2d-4aeb-aec5-928f5daeddec"}},"environment_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":true},"name":{"type":"string"},"price_sync_status":{"type":"object","properties":{"current_sequence":{"type":"integer"},"synced":{"type":"boolean"},"unsynced_association_count":{"type":"integer"}}},"prices":{"type":"array","description":"Optional expanded fields","items":{"type":"object","properties":{"addon":{"oneOf":[{}]},"amount":{"type":"string","description":"Amount stored in main currency units (e.g., dollars, not cents)\nFor USD: 12.50 means $12.50"},"billing_cadence":{"type":"string","enum":["RECURRING"],"x-enum-varnames":["BILLING_CADENCE_RECURRING"],"x-speakeasy-name-override":"BillingCadence"},"billing_model":{"type":"string","enum":["FLAT_FEE","PACKAGE","TIERED"],"x-enum-varnames":["BILLING_MODEL_FLAT_FEE","BILLING_MODEL_PACKAGE","BILLING_MODEL_TIERED"],"x-speakeasy-name-override":"BillingModel"},"billing_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod"},"billing_period_count":{"type":"integer","description":"BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12"},"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"conversion_rate":{"type":"string","description":"ConversionRate is the conversion rate of the price unit to the fiat currency"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"currency":{"type":"string","description":"Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp"},"description":{"type":"string","description":"Description of the price"},"display_amount":{"type":"string","description":"DisplayAmount is the formatted amount with currency symbol\nFor USD: $12.50"},"display_name":{"type":"string","description":"DisplayName is the name of the price"},"display_price_unit_amount":{"type":"string","description":"DisplayPriceUnitAmount is the formatted amount of the price unit"},"end_date":{"type":"string","description":"EndDate is the end date of the price","format":"date-time"},"entity_id":{"type":"string","description":"EntityID holds the value of the \"entity_id\" field."},"entity_type":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON","PRICE","COSTSHEET"],"x-enum-varnames":["PRICE_ENTITY_TYPE_PLAN","PRICE_ENTITY_TYPE_SUBSCRIPTION","PRICE_ENTITY_TYPE_ADDON","PRICE_ENTITY_TYPE_PRICE","PRICE_ENTITY_TYPE_COSTSHEET"],"x-speakeasy-name-override":"PriceEntityType"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the price"},"feature":{"type":"object","properties":{"reporting_unit":{"type":"object","properties":{"conversion_rate":{"type":"number","description":"Multiplier: reporting_unit_value = unit_value * conversion_rate; must be > 0"},"unit_plural":{"type":"string","description":"Display unit label, plural (e.g. \"seconds\")"},"unit_singular":{"type":"string","description":"Display unit label, singular (e.g. \"second\")"}},"x-speakeasy-name-override":"ReportingUnit"}}},"group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"entity_ids":{"type":"array","items":{"type":"string"}},"entity_type":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"status":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"group_id":{"type":"string","description":"GroupID references the group this price belongs to"},"id":{"type":"string","description":"ID uuid identifier for the price"},"invoice_cadence":{"type":"string","enum":["ARREAR","ADVANCE"],"x-enum-varnames":["InvoiceCadenceArrear","InvoiceCadenceAdvance"],"x-speakeasy-name-override":"InvoiceCadence"},"lookup_key":{"type":"string","description":"LookupKey used for looking up the price in the database"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel)."},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set."},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total."},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null."},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType"}}},"created_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"},"event_name":{"type":"string","example":"api_request"},"filters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string"}}}}},"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","example":"API Usage Meter"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage"},"status":{"type":"string","example":"published"},"tenant_id":{"type":"string","example":"tenant123"},"updated_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"}}},"meter_id":{"type":"string","description":"MeterID is the id of the meter for usage based pricing"},"min_quantity":{"oneOf":[{"type":"string","description":"MinQuantity is the minimum quantity of the price"},{"type":"null","description":"MinQuantity is the minimum quantity of the price"}]},"parent_price_id":{"type":"string","description":"ParentPriceID references the root price (always set for price lineage tracking)"},"plan":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grants":{"type":"array","items":{"type":"object","properties":{"addon_id":{"type":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grant_anchor":{"type":"string","format":"date-time"},"credits":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"expiration_duration":{"type":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod"},"period_count":{"type":"integer"},"plan_id":{"type":"string"},"priority":{"type":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope"},"start_date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"tenant_id":{"type":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"description":{"type":"string"},"display_order":{"type":"integer"},"entitlements":{"type":"array","items":{"$circularRef":"1c99a94f-ba2d-4aeb-aec5-928f5daeddec"}},"environment_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"price_sync_status":{"type":"object","properties":{"current_sequence":{"type":"integer"},"synced":{"type":"boolean"},"unsynced_subscription_count":{"type":"integer"}}},"prices":{"type":"array","description":"TODO: Add inline addons","items":{"$circularRef":"0dc125d7-6bd8-40a5-8d18-2c0190dcf082"}},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"price_unit":{"type":"string","description":"PriceUnit is the code of the price unit (e.g., 'btc', 'eth')"},"price_unit_amount":{"type":"string","description":"PriceUnitAmount is the amount of the price unit"},"price_unit_id":{"type":"string","description":"PriceUnitID is the id of the price unit (for CUSTOM type)"},"price_unit_tiers":{"type":"array","description":"PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED","items":{"type":"object","properties":{"flat_amount":{"type":"string","description":"flat_amount is the flat amount for the given tier (optional)\nApplied on top of unit_amount*quantity. Useful for cases like \"2.7$ + 5c\""},"unit_amount":{"type":"string","description":"unit_amount is the amount per unit for the given tier"},"up_to":{"type":"integer","description":"up_to is the quantity up to which this tier applies. It is null for the last tier.\nIMPORTANT: Tier boundaries are INCLUSIVE.\n- If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier\n- This behavior is consistent across both VOLUME and SLAB tier modes"}}}},"price_unit_type":{"type":"string","enum":["FIAT","CUSTOM"],"x-enum-varnames":["PRICE_UNIT_TYPE_FIAT","PRICE_UNIT_TYPE_CUSTOM"],"x-speakeasy-name-override":"PriceUnitType"},"pricing_unit":{"type":"object","properties":{"base_currency":{"type":"string"},"code":{"type":"string"},"conversion_rate":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"environment_id":{"type":"string"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"symbol":{"type":"string"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"sequence":{"type":"integer","description":"Sequence is the monotonic stamp bumped on every state change that\nsubscription line items need to react to. Read by the plan-price sync;\nset by the database (DEFAULT nextval) on create and by the price\nrepository on termination / compatibility-affecting edits."},"start_date":{"type":"string","description":"StartDate is the start date of the price","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"tier_mode":{"type":"string","enum":["VOLUME","SLAB"],"x-enum-varnames":["BILLING_TIER_VOLUME","BILLING_TIER_SLAB"],"x-speakeasy-name-override":"BillingTier"},"tiers":{"type":"array","items":{"type":"object","properties":{"flat_amount":{"type":"string","description":"flat_amount is the flat amount for the given tier (optional)\nApplied on top of unit_amount*quantity. Useful for cases like \"2.7$ + 5c\""},"unit_amount":{"type":"string","description":"unit_amount is the amount per unit for the given tier"},"up_to":{"type":"integer","description":"up_to is the quantity up to which this tier applies. It is null for the last tier.\nIMPORTANT: Tier boundaries are INCLUSIVE.\n- If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier\n- This behavior is consistent across both VOLUME and SLAB tier modes"}}}},"transform_quantity":{"type":"object","properties":{"divide_by":{"type":"integer","description":"Divide quantity by this number"},"round":{"type":"string","enum":["up","down"],"x-enum-varnames":["ROUND_UP","ROUND_DOWN"],"x-speakeasy-name-override":"RoundType"}}},"trial_period_days":{"type":"integer","description":"TrialPeriodDays is the number of days for the trial period\nNote: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)"},"type":{"type":"string","enum":["USAGE","FIXED"],"x-enum-varnames":["PRICE_TYPE_USAGE","PRICE_TYPE_FIXED"],"x-speakeasy-name-override":"PriceType"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"aggregation_mode":{"type":"string","enum":["additive","parallel"],"x-enum-varnames":["EntitlementAggregationModeAdditive","EntitlementAggregationModeParallel"],"x-speakeasy-name-override":"EntitlementAggregationMode"},"config_value":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"display_order":{"type":"integer"},"end_date":{"type":"string","format":"date-time"},"entity_id":{"type":"string"},"entity_type":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["ENTITLEMENT_ENTITY_TYPE_PLAN","ENTITLEMENT_ENTITY_TYPE_SUBSCRIPTION","ENTITLEMENT_ENTITY_TYPE_ADDON"],"x-speakeasy-name-override":"EntitlementEntityType"},"environment_id":{"type":"string"},"feature":{"type":"object","properties":{"alert_settings":{"type":"object","properties":{"alert_enabled":{"type":"boolean"},"alert_threshold_type":{"type":"string","enum":["absolute","percentage"],"x-enum-varnames":["AlertThresholdTypeAbsolute","AlertThresholdTypePercentage"],"x-speakeasy-name-override":"AlertThresholdType"},"critical":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition"},"threshold":{"type":"string"}},"x-speakeasy-name-override":"AlertThreshold"},"info":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition"},"threshold":{"type":"string"}},"x-speakeasy-name-override":"AlertThreshold"},"warning":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition"},"threshold":{"type":"string"}},"x-speakeasy-name-override":"AlertThreshold"}},"x-speakeasy-name-override":"AlertSettings"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"description":{"type":"string"},"environment_id":{"type":"string"},"group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"entity_ids":{"type":"array","items":{"type":"string"}},"entity_type":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"status":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"group_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel)."},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set."},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total."},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null."},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType"}}},"created_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"},"event_name":{"type":"string","example":"api_request"},"filters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string"}}}}},"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","example":"API Usage Meter"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage"},"status":{"type":"string","example":"published"},"tenant_id":{"type":"string","example":"tenant123"},"updated_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"}}},"meter_id":{"type":"string"},"name":{"type":"string"},"reporting_unit":{"type":"object","properties":{"conversion_rate":{"type":"number","description":"Multiplier: reporting_unit_value = unit_value * conversion_rate; must be > 0"},"unit_plural":{"type":"string","description":"Display unit label, plural (e.g. \"seconds\")"},"unit_singular":{"type":"string","description":"Display unit label, singular (e.g. \"second\")"}},"x-speakeasy-name-override":"ReportingUnit"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"type":{"type":"string","enum":["metered","boolean","static","config"],"x-enum-varnames":["FeatureTypeMetered","FeatureTypeBoolean","FeatureTypeStatic","FeatureTypeConfig"],"x-speakeasy-name-override":"FeatureType"},"unit_plural":{"type":"string"},"unit_singular":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"feature_id":{"type":"string"},"feature_type":{"type":"string","enum":["metered","boolean","static","config"],"x-enum-varnames":["FeatureTypeMetered","FeatureTypeBoolean","FeatureTypeStatic","FeatureTypeConfig"],"x-speakeasy-name-override":"FeatureType"},"grant_allocation_behavior":{"type":"string","enum":["first_usage","unit_start"],"x-enum-varnames":["EntitlementGrantAllocationBehaviorFirstUsage","EntitlementGrantAllocationBehaviorUnitStart"],"x-speakeasy-name-override":"EntitlementGrantAllocationBehavior"},"grant_duration_unit":{"type":"string","enum":["hour","day","week","subscription_period"],"x-enum-varnames":["EntitlementGrantDurationUnitHour","EntitlementGrantDurationUnitDay","EntitlementGrantDurationUnitWeek","EntitlementGrantDurationUnitSubscriptionPeriod"],"x-speakeasy-name-override":"EntitlementGrantDurationUnit"},"grant_duration_value":{"type":"integer"},"grant_measure":{"type":"string","enum":["quantity","amount"],"x-enum-varnames":["EntitlementGrantMeasureQuantity","EntitlementGrantMeasureAmount"],"x-speakeasy-name-override":"EntitlementGrantMeasure"},"grant_quota":{"type":"string"},"id":{"type":"string"},"is_enabled":{"type":"boolean"},"is_soft_limit":{"type":"boolean"},"parent_entitlement_id":{"type":"string"},"plan":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grants":{"type":"array","items":{"type":"object","properties":{"addon_id":{"type":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grant_anchor":{"type":"string","format":"date-time"},"credits":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"expiration_duration":{"type":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod"},"period_count":{"type":"integer"},"plan_id":{"type":"string"},"priority":{"type":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope"},"start_date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"tenant_id":{"type":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"description":{"type":"string"},"display_order":{"type":"integer"},"entitlements":{"type":"array","items":{"$circularRef":"1c99a94f-ba2d-4aeb-aec5-928f5daeddec"}},"environment_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"price_sync_status":{"type":"object","properties":{"current_sequence":{"type":"integer"},"synced":{"type":"boolean"},"unsynced_subscription_count":{"type":"integer"}}},"prices":{"type":"array","description":"TODO: Add inline addons","items":{"$circularRef":"0dc125d7-6bd8-40a5-8d18-2c0190dcf082"}},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"plan_id":{"type":"string","description":"TODO: Remove this once we have a proper entitlement entity type"},"start_date":{"type":"string","format":"date-time"},"static_value":{"type":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"},"usage_limit":{"type":"integer"},"usage_reset_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","NEVER"],"x-enum-varnames":["ENTITLEMENT_USAGE_RESET_PERIOD_MONTHLY","ENTITLEMENT_USAGE_RESET_PERIOD_ANNUAL","ENTITLEMENT_USAGE_RESET_PERIOD_WEEKLY","ENTITLEMENT_USAGE_RESET_PERIOD_DAILY","ENTITLEMENT_USAGE_RESET_PERIOD_QUARTER","ENTITLEMENT_USAGE_RESET_PERIOD_HALF_YEAR","ENTITLEMENT_USAGE_RESET_PERIOD_NEVER"],"x-speakeasy-name-override":"EntitlementUsageResetPeriod"}}},"0dc125d7-6bd8-40a5-8d18-2c0190dcf082":{"type":"object","properties":{"addon":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grants":{"type":"array","items":{"type":"object","properties":{"addon_id":{"type":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grant_anchor":{"type":"string","format":"date-time"},"credits":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"expiration_duration":{"type":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod"},"period_count":{"type":"integer"},"plan_id":{"type":"string"},"priority":{"type":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope"},"start_date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"tenant_id":{"type":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"description":{"type":"string"},"entitlements":{"type":"array","items":{"type":"object","properties":{"addon":{"oneOf":[{}]},"aggregation_mode":{"type":"string","enum":["additive","parallel"],"x-enum-varnames":["EntitlementAggregationModeAdditive","EntitlementAggregationModeParallel"],"x-speakeasy-name-override":"EntitlementAggregationMode"},"config_value":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"display_order":{"type":"integer"},"end_date":{"type":"string","format":"date-time"},"entity_id":{"type":"string"},"entity_type":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["ENTITLEMENT_ENTITY_TYPE_PLAN","ENTITLEMENT_ENTITY_TYPE_SUBSCRIPTION","ENTITLEMENT_ENTITY_TYPE_ADDON"],"x-speakeasy-name-override":"EntitlementEntityType"},"environment_id":{"type":"string"},"feature":{"type":"object","properties":{"alert_settings":{"type":"object","properties":{"alert_enabled":{"type":"boolean"},"alert_threshold_type":{"type":"string","enum":["absolute","percentage"],"x-enum-varnames":["AlertThresholdTypeAbsolute","AlertThresholdTypePercentage"],"x-speakeasy-name-override":"AlertThresholdType"},"critical":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition"},"threshold":{"type":"string"}},"x-speakeasy-name-override":"AlertThreshold"},"info":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition"},"threshold":{"type":"string"}},"x-speakeasy-name-override":"AlertThreshold"},"warning":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition"},"threshold":{"type":"string"}},"x-speakeasy-name-override":"AlertThreshold"}},"x-speakeasy-name-override":"AlertSettings"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"description":{"type":"string"},"environment_id":{"type":"string"},"group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"entity_ids":{"type":"array","items":{"type":"string"}},"entity_type":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"status":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"group_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel)."},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set."},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total."},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null."},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType"}}},"created_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"},"event_name":{"type":"string","example":"api_request"},"filters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string"}}}}},"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","example":"API Usage Meter"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage"},"status":{"type":"string","example":"published"},"tenant_id":{"type":"string","example":"tenant123"},"updated_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"}}},"meter_id":{"type":"string"},"name":{"type":"string"},"reporting_unit":{"type":"object","properties":{"conversion_rate":{"type":"number","description":"Multiplier: reporting_unit_value = unit_value * conversion_rate; must be > 0"},"unit_plural":{"type":"string","description":"Display unit label, plural (e.g. \"seconds\")"},"unit_singular":{"type":"string","description":"Display unit label, singular (e.g. \"second\")"}},"x-speakeasy-name-override":"ReportingUnit"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"type":{"type":"string","enum":["metered","boolean","static","config"],"x-enum-varnames":["FeatureTypeMetered","FeatureTypeBoolean","FeatureTypeStatic","FeatureTypeConfig"],"x-speakeasy-name-override":"FeatureType"},"unit_plural":{"type":"string"},"unit_singular":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"feature_id":{"type":"string"},"feature_type":{"type":"string","enum":["metered","boolean","static","config"],"x-enum-varnames":["FeatureTypeMetered","FeatureTypeBoolean","FeatureTypeStatic","FeatureTypeConfig"],"x-speakeasy-name-override":"FeatureType"},"grant_allocation_behavior":{"type":"string","enum":["first_usage","unit_start"],"x-enum-varnames":["EntitlementGrantAllocationBehaviorFirstUsage","EntitlementGrantAllocationBehaviorUnitStart"],"x-speakeasy-name-override":"EntitlementGrantAllocationBehavior"},"grant_duration_unit":{"type":"string","enum":["hour","day","week","subscription_period"],"x-enum-varnames":["EntitlementGrantDurationUnitHour","EntitlementGrantDurationUnitDay","EntitlementGrantDurationUnitWeek","EntitlementGrantDurationUnitSubscriptionPeriod"],"x-speakeasy-name-override":"EntitlementGrantDurationUnit"},"grant_duration_value":{"type":"integer"},"grant_measure":{"type":"string","enum":["quantity","amount"],"x-enum-varnames":["EntitlementGrantMeasureQuantity","EntitlementGrantMeasureAmount"],"x-speakeasy-name-override":"EntitlementGrantMeasure"},"grant_quota":{"type":"string"},"id":{"type":"string"},"is_enabled":{"type":"boolean"},"is_soft_limit":{"type":"boolean"},"parent_entitlement_id":{"type":"string"},"plan":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grants":{"type":"array","items":{"type":"object","properties":{"addon_id":{"type":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grant_anchor":{"type":"string","format":"date-time"},"credits":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"expiration_duration":{"type":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod"},"period_count":{"type":"integer"},"plan_id":{"type":"string"},"priority":{"type":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope"},"start_date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"tenant_id":{"type":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"description":{"type":"string"},"display_order":{"type":"integer"},"entitlements":{"type":"array","items":{"$circularRef":"1c99a94f-ba2d-4aeb-aec5-928f5daeddec"}},"environment_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"price_sync_status":{"type":"object","properties":{"current_sequence":{"type":"integer"},"synced":{"type":"boolean"},"unsynced_subscription_count":{"type":"integer"}}},"prices":{"type":"array","description":"TODO: Add inline addons","items":{"$circularRef":"0dc125d7-6bd8-40a5-8d18-2c0190dcf082"}},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"plan_id":{"type":"string","description":"TODO: Remove this once we have a proper entitlement entity type"},"start_date":{"type":"string","format":"date-time"},"static_value":{"type":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"},"usage_limit":{"type":"integer"},"usage_reset_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","NEVER"],"x-enum-varnames":["ENTITLEMENT_USAGE_RESET_PERIOD_MONTHLY","ENTITLEMENT_USAGE_RESET_PERIOD_ANNUAL","ENTITLEMENT_USAGE_RESET_PERIOD_WEEKLY","ENTITLEMENT_USAGE_RESET_PERIOD_DAILY","ENTITLEMENT_USAGE_RESET_PERIOD_QUARTER","ENTITLEMENT_USAGE_RESET_PERIOD_HALF_YEAR","ENTITLEMENT_USAGE_RESET_PERIOD_NEVER"],"x-speakeasy-name-override":"EntitlementUsageResetPeriod"}}}},"environment_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":true},"name":{"type":"string"},"price_sync_status":{"type":"object","properties":{"current_sequence":{"type":"integer"},"synced":{"type":"boolean"},"unsynced_association_count":{"type":"integer"}}},"prices":{"type":"array","description":"Optional expanded fields","items":{"$circularRef":"0dc125d7-6bd8-40a5-8d18-2c0190dcf082"}},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"amount":{"type":"string","description":"Amount stored in main currency units (e.g., dollars, not cents)\nFor USD: 12.50 means $12.50"},"billing_cadence":{"type":"string","enum":["RECURRING"],"x-enum-varnames":["BILLING_CADENCE_RECURRING"],"x-speakeasy-name-override":"BillingCadence"},"billing_model":{"type":"string","enum":["FLAT_FEE","PACKAGE","TIERED"],"x-enum-varnames":["BILLING_MODEL_FLAT_FEE","BILLING_MODEL_PACKAGE","BILLING_MODEL_TIERED"],"x-speakeasy-name-override":"BillingModel"},"billing_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod"},"billing_period_count":{"type":"integer","description":"BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12"},"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"conversion_rate":{"type":"string","description":"ConversionRate is the conversion rate of the price unit to the fiat currency"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"currency":{"type":"string","description":"Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp"},"description":{"type":"string","description":"Description of the price"},"display_amount":{"type":"string","description":"DisplayAmount is the formatted amount with currency symbol\nFor USD: $12.50"},"display_name":{"type":"string","description":"DisplayName is the name of the price"},"display_price_unit_amount":{"type":"string","description":"DisplayPriceUnitAmount is the formatted amount of the price unit"},"end_date":{"type":"string","description":"EndDate is the end date of the price","format":"date-time"},"entity_id":{"type":"string","description":"EntityID holds the value of the \"entity_id\" field."},"entity_type":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON","PRICE","COSTSHEET"],"x-enum-varnames":["PRICE_ENTITY_TYPE_PLAN","PRICE_ENTITY_TYPE_SUBSCRIPTION","PRICE_ENTITY_TYPE_ADDON","PRICE_ENTITY_TYPE_PRICE","PRICE_ENTITY_TYPE_COSTSHEET"],"x-speakeasy-name-override":"PriceEntityType"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the price"},"feature":{"type":"object","properties":{"reporting_unit":{"type":"object","properties":{"conversion_rate":{"type":"number","description":"Multiplier: reporting_unit_value = unit_value * conversion_rate; must be > 0"},"unit_plural":{"type":"string","description":"Display unit label, plural (e.g. \"seconds\")"},"unit_singular":{"type":"string","description":"Display unit label, singular (e.g. \"second\")"}},"x-speakeasy-name-override":"ReportingUnit"}}},"group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"entity_ids":{"type":"array","items":{"type":"string"}},"entity_type":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"status":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"group_id":{"type":"string","description":"GroupID references the group this price belongs to"},"id":{"type":"string","description":"ID uuid identifier for the price"},"invoice_cadence":{"type":"string","enum":["ARREAR","ADVANCE"],"x-enum-varnames":["InvoiceCadenceArrear","InvoiceCadenceAdvance"],"x-speakeasy-name-override":"InvoiceCadence"},"lookup_key":{"type":"string","description":"LookupKey used for looking up the price in the database"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel)."},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set."},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total."},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null."},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType"}}},"created_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"},"event_name":{"type":"string","example":"api_request"},"filters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string"}}}}},"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","example":"API Usage Meter"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage"},"status":{"type":"string","example":"published"},"tenant_id":{"type":"string","example":"tenant123"},"updated_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"}}},"meter_id":{"type":"string","description":"MeterID is the id of the meter for usage based pricing"},"min_quantity":{"oneOf":[{"type":"string","description":"MinQuantity is the minimum quantity of the price"},{"type":"null","description":"MinQuantity is the minimum quantity of the price"}]},"parent_price_id":{"type":"string","description":"ParentPriceID references the root price (always set for price lineage tracking)"},"plan":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grants":{"type":"array","items":{"type":"object","properties":{"addon_id":{"type":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grant_anchor":{"type":"string","format":"date-time"},"credits":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"expiration_duration":{"type":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod"},"period_count":{"type":"integer"},"plan_id":{"type":"string"},"priority":{"type":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope"},"start_date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"tenant_id":{"type":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"description":{"type":"string"},"display_order":{"type":"integer"},"entitlements":{"type":"array","items":{"$circularRef":"1c99a94f-ba2d-4aeb-aec5-928f5daeddec"}},"environment_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"price_sync_status":{"type":"object","properties":{"current_sequence":{"type":"integer"},"synced":{"type":"boolean"},"unsynced_subscription_count":{"type":"integer"}}},"prices":{"type":"array","description":"TODO: Add inline addons","items":{"$circularRef":"0dc125d7-6bd8-40a5-8d18-2c0190dcf082"}},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"price_unit":{"type":"string","description":"PriceUnit is the code of the price unit (e.g., 'btc', 'eth')"},"price_unit_amount":{"type":"string","description":"PriceUnitAmount is the amount of the price unit"},"price_unit_id":{"type":"string","description":"PriceUnitID is the id of the price unit (for CUSTOM type)"},"price_unit_tiers":{"type":"array","description":"PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED","items":{"type":"object","properties":{"flat_amount":{"type":"string","description":"flat_amount is the flat amount for the given tier (optional)\nApplied on top of unit_amount*quantity. Useful for cases like \"2.7$ + 5c\""},"unit_amount":{"type":"string","description":"unit_amount is the amount per unit for the given tier"},"up_to":{"type":"integer","description":"up_to is the quantity up to which this tier applies. It is null for the last tier.\nIMPORTANT: Tier boundaries are INCLUSIVE.\n- If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier\n- This behavior is consistent across both VOLUME and SLAB tier modes"}}}},"price_unit_type":{"type":"string","enum":["FIAT","CUSTOM"],"x-enum-varnames":["PRICE_UNIT_TYPE_FIAT","PRICE_UNIT_TYPE_CUSTOM"],"x-speakeasy-name-override":"PriceUnitType"},"pricing_unit":{"type":"object","properties":{"base_currency":{"type":"string"},"code":{"type":"string"},"conversion_rate":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"environment_id":{"type":"string"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"symbol":{"type":"string"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"sequence":{"type":"integer","description":"Sequence is the monotonic stamp bumped on every state change that\nsubscription line items need to react to. Read by the plan-price sync;\nset by the database (DEFAULT nextval) on create and by the price\nrepository on termination / compatibility-affecting edits."},"start_date":{"type":"string","description":"StartDate is the start date of the price","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"tier_mode":{"type":"string","enum":["VOLUME","SLAB"],"x-enum-varnames":["BILLING_TIER_VOLUME","BILLING_TIER_SLAB"],"x-speakeasy-name-override":"BillingTier"},"tiers":{"type":"array","items":{"type":"object","properties":{"flat_amount":{"type":"string","description":"flat_amount is the flat amount for the given tier (optional)\nApplied on top of unit_amount*quantity. Useful for cases like \"2.7$ + 5c\""},"unit_amount":{"type":"string","description":"unit_amount is the amount per unit for the given tier"},"up_to":{"type":"integer","description":"up_to is the quantity up to which this tier applies. It is null for the last tier.\nIMPORTANT: Tier boundaries are INCLUSIVE.\n- If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier\n- This behavior is consistent across both VOLUME and SLAB tier modes"}}}},"transform_quantity":{"type":"object","properties":{"divide_by":{"type":"integer","description":"Divide quantity by this number"},"round":{"type":"string","enum":["up","down"],"x-enum-varnames":["ROUND_UP","ROUND_DOWN"],"x-speakeasy-name-override":"RoundType"}}},"trial_period_days":{"type":"integer","description":"TrialPeriodDays is the number of days for the trial period\nNote: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)"},"type":{"type":"string","enum":["USAGE","FIXED"],"x-enum-varnames":["PRICE_TYPE_USAGE","PRICE_TYPE_FIXED"],"x-speakeasy-name-override":"PriceType"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"d50c71bf-2b9a-41df-ba09-3621d0d9d197":{"type":"object","properties":{"adjustment_amount":{"type":"string","description":"adjustment_amount is the total sum of credit notes of type \"adjustment\".\nThese are non-cash reductions applied to the invoice (e.g. goodwill credit, billing correction)."},"amount_due":{"type":"string","description":"amount_due is the total amount that needs to be paid for this invoice"},"amount_paid":{"type":"string","description":"amount_paid is the amount that has already been paid towards this invoice"},"amount_remaining":{"type":"string","description":"amount_remaining is the outstanding amount still owed on this invoice (calculated as amount_due minus amount_paid)"},"billing_period":{"type":"string","description":"billing_period describes the billing period this invoice covers (e.g., \"January 2024\", \"Q1 2024\")"},"billing_reason":{"type":"string","description":"billing_reason indicates why this invoice was generated (e.g., \"subscription_billing\", \"manual_charge\")"},"billing_sequence":{"type":"integer","description":"billing_sequence is the sequential number indicating the billing cycle for subscription invoices"},"checkout_session":{"type":"object","properties":{"action":{"type":"string","enum":["create_subscription","modify_subscription","wallet_topup","add_addon","pay_invoice"],"x-enum-varnames":["CheckoutActionCreateSubscription","CheckoutActionModifySubscription","CheckoutActionWalletTopup","CheckoutActionAddAddon","CheckoutActionPayInvoice"],"x-speakeasy-name-override":"CheckoutAction"},"cancel_url":{"type":"string"},"cancelled_at":{"type":"string","format":"date-time"},"checkout_invoice_id":{"type":"string"},"checkout_payment_id":{"type":"string"},"checkout_status":{"type":"string","enum":["initiated","pending","completed","failed","expired"],"x-enum-varnames":["CheckoutStatusInitiated","CheckoutStatusPending","CheckoutStatusCompleted","CheckoutStatusFailed","CheckoutStatusExpired"],"x-speakeasy-name-override":"CheckoutStatus"},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"customer_id":{"type":"string"},"entity_creation_result":{"type":"object","properties":{"entity_id":{"type":"string"},"status":{"type":"string","enum":["created","superseded","failed_already_exists"],"x-enum-varnames":["EntityCreationStatusCreated","EntityCreationStatusSuperseded","EntityCreationStatusFailedAlreadyExists"],"x-speakeasy-name-override":"EntityCreationStatus"}}},"expires_at":{"type":"string","format":"date-time"},"failure_reason":{"type":"string"},"failure_url":{"type":"string"},"id":{"type":"string"},"idempotency_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"next_poll_after_ms":{"type":"integer","description":"NextPollAfterMs is how long a client should wait before reading again.\nZero means stop — either the session is terminal, or this response did not\ncome from a polling read."},"payment":{"type":"object","properties":{"gateway":{"type":"string"},"id":{"type":"string"},"status":{"type":"string","enum":["INITIATED","PENDING","PROCESSING","SUCCEEDED","OVERPAID","FAILED","REFUNDED","PARTIALLY_REFUNDED","VOIDED"],"x-enum-varnames":["PaymentStatusInitiated","PaymentStatusPending","PaymentStatusProcessing","PaymentStatusSucceeded","PaymentStatusOverpaid","PaymentStatusFailed","PaymentStatusRefunded","PaymentStatusPartiallyRefunded","PaymentStatusVoided"],"x-speakeasy-name-override":"PaymentStatus"}}},"payment_action":{"type":"object","properties":{"type":{"type":"string","enum":["checkout_url","payment_link"],"x-enum-varnames":["PaymentActionTypeCheckoutURL","PaymentActionTypePaymentLink"],"x-speakeasy-name-override":"PaymentActionType"},"url":{"type":"string"}},"x-speakeasy-name-override":"PaymentAction"},"payment_provider":{"type":"string","enum":["razorpay","chargebee","stripe"],"x-enum-varnames":["CheckoutPaymentProviderRazorpay","CheckoutPaymentProviderChargebee","CheckoutPaymentProviderStripe"],"x-speakeasy-name-override":"CheckoutPaymentProvider"},"stale":{"type":"boolean","description":"Stale reports that this response is stored state that was not checked against\nthe payment provider on this request — the read was debounced, or the gateway\ndid not answer. A UI should say \"still checking\" rather than presenting a\nstale answer as fact."},"success_url":{"type":"string"},"terminal":{"type":"boolean","description":"Terminal reports whether the session has finished. Clients poll until this is\ntrue rather than hardcoding the status set, which would go stale if a status\nis ever added."},"updated_at":{"type":"string","format":"date-time"}}},"coupon_applications":{"type":"array","description":"coupon_applications contains the coupon applications associated with this invoice (overrides embedded field)","items":{"type":"object","properties":{"applied_at":{"type":"string","format":"date-time"},"coupon_association_id":{"type":"string"},"coupon_id":{"type":"string"},"coupon_snapshot":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"currency":{"type":"string"},"discount_percentage":{"type":"string"},"discount_type":{"type":"string","enum":["fixed","percentage"],"x-enum-varnames":["CouponTypeFixed","CouponTypePercentage"],"x-speakeasy-name-override":"CouponType"},"discounted_amount":{"type":"string"},"environment_id":{"type":"string"},"final_price":{"type":"string"},"id":{"type":"string"},"invoice_id":{"type":"string"},"invoice_line_item_id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"original_price":{"type":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"currency":{"type":"string","description":"currency is the three-letter ISO currency code (e.g., USD, EUR, GBP) that applies to all monetary amounts on this invoice"},"custom_currency":{"type":"object","properties":{"amount_due":{"type":"string"},"code":{"type":"string"},"rate":{"type":"string","description":"fiat per 1 unit of Code; the live factor while draft, frozen at finalization"},"subtotal":{"type":"string"},"total":{"type":"string"},"total_discount":{"type":"string"},"total_prepaid_credits_applied":{"type":"string"},"total_tax":{"type":"string"}},"x-speakeasy-name-override":"CustomCurrency"},"customer":{"type":"object","properties":{"address_city":{"type":"string","description":"AddressCity is the city of the customer's address"},"address_country":{"type":"string","description":"AddressCountry is the country of the customer's address (ISO 3166-1 alpha-2)"},"address_line1":{"type":"string","description":"AddressLine1 is the first line of the customer's address"},"address_line2":{"type":"string","description":"AddressLine2 is the second line of the customer's address"},"address_postal_code":{"type":"string","description":"AddressPostalCode is the postal code of the customer's address"},"address_state":{"type":"string","description":"AddressState is the state of the customer's address"},"billing_currency":{"type":"string","description":"BillingCurrency is the fiat currency invoices are issued in; nil means charge currency is used as-is."},"contact":{"type":"string","description":"Contact is an optional contact number for the customer (e.g. phone)"},"contact_persons":{"type":"array","items":{"required":["first_name"],"type":"object","properties":{"first_name":{"maxLength":100,"type":"string","isRequired":true},"department":{"maxLength":100,"type":"string"},"designation":{"maxLength":100,"type":"string"},"email":{"type":"string"},"id":{"type":"string"},"is_primary":{"type":"boolean"},"last_name":{"maxLength":100,"type":"string"},"mobile":{"maxLength":20,"type":"string"},"salutation":{"maxLength":25,"type":"string"}}}},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"email":{"type":"string","description":"Email is the email of the customer"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the customer"},"external_id":{"type":"string","description":"ExternalID is the external identifier for the customer"},"id":{"type":"string","description":"ID is the unique identifier for the customer"},"integrations":{"type":"array","items":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"entity_id":{"type":"string"},"entity_type":{"type":"string","enum":["customer","plan","invoice","subscription","payment","credit_note","addon","item","item_price","price","invoice_line_item","subscription_line_item"],"x-enum-varnames":["IntegrationEntityTypeCustomer","IntegrationEntityTypePlan","IntegrationEntityTypeInvoice","IntegrationEntityTypeSubscription","IntegrationEntityTypePayment","IntegrationEntityTypeCreditNote","IntegrationEntityTypeAddon","IntegrationEntityTypeItem","IntegrationEntityTypeItemPrice","IntegrationEntityTypePrice","IntegrationEntityTypeInvoiceLineItem","IntegrationEntityTypeSubscriptionLineItem"],"x-speakeasy-name-override":"IntegrationEntityType"},"environment_id":{"type":"string"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":true},"provider_entity_id":{"type":"string"},"provider_type":{"type":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata"},"name":{"type":"string","description":"Name is the name of the customer"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tax_treatment":{"type":"string","enum":["taxable","exempt"],"x-enum-varnames":["TaxTreatmentTaxable","TaxTreatmentExempt"],"x-speakeasy-name-override":"TaxTreatment"},"tenant_id":{"type":"string"},"timezone":{"type":"string","description":"Timezone is the customer's IANA timezone name (e.g. \"Asia/Kolkata\").\nDefaults to \"UTC\". Inherited by subscriptions at creation time."},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}},"description":"Customer response object containing all customer information"},"customer_id":{"type":"string","description":"customer_id is the ID of the customer who will receive this invoice"},"description":{"type":"string","description":"description is an optional description or notes about this invoice"},"due_date":{"type":"string","description":"due_date is the date when payment for this invoice is due","format":"date-time"},"environment_id":{"type":"string","description":"environment_id is the ID of the environment this invoice belongs to (for multi-environment setups)"},"finalized_at":{"type":"string","description":"finalized_at is the timestamp when this invoice was finalized and made ready for payment","format":"date-time"},"fx_conversion":{"type":"object","properties":{"billing_currency":{"type":"string","description":"BillingCurrency is the currency the invoice was issued in."},"charge_currency":{"type":"string","description":"ChargeCurrency is the invoice's original (draft) currency."},"converted_at":{"type":"string","description":"ConvertedAt is when the conversion ran.","format":"date-time"},"rate":{"type":"string","description":"Rate is the frozen rate: billing per 1 charge unit."},"rate_id":{"type":"string","description":"RateID is the fx_rates row used, for reference only; never read again."},"scope":{"type":"string","enum":["tenant","customer","subscription"],"x-enum-varnames":["FXRateScopeTenant","FXRateScopeCustomer","FXRateScopeSubscription"],"x-speakeasy-name-override":"FXRateScope"},"source":{"type":"object","properties":{"net":{"type":"string"},"subtotal":{"type":"string"},"total_discount":{"type":"string"},"total_prepaid_credits_applied":{"type":"string"}},"x-speakeasy-name-override":"FxConversionSource"}},"x-speakeasy-name-override":"FxConversion"},"hosted_invoice_url":{"type":"string","description":"hosted_invoice_url is the page where the customer can view, download and pay this invoice"},"id":{"type":"string","description":"id is the unique identifier for this invoice"},"idempotency_key":{"type":"string","description":"idempotency_key is a unique key used to prevent duplicate invoice creation when retrying API calls"},"invoice_number":{"type":"string","description":"invoice_number is the human-readable invoice number displayed to customers (e.g., INV-2024-001)"},"invoice_pdf_url":{"type":"string","description":"invoice_pdf_url is the URL where customers can download the PDF version of this invoice"},"invoice_status":{"type":"string","enum":["DRAFT","FINALIZED","VOIDED","SKIPPED"],"x-enum-varnames":["InvoiceStatusDraft","InvoiceStatusFinalized","InvoiceStatusVoided","InvoiceStatusSkipped"],"x-speakeasy-name-override":"InvoiceStatus"},"invoice_type":{"type":"string","enum":["SUBSCRIPTION","ONE_OFF","CREDIT"],"x-enum-varnames":["InvoiceTypeSubscription","InvoiceTypeOneOff","InvoiceTypeCredit"],"x-speakeasy-name-override":"InvoiceType"},"is_manually_edited":{"type":"boolean","description":"is_manually_edited is true once a user has manually added, edited, or removed a line item on this draft invoice.\nOnce set, automated recomputation of this invoice's line items must no-op rather than overwrite the manual edit."},"issue_date":{"type":"string","description":"issue_date is the user-facing date of the invoice. Defaults to created_at if not set.","format":"date-time"},"last_computed_at":{"type":"string","description":"last_computed_at is the timestamp when this invoice was last computed by ComputeInvoice","format":"date-time"},"line_items":{"type":"array","description":"line_items contains the individual items that make up this invoice (overrides embedded field)","items":{"type":"object","properties":{"adjusted_entitlement_quantity":{"type":"string","description":"adjusted_entitlement_quantity is the entitlement-covered portion deducted from raw usage.\nNil when no entitlement was applied. Raw usage = Quantity + AdjustedEntitlementQuantity."},"amount":{"type":"string"},"commitment_info":{"type":"object","properties":{"amount":{"type":"string"},"computed_commitment_utilized_amount":{"type":"string"},"computed_overage_amount":{"type":"string"},"computed_true_up_amount":{"type":"string","description":"total_cost = computed_commitment_utilized_amount + computed_overage_amount + computed_true_up_amount"},"duration":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod"},"is_windowed":{"type":"boolean"},"overage_factor":{"type":"string"},"quantity":{"type":"string","description":"Only used for quantity-based commitments"},"true_up_enabled":{"type":"boolean"},"type":{"type":"string","enum":["amount","quantity"],"x-enum-varnames":["COMMITMENT_TYPE_AMOUNT","COMMITMENT_TYPE_QUANTITY"],"x-speakeasy-name-override":"CommitmentType"}},"x-speakeasy-name-override":"CommitmentInfo"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"currency":{"type":"string"},"custom_currency":{"type":"object","properties":{"amount":{"type":"string"},"invoice_level_discount":{"type":"string"},"line_item_discount":{"type":"string"},"prepaid_credits_applied":{"type":"string"}},"x-speakeasy-name-override":"CustomCurrencyLineItem"},"customer_id":{"type":"string"},"display_name":{"type":"string"},"entity_id":{"type":"string"},"entity_type":{"type":"string"},"environment_id":{"type":"string"},"fx_conversion":{"type":"object","properties":{"billing_currency":{"type":"string","description":"BillingCurrency is the currency the invoice was issued in."},"charge_currency":{"type":"string","description":"ChargeCurrency is the invoice's original (draft) currency."},"converted_at":{"type":"string","description":"ConvertedAt is when the conversion ran.","format":"date-time"},"rate":{"type":"string","description":"Rate is the frozen rate: billing per 1 charge unit."},"rate_id":{"type":"string","description":"RateID is the fx_rates row used, for reference only; never read again."},"scope":{"type":"string","enum":["tenant","customer","subscription"],"x-enum-varnames":["FXRateScopeTenant","FXRateScopeCustomer","FXRateScopeSubscription"],"x-speakeasy-name-override":"FXRateScope"},"source":{"type":"object","properties":{"net":{"type":"string"},"subtotal":{"type":"string"},"total_discount":{"type":"string"},"total_prepaid_credits_applied":{"type":"string"}},"x-speakeasy-name-override":"FxConversionSource"}},"x-speakeasy-name-override":"FxConversion"},"id":{"type":"string"},"invoice_id":{"type":"string"},"invoice_level_discount":{"type":"string","description":"invoice_level_discount is the discount amount in invoice currency applied to all line items on the invoice."},"line_item_discount":{"type":"string","description":"line_item_discount is the discount amount in invoice currency applied directly to this line item."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"meter_display_name":{"type":"string"},"meter_id":{"type":"string"},"parent_line_item_id":{"type":"string","description":"parent_line_item_id links this line item to the line item it replaced, if it was created by editing\nan existing line item. Forms a linked-list chain across edits; nil for line items that were never edited."},"period_end":{"type":"string","format":"date-time"},"period_start":{"type":"string","format":"date-time"},"plan_display_name":{"type":"string"},"prepaid_credits_applied":{"type":"string","description":"prepaid_credits_applied is the amount in invoice currency reduced from this line item due to prepaid credits application."},"price_id":{"type":"string"},"price_type":{"type":"string"},"price_unit":{"type":"string"},"price_unit_amount":{"type":"string"},"price_unit_id":{"type":"string"},"quantity":{"type":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"subscription_line_item_id":{"type":"string","description":"sub_line_item_id links this invoice line item to the subscription_line_item that generated it."},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"},"usage_analytics":{"type":"array","description":"usage_analytics contains usage analytics for this line item (legacy - grouped by source)","items":{"type":"object","properties":{"cost":{"type":"string","description":"cost is the cost attributed to this source for the line item"},"event_count":{"type":"integer","description":"event_count is the number of events from this source (optional)"},"percentage":{"type":"string","description":"percentage is the percentage of total line item cost from this source (optional)"},"source":{"type":"string","description":"source is the name of the event source"},"usage":{"type":"string","description":"usage is the total usage amount from this source (optional, for additional context)"}}}},"usage_breakdown":{"type":"array","description":"usage_breakdown contains flexible usage breakdown for this line item (supports any grouping)","items":{"type":"object","properties":{"cost":{"type":"string","description":"cost is the cost attributed to this group for the line item"},"event_count":{"type":"integer","description":"event_count is the number of events from this group (optional)"},"grouped_by":{"type":"object","additionalProperties":{"type":"string"},"description":"grouped_by contains the grouping field values (e.g., {\"source\": \"api\", \"org_id\": \"org123\"})"},"percentage":{"type":"string","description":"percentage is the percentage of total line item cost from this group (optional)"},"usage":{"type":"string","description":"usage is the total usage amount from this group (optional, for additional context)"}}}}}}},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"overpaid_amount":{"type":"string","description":"overpaid_amount is the amount overpaid if payment_status is OVERPAID (amount_paid - total)"},"paid_at":{"type":"string","description":"paid_at is the timestamp when this invoice was fully paid","format":"date-time"},"payment_status":{"type":"string","enum":["INITIATED","PENDING","PROCESSING","SUCCEEDED","OVERPAID","FAILED","REFUNDED","PARTIALLY_REFUNDED","VOIDED"],"x-enum-varnames":["PaymentStatusInitiated","PaymentStatusPending","PaymentStatusProcessing","PaymentStatusSucceeded","PaymentStatusOverpaid","PaymentStatusFailed","PaymentStatusRefunded","PaymentStatusPartiallyRefunded","PaymentStatusVoided"],"x-speakeasy-name-override":"PaymentStatus"},"period_end":{"type":"string","description":"period_end is the end date of the billing period covered by this invoice","format":"date-time"},"period_start":{"type":"string","description":"period_start is the start date of the billing period covered by this invoice","format":"date-time"},"recalculated_invoice_id":{"type":"string","description":"recalculated_invoice_id is the ID of the replacement invoice created when this invoice was voided and recalculated.\nWhen set, it forms a parent→child link from this (voided) invoice to the new replacement invoice."},"refunded_amount":{"type":"string","description":"refunded_amount is the total sum of credit notes of type \"refund\".\nThese are actual refunds issued to the customer."},"source_type":{"type":"string","enum":["checkout"],"x-enum-varnames":["InvoiceSourceTypeCheckout"],"x-speakeasy-name-override":"InvoiceSourceType"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription":{"type":"object","properties":{"active_pause_id":{"type":"string","description":"ActivePauseID references the current active pause configuration\nThis will be null if no pause is active or scheduled"},"auto_invoice_threshold":{"type":"string","description":"AutoInvoiceThreshold is the usage amount (in subscription currency) that triggers\nan intermediate invoice. Overrides the plan-level threshold when set.\nNil means: inherit from the plan's threshold (which may also be nil = disabled)."},"billing_anchor":{"type":"string","description":"BillingAnchor is the reference point that aligns future billing cycle dates.\nIt sets the day of week for week intervals, the day of month for month and year intervals,\nand the month of year for year intervals. The timestamp is in UTC format.","format":"date-time"},"billing_cadence":{"type":"string","enum":["RECURRING"],"x-enum-varnames":["BILLING_CADENCE_RECURRING"],"x-speakeasy-name-override":"BillingCadence"},"billing_cycle":{"type":"string","enum":["anniversary","calendar"],"x-enum-varnames":["BillingCycleAnniversary","BillingCycleCalendar"],"x-speakeasy-name-override":"BillingCycle"},"billing_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod"},"billing_period_count":{"type":"integer","description":"BillingPeriodCount is the total number units of the billing period."},"cancel_at":{"type":"string","description":"CancelAt is the date the subscription will be canceled","format":"date-time"},"cancel_at_period_end":{"type":"boolean","description":"CancelAtPeriodEnd is whether the subscription was canceled at the end of the current period"},"cancelled_at":{"type":"string","description":"CanceledAt is the date the subscription was canceled","format":"date-time"},"checkout_session":{"type":"object","properties":{"action":{"type":"string","enum":["create_subscription","modify_subscription","wallet_topup","add_addon","pay_invoice"],"x-enum-varnames":["CheckoutActionCreateSubscription","CheckoutActionModifySubscription","CheckoutActionWalletTopup","CheckoutActionAddAddon","CheckoutActionPayInvoice"],"x-speakeasy-name-override":"CheckoutAction"},"cancel_url":{"type":"string"},"cancelled_at":{"type":"string","format":"date-time"},"checkout_invoice_id":{"type":"string"},"checkout_payment_id":{"type":"string"},"checkout_status":{"type":"string","enum":["initiated","pending","completed","failed","expired"],"x-enum-varnames":["CheckoutStatusInitiated","CheckoutStatusPending","CheckoutStatusCompleted","CheckoutStatusFailed","CheckoutStatusExpired"],"x-speakeasy-name-override":"CheckoutStatus"},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"customer_id":{"type":"string"},"entity_creation_result":{"type":"object","properties":{"entity_id":{"type":"string"},"status":{"type":"string","enum":["created","superseded","failed_already_exists"],"x-enum-varnames":["EntityCreationStatusCreated","EntityCreationStatusSuperseded","EntityCreationStatusFailedAlreadyExists"],"x-speakeasy-name-override":"EntityCreationStatus"}}},"expires_at":{"type":"string","format":"date-time"},"failure_reason":{"type":"string"},"failure_url":{"type":"string"},"id":{"type":"string"},"idempotency_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"next_poll_after_ms":{"type":"integer","description":"NextPollAfterMs is how long a client should wait before reading again.\nZero means stop — either the session is terminal, or this response did not\ncome from a polling read."},"payment":{"type":"object","properties":{"gateway":{"type":"string"},"id":{"type":"string"},"status":{"type":"string","enum":["INITIATED","PENDING","PROCESSING","SUCCEEDED","OVERPAID","FAILED","REFUNDED","PARTIALLY_REFUNDED","VOIDED"],"x-enum-varnames":["PaymentStatusInitiated","PaymentStatusPending","PaymentStatusProcessing","PaymentStatusSucceeded","PaymentStatusOverpaid","PaymentStatusFailed","PaymentStatusRefunded","PaymentStatusPartiallyRefunded","PaymentStatusVoided"],"x-speakeasy-name-override":"PaymentStatus"}}},"payment_action":{"type":"object","properties":{"type":{"type":"string","enum":["checkout_url","payment_link"],"x-enum-varnames":["PaymentActionTypeCheckoutURL","PaymentActionTypePaymentLink"],"x-speakeasy-name-override":"PaymentActionType"},"url":{"type":"string"}},"x-speakeasy-name-override":"PaymentAction"},"payment_provider":{"type":"string","enum":["razorpay","chargebee","stripe"],"x-enum-varnames":["CheckoutPaymentProviderRazorpay","CheckoutPaymentProviderChargebee","CheckoutPaymentProviderStripe"],"x-speakeasy-name-override":"CheckoutPaymentProvider"},"stale":{"type":"boolean","description":"Stale reports that this response is stored state that was not checked against\nthe payment provider on this request — the read was debounced, or the gateway\ndid not answer. A UI should say \"still checking\" rather than presenting a\nstale answer as fact."},"success_url":{"type":"string"},"terminal":{"type":"boolean","description":"Terminal reports whether the session has finished. Clients poll until this is\ntrue rather than hardcoding the status set, which would go stale if a status\nis ever added."},"updated_at":{"type":"string","format":"date-time"}}},"collection_method":{"type":"string","description":"CollectionMethod determines how invoices are collected"},"commitment_amount":{"type":"string","description":"CommitmentAmount is the minimum amount a customer commits to paying for a billing period"},"commitment_duration":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod"},"coupon_associations":{"type":"array","description":"CouponAssociations are the coupon associations for this subscription","items":{"type":"object","properties":{"coupon":{"type":"object","properties":{"amount_off":{"type":"string"},"cadence":{"type":"string","enum":["once","repeated","forever"],"x-enum-varnames":["CouponCadenceOnce","CouponCadenceRepeated","CouponCadenceForever"],"x-speakeasy-name-override":"CouponCadence"},"coupon_code":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"currency":{"type":"string"},"duration_in_periods":{"type":"integer"},"environment_id":{"type":"string"},"id":{"type":"string"},"max_redemptions":{"type":"integer"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"percentage_off":{"type":"string"},"redeem_after":{"type":"string"},"redeem_before":{"type":"string"},"rules":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"total_redemptions":{"type":"integer"},"type":{"type":"string","enum":["fixed","percentage"],"x-enum-varnames":["CouponTypeFixed","CouponTypePercentage"],"x-speakeasy-name-override":"CouponType"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"coupon_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"end_date":{"type":"string","description":"Optional","format":"date-time"},"environment_id":{"type":"string"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"start_date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string","description":"Mandatory"},"subscription_line_item":{"type":"object","properties":{"addon_association_id":{"type":"string"},"billing_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod"},"billing_period_count":{"type":"integer","description":"from price at create; default 1"},"commitment_amount":{"type":"string","description":"Commitment fields"},"commitment_duration":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod"},"commitment_overage_factor":{"type":"string"},"commitment_quantity":{"type":"string"},"commitment_time_buckets":{"type":"array","items":{"type":"object","properties":{"commitment_type":{"type":"string","enum":["amount","quantity"],"x-enum-varnames":["COMMITMENT_TYPE_AMOUNT","COMMITMENT_TYPE_QUANTITY"],"x-speakeasy-name-override":"CommitmentType"},"commitment_value":{"type":"string"},"end":{"type":"object","properties":{"hour":{"maximum":24,"minimum":0,"type":"integer"},"minute":{"maximum":59,"minimum":0,"type":"integer"}},"x-speakeasy-name-override":"Bucket"},"id":{"type":"string","description":"ID is server-assigned. Stable for the lifetime of the line item;\ninvoice breakdown and analytics responses reference this ID."},"overage_factor":{"type":"number"},"price_id":{"type":"string","description":"PriceID is the SUBSCRIPTION-scoped price created at bucket-creation time.\nImmutable post-create; changing pricing requires a successor line item."},"start":{"type":"object","properties":{"hour":{"maximum":24,"minimum":0,"type":"integer"},"minute":{"maximum":59,"minimum":0,"type":"integer"}},"x-speakeasy-name-override":"Bucket"},"true_up_enabled":{"type":"boolean"}},"x-speakeasy-name-override":"TimeOfDayBucket"}},"commitment_true_up_enabled":{"type":"boolean"},"commitment_type":{"type":"string","enum":["amount","quantity"],"x-enum-varnames":["COMMITMENT_TYPE_AMOUNT","COMMITMENT_TYPE_QUANTITY"],"x-speakeasy-name-override":"CommitmentType"},"commitment_windowed":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"currency":{"type":"string"},"customer_id":{"type":"string"},"display_name":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"entity_id":{"type":"string"},"entity_type":{"type":"string","enum":["plan","addon","subscription"],"x-enum-varnames":["SubscriptionLineItemEntityTypePlan","SubscriptionLineItemEntityTypeAddon","SubscriptionLineItemEntityTypeSubscription"],"x-speakeasy-name-override":"SubscriptionLineItemEntityType"},"environment_id":{"type":"string"},"id":{"type":"string"},"invoice_cadence":{"type":"string","enum":["ARREAR","ADVANCE"],"x-enum-varnames":["InvoiceCadenceArrear","InvoiceCadenceAdvance"],"x-speakeasy-name-override":"InvoiceCadence"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel)."},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set."},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total."},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null."},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType"}}},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the meter"},"event_name":{"type":"string","description":"EventName is the unique identifier for the event that this meter is tracking\nIt is a mandatory field in the events table and hence being used as the primary matching field\nWe can have multiple meters tracking the same event but with different filters and aggregation"},"filters":{"type":"array","description":"Filters define the criteria for the meter to be applied on the events before aggregation\nIt also defines the possible values on which later the charges will be applied","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string"}}}}},"id":{"type":"string","description":"ID is the unique identifier for the meter"},"name":{"type":"string","description":"Name is the display name of the meter"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"meter_display_name":{"type":"string"},"meter_id":{"type":"string"},"plan_display_name":{"type":"string"},"price":{"type":"object","properties":{"addon":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grants":{"type":"array","items":{"type":"object","properties":{"addon_id":{"type":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grant_anchor":{"type":"string","format":"date-time"},"credits":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"expiration_duration":{"type":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod"},"period_count":{"type":"integer"},"plan_id":{"type":"string"},"priority":{"type":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope"},"start_date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"tenant_id":{"type":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"description":{"type":"string"},"entitlements":{"type":"array","items":{"type":"object","properties":{"addon":{"oneOf":[{}]},"aggregation_mode":{"type":"string","enum":["additive","parallel"],"x-enum-varnames":["EntitlementAggregationModeAdditive","EntitlementAggregationModeParallel"],"x-speakeasy-name-override":"EntitlementAggregationMode"},"config_value":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"display_order":{"type":"integer"},"end_date":{"type":"string","format":"date-time"},"entity_id":{"type":"string"},"entity_type":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["ENTITLEMENT_ENTITY_TYPE_PLAN","ENTITLEMENT_ENTITY_TYPE_SUBSCRIPTION","ENTITLEMENT_ENTITY_TYPE_ADDON"],"x-speakeasy-name-override":"EntitlementEntityType"},"environment_id":{"type":"string"},"feature":{"type":"object","properties":{"alert_settings":{"type":"object","properties":{"alert_enabled":{"type":"boolean"},"alert_threshold_type":{"type":"string","enum":["absolute","percentage"],"x-enum-varnames":["AlertThresholdTypeAbsolute","AlertThresholdTypePercentage"],"x-speakeasy-name-override":"AlertThresholdType"},"critical":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition"},"threshold":{"type":"string"}},"x-speakeasy-name-override":"AlertThreshold"},"info":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition"},"threshold":{"type":"string"}},"x-speakeasy-name-override":"AlertThreshold"},"warning":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition"},"threshold":{"type":"string"}},"x-speakeasy-name-override":"AlertThreshold"}},"x-speakeasy-name-override":"AlertSettings"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"description":{"type":"string"},"environment_id":{"type":"string"},"group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"entity_ids":{"type":"array","items":{"type":"string"}},"entity_type":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"status":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"group_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel)."},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set."},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total."},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null."},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType"}}},"created_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"},"event_name":{"type":"string","example":"api_request"},"filters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string"}}}}},"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","example":"API Usage Meter"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage"},"status":{"type":"string","example":"published"},"tenant_id":{"type":"string","example":"tenant123"},"updated_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"}}},"meter_id":{"type":"string"},"name":{"type":"string"},"reporting_unit":{"type":"object","properties":{"conversion_rate":{"type":"number","description":"Multiplier: reporting_unit_value = unit_value * conversion_rate; must be > 0"},"unit_plural":{"type":"string","description":"Display unit label, plural (e.g. \"seconds\")"},"unit_singular":{"type":"string","description":"Display unit label, singular (e.g. \"second\")"}},"x-speakeasy-name-override":"ReportingUnit"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"type":{"type":"string","enum":["metered","boolean","static","config"],"x-enum-varnames":["FeatureTypeMetered","FeatureTypeBoolean","FeatureTypeStatic","FeatureTypeConfig"],"x-speakeasy-name-override":"FeatureType"},"unit_plural":{"type":"string"},"unit_singular":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"feature_id":{"type":"string"},"feature_type":{"type":"string","enum":["metered","boolean","static","config"],"x-enum-varnames":["FeatureTypeMetered","FeatureTypeBoolean","FeatureTypeStatic","FeatureTypeConfig"],"x-speakeasy-name-override":"FeatureType"},"grant_allocation_behavior":{"type":"string","enum":["first_usage","unit_start"],"x-enum-varnames":["EntitlementGrantAllocationBehaviorFirstUsage","EntitlementGrantAllocationBehaviorUnitStart"],"x-speakeasy-name-override":"EntitlementGrantAllocationBehavior"},"grant_duration_unit":{"type":"string","enum":["hour","day","week","subscription_period"],"x-enum-varnames":["EntitlementGrantDurationUnitHour","EntitlementGrantDurationUnitDay","EntitlementGrantDurationUnitWeek","EntitlementGrantDurationUnitSubscriptionPeriod"],"x-speakeasy-name-override":"EntitlementGrantDurationUnit"},"grant_duration_value":{"type":"integer"},"grant_measure":{"type":"string","enum":["quantity","amount"],"x-enum-varnames":["EntitlementGrantMeasureQuantity","EntitlementGrantMeasureAmount"],"x-speakeasy-name-override":"EntitlementGrantMeasure"},"grant_quota":{"type":"string"},"id":{"type":"string"},"is_enabled":{"type":"boolean"},"is_soft_limit":{"type":"boolean"},"parent_entitlement_id":{"type":"string"},"plan":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grants":{"type":"array","items":{"type":"object","properties":{"addon_id":{"type":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grant_anchor":{"type":"string","format":"date-time"},"credits":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"expiration_duration":{"type":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod"},"period_count":{"type":"integer"},"plan_id":{"type":"string"},"priority":{"type":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope"},"start_date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"tenant_id":{"type":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"description":{"type":"string"},"display_order":{"type":"integer"},"entitlements":{"type":"array","items":{"$circularRef":"1c99a94f-ba2d-4aeb-aec5-928f5daeddec"}},"environment_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"price_sync_status":{"type":"object","properties":{"current_sequence":{"type":"integer"},"synced":{"type":"boolean"},"unsynced_subscription_count":{"type":"integer"}}},"prices":{"type":"array","description":"TODO: Add inline addons","items":{"$circularRef":"0dc125d7-6bd8-40a5-8d18-2c0190dcf082"}},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"plan_id":{"type":"string","description":"TODO: Remove this once we have a proper entitlement entity type"},"start_date":{"type":"string","format":"date-time"},"static_value":{"type":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"},"usage_limit":{"type":"integer"},"usage_reset_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","NEVER"],"x-enum-varnames":["ENTITLEMENT_USAGE_RESET_PERIOD_MONTHLY","ENTITLEMENT_USAGE_RESET_PERIOD_ANNUAL","ENTITLEMENT_USAGE_RESET_PERIOD_WEEKLY","ENTITLEMENT_USAGE_RESET_PERIOD_DAILY","ENTITLEMENT_USAGE_RESET_PERIOD_QUARTER","ENTITLEMENT_USAGE_RESET_PERIOD_HALF_YEAR","ENTITLEMENT_USAGE_RESET_PERIOD_NEVER"],"x-speakeasy-name-override":"EntitlementUsageResetPeriod"}}}},"environment_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":true},"name":{"type":"string"},"price_sync_status":{"type":"object","properties":{"current_sequence":{"type":"integer"},"synced":{"type":"boolean"},"unsynced_association_count":{"type":"integer"}}},"prices":{"type":"array","description":"Optional expanded fields","items":{"$circularRef":"0dc125d7-6bd8-40a5-8d18-2c0190dcf082"}},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"amount":{"type":"string","description":"Amount stored in main currency units (e.g., dollars, not cents)\nFor USD: 12.50 means $12.50"},"billing_cadence":{"type":"string","enum":["RECURRING"],"x-enum-varnames":["BILLING_CADENCE_RECURRING"],"x-speakeasy-name-override":"BillingCadence"},"billing_model":{"type":"string","enum":["FLAT_FEE","PACKAGE","TIERED"],"x-enum-varnames":["BILLING_MODEL_FLAT_FEE","BILLING_MODEL_PACKAGE","BILLING_MODEL_TIERED"],"x-speakeasy-name-override":"BillingModel"},"billing_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod"},"billing_period_count":{"type":"integer","description":"BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12"},"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"conversion_rate":{"type":"string","description":"ConversionRate is the conversion rate of the price unit to the fiat currency"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"currency":{"type":"string","description":"Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp"},"description":{"type":"string","description":"Description of the price"},"display_amount":{"type":"string","description":"DisplayAmount is the formatted amount with currency symbol\nFor USD: $12.50"},"display_name":{"type":"string","description":"DisplayName is the name of the price"},"display_price_unit_amount":{"type":"string","description":"DisplayPriceUnitAmount is the formatted amount of the price unit"},"end_date":{"type":"string","description":"EndDate is the end date of the price","format":"date-time"},"entity_id":{"type":"string","description":"EntityID holds the value of the \"entity_id\" field."},"entity_type":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON","PRICE","COSTSHEET"],"x-enum-varnames":["PRICE_ENTITY_TYPE_PLAN","PRICE_ENTITY_TYPE_SUBSCRIPTION","PRICE_ENTITY_TYPE_ADDON","PRICE_ENTITY_TYPE_PRICE","PRICE_ENTITY_TYPE_COSTSHEET"],"x-speakeasy-name-override":"PriceEntityType"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the price"},"feature":{"type":"object","properties":{"reporting_unit":{"type":"object","properties":{"conversion_rate":{"type":"number","description":"Multiplier: reporting_unit_value = unit_value * conversion_rate; must be > 0"},"unit_plural":{"type":"string","description":"Display unit label, plural (e.g. \"seconds\")"},"unit_singular":{"type":"string","description":"Display unit label, singular (e.g. \"second\")"}},"x-speakeasy-name-override":"ReportingUnit"}}},"group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"entity_ids":{"type":"array","items":{"type":"string"}},"entity_type":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"status":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"group_id":{"type":"string","description":"GroupID references the group this price belongs to"},"id":{"type":"string","description":"ID uuid identifier for the price"},"invoice_cadence":{"type":"string","enum":["ARREAR","ADVANCE"],"x-enum-varnames":["InvoiceCadenceArrear","InvoiceCadenceAdvance"],"x-speakeasy-name-override":"InvoiceCadence"},"lookup_key":{"type":"string","description":"LookupKey used for looking up the price in the database"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel)."},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set."},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total."},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null."},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType"}}},"created_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"},"event_name":{"type":"string","example":"api_request"},"filters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string"}}}}},"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","example":"API Usage Meter"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage"},"status":{"type":"string","example":"published"},"tenant_id":{"type":"string","example":"tenant123"},"updated_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"}}},"meter_id":{"type":"string","description":"MeterID is the id of the meter for usage based pricing"},"min_quantity":{"oneOf":[{"type":"string","description":"MinQuantity is the minimum quantity of the price"},{"type":"null","description":"MinQuantity is the minimum quantity of the price"}]},"parent_price_id":{"type":"string","description":"ParentPriceID references the root price (always set for price lineage tracking)"},"plan":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grants":{"type":"array","items":{"type":"object","properties":{"addon_id":{"type":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grant_anchor":{"type":"string","format":"date-time"},"credits":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"expiration_duration":{"type":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod"},"period_count":{"type":"integer"},"plan_id":{"type":"string"},"priority":{"type":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope"},"start_date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"tenant_id":{"type":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"description":{"type":"string"},"display_order":{"type":"integer"},"entitlements":{"type":"array","items":{"$circularRef":"1c99a94f-ba2d-4aeb-aec5-928f5daeddec"}},"environment_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"price_sync_status":{"type":"object","properties":{"current_sequence":{"type":"integer"},"synced":{"type":"boolean"},"unsynced_subscription_count":{"type":"integer"}}},"prices":{"type":"array","description":"TODO: Add inline addons","items":{"$circularRef":"0dc125d7-6bd8-40a5-8d18-2c0190dcf082"}},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"price_unit":{"type":"string","description":"PriceUnit is the code of the price unit (e.g., 'btc', 'eth')"},"price_unit_amount":{"type":"string","description":"PriceUnitAmount is the amount of the price unit"},"price_unit_id":{"type":"string","description":"PriceUnitID is the id of the price unit (for CUSTOM type)"},"price_unit_tiers":{"type":"array","description":"PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED","items":{"type":"object","properties":{"flat_amount":{"type":"string","description":"flat_amount is the flat amount for the given tier (optional)\nApplied on top of unit_amount*quantity. Useful for cases like \"2.7$ + 5c\""},"unit_amount":{"type":"string","description":"unit_amount is the amount per unit for the given tier"},"up_to":{"type":"integer","description":"up_to is the quantity up to which this tier applies. It is null for the last tier.\nIMPORTANT: Tier boundaries are INCLUSIVE.\n- If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier\n- This behavior is consistent across both VOLUME and SLAB tier modes"}}}},"price_unit_type":{"type":"string","enum":["FIAT","CUSTOM"],"x-enum-varnames":["PRICE_UNIT_TYPE_FIAT","PRICE_UNIT_TYPE_CUSTOM"],"x-speakeasy-name-override":"PriceUnitType"},"pricing_unit":{"type":"object","properties":{"base_currency":{"type":"string"},"code":{"type":"string"},"conversion_rate":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"environment_id":{"type":"string"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"symbol":{"type":"string"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"sequence":{"type":"integer","description":"Sequence is the monotonic stamp bumped on every state change that\nsubscription line items need to react to. Read by the plan-price sync;\nset by the database (DEFAULT nextval) on create and by the price\nrepository on termination / compatibility-affecting edits."},"start_date":{"type":"string","description":"StartDate is the start date of the price","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"tier_mode":{"type":"string","enum":["VOLUME","SLAB"],"x-enum-varnames":["BILLING_TIER_VOLUME","BILLING_TIER_SLAB"],"x-speakeasy-name-override":"BillingTier"},"tiers":{"type":"array","items":{"type":"object","properties":{"flat_amount":{"type":"string","description":"flat_amount is the flat amount for the given tier (optional)\nApplied on top of unit_amount*quantity. Useful for cases like \"2.7$ + 5c\""},"unit_amount":{"type":"string","description":"unit_amount is the amount per unit for the given tier"},"up_to":{"type":"integer","description":"up_to is the quantity up to which this tier applies. It is null for the last tier.\nIMPORTANT: Tier boundaries are INCLUSIVE.\n- If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier\n- This behavior is consistent across both VOLUME and SLAB tier modes"}}}},"transform_quantity":{"type":"object","properties":{"divide_by":{"type":"integer","description":"Divide quantity by this number"},"round":{"type":"string","enum":["up","down"],"x-enum-varnames":["ROUND_UP","ROUND_DOWN"],"x-speakeasy-name-override":"RoundType"}}},"trial_period_days":{"type":"integer","description":"TrialPeriodDays is the number of days for the trial period\nNote: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)"},"type":{"type":"string","enum":["USAGE","FIXED"],"x-enum-varnames":["PRICE_TYPE_USAGE","PRICE_TYPE_FIXED"],"x-speakeasy-name-override":"PriceType"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"price_id":{"type":"string"},"price_type":{"type":"string","enum":["USAGE","FIXED"],"x-enum-varnames":["PRICE_TYPE_USAGE","PRICE_TYPE_FIXED"],"x-speakeasy-name-override":"PriceType"},"price_unit":{"type":"string"},"price_unit_id":{"type":"string"},"quantity":{"type":"string"},"start_date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"subscription_phase_id":{"type":"string"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"subscription_line_item_id":{"type":"string","description":"Optional"},"subscription_phase_id":{"type":"string","description":"Optional"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grants":{"type":"array","description":"Credit grants are the credit grants for this subscription","items":{"type":"object","properties":{"addon_id":{"type":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grant_anchor":{"type":"string","format":"date-time"},"credits":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"expiration_duration":{"type":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod"},"period_count":{"type":"integer"},"plan_id":{"type":"string"},"priority":{"type":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope"},"start_date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"tenant_id":{"type":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"currency":{"type":"string","description":"Currency is the currency of the subscription in lowercase 3 digit ISO codes"},"current_period_end":{"type":"string","description":"CurrentPeriodEnd is the end of the current period that the subscription has been invoiced for.\nAt the end of this period, a new invoice will be created.","format":"date-time"},"current_period_start":{"type":"string","description":"CurrentPeriodStart is the end of the current period that the subscription has been invoiced for.\nAt the end of this period, a new invoice will be created.","format":"date-time"},"customer":{"type":"object","properties":{"address_city":{"type":"string","description":"AddressCity is the city of the customer's address"},"address_country":{"type":"string","description":"AddressCountry is the country of the customer's address (ISO 3166-1 alpha-2)"},"address_line1":{"type":"string","description":"AddressLine1 is the first line of the customer's address"},"address_line2":{"type":"string","description":"AddressLine2 is the second line of the customer's address"},"address_postal_code":{"type":"string","description":"AddressPostalCode is the postal code of the customer's address"},"address_state":{"type":"string","description":"AddressState is the state of the customer's address"},"billing_currency":{"type":"string","description":"BillingCurrency is the fiat currency invoices are issued in; nil means charge currency is used as-is."},"contact":{"type":"string","description":"Contact is an optional contact number for the customer (e.g. phone)"},"contact_persons":{"type":"array","items":{"required":["first_name"],"type":"object","properties":{"first_name":{"maxLength":100,"type":"string","isRequired":true},"department":{"maxLength":100,"type":"string"},"designation":{"maxLength":100,"type":"string"},"email":{"type":"string"},"id":{"type":"string"},"is_primary":{"type":"boolean"},"last_name":{"maxLength":100,"type":"string"},"mobile":{"maxLength":20,"type":"string"},"salutation":{"maxLength":25,"type":"string"}}}},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"email":{"type":"string","description":"Email is the email of the customer"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the customer"},"external_id":{"type":"string","description":"ExternalID is the external identifier for the customer"},"id":{"type":"string","description":"ID is the unique identifier for the customer"},"integrations":{"type":"array","items":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"entity_id":{"type":"string"},"entity_type":{"type":"string","enum":["customer","plan","invoice","subscription","payment","credit_note","addon","item","item_price","price","invoice_line_item","subscription_line_item"],"x-enum-varnames":["IntegrationEntityTypeCustomer","IntegrationEntityTypePlan","IntegrationEntityTypeInvoice","IntegrationEntityTypeSubscription","IntegrationEntityTypePayment","IntegrationEntityTypeCreditNote","IntegrationEntityTypeAddon","IntegrationEntityTypeItem","IntegrationEntityTypeItemPrice","IntegrationEntityTypePrice","IntegrationEntityTypeInvoiceLineItem","IntegrationEntityTypeSubscriptionLineItem"],"x-speakeasy-name-override":"IntegrationEntityType"},"environment_id":{"type":"string"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":true},"provider_entity_id":{"type":"string"},"provider_type":{"type":"string"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata"},"name":{"type":"string","description":"Name is the name of the customer"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tax_treatment":{"type":"string","enum":["taxable","exempt"],"x-enum-varnames":["TaxTreatmentTaxable","TaxTreatmentExempt"],"x-speakeasy-name-override":"TaxTreatment"},"tenant_id":{"type":"string"},"timezone":{"type":"string","description":"Timezone is the customer's IANA timezone name (e.g. \"Asia/Kolkata\").\nDefaults to \"UTC\". Inherited by subscriptions at creation time."},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}},"description":"Customer response object containing all customer information"},"customer_id":{"type":"string","description":"CustomerID is the identifier for the customer in our system"},"enable_true_up":{"type":"boolean"},"end_date":{"type":"string","description":"EndDate is the end date of the subscription","format":"date-time"},"entitlements":{"type":"array","description":"Entitlements is populated only when the caller adds \"entitlements\" to\nthe search filter's expand string. Each entry is a feature with its\naggregated entitlement info (same shape as CustomerEntitlementsResponse.Features).","items":{"type":"object","properties":{"entitlement":{"type":"object","properties":{"aggregation_mode":{"type":"string","enum":["additive","parallel"],"x-enum-varnames":["EntitlementAggregationModeAdditive","EntitlementAggregationModeParallel"],"x-speakeasy-name-override":"EntitlementAggregationMode"},"buckets":{"type":"array","items":{"type":"object","properties":{"entitlement_id":{"type":"string"},"grant_duration_unit":{"type":"string","enum":["hour","day","week","subscription_period"],"x-enum-varnames":["EntitlementGrantDurationUnitHour","EntitlementGrantDurationUnitDay","EntitlementGrantDurationUnitWeek","EntitlementGrantDurationUnitSubscriptionPeriod"],"x-speakeasy-name-override":"EntitlementGrantDurationUnit"},"grant_duration_value":{"type":"integer"},"grant_measure":{"type":"string","enum":["quantity","amount"],"x-enum-varnames":["EntitlementGrantMeasureQuantity","EntitlementGrantMeasureAmount"],"x-speakeasy-name-override":"EntitlementGrantMeasure"},"grant_quota":{"type":"string"},"grant_unlimited":{"type":"boolean"},"source_entity_id":{"type":"string"},"usage_limit":{"type":"integer"}}}},"config_values":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"grant_duration_unit":{"type":"string","enum":["hour","day","week","subscription_period"],"x-enum-varnames":["EntitlementGrantDurationUnitHour","EntitlementGrantDurationUnitDay","EntitlementGrantDurationUnitWeek","EntitlementGrantDurationUnitSubscriptionPeriod"],"x-speakeasy-name-override":"EntitlementGrantDurationUnit"},"grant_duration_value":{"type":"integer"},"grant_measure":{"type":"string","enum":["quantity","amount"],"x-enum-varnames":["EntitlementGrantMeasureQuantity","EntitlementGrantMeasureAmount"],"x-speakeasy-name-override":"EntitlementGrantMeasure"},"grant_quota":{"type":"string"},"grant_state":{"type":"object","properties":{"allowances":{"type":"array","items":{"type":"object","properties":{"entitlement_id":{"type":"string"},"grant_id":{"type":"string"},"is_active":{"type":"boolean"},"last_computed_at":{"type":"string","format":"date-time"},"measure":{"type":"string","enum":["quantity","amount"],"x-enum-varnames":["EntitlementGrantMeasureQuantity","EntitlementGrantMeasureAmount"],"x-speakeasy-name-override":"EntitlementGrantMeasure"},"quota":{"type":"string"},"quota_crossed_at":{"type":"string","format":"date-time"},"remaining":{"type":"string"},"status":{"type":"string","enum":["active","exhausted"],"x-enum-varnames":["EntitlementGrantStatusActive","EntitlementGrantStatusExhausted"],"x-speakeasy-name-override":"EntitlementGrantStatus"},"unlimited":{"type":"boolean"},"usage":{"type":"string"},"valid_from":{"type":"string"},"valid_to":{"type":"string"}}}}}},"grant_unlimited":{"type":"boolean"},"is_enabled":{"type":"boolean"},"is_soft_limit":{"type":"boolean"},"static_values":{"type":"array","items":{"type":"string"}},"usage_limit":{"type":"integer"},"usage_reset_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","NEVER"],"x-enum-varnames":["ENTITLEMENT_USAGE_RESET_PERIOD_MONTHLY","ENTITLEMENT_USAGE_RESET_PERIOD_ANNUAL","ENTITLEMENT_USAGE_RESET_PERIOD_WEEKLY","ENTITLEMENT_USAGE_RESET_PERIOD_DAILY","ENTITLEMENT_USAGE_RESET_PERIOD_QUARTER","ENTITLEMENT_USAGE_RESET_PERIOD_HALF_YEAR","ENTITLEMENT_USAGE_RESET_PERIOD_NEVER"],"x-speakeasy-name-override":"EntitlementUsageResetPeriod"}}},"feature":{"type":"object","properties":{"alert_settings":{"type":"object","properties":{"alert_enabled":{"type":"boolean"},"alert_threshold_type":{"type":"string","enum":["absolute","percentage"],"x-enum-varnames":["AlertThresholdTypeAbsolute","AlertThresholdTypePercentage"],"x-speakeasy-name-override":"AlertThresholdType"},"critical":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition"},"threshold":{"type":"string"}},"x-speakeasy-name-override":"AlertThreshold"},"info":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition"},"threshold":{"type":"string"}},"x-speakeasy-name-override":"AlertThreshold"},"warning":{"type":"object","properties":{"condition":{"type":"string","enum":["above","below"],"x-enum-varnames":["AlertConditionAbove","AlertConditionBelow"],"x-speakeasy-name-override":"AlertCondition"},"threshold":{"type":"string"}},"x-speakeasy-name-override":"AlertThreshold"}},"x-speakeasy-name-override":"AlertSettings"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"description":{"type":"string"},"environment_id":{"type":"string"},"group":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"entity_ids":{"type":"array","items":{"type":"string"}},"entity_type":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"status":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"group_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel)."},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set."},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total."},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null."},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType"}}},"created_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"},"event_name":{"type":"string","example":"api_request"},"filters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string"}}}}},"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","example":"API Usage Meter"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage"},"status":{"type":"string","example":"published"},"tenant_id":{"type":"string","example":"tenant123"},"updated_at":{"type":"string","example":"2024-03-20T15:04:05Z","format":"date-time"}}},"meter_id":{"type":"string"},"name":{"type":"string"},"reporting_unit":{"type":"object","properties":{"conversion_rate":{"type":"number","description":"Multiplier: reporting_unit_value = unit_value * conversion_rate; must be > 0"},"unit_plural":{"type":"string","description":"Display unit label, plural (e.g. \"seconds\")"},"unit_singular":{"type":"string","description":"Display unit label, singular (e.g. \"second\")"}},"x-speakeasy-name-override":"ReportingUnit"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"type":{"type":"string","enum":["metered","boolean","static","config"],"x-enum-varnames":["FeatureTypeMetered","FeatureTypeBoolean","FeatureTypeStatic","FeatureTypeConfig"],"x-speakeasy-name-override":"FeatureType"},"unit_plural":{"type":"string"},"unit_singular":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"sources":{"type":"array","items":{"type":"object","properties":{"config_value":{"type":"object","additionalProperties":true},"entitlement_id":{"type":"string"},"entity_id":{"type":"string"},"entity_name":{"type":"string"},"entity_type":{"type":"string","enum":["plan","addon","subscription"],"x-enum-varnames":["EntitlementSourceEntityTypePlan","EntitlementSourceEntityTypeAddon","EntitlementSourceEntityTypeSubscription"]},"is_enabled":{"type":"boolean"},"quantity":{"type":"integer"},"static_value":{"type":"string"},"subscription_id":{"type":"string"},"usage_limit":{"type":"integer"},"usage_reset_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod"}}}}}}},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the subscription"},"gateway_payment_method_id":{"type":"string","description":"GatewayPaymentMethodID is the gateway payment method ID for this subscription"},"id":{"type":"string","description":"ID is the unique identifier for the subscription"},"invoicing_customer_id":{"type":"string","description":"InvoicingCustomerID is the customer ID to use for invoicing\nThis can differ from the subscription customer (e.g., parent company invoicing for child company)"},"latest_invoice":{"oneOf":[{}]},"line_item_grouping":{"type":"string","enum":["per_charge_period","per_billing_period"],"x-enum-varnames":["LineItemGroupingPerChargePeriod","LineItemGroupingPerBillingPeriod"],"x-speakeasy-name-override":"LineItemGrouping"},"line_items":{"type":"array","items":{"type":"object","properties":{"addon_association_id":{"type":"string"},"billing_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod"},"billing_period_count":{"type":"integer","description":"from price at create; default 1"},"commitment_amount":{"type":"string","description":"Commitment fields"},"commitment_duration":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod"},"commitment_overage_factor":{"type":"string"},"commitment_quantity":{"type":"string"},"commitment_time_buckets":{"type":"array","items":{"type":"object","properties":{"commitment_type":{"type":"string","enum":["amount","quantity"],"x-enum-varnames":["COMMITMENT_TYPE_AMOUNT","COMMITMENT_TYPE_QUANTITY"],"x-speakeasy-name-override":"CommitmentType"},"commitment_value":{"type":"string"},"end":{"type":"object","properties":{"hour":{"maximum":24,"minimum":0,"type":"integer"},"minute":{"maximum":59,"minimum":0,"type":"integer"}},"x-speakeasy-name-override":"Bucket"},"id":{"type":"string","description":"ID is server-assigned. Stable for the lifetime of the line item;\ninvoice breakdown and analytics responses reference this ID."},"overage_factor":{"type":"number"},"price_id":{"type":"string","description":"PriceID is the SUBSCRIPTION-scoped price created at bucket-creation time.\nImmutable post-create; changing pricing requires a successor line item."},"start":{"type":"object","properties":{"hour":{"maximum":24,"minimum":0,"type":"integer"},"minute":{"maximum":59,"minimum":0,"type":"integer"}},"x-speakeasy-name-override":"Bucket"},"true_up_enabled":{"type":"boolean"}},"x-speakeasy-name-override":"TimeOfDayBucket"}},"commitment_true_up_enabled":{"type":"boolean"},"commitment_type":{"type":"string","enum":["amount","quantity"],"x-enum-varnames":["COMMITMENT_TYPE_AMOUNT","COMMITMENT_TYPE_QUANTITY"],"x-speakeasy-name-override":"CommitmentType"},"commitment_windowed":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"currency":{"type":"string"},"customer_id":{"type":"string"},"display_name":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"entity_id":{"type":"string"},"entity_type":{"type":"string","enum":["plan","addon","subscription"],"x-enum-varnames":["SubscriptionLineItemEntityTypePlan","SubscriptionLineItemEntityTypeAddon","SubscriptionLineItemEntityTypeSubscription"],"x-speakeasy-name-override":"SubscriptionLineItemEntityType"},"environment_id":{"type":"string"},"id":{"type":"string"},"invoice_cadence":{"type":"string","enum":["ARREAR","ADVANCE"],"x-enum-varnames":["InvoiceCadenceArrear","InvoiceCadenceAdvance"],"x-speakeasy-name-override":"InvoiceCadence"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"meter":{"type":"object","properties":{"aggregation":{"type":"object","properties":{"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"expression":{"type":"string","description":"Expression is an optional CEL expression to compute per-event quantity from event.properties.\nWhen set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel)."},"field":{"type":"string","description":"Field is the key in $event.properties on which the aggregation is to be applied\nFor ex if the aggregation type is sum for API usage, the field could be \"duration_ms\"\nIgnored when Expression is set."},"group_by":{"type":"string","description":"GroupBy is the property name in event.properties to group by before aggregating.\nRequires MAX aggregation. Windowing comes from the price, so this no longer\nimplies a meter-level bucket_size.\nWhen set, aggregation is applied per unique value of this property within each bucket,\nthen the per-group results are summed to produce the bucket total."},"multiplier":{"type":"string","description":"Multiplier is the multiplier for the aggregation\nFor ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000\nto scale up by a factor of 1000. If not provided, it will be null."},"type":{"type":"string","enum":["COUNT","SUM","AVG","COUNT_UNIQUE","LATEST","SUM_WITH_MULTIPLIER","MAX","WEIGHTED_SUM"],"x-enum-comments":{"AggregationSumWithMultiplier":"Sum with a multiplier - [sum(value) * multiplier]"},"x-enum-varnames":["AggregationCount","AggregationSum","AggregationAvg","AggregationCountUnique","AggregationLatest","AggregationSumWithMultiplier","AggregationMax","AggregationWeightedSum"],"x-speakeasy-name-override":"AggregationType"}}},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the meter"},"event_name":{"type":"string","description":"EventName is the unique identifier for the event that this meter is tracking\nIt is a mandatory field in the events table and hence being used as the primary matching field\nWe can have multiple meters tracking the same event but with different filters and aggregation"},"filters":{"type":"array","description":"Filters define the criteria for the meter to be applied on the events before aggregation\nIt also defines the possible values on which later the charges will be applied","items":{"type":"object","properties":{"key":{"type":"string","description":"Key is the key for the filter from $event.properties\nCurrently we support only first level keys in the properties and not nested keys"},"values":{"type":"array","description":"Values are the possible values for the filter to be considered for the meter\nFor ex \"model_name\" could have values \"o1-mini\", \"gpt-4o\" etc","items":{"type":"string"}}}}},"id":{"type":"string","description":"ID is the unique identifier for the meter"},"name":{"type":"string","description":"Name is the display name of the meter"},"reset_usage":{"type":"string","enum":["BILLING_PERIOD","NEVER"],"x-enum-varnames":["ResetUsageBillingPeriod","ResetUsageNever"],"x-speakeasy-name-override":"ResetUsage"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"meter_display_name":{"type":"string"},"meter_id":{"type":"string"},"plan_display_name":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"string","description":"Amount stored in main currency units (e.g., dollars, not cents)\nFor USD: 12.50 means $12.50"},"billing_cadence":{"type":"string","enum":["RECURRING"],"x-enum-varnames":["BILLING_CADENCE_RECURRING"],"x-speakeasy-name-override":"BillingCadence"},"billing_model":{"type":"string","enum":["FLAT_FEE","PACKAGE","TIERED"],"x-enum-varnames":["BILLING_MODEL_FLAT_FEE","BILLING_MODEL_PACKAGE","BILLING_MODEL_TIERED"],"x-speakeasy-name-override":"BillingModel"},"billing_period":{"type":"string","enum":["MONTHLY","ANNUAL","WEEKLY","DAILY","QUARTERLY","HALF_YEARLY","ONETIME"],"x-enum-varnames":["BILLING_PERIOD_MONTHLY","BILLING_PERIOD_ANNUAL","BILLING_PERIOD_WEEKLY","BILLING_PERIOD_DAILY","BILLING_PERIOD_QUARTER","BILLING_PERIOD_HALF_YEAR","BILLING_PERIOD_ONETIME"],"x-speakeasy-name-override":"BillingPeriod"},"billing_period_count":{"type":"integer","description":"BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12"},"bucket_size":{"type":"string","enum":["MINUTE","15MIN","30MIN","HOUR","3HOUR","6HOUR","12HOUR","DAY","WEEK","MONTH"],"x-enum-varnames":["WindowSizeMinute","WindowSize15Min","WindowSize30Min","WindowSizeHour","WindowSize3Hour","WindowSize6Hour","WindowSize12Hour","WindowSizeDay","WindowSizeWeek","WindowSizeMonth"],"x-speakeasy-name-override":"WindowSize"},"conversion_rate":{"type":"string","description":"ConversionRate is the conversion rate of the price unit to the fiat currency"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"currency":{"type":"string","description":"Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp"},"description":{"type":"string","description":"Description of the price"},"display_amount":{"type":"string","description":"DisplayAmount is the formatted amount with currency symbol\nFor USD: $12.50"},"display_name":{"type":"string","description":"DisplayName is the name of the price"},"display_price_unit_amount":{"type":"string","description":"DisplayPriceUnitAmount is the formatted amount of the price unit"},"end_date":{"type":"string","description":"EndDate is the end date of the price","format":"date-time"},"entity_id":{"type":"string","description":"EntityID holds the value of the \"entity_id\" field."},"entity_type":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON","PRICE","COSTSHEET"],"x-enum-varnames":["PRICE_ENTITY_TYPE_PLAN","PRICE_ENTITY_TYPE_SUBSCRIPTION","PRICE_ENTITY_TYPE_ADDON","PRICE_ENTITY_TYPE_PRICE","PRICE_ENTITY_TYPE_COSTSHEET"],"x-speakeasy-name-override":"PriceEntityType"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the price"},"group_id":{"type":"string","description":"GroupID references the group this price belongs to"},"id":{"type":"string","description":"ID uuid identifier for the price"},"invoice_cadence":{"type":"string","enum":["ARREAR","ADVANCE"],"x-enum-varnames":["InvoiceCadenceArrear","InvoiceCadenceAdvance"],"x-speakeasy-name-override":"InvoiceCadence"},"lookup_key":{"type":"string","description":"LookupKey used for looking up the price in the database"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"meter_id":{"type":"string","description":"MeterID is the id of the meter for usage based pricing"},"min_quantity":{"oneOf":[{"type":"string","description":"MinQuantity is the minimum quantity of the price"},{"type":"null","description":"MinQuantity is the minimum quantity of the price"}]},"parent_price_id":{"type":"string","description":"ParentPriceID references the root price (always set for price lineage tracking)"},"price_unit":{"type":"string","description":"PriceUnit is the code of the price unit (e.g., 'btc', 'eth')"},"price_unit_amount":{"type":"string","description":"PriceUnitAmount is the amount of the price unit"},"price_unit_id":{"type":"string","description":"PriceUnitID is the id of the price unit (for CUSTOM type)"},"price_unit_tiers":{"type":"array","description":"PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED","items":{"type":"object","properties":{"flat_amount":{"type":"string","description":"flat_amount is the flat amount for the given tier (optional)\nApplied on top of unit_amount*quantity. Useful for cases like \"2.7$ + 5c\""},"unit_amount":{"type":"string","description":"unit_amount is the amount per unit for the given tier"},"up_to":{"type":"integer","description":"up_to is the quantity up to which this tier applies. It is null for the last tier.\nIMPORTANT: Tier boundaries are INCLUSIVE.\n- If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier\n- This behavior is consistent across both VOLUME and SLAB tier modes"}}}},"price_unit_type":{"type":"string","enum":["FIAT","CUSTOM"],"x-enum-varnames":["PRICE_UNIT_TYPE_FIAT","PRICE_UNIT_TYPE_CUSTOM"],"x-speakeasy-name-override":"PriceUnitType"},"sequence":{"type":"integer","description":"Sequence is the monotonic stamp bumped on every state change that\nsubscription line items need to react to. Read by the plan-price sync;\nset by the database (DEFAULT nextval) on create and by the price\nrepository on termination / compatibility-affecting edits."},"start_date":{"type":"string","description":"StartDate is the start date of the price","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"tier_mode":{"type":"string","enum":["VOLUME","SLAB"],"x-enum-varnames":["BILLING_TIER_VOLUME","BILLING_TIER_SLAB"],"x-speakeasy-name-override":"BillingTier"},"tiers":{"type":"array","items":{"type":"object","properties":{"flat_amount":{"type":"string","description":"flat_amount is the flat amount for the given tier (optional)\nApplied on top of unit_amount*quantity. Useful for cases like \"2.7$ + 5c\""},"unit_amount":{"type":"string","description":"unit_amount is the amount per unit for the given tier"},"up_to":{"type":"integer","description":"up_to is the quantity up to which this tier applies. It is null for the last tier.\nIMPORTANT: Tier boundaries are INCLUSIVE.\n- If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier\n- This behavior is consistent across both VOLUME and SLAB tier modes"}}}},"transform_quantity":{"type":"object","properties":{"divide_by":{"type":"integer","description":"Divide quantity by this number"},"round":{"type":"string","enum":["up","down"],"x-enum-varnames":["ROUND_UP","ROUND_DOWN"],"x-speakeasy-name-override":"RoundType"}}},"trial_period_days":{"type":"integer","description":"TrialPeriodDays is the number of days for the trial period\nNote: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)"},"type":{"type":"string","enum":["USAGE","FIXED"],"x-enum-varnames":["PRICE_TYPE_USAGE","PRICE_TYPE_FIXED"],"x-speakeasy-name-override":"PriceType"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"price_id":{"type":"string"},"price_type":{"type":"string","enum":["USAGE","FIXED"],"x-enum-varnames":["PRICE_TYPE_USAGE","PRICE_TYPE_FIXED"],"x-speakeasy-name-override":"PriceType"},"price_unit":{"type":"string"},"price_unit_id":{"type":"string"},"quantity":{"type":"string"},"start_date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"subscription_phase_id":{"type":"string"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"lookup_key":{"type":"string","description":"LookupKey is the key used to lookup the subscription in our system"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"overage_factor":{"type":"string","description":"OverageFactor is a multiplier applied to usage beyond the commitment amount"},"parent_subscription_id":{"type":"string","description":"ParentSubscriptionID is the parent subscription ID for hierarchy (e.g. child subscription under a parent)"},"pause_status":{"type":"string","enum":["none","active","scheduled","completed","cancelled"],"x-enum-varnames":["PauseStatusNone","PauseStatusActive","PauseStatusScheduled","PauseStatusCompleted","PauseStatusCancelled"],"x-speakeasy-name-override":"PauseStatus"},"pauses":{"type":"array","items":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the pause"},"id":{"type":"string","description":"ID is the unique identifier for the subscription pause"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"original_period_end":{"type":"string","description":"OriginalPeriodEnd is the end of the billing period when the pause was created","format":"date-time"},"original_period_start":{"type":"string","description":"OriginalPeriodStart is the start of the billing period when the pause was created","format":"date-time"},"pause_end":{"type":"string","description":"PauseEnd is when the pause will end (null for indefinite)","format":"date-time"},"pause_mode":{"type":"string","enum":["immediate","scheduled","period_end"],"x-enum-varnames":["PauseModeImmediate","PauseModeScheduled","PauseModePeriodEnd"],"x-speakeasy-name-override":"PauseMode"},"pause_start":{"type":"string","description":"PauseStart is when the pause actually started","format":"date-time"},"pause_status":{"type":"string","enum":["none","active","scheduled","completed","cancelled"],"x-enum-varnames":["PauseStatusNone","PauseStatusActive","PauseStatusScheduled","PauseStatusCompleted","PauseStatusCancelled"],"x-speakeasy-name-override":"PauseStatus"},"reason":{"type":"string","description":"Reason is the reason for pausing"},"resume_mode":{"type":"string","enum":["immediate","scheduled","auto"],"x-enum-varnames":["ResumeModeImmediate","ResumeModeScheduled","ResumeModeAuto"],"x-speakeasy-name-override":"ResumeMode"},"resumed_at":{"type":"string","description":"ResumedAt is when the pause was actually ended (if manually resumed)","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string","description":"SubscriptionID is the identifier for the subscription"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"payment_behavior":{"type":"string","description":"PaymentBehavior determines how subscription payments are handled"},"payment_terms":{"type":"string","enum":["15 NET","30 NET","45 NET","60 NET","75 NET","90 NET","END_OF_MONTH","END_OF_NEXT_MONTH"],"x-enum-varnames":["PaymentTerms15Net","PaymentTerms30Net","PaymentTerms45Net","PaymentTerms60Net","PaymentTerms75Net","PaymentTerms90Net","PaymentTermsEndOfMonth","PaymentTermsEndOfNextMonth"],"x-speakeasy-name-override":"PaymentTerms"},"phases":{"type":"array","description":"Phases are the subscription phases for this subscription","items":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"end_date":{"type":"string","description":"EndDate is when the phase ends (nil if phase is still active or indefinite)","format":"date-time"},"environment_id":{"type":"string","description":"EnvironmentID is the environment identifier for the phase"},"id":{"type":"string","description":"ID is the unique identifier for the subscription phase"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"start_date":{"type":"string","description":"StartDate is when the phase starts","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string","description":"SubscriptionID is the identifier for the subscription"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"plan":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grants":{"type":"array","items":{"type":"object","properties":{"addon_id":{"type":"string"},"cadence":{"type":"string","enum":["ONETIME","RECURRING"],"x-enum-varnames":["CreditGrantCadenceOneTime","CreditGrantCadenceRecurring"],"x-speakeasy-name-override":"CreditGrantCadence"},"conversion_rate":{"type":"string","description":"amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"credit_grant_anchor":{"type":"string","format":"date-time"},"credits":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"expiration_duration":{"type":"integer"},"expiration_duration_unit":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"],"x-enum-varnames":["CreditGrantExpiryDurationUnitDays","CreditGrantExpiryDurationUnitWeeks","CreditGrantExpiryDurationUnitMonths","CreditGrantExpiryDurationUnitYears"],"x-speakeasy-name-override":"CreditGrantExpiryDurationUnit"},"expiration_type":{"type":"string","enum":["NEVER","DURATION","BILLING_CYCLE"],"x-enum-varnames":["CreditGrantExpiryTypeNever","CreditGrantExpiryTypeDuration","CreditGrantExpiryTypeBillingCycle"],"x-speakeasy-name-override":"CreditGrantExpiryType"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"period":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","ANNUAL","QUARTERLY","HALF_YEARLY"],"x-enum-varnames":["CREDIT_GRANT_PERIOD_DAILY","CREDIT_GRANT_PERIOD_WEEKLY","CREDIT_GRANT_PERIOD_MONTHLY","CREDIT_GRANT_PERIOD_ANNUAL","CREDIT_GRANT_PERIOD_QUARTER","CREDIT_GRANT_PERIOD_HALF_YEARLY"],"x-speakeasy-name-override":"CreditGrantPeriod"},"period_count":{"type":"integer"},"plan_id":{"type":"string"},"priority":{"type":"integer"},"scope":{"type":"string","enum":["PLAN","SUBSCRIPTION","ADDON"],"x-enum-varnames":["CreditGrantScopePlan","CreditGrantScopeSubscription","CreditGrantScopeAddon"],"x-speakeasy-name-override":"CreditGrantScope"},"start_date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_id":{"type":"string"},"tenant_id":{"type":"string"},"topup_conversion_rate":{"type":"string","description":"topup_conversion_rate is the conversion rate for the topup to the currency\nex if topup_conversion_rate is 1, then 1 USD = 1 credit\nex if topup_conversion_rate is 2, then 1 USD = 0.5 credits\nex if topup_conversion_rate is 0.5, then 1 USD = 2 credits"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"description":{"type":"string"},"display_order":{"type":"integer"},"entitlements":{"type":"array","items":{"$circularRef":"1c99a94f-ba2d-4aeb-aec5-928f5daeddec"}},"environment_id":{"type":"string"},"id":{"type":"string"},"lookup_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"x-speakeasy-name-override":"Metadata"},"name":{"type":"string"},"price_sync_status":{"type":"object","properties":{"current_sequence":{"type":"integer"},"synced":{"type":"boolean"},"unsynced_subscription_count":{"type":"integer"}}},"prices":{"type":"array","description":"TODO: Add inline addons","items":{"$circularRef":"0dc125d7-6bd8-40a5-8d18-2c0190dcf082"}},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"plan_id":{"type":"string","description":"PlanID is the identifier for the plan in our system"},"proration_behavior":{"type":"string","enum":["create_prorations","none"],"x-enum-comments":{"ProrationBehaviorCreateProrations":"Default: Create credits/charges on invoice","ProrationBehaviorNone":"Calculate but don't apply (e.g., for previews)"},"x-enum-varnames":["ProrationBehaviorCreateProrations","ProrationBehaviorNone"],"x-speakeasy-name-override":"ProrationBehavior"},"start_date":{"type":"string","description":"StartDate is the start date of the subscription","format":"date-time"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"subscription_status":{"type":"string","enum":["active","paused","cancelled","incomplete","trialing","draft"],"x-enum-varnames":["SubscriptionStatusActive","SubscriptionStatusPaused","SubscriptionStatusCancelled","SubscriptionStatusIncomplete","SubscriptionStatusTrialing","SubscriptionStatusDraft"],"x-speakeasy-name-override":"SubscriptionStatus"},"subscription_type":{"type":"string","enum":["standalone","delegated_invoicing","parent","inherited","grouped_invoicing"],"x-enum-varnames":["SubscriptionTypeStandalone","SubscriptionTypeDelegatedInvoicing","SubscriptionTypeParent","SubscriptionTypeInherited","SubscriptionTypeGroupedInvoicing"],"x-speakeasy-name-override":"SubscriptionType"},"synced_price_sequence":{"type":"integer","description":"SyncedPriceSequence is the plan-price sequence up to which this\nsubscription's line items have been reconciled. Bumped by the\nplan-price sync after a successful pass."},"tenant_id":{"type":"string"},"timezone":{"type":"string"},"trial_end":{"type":"string","description":"TrialEnd is the end date of the trial period","format":"date-time"},"trial_start":{"type":"string","description":"TrialStart is the start date of the trial period","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"},"version":{"type":"integer","description":"Version is used for optimistic locking"}}},"subscription_customer_id":{"type":"string","description":"subscription_customer_id is the subscription owner's customer ID (Subscription.CustomerID).\nIt may differ from customer_id when the subscription uses an invoicing customer. Set internally; nullable in DB."},"subscription_id":{"type":"string","description":"subscription_id is the ID of the subscription this invoice is associated with (only present for subscription-based invoices)"},"subtotal":{"type":"string","description":"subtotal is the sum of all line items before any taxes, discounts, or additional fees"},"tax_exemption_reason_code":{"type":"string","enum":["customer_exempt","no_tax_configured","reverse_charge","not_collecting","not_subject_to_tax","not_supported"],"x-enum-varnames":["TaxExemptionReasonCustomerExempt","TaxExemptionReasonNoTaxConfigured","TaxExemptionReasonReverseCharge","TaxExemptionReasonNotCollecting","TaxExemptionReasonNotSubjectToTax","TaxExemptionReasonNotSupported"],"x-speakeasy-name-override":"TaxExemptionReasonCode"},"tax_summary":{"type":"object","properties":{"exclusive_tax":{"type":"string"},"exemption":{"type":"object","properties":{"reason":{"type":"string"},"reason_code":{"type":"string","enum":["customer_exempt","no_tax_configured","reverse_charge","not_collecting","not_subject_to_tax","not_supported"],"x-enum-varnames":["TaxExemptionReasonCustomerExempt","TaxExemptionReasonNoTaxConfigured","TaxExemptionReasonReverseCharge","TaxExemptionReasonNotCollecting","TaxExemptionReasonNotSubjectToTax","TaxExemptionReasonNotSupported"],"x-speakeasy-name-override":"TaxExemptionReasonCode"}}},"inclusive_tax":{"type":"string"},"total_tax":{"type":"string"}}},"taxes":{"type":"array","description":"tax_applied_records contains the tax applied records associated with this invoice","items":{"type":"object","properties":{"applied_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"currency":{"type":"string"},"entity_id":{"type":"string"},"entity_type":{"type":"string","enum":["customer","subscription","invoice","tenant","credit_note"],"x-enum-varnames":["TaxRateEntityTypeCustomer","TaxRateEntityTypeSubscription","TaxRateEntityTypeInvoice","TaxRateEntityTypeTenant","TaxRateEntityTypeCreditNote"],"x-speakeasy-name-override":"TaxRateEntityType"},"environment_id":{"type":"string"},"external_tax_details":{"type":"object","properties":{"calculation_expires_at":{"type":"string","description":"CalculationExpiresAt is when the calculation can no longer be filed, RFC3339.","format":"date-time"},"calculation_id":{"type":"string","description":"CalculationID is the provider calculation this row was written from. Commit files it."},"display_name":{"type":"string","description":"DisplayName is the engine's own name for the tax, such as\n\"Integrated goods and services tax (IGST)\"."},"jurisdiction":{"type":"object","properties":{"country":{"type":"string"},"display_name":{"type":"string"},"level":{"type":"string"},"state":{"type":"string"}},"x-speakeasy-name-override":"TaxJurisdiction"},"percentage":{"type":"string","description":"Percentage is the resolved rate, such as \"18.0\". This is what was charged, not the\nrate that would apply if the tax were imposed."},"reference":{"type":"string","description":"Reference is what this row's provider transaction was filed under. It is unique across\nevery transaction on the account, so it is also the only way back to a transaction whose\nid failed to land here."},"reversal":{"type":"object","properties":{"mode":{"type":"string","enum":["full","partial"],"x-enum-varnames":["TaxReversalModeFull","TaxReversalModePartial"],"x-speakeasy-name-override":"TaxReversalMode"},"original_transaction":{"type":"string"}},"x-speakeasy-name-override":"TaxReversal"},"sourcing":{"type":"string","description":"Sourcing is whether the jurisdiction followed the seller's address or the buyer's."},"tax_code":{"type":"string","description":"TaxCode is the product tax category the engine priced against, such as txcd_10000000.\nIt belongs to the line rather than the rate, so today every row on an invoice carries\nthe account default. It only varies once tax is calculated per line item."},"tax_type":{"type":"string","description":"TaxType is the tax family, such as vat, igst or sales_tax."},"taxability_reason":{"type":"string","description":"TaxabilityReason is why the engine charged what it did, such as standard_rated or\nreverse_charge. Recorded, not yet rendered."}},"x-speakeasy-name-override":"ExternalTaxDetails"},"id":{"type":"string"},"idempotency_key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"provider":{"type":"string","enum":["flexprice","stripe"],"x-enum-varnames":["TaxProviderFlexprice","TaxProviderStripe"],"x-speakeasy-name-override":"TaxProvider"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tax_amount":{"type":"string"},"tax_association_id":{"type":"string"},"tax_behavior":{"type":"string","enum":["inclusive","exclusive"],"x-enum-varnames":["TaxBehaviorInclusive","TaxBehaviorExclusive"],"x-speakeasy-name-override":"TaxBehavior"},"tax_rate":{"type":"object","properties":{"code":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"description":{"type":"string"},"environment_id":{"type":"string"},"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"percentage_value":{"type":"string"},"scope":{"type":"string","enum":["INTERNAL","EXTERNAL","ONETIME"],"x-enum-varnames":["TaxRateScopeInternal","TaxRateScopeExternal","TaxRateScopeOneTime"],"x-speakeasy-name-override":"TaxRateScope"},"status":{"type":"string","enum":["published","deleted","archived"],"x-enum-varnames":["StatusPublished","StatusDeleted","StatusArchived"],"x-speakeasy-name-override":"Status"},"tax_rate_status":{"type":"string","enum":["ACTIVE","INACTIVE"],"x-enum-varnames":["TaxRateStatusActive","TaxRateStatusInactive"],"x-speakeasy-name-override":"TaxRateStatus"},"tax_rate_type":{"type":"string","enum":["percentage"],"x-enum-varnames":["TaxRateTypePercentage"],"x-speakeasy-name-override":"TaxRateType"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}},"tax_rate_id":{"type":"string","description":"Null when an external engine calculated the tax: there is no Flexprice rate to point at."},"tax_transaction_id":{"type":"string","description":"TaxTransactionID is the provider transaction recording the filed tax, stamped at commit."},"tax_transaction_type":{"type":"string","enum":["filing","reversal"],"x-enum-varnames":["TaxTransactionTypeFiling","TaxTransactionTypeReversal"],"x-speakeasy-name-override":"TaxTransactionType"},"taxable_amount":{"type":"string"},"tenant_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"}}}},"tenant_id":{"type":"string"},"total":{"type":"string","description":"total is the final amount including taxes, fees, and discounts"},"total_discount":{"type":"string","description":"total_discount is the sum of all coupon discounts applied to the invoice"},"total_prepaid_credits_applied":{"type":"string","description":"total_prepaid_credits_applied is the total amount of prepaid credits applied to this invoice."},"total_tax":{"type":"string","description":"total_tax is the sum of all taxes combined at the invoice level."},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":"string"},"version":{"type":"integer","description":"version is the version number for tracking changes to this invoice"},"voided_at":{"type":"string","description":"voided_at is the timestamp when this invoice was voided or cancelled","format":"date-time"}}}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","description":"Enter your API key in the format *x-api-key \u0026lt;api-key\u0026gt;**","name":"x-api-key","in":"header","scopes":[],"schemeName":"ApiKeyAuth"},"schema":{"title":"x-api-key","type":"string","description":"Enter your API key in the format *x-api-key \u0026lt;api-key\u0026gt;**","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"x-api-key"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"https://swagger.flexprice.io"},"subdomain":"flexprice","siteName":"Flexprice","title":"Update invoice payment status - Flexprice","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-23T12:45:16.010Z","originalFileLocation":"api-reference/invoices/update-invoice-payment-status.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=\"Use when reconciling payment status from an external gateway or manual entry (e.g. mark paid after bank confirmation).\">\u003cmeta data-mint-head name=\"application-name\" content=\"Flexprice\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/flexprice/7xM46OYu1enH2rig/_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/flexprice/7xM46OYu1enH2rig/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/flexprice/7xM46OYu1enH2rig/_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/flexprice/7xM46OYu1enH2rig/_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/flexprice/7xM46OYu1enH2rig/_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/flexprice/7xM46OYu1enH2rig/_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/flexprice/7xM46OYu1enH2rig/_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/flexprice/7xM46OYu1enH2rig/_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/flexprice/7xM46OYu1enH2rig/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update invoice payment status - Flexprice\">\u003cmeta data-mint-head property=\"og:description\" content=\"Use when reconciling payment status from an external gateway or manual entry (e.g. mark paid after bank confirmation).\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Flexprice\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.flexprice.io/api-reference/invoices/update-invoice-payment-status\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://flexprice.mintlify.app/_mintlify/api/og/v2?division=Invoices\u0026amp;title=Update+invoice+payment+status\u0026amp;description=Use+when+reconciling+payment+status+from+an+external+gateway+or+manual+entry+%28e.g.+mark+paid+after+bank+confirmation%29.\u0026amp;theme=792146983879b831a3a27cee\u0026amp;signature=7060328e9245f32fbb93a8d0df467e649c8c345b9f3d0071c9f70e5004f299ec\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Update invoice payment status - Flexprice\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Use when reconciling payment status from an external gateway or manual entry (e.g. mark paid after bank confirmation).\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://flexprice.mintlify.app/_mintlify/api/og/v2?division=Invoices\u0026amp;title=Update+invoice+payment+status\u0026amp;description=Use+when+reconciling+payment+status+from+an+external+gateway+or+manual+entry+%28e.g.+mark+paid+after+bank+confirmation%29.\u0026amp;theme=792146983879b831a3a27cee\u0026amp;signature=7060328e9245f32fbb93a8d0df467e649c8c345b9f3d0071c9f70e5004f299ec\">\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/flexprice/7xM46OYu1enH2rig/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Flexprice\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#15547c\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.flexprice.io/api-reference/invoices/update-invoice-payment-status\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/invoices/update-invoice-payment-status.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.flexprice.io/#organization\",\"name\":\"Flexprice\",\"url\":\"https://docs.flexprice.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/flexprice/Qokjirde4CQUcFy8/images/FlexpriceWordMarkDark.png?fit=max\u0026auto=format\u0026n=Qokjirde4CQUcFy8\u0026q=85\u0026s=d706a1b6139418c2d57ba902fb0b6de4\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.flexprice.io#website\",\"name\":\"Flexprice\",\"url\":\"https://docs.flexprice.io\",\"publisher\":{\"@id\":\"https://docs.flexprice.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.flexprice.io/api-reference/invoices/update-invoice-payment-status#webpage\",\"url\":\"https://docs.flexprice.io/api-reference/invoices/update-invoice-payment-status\",\"name\":\"Update invoice payment status\",\"description\":\"Use when reconciling payment status from an external gateway or manual entry (e.g. mark paid after bank confirmation).\",\"dateModified\":\"2026-10-23T12:45:16.010Z\",\"isPartOf\":{\"@id\":\"https://docs.flexprice.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.flexprice.io/api-reference/invoices/update-invoice-payment-status#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.flexprice.io/api-reference/invoices/update-invoice-payment-status#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Resources\",\"item\":\"https://docs.flexprice.io/api-reference/activity/list-activity\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Invoices\",\"item\":\"https://docs.flexprice.io/api-reference/invoices/get-customer-invoice-summary\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Update invoice payment status\",\"item\":\"https://docs.flexprice.io/api-reference/invoices/update-invoice-payment-status\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.flexprice.io/api-reference/invoices/update-invoice-payment-status#apireference\",\"headline\":\"Update invoice payment status\",\"name\":\"Update invoice payment status\",\"description\":\"Use when reconciling payment status from an external gateway or manual entry (e.g. mark paid after bank confirmation).\",\"url\":\"https://docs.flexprice.io/api-reference/invoices/update-invoice-payment-status\",\"mainEntityOfPage\":{\"@id\":\"https://docs.flexprice.io/api-reference/invoices/update-invoice-payment-status#webpage\"},\"dateModified\":\"2026-10-23T12:45:16.010Z\",\"publisher\":{\"@id\":\"https://docs.flexprice.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.flexprice.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Flexprice\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Flexprice","nav":{"global":{"anchors":[{"anchor":"Support","icon":"https://mintlify.s3.us-west-1.amazonaws.com/flexprice/images/anchors/mail.svg","href":"mailto:support@flexprice.io"},{"anchor":"Community","icon":"https://mintlify.s3.us-west-1.amazonaws.com/flexprice/images/anchors/slack.svg","href":"https://join.slack.com/t/flexpricecommunity/shared_invite/zt-39uat51l0-n8JmSikHZP~bHJNXladeaQ"},{"anchor":"Website","icon":"https://mintlify.s3.us-west-1.amazonaws.com/flexprice/images/anchors/flexprice.svg","href":"https://flexprice.io/"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/docs/welcome-to-flexprice"}]},{"tab":"Cookbooks","pages":[{"title":"Cookbooks","href":"/cookbooks/billing-recipes/usage-based-pricing"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","pages":[{"title":"REST API","href":"/api-reference/introduction"},{"title":"Pagination","href":"/api-reference/pagination"},{"title":"Error responses","href":"/api-reference/error-responses"}]},{"group":"Resources","pages":[{"group":"Activity","pages":[{"title":"List activity","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /activity","href":"/api-reference/activity/list-activity"},{"title":"Get activity","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /activity/{id}","href":"/api-reference/activity/get-activity"}]},{"group":"Addons","pages":[{"title":"Create addon","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /addons","href":"/api-reference/addons/create-addon"},{"title":"Get addon by lookup key","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /addons/lookup/{lookup_key}","href":"/api-reference/addons/get-addon-by-lookup-key"},{"title":"Query addons","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /addons/search","href":"/api-reference/addons/query-addons"},{"title":"Get addon","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /addons/{id}","href":"/api-reference/addons/get-addon"},{"title":"Update addon","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /addons/{id}","href":"/api-reference/addons/update-addon"},{"title":"Delete addon","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /addons/{id}","href":"/api-reference/addons/delete-addon"},{"title":"Synchronize addon prices","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /addons/{id}/sync/subscriptions","href":"/api-reference/addons/synchronize-addon-prices"}]},{"group":"Credit Grants","pages":[{"title":"Get addon credit grants","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /addons/{id}/creditgrants","href":"/api-reference/credit-grants/get-addon-credit-grants"},{"title":"Create credit grant","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /creditgrants","href":"/api-reference/credit-grants/create-credit-grant"},{"title":"Get credit grant","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /creditgrants/{id}","href":"/api-reference/credit-grants/get-credit-grant"},{"title":"Update credit grant","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /creditgrants/{id}","href":"/api-reference/credit-grants/update-credit-grant"},{"title":"Delete credit grant","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /creditgrants/{id}","href":"/api-reference/credit-grants/delete-credit-grant"},{"title":"Get plan credit grants","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /plans/{id}/creditgrants","href":"/api-reference/credit-grants/get-plan-credit-grants"}]},{"group":"Entitlements","pages":[{"title":"Get addon entitlements","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /addons/{id}/entitlements","href":"/api-reference/entitlements/get-addon-entitlements"},{"title":"Create entitlement","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /entitlements","href":"/api-reference/entitlements/create-entitlement"},{"title":"Create entitlements in bulk","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /entitlements/bulk","href":"/api-reference/entitlements/create-entitlements-in-bulk"},{"title":"Query entitlements","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /entitlements/search","href":"/api-reference/entitlements/query-entitlements"},{"title":"Get entitlement","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /entitlements/{id}","href":"/api-reference/entitlements/get-entitlement"},{"title":"Update entitlement","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /entitlements/{id}","href":"/api-reference/entitlements/update-entitlement"},{"title":"Delete entitlement","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /entitlements/{id}","href":"/api-reference/entitlements/delete-entitlement"},{"title":"Get plan entitlements","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /plans/{id}/entitlements","href":"/api-reference/entitlements/get-plan-entitlements"}]},{"group":"Alerts","pages":[{"title":"Query alert logs","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /alerts/search","href":"/api-reference/alerts/query-alert-logs"}]},{"group":"AlertSettings","pages":[{"title":"Create alert settings","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /alerts/setting","href":"/api-reference/alertsettings/create-alert-settings"},{"title":"Query alert settings","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /alerts/setting/search","href":"/api-reference/alertsettings/query-alert-settings"},{"title":"Get alert settings","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /alerts/setting/{id}","href":"/api-reference/alertsettings/get-alert-settings"},{"title":"Update alert settings","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /alerts/setting/{id}","href":"/api-reference/alertsettings/update-alert-settings"},{"title":"Delete alert settings","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /alerts/setting/{id}","href":"/api-reference/alertsettings/delete-alert-settings"}]},{"group":"Analytics","pages":[{"title":"Run an ad-hoc analytics query","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /analytics/query","href":"/api-reference/analytics/run-an-ad-hoc-analytics-query"},{"title":"List financial reports","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /analytics/reports","href":"/api-reference/analytics/list-financial-reports"},{"title":"Run a financial report","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /analytics/reports/{key}/query","href":"/api-reference/analytics/run-a-financial-report"},{"title":"Query revenue analytics","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /analytics/revenue","href":"/api-reference/analytics/query-revenue-analytics"},{"title":"List analytics views","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /analytics/views","href":"/api-reference/analytics/list-analytics-views"},{"title":"Create an analytics view","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /analytics/views","href":"/api-reference/analytics/create-an-analytics-view"},{"title":"Get an analytics view","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /analytics/views/{id}","href":"/api-reference/analytics/get-an-analytics-view"},{"title":"Update an analytics view","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /analytics/views/{id}","href":"/api-reference/analytics/update-an-analytics-view"},{"title":"Delete an analytics view","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /analytics/views/{id}","href":"/api-reference/analytics/delete-an-analytics-view"},{"title":"Query an analytics view","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /analytics/views/{id}/query","href":"/api-reference/analytics/query-an-analytics-view"}]},{"group":"Checkout","pages":[{"title":"Create checkout session","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /checkout/sessions","href":"/api-reference/checkout/create-checkout-session"},{"title":"Get checkout session","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /checkout/sessions/{id}","href":"/api-reference/checkout/get-checkout-session"},{"title":"Delete checkout session","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /checkout/sessions/{id}","href":"/api-reference/checkout/delete-checkout-session"},{"title":"Cancel checkout session","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /checkout/sessions/{id}/cancel","href":"/api-reference/checkout/cancel-checkout-session"}]},{"group":"Costs","pages":[{"title":"Create costsheet","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /costs","href":"/api-reference/costs/create-costsheet"},{"title":"Get active costsheet","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /costs/active","href":"/api-reference/costs/get-active-costsheet"},{"title":"Get combined revenue and cost analytics","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /costs/analytics","href":"/api-reference/costs/get-combined-revenue-and-cost-analytics"},{"title":"Query costsheets","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /costs/search","href":"/api-reference/costs/query-costsheets"},{"title":"Get costsheet","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /costs/{id}","href":"/api-reference/costs/get-costsheet"},{"title":"Update costsheet","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /costs/{id}","href":"/api-reference/costs/update-costsheet"},{"title":"Delete costsheet","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /costs/{id}","href":"/api-reference/costs/delete-costsheet"}]},{"group":"Coupons","pages":[{"title":"Create coupon","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /coupons","href":"/api-reference/coupons/create-coupon"},{"title":"Get coupon by code","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /coupons/code/{code}","href":"/api-reference/coupons/get-coupon-by-code"},{"title":"Query coupons","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /coupons/search","href":"/api-reference/coupons/query-coupons"},{"title":"Get coupon","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /coupons/{id}","href":"/api-reference/coupons/get-coupon"},{"title":"Update coupon","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /coupons/{id}","href":"/api-reference/coupons/update-coupon"},{"title":"Delete coupon","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /coupons/{id}","href":"/api-reference/coupons/delete-coupon"}]},{"group":"Coupon Associations","pages":[{"title":"List coupon associations","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /coupons/associations","href":"/api-reference/coupon-associations/list-coupon-associations"},{"title":"Get coupon association","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /coupons/associations/{id}","href":"/api-reference/coupon-associations/get-coupon-association"}]},{"group":"Credit Notes","pages":[{"title":"Create credit note","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /creditnotes","href":"/api-reference/credit-notes/create-credit-note"},{"title":"Get credit note","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /creditnotes/{id}","href":"/api-reference/credit-notes/get-credit-note"},{"title":"Finalize credit note","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /creditnotes/{id}/finalize","href":"/api-reference/credit-notes/finalize-credit-note"},{"title":"Void credit note","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /creditnotes/{id}/void","href":"/api-reference/credit-notes/void-credit-note"}]},{"group":"Customers","pages":[{"title":"Update customer","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /customers","href":"/api-reference/customers/update-customer"},{"title":"Create customer","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /customers","href":"/api-reference/customers/create-customer"},{"title":"Get customer by external ID","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /customers/external/{external_id}","href":"/api-reference/customers/get-customer-by-external-id"},{"title":"Get customer entitlements by external ID","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /customers/external/{external_id}/entitlements","href":"/api-reference/customers/get-customer-entitlements-by-external-id"},{"title":"Get subscriptions for customer by external ID","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /customers/external/{external_id}/subscriptions","href":"/api-reference/customers/get-subscriptions-for-customer-by-external-id"},{"title":"Create customer portal session","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /customers/portal/{external_id}","href":"/api-reference/customers/create-customer-portal-session"},{"title":"Query customers","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /customers/search","href":"/api-reference/customers/query-customers"},{"title":"Get customer usage summary","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /customers/usage","href":"/api-reference/customers/get-customer-usage-summary"},{"title":"Get customer","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /customers/{id}","href":"/api-reference/customers/get-customer"},{"title":"Delete customer","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /customers/{id}","href":"/api-reference/customers/delete-customer"},{"title":"Get customer entitlements","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /customers/{id}/entitlements","href":"/api-reference/customers/get-customer-entitlements"},{"title":"Get upcoming credit grant applications","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /customers/{id}/grants/upcoming","href":"/api-reference/customers/get-upcoming-credit-grant-applications"},{"title":"List customer payment methods","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /customers/{id}/payment-methods","href":"/api-reference/customers/list-customer-payment-methods"}]},{"group":"Wallets","pages":[{"title":"Get Customer Wallets","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /customers/wallets","href":"/api-reference/wallets/get-customer-wallets"},{"title":"Get wallets by customer ID","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /customers/{id}/wallets","href":"/api-reference/wallets/get-wallets-by-customer-id"},{"title":"Create a new wallet","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /wallets","href":"/api-reference/wallets/create-a-new-wallet"},{"title":"Query wallets","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /wallets/search","href":"/api-reference/wallets/query-wallets"},{"title":"Query wallet transactions","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /wallets/transactions/search","href":"/api-reference/wallets/query-wallet-transactions"},{"title":"Get wallet","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /wallets/{id}","href":"/api-reference/wallets/get-wallet"},{"title":"Update a wallet","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /wallets/{id}","href":"/api-reference/wallets/update-a-wallet"},{"title":"Get wallet balance","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /wallets/{id}/balance/real-time","href":"/api-reference/wallets/get-wallet-balance"},{"title":"Terminate a wallet","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /wallets/{id}/terminate","href":"/api-reference/wallets/terminate-a-wallet"},{"title":"Top up wallet","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /wallets/{id}/top-up","href":"/api-reference/wallets/top-up-wallet"},{"title":"Get wallet transactions","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /wallets/{id}/transactions","href":"/api-reference/wallets/get-wallet-transactions"}]},{"group":"Invoices","pages":[{"title":"Get customer invoice summary","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /customers/{id}/invoices/summary","href":"/api-reference/invoices/get-customer-invoice-summary"},{"title":"Create one-off invoice","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /invoices","href":"/api-reference/invoices/create-one-off-invoice"},{"title":"Get invoice preview","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /invoices/preview","href":"/api-reference/invoices/get-invoice-preview"},{"title":"Query invoices","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /invoices/search","href":"/api-reference/invoices/query-invoices"},{"title":"Get invoice","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /invoices/{id}","href":"/api-reference/invoices/get-invoice"},{"title":"Update invoice","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /invoices/{id}","href":"/api-reference/invoices/update-invoice"},{"title":"Trigger invoice communication webhook","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /invoices/{id}/comms/trigger","href":"/api-reference/invoices/trigger-invoice-communication-webhook"},{"title":"Finalize invoice","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /invoices/{id}/finalize","href":"/api-reference/invoices/finalize-invoice"},{"title":"Execute invoice modification","description":"Execute a modification on a draft or finalized invoice. Supports line item changes: add (bulk), update (one line item per call; the edit is versioned, so the line item id changes), and remove (bulk, soft delete). Totals are recalculated from the remaining line items; a manual edit marks the invoice as manually edited, which disables recompute. Modifying a FINALIZED invoice voids it and recreates it as a draft copy carrying all current data (description, billing period, due date, metadata, line items); the modification lands on the copy and the response returns the new draft — chain subsequent calls to the returned invoice id; a call that still targets the voided original is rejected with an error naming the replacement.","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /invoices/{id}/modify/execute","href":"/api-reference/invoices/execute-invoice-modification"},{"title":"Update invoice payment status","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /invoices/{id}/payment","href":"/api-reference/invoices/update-invoice-payment-status"},{"title":"Attempt invoice payment","description":"Use when paying an invoice with the customer's wallet balance (e.g. prepaid credits or balance applied at checkout).","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /invoices/{id}/payment/attempt","href":"/api-reference/invoices/attempt-invoice-payment"},{"title":"Get invoice PDF","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /invoices/{id}/pdf","href":"/api-reference/invoices/get-invoice-pdf"},{"title":"Recalculate invoice (voided invoice)","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /invoices/{id}/recalculate","href":"/api-reference/invoices/recalculate-invoice-voided-invoice"},{"title":"Recalculate draft invoice (v2)","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /invoices/{id}/recalculate-v2","href":"/api-reference/invoices/recalculate-draft-invoice-v2"},{"title":"Void invoice","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /invoices/{id}/void","href":"/api-reference/invoices/void-invoice"}]},{"group":"Environments","pages":[{"title":"Clone an environment","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /environments/{id}/clone","href":"/api-reference/environments/clone-an-environment"}]},{"group":"Events","pages":[{"title":"Ingest event","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /events","href":"/api-reference/events/ingest-event"},{"title":"Get usage analytics","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /events/analytics","href":"/api-reference/events/get-usage-analytics"},{"title":"Bulk ingest events","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /events/bulk","href":"/api-reference/events/bulk-ingest-events"},{"title":"Get event","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /events/lookup","href":"/api-reference/events/get-event"},{"title":"List raw events","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /events/query","href":"/api-reference/events/list-raw-events"},{"title":"Get usage statistics","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /events/usage","href":"/api-reference/events/get-usage-statistics"},{"title":"Get usage by meter","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /events/usage/meter","href":"/api-reference/events/get-usage-by-meter"}]},{"group":"Features","pages":[{"title":"Create feature","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /features","href":"/api-reference/features/create-feature"},{"title":"Query features","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /features/search","href":"/api-reference/features/query-features"},{"title":"Update feature","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /features/{id}","href":"/api-reference/features/update-feature"},{"title":"Delete feature","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /features/{id}","href":"/api-reference/features/delete-feature"},{"title":"Clone a feature","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /features/{id}/clone","href":"/api-reference/features/clone-a-feature"}]},{"group":"FX Rates","pages":[{"title":"Create an FX rate","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /forex","href":"/api-reference/fx-rates/create-an-fx-rate"},{"title":"Query FX rates","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /forex/query","href":"/api-reference/fx-rates/query-fx-rates"},{"title":"Get an FX rate","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /forex/{id}","href":"/api-reference/fx-rates/get-an-fx-rate"},{"title":"Update an FX rate","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /forex/{id}","href":"/api-reference/fx-rates/update-an-fx-rate"},{"title":"Delete an FX rate","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /forex/{id}","href":"/api-reference/fx-rates/delete-an-fx-rate"}]},{"group":"Groups","pages":[{"title":"Create group","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /groups","href":"/api-reference/groups/create-group"},{"title":"Query groups","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /groups/search","href":"/api-reference/groups/query-groups"},{"title":"Get group","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /groups/{id}","href":"/api-reference/groups/get-group"},{"title":"Delete group","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /groups/{id}","href":"/api-reference/groups/delete-group"}]},{"group":"Integrations","pages":[{"title":"Get integration configurations","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /integrations/config","href":"/api-reference/integrations/get-integration-configurations"},{"title":"Link integration mapping","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /integrations/link","href":"/api-reference/integrations/link-integration-mapping"},{"title":"Delink integration mapping","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /integrations/link","href":"/api-reference/integrations/delink-integration-mapping"},{"title":"Get entity integration mappings","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /integrations/mappings","href":"/api-reference/integrations/get-entity-integration-mappings"}]},{"group":"Marketplace","pages":[{"title":"Register an AWS Marketplace agreement","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /marketplace/agreements","href":"/api-reference/marketplace/register-an-aws-marketplace-agreement"}]},{"group":"Payments","pages":[{"title":"List payments","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /payments","href":"/api-reference/payments/list-payments"},{"title":"Create payment","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /payments","href":"/api-reference/payments/create-payment"},{"title":"Get payment","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /payments/{id}","href":"/api-reference/payments/get-payment"},{"title":"Update payment","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /payments/{id}","href":"/api-reference/payments/update-payment"},{"title":"Delete payment","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /payments/{id}","href":"/api-reference/payments/delete-payment"},{"title":"Process payment","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /payments/{id}/process","href":"/api-reference/payments/process-payment"}]},{"group":"Plans","pages":[{"title":"Create plan","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /plans","href":"/api-reference/plans/create-plan"},{"title":"Query plans","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /plans/search","href":"/api-reference/plans/query-plans"},{"title":"Get plan","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /plans/{id}","href":"/api-reference/plans/get-plan"},{"title":"Update plan","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /plans/{id}","href":"/api-reference/plans/update-plan"},{"title":"Delete plan","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /plans/{id}","href":"/api-reference/plans/delete-plan"},{"title":"Clone a plan","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /plans/{id}/clone","href":"/api-reference/plans/clone-a-plan"},{"title":"Synchronize plan prices","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /plans/{id}/sync/subscriptions","href":"/api-reference/plans/synchronize-plan-prices"}]},{"group":"SelfBilling","pages":[{"title":"Start self-billing checkout","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /portal/billing/checkout","href":"/api-reference/selfbilling/start-self-billing-checkout"},{"title":"Poll self-billing checkout","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /portal/billing/checkout/{id}","href":"/api-reference/selfbilling/poll-self-billing-checkout"},{"title":"Cancel self-billing checkout","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /portal/billing/checkout/{id}/cancel","href":"/api-reference/selfbilling/cancel-self-billing-checkout"},{"title":"Create self-billing portal session","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /portal/billing/portal-session","href":"/api-reference/selfbilling/create-self-billing-portal-session"},{"title":"Get self-billing status","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /portal/billing/status","href":"/api-reference/selfbilling/get-self-billing-status"},{"title":"Get self-billing summary","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /portal/billing/summary","href":"/api-reference/selfbilling/get-self-billing-summary"},{"title":"Get tenant billing summary","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /tenants/billing","href":"/api-reference/selfbilling/get-tenant-billing-summary"}]},{"group":"Prices","pages":[{"title":"Create price","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /prices","href":"/api-reference/prices/create-price"},{"title":"Create prices in bulk","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /prices/bulk","href":"/api-reference/prices/create-prices-in-bulk"},{"title":"Get price by lookup key","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /prices/lookup/{lookup_key}","href":"/api-reference/prices/get-price-by-lookup-key"},{"title":"Query prices","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /prices/search","href":"/api-reference/prices/query-prices"},{"title":"Get price","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /prices/{id}","href":"/api-reference/prices/get-price"},{"title":"Update price","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /prices/{id}","href":"/api-reference/prices/update-price"},{"title":"Delete price","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /prices/{id}","href":"/api-reference/prices/delete-price"}]},{"group":"Price Units","pages":[{"title":"List price units","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /prices/units","href":"/api-reference/price-units/list-price-units"},{"title":"Create price unit","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /prices/units","href":"/api-reference/price-units/create-price-unit"},{"title":"Get price unit by code","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /prices/units/code/{code}","href":"/api-reference/price-units/get-price-unit-by-code"},{"title":"Query price units","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /prices/units/search","href":"/api-reference/price-units/query-price-units"},{"title":"Get price unit","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /prices/units/{id}","href":"/api-reference/price-units/get-price-unit"},{"title":"Update price unit","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /prices/units/{id}","href":"/api-reference/price-units/update-price-unit"},{"title":"Delete price unit","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /prices/units/{id}","href":"/api-reference/price-units/delete-price-unit"}]},{"group":"RBAC","pages":[{"title":"List all RBAC roles","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /rbac/roles","href":"/api-reference/rbac/list-all-rbac-roles"},{"title":"Get a specific RBAC role","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /rbac/roles/{id}","href":"/api-reference/rbac/get-a-specific-rbac-role"}]},{"group":"Refunds","pages":[{"title":"List refunds","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /refunds","href":"/api-reference/refunds/list-refunds"},{"title":"Get refund","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /refunds/{id}","href":"/api-reference/refunds/get-refund"},{"title":"Retry refund","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /refunds/{id}/retry","href":"/api-reference/refunds/retry-refund"}]},{"group":"Secrets","pages":[{"title":"List API keys","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /secrets/api/keys","href":"/api-reference/secrets/list-api-keys"},{"title":"Create a new API key","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /secrets/api/keys","href":"/api-reference/secrets/create-a-new-api-key"},{"title":"Delete an API key","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /secrets/api/keys/{id}","href":"/api-reference/secrets/delete-an-api-key"}]},{"group":"Subscriptions","pages":[{"title":"Create subscription","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions","href":"/api-reference/subscriptions/create-subscription"},{"title":"Add addon to subscription","deprecated":true,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions/addon","href":"/api-reference/subscriptions/add-addon-to-subscription"},{"title":"Remove addon from subscription","deprecated":true,"version":null,"openapi":"https://swagger.flexprice.io delete /subscriptions/addon","href":"/api-reference/subscriptions/remove-addon-from-subscription"},{"title":"Search subscription line items","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions/lineitems/search","href":"/api-reference/subscriptions/search-subscription-line-items"},{"title":"Update subscription line item","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /subscriptions/lineitems/{id}","href":"/api-reference/subscriptions/update-subscription-line-item"},{"title":"Delete subscription line item","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /subscriptions/lineitems/{id}","href":"/api-reference/subscriptions/delete-subscription-line-item"},{"title":"List all subscription schedules","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /subscriptions/schedules","href":"/api-reference/subscriptions/list-all-subscription-schedules"},{"title":"Get subscription schedule","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /subscriptions/schedules/{schedule_id}","href":"/api-reference/subscriptions/get-subscription-schedule"},{"title":"Cancel subscription schedule","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions/schedules/{schedule_id}/cancel","href":"/api-reference/subscriptions/cancel-subscription-schedule"},{"title":"Query subscriptions","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions/search","href":"/api-reference/subscriptions/query-subscriptions"},{"title":"Get usage by subscription","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions/usage","href":"/api-reference/subscriptions/get-usage-by-subscription"},{"title":"Get subscription","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /subscriptions/{id}","href":"/api-reference/subscriptions/get-subscription"},{"title":"Update subscription","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /subscriptions/{id}","href":"/api-reference/subscriptions/update-subscription"},{"title":"Activate draft subscription","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions/{id}/activate","href":"/api-reference/subscriptions/activate-draft-subscription"},{"title":"Get active addon associations","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /subscriptions/{id}/addons/associations","href":"/api-reference/subscriptions/get-active-addon-associations"},{"title":"Cancel subscription","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions/{id}/cancel","href":"/api-reference/subscriptions/cancel-subscription"},{"title":"Execute subscription plan change","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions/{id}/change/execute","href":"/api-reference/subscriptions/execute-subscription-plan-change"},{"title":"Preview subscription plan change","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions/{id}/change/preview","href":"/api-reference/subscriptions/preview-subscription-plan-change"},{"title":"Execute a plan change (v2, swap in place)","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions/{id}/change/v2/execute","href":"/api-reference/subscriptions/execute-a-plan-change-v2-swap-in-place"},{"title":"Preview a plan change (v2, swap in place)","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions/{id}/change/v2/preview","href":"/api-reference/subscriptions/preview-a-plan-change-v2-swap-in-place"},{"title":"Get subscription entitlements","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /subscriptions/{id}/entitlements","href":"/api-reference/subscriptions/get-subscription-entitlements"},{"title":"Get upcoming credit grant applications","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /subscriptions/{id}/grants/upcoming","href":"/api-reference/subscriptions/get-upcoming-credit-grant-applications"},{"title":"Create subscription line item","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions/{id}/lineitems","href":"/api-reference/subscriptions/create-subscription-line-item"},{"title":"Execute subscription modification","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions/{id}/modify/execute","href":"/api-reference/subscriptions/execute-subscription-modification"},{"title":"Preview subscription modification","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions/{id}/modify/preview","href":"/api-reference/subscriptions/preview-subscription-modification"},{"title":"Pause subscription","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions/{id}/pause","href":"/api-reference/subscriptions/pause-subscription"},{"title":"Resume subscription","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /subscriptions/{id}/resume","href":"/api-reference/subscriptions/resume-subscription"},{"title":"List subscription schedules","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /subscriptions/{id}/schedules","href":"/api-reference/subscriptions/list-subscription-schedules"},{"title":"Get subscription (V2)","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /subscriptions/{id}/v2","href":"/api-reference/subscriptions/get-subscription-v2"}]},{"group":"Tasks","pages":[{"title":"List tasks","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /tasks","href":"/api-reference/tasks/list-tasks"},{"title":"Import a CSV of usage events","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /tasks","href":"/api-reference/tasks/import-a-csv-of-usage-events"},{"title":"Get task processing result","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /tasks/result","href":"/api-reference/tasks/get-task-processing-result"},{"title":"Get a task","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /tasks/{id}","href":"/api-reference/tasks/get-a-task"},{"title":"Download task export file","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /tasks/{id}/download","href":"/api-reference/tasks/download-task-export-file"},{"title":"Update task status","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /tasks/{id}/status","href":"/api-reference/tasks/update-task-status"}]},{"group":"Scheduled Tasks","pages":[{"title":"List scheduled tasks","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /tasks/scheduled","href":"/api-reference/scheduled-tasks/list-scheduled-tasks"},{"title":"Create scheduled task","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /tasks/scheduled","href":"/api-reference/scheduled-tasks/create-scheduled-task"},{"title":"Schedule draft finalization","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /tasks/scheduled/schedule-draft-finalization","href":"/api-reference/scheduled-tasks/schedule-draft-finalization"},{"title":"Schedule update billing period","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /tasks/scheduled/schedule-update-billing-period","href":"/api-reference/scheduled-tasks/schedule-update-billing-period"},{"title":"Get scheduled task","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /tasks/scheduled/{id}","href":"/api-reference/scheduled-tasks/get-scheduled-task"},{"title":"Update a scheduled task","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /tasks/scheduled/{id}","href":"/api-reference/scheduled-tasks/update-a-scheduled-task"},{"title":"Delete a scheduled task","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /tasks/scheduled/{id}","href":"/api-reference/scheduled-tasks/delete-a-scheduled-task"},{"title":"Trigger force run","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /tasks/scheduled/{id}/run","href":"/api-reference/scheduled-tasks/trigger-force-run"}]},{"group":"Tax Associations","pages":[{"title":"List tax associations","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /taxes/associations","href":"/api-reference/tax-associations/list-tax-associations"},{"title":"Create Tax Association","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /taxes/associations","href":"/api-reference/tax-associations/create-tax-association"},{"title":"Get Tax Association","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /taxes/associations/{id}","href":"/api-reference/tax-associations/get-tax-association"},{"title":"Update tax association","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /taxes/associations/{id}","href":"/api-reference/tax-associations/update-tax-association"},{"title":"Delete tax association","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /taxes/associations/{id}","href":"/api-reference/tax-associations/delete-tax-association"}]},{"group":"Tax Rates","pages":[{"title":"Get tax rates","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /taxes/rates","href":"/api-reference/tax-rates/get-tax-rates"},{"title":"Create a tax rate","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /taxes/rates","href":"/api-reference/tax-rates/create-a-tax-rate"},{"title":"Get a tax rate","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /taxes/rates/{id}","href":"/api-reference/tax-rates/get-a-tax-rate"},{"title":"Update a tax rate","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /taxes/rates/{id}","href":"/api-reference/tax-rates/update-a-tax-rate"},{"title":"Delete a tax rate","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /taxes/rates/{id}","href":"/api-reference/tax-rates/delete-a-tax-rate"}]},{"group":"Tenants","pages":[{"title":"Update a tenant","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /tenants/update","href":"/api-reference/tenants/update-a-tenant"},{"title":"Get tenant by ID","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /tenants/{id}","href":"/api-reference/tenants/get-tenant-by-id"}]},{"group":"Usage Records","pages":[{"title":"List usage records","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /usage-records/search","href":"/api-reference/usage-records/list-usage-records"}]},{"group":"Users","pages":[{"title":"Create user or service account","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /users","href":"/api-reference/users/create-user-or-service-account"},{"title":"Get current user","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io get /users/me","href":"/api-reference/users/get-current-user"},{"title":"Update current user","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /users/me","href":"/api-reference/users/update-current-user"},{"title":"Query users","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /users/search","href":"/api-reference/users/query-users"},{"title":"Update service account","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /users/{id}","href":"/api-reference/users/update-service-account"},{"title":"Delete service account","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io delete /users/{id}","href":"/api-reference/users/delete-service-account"},{"title":"Remove user from tenant","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /users/{id}/remove","href":"/api-reference/users/remove-user-from-tenant"},{"title":"Update user roles","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io put /users/{id}/roles","href":"/api-reference/users/update-user-roles"}]},{"group":"Webhook Events","pages":[{"title":"checkout.session.completed","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/checkout.session.completed","href":"/api-reference/webhook-events/checkoutsessioncompleted"},{"title":"checkout.session.expired","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/checkout.session.expired","href":"/api-reference/webhook-events/checkoutsessionexpired"},{"title":"checkout.session.failed","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/checkout.session.failed","href":"/api-reference/webhook-events/checkoutsessionfailed"},{"title":"checkout.session.initiated","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/checkout.session.initiated","href":"/api-reference/webhook-events/checkoutsessioninitiated"},{"title":"credit_note.created","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/credit_note.created","href":"/api-reference/webhook-events/credit_notecreated"},{"title":"credit_note.updated","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/credit_note.updated","href":"/api-reference/webhook-events/credit_noteupdated"},{"title":"customer.created","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/customer.created","href":"/api-reference/webhook-events/customercreated"},{"title":"customer.deleted","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/customer.deleted","href":"/api-reference/webhook-events/customerdeleted"},{"title":"customer.updated","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/customer.updated","href":"/api-reference/webhook-events/customerupdated"},{"title":"entitlement.created","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/entitlement.created","href":"/api-reference/webhook-events/entitlementcreated"},{"title":"entitlement.deleted","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/entitlement.deleted","href":"/api-reference/webhook-events/entitlementdeleted"},{"title":"entitlement.updated","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/entitlement.updated","href":"/api-reference/webhook-events/entitlementupdated"},{"title":"event.rejected","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/event.rejected","href":"/api-reference/webhook-events/eventrejected"},{"title":"feature.created","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/feature.created","href":"/api-reference/webhook-events/featurecreated"},{"title":"feature.deleted","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/feature.deleted","href":"/api-reference/webhook-events/featuredeleted"},{"title":"feature.updated","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/feature.updated","href":"/api-reference/webhook-events/featureupdated"},{"title":"feature.wallet_balance.alert","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/feature.wallet_balance.alert","href":"/api-reference/webhook-events/featurewallet_balancealert"},{"title":"invoice.communication.triggered","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/invoice.communication.triggered","href":"/api-reference/webhook-events/invoicecommunicationtriggered"},{"title":"invoice.create.drafted","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/invoice.create.drafted","href":"/api-reference/webhook-events/invoicecreatedrafted"},{"title":"invoice.payment.overdue","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/invoice.payment.overdue","href":"/api-reference/webhook-events/invoicepaymentoverdue"},{"title":"invoice.sync.failed","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/invoice.sync.failed","href":"/api-reference/webhook-events/invoicesyncfailed"},{"title":"invoice.sync.success","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/invoice.sync.success","href":"/api-reference/webhook-events/invoicesyncsuccess"},{"title":"invoice.update","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/invoice.update","href":"/api-reference/webhook-events/invoiceupdate"},{"title":"invoice.update.finalized","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/invoice.update.finalized","href":"/api-reference/webhook-events/invoiceupdatefinalized"},{"title":"invoice.update.payment","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/invoice.update.payment","href":"/api-reference/webhook-events/invoiceupdatepayment"},{"title":"invoice.update.voided","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/invoice.update.voided","href":"/api-reference/webhook-events/invoiceupdatevoided"},{"title":"payment.created","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/payment.created","href":"/api-reference/webhook-events/paymentcreated"},{"title":"payment.failed","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/payment.failed","href":"/api-reference/webhook-events/paymentfailed"},{"title":"payment.pending","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/payment.pending","href":"/api-reference/webhook-events/paymentpending"},{"title":"payment.success","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/payment.success","href":"/api-reference/webhook-events/paymentsuccess"},{"title":"payment.updated","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/payment.updated","href":"/api-reference/webhook-events/paymentupdated"},{"title":"refund.created","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/refund.created","href":"/api-reference/webhook-events/refundcreated"},{"title":"refund.failed","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/refund.failed","href":"/api-reference/webhook-events/refundfailed"},{"title":"refund.succeeded","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/refund.succeeded","href":"/api-reference/webhook-events/refundsucceeded"},{"title":"subscription.activated","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.activated","href":"/api-reference/webhook-events/subscriptionactivated"},{"title":"subscription.cancelled","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.cancelled","href":"/api-reference/webhook-events/subscriptioncancelled"},{"title":"subscription.created","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.created","href":"/api-reference/webhook-events/subscriptioncreated"},{"title":"subscription.draft.created","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.draft.created","href":"/api-reference/webhook-events/subscriptiondraftcreated"},{"title":"subscription.group_spend.threshold_reached","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.group_spend.threshold_reached","href":"/api-reference/webhook-events/subscriptiongroup_spendthreshold_reached"},{"title":"subscription.group_spend.threshold_recovered","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.group_spend.threshold_recovered","href":"/api-reference/webhook-events/subscriptiongroup_spendthreshold_recovered"},{"title":"subscription.line_item_spend.threshold_reached","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.line_item_spend.threshold_reached","href":"/api-reference/webhook-events/subscriptionline_item_spendthreshold_reached"},{"title":"subscription.line_item_spend.threshold_recovered","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.line_item_spend.threshold_recovered","href":"/api-reference/webhook-events/subscriptionline_item_spendthreshold_recovered"},{"title":"subscription.paused","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.paused","href":"/api-reference/webhook-events/subscriptionpaused"},{"title":"subscription.phase.created","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.phase.created","href":"/api-reference/webhook-events/subscriptionphasecreated"},{"title":"subscription.phase.deleted","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.phase.deleted","href":"/api-reference/webhook-events/subscriptionphasedeleted"},{"title":"subscription.phase.updated","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.phase.updated","href":"/api-reference/webhook-events/subscriptionphaseupdated"},{"title":"subscription.plan_changed","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.plan_changed","href":"/api-reference/webhook-events/subscriptionplan_changed"},{"title":"subscription.renewal.due","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.renewal.due","href":"/api-reference/webhook-events/subscriptionrenewaldue"},{"title":"subscription.resumed","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.resumed","href":"/api-reference/webhook-events/subscriptionresumed"},{"title":"subscription.spend.threshold_reached","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.spend.threshold_reached","href":"/api-reference/webhook-events/subscriptionspendthreshold_reached"},{"title":"subscription.spend.threshold_recovered","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.spend.threshold_recovered","href":"/api-reference/webhook-events/subscriptionspendthreshold_recovered"},{"title":"subscription.updated","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/subscription.updated","href":"/api-reference/webhook-events/subscriptionupdated"},{"title":"wallet.created","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/wallet.created","href":"/api-reference/webhook-events/walletcreated"},{"title":"wallet.credit_balance.dropped","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/wallet.credit_balance.dropped","href":"/api-reference/webhook-events/walletcredit_balancedropped"},{"title":"wallet.credit_balance.recovered","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/wallet.credit_balance.recovered","href":"/api-reference/webhook-events/walletcredit_balancerecovered"},{"title":"wallet.ongoing_balance.dropped","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/wallet.ongoing_balance.dropped","href":"/api-reference/webhook-events/walletongoing_balancedropped"},{"title":"wallet.ongoing_balance.recovered","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/wallet.ongoing_balance.recovered","href":"/api-reference/webhook-events/walletongoing_balancerecovered"},{"title":"wallet.ongoing_balance.updated","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/wallet.ongoing_balance.updated","href":"/api-reference/webhook-events/walletongoing_balanceupdated"},{"title":"wallet.terminated","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/wallet.terminated","href":"/api-reference/webhook-events/walletterminated"},{"title":"wallet.transaction.created","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/wallet.transaction.created","href":"/api-reference/webhook-events/wallettransactioncreated"},{"title":"wallet.transaction.updated","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/wallet.transaction.updated","href":"/api-reference/webhook-events/wallettransactionupdated"},{"title":"wallet.updated","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /webhook-events/wallet.updated","href":"/api-reference/webhook-events/walletupdated"}]},{"group":"Workflows","pages":[{"title":"Query workflows","deprecated":null,"version":null,"openapi":"https://swagger.flexprice.io post /workflows/search","href":"/api-reference/workflows/query-workflows"}]}]}]},{"tab":"Developers","pages":[{"title":"Developers","href":"/developers/overview"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/introduction"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/docs/changelog"}]}]},"title":"Update invoice payment status - Flexprice","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"]}