Authenticate with either a Supabase session (member of the invoice’s organization) or an API key belonging to that same organization. Determines automatically whether the cancellation is direct or requires receptor approval per SAT rules — Timbrix cannot confirm receptor approval in real time, so a pending cancellation must be resolved manually via the resolve endpoint.
Requests cancellation of a stamped CFDI 4.0 before the SAT. Unlike Create Invoice and List Invoices (which resolve the organization from an API key or the X-Organization-Id header), this route resolves the organization from the invoice’s own uuid — its folio fiscal, globally unique across all organizations — combined with the caller’s own auth context (session or API key), so no organization identifier needs to be supplied separately at all.
Authentication
Accepts either:
A Supabase Bearer session (Authorization: Bearer <token>) — the authenticated user must be a member of the invoice’s organization.
An API key (X-API-Key: sk_...) with the write:invoices scope — the key’s own organization must match the invoice’s organization, or the request is rejected with 403 Forbidden.
Path Parameters
Parameter
Type
Required
Description
uuid
string (UUID)
Yes
Folio fiscal UUID (uuidFiscal) of the invoice to cancel — globally unique, not scoped to an organization
Request Body
Field
Type
Required
Description
motivo
string
Yes
SAT cancellation reason code — 01, 02, 03, or 04 (see below)
folioSustitucion
string
Conditional*
Folio fiscal UUID of the CFDI that replaces this one. Required, and only meaningful, when motivo is 01
* Required when motivo is 01 (sustitución). Must be the folio fiscal of an existing, vigente invoice belonging to the same organization, and cannot be the invoice being cancelled itself — an arbitrary or unverified UUID is rejected with a 400. It must also be a CFDI issued with relatedCfdis: [{ "type": "04", "uuids": ["<this invoice's UUID>"] }] and dated no earlier than the invoice being cancelled (see Substitution flow). Ignored for motivo02, 03, and 04, even if sent.
motivo codes
Code
Description
folioSustitucion
01
Emitido con errores con relación (sustitución)
Required
02
Emitido con errores sin relación
Not applicable
03
No se llevó a cabo la operación
Not applicable
04
Operación nominativa relacionada en factura global
Not applicable
Substitution flow (motivo 01)
The SAT only accepts motivo: "01" when the replacement CFDI relates the original with TipoRelacion 04 and is not dated before it. Timbrix checks both against the stamped XML before calling the PAC. Order matters: first stamp the replacement (B), then cancel the original (A).
Issue B, relating A with relatedCfdis (see Create Invoice):
If B does not meet the rules, the request is rejected with a 400 before reaching the SAT. These messages replace the SAT rejections 312 and 208:
B does not relate A with TipoRelacion 04 (SAT code 312): La factura sustituta <serie>-<folio> no relaciona a esta factura como sustitución (TipoRelacion 04). El SAT rechazaría la cancelación (código 312). Emite la factura sustituta con "Sustituir factura".
B is dated earlier than A (SAT code 208): La factura sustituta no puede tener fecha anterior a la original (el SAT la rechazaría con el código 208)
To replace a Complemento de Pago (CFDI type P), stamp B with substitutes instead of relatedCfdis, then cancel A the same way.Other 400/404 messages for folioSustitucion: La factura sustituta no puede ser la misma factura que se está cancelando, La factura sustituta debe estar vigente, La factura sustituta pertenece a otro ambiente (sandbox/producción), No se pudo leer el CFDI sustituto, and Factura sustituta <uuid> no encontrada (404).
How eligibility is determined
Timbrix computes, from the invoice’s own data, whether the cancellation applies directly or requires the receptor’s approval — this follows the SAT’s rule (RMF 2026, regla 2.7.1.35) and you never send it yourself; it’s returned in the response as requiresApproval. The cancellation is direct (no approval needed) when at least one of these is true:
tipoComprobante is E (Egreso), T (Traslado) or N (Nómina)
total is ≤ $1,000 on an invoice in MXN, except for a Complemento de Pago (P)
rfcReceptor is XAXX010101000 (público en general) or XEXX010101000 (residente extranjero)
The cancellation is requested no later than the business day after the invoice was issued. The window counts from the CFDI’s own issue date (Fecha or FechaTimbrado, whichever is earlier), not from when the invoice was saved in Timbrix. Business days are Mon–Fri on the America/Mexico_City calendar.
Otherwise, the cancellation requires receptor approval: the SAT notifies the receptor, who has 3 business days to accept or reject it through the SAT portal. If the receptor doesn’t respond, the SAT treats the cancellation as accepted.
Timbrix cannot poll the SAT in real time for the receptor’s response. A
cancellation that requires approval comes back with cancellationStatus: "pendiente" and a respondBy deadline — the invoice stays vigente until
you confirm the actual outcome yourself, after checking the SAT portal, via
Resolve Cancellation.
A direct cancellation, by contrast, is resolved synchronously in the same request: the response comes back with cancellationStatus: "aceptada" and the invoice’s status flips to cancelado immediately.
Complementos de Pago
A Complemento de Pago (type: "P") is cancelled directly only when you request it no later than the business day after it was issued (or when the receptor is a generic RFC). After that, the receptor must accept it (RMF 2026, regla 2.7.1.35): it comes back as pendiente, and its amount goes back to the invoice balance only once you confirm the cancellation was accepted. To cancel a PPD invoice that has Complementos de Pago, cancel them first; otherwise the request returns 409. If they are already waiting for the receptor, the 409 says so: cancel the invoice once you confirm the receptor accepted them. See Register Payment.
Mass cancellation limit
Organizations on the Starter or Pro plan are limited to 50 cancellation requests per calendar day; the 51st request that day returns 400 Bad Request. Business and Enterprise plans have no daily limit.
Timbrix invoice record ID (not the folio fiscal UUID)
motivo
string
The cancellation reason code sent in the request
folioSustitucion
string | null
Folio fiscal UUID of the replacement CFDI — only set for motivo: "01"
requiresApproval
boolean
Whether this cancellation needed receptor approval, computed server-side
respondBy
string | null
Deadline (ISO 8601) for the receptor to respond — 3 business days from when the cancellation was requested, skipping the SAT’s official non-business days. null for direct cancellations
cancellationStatus
string
aceptada (direct cancellation) or pendiente (waiting for the receptor)
requestedBy
string | null
Timbrix user ID who requested the cancellation
resolvedBy
string | null
Timbrix user ID who confirmed the final outcome — null for direct cancellations, which resolve automatically
resolvedAt
string | null
ISO 8601 timestamp the outcome was confirmed — null while pendiente
createdAt
string
ISO 8601 timestamp the cancellation was requested
Responses
Status
When
201
The cancellation was registered: cancellationStatus is aceptada (direct cancellation) or pendiente (waiting for the receptor).
409
PAC_CANCEL_UNCONFIRMED: Timbrix could not confirm the result with the SAT and is verifying it (see below). CONFLICT: another request for the same invoice is being processed at this moment (“en proceso”), or a cancellation is waiting for the receptor (“pendiente de resolución”), or the invoice is a PPD invoice with Complementos de Pago vigente or being stamped: cancel them first (Primero cancela los complementos de pago de esta factura).
422
PAC_CANCEL_REJECTED — the SAT rejected the cancellation. The invoice stays vigente.
Cancellation in progress (PAC_CANCEL_UNCONFIRMED)
Timbrix saves your request before sending it to the SAT. If the SAT’s answer cannot be confirmed (for example, a timeout), the request returns 409 and the invoice shows cancellationStatus: "en_proceso" in Get Invoice and List Invoices. For a cancellation that does not need the receptor’s acceptance, Timbrix re-sends it every few minutes (a limited number of times) and the result usually appears on its own within a few minutes.
{ "statusCode": 409, "message": "No pudimos confirmar la cancelación con el SAT. La estamos verificando: en unos minutos verás el resultado.", "error": "PAC_CANCEL_UNCONFIRMED", "suggestion": "No la canceles de nuevo con otro motivo. Reintentar es seguro: Timbrix confirma la solicitud anterior antes de enviar otra."}
Do not cancel the invoice again with a different motivo. For a cancellation
that does not need the receptor’s acceptance, retrying the same request is
safe: while a request is en_proceso, Timbrix first confirms that earlier
request (with its original motivo) and returns it if the SAT accepted it.
For a cancellation that needs the receptor’s acceptance, Timbrix does not
re-send it automatically: the status stays en_proceso until it is confirmed,
and retrying returns the same 409.
SAT rejection (PAC_CANCEL_REJECTED)
When the SAT rejects the cancellation, the response includes the SAT’s code and text, and the invoice is not marked as cancelled. For example, code 205 (the UUID does not exist at the SAT) or 203 (the UUID does not belong to the issuer). Fix the cause and request the cancellation again. In production, a 205 for a CFDI stamped very recently can also mean the SAT has not registered it yet: wait a while and try again.
{ "statusCode": 422, "message": "El SAT rechazó la cancelación: UUID no existe (código 205).", "error": "PAC_CANCEL_REJECTED"}
In sandbox, the SAT test environment always answers 205. Timbrix treats that
answer as an accepted cancellation, so you get aceptada as in production.
Common Errors
400 Bad Request
motivo is invalid; folioSustitucion is missing when motivo is 01, is not a vigente invoice of the same organization, or is the same invoice being cancelled; the invoice is already cancelado; or the organization has hit the daily mass-cancellation limit (Starter/Pro plans).
{ "statusCode": 400, "message": "`folioSustitucion` es requerido cuando `motivo` es 01 (sustitución)", "error": "BAD_REQUEST"}
401 Unauthorized
Missing or invalid Bearer token / API key.
403 Forbidden
The authenticated user is not a member of the invoice’s organization, or the API key does not have the write:invoices scope / belongs to a different organization than the one that owns the invoice.
404 Not Found
uuid does not match any invoice, or (when motivo is 01) folioSustitucion does not match any invoice belonging to the same organization.
409 Conflict
A cancellation is pendiente for this invoice (waiting for the receptor). Resolve it via Resolve Cancellation — or wait for the receptor to respond — before requesting another.
{ "statusCode": 409, "message": "Esta factura ya tiene una cancelación pendiente de resolución", "error": "CONFLICT"}
The message reads “Esta factura ya tiene una cancelación en proceso” when another request for the same invoice is being processed at the same moment; try again once it finishes.
Authorizations
apiKeybearer
X-API-Key
string
header
required
API Key for authentication (sk_test_... for sandbox, sk_live_... for production)
Path Parameters
uuid
string
required
Body
application/json
motivo
enum<string>
required
01 = emitido con errores con relación (requiere folioSustitucion), 02 = emitido con errores sin relación, 03 = no se llevó a cabo la operación, 04 = operación nominativa relacionada en factura global
Available options:
01,
02,
03,
04
Example:
"02"
folioSustitucion
string
UUID fiscal del CFDI que sustituye a este. Requerido cuando motivo=01, debe ser una factura vigente de la misma organización.
Example:
"d3bfbc57-44af-4390-a064-f0afab85e5df"
Response
id
string
required
invoiceId
string
required
motivo
enum<string>
required
Available options:
01,
02,
03,
04
requiresApproval
boolean
required
cancellationStatus
enum<string>
required
Available options:
pendiente,
aceptada,
rechazada,
en_proceso,
fallida
createdAt
string<date-time>
required
folioSustitucion
object
respondBy
object
pacCodigoRespuestaSat
object | null
pacCodigoRespuestaSatTexto
object | null
requestedBy
object
resolvedBy
object
resolvedAt
object
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Timbrix","colors":{"primary":"#000000","light":"#ffffff","dark":"#000000"},"logo":{"light":"https://mintcdn.com/timbrify/gNpyqvpwohEXPk52/logo/light.svg?fit=max\u0026auto=format\u0026n=gNpyqvpwohEXPk52\u0026q=85\u0026s=83b6a3e733e09f30ee340a5350b73212","dark":"https://mintcdn.com/timbrify/gNpyqvpwohEXPk52/logo/dark.svg?fit=max\u0026auto=format\u0026n=gNpyqvpwohEXPk52\u0026q=85\u0026s=8059165110d142712a6da647732f7527"},"favicon":"https://mintcdn.com/timbrify/4x_Tmgur6hxMQ4iw/favicon.svg?fit=max\u0026auto=format\u0026n=4x_Tmgur6hxMQ4iw\u0026q=85\u0026s=1db2033741049c7d0b55113e5aedb862","navbar":{"links":[{"href":"mailto:hola@timbrix.mx","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.timbrix.mx"}},"footer":{"socials":{"x":"https://x.com/timbrix_mx","instagram":"https://www.instagram.com/timbrix.mx","github":"https://github.com/Timbrix","linkedin":"https://www.linkedin.com/company/timbrix"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"timbrify","hasAudioNarration":false,"actualSubdomain":"timbrify","customDomains":["docs.timbrix.mx"],"gitSource":{"type":"github","owner":"timbrix","repo":"timbrix-platform","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b0263bd429c2eb6eb1933d2","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"API reference","count":197},{"language":"default","tag":"Invoices","count":18},{"language":"default","tag":"invoices","count":17},{"language":"default","tag":"organizations","count":17},{"language":"default","tag":"oauth","count":14},{"language":"default","tag":"Guides","count":13},{"language":"default","tag":"OAuth","count":11},{"language":"default","tag":"Organizations","count":10},{"language":"default","tag":"API Keys","count":7},{"language":"default","tag":"Webhooks","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":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":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","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":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/invoices/cancel","slug":"/api-reference/invoices/cancel","pageMetadata":{"title":"Cancel Invoice","openapi":"POST /invoices/{uuid}/cancel","description":"Authenticate with either a Supabase session (member of the invoice's organization) or an API key belonging to that same organization. Determines automatically whether the cancellation is direct or requires receptor approval per SAT rules — Timbrix cannot confirm receptor approval in real time, so a pending cancellation must be resolved manually via the resolve endpoint.","href":"/api-reference/invoices/cancel"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Authenticate with either a Supabase session (member of the invoice’s organization) or an API key belonging to that same organization. Determines automatically whether the cancellation is direct or requires receptor approval per SAT rules — Timbrix cannot confirm receptor approval in real time, so a pending cancellation must be resolved manually via the resolve endpoint.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Requests cancellation of a stamped CFDI 4.0 before the SAT. Unlike `,_jsx(_components.a,{href:`/api-reference/invoices/create`,children:`Create Invoice`}),` and `,_jsx(_components.a,{href:`/api-reference/invoices/list`,children:`List Invoices`}),` (which resolve the organization from an API key or the `,_jsx(_components.code,{children:`X-Organization-Id`}),` header), this route resolves the organization from the invoice’s own `,_jsx(_components.code,{children:`uuid`}),` — its folio fiscal, globally unique across all organizations — combined with the caller’s own auth context (session or API key), so no organization identifier needs to be supplied separately at all.`]}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsxs(_components.p,{children:[`Accepts `,_jsx(_components.strong,{children:`either`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A Supabase Bearer session (`,_jsx(_components.code,{children:`Authorization: Bearer \u003ctoken>`}),`) — the authenticated user must be a member of the invoice’s organization.`]}),`\n`,_jsxs(_components.li,{children:[`An API key (`,_jsx(_components.code,{children:`X-API-Key: sk_...`}),`) with the `,_jsx(_components.code,{children:`write:invoices`}),` scope — the key’s own organization must match the invoice’s organization, or the request is rejected with `,_jsx(_components.code,{children:`403 Forbidden`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`uuid`})}),_jsx(_components.td,{children:`string (UUID)`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`Folio fiscal UUID (`,_jsx(_components.code,{children:`uuidFiscal`}),`) of the invoice to cancel — globally unique, not scoped to an organization`]})]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request Body`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`motivo`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`SAT cancellation reason code — `,_jsx(_components.code,{children:`01`}),`, `,_jsx(_components.code,{children:`02`}),`, `,_jsx(_components.code,{children:`03`}),`, or `,_jsx(_components.code,{children:`04`}),` (see below)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`folioSustitucion`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Conditional*`}),_jsxs(_components.td,{children:[`Folio fiscal UUID of the CFDI that replaces this one. Required, and only meaningful, when `,_jsx(_components.code,{children:`motivo`}),` is `,_jsx(_components.code,{children:`01`})]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`* Required when `,_jsx(_components.code,{children:`motivo`}),` is `,_jsx(_components.code,{children:`01`}),` (sustitución). Must be the folio fiscal of an existing, `,_jsx(_components.strong,{children:`vigente`}),` invoice belonging to the same organization, and cannot be the invoice being cancelled itself — an arbitrary or unverified UUID is rejected with a `,_jsx(_components.code,{children:`400`}),`. It must also be a CFDI issued with `,_jsx(_components.code,{children:`relatedCfdis: [{ \"type\": \"04\", \"uuids\": [\"\u003cthis invoice's UUID>\"] }]`}),` and dated no earlier than the invoice being cancelled (see `,_jsx(_components.a,{href:`#substitution-flow-motivo-01`,children:`Substitution flow`}),`). Ignored for `,_jsx(_components.code,{children:`motivo`}),` `,_jsx(_components.code,{children:`02`}),`, `,_jsx(_components.code,{children:`03`}),`, and `,_jsx(_components.code,{children:`04`}),`, even if sent.`]}),`\n`,_jsxs(Heading,{level:`3`,id:`motivo-codes`,children:[_jsx(_components.code,{children:`motivo`}),` codes`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Description`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`folioSustitucion`})})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`01`})}),_jsxs(_components.td,{children:[`Emitido con errores `,_jsx(_components.strong,{children:`con`}),` relación (sustitución)`]}),_jsx(_components.td,{children:`Required`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`02`})}),_jsxs(_components.td,{children:[`Emitido con errores `,_jsx(_components.strong,{children:`sin`}),` relación`]}),_jsx(_components.td,{children:`Not applicable`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`03`})}),_jsx(_components.td,{children:`No se llevó a cabo la operación`}),_jsx(_components.td,{children:`Not applicable`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`04`})}),_jsx(_components.td,{children:`Operación nominativa relacionada en factura global`}),_jsx(_components.td,{children:`Not applicable`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`substitution-flow-motivo-01`,children:`Substitution flow (motivo 01)`}),`\n`,_jsxs(_components.p,{children:[`The SAT only accepts `,_jsx(_components.code,{children:`motivo: \"01\"`}),` when the replacement CFDI relates the original with `,_jsx(_components.code,{children:`TipoRelacion 04`}),` and is not dated before it. Timbrix checks both against the stamped XML before calling the PAC. Order matters: first stamp the replacement (B), then cancel the original (A).`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Issue B, relating A with `,_jsx(_components.code,{children:`relatedCfdis`}),` (see `,_jsx(_components.a,{href:`/api-reference/invoices/create#substituting-a-cfdi`,children:`Create Invoice`}),`):`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`15`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.timbrix.mx/invoices`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: sk_live_...\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"series\": \"A\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"folioNumber\": \"2\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"date\": \"2026-07-30T16:10:00\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"paymentForm\": \"01\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"use\": \"G03\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"relatedCfdis\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"type\": \"04\", \"uuids\": [\"d3bfbc57-44af-4390-a064-f0afab85e5df\"] }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customerId\": \"590ce6c56d04f840aa8438af\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"items\": [ { \"quantity\": 1, \"description\": \"Servicio de consultoría\", \"unitPrice\": 100, \"amount\": 100, \"productKey\": \"84111506\", \"unitKey\": \"E48\" } ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.ol,{start:`2`,children:[`\n`,_jsxs(_components.li,{children:[`Cancel A with `,_jsx(_components.code,{children:`motivo: \"01\"`}),` and `,_jsx(_components.code,{children:`folioSustitucion`}),` set to the UUID returned for B:`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.timbrix.mx/invoices/d3bfbc57-44af-4390-a064-f0afab85e5df/cancel`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: sk_live_...\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"motivo\": \"01\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"folioSustitucion\": \"a1b2c3d4-5e6f-4890-9abc-def012345678\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`If B does not meet the rules, the request is rejected with a `,_jsx(_components.code,{children:`400`}),` before reaching the SAT. These messages replace the SAT rejections 312 and 208:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`B does not relate A with `,_jsx(_components.code,{children:`TipoRelacion 04`}),` (SAT code 312): `,_jsx(_components.code,{children:`La factura sustituta \u003cserie>-\u003cfolio> no relaciona a esta factura como sustitución (TipoRelacion 04). El SAT rechazaría la cancelación (código 312). Emite la factura sustituta con \"Sustituir factura\".`})]}),`\n`,_jsxs(_components.li,{children:[`B is dated earlier than A (SAT code 208): `,_jsx(_components.code,{children:`La factura sustituta no puede tener fecha anterior a la original (el SAT la rechazaría con el código 208)`})]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`To replace a Complemento de Pago (CFDI type `,_jsx(_components.code,{children:`P`}),`), stamp B with `,_jsx(_components.a,{href:`/api-reference/invoices/register-payment#replacing-a-complemento-de-pago`,children:_jsx(_components.code,{children:`substitutes`})}),` instead of `,_jsx(_components.code,{children:`relatedCfdis`}),`, then cancel A the same way.`]}),`\n`,_jsxs(_components.p,{children:[`Other `,_jsx(_components.code,{children:`400`}),`/`,_jsx(_components.code,{children:`404`}),` messages for `,_jsx(_components.code,{children:`folioSustitucion`}),`: `,_jsx(_components.code,{children:`La factura sustituta no puede ser la misma factura que se está cancelando`}),`, `,_jsx(_components.code,{children:`La factura sustituta debe estar vigente`}),`, `,_jsx(_components.code,{children:`La factura sustituta pertenece a otro ambiente (sandbox/producción)`}),`, `,_jsx(_components.code,{children:`No se pudo leer el CFDI sustituto`}),`, and `,_jsx(_components.code,{children:`Factura sustituta \u003cuuid> no encontrada`}),` (404).`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-eligibility-is-determined`,children:`How eligibility is determined`}),`\n`,_jsxs(_components.p,{children:[`Timbrix computes, from the invoice’s own data, whether the cancellation applies `,_jsx(_components.strong,{children:`directly`}),` or `,_jsx(_components.strong,{children:`requires the receptor’s approval`}),` — this follows the SAT’s rule (RMF 2026, regla 2.7.1.35) and you never send it yourself; it’s returned in the response as `,_jsx(_components.code,{children:`requiresApproval`}),`. The cancellation is direct (no approval needed) when at least one of these is true:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`tipoComprobante`}),` is `,_jsx(_components.code,{children:`E`}),` (Egreso), `,_jsx(_components.code,{children:`T`}),` (Traslado) or `,_jsx(_components.code,{children:`N`}),` (Nómina)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`total`}),` is ≤ $1,000 on an invoice in `,_jsx(_components.code,{children:`MXN`}),`, except for a Complemento de Pago (`,_jsx(_components.code,{children:`P`}),`)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`rfcReceptor`}),` is `,_jsx(_components.code,{children:`XAXX010101000`}),` (público en general) or `,_jsx(_components.code,{children:`XEXX010101000`}),` (residente extranjero)`]}),`\n`,_jsxs(_components.li,{children:[`The cancellation is requested no later than the business day after the invoice was issued. The window counts from the CFDI’s own issue date (`,_jsx(_components.code,{children:`Fecha`}),` or `,_jsx(_components.code,{children:`FechaTimbrado`}),`, whichever is earlier), not from when the invoice was saved in Timbrix. Business days are Mon–Fri on the America/Mexico_City calendar.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Otherwise, the cancellation `,_jsx(_components.strong,{children:`requires receptor approval`}),`: the SAT notifies the receptor, who has 3 business days to accept or reject it through the SAT portal. If the receptor doesn’t respond, the SAT treats the cancellation as accepted.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Timbrix cannot poll the SAT in real time for the receptor’s response. A\ncancellation that requires approval comes back with `,_jsx(_components.code,{children:`cancellationStatus: \"pendiente\"`}),` and a `,_jsx(_components.code,{children:`respondBy`}),` deadline — the invoice stays `,_jsx(_components.code,{children:`vigente`}),` until\nyou confirm the actual outcome yourself, after checking the SAT portal, via\n`,_jsx(_components.a,{href:`/api-reference/invoices/resolve-cancellation`,children:`Resolve Cancellation`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.strong,{children:`direct`}),` cancellation, by contrast, is resolved synchronously in the same request: the response comes back with `,_jsx(_components.code,{children:`cancellationStatus: \"aceptada\"`}),` and the invoice’s `,_jsx(_components.code,{children:`status`}),` flips to `,_jsx(_components.code,{children:`cancelado`}),` immediately.`]}),`\n`,_jsx(Heading,{level:`2`,id:`complementos-de-pago`,children:`Complementos de Pago`}),`\n`,_jsxs(_components.p,{children:[`A Complemento de Pago (`,_jsx(_components.code,{children:`type: \"P\"`}),`) is cancelled directly only when you request it no later than the business day after it was issued (or when the receptor is a generic RFC). After that, the receptor must accept it (RMF 2026, regla 2.7.1.35): it comes back as `,_jsx(_components.code,{children:`pendiente`}),`, and its amount goes back to the invoice balance only once you confirm the cancellation was accepted. To cancel a PPD invoice that has Complementos de Pago, cancel them first; otherwise the request returns `,_jsx(_components.code,{children:`409`}),`. If they are already waiting for the receptor, the `,_jsx(_components.code,{children:`409`}),` says so: cancel the invoice once you confirm the receptor accepted them. See `,_jsx(_components.a,{href:`/api-reference/invoices/register-payment`,children:`Register Payment`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`mass-cancellation-limit`,children:`Mass cancellation limit`}),`\n`,_jsxs(_components.p,{children:[`Organizations on the `,_jsx(_components.strong,{children:`Starter`}),` or `,_jsx(_components.strong,{children:`Pro`}),` plan are limited to 50 cancellation requests per calendar day; the 51st request that day returns `,_jsx(_components.code,{children:`400 Bad Request`}),`. `,_jsx(_components.strong,{children:`Business`}),` and `,_jsx(_components.strong,{children:`Enterprise`}),` plans have no daily limit.`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-request`,children:`Example Request`}),`\n`,_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`6`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.timbrix.mx/invoices/d3bfbc57-44af-4390-a064-f0afab85e5df/cancel`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer \u003cyour_token>\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"motivo\": \"02\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`15`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Not yet available in @timbrix/sdk — call the REST endpoint directly`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// until SDK support for cancellations ships.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.timbrix.mx/invoices/d3bfbc57-44af-4390-a064-f0afab85e5df/cancel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Bearer \u003cyour_token>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`motivo:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"02\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` cancellation`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`cancellation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`cancellationStatus`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Sustitución (`,_jsx(_components.code,{children:`motivo: \"01\"`}),`) — replacing this CFDI with an already-stamped corrected one:`]}),`\n`,_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.timbrix.mx/invoices/d3bfbc57-44af-4390-a064-f0afab85e5df/cancel`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: sk_live_...\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"motivo\": \"01\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"folioSustitucion\": \"a1b2c3d4-5e6f-4890-9abc-def012345678\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`example-response`,children:`Example Response`}),`\n`,_jsx(_components.p,{children:`Direct cancellation — resolved immediately:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"6a1b2c3d-4e5f-4890-9abc-def012345678\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"invoiceId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0f2a1c3e-1a2b-4c3d-9e8f-1234567890ab\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"motivo\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"02\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"folioSustitucion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"requiresApproval\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"respondBy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cancellationStatus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"aceptada\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"requestedBy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"9f8e7d6c-5b4a-3210-fedc-ba9876543210\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"resolvedBy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"resolvedAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-08-09T15:50:03.412Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-08-09T15:50:03.412Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Cancellation requiring receptor approval — still pending:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"6a1b2c3d-4e5f-4890-9abc-def012345678\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"invoiceId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0f2a1c3e-1a2b-4c3d-9e8f-1234567890ab\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"motivo\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"02\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"folioSustitucion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"requiresApproval\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"respondBy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-08-12T15:50:03.412Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cancellationStatus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pendiente\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"requestedBy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"9f8e7d6c-5b4a-3210-fedc-ba9876543210\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"resolvedBy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"resolvedAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-08-09T15:50:03.412Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Cancellation request ID`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`invoiceId`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Timbrix invoice record ID (not the folio fiscal UUID)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`motivo`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`The cancellation reason code sent in the request`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`folioSustitucion`})}),_jsx(_components.td,{children:`string | null`}),_jsxs(_components.td,{children:[`Folio fiscal UUID of the replacement CFDI — only set for `,_jsx(_components.code,{children:`motivo: \"01\"`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`requiresApproval`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`Whether this cancellation needed receptor approval, computed server-side`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`respondBy`})}),_jsx(_components.td,{children:`string | null`}),_jsxs(_components.td,{children:[`Deadline (ISO 8601) for the receptor to respond — 3 business days from when the cancellation was requested, skipping the SAT’s official non-business days. `,_jsx(_components.code,{children:`null`}),` for direct cancellations`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cancellationStatus`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`aceptada`}),` (direct cancellation) or `,_jsx(_components.code,{children:`pendiente`}),` (waiting for the receptor)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`requestedBy`})}),_jsx(_components.td,{children:`string | null`}),_jsx(_components.td,{children:`Timbrix user ID who requested the cancellation`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`resolvedBy`})}),_jsx(_components.td,{children:`string | null`}),_jsxs(_components.td,{children:[`Timbrix user ID who confirmed the final outcome — `,_jsx(_components.code,{children:`null`}),` for direct cancellations, which resolve automatically`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`resolvedAt`})}),_jsx(_components.td,{children:`string | null`}),_jsxs(_components.td,{children:[`ISO 8601 timestamp the outcome was confirmed — `,_jsx(_components.code,{children:`null`}),` while `,_jsx(_components.code,{children:`pendiente`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`createdAt`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`ISO 8601 timestamp the cancellation was requested`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`responses`,children:`Responses`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`201`})}),_jsxs(_components.td,{children:[`The cancellation was registered: `,_jsx(_components.code,{children:`cancellationStatus`}),` is `,_jsx(_components.code,{children:`aceptada`}),` (direct cancellation) or `,_jsx(_components.code,{children:`pendiente`}),` (waiting for the receptor).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`PAC_CANCEL_UNCONFIRMED`}),`: Timbrix could not confirm the result with the SAT and is verifying it (see below). `,_jsx(_components.code,{children:`CONFLICT`}),`: another request for the same invoice is being processed at this moment (“en proceso”), or a cancellation is waiting for the receptor (“pendiente de resolución”), or the invoice is a PPD invoice with Complementos de Pago `,_jsx(_components.code,{children:`vigente`}),` or being stamped: cancel them first (`,_jsx(_components.code,{children:`Primero cancela los complementos de pago de esta factura`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`PAC_CANCEL_REJECTED`}),` — the SAT rejected the cancellation. The invoice stays `,_jsx(_components.code,{children:`vigente`}),`.`]})]})]})]}),`\n`,_jsxs(Heading,{level:`3`,id:`cancellation-in-progress-pac_cancel_unconfirmed`,children:[`Cancellation in progress (`,_jsx(_components.code,{children:`PAC_CANCEL_UNCONFIRMED`}),`)`]}),`\n`,_jsxs(_components.p,{children:[`Timbrix saves your request before sending it to the SAT. If the SAT’s answer cannot be confirmed (for example, a timeout), the request returns `,_jsx(_components.code,{children:`409`}),` and the invoice shows `,_jsx(_components.code,{children:`cancellationStatus: \"en_proceso\"`}),` in `,_jsx(_components.a,{href:`/api-reference/invoices/get`,children:`Get Invoice`}),` and `,_jsx(_components.a,{href:`/api-reference/invoices/list`,children:`List Invoices`}),`. For a cancellation that does not need the receptor’s acceptance, Timbrix re-sends it every few minutes (a limited number of times) and the result usually appears on its own within a few minutes.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"statusCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`409`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"No pudimos confirmar la cancelación con el SAT. La estamos verificando: en unos minutos verás el resultado.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PAC_CANCEL_UNCONFIRMED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"suggestion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"No la canceles de nuevo con otro motivo. Reintentar es seguro: Timbrix confirma la solicitud anterior antes de enviar otra.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Do not cancel the invoice again with a different `,_jsx(_components.code,{children:`motivo`}),`. For a cancellation\nthat does not need the receptor’s acceptance, retrying the same request is\nsafe: while a request is `,_jsx(_components.code,{children:`en_proceso`}),`, Timbrix first confirms that earlier\nrequest (with its original `,_jsx(_components.code,{children:`motivo`}),`) and returns it if the SAT accepted it.\nFor a cancellation that needs the receptor’s acceptance, Timbrix does not\nre-send it automatically: the status stays `,_jsx(_components.code,{children:`en_proceso`}),` until it is confirmed,\nand retrying returns the same `,_jsx(_components.code,{children:`409`}),`.`]})}),`\n`,_jsxs(Heading,{level:`3`,id:`sat-rejection-pac_cancel_rejected`,children:[`SAT rejection (`,_jsx(_components.code,{children:`PAC_CANCEL_REJECTED`}),`)`]}),`\n`,_jsxs(_components.p,{children:[`When the SAT rejects the cancellation, the response includes the SAT’s code and text, and the invoice is `,_jsx(_components.strong,{children:`not`}),` marked as cancelled. For example, code `,_jsx(_components.code,{children:`205`}),` (the UUID does not exist at the SAT) or `,_jsx(_components.code,{children:`203`}),` (the UUID does not belong to the issuer). Fix the cause and request the cancellation again. In production, a `,_jsx(_components.code,{children:`205`}),` for a CFDI stamped very recently can also mean the SAT has not registered it yet: wait a while and try again.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"statusCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`422`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"El SAT rechazó la cancelación: UUID no existe (código 205).\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PAC_CANCEL_REJECTED\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`In sandbox, the SAT test environment always answers `,_jsx(_components.code,{children:`205`}),`. Timbrix treats that\nanswer as an accepted cancellation, so you get `,_jsx(_components.code,{children:`aceptada`}),` as in production.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`common-errors`,children:`Common Errors`}),`\n`,_jsx(Heading,{level:`3`,id:`400-bad-request`,children:`400 Bad Request`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`motivo`}),` is invalid; `,_jsx(_components.code,{children:`folioSustitucion`}),` is missing when `,_jsx(_components.code,{children:`motivo`}),` is `,_jsx(_components.code,{children:`01`}),`, is not a `,_jsx(_components.strong,{children:`vigente`}),` invoice of the same organization, or is the same invoice being cancelled; the invoice is already `,_jsx(_components.code,{children:`cancelado`}),`; or the organization has hit the daily mass-cancellation limit (Starter/Pro plans).`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"statusCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`400`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:'\"`folioSustitucion` es requerido cuando `motivo` es 01 (sustitución)\"'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BAD_REQUEST\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`401-unauthorized`,children:`401 Unauthorized`}),`\n`,_jsx(_components.p,{children:`Missing or invalid Bearer token / API key.`}),`\n`,_jsx(Heading,{level:`3`,id:`403-forbidden`,children:`403 Forbidden`}),`\n`,_jsxs(_components.p,{children:[`The authenticated user is not a member of the invoice’s organization, or the API key does not have the `,_jsx(_components.code,{children:`write:invoices`}),` scope / belongs to a different organization than the one that owns the invoice.`]}),`\n`,_jsx(Heading,{level:`3`,id:`404-not-found`,children:`404 Not Found`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`uuid`}),` does not match any invoice, or (when `,_jsx(_components.code,{children:`motivo`}),` is `,_jsx(_components.code,{children:`01`}),`) `,_jsx(_components.code,{children:`folioSustitucion`}),` does not match any invoice belonging to the same organization.`]}),`\n`,_jsx(Heading,{level:`3`,id:`409-conflict`,children:`409 Conflict`}),`\n`,_jsxs(_components.p,{children:[`A cancellation is `,_jsx(_components.code,{children:`pendiente`}),` for this invoice (waiting for the receptor). Resolve it via `,_jsx(_components.a,{href:`/api-reference/invoices/resolve-cancellation`,children:`Resolve Cancellation`}),` — or wait for the receptor to respond — before requesting another.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"statusCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`409`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Esta factura ya tiene una cancelación pendiente de resolución\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"CONFLICT\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The message reads “Esta factura ya tiene una cancelación en proceso” when another request for the same invoice is being processed at the same moment; try again once it finishes.`})]})}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":"Cancel Invoice","openapi":"POST /invoices/{uuid}/cancel","description":"Authenticate with either a Supabase session (member of the invoice's organization) or an API key belonging to that same organization. Determines automatically whether the cancellation is direct or requires receptor approval per SAT rules — Timbrix cannot confirm receptor approval in real time, so a pending cancellation must be resolved manually via the resolve endpoint.","href":"/api-reference/invoices/cancel"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Authentication","slug":"authentication","depth":2,"children":[]},{"title":"Path Parameters","slug":"path-parameters","depth":2,"children":[]},{"title":"Request Body","slug":"request-body","depth":2,"children":[{"title":"motivo codes","slug":"motivo-codes","depth":3,"children":[]}]},{"title":"Substitution flow (motivo 01)","slug":"substitution-flow-motivo-01","depth":2,"children":[]},{"title":"How eligibility is determined","slug":"how-eligibility-is-determined","depth":2,"children":[]},{"title":"Complementos de Pago","slug":"complementos-de-pago","depth":2,"children":[]},{"title":"Mass cancellation limit","slug":"mass-cancellation-limit","depth":2,"children":[]},{"title":"Example Request","slug":"example-request","depth":2,"children":[]},{"title":"Example Response","slug":"example-response","depth":2,"children":[]},{"title":"Responses","slug":"responses","depth":2,"children":[{"title":"Cancellation in progress (PAC_CANCEL_UNCONFIRMED)","slug":"cancellation-in-progress-pac_cancel_unconfirmed","depth":3,"children":[]},{"title":"SAT rejection (PAC_CANCEL_REJECTED)","slug":"sat-rejection-pac_cancel_rejected","depth":3,"children":[]}]},{"title":"Common Errors","slug":"common-errors","depth":2,"children":[{"title":"400 Bad Request","slug":"400-bad-request","depth":3,"children":[]},{"title":"401 Unauthorized","slug":"401-unauthorized","depth":3,"children":[]},{"title":"403 Forbidden","slug":"403-forbidden","depth":3,"children":[]},{"title":"404 Not Found","slug":"404-not-found","depth":3,"children":[]},{"title":"409 Conflict","slug":"409-conflict","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Authenticate with either a Supabase session (member of the invoice's organization) or an API key belonging to that same organization. Determines automatically whether the cancellation is direct or requires receptor approval per SAT rules — Timbrix cannot confirm receptor approval in real time, so a pending cancellation must be resolved manually via the resolve endpoint.","operationId":"InvoicesController_cancel","parameters":["54a4ca33-4193-4171-961d-401d502bad8a"],"requestBody":"97cdd1ff-5a0a-41bf-a77c-99801d9c0043","responses":{"201":"f8d08fda-ef29-4625-82e4-4775c307644d","400":"1ee2a021-9066-4c73-982a-7286c07c6eb7","403":"87c5a490-aff0-48c6-ac13-2183214249c4","404":"d252d429-d849-45e2-8135-fbd1f10d1b30","409":"93573931-67e6-4411-926d-c1b5b130ed01"},"security":["ef0055a3-ae9c-4174-9214-9f03dfcbb815","a6e1c4cd-c07d-4d6d-9abc-441fb110e387"],"summary":"Request cancellation of a stamped CFDI","tags":["invoices"],"method":"post","type":"path","servers":[],"path":"/invoices/{uuid}/cancel","baseUrlOptions":[],"title":"Request cancellation of a stamped CFDI","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"54a4ca33-4193-4171-961d-401d502bad8a":{"name":"uuid","required":true,"in":"path","schema":{"type":"string","isRequired":true,"uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"motivo":{"type":"string","example":"02","enum":["01","02","03","04"],"description":"01 = emitido con errores con relación (requiere folioSustitucion), 02 = emitido con errores sin relación, 03 = no se llevó a cabo la operación, 04 = operación nominativa relacionada en factura global","isRequired":true,"uniqueKey":"motivo","typeLabel":"enum\u003cstring>"},"folioSustitucion":{"type":"string","example":"d3bfbc57-44af-4390-a064-f0afab85e5df","description":"UUID fiscal del CFDI que sustituye a este. Requerido cuando motivo=01, debe ser una factura vigente de la misma organización.","uniqueKey":"folioSustitucion","typeLabel":"string"}},"required":["motivo"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"motivo":"02","folioSustitucion":"d3bfbc57-44af-4390-a064-f0afab85e5df"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"f8d08fda-ef29-4625-82e4-4775c307644d":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"invoiceId":{"type":"string","isRequired":true,"uniqueKey":"invoiceId","typeLabel":"string"},"motivo":{"type":"string","enum":["01","02","03","04"],"isRequired":true,"uniqueKey":"motivo","typeLabel":"enum\u003cstring>"},"requiresApproval":{"type":"boolean","isRequired":true,"uniqueKey":"requiresApproval","typeLabel":"boolean"},"cancellationStatus":{"type":"string","enum":["pendiente","aceptada","rechazada","en_proceso","fallida"],"isRequired":true,"uniqueKey":"cancellationStatus","typeLabel":"enum\u003cstring>"},"createdAt":{"format":"date-time","type":"string","isRequired":true,"uniqueKey":"createdAt","typeLabel":"string\u003cdate-time>"},"folioSustitucion":{"type":"object","uniqueKey":"folioSustitucion","typeLabel":"object"},"respondBy":{"type":"object","uniqueKey":"respondBy","typeLabel":"object"},"pacCodigoRespuestaSat":{"oneOf":[{"type":"object","uniqueKey":"pacCodigoRespuestaSat.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"pacCodigoRespuestaSat.oneOf.1","typeLabel":"null"}],"uniqueKey":"pacCodigoRespuestaSat","typeLabel":"object | null"},"pacCodigoRespuestaSatTexto":{"oneOf":[{"type":"object","uniqueKey":"pacCodigoRespuestaSatTexto.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"pacCodigoRespuestaSatTexto.oneOf.1","typeLabel":"null"}],"uniqueKey":"pacCodigoRespuestaSatTexto","typeLabel":"object | null"},"requestedBy":{"type":"object","uniqueKey":"requestedBy","typeLabel":"object"},"resolvedBy":{"type":"object","uniqueKey":"resolvedBy","typeLabel":"object"},"resolvedAt":{"type":"object","uniqueKey":"resolvedAt","typeLabel":"object"}},"required":["id","invoiceId","motivo","requiresApproval","cancellationStatus","createdAt"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","invoiceId":"\u003cstring>","motivo":"01","requiresApproval":true,"cancellationStatus":"pendiente","createdAt":"2023-11-07T05:31:56Z","folioSustitucion":{},"respondBy":{},"pacCodigoRespuestaSat":{},"pacCodigoRespuestaSatTexto":{},"requestedBy":{},"resolvedBy":{},"resolvedAt":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"1ee2a021-9066-4c73-982a-7286c07c6eb7":{"description":"Invalid motivo/folioSustitucion, invoice already cancelled, or mass-cancellation limit reached","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"87c5a490-aff0-48c6-ac13-2183214249c4":{"description":"Caller does not belong to the invoice's organization","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"d252d429-d849-45e2-8135-fbd1f10d1b30":{"description":"uuid does not match any invoice","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"93573931-67e6-4411-926d-c1b5b130ed01":{"description":"A cancellation is already pending for this invoice","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"ef0055a3-ae9c-4174-9214-9f03dfcbb815":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API Key for authentication (sk_test_... for sandbox, sk_live_... for production)","scopes":[],"schemeName":"apiKey"}},"a6e1c4cd-c07d-4d6d-9abc-441fb110e387":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","scopes":[],"schemeName":"bearer"}}},"servers":{},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API Key for authentication (sk_test_... for sandbox, sk_live_... for production)","scopes":[],"schemeName":"apiKey"},"schema":{"title":"X-API-Key","type":"string","description":"API Key for authentication (sk_test_... for sandbox, sk_live_... for production)","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"apiKey","name":"X-API-Key"}],"title":"apiKey"},{"schemes":[{"scheme":{"scheme":"bearer","bearerFormat":"JWT","type":"http","scopes":[],"schemeName":"bearer"},"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.timbrix.mx/api/openapi.json"},"subdomain":"timbrify","siteName":"Timbrix","title":"Cancel Invoice - Timbrix","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-10T18:28:39.994Z","originalFileLocation":"api-reference/invoices/cancel.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Authenticate with either a Supabase session (member of the invoice\u0026#x27;s organization) or an API key belonging to that same organization. Determines automatically whether the cancellation is direct or requires receptor approval per SAT rules — Timbrix cannot confirm receptor approval in real time, so a pending cancellation must be resolved manually via the resolve endpoint.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Timbrix\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/timbrify/iZomOVb_tfgoSMHM/_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/timbrify/iZomOVb_tfgoSMHM/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/timbrify/iZomOVb_tfgoSMHM/_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/timbrify/iZomOVb_tfgoSMHM/_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/timbrify/iZomOVb_tfgoSMHM/_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/timbrify/iZomOVb_tfgoSMHM/_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/timbrify/iZomOVb_tfgoSMHM/_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/timbrify/iZomOVb_tfgoSMHM/_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/timbrify/iZomOVb_tfgoSMHM/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Cancel Invoice - Timbrix\">\u003cmeta data-mint-head property=\"og:description\" content=\"Authenticate with either a Supabase session (member of the invoice\u0026#x27;s organization) or an API key belonging to that same organization. Determines automatically whether the cancellation is direct or requires receptor approval per SAT rules — Timbrix cannot confirm receptor approval in real time, so a pending cancellation must be resolved manually via the resolve endpoint.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Timbrix\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.timbrix.mx/api-reference/invoices/cancel\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://timbrify.mintlify.site/_mintlify/api/og/v2?division=Invoices\u0026amp;title=Cancel+Invoice\u0026amp;description=Authenticate+with+either+a+Supabase+session+%28member+of+the+invoice%27s+organization%29+or+an+API+key+belonging+to+that+same+organization.+Determines+automatically+w\u0026amp;theme=826df6b90d7e3e43c048463d\u0026amp;signature=bdd293cf8f269e3a151d7c45fbf2b3934ee8c07ef35f83f336704b154c532117\">\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=\"Cancel Invoice - Timbrix\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Authenticate with either a Supabase session (member of the invoice\u0026#x27;s organization) or an API key belonging to that same organization. Determines automatically whether the cancellation is direct or requires receptor approval per SAT rules — Timbrix cannot confirm receptor approval in real time, so a pending cancellation must be resolved manually via the resolve endpoint.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://timbrify.mintlify.site/_mintlify/api/og/v2?division=Invoices\u0026amp;title=Cancel+Invoice\u0026amp;description=Authenticate+with+either+a+Supabase+session+%28member+of+the+invoice%27s+organization%29+or+an+API+key+belonging+to+that+same+organization.+Determines+automatically+w\u0026amp;theme=826df6b90d7e3e43c048463d\u0026amp;signature=bdd293cf8f269e3a151d7c45fbf2b3934ee8c07ef35f83f336704b154c532117\">\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/timbrify/iZomOVb_tfgoSMHM/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Timbrix\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#000000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.timbrix.mx/api-reference/invoices/cancel\">\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/cancel.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.timbrix.mx/#organization\",\"name\":\"Timbrix\",\"url\":\"https://docs.timbrix.mx\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/timbrify/gNpyqvpwohEXPk52/logo/light.svg?fit=max\u0026auto=format\u0026n=gNpyqvpwohEXPk52\u0026q=85\u0026s=83b6a3e733e09f30ee340a5350b73212\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.timbrix.mx#website\",\"name\":\"Timbrix\",\"url\":\"https://docs.timbrix.mx\",\"publisher\":{\"@id\":\"https://docs.timbrix.mx/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.timbrix.mx/api-reference/invoices/cancel#webpage\",\"url\":\"https://docs.timbrix.mx/api-reference/invoices/cancel\",\"name\":\"Cancel Invoice\",\"description\":\"Authenticate with either a Supabase session (member of the invoice's organization) or an API key belonging to that same organization. Determines automatically whether the cancellation is direct or requires receptor approval per SAT rules — Timbrix cannot confirm receptor approval in real time, so a pending cancellation must be resolved manually via the resolve endpoint.\",\"dateModified\":\"2026-11-10T18:28:39.994Z\",\"isPartOf\":{\"@id\":\"https://docs.timbrix.mx#website\"},\"breadcrumb\":{\"@id\":\"https://docs.timbrix.mx/api-reference/invoices/cancel#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.timbrix.mx/api-reference/invoices/cancel#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Invoices\",\"item\":\"https://docs.timbrix.mx/api-reference/invoices/list\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cancel Invoice\",\"item\":\"https://docs.timbrix.mx/api-reference/invoices/cancel\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.timbrix.mx/api-reference/invoices/cancel#apireference\",\"headline\":\"Cancel Invoice\",\"name\":\"Cancel Invoice\",\"description\":\"Authenticate with either a Supabase session (member of the invoice's organization) or an API key belonging to that same organization. Determines automatically whether the cancellation is direct or requires receptor approval per SAT rules — Timbrix cannot confirm receptor approval in real time, so a pending cancellation must be resolved manually via the resolve endpoint.\",\"url\":\"https://docs.timbrix.mx/api-reference/invoices/cancel\",\"mainEntityOfPage\":{\"@id\":\"https://docs.timbrix.mx/api-reference/invoices/cancel#webpage\"},\"dateModified\":\"2026-11-10T18:28:39.994Z\",\"publisher\":{\"@id\":\"https://docs.timbrix.mx/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.timbrix.mx#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Timbrix\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Timbrix\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/invoices/cancel.md","siteName":"Timbrix","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"Agentes de IA","pages":[{"title":"Agentes de IA","href":"/ai-agents"}]},{"tab":"API reference","groups":[{"group":"API documentation","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"group":"Organizations","pages":[{"title":"Create Organization","openapi":"POST /organizations","href":"/api-reference/organizations/create"},{"title":"Get Organization","openapi":"GET /organizations/{id}","href":"/api-reference/organizations/get"},{"title":"Update Organization","openapi":"PUT /organizations/{id}","href":"/api-reference/organizations/update"},{"title":"Update Legal Data","api":"PUT /organizations/{id}/legal","href":"/api-reference/organizations/update-legal-data"},{"title":"Upload Certificates","api":"PUT /organizations/{id}/certificates","href":"/api-reference/organizations/upload-certificates"},{"title":"Delete Certificates","api":"DELETE /organizations/{id}/certificates","href":"/api-reference/organizations/delete-certificates"},{"title":"Close Preview","openapi":"GET /organizations/{id}/close-preview","href":"/api-reference/organizations/close-preview"},{"title":"Delete Organization","openapi":"DELETE /organizations/{id}","href":"/api-reference/organizations/delete"},{"title":"Reopen Organization","openapi":"POST /organizations/{id}/reopen","href":"/api-reference/organizations/reopen"},{"title":"Transfer Ownership","openapi":"POST /organizations/{id}/transfer-ownership","href":"/api-reference/organizations/transfer-ownership"}]},{"group":"Members","pages":[{"title":"List Members","openapi":"GET /organizations/{id}/members","href":"/api-reference/members/list"},{"title":"Invite Member","openapi":"POST /organizations/{id}/members/invite","href":"/api-reference/members/invite"},{"title":"Update Member Role","openapi":"PUT /organizations/{id}/members/{memberId}/role","href":"/api-reference/members/update-role"},{"title":"Remove Member","openapi":"DELETE /organizations/{id}/members/{memberId}","href":"/api-reference/members/remove"}]},{"group":"Invites","pages":[{"title":"List Invites","openapi":"GET /organizations/{id}/invites","href":"/api-reference/invites/list"},{"title":"Cancel Invite","openapi":"DELETE /organizations/{id}/invites/{inviteId}","href":"/api-reference/invites/cancel"}]},{"group":"Auth","pages":[{"title":"Login","openapi":"POST /auth/login","href":"/api-reference/auth/login"},{"title":"Logout","openapi":"POST /auth/logout","href":"/api-reference/auth/logout"}]},{"group":"OAuth","pages":[{"title":"Create OAuth Application","openapi":"POST /oauth/apps","href":"/api-reference/oauth/create-app"},{"title":"List OAuth Applications","openapi":"GET /oauth/apps/organization/{organizationId}","href":"/api-reference/oauth/list-apps"},{"title":"Get OAuth Application","openapi":"GET /oauth/apps/{clientId}","href":"/api-reference/oauth/get-app"},{"title":"Update OAuth Application","openapi":"PUT /oauth/apps/{clientId}","href":"/api-reference/oauth/update-app"},{"title":"Delete OAuth Application","openapi":"DELETE /oauth/apps/{clientId}","href":"/api-reference/oauth/delete-app"},{"title":"Authorization Endpoint","openapi":"GET /oauth/authorize","href":"/api-reference/oauth/authorize"},{"title":"Generate OAuth Access Token","openapi":"POST /oauth/token","href":"/api-reference/oauth/token"},{"title":"Exchange Authorization Code","openapi":"POST /oauth/token/exchange","href":"/api-reference/oauth/exchange"},{"title":"Refresh OAuth Token","openapi":"POST /oauth/token/refresh","href":"/api-reference/oauth/refresh"},{"title":"List OAuth Tokens","openapi":"GET /oauth/apps/{clientId}/tokens","href":"/api-reference/oauth/list-tokens"},{"title":"Revoke OAuth Token","openapi":"DELETE /oauth/token/{tokenId}","href":"/api-reference/oauth/revoke"}]},{"group":"Customers","pages":[{"title":"List Customers","openapi":"GET /customers","href":"/api-reference/customers/list"},{"title":"Create Customer","openapi":"POST /customers","href":"/api-reference/customers/create"},{"title":"Get Customer","openapi":"GET /customers/{customerId}","href":"/api-reference/customers/get"},{"title":"Update Customer","openapi":"PUT /customers/{customerId}","href":"/api-reference/customers/update"},{"title":"Delete Customer","openapi":"DELETE /customers/{customerId}","href":"/api-reference/customers/delete"}]},{"group":"SAT Catalogs","pages":[{"title":"SAT Catalogs","href":"/api-reference/sat-catalogs"}]},{"group":"Invoices","pages":[{"title":"List Invoices","openapi":"GET /invoices","href":"/api-reference/invoices/list"},{"title":"Get Invoice","openapi":"GET /invoices/{uuid}","href":"/api-reference/invoices/get"},{"title":"Download Invoice XML","openapi":"GET /invoices/{uuid}/xml","href":"/api-reference/invoices/download-xml"},{"title":"Download Cancellation Receipt","openapi":"GET /invoices/{uuid}/cancellation-receipt","href":"/api-reference/invoices/download-cancellation-receipt"},{"title":"Download Invoice PDF","openapi":"GET /invoices/{uuid}/pdf","href":"/api-reference/invoices/download-pdf"},{"title":"Create Invoice","openapi":"POST /invoices","href":"/api-reference/invoices/create"},{"title":"Register Payment (Complemento de Pago)","openapi":"POST /invoices/payments","href":"/api-reference/invoices/register-payment"},{"title":"Get Payments","openapi":"GET /invoices/{uuid}/payments","href":"/api-reference/invoices/get-payments"},{"title":"Preview Invoice PDF","openapi":"POST /invoices/preview/pdf","description":"Accepts the exact same request body as `POST /invoices`, runs the exact same catalog/CFDI 4.0 validations, but never timbra (no PAC call) and never persists anything — no invoice, no cuota consumida, no idempotencyKey handling. Returns a PDF clearly marked as 'VISTA PREVIA — NO VÁLIDO FISCALMENTE' so it can never be confused with a real representación impresa.","href":"/api-reference/invoices/preview-pdf"},{"title":"Cancel Invoice","openapi":"POST /invoices/{uuid}/cancel","href":"/api-reference/invoices/cancel"},{"title":"Resolve Cancellation","openapi":"POST /invoices/{uuid}/cancellations/{cancellationId}/resolve","description":"Timbrix cannot query SAT in real time for the receptor's response — call this once you've confirmed the outcome via the SAT portal.","href":"/api-reference/invoices/resolve-cancellation"},{"title":"List Invoice Cancellations","openapi":"GET /invoices/{uuid}/cancellations","href":"/api-reference/invoices/list-cancellations"},{"title":"Email Invoice","openapi":"POST /invoices/{uuid}/email","href":"/api-reference/invoices/email"},{"title":"Get CFDI Usage","openapi":"GET /usage","href":"/api-reference/invoices/usage"},{"title":"Get Invoice Report Summary","openapi":"GET /invoices/report/summary","href":"/api-reference/invoices/report-summary"},{"title":"Export Invoices as CSV","openapi":"GET /invoices/report/export.csv","href":"/api-reference/invoices/export-csv"},{"title":"Export Invoices as XML ZIP","openapi":"GET /invoices/report/export/xml.zip","href":"/api-reference/invoices/export-xml"},{"title":"Export Invoices as PDF ZIP","openapi":"GET /invoices/report/export/pdf.zip","href":"/api-reference/invoices/export-pdf"}]},{"group":"Request logs","pages":[{"title":"List Request Logs","openapi":"GET /request-logs","href":"/api-reference/request-logs/list"},{"title":"Request stats","openapi":"GET /request-logs/stats","href":"/api-reference/request-logs/stats"},{"title":"Get Request Log","openapi":"GET /request-logs/{id}","href":"/api-reference/request-logs/get"}]},{"group":"Audit log","pages":[{"title":"List Audit Log Entries","openapi":"GET /audit-logs","href":"/api-reference/audit-logs/list"},{"title":"Get Audit Log Entry","openapi":"GET /audit-logs/{id}","href":"/api-reference/audit-logs/get"},{"title":"Export Audit Log as CSV","openapi":"GET /audit-logs/export.csv","href":"/api-reference/audit-logs/export"},{"title":"Verify Audit Log Integrity","openapi":"GET /audit-logs/verify","href":"/api-reference/audit-logs/verify"}]},{"group":"Products","pages":[{"title":"List Products","openapi":"GET /products","href":"/api-reference/products/list"},{"title":"Create Product","openapi":"POST /products","href":"/api-reference/products/create"},{"title":"Import Products from CSV","openapi":"POST /products/import","href":"/api-reference/products/import"},{"title":"Get Product","openapi":"GET /products/{productId}","href":"/api-reference/products/get"},{"title":"Update Product","openapi":"PUT /products/{productId}","href":"/api-reference/products/update"},{"title":"Delete Product","openapi":"DELETE /products/{productId}","href":"/api-reference/products/delete"}]},{"group":"Users","pages":[{"title":"Get Current User","openapi":"GET /users/me","href":"/api-reference/users/me"},{"title":"Get User by ID","openapi":"GET /users/{id}","href":"/api-reference/users/get"},{"title":"Get User by Email","openapi":"GET /users/email/{email}","href":"/api-reference/users/get-by-email"},{"title":"Get User Organizations","openapi":"GET /users/{id}/organizations","href":"/api-reference/users/organizations"},{"title":"Delete My Account","openapi":"DELETE /users/me","href":"/api-reference/users/delete-me"}]},{"group":"Webhooks","pages":[{"title":"List Organization Webhooks","openapi":"GET /organizations/{organizationId}/webhooks","href":"/api-reference/webhooks/list"},{"title":"Create Webhook","openapi":"POST /organizations/{organizationId}/webhooks","href":"/api-reference/webhooks/create"},{"title":"Get Webhook by ID","openapi":"GET /organizations/{organizationId}/webhooks/{id}","href":"/api-reference/webhooks/get"},{"title":"Update Webhook","openapi":"PUT /organizations/{organizationId}/webhooks/{id}","href":"/api-reference/webhooks/update"},{"title":"Delete Webhook","openapi":"DELETE /organizations/{organizationId}/webhooks/{id}","href":"/api-reference/webhooks/delete"},{"title":"Get Webhook Delivery History","openapi":"GET /organizations/{organizationId}/webhooks/{id}/deliveries","href":"/api-reference/webhooks/deliveries"},{"title":"Send Test Webhook","openapi":"POST /organizations/{organizationId}/webhooks/{id}/test","href":"/api-reference/webhooks/test"}]},{"group":"Series","pages":[{"title":"List Series","openapi":"GET /organizations/{organizationId}/series","href":"/api-reference/series/list"},{"title":"Create Series","openapi":"POST /organizations/{organizationId}/series","href":"/api-reference/series/create"},{"title":"Update Series","openapi":"PUT /organizations/{organizationId}/series/{series}","href":"/api-reference/series/update"},{"title":"Delete Series","openapi":"DELETE /organizations/{organizationId}/series/{series}","href":"/api-reference/series/delete"},{"title":"Set Default Series","openapi":"PUT /organizations/{organizationId}/default-series","href":"/api-reference/series/set-default"}]},{"group":"API Keys","pages":[{"title":"List API Keys","openapi":"GET /organizations/{organizationId}/api-keys","href":"/api-reference/api-keys/list"},{"title":"Create API Key","openapi":"POST /organizations/{organizationId}/api-keys","href":"/api-reference/api-keys/create"},{"title":"Get API Key","openapi":"GET /organizations/{organizationId}/api-keys/{id}","href":"/api-reference/api-keys/get"},{"title":"Update API Key","openapi":"PUT /organizations/{organizationId}/api-keys/{id}","href":"/api-reference/api-keys/update"},{"title":"Delete API Key","openapi":"DELETE /organizations/{organizationId}/api-keys/{id}","href":"/api-reference/api-keys/delete"},{"title":"Get API Key Statistics","openapi":"GET /organizations/{organizationId}/api-keys/stats","href":"/api-reference/api-keys/stats"},{"title":"Validate API Key","openapi":"POST /api-keys/validate","href":"/api-reference/api-keys/validate"}]},{"group":"organizations","pages":[{"title":"Create a new organization","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /organizations","href":"/api-reference/organizations/create-a-new-organization"},{"title":"Validate CSD certificate and optionally verify private key password","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /organizations/certificates/validate","href":"/api-reference/organizations/validate-csd-certificate-and-optionally-verify-private-key-password"},{"title":"Get organization by ID","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /organizations/{id}","href":"/api-reference/organizations/get-organization-by-id"},{"title":"Update organization (owner only)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json put /organizations/{id}","href":"/api-reference/organizations/update-organization-owner-only"},{"title":"Delete or close organization (owner only)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json delete /organizations/{id}","href":"/api-reference/organizations/delete-or-close-organization-owner-only"},{"title":"Update organization legal/fiscal data (owner only)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json put /organizations/{id}/legal","href":"/api-reference/organizations/update-organization-legalfiscal-data-owner-only"},{"title":"Upload CSD certificate (owner only)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json put /organizations/{id}/certificates","href":"/api-reference/organizations/upload-csd-certificate-owner-only"},{"title":"Delete CSD certificates (owner only)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json delete /organizations/{id}/certificates","href":"/api-reference/organizations/delete-csd-certificates-owner-only"},{"title":"Preview deleting or closing the organization (owner only)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /organizations/{id}/close-preview","href":"/api-reference/organizations/preview-deleting-or-closing-the-organization-owner-only"},{"title":"Reopen a closed organization (owner only)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /organizations/{id}/reopen","href":"/api-reference/organizations/reopen-a-closed-organization-owner-only"},{"title":"Transfer organization ownership (owner only)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /organizations/{id}/transfer-ownership","href":"/api-reference/organizations/transfer-organization-ownership-owner-only"},{"title":"Get organization members","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /organizations/{id}/members","href":"/api-reference/organizations/get-organization-members"},{"title":"Invite a member (owner/admin only)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /organizations/{id}/members/invite","href":"/api-reference/organizations/invite-a-member-owneradmin-only"},{"title":"Remove a member (owner/admin only)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json delete /organizations/{id}/members/{memberId}","href":"/api-reference/organizations/remove-a-member-owneradmin-only"},{"title":"Update member role (owner/admin only)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json put /organizations/{id}/members/{memberId}/role","href":"/api-reference/organizations/update-member-role-owneradmin-only"},{"title":"Get pending invitations","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /organizations/{id}/invites","href":"/api-reference/organizations/get-pending-invitations"},{"title":"Cancel an invitation (owner/admin only)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json delete /organizations/{id}/invites/{inviteId}","href":"/api-reference/organizations/cancel-an-invitation-owneradmin-only"}]},{"group":"users","pages":[{"title":"Get current authenticated user","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /users/me","href":"/api-reference/users/get-current-authenticated-user"},{"title":"Delete my account","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json delete /users/me","href":"/api-reference/users/delete-my-account"},{"title":"Get user by ID","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /users/{id}","href":"/api-reference/users/get-user-by-id"},{"title":"Get user organizations","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /users/{id}/organizations","href":"/api-reference/users/get-user-organizations"},{"title":"Get user by email","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /users/email/{email}","href":"/api-reference/users/get-user-by-email"}]},{"group":"api-keys","pages":[{"title":"List organization API keys","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /organizations/{organizationId}/api-keys","href":"/api-reference/api-keys/list-organization-api-keys"},{"title":"Create API key","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /organizations/{organizationId}/api-keys","href":"/api-reference/api-keys/create-api-key"},{"title":"Get API key statistics","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /organizations/{organizationId}/api-keys/stats","href":"/api-reference/api-keys/get-api-key-statistics"},{"title":"Get API key by ID","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /organizations/{organizationId}/api-keys/{id}","href":"/api-reference/api-keys/get-api-key-by-id"},{"title":"Update API key","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json put /organizations/{organizationId}/api-keys/{id}","href":"/api-reference/api-keys/update-api-key"},{"title":"Delete API key","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json delete /organizations/{organizationId}/api-keys/{id}","href":"/api-reference/api-keys/delete-api-key"},{"title":"Validate API key","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /api-keys/validate","href":"/api-reference/api-keys/validate-api-key"}]},{"group":"series","pages":[{"title":"List the organization's series and folios","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /organizations/{organizationId}/series","href":"/api-reference/series/list-the-organizations-series-and-folios"},{"title":"Create a series","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /organizations/{organizationId}/series","href":"/api-reference/series/create-a-series"},{"title":"Set the default series of a voucher type","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json put /organizations/{organizationId}/default-series","href":"/api-reference/series/set-the-default-series-of-a-voucher-type"},{"title":"Update the next folio of a series","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json put /organizations/{organizationId}/series/{series}","href":"/api-reference/series/update-the-next-folio-of-a-series"},{"title":"Delete a series","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json delete /organizations/{organizationId}/series/{series}","href":"/api-reference/series/delete-a-series"}]},{"group":"oauth","pages":[{"title":"Create a new OAuth application","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /oauth/apps","href":"/api-reference/oauth/create-a-new-oauth-application"},{"title":"Get OAuth application by client ID","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /oauth/apps/{clientId}","href":"/api-reference/oauth/get-oauth-application-by-client-id"},{"title":"Update OAuth application","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json put /oauth/apps/{clientId}","href":"/api-reference/oauth/update-oauth-application"},{"title":"Delete OAuth application","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json delete /oauth/apps/{clientId}","href":"/api-reference/oauth/delete-oauth-application"},{"title":"List OAuth applications for organization","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /oauth/apps/organization/{organizationId}","href":"/api-reference/oauth/list-oauth-applications-for-organization"},{"title":"Generate OAuth access token","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /oauth/token","href":"/api-reference/oauth/generate-oauth-access-token"},{"title":"OAuth2 Authorization Endpoint (redirects to consent screen)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /oauth/authorize","href":"/api-reference/oauth/oauth2-authorization-endpoint-redirects-to-consent-screen"},{"title":"Get authorization details for consent screen","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /oauth/authorize/details","href":"/api-reference/oauth/get-authorization-details-for-consent-screen"},{"title":"Approve authorization and generate code","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /oauth/authorize/approve","href":"/api-reference/oauth/approve-authorization-and-generate-code"},{"title":"Deny authorization request","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /oauth/authorize/deny","href":"/api-reference/oauth/deny-authorization-request"},{"title":"Exchange authorization code for access token","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /oauth/token/exchange","href":"/api-reference/oauth/exchange-authorization-code-for-access-token"},{"title":"Refresh OAuth access token","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /oauth/token/refresh","href":"/api-reference/oauth/refresh-oauth-access-token"},{"title":"Revoke access token","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json delete /oauth/token/{tokenId}","href":"/api-reference/oauth/revoke-access-token"},{"title":"List tokens for OAuth application","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /oauth/apps/{clientId}/tokens","href":"/api-reference/oauth/list-tokens-for-oauth-application"}]},{"group":"monitoring","pages":[{"title":"Health check endpoint","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /health","href":"/api-reference/monitoring/health-check-endpoint"},{"title":"Readiness check","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /health/ready","href":"/api-reference/monitoring/readiness-check"},{"title":"Liveness check","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /health/live","href":"/api-reference/monitoring/liveness-check"},{"title":"Sandbox PAC reachability","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /health/pac-sandbox","href":"/api-reference/monitoring/sandbox-pac-reachability"}]},{"group":"auth","pages":[{"title":"Iniciar sesión con email y contraseña","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /auth/login","href":"/api-reference/auth/iniciar-sesión-con-email-y-contraseña"},{"title":"Cerrar sesión","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /auth/logout","href":"/api-reference/auth/cerrar-sesión"}]},{"group":"customers","pages":[{"title":"List customers for an organization","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /customers","href":"/api-reference/customers/list-customers-for-an-organization"},{"title":"Create a customer","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /customers","href":"/api-reference/customers/create-a-customer"},{"title":"Get a customer by ID","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /customers/{customerId}","href":"/api-reference/customers/get-a-customer-by-id"},{"title":"Update a customer","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json put /customers/{customerId}","href":"/api-reference/customers/update-a-customer"},{"title":"Delete a customer","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json delete /customers/{customerId}","href":"/api-reference/customers/delete-a-customer"}]},{"group":"products","pages":[{"title":"List products for an organization","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /products","href":"/api-reference/products/list-products-for-an-organization"},{"title":"Create a product or service","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /products","href":"/api-reference/products/create-a-product-or-service"},{"title":"Bulk import products/services from a CSV file","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /products/import","href":"/api-reference/products/bulk-import-productsservices-from-a-csv-file"},{"title":"Get a product by ID","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /products/{productId}","href":"/api-reference/products/get-a-product-by-id"},{"title":"Update a product","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json put /products/{productId}","href":"/api-reference/products/update-a-product"},{"title":"Delete a product","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json delete /products/{productId}","href":"/api-reference/products/delete-a-product"}]},{"group":"sat","pages":[{"title":"Listar regímenes fiscales SAT (c_RegimenFiscal)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /sat/regimenes-fiscales","href":"/api-reference/sat/listar-regímenes-fiscales-sat-c_regimenfiscal"},{"title":"Listar usos de CFDI SAT (c_UsoCFDI)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /sat/usos-cfdi","href":"/api-reference/sat/listar-usos-de-cfdi-sat-c_usocfdi"},{"title":"Buscar claves de producto o servicio SAT (c_ClaveProdServ)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /sat/claves-prod-serv","href":"/api-reference/sat/buscar-claves-de-producto-o-servicio-sat-c_claveprodserv"},{"title":"Buscar claves de unidad de medida SAT (c_ClaveUnidad)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /sat/claves-unidad","href":"/api-reference/sat/buscar-claves-de-unidad-de-medida-sat-c_claveunidad"}]},{"group":"webhooks","pages":[{"title":"List organization webhooks","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /organizations/{organizationId}/webhooks","href":"/api-reference/webhooks/list-organization-webhooks"},{"title":"Create a new webhook","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /organizations/{organizationId}/webhooks","href":"/api-reference/webhooks/create-a-new-webhook"},{"title":"Get webhook by ID","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /organizations/{organizationId}/webhooks/{id}","href":"/api-reference/webhooks/get-webhook-by-id"},{"title":"Update webhook","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json put /organizations/{organizationId}/webhooks/{id}","href":"/api-reference/webhooks/update-webhook"},{"title":"Delete webhook","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json delete /organizations/{organizationId}/webhooks/{id}","href":"/api-reference/webhooks/delete-webhook"},{"title":"Get webhook delivery history","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /organizations/{organizationId}/webhooks/{id}/deliveries","href":"/api-reference/webhooks/get-webhook-delivery-history"},{"title":"Send test webhook","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /organizations/{organizationId}/webhooks/{id}/test","href":"/api-reference/webhooks/send-test-webhook"}]},{"group":"invoices","pages":[{"title":"List invoices for the organization","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /invoices","href":"/api-reference/invoices/list-invoices-for-the-organization"},{"title":"Create and stamp a CFDI 4.0 invoice via the configured PAC","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /invoices","href":"/api-reference/invoices/create-and-stamp-a-cfdi-40-invoice-via-the-configured-pac"},{"title":"Register a payment of PPD invoices and stamp its Complemento de Pago (CFDI tipo P)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /invoices/payments","href":"/api-reference/invoices/register-a-payment-of-ppd-invoices-and-stamp-its-complemento-de-pago-cfdi-tipo-p"},{"title":"Preview a CFDI 4.0 invoice as an unstamped PDF","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /invoices/preview/pdf","href":"/api-reference/invoices/preview-a-cfdi-40-invoice-as-an-unstamped-pdf"},{"title":"Get CFDI usage/quota for the current billing month","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /usage","href":"/api-reference/invoices/get-cfdi-usagequota-for-the-current-billing-month"},{"title":"Get a fiscal totals summary for a filtered set of invoices","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /invoices/report/summary","href":"/api-reference/invoices/get-a-fiscal-totals-summary-for-a-filtered-set-of-invoices"},{"title":"Export a filtered set of invoices as CSV","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /invoices/report/export.csv","href":"/api-reference/invoices/export-a-filtered-set-of-invoices-as-csv"},{"title":"Export a filtered set of invoices as a ZIP of their stamped XML","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /invoices/report/export/xml.zip","href":"/api-reference/invoices/export-a-filtered-set-of-invoices-as-a-zip-of-their-stamped-xml"},{"title":"Export a filtered set of invoices as a ZIP of their PDF representation","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /invoices/report/export/pdf.zip","href":"/api-reference/invoices/export-a-filtered-set-of-invoices-as-a-zip-of-their-pdf-representation"},{"title":"Request cancellation of a stamped CFDI","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /invoices/{uuid}/cancel","href":"/api-reference/invoices/request-cancellation-of-a-stamped-cfdi"},{"title":"Manually confirm the outcome of a pending cancellation","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /invoices/{uuid}/cancellations/{cancellationId}/resolve","href":"/api-reference/invoices/manually-confirm-the-outcome-of-a-pending-cancellation"},{"title":"List the cancellation history for an invoice","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /invoices/{uuid}/cancellations","href":"/api-reference/invoices/list-the-cancellation-history-for-an-invoice"},{"title":"Get the installments and balance of a PPD invoice","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /invoices/{uuid}/payments","href":"/api-reference/invoices/get-the-installments-and-balance-of-a-ppd-invoice"},{"title":"Get a single stamped CFDI by its folio fiscal UUID","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /invoices/{uuid}","href":"/api-reference/invoices/get-a-single-stamped-cfdi-by-its-folio-fiscal-uuid"},{"title":"Download the stamped CFDI XML","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /invoices/{uuid}/xml","href":"/api-reference/invoices/download-the-stamped-cfdi-xml"},{"title":"Download the CFDI's representación impresa (PDF)","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /invoices/{uuid}/pdf","href":"/api-reference/invoices/download-the-cfdis-representación-impresa-pdf"},{"title":"Send the CFDI (XML + PDF) by email to the receptor","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /invoices/{uuid}/email","href":"/api-reference/invoices/send-the-cfdi-xml-+-pdf-by-email-to-the-receptor"}]},{"group":"partners","pages":[{"title":"Get the current organization's partner enrollment","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /organizations/{organizationId}/partners","href":"/api-reference/partners/get-the-current-organizations-partner-enrollment"},{"title":"Enroll the current organization as a referral partner","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /organizations/{organizationId}/partners/enroll","href":"/api-reference/partners/enroll-the-current-organization-as-a-referral-partner"},{"title":"List referred client organizations for this partner","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /organizations/{organizationId}/partners/referrals","href":"/api-reference/partners/list-referred-client-organizations-for-this-partner"},{"title":"List this partner's monthly commission ledger","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /organizations/{organizationId}/partners/commissions","href":"/api-reference/partners/list-this-partners-monthly-commission-ledger"},{"title":"Check whether a referral code is valid and active","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /partners/validate-code","href":"/api-reference/partners/check-whether-a-referral-code-is-valid-and-active"}]},{"group":"partners-admin","pages":[{"title":"Mark a set of accrued commissions as paid","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json post /partners/commissions/mark-paid","href":"/api-reference/partners-admin/mark-a-set-of-accrued-commissions-as-paid"}]},{"group":"request-logs","pages":[{"title":"List API requests","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /request-logs","href":"/api-reference/request-logs/list-api-requests"},{"title":"Request counts over time","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /request-logs/stats","href":"/api-reference/request-logs/request-counts-over-time"},{"title":"Get one API request, including its error body","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /request-logs/{id}","href":"/api-reference/request-logs/get-one-api-request-including-its-error-body"}]},{"group":"audit-logs","pages":[{"title":"List audit log entries","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /audit-logs","href":"/api-reference/audit-logs/list-audit-log-entries"},{"title":"Export audit log entries as CSV","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /audit-logs/export.csv","href":"/api-reference/audit-logs/export-audit-log-entries-as-csv"},{"title":"Verify the audit log hash chain","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /audit-logs/verify","href":"/api-reference/audit-logs/verify-the-audit-log-hash-chain"},{"title":"Get one audit log entry","deprecated":null,"version":null,"openapi":"https://api.timbrix.mx/api/openapi.json get /audit-logs/{id}","href":"/api-reference/audit-logs/get-one-audit-log-entry"}]}]}]},"basePath":"","title":"Cancel Invoice - Timbrix","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CiUHMMOm.js","snippetPresets-BgfXU7Bw.js","utils-DWvOwgy_.js","style-to-object-BY3JEAdk.js","utils-BN7RXSMJ.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CFw8bq89.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CAwdfOU2.js","_Uint8Array-BJr8e-ZL.js","isObject-FP1Yky1u.js","ApiExamples-XX0UgMZK.js","usePlaygroundInputsStore-DXDFSa1V.js","shallow-CdX5aREi.js","isEqual-CoOaxexF.js","CodeSnippets-Cg2wpzWm.js","CodeSnippet-D_HwgQO_.js","getApiPlaygroundDisplay-CmCoerhe.js","Page-CVJ-f_k1.js","DynamicMarkdown-CQM9Bhbv.js","SectionHeading-DpbrP8nQ.js","icon-BPCgijHy.js","MethodPill-GQ8DuY0c.js","getPastedJson-Cb5mT31m.js","Check2Icon-a7bUI6e8.js","axios-CsQoIw0U.js","Markdown-CX2QY19L.js","AssistantPageLink-CY3bFglh.js","dist-Dl6_zDnT.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}