Patch a draft or awaiting_approval invoice. Only the provided fields change; passing lineItems replaces all items and recomputes amount from the new subtotals.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Caratuva","description":"Cross-border B2B payments for Brazilian commodity exporters. Collect from foreign buyers, settle in BRL.","colors":{"primary":"#0F766E","light":"#5EEAD4","dark":"#134E4A"},"favicon":"https://mintlify.s3.us-west-1.amazonaws.com/pavezisoftware/favicon.svg","navbar":{"links":[{"href":"https://dashboard.caratuva.com","label":"Dashboard"},{"href":"https://status.caratuva.com","label":"Status"}],"primary":{"type":"button","label":"Sign in","href":"https://dashboard.caratuva.com"}},"footer":{"socials":{}},"contextual":{"options":["copy","view","chatgpt","claude","download-spec"],"display":"header"},"styling":{"latex":true},"navigation":{"languages":[{"language":"en","href":"introduction"},{"language":"pt-BR","href":"pt-BR/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"pavezisoftware","hasAudioNarration":false,"actualSubdomain":"pavezisoftware","customDomains":["docs.caratuva.com"],"gitSource":{"type":"github","owner":"pavezi-io","repo":"caratuva","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a4c592a15940cc6d05d5a49","collectionId":"1557afaa-1711-45f9-bc89-08c00102274b","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6a4c592a15940cc6d05d5a49:success","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"Referência da API","count":46},{"language":"default","tag":"Endpoints","count":46},{"language":"default","tag":"Accounts","count":23},{"language":"en","tag":"Guides","count":12},{"language":"pt-BR","tag":"Guias","count":12},{"language":"en","tag":"API Reference","count":9},{"language":"pt-BR","tag":"Referência da API","count":9},{"language":"default","tag":"Invoices","count":7},{"language":"en","tag":"Integration","count":5},{"language":"en","tag":"Get started","count":5},{"language":"en","tag":"Get paid","count":5},{"language":"en","tag":"For sellers","count":5},{"language":"pt-BR","tag":"Integração","count":5},{"language":"pt-BR","tag":"Começar","count":5},{"language":"pt-BR","tag":"Receba","count":5},{"language":"pt-BR","tag":"Para vendedores","count":5},{"language":"default","tag":"Webhooks","count":5},{"language":"en","tag":"Overview","count":4},{"language":"en","tag":"Using the dashboard","count":4},{"language":"pt-BR","tag":"Visão geral","count":4},{"language":"pt-BR","tag":"Usando o painel","count":4},{"language":"default","tag":"API keys","count":3},{"language":"default","tag":"Payments","count":3},{"language":"default","tag":"Reports","count":3},{"language":"en","tag":"Your buyers","count":2},{"language":"pt-BR","tag":"Seus compradores","count":2},{"language":"default","tag":"Access","count":2},{"language":"en","tag":"Operations","count":1},{"language":"pt-BR","tag":"Operação","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"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":"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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/invoices/update-an-invoice","slug":"/api-reference/invoices/update-an-invoice","pageMetadata":{"title":"Update an invoice","description":"Patch a `draft` or `awaiting_approval` invoice. Only the provided fields change; passing `lineItems` replaces all items and recomputes `amount` from the new subtotals.","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json patch /v1/invoices/{id}","href":"/api-reference/invoices/update-an-invoice","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 ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Patch a \", _jsx(_components.code, {\n children: \"draft\"\n }), \" or \", _jsx(_components.code, {\n children: \"awaiting_approval\"\n }), \" invoice. Only the provided fields change; passing \", _jsx(_components.code, {\n children: \"lineItems\"\n }), \" replaces all items and recomputes \", _jsx(_components.code, {\n children: \"amount\"\n }), \" from the new subtotals.\"]\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 an invoice","description":"Patch a `draft` or `awaiting_approval` invoice. Only the provided fields change; passing `lineItems` replaces all items and recomputes `amount` from the new subtotals.","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json patch /v1/invoices/{id}","href":"/api-reference/invoices/update-an-invoice","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Patch a `draft` or `awaiting_approval` invoice. Only the provided fields change; passing `lineItems` replaces all items and recomputes `amount` from the new subtotals.","operationId":"InvoicesController_update","parameters":["aeb4dfcc-07bd-4f00-8935-84145385beae"],"requestBody":"5627a256-86d7-4378-969f-a76df4523f80","responses":{"200":"0bc22de0-46c5-4935-ac81-a29054c8f693"},"security":["bec12a68-67d1-4634-87d1-87790ebd8645","3b9caa5b-1e9d-48b0-8e03-65a7729fc12f"],"summary":"Update an invoice","tags":["Invoices"],"method":"patch","type":"path","servers":[],"path":"/v1/invoices/{id}","baseUrlOptions":[],"title":"Update an invoice","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"aeb4dfcc-07bd-4f00-8935-84145385beae":{"name":"id","required":true,"in":"path","schema":{"type":"string","isRequired":true,"uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"buyerEmail":{"type":"string","format":"email","uniqueKey":"buyerEmail","typeLabel":"string\u003cemail>"},"buyerName":{"type":"string","minLength":1,"maxLength":200,"uniqueKey":"buyerName","typeLabel":"string"},"buyerCountry":{"type":"string","minLength":2,"maxLength":2,"uniqueKey":"buyerCountry","typeLabel":"string"},"currency":{"type":"string","minLength":3,"maxLength":3,"uniqueKey":"currency","typeLabel":"string"},"amount":{"type":"string","pattern":"^\\d+(\\.\\d{1,2})?$","uniqueKey":"amount","typeLabel":"string"},"lineItems":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500,"isRequired":true,"uniqueKey":"lineItems.items.[INDEX].description","typeLabel":"string"},"quantity":{"type":"string","pattern":"^\\d+(\\.\\d{1,4})?$","isRequired":true,"uniqueKey":"lineItems.items.[INDEX].quantity","typeLabel":"string"},"unitPrice":{"type":"string","pattern":"^\\d+(\\.\\d{1,2})?$","isRequired":true,"uniqueKey":"lineItems.items.[INDEX].unitPrice","typeLabel":"string"},"subtotal":{"type":"string","pattern":"^\\d+(\\.\\d{1,2})?$","isRequired":true,"uniqueKey":"lineItems.items.[INDEX].subtotal","typeLabel":"string"},"ncmCode":{"type":"string","pattern":"^\\d{8}$","uniqueKey":"lineItems.items.[INDEX].ncmCode","typeLabel":"string"},"originState":{"type":"string","minLength":2,"maxLength":2,"uniqueKey":"lineItems.items.[INDEX].originState","typeLabel":"string"}},"required":["description","quantity","unitPrice","subtotal"],"additionalProperties":false,"uniqueKey":"lineItems.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":500,"uniqueKey":"lineItems","typeLabel":"object[]"},"dueDate":{"oneOf":[{"type":"string","format":"date-time","uniqueKey":"dueDate.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","uniqueKey":"dueDate.oneOf.1","typeLabel":"null"}],"uniqueKey":"dueDate","typeLabel":"string\u003cdate-time> | null"},"expiresAt":{"oneOf":[{"type":"string","format":"date-time","uniqueKey":"expiresAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","uniqueKey":"expiresAt.oneOf.1","typeLabel":"null"}],"uniqueKey":"expiresAt","typeLabel":"string\u003cdate-time> | null"},"buyerRef":{"oneOf":[{"type":"string","maxLength":200,"uniqueKey":"buyerRef.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":200,"uniqueKey":"buyerRef.oneOf.1","typeLabel":"null"}],"uniqueKey":"buyerRef","typeLabel":"string | null"},"dueNumber":{"oneOf":[{"type":"string","pattern":"^\\d{11}$","uniqueKey":"dueNumber.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^\\d{11}$","uniqueKey":"dueNumber.oneOf.1","typeLabel":"null"}],"uniqueKey":"dueNumber","typeLabel":"string | null"},"exportContractRef":{"oneOf":[{"type":"string","maxLength":200,"uniqueKey":"exportContractRef.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":200,"uniqueKey":"exportContractRef.oneOf.1","typeLabel":"null"}],"uniqueKey":"exportContractRef","typeLabel":"string | null"},"incoterm":{"oneOf":[{"type":"string","enum":["FOB","CIF","FCA","CFR","EXW","DAP","DDP"],"uniqueKey":"incoterm.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["FOB","CIF","FCA","CFR","EXW","DAP","DDP"],"uniqueKey":"incoterm.oneOf.1","typeLabel":"null"}],"uniqueKey":"incoterm","typeLabel":"enum\u003cstring> | null"},"portOfLoading":{"oneOf":[{"type":"string","maxLength":64,"uniqueKey":"portOfLoading.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":64,"uniqueKey":"portOfLoading.oneOf.1","typeLabel":"null"}],"uniqueKey":"portOfLoading","typeLabel":"string | null"}},"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"default":{"title":"default","value":{"amount":"13000.00","incoterm":"CIF"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"0bc22de0-46c5-4935-ac81-a29054c8f693":{"description":"Updated invoice","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"publicId":{"type":"string","isRequired":true,"uniqueKey":"publicId","typeLabel":"string"},"orgId":{"type":"string","isRequired":true,"uniqueKey":"orgId","typeLabel":"string"},"buyerId":{"type":"string","isRequired":true,"uniqueKey":"buyerId","typeLabel":"string"},"sellerConnectedAccountId":{"type":"string","isRequired":true,"uniqueKey":"sellerConnectedAccountId","typeLabel":"string"},"sellerExternalId":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"sellerExternalId.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"sellerExternalId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sellerExternalId","typeLabel":"string | null"},"sellerName":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"sellerName.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"sellerName.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sellerName","typeLabel":"string | null"},"status":{"type":"string","enum":["draft","awaiting_approval","approved","awaiting_buyer","buyer_kyc_pending","buyer_kyc_approved","buyer_kyc_rejected","fx_quoted","fx_expired","on_ramp_pending","on_ramp_failed","fiat_received","on_chain_confirmed","offramp_pending","offramp_failed","settled","partial_payment","expired","cancelled","restored","manual_review"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"currency":{"type":"string","isRequired":true,"uniqueKey":"currency","typeLabel":"string"},"amount":{"type":"string","isRequired":true,"uniqueKey":"amount","typeLabel":"string"},"requestNetworkId":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"requestNetworkId.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"requestNetworkId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"requestNetworkId","typeLabel":"string | null"},"paymentChain":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"paymentChain.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"paymentChain.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"paymentChain","typeLabel":"string | null"},"paymentAddress":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"paymentAddress.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"paymentAddress.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"paymentAddress","typeLabel":"string | null"},"dueDate":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"dueDate.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"dueDate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"dueDate","typeLabel":"string | null"},"expiresAt":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"expiresAt.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"expiresAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"expiresAt","typeLabel":"string | null"},"cancelReason":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"cancelReason.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"cancelReason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"cancelReason","typeLabel":"string | null"},"pendingApproval":{"type":"boolean","isRequired":true,"uniqueKey":"pendingApproval","typeLabel":"boolean"},"buyerRef":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"buyerRef.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"buyerRef.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"buyerRef","typeLabel":"string | null"},"dueNumber":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"dueNumber.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"dueNumber.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"dueNumber","typeLabel":"string | null"},"exportContractRef":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"exportContractRef.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"exportContractRef.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"exportContractRef","typeLabel":"string | null"},"incoterm":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"incoterm.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"incoterm.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"incoterm","typeLabel":"string | null"},"portOfLoading":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"portOfLoading.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"portOfLoading.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"portOfLoading","typeLabel":"string | null"},"feeBps":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"feeBps.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"feeBps.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"feeBps","typeLabel":"integer | null"},"feeAmount":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"feeAmount.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"feeAmount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"feeAmount","typeLabel":"string | null"},"brlSettledAmount":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"brlSettledAmount.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"brlSettledAmount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"brlSettledAmount","typeLabel":"string | null"},"fxRateAtSettlement":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"fxRateAtSettlement.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"fxRateAtSettlement.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"fxRateAtSettlement","typeLabel":"string | null"},"createdAt":{"type":"string","isRequired":true,"uniqueKey":"createdAt","typeLabel":"string"},"updatedAt":{"type":"string","isRequired":true,"uniqueKey":"updatedAt","typeLabel":"string"},"timeline":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"timeline.items.[INDEX].id","typeLabel":"string"},"invoiceId":{"type":"string","isRequired":true,"uniqueKey":"timeline.items.[INDEX].invoiceId","typeLabel":"string"},"type":{"type":"string","isRequired":true,"uniqueKey":"timeline.items.[INDEX].type","typeLabel":"string"},"source":{"type":"string","isRequired":true,"uniqueKey":"timeline.items.[INDEX].source","typeLabel":"string"},"externalEventId":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"timeline.items.[INDEX].externalEventId.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"timeline.items.[INDEX].externalEventId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"timeline.items.[INDEX].externalEventId","typeLabel":"string | null"},"occurredAt":{"type":"string","isRequired":true,"uniqueKey":"timeline.items.[INDEX].occurredAt","typeLabel":"string"}},"required":["id","invoiceId","type","source","externalEventId","occurredAt"],"additionalProperties":false,"uniqueKey":"timeline.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"timeline","typeLabel":"object[]"},"buyerEmail":{"type":"string","format":"email","uniqueKey":"buyerEmail","typeLabel":"string\u003cemail>"},"buyerName":{"oneOf":[{"type":"string","uniqueKey":"buyerName.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"buyerName.oneOf.1","typeLabel":"null"}],"uniqueKey":"buyerName","typeLabel":"string | null"},"lineItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"lineItems.items.[INDEX].id","typeLabel":"string"},"description":{"type":"string","isRequired":true,"uniqueKey":"lineItems.items.[INDEX].description","typeLabel":"string"},"quantity":{"type":"string","isRequired":true,"uniqueKey":"lineItems.items.[INDEX].quantity","typeLabel":"string"},"unitPrice":{"type":"string","isRequired":true,"uniqueKey":"lineItems.items.[INDEX].unitPrice","typeLabel":"string"},"subtotal":{"type":"string","isRequired":true,"uniqueKey":"lineItems.items.[INDEX].subtotal","typeLabel":"string"},"ncmCode":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lineItems.items.[INDEX].ncmCode.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lineItems.items.[INDEX].ncmCode.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItems.items.[INDEX].ncmCode","typeLabel":"string | null"},"originState":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lineItems.items.[INDEX].originState.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lineItems.items.[INDEX].originState.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lineItems.items.[INDEX].originState","typeLabel":"string | null"}},"required":["id","description","quantity","unitPrice","subtotal","ncmCode","originState"],"additionalProperties":false,"uniqueKey":"lineItems.items.[INDEX]","typeLabel":"object"},"uniqueKey":"lineItems","typeLabel":"object[]"}},"required":["id","publicId","orgId","buyerId","sellerConnectedAccountId","sellerExternalId","sellerName","status","currency","amount","requestNetworkId","paymentChain","paymentAddress","dueDate","expiresAt","cancelReason","pendingApproval","buyerRef","dueNumber","exportContractRef","incoterm","portOfLoading","feeBps","feeAmount","brlSettledAmount","fxRateAtSettlement","createdAt","updatedAt","timeline"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"default":{"title":"default","value":{"id":"ckxinv042","publicId":"ckpub042","orgId":"ckorg001","buyerId":"ckbuy001","buyerEmail":"buyer@acme.com","buyerName":"ACME Imports LLC","sellerConnectedAccountId":"ckacc042","sellerExternalId":"seller-42","sellerName":"Fazenda Boa Vista","status":"draft","currency":"USD","amount":"12500.00","requestNetworkId":null,"paymentChain":"base","paymentAddress":"0x5fbe…a91c","dueDate":null,"expiresAt":null,"cancelReason":null,"pendingApproval":false,"buyerRef":null,"dueNumber":null,"exportContractRef":null,"incoterm":null,"portOfLoading":null,"feeBps":50,"feeAmount":"62.50","brlSettledAmount":null,"fxRateAtSettlement":null,"createdAt":"2026-06-30T12:00:00.000Z","updatedAt":"2026-06-30T12:00:00.000Z","lineItems":[{"id":"ckli001","description":"Order #42 — green coffee, 18t","quantity":"1","unitPrice":"12500.00","subtotal":"12500.00","ncmCode":null,"originState":null}],"timeline":[{"id":"ckev001","invoiceId":"ckxinv042","type":"created","source":"caratuva","externalEventId":null,"occurredAt":"2026-06-30T12:00:00.000Z"}]}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"bec12a68-67d1-4634-87d1-87790ebd8645":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key","scopes":[]}},"3b9caa5b-1e9d-48b0-8e03-65a7729fc12f":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","scopes":[]}}},"servers":{},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-API-Key","scopes":[]},"schema":{"title":"X-API-Key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"apiKey","name":"X-API-Key"}],"title":"apiKey"},{"schemes":[{"scheme":{"scheme":"bearer","bearerFormat":"JWT","type":"http","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearer","name":"Authorization"}],"title":"bearer"}]},"originalFileLocation":"https://api.caratuva.com/docs-json"},"subdomain":"pavezisoftware","siteName":"Caratuva","title":"Update an invoice - Caratuva","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/invoices/update-an-invoice","matchLevel":0},"pt-BR":{"href":"/api-reference/invoices/update-an-invoice","matchLevel":0}}},"lastModified":"2026-07-07T01:41:07.594Z","originalFileLocation":"api-reference/invoices/update-an-invoice.mdx","locale":"en"},"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=\"Patch a draft or awaiting_approval invoice. Only the provided fields change; passing lineItems replaces all items and recomputes amount from the new subtotals.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Caratuva\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/svg+xml\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/pavezisoftware/favicon.svg\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/pavezisoftware/favicon.svg\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/pavezisoftware/favicon.svg\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/svg+xml\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/pavezisoftware/favicon.svg\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update an invoice - Caratuva\">\u003cmeta data-mint-head property=\"og:description\" content=\"Patch a draft or awaiting_approval invoice. Only the provided fields change; passing lineItems replaces all items and recomputes amount from the new subtotals.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Caratuva\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.caratuva.com/api-reference/invoices/update-an-invoice\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://pavezisoftware.mintlify.app/_mintlify/api/og/v2?division=Invoices\u0026amp;title=Update+an+invoice\u0026amp;description=Patch+a+%60draft%60+or+%60awaiting_approval%60+invoice.+Only+the+provided+fields+change%3B+passing+%60lineItems%60+replaces+all+items+and+recomputes+%60amount%60+from+the+new+sub\u0026amp;theme=4451605dc365fc6b8cecb93b\u0026amp;signature=d0b4bf22bed4771ef84e9a52a6f44222e0ff1e09b47a682382a0009f0881960b\">\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 an invoice - Caratuva\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Patch a draft or awaiting_approval invoice. Only the provided fields change; passing lineItems replaces all items and recomputes amount from the new subtotals.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://pavezisoftware.mintlify.app/_mintlify/api/og/v2?division=Invoices\u0026amp;title=Update+an+invoice\u0026amp;description=Patch+a+%60draft%60+or+%60awaiting_approval%60+invoice.+Only+the+provided+fields+change%3B+passing+%60lineItems%60+replaces+all+items+and+recomputes+%60amount%60+from+the+new+sub\u0026amp;theme=4451605dc365fc6b8cecb93b\u0026amp;signature=d0b4bf22bed4771ef84e9a52a6f44222e0ff1e09b47a682382a0009f0881960b\">\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=\"https://mintlify.s3.us-west-1.amazonaws.com/pavezisoftware/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Caratuva\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0F766E\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.caratuva.com/api-reference/invoices/update-an-invoice\">\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-an-invoice.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.caratuva.com/#organization\",\"name\":\"Caratuva\",\"url\":\"https://docs.caratuva.com\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.caratuva.com#website\",\"name\":\"Caratuva\",\"url\":\"https://docs.caratuva.com\",\"publisher\":{\"@id\":\"https://docs.caratuva.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.caratuva.com/api-reference/invoices/update-an-invoice#webpage\",\"url\":\"https://docs.caratuva.com/api-reference/invoices/update-an-invoice\",\"name\":\"Update an invoice\",\"description\":\"Patch a draft or awaiting_approval invoice. Only the provided fields change; passing lineItems replaces all items and recomputes amount from the new subtotals.\",\"dateModified\":\"2026-07-07T01:41:07.594Z\",\"isPartOf\":{\"@id\":\"https://docs.caratuva.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.caratuva.com/api-reference/invoices/update-an-invoice#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.caratuva.com/api-reference/invoices/update-an-invoice#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.caratuva.com/api-reference/invoices/list-invoices-for-the-caller-organization-cursor-paginated\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Invoices\",\"item\":\"https://docs.caratuva.com/api-reference/invoices/list-invoices-for-the-caller-organization-cursor-paginated\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Update an invoice\",\"item\":\"https://docs.caratuva.com/api-reference/invoices/update-an-invoice\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.caratuva.com/api-reference/invoices/update-an-invoice#apireference\",\"headline\":\"Update an invoice\",\"name\":\"Update an invoice\",\"description\":\"Patch a draft or awaiting_approval invoice. Only the provided fields change; passing lineItems replaces all items and recomputes amount from the new subtotals.\",\"url\":\"https://docs.caratuva.com/api-reference/invoices/update-an-invoice\",\"mainEntityOfPage\":{\"@id\":\"https://docs.caratuva.com/api-reference/invoices/update-an-invoice#webpage\"},\"dateModified\":\"2026-07-07T01:41:07.594Z\",\"publisher\":{\"@id\":\"https://docs.caratuva.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.caratuva.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Caratuva\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Caratuva","nav":{"global":null,"languages":[{"language":"en","tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/introduction"}]},{"tab":"Get paid","pages":[{"title":"Get paid","href":"/getpaid/introduction"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API overview","href":"/api-reference/introduction"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Environments","href":"/api-reference/environments"},{"title":"Errors","href":"/api-reference/errors"}]},{"group":"Integration","pages":[{"title":"B2B quickstart","href":"/api-reference/b2b-quickstart"},{"title":"API keys","href":"/api-reference/api-keys"},{"title":"Payment intents","href":"/api-reference/payment-intents"},{"title":"Sellers \u0026 buyers","href":"/api-reference/connected-accounts"},{"title":"Webhooks","href":"/api-reference/webhooks"}]},{"group":"Endpoints","pages":[{"group":"Invoices","pages":[{"title":"List invoices for the caller organization (cursor-paginated)","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/invoices","href":"/api-reference/invoices/list-invoices-for-the-caller-organization-cursor-paginated"},{"title":"Create an invoice","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/invoices","href":"/api-reference/invoices/create-an-invoice"},{"title":"Get an invoice","description":"Fetch one invoice with its full payment-event timeline.","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/invoices/{id}","href":"/api-reference/invoices/get-an-invoice"},{"title":"Update an invoice","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json patch /v1/invoices/{id}","href":"/api-reference/invoices/update-an-invoice"},{"title":"Cancel an invoice","description":"Cancel an invoice before the buyer funds it. 15-minute undo window — see ADR 0007.","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/invoices/{id}/cancel","href":"/api-reference/invoices/cancel-an-invoice"},{"title":"Reassign the buyer on an invoice (useful when KYC is stuck on a consumed TOS token)","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/invoices/{id}/reassign-buyer","href":"/api-reference/invoices/reassign-the-buyer-on-an-invoice-useful-when-kyc-is-stuck-on-a-consumed-tos-token"},{"title":"Invite the buyer","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/invoices/{id}/invite-buyer","href":"/api-reference/invoices/invite-the-buyer"}]},{"group":"Access","pages":[{"title":"Request production (live mode) access","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/access/request","href":"/api-reference/access/request-production-live-mode-access"},{"title":"Production-access status","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/access/status","href":"/api-reference/access/production-access-status"}]},{"group":"Payments","pages":[{"title":"Create a payment","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/payments","href":"/api-reference/payments/create-a-payment"},{"title":"Get a payment","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/payments/{id}","href":"/api-reference/payments/get-a-payment"},{"title":"Cancel a payment","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/payments/{id}/cancel","href":"/api-reference/payments/cancel-a-payment"}]},{"group":"Accounts","pages":[{"title":"Start buyer KYC via the settlement partner","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/buyer-kyc","href":"/api-reference/accounts/start-buyer-kyc-via-the-settlement-partner"},{"title":"Capture the buyer KYC dossier and deliver a ToS link (async)","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/buyer-kyc/request-tos","href":"/api-reference/accounts/capture-the-buyer-kyc-dossier-and-deliver-a-tos-link-async"},{"title":"Mint a settlement-partner ToS-acceptance session URL","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/buyer-kyc/{buyerId}/tos-session","href":"/api-reference/accounts/mint-a-settlement-partner-tos-acceptance-session-url"},{"title":"Record the ToS acceptance returned in the redirect","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/buyer-kyc/{buyerId}/tos-accepted","href":"/api-reference/accounts/record-the-tos-acceptance-returned-in-the-redirect"},{"title":"Mint a one-shot signed upload URL for a KYC file","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/buyer-kyc/{buyerId}/upload-url","href":"/api-reference/accounts/mint-a-one-shot-signed-upload-url-for-a-kyc-file"},{"title":"Get latest buyer KYC submission","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/buyer-kyc/{buyerId}","href":"/api-reference/accounts/get-latest-buyer-kyc-submission"},{"title":"List connected accounts (cursor-paginated)","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/accounts","href":"/api-reference/accounts/list-connected-accounts-cursor-paginated"},{"title":"Create a connected account","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts","href":"/api-reference/accounts/create-a-connected-account"},{"title":"Get your own (the integrator's) account","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/accounts/self","href":"/api-reference/accounts/get-your-own-the-integrators-account"},{"title":"Get your own PIX payout configuration","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/accounts/self/payout-config","href":"/api-reference/accounts/get-your-own-pix-payout-configuration"},{"title":"Register your own (the integrator's) PIX payout destination","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json put /v1/accounts/self/payout-config","href":"/api-reference/accounts/register-your-own-the-integrators-pix-payout-destination"},{"title":"Get your own full bank-account details (live)","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/accounts/self/payout-config/details","href":"/api-reference/accounts/get-your-own-full-bank-account-details-live"},{"title":"Get a connected account","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/accounts/{id}","href":"/api-reference/accounts/get-a-connected-account"},{"title":"Mint a ToS-acceptance session URL","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts/{id}/tos-session","href":"/api-reference/accounts/mint-a-tos-acceptance-session-url"},{"title":"Record a ToS acceptance","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts/{id}/tos-accepted","href":"/api-reference/accounts/record-a-tos-acceptance"},{"title":"Mint a signed document upload URL","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts/{id}/upload-url","href":"/api-reference/accounts/mint-a-signed-document-upload-url"},{"title":"Submit the end client for verification","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts/{id}/submit","href":"/api-reference/accounts/submit-the-end-client-for-verification"},{"title":"Register a seller's PIX payout destination","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts/{id}/payout-config","href":"/api-reference/accounts/register-a-sellers-pix-payout-destination"},{"title":"Finish onboarding: capture submission and deliver a ToS link to the seller","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts/{id}/request-tos","href":"/api-reference/accounts/finish-onboarding:-capture-submission-and-deliver-a-tos-link-to-the-seller"},{"title":"Recover a stalled onboarding: re-send the ToS acceptance link","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts/{id}/resend-tos","href":"/api-reference/accounts/recover-a-stalled-onboarding:-re-send-the-tos-acceptance-link"},{"title":"Retry the provider submission for a customer whose ToS is accepted but whose receiver was never created","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts/{id}/retry-submit","href":"/api-reference/accounts/retry-the-provider-submission-for-a-customer-whose-tos-is-accepted-but-whose-receiver-was-never-created"},{"title":"List customers (connected accounts + payers)","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/customers","href":"/api-reference/accounts/list-customers-connected-accounts-+-payers"},{"title":"Get a payer (self-signup buyer) detail","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/customers/payer/{id}","href":"/api-reference/accounts/get-a-payer-self-signup-buyer-detail"}]},{"group":"Webhooks","pages":[{"title":"List webhook subscriptions for this org","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/webhooks","href":"/api-reference/webhooks/list-webhook-subscriptions-for-this-org"},{"title":"Create an outbound webhook subscription","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/webhooks","href":"/api-reference/webhooks/create-an-outbound-webhook-subscription"},{"title":"Soft-delete a webhook subscription","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json delete /v1/webhooks/{id}","href":"/api-reference/webhooks/soft-delete-a-webhook-subscription"},{"title":"List recent delivery attempts for a subscription","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/webhooks/{id}/deliveries","href":"/api-reference/webhooks/list-recent-delivery-attempts-for-a-subscription"},{"title":"Rotate the signing secret","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/webhooks/{id}/rotate-secret","href":"/api-reference/webhooks/rotate-the-signing-secret"}]},{"group":"Reports","pages":[{"title":"Transfer-pricing report (JSON) for the given quarter","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/reports/transfer-pricing","href":"/api-reference/reports/transfer-pricing-report-json-for-the-given-quarter"},{"title":"Transfer-pricing report (CSV) for the given quarter","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/reports/transfer-pricing.csv","href":"/api-reference/reports/transfer-pricing-report-csv-for-the-given-quarter"},{"title":"Transfer-pricing report (PDF) for the given quarter","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/reports/transfer-pricing.pdf","href":"/api-reference/reports/transfer-pricing-report-pdf-for-the-given-quarter"}]},{"group":"API keys","pages":[{"title":"List API keys","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/api-keys","href":"/api-reference/api-keys/list-api-keys"},{"title":"Create an API key","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/api-keys","href":"/api-reference/api-keys/create-an-api-key"},{"title":"Revoke an API key","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json delete /v1/api-keys/{id}","href":"/api-reference/api-keys/revoke-an-api-key"}]}]}]}]},{"language":"pt-BR","tabs":[{"tab":"Guias","pages":[{"title":"Guias","href":"/pt-BR/introduction"}]},{"tab":"Receba","pages":[{"title":"Receba","href":"/pt-BR/getpaid/introduction"}]},{"tab":"Referência da API","groups":[{"group":"Visão geral","pages":[{"title":"Visão geral da API","href":"/pt-BR/api-reference/introduction"},{"title":"Autenticação","href":"/pt-BR/api-reference/authentication"},{"title":"Ambientes","href":"/pt-BR/api-reference/environments"},{"title":"Erros","href":"/pt-BR/api-reference/errors"}]},{"group":"Integração","pages":[{"title":"Início rápido B2B","href":"/pt-BR/api-reference/b2b-quickstart"},{"title":"Chaves de API","href":"/pt-BR/api-reference/api-keys"},{"title":"Payment intents","href":"/pt-BR/api-reference/payment-intents"},{"title":"Vendedores e compradores","href":"/pt-BR/api-reference/connected-accounts"},{"title":"Webhooks","href":"/pt-BR/api-reference/webhooks"}]},{"group":"Endpoints","pages":[{"group":"Invoices","pages":[{"title":"List invoices for the caller organization (cursor-paginated)","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/invoices","href":"/api-reference/invoices/list-invoices-for-the-caller-organization-cursor-paginated"},{"title":"Create an invoice","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/invoices","href":"/api-reference/invoices/create-an-invoice"},{"title":"Get an invoice","description":"Fetch one invoice with its full payment-event timeline.","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/invoices/{id}","href":"/api-reference/invoices/get-an-invoice"},{"title":"Update an invoice","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json patch /v1/invoices/{id}","href":"/api-reference/invoices/update-an-invoice"},{"title":"Cancel an invoice","description":"Cancel an invoice before the buyer funds it. 15-minute undo window — see ADR 0007.","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/invoices/{id}/cancel","href":"/api-reference/invoices/cancel-an-invoice"},{"title":"Reassign the buyer on an invoice (useful when KYC is stuck on a consumed TOS token)","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/invoices/{id}/reassign-buyer","href":"/api-reference/invoices/reassign-the-buyer-on-an-invoice-useful-when-kyc-is-stuck-on-a-consumed-tos-token"},{"title":"Invite the buyer","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/invoices/{id}/invite-buyer","href":"/api-reference/invoices/invite-the-buyer"}]},{"group":"Access","pages":[{"title":"Request production (live mode) access","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/access/request","href":"/api-reference/access/request-production-live-mode-access"},{"title":"Production-access status","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/access/status","href":"/api-reference/access/production-access-status"}]},{"group":"Payments","pages":[{"title":"Create a payment","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/payments","href":"/api-reference/payments/create-a-payment"},{"title":"Get a payment","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/payments/{id}","href":"/api-reference/payments/get-a-payment"},{"title":"Cancel a payment","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/payments/{id}/cancel","href":"/api-reference/payments/cancel-a-payment"}]},{"group":"Accounts","pages":[{"title":"Start buyer KYC via the settlement partner","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/buyer-kyc","href":"/api-reference/accounts/start-buyer-kyc-via-the-settlement-partner"},{"title":"Capture the buyer KYC dossier and deliver a ToS link (async)","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/buyer-kyc/request-tos","href":"/api-reference/accounts/capture-the-buyer-kyc-dossier-and-deliver-a-tos-link-async"},{"title":"Mint a settlement-partner ToS-acceptance session URL","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/buyer-kyc/{buyerId}/tos-session","href":"/api-reference/accounts/mint-a-settlement-partner-tos-acceptance-session-url"},{"title":"Record the ToS acceptance returned in the redirect","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/buyer-kyc/{buyerId}/tos-accepted","href":"/api-reference/accounts/record-the-tos-acceptance-returned-in-the-redirect"},{"title":"Mint a one-shot signed upload URL for a KYC file","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/buyer-kyc/{buyerId}/upload-url","href":"/api-reference/accounts/mint-a-one-shot-signed-upload-url-for-a-kyc-file"},{"title":"Get latest buyer KYC submission","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/buyer-kyc/{buyerId}","href":"/api-reference/accounts/get-latest-buyer-kyc-submission"},{"title":"List connected accounts (cursor-paginated)","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/accounts","href":"/api-reference/accounts/list-connected-accounts-cursor-paginated"},{"title":"Create a connected account","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts","href":"/api-reference/accounts/create-a-connected-account"},{"title":"Get your own (the integrator's) account","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/accounts/self","href":"/api-reference/accounts/get-your-own-the-integrators-account"},{"title":"Get your own PIX payout configuration","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/accounts/self/payout-config","href":"/api-reference/accounts/get-your-own-pix-payout-configuration"},{"title":"Register your own (the integrator's) PIX payout destination","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json put /v1/accounts/self/payout-config","href":"/api-reference/accounts/register-your-own-the-integrators-pix-payout-destination"},{"title":"Get your own full bank-account details (live)","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/accounts/self/payout-config/details","href":"/api-reference/accounts/get-your-own-full-bank-account-details-live"},{"title":"Get a connected account","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/accounts/{id}","href":"/api-reference/accounts/get-a-connected-account"},{"title":"Mint a ToS-acceptance session URL","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts/{id}/tos-session","href":"/api-reference/accounts/mint-a-tos-acceptance-session-url"},{"title":"Record a ToS acceptance","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts/{id}/tos-accepted","href":"/api-reference/accounts/record-a-tos-acceptance"},{"title":"Mint a signed document upload URL","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts/{id}/upload-url","href":"/api-reference/accounts/mint-a-signed-document-upload-url"},{"title":"Submit the end client for verification","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts/{id}/submit","href":"/api-reference/accounts/submit-the-end-client-for-verification"},{"title":"Register a seller's PIX payout destination","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts/{id}/payout-config","href":"/api-reference/accounts/register-a-sellers-pix-payout-destination"},{"title":"Finish onboarding: capture submission and deliver a ToS link to the seller","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts/{id}/request-tos","href":"/api-reference/accounts/finish-onboarding:-capture-submission-and-deliver-a-tos-link-to-the-seller"},{"title":"Recover a stalled onboarding: re-send the ToS acceptance link","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts/{id}/resend-tos","href":"/api-reference/accounts/recover-a-stalled-onboarding:-re-send-the-tos-acceptance-link"},{"title":"Retry the provider submission for a customer whose ToS is accepted but whose receiver was never created","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/accounts/{id}/retry-submit","href":"/api-reference/accounts/retry-the-provider-submission-for-a-customer-whose-tos-is-accepted-but-whose-receiver-was-never-created"},{"title":"List customers (connected accounts + payers)","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/customers","href":"/api-reference/accounts/list-customers-connected-accounts-+-payers"},{"title":"Get a payer (self-signup buyer) detail","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/customers/payer/{id}","href":"/api-reference/accounts/get-a-payer-self-signup-buyer-detail"}]},{"group":"Webhooks","pages":[{"title":"List webhook subscriptions for this org","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/webhooks","href":"/api-reference/webhooks/list-webhook-subscriptions-for-this-org"},{"title":"Create an outbound webhook subscription","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/webhooks","href":"/api-reference/webhooks/create-an-outbound-webhook-subscription"},{"title":"Soft-delete a webhook subscription","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json delete /v1/webhooks/{id}","href":"/api-reference/webhooks/soft-delete-a-webhook-subscription"},{"title":"List recent delivery attempts for a subscription","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/webhooks/{id}/deliveries","href":"/api-reference/webhooks/list-recent-delivery-attempts-for-a-subscription"},{"title":"Rotate the signing secret","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/webhooks/{id}/rotate-secret","href":"/api-reference/webhooks/rotate-the-signing-secret"}]},{"group":"Reports","pages":[{"title":"Transfer-pricing report (JSON) for the given quarter","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/reports/transfer-pricing","href":"/api-reference/reports/transfer-pricing-report-json-for-the-given-quarter"},{"title":"Transfer-pricing report (CSV) for the given quarter","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/reports/transfer-pricing.csv","href":"/api-reference/reports/transfer-pricing-report-csv-for-the-given-quarter"},{"title":"Transfer-pricing report (PDF) for the given quarter","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/reports/transfer-pricing.pdf","href":"/api-reference/reports/transfer-pricing-report-pdf-for-the-given-quarter"}]},{"group":"API keys","pages":[{"title":"List API keys","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json get /v1/api-keys","href":"/api-reference/api-keys/list-api-keys"},{"title":"Create an API key","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json post /v1/api-keys","href":"/api-reference/api-keys/create-an-api-key"},{"title":"Revoke an API key","deprecated":null,"version":null,"openapi":"https://api.caratuva.com/docs-json delete /v1/api-keys/{id}","href":"/api-reference/api-keys/revoke-an-api-key"}]}]}]}]}]},"title":"Update an invoice - Caratuva","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Bbp7I60D.js","utils-C3RIvJha.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DqD-vLt8.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B31Loprg.js","snippetPresets-DKpk-b8t.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Cj65AhOR.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BXtn5gcC.js","shallow-RY2b03Cp.js","getApiPlaygroundDisplay-B0jeiPk3.js","CodeSnippet-CYgBjjwn.js","CodeSnippets-DOngDrYB.js","Page-n7I5XbKb.js","getPastedJson-DRQbJx-T.js","icon-CQiQCicY.js","MethodPill-BKTLdNtu.js","DuplicateIcon-B9jpAdat.js","createIcon-DCddRrXv.js","DynamicMarkdown-a8hUKrw6.js","SectionHeading-eECVV2eH.js","axios-vUo_bRtp.js","Markdown--GF7ZIpf.js","clsx-DZLdJUrt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-2LoAhjKH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Zwc0ZncM.js"]}