{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Provide a valid API key as `Authorization: Bearer <key>`.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}
{
"error": {
"type": "permission_error",
"code": "insufficient_scope",
"message": "This API key does not have the `invoices:write` scope.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}
{
"error": {
"type": "not_found",
"code": "charge_not_found",
"message": "There is no charge with that id.",
"param": "charges.0.charge",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}
{
"error": {
"type": "conflict",
"code": "one_time_account_not_set",
"message": "Choose the Xero account that one-time charges are recorded in first.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}
{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "`charges.0.price`: This charge's price cannot be overridden. Leave `price` out to bill its own.",
"param": "charges.0.price",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}
{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. Try again in 12 seconds.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}
{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "Something went wrong on our side. Retry the request; if it keeps failing, quote the request id.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}
Invoices
Create an invoice for one-time charges
Bills a customer once for one or more charges, with no subscription, under the same rules as the New Invoice form. It is never a subscription invoice, and it is not recurring revenue. It is recorded in the organisation’s one-time charge account in Xero. Idempotency-Key is required: a repeat of this request would otherwise be a second invoice and a second bill. A retry with the same key and body returns the first response. If Xero refuses the invoice it still exists here and the response is 201 with xero.sync_status of failed. Whether Xero emails it follows the organisation’s default invoice status and minimum invoice amount. 409 one_time_account_not_set until an owner or admin chooses that account.
{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Provide a valid API key as `Authorization: Bearer <key>`.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}
{
"error": {
"type": "permission_error",
"code": "insufficient_scope",
"message": "This API key does not have the `invoices:write` scope.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}
{
"error": {
"type": "not_found",
"code": "charge_not_found",
"message": "There is no charge with that id.",
"param": "charges.0.charge",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}
{
"error": {
"type": "conflict",
"code": "one_time_account_not_set",
"message": "Choose the Xero account that one-time charges are recorded in first.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}
{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "`charges.0.price`: This charge's price cannot be overridden. Leave `price` out to bill its own.",
"param": "charges.0.price",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}
{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. Try again in 12 seconds.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}
{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "Something went wrong on our side. Retry the request; if it keeps failing, quote the request id.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}
An API key. Its scopes decide what it may call: customers:read (List and look up customers.) customers:write (Create customers, and Xero contacts where the organisation allows it.) catalogue:read (List plans and charges.) subscriptions:read (List and look up subscriptions.) subscriptions:write (Create subscriptions, change units, end and restore them.) invoices:read (List and look up invoices.) invoices:write (Bill a customer once for charges, without a subscription.) credit_notes:read (List and look up credit notes, and where their credit was applied.) usage:write (Send usage events, which are billed to the subscription they name.)
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Saasybill Docs","colors":{"primary":"#ff914d","light":"#fff8f4","dark":"#ff914d"},"logo":{"light":"https://mintcdn.com/saasybill/xsgnTdRtPw8_B__m/logo/light.svg?fit=max\u0026auto=format\u0026n=xsgnTdRtPw8_B__m\u0026q=85\u0026s=7029563db1362830064f1aad876afc52","dark":"https://mintcdn.com/saasybill/rl_QuIunkOAFa3Us/logo/dark.svg?fit=max\u0026auto=format\u0026n=rl_QuIunkOAFa3Us\u0026q=85\u0026s=5a2c66d097f90cdba385879a0c377b70","href":"https://saasybill.com"},"favicon":"https://mintcdn.com/saasybill/FU0r_BJIKc4HwqVl/favicon.svg?fit=max\u0026auto=format\u0026n=FU0r_BJIKc4HwqVl\u0026q=85\u0026s=ccb5a6c0059e79f70f410fbd4ee2a6a2","appearance":{"default":"light","strict":true},"navbar":{"links":[{"href":"https://saasybill.com/contact","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.saasybill.com/sign-in"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Open app","icon":"arrow-up-right","color":{"light":"#ff914d","dark":"#ff914d"},"href":"https://app.saasybill.com"},{"anchor":"System status","icon":"wave-pulse","color":{"light":"#ff914d","dark":"#ff914d"},"href":"https://status.saasybill.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"saasybill","hasAudioNarration":false,"actualSubdomain":"saasybill","customDomains":["docs.saasybill.com"],"gitSource":{"type":"github","owner":"saasybill","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6acbc43b94a44ae4536b686b","collectionId":"6c104a13-886e-401c-b8b5-4f6bc4082685","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6acbc43b94a44ae4536b686b"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae154d7db128e9aedb22b56","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"default","tag":"API reference","count":40},{"language":"default","tag":"Guides","count":16},{"language":"default","tag":"Getting started","count":6},{"language":"default","tag":"Fundamentals","count":6},{"language":"default","tag":"Integration guides","count":6},{"language":"default","tag":"Subscriptions","count":6},{"language":"default","tag":"Product catalogue","count":5},{"language":"default","tag":"Webhooks","count":4},{"language":"default","tag":"Billing workspace","count":4},{"language":"default","tag":"Core concepts","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":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":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/invoices/create-an-invoice-for-one-time-charges","slug":"/api-reference/invoices/create-an-invoice-for-one-time-charges","pageMetadata":{"title":"Create an invoice for one-time charges","description":"Bills a customer once for one or more charges, with no subscription, under the same rules as the New Invoice form. It is never a subscription invoice, and it is not recurring revenue. It is recorded in the organisation's one-time charge account in Xero. **`Idempotency-Key` is required**: a repeat of this request would otherwise be a second invoice and a second bill. A retry with the same key and body returns the first response. If Xero refuses the invoice it still exists here and the response is 201 with `xero.sync_status` of `failed`. Whether Xero emails it follows the organisation's default invoice status and minimum invoice amount. **409 `one_time_account_not_set`** until an owner or admin chooses that account.","deprecated":null,"version":null,"sidebarTitle":"Create an invoice for one time charges","openapi":"/api-reference/openapi.json post /v1/invoices","href":"/api-reference/invoices/create-an-invoice-for-one-time-charges","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Bills a customer once for one or more charges, with no subscription, under the same rules as the New Invoice form. It is never a subscription invoice, and it is not recurring revenue. It is recorded in the organisation’s one-time charge account in Xero. \", _jsxs(_components.strong, {\n children: [_jsx(_components.code, {\n children: \"Idempotency-Key\"\n }), \" is required\"]\n }), \": a repeat of this request would otherwise be a second invoice and a second bill. A retry with the same key and body returns the first response. If Xero refuses the invoice it still exists here and the response is 201 with \", _jsx(_components.code, {\n children: \"xero.sync_status\"\n }), \" of \", _jsx(_components.code, {\n children: \"failed\"\n }), \". Whether Xero emails it follows the organisation’s default invoice status and minimum invoice amount. \", _jsxs(_components.strong, {\n children: [\"409 \", _jsx(_components.code, {\n children: \"one_time_account_not_set\"\n })]\n }), \" until an owner or admin chooses that account.\"]\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{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,..._provideComponents(),...props.components},{Info}=_components;if(!Info)_missingMdxReference(`Info`,true);return _jsxs(Info,{children:[`Requires the `,_jsx(_components.code,{children:`invoices:write`}),` scope and an `,_jsx(_components.code,{children:`Idempotency-Key`}),`. See `,_jsx(_components.a,{href:`/api-reference/authentication#scopes`,children:`Authentication`}),` and `,_jsx(_components.a,{href:`/api-reference/guides/one-time-charges`,children:`Bill a customer once`}),`.`]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create an invoice for one-time charges","description":"Bills a customer once for one or more charges, with no subscription, under the same rules as the New Invoice form. It is never a subscription invoice, and it is not recurring revenue. It is recorded in the organisation's one-time charge account in Xero. **`Idempotency-Key` is required**: a repeat of this request would otherwise be a second invoice and a second bill. A retry with the same key and body returns the first response. If Xero refuses the invoice it still exists here and the response is 201 with `xero.sync_status` of `failed`. Whether Xero emails it follows the organisation's default invoice status and minimum invoice amount. **409 `one_time_account_not_set`** until an owner or admin chooses that account.","deprecated":null,"version":null,"sidebarTitle":"Create an invoice for one time charges","openapi":"/api-reference/openapi.json post /v1/invoices","href":"/api-reference/invoices/create-an-invoice-for-one-time-charges","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/saasybill/a5b20427a348e2ec/pricing-explorer.js"],"openApiReferenceData":{"operation":{"tags":["Invoices"],"summary":"Create an invoice for one-time charges","description":"Bills a customer once for one or more charges, with no subscription, under the same rules as the New Invoice form. It is never a subscription invoice, and it is not recurring revenue. It is recorded in the organisation's one-time charge account in Xero. **`Idempotency-Key` is required**: a repeat of this request would otherwise be a second invoice and a second bill. A retry with the same key and body returns the first response. If Xero refuses the invoice it still exists here and the response is 201 with `xero.sync_status` of `failed`. Whether Xero emails it follows the organisation's default invoice status and minimum invoice amount. **409 `one_time_account_not_set`** until an owner or admin chooses that account.","operationId":"post_v1_invoices","security":["6d809cf0-2d5a-47af-a919-daf3ed63b68e"],"x-required-scope":"invoices:write","parameters":["4bde712c-cd5c-4a21-93c9-18462495756e"],"requestBody":"a0c49cb1-baf8-497b-9ae7-f99460ab4a77","responses":{"201":"56b5216f-19e8-40c6-b103-5b53790fe8a6","401":"ae082ccb-321e-48b9-b06c-dbd1eef2c314","403":"63932031-56d1-4cff-b089-176e51029f76","404":"c363c6ce-f120-429d-b5a1-d71bda87f415","409":"14d21129-e9a0-4128-9f89-708014fe29d5","422":"28a78b1a-5124-4575-8f60-14551a411c45","429":"f4b06e1c-825e-47e6-bf72-9c01baa480b6","500":"1013a985-7e48-496f-926b-3267ea5e9846"},"x-mint":{"href":"/api-reference/invoices/create-an-invoice-for-one-time-charges","content":"\u003cInfo>Requires the `invoices:write` scope and an `Idempotency-Key`. See [Authentication](/api-reference/authentication#scopes) and [Bill a customer once](/api-reference/guides/one-time-charges).\u003c/Info>"},"method":"post","type":"path","servers":["6c58a5dd-4d56-42a4-92dd-f5ec0acb794e"],"path":"/v1/invoices","baseUrlOptions":["https://api.saasybill.com"],"title":"Create an invoice for one-time charges","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"4bde712c-cd5c-4a21-93c9-18462495756e":{"name":"Idempotency-Key","in":"header","required":true,"description":"1 to 255 printable characters. A retry with the same key and body returns the first response.","schema":{"type":"string","minLength":1,"maxLength":255,"example":"bill_2026-10_acme","isRequired":true,"description":"1 to 255 printable characters. A retry with the same key and body returns the first response.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"charges":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"charge":{"type":"string","minLength":1,"maxLength":100,"description":"The charge id.","isRequired":true,"uniqueKey":"charges.items.[INDEX].charge","typeLabel":"string"},"price":{"oneOf":[{"type":"string","description":"Only where the charge allows its price to be overridden, and then required. The charge's own price is billed otherwise.","maxLength":20,"minLength":1,"uniqueKey":"charges.items.[INDEX].price.oneOf.0","typeLabel":"string"},{"type":"number","description":"Only where the charge allows its price to be overridden, and then required. The charge's own price is billed otherwise.","uniqueKey":"charges.items.[INDEX].price.oneOf.1","typeLabel":"number"}],"uniqueKey":"charges.items.[INDEX].price","typeLabel":"string | number"}},"required":["charge"],"additionalProperties":false,"uniqueKey":"charges.items.[INDEX]","typeLabel":"object"},"description":"What to bill, once. All in one currency, each charge at most once.","isRequired":true,"uniqueKey":"charges","typeLabel":"object[]"},"customer":{"description":"The Saasybill customer id. Give this or `customer_code`.","type":"string","minLength":1,"maxLength":100,"uniqueKey":"customer","typeLabel":"string"},"customer_code":{"type":"string","description":"The organisation's own reference for the customer. Unique per organisation.","uniqueKey":"customer_code","typeLabel":"string"},"reference":{"oneOf":[{"type":"string","maxLength":255,"uniqueKey":"reference.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"reference.oneOf.1","typeLabel":"null"}],"uniqueKey":"reference","typeLabel":"string | null"}},"required":["charges"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Bill a customer by code":{"title":"Bill a customer by code","value":{"customer_code":"ACME-001","charges":[{"charge":"5d0c7e2a-91b4-4f3e-8a6d-2c1b9e7f4a10"}],"reference":"PO-4471"}},"Override a price":{"title":"Override a price","value":{"customer":"3b9f1c1e-6a52-4c0e-9d7e-1f6f2f0b7a11","charges":[{"charge":"8e4a6b1c-2d73-4a95-b0f8-7c3d5e9a1b22","price":"450.00"}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"56b5216f-19e8-40c6-b103-5b53790fe8a6":{"description":"The invoice was created. If Xero refused it, `xero.sync_status` is `failed` and the invoice still exists.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","const":"invoice","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"customer":{"type":"string","isRequired":true,"uniqueKey":"customer","typeLabel":"string"},"subscription":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"subscription.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"subscription.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subscription","typeLabel":"string | null"},"number":{"oneOf":[{"description":"Xero's invoice number, once it is in Xero.","type":"string","isRequired":true,"uniqueKey":"number.oneOf.0","typeLabel":"string"},{"description":"Xero's invoice number, once it is in Xero.","type":"null","isRequired":true,"uniqueKey":"number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"number","typeLabel":"string | null"},"reference":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"reference.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"reference","typeLabel":"string | null"},"status":{"type":"string","enum":["draft","awaiting_approval","approved","paid","voided","deleted","not_in_external"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"currency":{"type":"string","isRequired":true,"uniqueKey":"currency","typeLabel":"string"},"invoice_date":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC.","isRequired":true,"uniqueKey":"invoice_date","typeLabel":"string\u003cdate-time>"},"due_date":{"oneOf":[{"type":"string","description":"ISO 8601, UTC.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","isRequired":true,"uniqueKey":"due_date.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","isRequired":true,"uniqueKey":"due_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"due_date","typeLabel":"string\u003cdate-time> | null"},"subtotal":{"type":"string","description":"Excluding tax.","isRequired":true,"uniqueKey":"subtotal","typeLabel":"string"},"total":{"type":"string","description":"Including tax, as Xero returns it.","isRequired":true,"uniqueKey":"total","typeLabel":"string"},"credit_note_amount":{"type":"string","description":"A decimal string, e.g. \"19.9900\".","isRequired":true,"uniqueKey":"credit_note_amount","typeLabel":"string"},"amount_paid":{"oneOf":[{"type":"string","description":"A decimal string, e.g. \"19.9900\".","isRequired":true,"uniqueKey":"amount_paid.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"amount_paid.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amount_paid","typeLabel":"string | null"},"sent":{"type":"boolean","isRequired":true,"uniqueKey":"sent","typeLabel":"boolean"},"xero":{"type":"object","properties":{"sync_status":{"type":"string","enum":["synced","failed","pending"],"description":"`failed` means the invoice exists here and Xero refused it; the subscription that raised it was still created.","isRequired":true,"uniqueKey":"xero.sync_status","typeLabel":"enum\u003cstring>"},"invoice_id":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"xero.invoice_id.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"xero.invoice_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"xero.invoice_id","typeLabel":"string | null"},"sync_error":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"xero.sync_error.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"xero.sync_error.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"xero.sync_error","typeLabel":"string | null"}},"required":["sync_status","invoice_id","sync_error"],"additionalProperties":false,"isRequired":true,"uniqueKey":"xero","typeLabel":"object"},"created":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"ISO 8601, UTC.","isRequired":true,"uniqueKey":"created","typeLabel":"string\u003cdate-time>"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].id","typeLabel":"string"},"type":{"oneOf":[{"type":"string","description":"What the line bills for. `usage` is metered usage, one line per meter per billing period.","enum":["subscription","addon","charge","usage"],"isRequired":true,"uniqueKey":"lines.items.[INDEX].type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"What the line bills for. `usage` is metered usage, one line per meter per billing period.","isRequired":true,"uniqueKey":"lines.items.[INDEX].type.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].type","typeLabel":"enum\u003cstring> | null"},"revenue_type":{"oneOf":[{"type":"string","description":"The revenue bucket the line falls in. Metered usage is `usage`, never `renewal`. A charge on an invoice with no subscription is `one_time`. Null where it was not recorded.","enum":["new_subscription","expansion","renewal","usage","one_time"],"isRequired":true,"uniqueKey":"lines.items.[INDEX].revenue_type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"The revenue bucket the line falls in. Metered usage is `usage`, never `renewal`. A charge on an invoice with no subscription is `one_time`. Null where it was not recorded.","isRequired":true,"uniqueKey":"lines.items.[INDEX].revenue_type.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].revenue_type","typeLabel":"enum\u003cstring> | null"},"meter":{"oneOf":[{"description":"The Saasybill meter id a `usage` line bills. Null on every other line.","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].meter.oneOf.0","typeLabel":"string"},{"description":"The Saasybill meter id a `usage` line bills. Null on every other line.","type":"null","isRequired":true,"uniqueKey":"lines.items.[INDEX].meter.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].meter","typeLabel":"string | null"},"usage_quantity":{"oneOf":[{"description":"The quantity a `usage` line was priced for, as a decimal string, after the meter's minimum. `units` is this rounded up. Null on every other line.","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].usage_quantity.oneOf.0","typeLabel":"string"},{"description":"The quantity a `usage` line was priced for, as a decimal string, after the meter's minimum. `units` is this rounded up. Null on every other line.","type":"null","isRequired":true,"uniqueKey":"lines.items.[INDEX].usage_quantity.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].usage_quantity","typeLabel":"string | null"},"name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lines.items.[INDEX].name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].name","typeLabel":"string | null"},"description":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lines.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].description","typeLabel":"string | null"},"units":{"oneOf":[{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991,"isRequired":true,"uniqueKey":"lines.items.[INDEX].units.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"lines.items.[INDEX].units.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].units","typeLabel":"integer | null"},"amount":{"type":"string","description":"A decimal string, e.g. \"19.9900\".","isRequired":true,"uniqueKey":"lines.items.[INDEX].amount","typeLabel":"string"},"discount_amount":{"type":"string","description":"A decimal string, e.g. \"19.9900\".","isRequired":true,"uniqueKey":"lines.items.[INDEX].discount_amount","typeLabel":"string"},"charge_amount":{"type":"string","description":"What is billed: `amount` less `discount_amount`.","isRequired":true,"uniqueKey":"lines.items.[INDEX].charge_amount","typeLabel":"string"},"effective_date":{"oneOf":[{"type":"string","description":"ISO 8601, UTC.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","isRequired":true,"uniqueKey":"lines.items.[INDEX].effective_date.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","isRequired":true,"uniqueKey":"lines.items.[INDEX].effective_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].effective_date","typeLabel":"string\u003cdate-time> | null"}},"required":["id","type","revenue_type","meter","usage_quantity","name","description","units","amount","discount_amount","charge_amount","effective_date"],"additionalProperties":false,"uniqueKey":"lines.items.[INDEX]","typeLabel":"object"},"uniqueKey":"lines","typeLabel":"object[]"}},"required":["id","object","customer","subscription","number","reference","status","currency","invoice_date","due_date","subtotal","total","credit_note_amount","amount_paid","sent","xero","created"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"example":{"id":"c2d4e6f8-1a3b-4c5d-8e7f-9a0b1c2d3e44","object":"invoice","customer":"3b9f1c1e-6a52-4c0e-9d7e-1f6f2f0b7a11","subscription":null,"number":"INV-0057","reference":"PO-4471","status":"awaiting_approval","currency":"AUD","invoice_date":"2026-09-29T14:00:00.000Z","due_date":"2026-10-29T13:00:00.000Z","subtotal":"450.0000","total":"495.0000","credit_note_amount":"0.0000","amount_paid":null,"sent":false,"xero":{"sync_status":"synced","invoice_id":"f0e9d8c7-b6a5-4f43-9210-fedcba987654","sync_error":null},"lines":[{"id":"3d4e5f6a-7b8c-4d9e-a0f1-2b3c4d5e6f99","type":"charge","revenue_type":"one_time","meter":null,"usage_quantity":null,"name":"Onboarding","description":"One-time charge","units":null,"amount":"450.0000","discount_amount":"0.0000","charge_amount":"450.0000","effective_date":"2026-09-29T14:00:00.000Z"}],"created":"2026-09-30T04:12:01.000Z"},"examples":{"Example":{"title":"Example","value":{"id":"c2d4e6f8-1a3b-4c5d-8e7f-9a0b1c2d3e44","object":"invoice","customer":"3b9f1c1e-6a52-4c0e-9d7e-1f6f2f0b7a11","subscription":null,"number":"INV-0057","reference":"PO-4471","status":"awaiting_approval","currency":"AUD","invoice_date":"2026-09-29T14:00:00.000Z","due_date":"2026-10-29T13:00:00.000Z","subtotal":"450.0000","total":"495.0000","credit_note_amount":"0.0000","amount_paid":null,"sent":false,"xero":{"sync_status":"synced","invoice_id":"f0e9d8c7-b6a5-4f43-9210-fedcba987654","sync_error":null},"lines":[{"id":"3d4e5f6a-7b8c-4d9e-a0f1-2b3c4d5e6f99","type":"charge","revenue_type":"one_time","meter":null,"usage_quantity":null,"name":"Onboarding","description":"One-time charge","units":null,"amount":"450.0000","discount_amount":"0.0000","charge_amount":"450.0000","effective_date":"2026-09-29T14:00:00.000Z"}],"created":"2026-09-30T04:12:01.000Z"}}},"exampleType":"examples"}},"headers":{"Request-Id":{"description":"A unique id for the request. Quote it when you contact support.","schema":{"type":"string","example":"req_4f1a9c2e7b8d3a605e1c9f02"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer","example":120}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer","example":117}},"RateLimit-Reset":{"description":"Seconds until the oldest counted request stops counting.","schema":{"type":"integer","example":41}}},"exampleType":"examples"},"ae082ccb-321e-48b9-b06c-dbd1eef2c314":{"description":"The key is missing, malformed, revoked or expired.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found","conflict","rate_limit_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Stable. Branch on this, never on `message`.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"required":["type","code","message","request_id"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"description":"Every failed request answers with this shape. Branch on `error.code`, never on `error.message`.","uniqueKey":"","typeLabel":"object"},"example":{"error":{"type":"authentication_error","code":"invalid_api_key","message":"Provide a valid API key as `Authorization: Bearer \u003ckey>`.","request_id":"req_4f1a9c2e7b8d3a605e1c9f02"}},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","code":"invalid_api_key","message":"Provide a valid API key as `Authorization: Bearer \u003ckey>`.","request_id":"req_4f1a9c2e7b8d3a605e1c9f02"}}}},"exampleType":"examples"}},"headers":{"Request-Id":{"description":"A unique id for the request. Quote it when you contact support.","schema":{"type":"string","example":"req_4f1a9c2e7b8d3a605e1c9f02"}}},"exampleType":"examples"},"63932031-56d1-4cff-b089-176e51029f76":{"description":"The key lacks the scope, is a test key, or the organisation has not allowed this.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found","conflict","rate_limit_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Stable. Branch on this, never on `message`.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"required":["type","code","message","request_id"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"description":"Every failed request answers with this shape. Branch on `error.code`, never on `error.message`.","uniqueKey":"","typeLabel":"object"},"example":{"error":{"type":"permission_error","code":"insufficient_scope","message":"This API key does not have the `invoices:write` scope.","request_id":"req_4f1a9c2e7b8d3a605e1c9f02"}},"examples":{"Example":{"title":"Example","value":{"error":{"type":"permission_error","code":"insufficient_scope","message":"This API key does not have the `invoices:write` scope.","request_id":"req_4f1a9c2e7b8d3a605e1c9f02"}}}},"exampleType":"examples"}},"headers":{"Request-Id":{"description":"A unique id for the request. Quote it when you contact support.","schema":{"type":"string","example":"req_4f1a9c2e7b8d3a605e1c9f02"}}},"exampleType":"examples"},"c363c6ce-f120-429d-b5a1-d71bda87f415":{"description":"No such object.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found","conflict","rate_limit_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Stable. Branch on this, never on `message`.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"required":["type","code","message","request_id"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"description":"Every failed request answers with this shape. Branch on `error.code`, never on `error.message`.","uniqueKey":"","typeLabel":"object"},"example":{"error":{"type":"not_found","code":"charge_not_found","message":"There is no charge with that id.","param":"charges.0.charge","request_id":"req_4f1a9c2e7b8d3a605e1c9f02"}},"examples":{"Example":{"title":"Example","value":{"error":{"type":"not_found","code":"charge_not_found","message":"There is no charge with that id.","param":"charges.0.charge","request_id":"req_4f1a9c2e7b8d3a605e1c9f02"}}}},"exampleType":"examples"}},"headers":{"Request-Id":{"description":"A unique id for the request. Quote it when you contact support.","schema":{"type":"string","example":"req_4f1a9c2e7b8d3a605e1c9f02"}}},"exampleType":"examples"},"14d21129-e9a0-4128-9f89-708014fe29d5":{"description":"The organisation is not ready to invoice (`setup_mode`, `xero_not_connected`, `one_time_account_not_set`), or the request conflicts with an earlier one using the same `Idempotency-Key`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found","conflict","rate_limit_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Stable. Branch on this, never on `message`.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"required":["type","code","message","request_id"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"description":"Every failed request answers with this shape. Branch on `error.code`, never on `error.message`.","uniqueKey":"","typeLabel":"object"},"example":{"error":{"type":"conflict","code":"one_time_account_not_set","message":"Choose the Xero account that one-time charges are recorded in first.","request_id":"req_4f1a9c2e7b8d3a605e1c9f02"}},"examples":{"Example":{"title":"Example","value":{"error":{"type":"conflict","code":"one_time_account_not_set","message":"Choose the Xero account that one-time charges are recorded in first.","request_id":"req_4f1a9c2e7b8d3a605e1c9f02"}}}},"exampleType":"examples"}},"headers":{"Request-Id":{"description":"A unique id for the request. Quote it when you contact support.","schema":{"type":"string","example":"req_4f1a9c2e7b8d3a605e1c9f02"}}},"exampleType":"examples"},"28a78b1a-5124-4575-8f60-14551a411c45":{"description":"A field is missing or invalid. `error.param` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found","conflict","rate_limit_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Stable. Branch on this, never on `message`.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"required":["type","code","message","request_id"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"description":"Every failed request answers with this shape. Branch on `error.code`, never on `error.message`.","uniqueKey":"","typeLabel":"object"},"example":{"error":{"type":"invalid_request_error","code":"invalid_parameter","message":"`charges.0.price`: This charge's price cannot be overridden. Leave `price` out to bill its own.","param":"charges.0.price","request_id":"req_4f1a9c2e7b8d3a605e1c9f02"}},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request_error","code":"invalid_parameter","message":"`charges.0.price`: This charge's price cannot be overridden. Leave `price` out to bill its own.","param":"charges.0.price","request_id":"req_4f1a9c2e7b8d3a605e1c9f02"}}}},"exampleType":"examples"}},"headers":{"Request-Id":{"description":"A unique id for the request. Quote it when you contact support.","schema":{"type":"string","example":"req_4f1a9c2e7b8d3a605e1c9f02"}}},"exampleType":"examples"},"f4b06e1c-825e-47e6-bf72-9c01baa480b6":{"description":"Rate limited: 120 requests a minute per key. See `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found","conflict","rate_limit_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Stable. Branch on this, never on `message`.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"required":["type","code","message","request_id"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"description":"Every failed request answers with this shape. Branch on `error.code`, never on `error.message`.","uniqueKey":"","typeLabel":"object"},"example":{"error":{"type":"rate_limit_error","code":"rate_limited","message":"Too many requests. Try again in 12 seconds.","request_id":"req_4f1a9c2e7b8d3a605e1c9f02"}},"examples":{"Example":{"title":"Example","value":{"error":{"type":"rate_limit_error","code":"rate_limited","message":"Too many requests. Try again in 12 seconds.","request_id":"req_4f1a9c2e7b8d3a605e1c9f02"}}}},"exampleType":"examples"}},"headers":{"Request-Id":{"description":"A unique id for the request. Quote it when you contact support.","schema":{"type":"string","example":"req_4f1a9c2e7b8d3a605e1c9f02"}}},"exampleType":"examples"},"1013a985-7e48-496f-926b-3267ea5e9846":{"description":"Something went wrong on our side. Retry; quote `error.request_id` if it persists.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found","conflict","rate_limit_error","api_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Stable. Branch on this, never on `message`.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"required":["type","code","message","request_id"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"description":"Every failed request answers with this shape. Branch on `error.code`, never on `error.message`.","uniqueKey":"","typeLabel":"object"},"example":{"error":{"type":"api_error","code":"internal_error","message":"Something went wrong on our side. Retry the request; if it keeps failing, quote the request id.","request_id":"req_4f1a9c2e7b8d3a605e1c9f02"}},"examples":{"Example":{"title":"Example","value":{"error":{"type":"api_error","code":"internal_error","message":"Something went wrong on our side. Retry the request; if it keeps failing, quote the request id.","request_id":"req_4f1a9c2e7b8d3a605e1c9f02"}}}},"exampleType":"examples"}},"headers":{"Request-Id":{"description":"A unique id for the request. Quote it when you contact support.","schema":{"type":"string","example":"req_4f1a9c2e7b8d3a605e1c9f02"}}},"exampleType":"examples"}},"security":{"6d809cf0-2d5a-47af-a919-daf3ed63b68e":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API key. Its scopes decide what it may call: `customers:read` (List and look up customers.) `customers:write` (Create customers, and Xero contacts where the organisation allows it.) `catalogue:read` (List plans and charges.) `subscriptions:read` (List and look up subscriptions.) `subscriptions:write` (Create subscriptions, change units, end and restore them.) `invoices:read` (List and look up invoices.) `invoices:write` (Bill a customer once for charges, without a subscription.) `credit_notes:read` (List and look up credit notes, and where their credit was applied.) `usage:write` (Send usage events, which are billed to the subscription they name.)","scopes":["invoices:write"],"schemeName":"bearerAuth"}}},"servers":{"6c58a5dd-4d56-42a4-92dd-f5ec0acb794e":{"url":"https://api.saasybill.com","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"An API key. Its scopes decide what it may call: `customers:read` (List and look up customers.) `customers:write` (Create customers, and Xero contacts where the organisation allows it.) `catalogue:read` (List plans and charges.) `subscriptions:read` (List and look up subscriptions.) `subscriptions:write` (Create subscriptions, change units, end and restore them.) `invoices:read` (List and look up invoices.) `invoices:write` (Bill a customer once for charges, without a subscription.) `credit_notes:read` (List and look up credit notes, and where their credit was applied.) `usage:write` (Send usage events, which are billed to the subscription they name.)","scopes":["invoices:write"],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"An API key. Its scopes decide what it may call: `customers:read` (List and look up customers.) `customers:write` (Create customers, and Xero contacts where the organisation allows it.) `catalogue:read` (List plans and charges.) `subscriptions:read` (List and look up subscriptions.) `subscriptions:write` (Create subscriptions, change units, end and restore them.) `invoices:read` (List and look up invoices.) `invoices:write` (Bill a customer once for charges, without a subscription.) `credit_notes:read` (List and look up credit notes, and where their credit was applied.) `usage:write` (Send usage events, which are billed to the subscription they name.)","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"saasybill","siteName":"Saasybill Docs","title":"Create an invoice for one-time charges - Saasybill Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-28T01:50:20.454Z","originalFileLocation":"api-reference/invoices/create-an-invoice-for-one-time-charges.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";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=\"light\"}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=\"Bills a customer once for one or more charges, with no subscription, under the same rules as the New Invoice form. It is never a subscription invoice, and it is not recurring revenue. It is recorded in the organisation\u0026#x27;s one-time charge account in Xero. Idempotency-Key is required: a repeat of this request would otherwise be a second invoice and a second bill. A retry with the same key and body returns the first response. If Xero refuses the invoice it still exists here and the response is 201 with xero.sync_status of failed. Whether Xero emails it follows the organisation\u0026#x27;s default invoice status and minimum invoice amount. 409 one_time_account_not_set until an owner or admin chooses that account.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Saasybill Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/saasybill/HPMW-Yvq8QmVPv-x/_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/saasybill/HPMW-Yvq8QmVPv-x/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/saasybill/HPMW-Yvq8QmVPv-x/_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/saasybill/HPMW-Yvq8QmVPv-x/_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/saasybill/HPMW-Yvq8QmVPv-x/_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/saasybill/HPMW-Yvq8QmVPv-x/_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/saasybill/HPMW-Yvq8QmVPv-x/_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/saasybill/HPMW-Yvq8QmVPv-x/_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/saasybill/HPMW-Yvq8QmVPv-x/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create an invoice for one-time charges - Saasybill Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Bills a customer once for one or more charges, with no subscription, under the same rules as the New Invoice form. It is never a subscription invoice, and it is not recurring revenue. It is recorded in the organisation\u0026#x27;s one-time charge account in Xero. Idempotency-Key is required: a repeat of this request would otherwise be a second invoice and a second bill. A retry with the same key and body returns the first response. If Xero refuses the invoice it still exists here and the response is 201 with xero.sync_status of failed. Whether Xero emails it follows the organisation\u0026#x27;s default invoice status and minimum invoice amount. 409 one_time_account_not_set until an owner or admin chooses that account.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Saasybill Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.saasybill.com/api-reference/invoices/create-an-invoice-for-one-time-charges\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://saasybill.mintlify.app/_mintlify/api/og/v2?division=Invoices\u0026amp;title=Create+an+invoice+for+one-time+charges\u0026amp;description=Bills+a+customer+once+for+one+or+more+charges%2C+with+no+subscription%2C+under+the+same+rules+as+the+New+Invoice+form.+It+is+never+a+subscription+invoice%2C+and+it+is\u0026amp;theme=8f55e2940deb974998b68fd8\u0026amp;signature=8285a74079fab47c96250e71f330f4613edc34fcb896225f734cd677b9596014\">\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=\"Create an invoice for one-time charges - Saasybill Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Bills a customer once for one or more charges, with no subscription, under the same rules as the New Invoice form. It is never a subscription invoice, and it is not recurring revenue. It is recorded in the organisation\u0026#x27;s one-time charge account in Xero. Idempotency-Key is required: a repeat of this request would otherwise be a second invoice and a second bill. A retry with the same key and body returns the first response. If Xero refuses the invoice it still exists here and the response is 201 with xero.sync_status of failed. Whether Xero emails it follows the organisation\u0026#x27;s default invoice status and minimum invoice amount. 409 one_time_account_not_set until an owner or admin chooses that account.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://saasybill.mintlify.app/_mintlify/api/og/v2?division=Invoices\u0026amp;title=Create+an+invoice+for+one-time+charges\u0026amp;description=Bills+a+customer+once+for+one+or+more+charges%2C+with+no+subscription%2C+under+the+same+rules+as+the+New+Invoice+form.+It+is+never+a+subscription+invoice%2C+and+it+is\u0026amp;theme=8f55e2940deb974998b68fd8\u0026amp;signature=8285a74079fab47c96250e71f330f4613edc34fcb896225f734cd677b9596014\">\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/saasybill/HPMW-Yvq8QmVPv-x/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Saasybill Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ff914d\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.saasybill.com/api-reference/invoices/create-an-invoice-for-one-time-charges\">\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/create-an-invoice-for-one-time-charges.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.saasybill.com/#organization\",\"name\":\"Saasybill Docs\",\"url\":\"https://docs.saasybill.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/saasybill/xsgnTdRtPw8_B__m/logo/light.svg?fit=max\u0026auto=format\u0026n=xsgnTdRtPw8_B__m\u0026q=85\u0026s=7029563db1362830064f1aad876afc52\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.saasybill.com#website\",\"name\":\"Saasybill Docs\",\"url\":\"https://docs.saasybill.com\",\"publisher\":{\"@id\":\"https://docs.saasybill.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.saasybill.com/api-reference/invoices/create-an-invoice-for-one-time-charges#webpage\",\"url\":\"https://docs.saasybill.com/api-reference/invoices/create-an-invoice-for-one-time-charges\",\"name\":\"Create an invoice for one-time charges\",\"description\":\"Bills a customer once for one or more charges, with no subscription, under the same rules as the New Invoice form. It is never a subscription invoice, and it is not recurring revenue. It is recorded in the organisation's one-time charge account in Xero. Idempotency-Key is required: a repeat of this request would otherwise be a second invoice and a second bill. A retry with the same key and body returns the first response. If Xero refuses the invoice it still exists here and the response is 201 with xero.sync_status of failed. Whether Xero emails it follows the organisation's default invoice status and minimum invoice amount. 409 one_time_account_not_set until an owner or admin chooses that account.\",\"dateModified\":\"2026-10-28T01:50:20.454Z\",\"isPartOf\":{\"@id\":\"https://docs.saasybill.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.saasybill.com/api-reference/invoices/create-an-invoice-for-one-time-charges#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.saasybill.com/api-reference/invoices/create-an-invoice-for-one-time-charges#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Invoices\",\"item\":\"https://docs.saasybill.com/api-reference/invoices/list-invoices\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create an invoice for one-time charges\",\"item\":\"https://docs.saasybill.com/api-reference/invoices/create-an-invoice-for-one-time-charges\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.saasybill.com/api-reference/invoices/create-an-invoice-for-one-time-charges#apireference\",\"headline\":\"Create an invoice for one-time charges\",\"name\":\"Create an invoice for one-time charges\",\"description\":\"Bills a customer once for one or more charges, with no subscription, under the same rules as the New Invoice form. It is never a subscription invoice, and it is not recurring revenue. It is recorded in the organisation's one-time charge account in Xero. Idempotency-Key is required: a repeat of this request would otherwise be a second invoice and a second bill. A retry with the same key and body returns the first response. If Xero refuses the invoice it still exists here and the response is 201 with xero.sync_status of failed. Whether Xero emails it follows the organisation's default invoice status and minimum invoice amount. 409 one_time_account_not_set until an owner or admin chooses that account.\",\"url\":\"https://docs.saasybill.com/api-reference/invoices/create-an-invoice-for-one-time-charges\",\"mainEntityOfPage\":{\"@id\":\"https://docs.saasybill.com/api-reference/invoices/create-an-invoice-for-one-time-charges#webpage\"},\"dateModified\":\"2026-10-28T01:50:20.454Z\",\"publisher\":{\"@id\":\"https://docs.saasybill.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.saasybill.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Saasybill Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Saasybill Docs","nav":{"global":{"anchors":[{"anchor":"Open app","icon":"arrow-up-right","color":{"light":"#ff914d","dark":"#ff914d"},"href":"https://app.saasybill.com"},{"anchor":"System status","icon":"wave-pulse","color":{"light":"#ff914d","dark":"#ff914d"},"href":"https://status.saasybill.com"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API reference","groups":[{"group":"Getting started","pages":[{"title":"Introduction","icon":"code","href":"/api-reference/introduction"},{"title":"Quickstart","icon":"rocket","href":"/api-reference/quickstart"},{"title":"Authentication","icon":"key","href":"/api-reference/authentication"},{"title":"Testing","icon":"flask-vial","href":"/api-reference/testing"}]},{"group":"Fundamentals","pages":[{"title":"Requests and responses","icon":"arrows-left-right","href":"/api-reference/requests-and-responses"},{"title":"Pagination","icon":"list","href":"/api-reference/pagination"},{"title":"Errors","icon":"triangle-exclamation","href":"/api-reference/errors"},{"title":"Idempotency","icon":"rotate","href":"/api-reference/idempotency"},{"title":"Rate limits","icon":"gauge","href":"/api-reference/rate-limits"},{"title":"Objects","icon":"cubes","href":"/api-reference/objects"}]},{"group":"Integration guides","pages":[{"title":"Create a subscription","icon":"plus","href":"/api-reference/guides/create-a-subscription"},{"title":"Customers and Xero","icon":"user-group","href":"/api-reference/guides/customers-and-xero"},{"title":"Change units","icon":"sliders","href":"/api-reference/guides/change-units"},{"title":"Usage-based billing","icon":"gauge-high","href":"/api-reference/guides/usage-based-billing"},{"title":"Bill a customer once","icon":"file-invoice-dollar","href":"/api-reference/guides/one-time-charges"},{"title":"End and restore a subscription","icon":"circle-stop","href":"/api-reference/guides/end-and-restore"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","icon":"bell","href":"/api-reference/webhooks/overview"},{"title":"Webhook events","icon":"bolt","href":"/api-reference/webhooks/events"},{"title":"Verify signatures","icon":"shield-halved","href":"/api-reference/webhooks/verify-signatures"},{"title":"Delivery and retries","icon":"rotate","href":"/api-reference/webhooks/delivery-and-retries"}]},{"group":"Organisation","pages":[{"title":"Retrieve the organisation","deprecated":null,"version":null,"sidebarTitle":"Retrieve the organisation","openapi":"/api-reference/openapi.json get /v1/organisation","href":"/api-reference/organisation/retrieve-the-organisation"}]},{"group":"Customers","pages":[{"title":"List customers","deprecated":null,"version":null,"sidebarTitle":"List customers","openapi":"/api-reference/openapi.json get /v1/customers","href":"/api-reference/customers/list-customers"},{"title":"Create a customer","deprecated":null,"version":null,"sidebarTitle":"Create a customer","openapi":"/api-reference/openapi.json post /v1/customers","href":"/api-reference/customers/create-a-customer"},{"title":"Retrieve a customer","deprecated":null,"version":null,"sidebarTitle":"Retrieve a customer","openapi":"/api-reference/openapi.json get /v1/customers/{id}","href":"/api-reference/customers/retrieve-a-customer"}]},{"group":"Plans","pages":[{"title":"List plans","deprecated":null,"version":null,"sidebarTitle":"List plans","openapi":"/api-reference/openapi.json get /v1/plans","href":"/api-reference/plans/list-plans"},{"title":"Retrieve a plan","deprecated":null,"version":null,"sidebarTitle":"Retrieve a plan","openapi":"/api-reference/openapi.json get /v1/plans/{id}","href":"/api-reference/plans/retrieve-a-plan"}]},{"group":"Charges","pages":[{"title":"List charges","deprecated":null,"version":null,"sidebarTitle":"List charges","openapi":"/api-reference/openapi.json get /v1/charges","href":"/api-reference/charges/list-charges"},{"title":"Retrieve a charge","deprecated":null,"version":null,"sidebarTitle":"Retrieve a charge","openapi":"/api-reference/openapi.json get /v1/charges/{id}","href":"/api-reference/charges/retrieve-a-charge"}]},{"group":"Subscriptions","pages":[{"title":"List subscriptions","deprecated":null,"version":null,"sidebarTitle":"List subscriptions","openapi":"/api-reference/openapi.json get /v1/subscriptions","href":"/api-reference/subscriptions/list-subscriptions"},{"title":"Create a subscription","deprecated":null,"version":null,"sidebarTitle":"Create a subscription","openapi":"/api-reference/openapi.json post /v1/subscriptions","href":"/api-reference/subscriptions/create-a-subscription"},{"title":"Retrieve a subscription","deprecated":null,"version":null,"sidebarTitle":"Retrieve a subscription","openapi":"/api-reference/openapi.json get /v1/subscriptions/{id}","href":"/api-reference/subscriptions/retrieve-a-subscription"},{"title":"Change a subscription's units","deprecated":null,"version":null,"sidebarTitle":"Change a subscriptions units","openapi":"/api-reference/openapi.json post /v1/subscriptions/{id}/units","href":"/api-reference/subscriptions/change-a-subscriptions-units"},{"title":"End a subscription","deprecated":null,"version":null,"sidebarTitle":"End a subscription","openapi":"/api-reference/openapi.json post /v1/subscriptions/{id}/end","href":"/api-reference/subscriptions/end-a-subscription"},{"title":"Restore a subscription","deprecated":null,"version":null,"sidebarTitle":"Restore a subscription","openapi":"/api-reference/openapi.json post /v1/subscriptions/{id}/restore","href":"/api-reference/subscriptions/restore-a-subscription"}]},{"group":"Invoices","pages":[{"title":"List invoices","deprecated":null,"version":null,"sidebarTitle":"List invoices","openapi":"/api-reference/openapi.json get /v1/invoices","href":"/api-reference/invoices/list-invoices"},{"title":"Retrieve an invoice","description":null,"deprecated":null,"version":null,"sidebarTitle":"Retrieve an invoice","openapi":"/api-reference/openapi.json get /v1/invoices/{id}","href":"/api-reference/invoices/retrieve-an-invoice"},{"title":"Create an invoice for one-time charges","deprecated":null,"version":null,"sidebarTitle":"Create an invoice for one time charges","openapi":"/api-reference/openapi.json post /v1/invoices","href":"/api-reference/invoices/create-an-invoice-for-one-time-charges"}]},{"group":"Credit notes","pages":[{"title":"List credit notes","description":"Read-only, with the same filters as invoices. Each shows where its credit has been applied.","deprecated":null,"version":null,"sidebarTitle":"List credit notes","openapi":"/api-reference/openapi.json get /v1/credit_notes","href":"/api-reference/credit-notes/list-credit-notes"},{"title":"Retrieve a credit note","deprecated":null,"version":null,"sidebarTitle":"Retrieve a credit note","openapi":"/api-reference/openapi.json get /v1/credit_notes/{id}","href":"/api-reference/credit-notes/retrieve-a-credit-note"}]},{"group":"Usage","pages":[{"title":"Report usage","deprecated":null,"version":null,"sidebarTitle":"Report usage","openapi":"/api-reference/openapi.json post /v1/usage_events","href":"/api-reference/usage/report-usage"}]}]}]},"title":"Create an invoice for one-time charges - Saasybill Docs","buildId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","deploymentId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-WRhTSUDL.js","utils-ChMov4Kr.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-_REmC2bI.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Bp6nVRCu.js","snippetPresets-DZadmXoU.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CY2WdoTl.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-DwYG-Q4l.js","shallow-BXQIGwv4.js","getApiPlaygroundDisplay-CK5nK5B9.js","CodeSnippet-TH4a2aGW.js","CodeSnippets-DwsQiOFS.js","Page-R3M_BF4L.js","getPastedJson-DD7kUzi_.js","icon-holE3QoJ.js","MethodPill-DUW0T8us.js","DuplicateIcon-CI_p4be-.js","createIcon-BdbRvavb.js","DynamicMarkdown-DN96a4Ur.js","SectionHeading-SCu36A9d.js","axios-vUo_bRtp.js","Markdown-CCeGv-zI.js","clsx-BGBGWFTt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-Cv_O2fky.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-2C5OB2eV.js"]}