{ "id": "0f2a1c3e-1a2b-4c3d-9e8f-1234567890ab", "uuid": "d3bfbc57-44af-4390-a064-f0afab85e5df", "status": "vigente", "cancellationStatus": "pendiente", "cancellationDesynced": false, "type": "I", "series": "A", "folioNumber": "1", "total": 116, "date": "2026-07-30T22:50:00", "xml": "<string>", "createdAt": "2026-07-30T22:50:03.412Z", "environment": "production", "channel": "mcp", "rfcReceptor": "GODE561231GR8", "relatedCfdis": [ { "type": "04", "uuids": [ "D3BFBC57-44AF-4390-A064-F0AFAB85E5DF" ] } ], "substitutedBy": [ { "uuid": "6F2B1C9A-3D4E-4F5A-8B7C-9D0E1F2A3B4C", "serie": "A", "folio": "124", "status": "vigente" } ], "paymentMethod": "PPD", "balance": 160, "payment": { "date": "2026-10-15T12:00:00", "paymentForm": "03", "currency": "MXN", "exchange": 1, "amount": 1660, "operationNumber": "SPEI-123", "documents": [ { "invoiceUuid": "d3bfbc57-44af-4390-a064-f0afab85e5df", "installment": 2, "previousBalance": 660, "amountPaid": 500, "remainingBalance": 160 } ] }, "warnings": [ { "code": "RFC_69B_PRESUNTO", "rfc": "AAA010101AAA", "role": "receptor", "message": "El RFC del receptor AAA010101AAA aparece como Presunto en la lista 69-B del SAT (publicado el 25 de junio de 2018). Revisa la operación antes de continuar." } ]}
Invoices
Create Invoice
Authenticate with either a Supabase session (send the X-Organization-Id header, must be a member of that organization) or an API key (external integrations, requires the write:invoices scope — the organization is resolved from the key). The customer can be sent inline (customer) or referenced by ID (customerId).
POST
/
invoices
Create and stamp a CFDI 4.0 invoice via the configured PAC
{ "id": "0f2a1c3e-1a2b-4c3d-9e8f-1234567890ab", "uuid": "d3bfbc57-44af-4390-a064-f0afab85e5df", "status": "vigente", "cancellationStatus": "pendiente", "cancellationDesynced": false, "type": "I", "series": "A", "folioNumber": "1", "total": 116, "date": "2026-07-30T22:50:00", "xml": "<string>", "createdAt": "2026-07-30T22:50:03.412Z", "environment": "production", "channel": "mcp", "rfcReceptor": "GODE561231GR8", "relatedCfdis": [ { "type": "04", "uuids": [ "D3BFBC57-44AF-4390-A064-F0AFAB85E5DF" ] } ], "substitutedBy": [ { "uuid": "6F2B1C9A-3D4E-4F5A-8B7C-9D0E1F2A3B4C", "serie": "A", "folio": "124", "status": "vigente" } ], "paymentMethod": "PPD", "balance": 160, "payment": { "date": "2026-10-15T12:00:00", "paymentForm": "03", "currency": "MXN", "exchange": 1, "amount": 1660, "operationNumber": "SPEI-123", "documents": [ { "invoiceUuid": "d3bfbc57-44af-4390-a064-f0afab85e5df", "installment": 2, "previousBalance": 660, "amountPaid": 500, "remainingBalance": 160 } ] }, "warnings": [ { "code": "RFC_69B_PRESUNTO", "rfc": "AAA010101AAA", "role": "receptor", "message": "El RFC del receptor AAA010101AAA aparece como Presunto en la lista 69-B del SAT (publicado el 25 de junio de 2018). Revisa la operación antes de continuar." } ]}
Builds, validates, and stamps (timbra) a CFDI 4.0 invoice through the configured PAC (Proveedor Autorizado de Certificación) in a single call. On success, the invoice is fiscally valid at the SAT and is recorded in the organization’s invoice history.
This endpoint takes no organizationId in the URL. Authenticate with either a Supabase Bearer session (send the X-Organization-Id: <org-id> header — the user must be a member of that organization) or an API key (the organization resolves automatically from the key; any X-Organization-Id header sent alongside an API key is ignored).
A Supabase Bearer session (Authorization: Bearer <token>) with the X-Organization-Id: <org-id> header — the authenticated user must be a member of that organization.
An API key (X-API-Key: sk_...) with the write:invoices scope — the organization is resolved from the key itself.
The issuer (RFC, legal name, régimen fiscal, ZIP) is resolved from the organization’s fiscal profile (PUT /organizations/:organizationId/legal) — configure that before creating your first invoice, or this endpoint returns a 400.
Canal desde el que se crea el CFDI: web, api, sdk, cli o mcp. Es
opcional; si no se envía o el valor no es válido, se registra api. El SDK
oficial lo envía como sdk (configurable con la opción client) y el
servidor MCP como mcp. Sirve para métricas y no afecta el timbrado.
Invoice series (e.g. A). Default: the organization’s default series for the CFDI type. See Series and folios
folioNumber
string
No
Invoice folio number. Default: the next free folio of the series in this environment. A manual folio (1 to 40 characters, no vertical bar character) is used as sent and never moves the counter
date
string
Yes
Issuance date-time, America/Mexico_City local time (no Z/offset) — see warning below
paymentForm
string
Conditional***
SAT forma de pago catalog code
use
string
Yes
SAT uso CFDI catalog code
customer
object
One of*
Inline customer — see below
customerId
string
One of*
Existing customer ID (from the Customers resource)
items
array
Yes
Line items — see below
type
string
No
I (Ingreso), E (Egreso), or T (Traslado) — default: I
relatedInvoiceUuid
string
Conditional**
UUID fiscal of the original Ingreso CFDI — required when type is E
relatedCfdis
array
No
CFDI substitution — [{ "type": "04", "uuids": ["<UUID being replaced>"] }]. See Substituting a CFDI
* Exactly one of customer or customerId is required — sending both, or neither, returns a 400.** Required when type is E (Egreso/nota de crédito) — must be the UUID fiscal of an existing, vigente Ingreso CFDI belonging to the same organization; that invoice is the one being credited. Ignored for type: "I" and type: "T". If the related invoice is PPD, the credit note reduces its balance, so it must use the invoice’s currency, its total cannot exceed the invoice’s pending balance, and its taxes must be a subset of the invoice’s (same tax, factor type and rate, never more base than the invoice has left); otherwise the request returns 422 and nothing is stamped. A credit note for a PPD invoice that is cancelled or being cancelled returns 409 (“La factura está cancelada o en proceso de cancelación”). While another credit note for the same PPD invoice is being stamped, the request returns 409 (“La factura tiene una nota de crédito en timbrado; reintenta en unos minutos”); a credit note and a payment sent at the same time never exceed the balance together.*** Required for type: "I" and type: "E". Not required — and discarded if sent — for type: "T" (Traslado), which carries no forma de pago.subtotal and total are not request fields — they’re computed automatically from items.
date must be the current wall-clock time in Mexico City
(America/Mexico_City), not UTC. The SAT only accepts an issuance date
within roughly the last 72 hours (never in the future) and the PAC
compares your date value directly against its own Mexico City server
clock, with no timezone conversion. Sending a UTC timestamp (e.g.
new Date().toISOString()) looks ~6 hours in the future from that
reference and gets rejected — and confusingly, that rejection is often
reported back as CFDI40102 (“digest doesn’t match seal”) instead of a
clear date error. If you ever see CFDI40102, check this before
suspecting your CSD certificate.
Node.js
const date = new Date() .toLocaleString("sv-SE", { timeZone: "America/Mexico_City" }) .replace(" ", "T")
cURL
date=$(TZ="America/Mexico_City" date +"%Y-%m-%dT%H:%M:%S")
Each line item can either reference an existing product/service by productId, or send the catalog fields inline (productKey, unitKey, description, unitPrice). Sending both, or neither, returns a 400.
Field
Type
Required
Description
quantity
number
Yes
Quantity
amount
number
Conditional
Line total (quantity * unitPrice). Required for inline items. With productId it is computed from the product (honoring taxIncluded); if sent, it must match the computed value within $0.01 or the request is rejected.
productId
string
One of*
Existing product/service ID — mutually exclusive with the inline fields below
description
string
One of*
Line item description — required unless productId is provided
unitPrice
number
One of*
Unit price — required unless productId is provided
productKey
string
One of*
SAT product/service key — required unless productId is provided
unitKey
string
One of*
SAT unit key — required unless productId is provided
unit
string
No
Unit label — defaults to unitKey, or the product’s unit name when using productId
taxObject
string
No
SAT objeto de impuesto code — defaults based on taxes
taxes[]
array
No
Tax lines — type, factorType, rate, base, amount, withholding. Ignored (auto-resolved from the product’s configured taxes) when using productId.
* Exactly one of productId or the inline catalog fields (productKey/unitKey/description/unitPrice) is required per item.
SAT c_Impuesto code: 001 (ISR), 002 (IVA) or 003 (IEPS). The names ISR, IVA and IEPS are also accepted, and a code without leading zeros (2) is padded. Any other value returns 400; ISR is only valid with withholding: true
factorType
string
Yes
SAT factor type — Tasa, Cuota, or Exento. An Exento line is sent without rate or amount: a rate or an amount of 0 is dropped, and a non-zero rate or amount returns 422
rate
string
No
Tax rate as a decimal string (e.g. 0.160000)
base
number
No
Taxable base — defaults to the item’s amount if omitted
amount
number
No
Tax amount
withholding
boolean
No
true = retención (Impuestos.Retenciones); false or omitted = traslado (Impuestos.Traslados)
The issuer (RFC, legal name, régimen fiscal, ZIP) is resolved from your organization’s legal data (Update Legal Data), so you don’t send it on every request.
When an item uses productId, its description, unitPrice, productKey, unitKey, amount, taxObject and taxes are all resolved from the stored product — you only need to send quantity and productId. If the product has taxIncluded: true (only supported when its only transferred tax is IVA at a rate), the price is split so that unitPrice and amount exclude the transferred taxes (e.g. a $499.00 product with 16% VAT included becomes unitPrice 430.17, amount 430.17, VAT 68.83; unitPrice is always rounded to 2 decimals). An explicit taxObject on the item overrides the product’s taxability.
taxObject must be consistent with the item’s taxes: 02 requires at least one tax line; 01, 03 and 04 must not have tax lines. Inconsistent items are rejected with a 400 before stamping.
base is required on every tax line in CFDI 4.0 — filled from the item’s amount if omitted.
subtotal/total are computed from items[].amount and items[].taxes[].amount.
Invoices to público en general (customer.taxId = XAXX010101000, customer.legalName = PUBLICO EN GENERAL, type = I) automatically get the SAT InformacionGlobal node and use = S01.
Traslado (type = T) invoices are stamped without paymentForm/paymentMethod, with subtotal and total at 0, and with use = S01 — these are overridden server-side, per CFDI 4.0 (Anexo 20), regardless of what the request sends. Every item’s unitPrice, amount, and taxes[] are zeroed/dropped too (with taxObject = 01), since CFDI 4.0 requires subtotal to equal the sum of the item amounts; quantity, description, productKey, and unitKey are kept.
The customer’s RFC, régimen fiscal, and uso CFDI are validated against the SAT catalog compatibility matrix before stamping (see Create Customer for the same validation rules).
To replace a stamped Ingreso or Traslado that was issued with errors, issue a new CFDI that relates the original with TipoRelacion 04 (sustitución of previously issued CFDIs) via relatedCfdis, then cancel the original with motivo: "01".Phase 1 rule: only one relation, of type 04, to one UUID, and only on Ingreso (I) or Traslado (T). Egreso keeps using relatedInvoiceUuid. A Complemento de Pago is replaced with substitutes on Register Payment. The original is not required to have the same receptor or the same type as the new CFDI — fixing those is the usual reason to substitute.Each relatedCfdis item has a type (the SAT TipoRelacion code; only "04" is accepted for now) and a uuids array (exactly one UUID fiscal). The stamped CFDI’s relatedCfdis are returned in the invoice detail and list responses, and the original CFDI exposes the replacement under substitutedBy (uuid, serie, folio, status).
Status
Condition
message
400
type is E
Para Egreso usa \relatedInvoiceUuid`; `relatedCfdis` aún no aplica a Egreso`
400
More than one relation
Por ahora solo se admite una relación por CFDI
400
type other than 04
Tipo de relación <type> aún no soportado; usa 04 (sustitución)
400
uuids does not contain exactly one UUID
La sustitución admite un solo CFDI original
404
Original not found in the organization
CFDI original <uuid> no encontrado
400
Original belongs to the other environment
El CFDI original pertenece a otro ambiente (sandbox/producción)
400
Original is not vigente
El CFDI original debe estar vigente
400
Original is not Ingreso or Traslado
Solo se pueden sustituir CFDI de Ingreso o Traslado
Neither: Timbrix uses the organization’s default series for the CFDI type (I, E or T) and the next free folio of that series in the current environment.
series only: the series must exist, and the folio is the next free one. Otherwise the request returns 404 SERIES_NOT_FOUND.
Both: the folio is used exactly as sent and never moves the series counter.
The same series and folio can only be used once per organization and environment, including cancelled CFDI. A repeat returns 409 FOLIO_ALREADY_USED.
An idempotent replay (same idempotencyKey) returns the original CFDI and does not use another folio.
A stamp that fails still uses its automatic folio, so the next invoice may skip a number. The SAT does not require consecutive folios.
Stamping is not safe to blindly retry: if your request times out, you can’t tell whether the CFDI was stamped at the SAT. Pass a unique idempotencyKey (e.g. your own order ID) and retry with the same key:
If an invoice was already created with that key, it is returned instead of stamping a second one. A replayed request returns the CFDI’s current state, so status may be "cancelado" if it was cancelled after the first stamp.
If the first request’s outcome is still being confirmed, you get 409 PAC_STAMP_PENDING. Retry later with the same key.
If the first request was confirmed as not stamped, the retry stamps normally.
A retry must send the same body. The same key with different data (another amount, customer, series…) returns 409: “La idempotencyKey ya se usó con otros datos. Si es otro CFDI, usa una llave distinta”. The order of the JSON fields does not matter, but the fields do: send the same ones with the same values (an omitted field and the same field with its default value, such as currency and "currency": "MXN", count as different).
Keys are per environment. A key already used in production returns 409 from a sandbox key (and the other way around), without returning the CFDI: “La idempotencyKey ya se usó en producción; usa una llave distinta en sandbox”.
{ "idempotencyKey": "order-8421", "...": "..."}
Without an idempotencyKey, every request stamps a new CFDI — retries are your responsibility to avoid.
Issuing an Egreso (type: "E") — a credit note against a previously stamped Ingreso, referenced via relatedInvoiceUuid. The tax line below uses withholding: true to record a retención instead of a traslado:
Substituting a CFDI — issue the corrected Ingreso with relatedCfdis pointing at the UUID of the CFDI being replaced (the original keeps being vigente until you cancel it with motivo: "01"):
Issuing a Traslado (type: "T") — a comprobante that moves goods without transferring ownership, so there’s no relatedInvoiceUuid. A Traslado is not a sale: per CFDI 4.0 (Anexo 20) it carries no paymentForm/paymentMethod, its subtotal and total are stamped as 0, and use is forced to S01 (“Sin efectos fiscales”) server-side no matter what you send:
Item amount/unitPrice are still accepted on a Traslado (the example above
sends amount: 500), but because the movement has no monetary value they are
stamped as 0 along with any taxes[] — so don’t be surprised when the
submitted amounts don’t appear in the resulting CFDI. Send them or omit them;
the stamped result is the same.
Present only when there are 69-B warnings; the invoice is stamped anyway. Each
item has code, rfc, role (receptor) and a human-readable message.
code is RFC_69B_PRESUNTO when the receptor’s RFC appears as Presunto
in the SAT’s 69-B list, or RFC_69B_DEFINITIVO when it appears as
Definitivo but this CFDI corrects or complements one already stamped to
that same RFC (a credit note with relatedInvoiceUuid, or a substitution with
relatedCfdis type 04). A retry with the same idempotencyKey returns the
original response without new warnings. See Lista 69-B del SAT.
Invalid or incomplete invoice payload, missing X-Organization-Id header on a session-authenticated request, an issuing organization without complete fiscal data, sending both/neither customer and customerId, sending both/neither productId and the inline concept fields on an item, or a customer whose RFC/régimen/uso CFDI combination fails SAT catalog validation.
{ "statusCode": 400, "message": "La organización no tiene datos fiscales completos (RFC, razón social, régimen fiscal y código postal). Complétalos en PUT /organizations/:organizationId/legal antes de timbrar.", "error": "BAD_REQUEST"}
A 400 can also carry a SAT catalog error embedded in message (e.g. "Error timbrado: CFDI40143 - Este RFC del receptor no existe..."). If you see CFDI40102 - El resultado de la digestión debe ser igual al resultado de la desencripción del sello, check the date field first (see the warning above) — it is frequently caused by sending it in UTC rather than Mexico City time, not by an actual certificate problem.
Production only: stamping in production requires an active paid subscription, so nothing is stamped, even within the monthly quota. reason says why:
trial_active: the free trial stamps in sandbox only.
trial_ended: the trial ended without a plan.
payment_pending: a subscription payment failed and has not been settled.
subscription_ended: the subscription was cancelled or refunded.
no_subscription: no plan was ever contracted.
Sandbox keeps working, and the CFDI you already issued can still be listed, downloaded and cancelled. Cancelling with reason 01 needs a replacement CFDI stamped in Timbrix, so without a plan use 02, 03 or 04. If a payment is pending and you collected PPD invoices, keep in mind that the Complemento de Pago must be issued by the 5th day of the following month. Choose a plan in Settings → Billing; stamping is re-enabled as soon as the payment is confirmed. This check runs before the CSD check, so PRODUCTION_NOT_READY only reports missing CSD steps.
{ "reason": "subscription_ended", "statusCode": 402, "message": "Tu suscripción terminó. Elige un plan para seguir timbrando CFDI en producción.", "error": "SUBSCRIPTION_INACTIVE", "suggestion": "Elige un plan en Configuración → Facturación. El timbrado se reactiva en cuanto se confirma el pago.", "timestamp": "2026-11-02T16:20:11.091Z"}
Production only: the organization is outside the RFC slots of your plan (Starter 1, Pro 3, Business 10, Enterprise unlimited). Your plan covers a limited number of RFC (organizations) per account, so nothing is stamped. details.limit is the number of RFC your plan includes. Sandbox is not limited. Upgrade your plan or close an organization to free a slot.
{ "statusCode": 402, "message": "Tu plan incluye 3 RFC. Sube de plan o cierra una organización para timbrar con este RFC.", "error": "RFC_LIMIT_EXCEEDED", "details": { "limit": 3 }, "timestamp": "2026-11-02T16:20:11.091Z"}
customerId does not exist, productId does not exist, or relatedCfdis points to a UUID that is not an invoice of your organization (see Substituting a CFDI) — in either case, belonging to a different organization than the authenticated one counts as not found.
You sent series without folioNumber and that series does not exist in the organization. Create it with Create series or omit series to use the default.
That series and folio already belong to another CFDI of the organization in this environment (a cancelled CFDI counts). Omit folioNumber to get the next free one, or send a different folio.
{ "statusCode": 409, "message": "La factura A-15 ya existe.", "error": "FOLIO_ALREADY_USED"}
The request may have reached the PAC, but Timbrix could not confirm right away whether the CFDI was stamped (timeout, dropped connection, or an unreadable PAC response). Timbrix confirms the outcome with the PAC automatically within a few minutes:
If it was stamped, the invoice appears in your invoice list and you receive the invoice.stamped webhook.
If it was not, you receive invoice.stamping_failed with error code PAC_STAMP_FAILED_CONFIRMED.
Do not issue the invoice again with different data. Retrying with the sameidempotencyKey is safe: it returns the confirmed invoice, or 409 PAC_STAMP_PENDING while confirmation is still running.
{ "statusCode": 409, "message": "No pudimos confirmar al momento si el CFDI se timbró. Lo estamos verificando con el PAC: en unos minutos aparecerá en tus facturas o recibirás el aviso de que no se timbró.", "error": "PAC_STAMP_UNCONFIRMED", "suggestion": "No lo emitas de nuevo con otros datos. Si reintentas, usa la misma idempotencyKey: Timbrix devolverá la factura confirmada en lugar de timbrar otra.", "timestamp": "2026-10-10T15:50:03.412Z"}
A previous request with the same idempotencyKey is still being confirmed with the PAC. Nothing new was stamped. Retry in a few minutes with the same key.
{ "statusCode": 409, "message": "Estamos confirmando con el PAC un timbrado anterior con esta idempotencyKey.", "error": "PAC_STAMP_PENDING", "suggestion": "Vuelve a intentarlo en unos minutos con la misma idempotencyKey: recibirás la factura timbrada, o se timbrará de nuevo si se confirmó que la anterior no se timbró.", "timestamp": "2026-10-10T15:50:03.412Z"}
In production, the organization moved to another billing account (its ownership was transferred) while the request was running. Nothing was stamped and no CFDI was counted. Retry the request.
{ "statusCode": 409, "message": "La organización cambió de cuenta mientras se timbraba. Intenta de nuevo.", "error": "CONFLICT"}
The receptor’s RFC (or yours as emisor, in production only) appears as Definitivo in the SAT’s 69-B list. Nothing is stamped. A Definitivo receptor is allowed only when the invoice is a credit note of an invoice stamped to that same RFC in the same environment, or the first substitution of a CFDI stamped to that same RFC (one with no vigente substitute and no substitute being stamped); it is then stamped with the RFC_69B_DEFINITIVO warning. See Lista 69-B del SAT.
{ "statusCode": 422, "message": "El RFC del receptor XYZ010101AB1 aparece como Definitivo en la lista 69-B del SAT (publicado el 25 de junio de 2018). Timbrix no permite timbrar nuevos CFDI a este receptor.", "error": "RFC_IN_69B_LIST", "timestamp": "2026-10-26T15:50:03.412Z"}
Timbrix could not reach the PAC after automatic retries (DNS failure or connection refused), so the request never reached it and nothing was stamped. Reported with the PAC_UNAVAILABLE error code. Safe to retry.
{ "statusCode": 503, "message": "No se pudo conectar con el proveedor de timbrado (PAC). Intenta de nuevo en unos minutos.", "error": "PAC_UNAVAILABLE", "timestamp": "2026-07-30T15:50:03.412Z"}
Required when type is E (Egreso/nota de crédito) — UUID fiscal of the original Ingreso CFDI it credits. Must belong to this organization and be a vigente Ingreso.
CFDI relacionados. Fase actual: un solo elemento { type: "04", uuids: [<uuid del CFDI que se sustituye>] }, solo para Ingreso y Traslado. Para Egreso usa relatedInvoiceUuid.
Opcional: si no se manda se usa el siguiente folio de la serie. Un folio que ya existe en la serie se rechaza con 409 FOLIO_ALREADY_USED. De 1 a 40 caracteres, sin |.
Client-supplied key to safely retry this request without double-stamping. If an invoice was already created for this organization with the same key, that invoice is returned instead of stamping again.
Estado fiscal del CFDI registrado en Timbrix: vigente o cancelado. Antes de TIM-243 este campo era siempre "valid". Con una cancelación pendiente (cancellationStatus: pendiente) cuyo plazo de respuesta del receptor ya venció, el SAT pudo haberlo cancelado automáticamente; confírmalo en el portal del SAT.
Latest cancellation attempt's status, only while the invoice is still vigente. null if never attempted or already cancelado. A pendiente past the receptor's response deadline may already be cancelado at the SAT. en_proceso: the cancellation was sent and its outcome is being confirmed with the SAT; don't treat the CFDI as vigente yet.
true when a cancellation was accepted but the invoice status update failed to apply — indicates the invoice may already be cancelled at the SAT even though it still shows vigente here; needs manual reconciliation.
Solo si hay advertencias de la lista 69-B del SAT (receptor Presunto). Un replay por idempotencyKey no las recalcula.
Show child attributes
{"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":"6af694abf72f7996df8712a5","clientVersion":"0.0.4124","searchFilterCounts":[{"language":"default","tag":"API reference","count":196},{"language":"default","tag":"Invoices","count":17},{"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":"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/invoices/create","slug":"/api-reference/invoices/create","pageMetadata":{"title":"Create Invoice","openapi":"POST /invoices","description":"Authenticate with either a Supabase session (send the `X-Organization-Id` header, must be a member of that organization) or an API key (external integrations, requires the `write:invoices` scope — the organization is resolved from the key). The customer can be sent inline (`customer`) or referenced by ID (`customerId`).","href":"/api-reference/invoices/create"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Authenticate with either a Supabase session (send the \", _jsx(_components.code, {\n children: \"X-Organization-Id\"\n }), \" header, must be a member of that organization) or an API key (external integrations, requires the \", _jsx(_components.code, {\n children: \"write:invoices\"\n }), \" scope — the organization is resolved from the key). The customer can be sent inline (\", _jsx(_components.code, {\n children: \"customer\"\n }), \") or referenced by ID (\", _jsx(_components.code, {\n children: \"customerId\"\n }), \").\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,blockquote:`blockquote`,code:`code`,em:`em`,li:`li`,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,ParamField,ResponseField,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Builds, validates, and stamps (timbra) a CFDI 4.0 invoice through the configured PAC (Proveedor Autorizado de Certificación) in a single call. On success, the invoice is fiscally valid at the SAT and is recorded in the organization’s invoice history.`}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[`This endpoint takes no `,_jsx(_components.code,{children:`organizationId`}),` in the URL. Authenticate with `,_jsx(_components.strong,{children:`either`}),` a Supabase Bearer session (send the `,_jsx(_components.code,{children:`X-Organization-Id: \u003corg-id>`}),` header — the user must be a member of that organization) `,_jsx(_components.strong,{children:`or`}),` an API key (the organization resolves automatically from the key; any `,_jsx(_components.code,{children:`X-Organization-Id`}),` header sent alongside an API key is ignored).`]}),`\n`]}),`\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>`}),`) with the `,_jsx(_components.code,{children:`X-Organization-Id: \u003corg-id>`}),` header — the authenticated user must be a member of that 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 organization is resolved from the key itself.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The issuer (RFC, legal name, régimen fiscal, ZIP) is resolved from the organization’s fiscal profile (`,_jsx(_components.code,{children:`PUT /organizations/:organizationId/legal`}),`) — configure that before creating your first invoice, or this endpoint returns a 400.`]}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`X-Timbrix-Client`,type:`string`,id:`param-x-timbrix-client`,children:_jsxs(_components.p,{children:[`Canal desde el que se crea el CFDI: `,_jsx(_components.code,{children:`web`}),`, `,_jsx(_components.code,{children:`api`}),`, `,_jsx(_components.code,{children:`sdk`}),`, `,_jsx(_components.code,{children:`cli`}),` o `,_jsx(_components.code,{children:`mcp`}),`. Es\nopcional; si no se envía o el valor no es válido, se registra `,_jsx(_components.code,{children:`api`}),`. El SDK\noficial lo envía como `,_jsx(_components.code,{children:`sdk`}),` (configurable con la opción `,_jsx(_components.code,{children:`client`}),`) y el\nservidor MCP como `,_jsx(_components.code,{children:`mcp`}),`. Sirve para métricas y no afecta el timbrado.`]})}),`\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:`series`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Invoice series (e.g. `,_jsx(_components.code,{children:`A`}),`). Default: the organization’s default series for the CFDI type. See `,_jsx(_components.a,{href:`/series-y-folios`,children:`Series and folios`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`folioNumber`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Invoice folio number. Default: the next free folio of the series in this environment. A manual folio (1 to 40 characters, no vertical bar character) is used as sent and never moves the counter`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`date`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`Issuance date-time, `,_jsx(_components.strong,{children:`America/Mexico_City local time`}),` (no `,_jsx(_components.code,{children:`Z`}),`/offset) — see warning below`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`paymentForm`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Conditional***`}),_jsx(_components.td,{children:`SAT forma de pago catalog code`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`use`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`SAT uso CFDI catalog code`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`customer`})}),_jsx(_components.td,{children:`object`}),_jsx(_components.td,{children:`One of*`}),_jsx(_components.td,{children:`Inline customer — see below`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`customerId`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`One of*`}),_jsx(_components.td,{children:`Existing customer ID (from the Customers resource)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`items`})}),_jsx(_components.td,{children:`array`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Line items — see below`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`I`}),` (Ingreso), `,_jsx(_components.code,{children:`E`}),` (Egreso), or `,_jsx(_components.code,{children:`T`}),` (Traslado) — default: `,_jsx(_components.code,{children:`I`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`relatedInvoiceUuid`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Conditional**`}),_jsxs(_components.td,{children:[`UUID fiscal of the original Ingreso CFDI — required when `,_jsx(_components.code,{children:`type`}),` is `,_jsx(_components.code,{children:`E`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`relatedCfdis`})}),_jsx(_components.td,{children:`array`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`CFDI substitution — `,_jsx(_components.code,{children:`[{ \"type\": \"04\", \"uuids\": [\"\u003cUUID being replaced>\"] }]`}),`. See `,_jsx(_components.a,{href:`#substituting-a-cfdi`,children:`Substituting a CFDI`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`paymentMethod`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`PUE`}),` or `,_jsx(_components.code,{children:`PPD`}),` — default: `,_jsx(_components.code,{children:`PUE`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`currency`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Currency code — default: `,_jsx(_components.code,{children:`MXN`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`exchange`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Exchange rate — default: `,_jsx(_components.code,{children:`1`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`export`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`SAT clave de exportación — default: `,_jsx(_components.code,{children:`01`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`idempotencyKey`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`See `,_jsx(_components.a,{href:`#idempotency`,children:`Idempotency`}),` below`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`* Exactly one of `,_jsx(_components.code,{children:`customer`}),` or `,_jsx(_components.code,{children:`customerId`}),` is required — sending both, or neither, returns a 400.`]}),`\n`,_jsxs(_components.p,{children:[`** Required when `,_jsx(_components.code,{children:`type`}),` is `,_jsx(_components.code,{children:`E`}),` (Egreso/nota de crédito) — must be the UUID fiscal of an existing, vigente Ingreso CFDI belonging to the same organization; that invoice is the one being credited. Ignored for `,_jsx(_components.code,{children:`type: \"I\"`}),` and `,_jsx(_components.code,{children:`type: \"T\"`}),`. If the related invoice is PPD, the credit note reduces its balance, so it must use the invoice’s `,_jsx(_components.code,{children:`currency`}),`, its total cannot exceed the invoice’s pending balance, and its taxes must be a subset of the invoice’s (same tax, factor type and rate, never more base than the invoice has left); otherwise the request returns `,_jsx(_components.code,{children:`422`}),` and nothing is stamped. A credit note for a PPD invoice that is cancelled or being cancelled returns `,_jsx(_components.code,{children:`409`}),` (“La factura `,` está cancelada o en proceso de cancelación”). While another credit note for the same PPD invoice is being stamped, the request returns `,_jsx(_components.code,{children:`409`}),` (“La factura `,` tiene una nota de crédito en timbrado; reintenta en unos minutos”); a credit note and a payment sent at the same time never exceed the balance together.`]}),`\n`,_jsxs(_components.p,{children:[`*** Required for `,_jsx(_components.code,{children:`type: \"I\"`}),` and `,_jsx(_components.code,{children:`type: \"E\"`}),`. Not required — and discarded if sent — for `,_jsx(_components.code,{children:`type: \"T\"`}),` (Traslado), which carries no forma de pago.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`subtotal`}),` and `,_jsx(_components.code,{children:`total`}),` are `,_jsx(_components.strong,{children:`not`}),` request fields — they’re computed automatically from `,_jsx(_components.code,{children:`items`}),`.`]}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`date`}),` must be the `,_jsx(_components.strong,{children:`current wall-clock time in Mexico City`}),`\n(`,_jsx(_components.code,{children:`America/Mexico_City`}),`), not UTC. The SAT only accepts an issuance date\nwithin roughly the last 72 hours (never in the future) and the PAC\ncompares your `,_jsx(_components.code,{children:`date`}),` value directly against its own Mexico City server\nclock, with no timezone conversion. Sending a UTC timestamp (e.g.\n`,_jsx(_components.code,{children:`new Date().toISOString()`}),`) looks ~6 hours in the future from that\nreference and gets rejected — and confusingly, that rejection is often\nreported back as `,_jsx(_components.code,{children:`CFDI40102`}),` (“digest doesn’t match seal”) instead of a\nclear date error. If you ever see `,_jsx(_components.code,{children:`CFDI40102`}),`, check this before\nsuspecting your CSD certificate.`]}),_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`3`,language:`javascript`,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:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`3`,children:[_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:` date`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Date`}),_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\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toLocaleString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sv-SE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`timeZone:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"America/Mexico_City\"`}),_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\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`replace`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"T\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`date`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TZ`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"America/Mexico_City\"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` date`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` +\"%Y-%m-%dT%H:%M:%S\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})]}),`\n`,_jsxs(Heading,{level:`3`,id:`customer-inline`,children:[_jsx(_components.code,{children:`customer`}),` (inline)`]}),`\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:`legalName`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Customer legal name`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`taxId`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Customer RFC`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`taxSystem`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`SAT régimen fiscal code — required unless the customer is público en general`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`zip`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Customer ZIP code`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`items`,children:_jsx(_components.code,{children:`items[]`})}),`\n`,_jsxs(_components.p,{children:[`Each line item can either reference an existing product/service by `,_jsx(_components.code,{children:`productId`}),`, `,_jsx(_components.strong,{children:`or`}),` send the catalog fields inline (`,_jsx(_components.code,{children:`productKey`}),`, `,_jsx(_components.code,{children:`unitKey`}),`, `,_jsx(_components.code,{children:`description`}),`, `,_jsx(_components.code,{children:`unitPrice`}),`). Sending both, or neither, returns a 400.`]}),`\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:`quantity`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Quantity`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`amount`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Conditional`}),_jsxs(_components.td,{children:[`Line total (`,_jsx(_components.code,{children:`quantity * unitPrice`}),`). Required for inline items. With `,_jsx(_components.code,{children:`productId`}),` it is computed from the product (honoring `,_jsx(_components.code,{children:`taxIncluded`}),`); if sent, it must match the computed value within $0.01 or the request is rejected.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`productId`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`One of*`}),_jsx(_components.td,{children:`Existing product/service ID — mutually exclusive with the inline fields below`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`description`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`One of*`}),_jsxs(_components.td,{children:[`Line item description — required unless `,_jsx(_components.code,{children:`productId`}),` is provided`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`unitPrice`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`One of*`}),_jsxs(_components.td,{children:[`Unit price — required unless `,_jsx(_components.code,{children:`productId`}),` is provided`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`productKey`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`One of*`}),_jsxs(_components.td,{children:[`SAT product/service key — required unless `,_jsx(_components.code,{children:`productId`}),` is provided`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`unitKey`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`One of*`}),_jsxs(_components.td,{children:[`SAT unit key — required unless `,_jsx(_components.code,{children:`productId`}),` is provided`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`unit`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Unit label — defaults to `,_jsx(_components.code,{children:`unitKey`}),`, or the product’s unit name when using `,_jsx(_components.code,{children:`productId`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`taxObject`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`SAT objeto de impuesto code — defaults based on `,_jsx(_components.code,{children:`taxes`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`taxes[]`})}),_jsx(_components.td,{children:`array`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Tax lines — `,_jsx(_components.code,{children:`type`}),`, `,_jsx(_components.code,{children:`factorType`}),`, `,_jsx(_components.code,{children:`rate`}),`, `,_jsx(_components.code,{children:`base`}),`, `,_jsx(_components.code,{children:`amount`}),`, `,_jsx(_components.code,{children:`withholding`}),`. Ignored (auto-resolved from the product’s configured taxes) when using `,_jsx(_components.code,{children:`productId`}),`.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`* Exactly one of `,_jsx(_components.code,{children:`productId`}),` or the inline catalog fields (`,_jsx(_components.code,{children:`productKey`}),`/`,_jsx(_components.code,{children:`unitKey`}),`/`,_jsx(_components.code,{children:`description`}),`/`,_jsx(_components.code,{children:`unitPrice`}),`) is required per item.`]}),`\n`,_jsx(Heading,{level:`4`,id:`taxes`,children:_jsx(_components.code,{children:`taxes[]`})}),`\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:`type`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`SAT `,_jsx(_components.code,{children:`c_Impuesto`}),` code: `,_jsx(_components.code,{children:`001`}),` (ISR), `,_jsx(_components.code,{children:`002`}),` (IVA) or `,_jsx(_components.code,{children:`003`}),` (IEPS). The names `,_jsx(_components.code,{children:`ISR`}),`, `,_jsx(_components.code,{children:`IVA`}),` and `,_jsx(_components.code,{children:`IEPS`}),` are also accepted, and a code without leading zeros (`,_jsx(_components.code,{children:`2`}),`) is padded. Any other value returns `,_jsx(_components.code,{children:`400`}),`; ISR is only valid with `,_jsx(_components.code,{children:`withholding: true`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`factorType`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`SAT factor type — `,_jsx(_components.code,{children:`Tasa`}),`, `,_jsx(_components.code,{children:`Cuota`}),`, or `,_jsx(_components.code,{children:`Exento`}),`. An `,_jsx(_components.code,{children:`Exento`}),` line is sent without rate or amount: a `,_jsx(_components.code,{children:`rate`}),` or an `,_jsx(_components.code,{children:`amount`}),` of `,_jsx(_components.code,{children:`0`}),` is dropped, and a non-zero `,_jsx(_components.code,{children:`rate`}),` or `,_jsx(_components.code,{children:`amount`}),` returns `,_jsx(_components.code,{children:`422`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`rate`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Tax rate as a decimal string (e.g. `,_jsx(_components.code,{children:`0.160000`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`base`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Taxable base — defaults to the item’s `,_jsx(_components.code,{children:`amount`}),` if omitted`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`amount`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Tax amount`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`withholding`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`true`}),` = retención (`,_jsx(_components.code,{children:`Impuestos.Retenciones`}),`); `,_jsx(_components.code,{children:`false`}),` or omitted = traslado (`,_jsx(_components.code,{children:`Impuestos.Traslados`}),`)`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`business-rules-applied-automatically`,children:`Business rules applied automatically`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The issuer (RFC, legal name, régimen fiscal, ZIP) is resolved from your organization’s legal data (`,_jsx(_components.a,{href:`/api-reference/organizations/update-legal-data`,children:`Update Legal Data`}),`), so you don’t send it on every request.`]}),`\n`,_jsxs(_components.li,{children:[`When an item uses `,_jsx(_components.code,{children:`productId`}),`, its `,_jsx(_components.code,{children:`description`}),`, `,_jsx(_components.code,{children:`unitPrice`}),`, `,_jsx(_components.code,{children:`productKey`}),`, `,_jsx(_components.code,{children:`unitKey`}),`, `,_jsx(_components.code,{children:`amount`}),`, `,_jsx(_components.code,{children:`taxObject`}),` and taxes are all resolved from the stored product — you only need to send `,_jsx(_components.code,{children:`quantity`}),` and `,_jsx(_components.code,{children:`productId`}),`. If the product has `,_jsx(_components.code,{children:`taxIncluded: true`}),` (only supported when its only transferred tax is IVA at a rate), the price is split so that `,_jsx(_components.code,{children:`unitPrice`}),` and `,_jsx(_components.code,{children:`amount`}),` exclude the transferred taxes (e.g. a $499.00 product with 16% VAT included becomes `,_jsx(_components.code,{children:`unitPrice`}),` 430.17, `,_jsx(_components.code,{children:`amount`}),` 430.17, VAT 68.83; `,_jsx(_components.code,{children:`unitPrice`}),` is always rounded to 2 decimals). An explicit `,_jsx(_components.code,{children:`taxObject`}),` on the item overrides the product’s `,_jsx(_components.code,{children:`taxability`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`taxObject`}),` must be consistent with the item’s taxes: `,_jsx(_components.code,{children:`02`}),` requires at least one tax line; `,_jsx(_components.code,{children:`01`}),`, `,_jsx(_components.code,{children:`03`}),` and `,_jsx(_components.code,{children:`04`}),` must not have tax lines. Inconsistent items are rejected with a 400 before stamping.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`base`}),` is required on every tax line in CFDI 4.0 — filled from the item’s `,_jsx(_components.code,{children:`amount`}),` if omitted.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`subtotal`}),`/`,_jsx(_components.code,{children:`total`}),` are computed from `,_jsx(_components.code,{children:`items[].amount`}),` and `,_jsx(_components.code,{children:`items[].taxes[].amount`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Invoices to `,_jsx(_components.strong,{children:`público en general`}),` (`,_jsx(_components.code,{children:`customer.taxId = XAXX010101000`}),`, `,_jsx(_components.code,{children:`customer.legalName = PUBLICO EN GENERAL`}),`, `,_jsx(_components.code,{children:`type = I`}),`) automatically get the SAT `,_jsx(_components.code,{children:`InformacionGlobal`}),` node and `,_jsx(_components.code,{children:`use = S01`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Traslado`}),` (`,_jsx(_components.code,{children:`type = T`}),`) invoices are stamped without `,_jsx(_components.code,{children:`paymentForm`}),`/`,_jsx(_components.code,{children:`paymentMethod`}),`, with `,_jsx(_components.code,{children:`subtotal`}),` and `,_jsx(_components.code,{children:`total`}),` at `,_jsx(_components.code,{children:`0`}),`, and with `,_jsx(_components.code,{children:`use = S01`}),` — these are overridden server-side, per CFDI 4.0 (Anexo 20), regardless of what the request sends. Every item’s `,_jsx(_components.code,{children:`unitPrice`}),`, `,_jsx(_components.code,{children:`amount`}),`, and `,_jsx(_components.code,{children:`taxes[]`}),` are zeroed/dropped too (with `,_jsx(_components.code,{children:`taxObject = 01`}),`), since CFDI 4.0 requires `,_jsx(_components.code,{children:`subtotal`}),` to equal the sum of the item amounts; `,_jsx(_components.code,{children:`quantity`}),`, `,_jsx(_components.code,{children:`description`}),`, `,_jsx(_components.code,{children:`productKey`}),`, and `,_jsx(_components.code,{children:`unitKey`}),` are kept.`]}),`\n`,_jsxs(_components.li,{children:[`The customer’s RFC, régimen fiscal, and uso CFDI are validated against the SAT catalog compatibility matrix before stamping (see `,_jsx(_components.a,{href:`/api-reference/customers/create#fiscal-validation-error-cfdi-4-0`,children:`Create Customer`}),` for the same validation rules).`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`substituting-a-cfdi`,children:`Substituting a CFDI`}),`\n`,_jsxs(_components.p,{children:[`To replace a stamped Ingreso or Traslado that was issued with errors, issue a new CFDI that relates the original with `,_jsx(_components.code,{children:`TipoRelacion 04`}),` (sustitución of previously issued CFDIs) via `,_jsx(_components.code,{children:`relatedCfdis`}),`, then `,_jsx(_components.a,{href:`/api-reference/invoices/cancel#substitution-flow-motivo-01`,children:`cancel the original`}),` with `,_jsx(_components.code,{children:`motivo: \"01\"`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Phase 1 rule: only `,_jsx(_components.strong,{children:`one`}),` relation, of type `,_jsx(_components.code,{children:`04`}),`, to `,_jsx(_components.strong,{children:`one`}),` UUID, and only on Ingreso (`,_jsx(_components.code,{children:`I`}),`) or Traslado (`,_jsx(_components.code,{children:`T`}),`). Egreso keeps using `,_jsx(_components.code,{children:`relatedInvoiceUuid`}),`. A Complemento de Pago is replaced with `,_jsx(_components.code,{children:`substitutes`}),` on `,_jsx(_components.a,{href:`/api-reference/invoices/register-payment#replacing-a-complemento-de-pago`,children:`Register Payment`}),`. The original is not required to have the same receptor or the same `,_jsx(_components.code,{children:`type`}),` as the new CFDI — fixing those is the usual reason to substitute.`]}),`\n`,_jsxs(_components.p,{children:[`Each `,_jsx(_components.code,{children:`relatedCfdis`}),` item has a `,_jsx(_components.code,{children:`type`}),` (the SAT `,_jsx(_components.code,{children:`TipoRelacion`}),` code; only `,_jsx(_components.code,{children:`\"04\"`}),` is accepted for now) and a `,_jsx(_components.code,{children:`uuids`}),` array (exactly one UUID fiscal). The stamped CFDI’s `,_jsx(_components.code,{children:`relatedCfdis`}),` are returned in the invoice detail and list responses, and the original CFDI exposes the replacement under `,_jsx(_components.code,{children:`substitutedBy`}),` (`,_jsx(_components.code,{children:`uuid`}),`, `,_jsx(_components.code,{children:`serie`}),`, `,_jsx(_components.code,{children:`folio`}),`, `,_jsx(_components.code,{children:`status`}),`).`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Condition`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`message`})})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`type`}),` is `,_jsx(_components.code,{children:`E`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Para Egreso usa \\\\`}),\"relatedInvoiceUuid`; `relatedCfdis` aún no aplica a Egreso`\"]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:`More than one relation`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Por ahora solo se admite una relación por CFDI`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`type`}),` other than `,_jsx(_components.code,{children:`04`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Tipo de relación \u003ctype> aún no soportado; usa 04 (sustitución)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`uuids`}),` does not contain exactly one UUID`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`La sustitución admite un solo CFDI original`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:`Original not found in the organization`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`CFDI original \u003cuuid> no encontrado`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:`Original belongs to the other environment`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`El CFDI original pertenece a otro ambiente (sandbox/producción)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsxs(_components.td,{children:[`Original is not `,_jsx(_components.code,{children:`vigente`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`El CFDI original debe estar vigente`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:`Original is not Ingreso or Traslado`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Solo se pueden sustituir CFDI de Ingreso o Traslado`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:`Original has a cancellation in progress`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`El CFDI original tiene una cancelación en proceso`})})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`series-and-folios`,children:`Series and folios`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`series`}),` and `,_jsx(_components.code,{children:`folioNumber`}),` are optional. See the `,_jsx(_components.a,{href:`/series-y-folios`,children:`Series and folios guide`}),` for the full picture.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Neither`}),`: Timbrix uses the organization’s default series for the CFDI type (`,_jsx(_components.code,{children:`I`}),`, `,_jsx(_components.code,{children:`E`}),` or `,_jsx(_components.code,{children:`T`}),`) and the next free folio of that series in the current environment.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`series`}),` only`]}),`: the series must exist, and the folio is the next free one. Otherwise the request returns `,_jsx(_components.code,{children:`404 SERIES_NOT_FOUND`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Both`}),`: the folio is used exactly as sent and never moves the series counter.`]}),`\n`,_jsxs(_components.li,{children:[`The same series and folio can only be used once per organization and environment, `,_jsx(_components.strong,{children:`including cancelled CFDI`}),`. A repeat returns `,_jsx(_components.code,{children:`409 FOLIO_ALREADY_USED`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`An idempotent replay (same `,_jsx(_components.code,{children:`idempotencyKey`}),`) returns the original CFDI and does not use another folio.`]}),`\n`,_jsx(_components.li,{children:`A stamp that fails still uses its automatic folio, so the next invoice may skip a number. The SAT does not require consecutive folios.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`idempotency`,children:`Idempotency`}),`\n`,_jsxs(_components.p,{children:[`Stamping is not safe to blindly retry: if your request times out, you can’t tell whether the CFDI was stamped at the SAT. Pass a unique `,_jsx(_components.code,{children:`idempotencyKey`}),` (e.g. your own order ID) and retry with the `,_jsx(_components.strong,{children:`same`}),` key:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`If an invoice was already created with that key, it is returned instead of stamping a second one. A replayed request returns the CFDI’s `,_jsx(_components.em,{children:`current`}),` state, so `,_jsx(_components.code,{children:`status`}),` may be `,_jsx(_components.code,{children:`\"cancelado\"`}),` if it was cancelled after the first stamp.`]}),`\n`,_jsxs(_components.li,{children:[`If the first request’s outcome is still being confirmed, you get `,_jsx(_components.code,{children:`409 PAC_STAMP_PENDING`}),`. Retry later with the same key.`]}),`\n`,_jsx(_components.li,{children:`If the first request was confirmed as not stamped, the retry stamps normally.`}),`\n`,_jsxs(_components.li,{children:[`A retry must send the `,_jsx(_components.strong,{children:`same body`}),`. The same key with different data (another amount, customer, series…) returns `,_jsx(_components.code,{children:`409`}),`: “La idempotencyKey `,` ya se usó con otros datos. Si es otro CFDI, usa una llave distinta”. The order of the JSON fields does not matter, but the fields do: send the same ones with the same values (an omitted field and the same field with its default value, such as `,_jsx(_components.code,{children:`currency`}),` and `,_jsx(_components.code,{children:`\"currency\": \"MXN\"`}),`, count as different).`]}),`\n`,_jsxs(_components.li,{children:[`Keys are per environment. A key already used in production returns `,_jsx(_components.code,{children:`409`}),` from a sandbox key (and the other way around), without returning the CFDI: “La idempotencyKey `,` ya se usó en producción; usa una llave distinta en sandbox”.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,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:`4`,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:` \"idempotencyKey\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"order-8421\"`}),_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:` \"...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"...\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Without an `,_jsx(_components.code,{children:`idempotencyKey`}),`, every request stamps a new CFDI — retries are your responsibility to avoid.`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-request`,children:`Example Request`}),`\n`,_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`18`,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:`18`,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:` \"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:` \"X-Organization-Id: 550e8400-e29b-41d4-a716-446655440000\"`}),_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:` \"date\": \"2026-07-30T15:50: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:` \"paymentMethod\": \"PUE\",`})}),`\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:` \"customerId\": \"590ce6c56d04f840aa8438af\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"items\": [`})}),`\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:` \"quantity\": 1,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"amount\": 100,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"productId\": \"60f1c3e-prod-8421\"`})}),`\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:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:`TypeScript SDK`,numberOfLines:`18`,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:`18`,children:[_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:` invoice`}),_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:` timbrix`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`invoices`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_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:` date:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"2026-07-30T15:50:00\"`}),_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:` paymentForm:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"01\"`}),_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:` paymentMethod:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"PUE\"`}),_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:` use:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"G03\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` customerId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"590ce6c56d04f840aa8438af\"`}),_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:` items:`}),_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:` quantity:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` amount:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 100`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` productId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"60f1c3e-prod-8421\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"550e8400-e29b-41d4-a716-446655440000\"`})}),`\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:`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:`invoice`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`uuid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`With an API key, omit the `,_jsx(_components.code,{children:`X-Organization-Id`}),` header (and the SDK’s `,_jsx(_components.code,{children:`organizationId`}),` argument) entirely — it’s resolved from the key:`]}),`\n`,_jsx(CodeBlock,{filename:`TypeScript SDK (API key)`,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:[_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:` invoice`}),_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:` timbrix`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`invoices`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_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:` date:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"2026-07-30T15:50:00\"`}),_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:` paymentForm:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"01\"`}),_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:` paymentMethod:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"PUE\"`}),_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:` use:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"G03\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` customerId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"590ce6c56d04f840aa8438af\"`}),_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:` items:`}),_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:` quantity:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` amount:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 100`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` productId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"60f1c3e-prod-8421\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_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:`invoice`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`uuid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Using inline concept data instead of `,_jsx(_components.code,{children:`productId`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`28`,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:`28`,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:` \"date\": \"2026-07-30T15:50: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:` \"paymentMethod\": \"PUE\",`})}),`\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:` \"customerId\": \"590ce6c56d04f840aa8438af\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"items\": [`})}),`\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:` \"quantity\": 1,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Servicio de consultoría\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"unitPrice\": 100,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"amount\": 100,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"productKey\": \"84111506\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"unitKey\": \"E48\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"taxes\": [`})}),`\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:` \"type\": \"002\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"factorType\": \"Tasa\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"rate\": \"0.160000\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"amount\": 16`})}),`\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:` ]`})}),`\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:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Issuing an Egreso (`,_jsx(_components.code,{children:`type: \"E\"`}),`) — a credit note against a previously stamped Ingreso, referenced via `,_jsx(_components.code,{children:`relatedInvoiceUuid`}),`. The tax line below uses `,_jsx(_components.code,{children:`withholding: true`}),` to record a retención instead of a traslado:`]}),`\n`,_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`32`,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:`32`,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:` \"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:` \"X-Organization-Id: 550e8400-e29b-41d4-a716-446655440000\"`}),_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:` \"date\": \"2026-07-30T15:50: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:` \"paymentMethod\": \"PUE\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"use\": \"G02\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"E\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"relatedInvoiceUuid\": \"d3bfbc57-44af-4390-a064-f0afab85e5df\",`})}),`\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\": [`})}),`\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:` \"quantity\": 1,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Bonificación por servicio de consultoría\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"unitPrice\": 100,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"amount\": 100,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"productKey\": \"84111506\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"unitKey\": \"E48\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"taxes\": [`})}),`\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:` \"type\": \"002\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"factorType\": \"Tasa\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"rate\": \"0.100000\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"amount\": 10,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"withholding\": true`})}),`\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:` ]`})}),`\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:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Substituting a CFDI — issue the corrected Ingreso with `,_jsx(_components.code,{children:`relatedCfdis`}),` pointing at the UUID of the CFDI being replaced (the original keeps being `,_jsx(_components.code,{children:`vigente`}),` until you cancel it with `,_jsx(_components.code,{children:`motivo: \"01\"`}),`):`]}),`\n`,_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`22`,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:`22`,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:` \"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\": [`})}),`\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:` \"quantity\": 1,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Servicio de consultoría\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"unitPrice\": 100,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"amount\": 100,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"productKey\": \"84111506\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"unitKey\": \"E48\"`})}),`\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:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Issuing a Traslado (`,_jsx(_components.code,{children:`type: \"T\"`}),`) — a comprobante that moves goods without transferring ownership, so there’s no `,_jsx(_components.code,{children:`relatedInvoiceUuid`}),`. A Traslado is not a sale: per CFDI 4.0 (Anexo 20) it carries no `,_jsx(_components.code,{children:`paymentForm`}),`/`,_jsx(_components.code,{children:`paymentMethod`}),`, its `,_jsx(_components.code,{children:`subtotal`}),` and `,_jsx(_components.code,{children:`total`}),` are stamped as `,_jsx(_components.code,{children:`0`}),`, and `,_jsx(_components.code,{children:`use`}),` is forced to `,_jsx(_components.code,{children:`S01`}),` (“Sin efectos fiscales”) server-side no matter what you send:`]}),`\n`,_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`17`,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:`17`,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:` \"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:` \"X-Organization-Id: 550e8400-e29b-41d4-a716-446655440000\"`}),_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:` \"date\": \"2026-07-30T15:50:00\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"use\": \"S01\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"T\",`})}),`\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\": [`})}),`\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:` \"quantity\": 10,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"amount\": 500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"productId\": \"60f1c3e-prod-8421\"`})}),`\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:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Item `,_jsx(_components.code,{children:`amount`}),`/`,_jsx(_components.code,{children:`unitPrice`}),` are still accepted on a Traslado (the example above\nsends `,_jsx(_components.code,{children:`amount: 500`}),`), but because the movement has no monetary value they are\nstamped as `,_jsx(_components.code,{children:`0`}),` along with any `,_jsx(_components.code,{children:`taxes[]`}),` — so don’t be surprised when the\nsubmitted amounts don’t appear in the resulting CFDI. Send them or omit them;\nthe stamped result is the same.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`example-response`,children:`Example Response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`18`,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:`18`,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:`\"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:` \"uuid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"d3bfbc57-44af-4390-a064-f0afab85e5df\"`}),_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:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vigente\"`}),_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:`#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:` \"cancellationDesynced\"`}),_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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"I\"`}),_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:` \"series\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A\"`}),_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:` \"folioNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`116`}),_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:` \"date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-07-30T15:50:00\"`}),_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:` \"xml\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003c?xml version=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`1.0`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` encoding=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`UTF-8`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`?>\u003ccfdi:Comprobante ...>\"`}),_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:` \"rfcReceptor\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GODE561231GR8\"`}),_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:` \"relatedCfdis\"`}),_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:` \"substitutedBy\"`}),_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:` \"channel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"api\"`}),_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-07-30T15:50:03.412Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(ResponseField,{name:`warnings`,type:`object[]`,id:`param-warnings`,children:_jsxs(_components.p,{children:[`Present only when there are 69-B warnings; the invoice is stamped anyway. Each\nitem has `,_jsx(_components.code,{children:`code`}),`, `,_jsx(_components.code,{children:`rfc`}),`, `,_jsx(_components.code,{children:`role`}),` (`,_jsx(_components.code,{children:`receptor`}),`) and a human-readable `,_jsx(_components.code,{children:`message`}),`.\n`,_jsx(_components.code,{children:`code`}),` is `,_jsx(_components.code,{children:`RFC_69B_PRESUNTO`}),` when the receptor’s RFC appears as `,_jsx(_components.strong,{children:`Presunto`}),`\nin the SAT’s 69-B list, or `,_jsx(_components.code,{children:`RFC_69B_DEFINITIVO`}),` when it appears as\n`,_jsx(_components.strong,{children:`Definitivo`}),` but this CFDI corrects or complements one already stamped to\nthat same RFC (a credit note with `,_jsx(_components.code,{children:`relatedInvoiceUuid`}),`, or a substitution with\n`,_jsx(_components.code,{children:`relatedCfdis`}),` type `,_jsx(_components.code,{children:`04`}),`). A retry with the same `,_jsx(_components.code,{children:`idempotencyKey`}),` returns the\noriginal response without new warnings. See `,_jsx(_components.a,{href:`/lista-69b`,children:`Lista 69-B del SAT`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`channel`,type:`string | null`,id:`param-channel`,children:_jsxs(_components.p,{children:[`Canal de origen registrado (`,_jsx(_components.code,{children:`web`}),`, `,_jsx(_components.code,{children:`api`}),`, `,_jsx(_components.code,{children:`sdk`}),`, `,_jsx(_components.code,{children:`cli`}),`, `,_jsx(_components.code,{children:`mcp`}),`). `,_jsx(_components.code,{children:`null`}),` para\nCFDI creados antes de que existiera este campo.`]})}),`\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:[`Invalid or incomplete invoice payload, missing `,_jsx(_components.code,{children:`X-Organization-Id`}),` header on a session-authenticated request, an issuing organization without complete fiscal data, sending both/neither `,_jsx(_components.code,{children:`customer`}),` and `,_jsx(_components.code,{children:`customerId`}),`, sending both/neither `,_jsx(_components.code,{children:`productId`}),` and the inline concept fields on an item, or a customer whose RFC/régimen/uso CFDI combination fails SAT catalog validation.`]}),`\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:`\"La organización no tiene datos fiscales completos (RFC, razón social, régimen fiscal y código postal). Complétalos en PUT /organizations/:organizationId/legal antes de timbrar.\"`}),_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`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`400`}),` can also carry a SAT catalog error embedded in `,_jsx(_components.code,{children:`message`}),` (e.g. `,_jsx(_components.code,{children:`\"Error timbrado: CFDI40143 - Este RFC del receptor no existe...\"`}),`). If you see `,_jsx(_components.code,{children:`CFDI40102 - El resultado de la digestión debe ser igual al resultado de la desencripción del sello`}),`, check the `,_jsx(_components.code,{children:`date`}),` field first (see the warning above) — it is frequently caused by sending it in UTC rather than Mexico City time, not by an actual certificate problem.`]}),`\n`,_jsx(Heading,{level:`3`,id:`401-unauthorized`,children:`401 Unauthorized`}),`\n`,_jsx(_components.p,{children:`Missing or invalid Bearer token / API key.`}),`\n`,_jsxs(Heading,{level:`3`,id:`402-payment-required-—-subscription_inactive`,children:[`402 Payment Required — `,_jsx(_components.code,{children:`SUBSCRIPTION_INACTIVE`})]}),`\n`,_jsxs(_components.p,{children:[`Production only: stamping in production requires an active paid subscription, so nothing is stamped, even within the monthly quota. `,_jsx(_components.code,{children:`reason`}),` says why:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`trial_active`}),`: the free trial stamps in sandbox only.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`trial_ended`}),`: the trial ended without a plan.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`payment_pending`}),`: a subscription payment failed and has not been settled.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`subscription_ended`}),`: the subscription was cancelled or refunded.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`no_subscription`}),`: no plan was ever contracted.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Sandbox keeps working, and the CFDI you already issued can still be listed, downloaded and cancelled. Cancelling with reason `,_jsx(_components.code,{children:`01`}),` needs a replacement CFDI stamped in Timbrix, so without a plan use `,_jsx(_components.code,{children:`02`}),`, `,_jsx(_components.code,{children:`03`}),` or `,_jsx(_components.code,{children:`04`}),`. If a payment is pending and you collected PPD invoices, keep in mind that the Complemento de Pago must be issued by the 5th day of the following month. Choose a plan in `,_jsx(_components.strong,{children:`Settings → Billing`}),`; stamping is re-enabled as soon as the payment is confirmed. This check runs before the CSD check, so `,_jsx(_components.code,{children:`PRODUCTION_NOT_READY`}),` only reports missing CSD steps.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,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:`8`,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:` \"reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"subscription_ended\"`}),_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:`402`}),_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:`\"Tu suscripción terminó. Elige un plan para seguir timbrando CFDI en producció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:`\"SUBSCRIPTION_INACTIVE\"`}),_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:`\"Elige un plan en Configuración → Facturación. El timbrado se reactiva en cuanto se confirma el pago.\"`}),_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:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-11-02T16:20:11.091Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`3`,id:`402-payment-required-—-rfc_limit_exceeded`,children:[`402 Payment Required — `,_jsx(_components.code,{children:`RFC_LIMIT_EXCEEDED`})]}),`\n`,_jsxs(_components.p,{children:[`Production only: the organization is outside the RFC slots of your plan (Starter 1, Pro 3, Business 10, Enterprise unlimited). Your plan covers a limited number of RFC (organizations) per account, so nothing is stamped. `,_jsx(_components.code,{children:`details.limit`}),` is the number of RFC your plan includes. Sandbox is not limited. Upgrade your plan or close an organization to free a slot.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,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:`7`,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:`402`}),_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:`\"Tu plan incluye 3 RFC. Sube de plan o cierra una organización para timbrar con este RFC.\"`}),_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:`\"RFC_LIMIT_EXCEEDED\"`}),_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:` \"details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"limit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_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:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-11-02T16:20:11.091Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\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 organization sent in `,_jsx(_components.code,{children:`X-Organization-Id`}),`, or the API key does not have the `,_jsx(_components.code,{children:`write:invoices`}),` scope.`]}),`\n`,_jsx(Heading,{level:`3`,id:`404-not-found`,children:`404 Not Found`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`customerId`}),` does not exist, `,_jsx(_components.code,{children:`productId`}),` does not exist, or `,_jsx(_components.code,{children:`relatedCfdis`}),` points to a UUID that is not an invoice of your organization (see `,_jsx(_components.a,{href:`#substituting-a-cfdi`,children:`Substituting a CFDI`}),`) — in either case, belonging to a different organization than the authenticated one counts as not found.`]}),`\n`,_jsxs(Heading,{level:`3`,id:`404-not-found-—-series_not_found`,children:[`404 Not Found — `,_jsx(_components.code,{children:`SERIES_NOT_FOUND`})]}),`\n`,_jsxs(_components.p,{children:[`You sent `,_jsx(_components.code,{children:`series`}),` without `,_jsx(_components.code,{children:`folioNumber`}),` and that series does not exist in the organization. Create it with `,_jsx(_components.a,{href:`/api-reference/series/create`,children:`Create series`}),` or omit `,_jsx(_components.code,{children:`series`}),` to use the default.`]}),`\n`,_jsxs(Heading,{level:`3`,id:`409-conflict-—-folio_already_used`,children:[`409 Conflict — `,_jsx(_components.code,{children:`FOLIO_ALREADY_USED`})]}),`\n`,_jsxs(_components.p,{children:[`That series and folio already belong to another CFDI of the organization in this environment (a cancelled CFDI counts). Omit `,_jsx(_components.code,{children:`folioNumber`}),` to get the next free one, or send a different folio.`]}),`\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:`\"La factura A-15 ya existe.\"`}),_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:`\"FOLIO_ALREADY_USED\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`3`,id:`409-conflict-—-pac_stamp_unconfirmed`,children:[`409 Conflict — `,_jsx(_components.code,{children:`PAC_STAMP_UNCONFIRMED`})]}),`\n`,_jsx(_components.p,{children:`The request may have reached the PAC, but Timbrix could not confirm right away whether the CFDI was stamped (timeout, dropped connection, or an unreadable PAC response). Timbrix confirms the outcome with the PAC automatically within a few minutes:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`If it was stamped, the invoice appears in your invoice list and you receive the `,_jsx(_components.code,{children:`invoice.stamped`}),` webhook.`]}),`\n`,_jsxs(_components.li,{children:[`If it was not, you receive `,_jsx(_components.code,{children:`invoice.stamping_failed`}),` with error code `,_jsx(_components.code,{children:`PAC_STAMP_FAILED_CONFIRMED`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Do not issue the invoice again with different data. Retrying with the `,_jsx(_components.strong,{children:`same`}),` `,_jsx(_components.code,{children:`idempotencyKey`}),` is safe: it returns the confirmed invoice, or `,_jsx(_components.code,{children:`409 PAC_STAMP_PENDING`}),` while confirmation is still running.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,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:`7`,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 al momento si el CFDI se timbró. Lo estamos verificando con el PAC: en unos minutos aparecerá en tus facturas o recibirás el aviso de que no se timbró.\"`}),_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_STAMP_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 lo emitas de nuevo con otros datos. Si reintentas, usa la misma idempotencyKey: Timbrix devolverá la factura confirmada en lugar de timbrar otra.\"`}),_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:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-10T15:50:03.412Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`3`,id:`409-conflict-—-pac_stamp_pending`,children:[`409 Conflict — `,_jsx(_components.code,{children:`PAC_STAMP_PENDING`})]}),`\n`,_jsxs(_components.p,{children:[`A previous request with the same `,_jsx(_components.code,{children:`idempotencyKey`}),` is still being confirmed with the PAC. Nothing new was stamped. Retry in a few minutes with the same key.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,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:`7`,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:`\"Estamos confirmando con el PAC un timbrado anterior con esta idempotencyKey.\"`}),_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_STAMP_PENDING\"`}),_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:`\"Vuelve a intentarlo en unos minutos con la misma idempotencyKey: recibirás la factura timbrada, o se timbrará de nuevo si se confirmó que la anterior no se timbró.\"`}),_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:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-10T15:50:03.412Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`3`,id:`409-conflict-—-conflict`,children:[`409 Conflict — `,_jsx(_components.code,{children:`CONFLICT`})]}),`\n`,_jsx(_components.p,{children:`In production, the organization moved to another billing account (its ownership was transferred) while the request was running. Nothing was stamped and no CFDI was counted. Retry the request.`}),`\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:`\"La organización cambió de cuenta mientras se timbraba. Intenta de nuevo.\"`}),_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`,_jsxs(Heading,{level:`3`,id:`422-unprocessable-entity-—-rfc_in_69b_list`,children:[`422 Unprocessable Entity — `,_jsx(_components.code,{children:`RFC_IN_69B_LIST`})]}),`\n`,_jsxs(_components.p,{children:[`The receptor’s RFC (or yours as emisor, in production only) appears as `,_jsx(_components.strong,{children:`Definitivo`}),` in the SAT’s 69-B list. Nothing is stamped. A Definitivo receptor is allowed only when the invoice is a credit note of an invoice stamped to that same RFC in the same environment, or the first substitution of a CFDI stamped to that same RFC (one with no vigente substitute and no substitute being stamped); it is then stamped with the `,_jsx(_components.code,{children:`RFC_69B_DEFINITIVO`}),` warning. See `,_jsx(_components.a,{href:`/lista-69b`,children:`Lista 69-B del SAT`}),`.`]}),`\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:`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 RFC del receptor XYZ010101AB1 aparece como Definitivo en la lista 69-B del SAT (publicado el 25 de junio de 2018). Timbrix no permite timbrar nuevos CFDI a este receptor.\"`}),_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:`\"RFC_IN_69B_LIST\"`}),_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:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-26T15:50:03.412Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`503-service-unavailable`,children:`503 Service Unavailable`}),`\n`,_jsxs(_components.p,{children:[`Timbrix could not reach the PAC after automatic retries (DNS failure or connection refused), so the request never reached it and nothing was stamped. Reported with the `,_jsx(_components.code,{children:`PAC_UNAVAILABLE`}),` error code. Safe to retry.`]}),`\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:`503`}),_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 se pudo conectar con el proveedor de timbrado (PAC). Intenta de nuevo en unos minutos.\"`}),_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_UNAVAILABLE\"`}),_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:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-07-30T15:50:03.412Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Invoice","openapi":"POST /invoices","description":"Authenticate with either a Supabase session (send the `X-Organization-Id` header, must be a member of that organization) or an API key (external integrations, requires the `write:invoices` scope — the organization is resolved from the key). The customer can be sent inline (`customer`) or referenced by ID (`customerId`).","href":"/api-reference/invoices/create"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Authentication","slug":"authentication","depth":2,"children":[]},{"title":"Headers","slug":"headers","depth":2,"children":[]},{"title":"Request Body","slug":"request-body","depth":2,"children":[{"title":"customer (inline)","slug":"customer-inline","depth":3,"children":[]},{"title":"items[]","slug":"items","depth":3,"children":[]},{"title":"taxes[]","slug":"taxes","depth":4,"children":[]}]},{"title":"Business rules applied automatically","slug":"business-rules-applied-automatically","depth":2,"children":[]},{"title":"Substituting a CFDI","slug":"substituting-a-cfdi","depth":2,"children":[]},{"title":"Series and folios","slug":"series-and-folios","depth":2,"children":[]},{"title":"Idempotency","slug":"idempotency","depth":2,"children":[]},{"title":"Example Request","slug":"example-request","depth":2,"children":[]},{"title":"Example Response","slug":"example-response","depth":2,"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":"402 Payment Required — SUBSCRIPTION_INACTIVE","slug":"402-payment-required-—-subscription_inactive","depth":3,"children":[]},{"title":"402 Payment Required — RFC_LIMIT_EXCEEDED","slug":"402-payment-required-—-rfc_limit_exceeded","depth":3,"children":[]},{"title":"403 Forbidden","slug":"403-forbidden","depth":3,"children":[]},{"title":"404 Not Found","slug":"404-not-found","depth":3,"children":[]},{"title":"404 Not Found — SERIES_NOT_FOUND","slug":"404-not-found-—-series_not_found","depth":3,"children":[]},{"title":"409 Conflict — FOLIO_ALREADY_USED","slug":"409-conflict-—-folio_already_used","depth":3,"children":[]},{"title":"409 Conflict — PAC_STAMP_UNCONFIRMED","slug":"409-conflict-—-pac_stamp_unconfirmed","depth":3,"children":[]},{"title":"409 Conflict — PAC_STAMP_PENDING","slug":"409-conflict-—-pac_stamp_pending","depth":3,"children":[]},{"title":"409 Conflict — CONFLICT","slug":"409-conflict-—-conflict","depth":3,"children":[]},{"title":"422 Unprocessable Entity — RFC_IN_69B_LIST","slug":"422-unprocessable-entity-—-rfc_in_69b_list","depth":3,"children":[]},{"title":"503 Service Unavailable","slug":"503-service-unavailable","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Authenticate with either a Supabase session (send the `X-Organization-Id` header, must be a member of that organization) or an API key (external integrations, requires the `write:invoices` scope — the organization is resolved from the key). The customer can be sent inline (`customer`) or referenced by ID (`customerId`).","operationId":"InvoicesController_create","parameters":["31d6229c-64c0-4f7d-97c6-f39b67c907c5","421c4617-527c-41eb-8db2-faaf0e4cc4a6","7825fc4d-3def-45ba-b49b-c321b16d2bba"],"requestBody":"a52f562e-0c67-4cd3-b17d-008deb10125f","responses":{"201":"af585f0d-5eb1-4419-bad2-2430e05409f9","400":"ece55680-b92b-4e6f-97e1-7bcacc29a08c","404":"a7abcaaa-3f5d-497c-ab94-0ac43c03c864","422":"20505bb2-4bec-4f45-99f8-8333a3743700","503":"3d714aec-b655-493e-8c14-43b9745ceceb"},"security":["2e86eb78-aaa0-4edb-9bf5-934ad44a78a4","ac1f3acd-6d73-435b-997d-533604df89d6"],"summary":"Create and stamp a CFDI 4.0 invoice via the configured PAC","tags":["invoices"],"method":"post","type":"path","servers":[],"path":"/invoices","baseUrlOptions":[],"title":"Create and stamp a CFDI 4.0 invoice via the configured PAC","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"31d6229c-64c0-4f7d-97c6-f39b67c907c5":{"name":"x-timbrix-client","required":true,"in":"header","schema":{"type":"string","isRequired":true,"uniqueKey":"","typeLabel":"string"}},"421c4617-527c-41eb-8db2-faaf0e4cc4a6":{"name":"X-Timbrix-Client","in":"header","description":"Canal de origen del CFDI: web, api, sdk, cli o mcp. Si no se envía o no es válido, se registra api. El SDK lo envía como sdk por defecto.","required":false,"schema":{"type":"string","isRequired":false,"description":"Canal de origen del CFDI: web, api, sdk, cli o mcp. Si no se envía o no es válido, se registra api. El SDK lo envía como sdk por defecto.","uniqueKey":"","typeLabel":"string"}},"7825fc4d-3def-45ba-b49b-c321b16d2bba":{"name":"X-Organization-Id","in":"header","description":"Required for Supabase session auth. Ignored when authenticating with an API key (the organization resolves from the key).","required":false,"schema":{"type":"string","isRequired":false,"description":"Required for Supabase session auth. Ignored when authenticating with an API key (the organization resolves from the key).","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","example":"2026-07-30T22:50:00","isRequired":true,"uniqueKey":"date","typeLabel":"string"},"use":{"type":"string","example":"G03","description":"SAT uso CFDI catalog code","isRequired":true,"uniqueKey":"use","typeLabel":"string"},"items":{"type":"array","items":{"type":"object","properties":{"quantity":{"type":"number","example":1,"isRequired":true,"uniqueKey":"\\items.items.[INDEX].quantity","typeLabel":"number"},"productId":{"type":"string","description":"Existing product/service ID — mutually exclusive with `productKey`/`unitKey`/`description`/`unitPrice` (inline concept data)","uniqueKey":"\\items.items.[INDEX].productId","typeLabel":"string"},"description":{"type":"string","example":"Servicio de consultoría","description":"Required unless `productId` is provided","uniqueKey":"\\items.items.[INDEX].description","typeLabel":"string"},"unitPrice":{"type":"number","example":100,"description":"Required unless `productId` is provided","uniqueKey":"\\items.items.[INDEX].unitPrice","typeLabel":"number"},"amount":{"type":"number","example":100,"description":"Line total (`quantity * unitPrice`). Required unless `productId` is provided — with `productId` it is computed from the product and, if sent, must match the computed value within $0.01","uniqueKey":"\\items.items.[INDEX].amount","typeLabel":"number"},"productKey":{"type":"string","example":"84111506","description":"Required unless `productId` is provided","uniqueKey":"\\items.items.[INDEX].productKey","typeLabel":"string"},"unitKey":{"type":"string","example":"E48","description":"Required unless `productId` is provided","uniqueKey":"\\items.items.[INDEX].unitKey","typeLabel":"string"},"unit":{"type":"string","example":"E48","uniqueKey":"\\items.items.[INDEX].unit","typeLabel":"string"},"taxObject":{"type":"string","example":"02","uniqueKey":"\\items.items.[INDEX].taxObject","typeLabel":"string"},"taxes":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Clave c_Impuesto del SAT: \"001\" ISR (solo retención), \"002\" IVA o \"003\" IEPS. También acepta los nombres; cualquier otro valor se rechaza.","example":"002","isRequired":true,"uniqueKey":"\\items.items.[INDEX].taxes.items.[INDEX].type","typeLabel":"string"},"factorType":{"type":"string","example":"Tasa","isRequired":true,"uniqueKey":"\\items.items.[INDEX].taxes.items.[INDEX].factorType","typeLabel":"string"},"rate":{"type":"string","example":"0.160000","uniqueKey":"\\items.items.[INDEX].taxes.items.[INDEX].rate","typeLabel":"string"},"base":{"type":"number","example":100,"uniqueKey":"\\items.items.[INDEX].taxes.items.[INDEX].base","typeLabel":"number"},"amount":{"type":"number","example":16,"uniqueKey":"\\items.items.[INDEX].taxes.items.[INDEX].amount","typeLabel":"number"},"withholding":{"type":"boolean","description":"true = retención (Impuestos.Retenciones), false/omitted = traslado (Impuestos.Traslados)","example":false,"uniqueKey":"\\items.items.[INDEX].taxes.items.[INDEX].withholding","typeLabel":"boolean"}},"required":["type","factorType"],"uniqueKey":"\\items.items.[INDEX].taxes.items.[INDEX]","typeLabel":"object"},"uniqueKey":"\\items.items.[INDEX].taxes","typeLabel":"object[]"}},"required":["quantity"],"uniqueKey":"\\items.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"\\items","typeLabel":"object[]"},"type":{"type":"string","example":"I","enum":["I","E","T"],"description":"Ingreso, Egreso, or Traslado (default: I)","uniqueKey":"type","typeLabel":"enum\u003cstring>"},"relatedInvoiceUuid":{"type":"string","example":"d3bfbc57-44af-4390-a064-f0afab85e5df","description":"Required when `type` is `E` (Egreso/nota de crédito) — UUID fiscal of the original Ingreso CFDI it credits. Must belong to this organization and be a vigente Ingreso.","uniqueKey":"relatedInvoiceUuid","typeLabel":"string"},"relatedCfdis":{"description":"CFDI relacionados. Fase actual: un solo elemento `{ type: \"04\", uuids: [\u003cuuid del CFDI que se sustituye>] }`, solo para Ingreso y Traslado. Para Egreso usa `relatedInvoiceUuid`.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["01","02","03","04","05","06","07"],"example":"04","description":"Clave SAT c_TipoRelacion. Por ahora solo se admite 04 (sustitución de los CFDI previos).","isRequired":true,"uniqueKey":"relatedCfdis.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"uuids":{"example":["d3bfbc57-44af-4390-a064-f0afab85e5df"],"description":"UUID fiscal de los CFDI relacionados","type":"array","items":{"type":"string","uniqueKey":"relatedCfdis.items.[INDEX].uuids.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"relatedCfdis.items.[INDEX].uuids","typeLabel":"string[]"}},"required":["type","uuids"],"uniqueKey":"relatedCfdis.items.[INDEX]","typeLabel":"object"},"uniqueKey":"relatedCfdis","typeLabel":"object[]"},"series":{"type":"string","example":"A","description":"Opcional: si no se manda se usa la serie predeterminada del tipo (I y T: A, E: NC, salvo que la organización la cambie). De 1 a 25 caracteres, sin |.","maxLength":25,"uniqueKey":"series","typeLabel":"string"},"folioNumber":{"type":"string","example":"1","description":"Opcional: si no se manda se usa el siguiente folio de la serie. Un folio que ya existe en la serie se rechaza con 409 FOLIO_ALREADY_USED. De 1 a 40 caracteres, sin |.","maxLength":40,"uniqueKey":"folioNumber","typeLabel":"string"},"paymentForm":{"type":"string","example":"01","description":"SAT forma de pago catalog code — required unless `type` is `T` (Traslado)","uniqueKey":"paymentForm","typeLabel":"string"},"paymentMethod":{"type":"string","example":"PUE","enum":["PUE","PPD"],"description":"Default: PUE","uniqueKey":"paymentMethod","typeLabel":"enum\u003cstring>"},"currency":{"type":"string","example":"MXN","description":"Default: MXN","uniqueKey":"currency","typeLabel":"string"},"exchange":{"type":"number","example":1,"description":"Default: 1","uniqueKey":"exchange","typeLabel":"number"},"export":{"type":"string","example":"01","description":"SAT clave de exportación catalog code — default: 01","uniqueKey":"export","typeLabel":"string"},"customer":{"type":"object","properties":{"legalName":{"type":"string","example":"ESCUELA KEMPER URGATE SA DE CV","isRequired":true,"uniqueKey":"customer.legalName","typeLabel":"string"},"taxId":{"type":"string","example":"EKU9003173C9","isRequired":true,"uniqueKey":"customer.taxId","typeLabel":"string"},"taxSystem":{"type":"string","example":"601","description":"SAT régimen fiscal code — required unless the customer is público en general","uniqueKey":"customer.taxSystem","typeLabel":"string"},"zip":{"type":"string","example":"45079","uniqueKey":"customer.zip","typeLabel":"string"}},"required":["legalName","taxId"],"uniqueKey":"customer","typeLabel":"object"},"customerId":{"type":"string","description":"Existing customer ID — mutually exclusive with `customer`","uniqueKey":"customerId","typeLabel":"string"},"idempotencyKey":{"type":"string","description":"Client-supplied key to safely retry this request without double-stamping. If an invoice was already created for this organization with the same key, that invoice is returned instead of stamping again.","example":"order-8421-attempt-1","uniqueKey":"idempotencyKey","typeLabel":"string"}},"required":["date","use","items"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"date":"2026-07-30T22:50:00","use":"G03","items":[{"quantity":1,"productId":"\u003cstring>","description":"Servicio de consultoría","unitPrice":100,"amount":100,"productKey":"84111506","unitKey":"E48","unit":"E48","taxObject":"02","taxes":[{"type":"002","factorType":"Tasa","rate":"0.160000","base":100,"amount":16,"withholding":false}]}],"type":"I","relatedInvoiceUuid":"d3bfbc57-44af-4390-a064-f0afab85e5df","relatedCfdis":[{"type":"04","uuids":["d3bfbc57-44af-4390-a064-f0afab85e5df"]}],"series":"A","folioNumber":"1","paymentForm":"01","paymentMethod":"PUE","currency":"MXN","exchange":1,"export":"01","customerId":"\u003cstring>","idempotencyKey":"order-8421-attempt-1"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"af585f0d-5eb1-4419-bad2-2430e05409f9":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Timbrix invoice record ID","example":"0f2a1c3e-1a2b-4c3d-9e8f-1234567890ab","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"uuid":{"type":"string","description":"Folio fiscal UUID asignado por el SAT vía PAC","example":"d3bfbc57-44af-4390-a064-f0afab85e5df","isRequired":true,"uniqueKey":"uuid","typeLabel":"string"},"status":{"type":"string","enum":["vigente","cancelado"],"example":"vigente","description":"Estado fiscal del CFDI registrado en Timbrix: vigente o cancelado. Antes de TIM-243 este campo era siempre \"valid\". Con una cancelación pendiente (cancellationStatus: pendiente) cuyo plazo de respuesta del receptor ya venció, el SAT pudo haberlo cancelado automáticamente; confírmalo en el portal del SAT.","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"cancellationStatus":{"oneOf":[{"type":"string","enum":["pendiente","rechazada","en_proceso"],"description":"Latest cancellation attempt's status, only while the invoice is still vigente. null if never attempted or already cancelado. A pendiente past the receptor's response deadline may already be cancelado at the SAT. en_proceso: the cancellation was sent and its outcome is being confirmed with the SAT; don't treat the CFDI as vigente yet.","isRequired":true,"uniqueKey":"cancellationStatus.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["pendiente","rechazada","en_proceso"],"description":"Latest cancellation attempt's status, only while the invoice is still vigente. null if never attempted or already cancelado. A pendiente past the receptor's response deadline may already be cancelado at the SAT. en_proceso: the cancellation was sent and its outcome is being confirmed with the SAT; don't treat the CFDI as vigente yet.","isRequired":true,"uniqueKey":"cancellationStatus.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"cancellationStatus","typeLabel":"enum\u003cstring> | null"},"cancellationDesynced":{"type":"boolean","description":"true when a cancellation was accepted but the invoice status update failed to apply — indicates the invoice may already be cancelled at the SAT even though it still shows vigente here; needs manual reconciliation.","example":false,"isRequired":true,"uniqueKey":"cancellationDesynced","typeLabel":"boolean"},"type":{"type":"string","enum":["I","E","T","P"],"example":"I","description":"I = Ingreso, E = Egreso, T = Traslado, P = Pago","isRequired":true,"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"series":{"type":"string","example":"A","isRequired":true,"uniqueKey":"series","typeLabel":"string"},"folioNumber":{"type":"string","example":"1","isRequired":true,"uniqueKey":"folioNumber","typeLabel":"string"},"total":{"type":"number","example":116,"isRequired":true,"uniqueKey":"total","typeLabel":"number"},"date":{"type":"string","example":"2026-07-30T22:50:00","isRequired":true,"uniqueKey":"date","typeLabel":"string"},"xml":{"type":"string","description":"XML del CFDI timbrado (UTF-8)","isRequired":true,"uniqueKey":"xml","typeLabel":"string"},"createdAt":{"type":"string","example":"2026-07-30T22:50:03.412Z","isRequired":true,"uniqueKey":"createdAt","typeLabel":"string"},"environment":{"type":"string","enum":["sandbox","production"],"example":"production","description":"Ambiente en el que se timbró el CFDI. Los CFDI de sandbox no tienen validez fiscal ante el SAT.","isRequired":true,"uniqueKey":"environment","typeLabel":"enum\u003cstring>"},"channel":{"oneOf":[{"type":"string","enum":["web","api","sdk","cli","mcp"],"example":"mcp","description":"Canal de origen declarado por el cliente con el header X-Timbrix-Client (api si no se envió). null para CFDI anteriores a este campo.","isRequired":true,"uniqueKey":"channel.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["web","api","sdk","cli","mcp"],"example":"mcp","description":"Canal de origen declarado por el cliente con el header X-Timbrix-Client (api si no se envió). null para CFDI anteriores a este campo.","isRequired":true,"uniqueKey":"channel.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"channel","typeLabel":"enum\u003cstring> | null"},"rfcReceptor":{"type":"string","example":"GODE561231GR8","description":"RFC del receptor del CFDI","isRequired":true,"uniqueKey":"rfcReceptor","typeLabel":"string"},"relatedCfdis":{"description":"Relaciones de este CFDI (CfdisRelacionados). Con tipo 04 apunta al CFDI que sustituye.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["01","02","03","04","05","06","07"],"example":"04","description":"Clave de c_TipoRelacion (04 = sustitución)","isRequired":true,"uniqueKey":"relatedCfdis.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"uuids":{"example":["D3BFBC57-44AF-4390-A064-F0AFAB85E5DF"],"description":"UUID de los CFDI relacionados","type":"array","items":{"type":"string","uniqueKey":"relatedCfdis.items.[INDEX].uuids.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"relatedCfdis.items.[INDEX].uuids","typeLabel":"string[]"}},"required":["type","uuids"],"uniqueKey":"relatedCfdis.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"relatedCfdis","typeLabel":"object[]"},"substitutedBy":{"description":"CFDI cuya relación 04 apunta a este comprobante (sustitutos emitidos).","type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","example":"6F2B1C9A-3D4E-4F5A-8B7C-9D0E1F2A3B4C","isRequired":true,"uniqueKey":"substitutedBy.items.[INDEX].uuid","typeLabel":"string"},"serie":{"type":"string","example":"A","isRequired":true,"uniqueKey":"substitutedBy.items.[INDEX].serie","typeLabel":"string"},"folio":{"type":"string","example":"124","isRequired":true,"uniqueKey":"substitutedBy.items.[INDEX].folio","typeLabel":"string"},"status":{"type":"string","enum":["vigente","cancelado"],"example":"vigente","isRequired":true,"uniqueKey":"substitutedBy.items.[INDEX].status","typeLabel":"enum\u003cstring>"}},"required":["uuid","serie","folio","status"],"uniqueKey":"substitutedBy.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"substitutedBy","typeLabel":"object[]"},"paymentMethod":{"oneOf":[{"type":"string","enum":["PUE","PPD"],"example":"PPD","description":"Método de pago; null en Traslado, Pago y facturas anteriores a este campo.","isRequired":true,"uniqueKey":"paymentMethod.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["PUE","PPD"],"example":"PPD","description":"Método de pago; null en Traslado, Pago y facturas anteriores a este campo.","isRequired":true,"uniqueKey":"paymentMethod.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"paymentMethod","typeLabel":"enum\u003cstring> | null"},"balance":{"oneOf":[{"type":"object","example":160,"description":"Saldo pendiente de una factura PPD (total menos complementos de pago vigentes o en timbrado); null en las demás.","isRequired":true,"uniqueKey":"balance.oneOf.0","typeLabel":"object"},{"type":"null","example":160,"description":"Saldo pendiente de una factura PPD (total menos complementos de pago vigentes o en timbrado); null en las demás.","isRequired":true,"uniqueKey":"balance.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balance","typeLabel":"object | null"},"payment":{"type":"object","description":"Solo en complementos de pago (type P): el pago y las facturas que liquida.","required":["date","paymentForm","currency","exchange","amount","operationNumber","documents"],"properties":{"date":{"type":"string","example":"2026-10-15T12:00:00","isRequired":true,"uniqueKey":"payment.date","typeLabel":"string"},"paymentForm":{"type":"string","example":"03","isRequired":true,"uniqueKey":"payment.paymentForm","typeLabel":"string"},"currency":{"type":"string","example":"MXN","isRequired":true,"uniqueKey":"payment.currency","typeLabel":"string"},"exchange":{"type":"number","example":1,"isRequired":true,"uniqueKey":"payment.exchange","typeLabel":"number"},"amount":{"type":"number","example":1660,"isRequired":true,"uniqueKey":"payment.amount","typeLabel":"number"},"operationNumber":{"oneOf":[{"type":"object","example":"SPEI-123","isRequired":true,"uniqueKey":"payment.operationNumber.oneOf.0","typeLabel":"object"},{"type":"null","example":"SPEI-123","isRequired":true,"uniqueKey":"payment.operationNumber.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment.operationNumber","typeLabel":"object | null"},"documents":{"type":"array","items":{"type":"object","properties":{"invoiceUuid":{"type":"string","example":"d3bfbc57-44af-4390-a064-f0afab85e5df","isRequired":true,"uniqueKey":"payment.documents.items.[INDEX].invoiceUuid","typeLabel":"string"},"installment":{"type":"number","example":2,"isRequired":true,"uniqueKey":"payment.documents.items.[INDEX].installment","typeLabel":"number"},"previousBalance":{"type":"number","example":660,"isRequired":true,"uniqueKey":"payment.documents.items.[INDEX].previousBalance","typeLabel":"number"},"amountPaid":{"type":"number","example":500,"isRequired":true,"uniqueKey":"payment.documents.items.[INDEX].amountPaid","typeLabel":"number"},"remainingBalance":{"type":"number","example":160,"isRequired":true,"uniqueKey":"payment.documents.items.[INDEX].remainingBalance","typeLabel":"number"}},"required":["invoiceUuid","installment","previousBalance","amountPaid","remainingBalance"],"uniqueKey":"payment.documents.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"payment.documents","typeLabel":"object[]"}},"uniqueKey":"payment","typeLabel":"object"},"warnings":{"description":"Solo si hay advertencias de la lista 69-B del SAT (receptor Presunto). Un replay por idempotencyKey no las recalcula.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["RFC_69B_PRESUNTO","RFC_69B_DEFINITIVO"],"example":"RFC_69B_PRESUNTO","description":"RFC_69B_PRESUNTO: receptor Presunto. RFC_69B_DEFINITIVO: receptor Definitivo permitido porque el CFDI corrige o complementa uno ya timbrado a ese receptor.","isRequired":true,"uniqueKey":"warnings.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"rfc":{"type":"string","example":"AAA010101AAA","isRequired":true,"uniqueKey":"warnings.items.[INDEX].rfc","typeLabel":"string"},"role":{"type":"string","enum":["emisor","receptor"],"example":"receptor","isRequired":true,"uniqueKey":"warnings.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"message":{"type":"string","example":"El RFC del receptor AAA010101AAA aparece como Presunto en la lista 69-B del SAT (publicado el 25 de junio de 2018). Revisa la operación antes de continuar.","isRequired":true,"uniqueKey":"warnings.items.[INDEX].message","typeLabel":"string"}},"required":["code","rfc","role","message"],"uniqueKey":"warnings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"warnings","typeLabel":"object[]"}},"required":["id","uuid","status","cancellationStatus","cancellationDesynced","type","series","folioNumber","total","date","xml","createdAt","environment","channel","rfcReceptor","relatedCfdis","substitutedBy","paymentMethod","balance"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"0f2a1c3e-1a2b-4c3d-9e8f-1234567890ab","uuid":"d3bfbc57-44af-4390-a064-f0afab85e5df","status":"vigente","cancellationStatus":"pendiente","cancellationDesynced":false,"type":"I","series":"A","folioNumber":"1","total":116,"date":"2026-07-30T22:50:00","xml":"\u003cstring>","createdAt":"2026-07-30T22:50:03.412Z","environment":"production","channel":"mcp","rfcReceptor":"GODE561231GR8","relatedCfdis":[{"type":"04","uuids":["D3BFBC57-44AF-4390-A064-F0AFAB85E5DF"]}],"substitutedBy":[{"uuid":"6F2B1C9A-3D4E-4F5A-8B7C-9D0E1F2A3B4C","serie":"A","folio":"124","status":"vigente"}],"paymentMethod":"PPD","balance":160,"payment":{"date":"2026-10-15T12:00:00","paymentForm":"03","currency":"MXN","exchange":1,"amount":1660,"operationNumber":"SPEI-123","documents":[{"invoiceUuid":"d3bfbc57-44af-4390-a064-f0afab85e5df","installment":2,"previousBalance":660,"amountPaid":500,"remainingBalance":160}]},"warnings":[{"code":"RFC_69B_PRESUNTO","rfc":"AAA010101AAA","role":"receptor","message":"El RFC del receptor AAA010101AAA aparece como Presunto en la lista 69-B del SAT (publicado el 25 de junio de 2018). Revisa la operación antes de continuar."}]}}},"exampleType":"generated"}},"exampleType":"generated"},"ece55680-b92b-4e6f-97e1-7bcacc29a08c":{"description":"Invalid invoice payload, or missing X-Organization-Id header for a session request","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"a7abcaaa-3f5d-497c-ab94-0ac43c03c864":{"description":"customerId not found","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"20505bb2-4bec-4f45-99f8-8333a3743700":{"description":"RFC_IN_69B_LIST: el RFC del emisor (solo en producción) o del receptor aparece como Definitivo en la lista 69-B del SAT","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"3d714aec-b655-493e-8c14-43b9745ceceb":{"description":"PAC unavailable","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"2e86eb78-aaa0-4edb-9bf5-934ad44a78a4":{"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"}},"ac1f3acd-6d73-435b-997d-533604df89d6":{"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":"Create Invoice - Timbrix","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-11T23:01:57.700Z","originalFileLocation":"api-reference/invoices/create.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 (send the X-Organization-Id header, must be a member of that organization) or an API key (external integrations, requires the write:invoices scope — the organization is resolved from the key). The customer can be sent inline (customer) or referenced by ID (customerId).\">\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=\"Create Invoice - Timbrix\">\u003cmeta data-mint-head property=\"og:description\" content=\"Authenticate with either a Supabase session (send the X-Organization-Id header, must be a member of that organization) or an API key (external integrations, requires the write:invoices scope — the organization is resolved from the key). The customer can be sent inline (customer) or referenced by ID (customerId).\">\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/create\">\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=Create+Invoice\u0026amp;description=Authenticate+with+either+a+Supabase+session+%28send+the+%60X-Organization-Id%60+header%2C+must+be+a+member+of+that+organization%29+or+an+API+key+%28external+integrations%2C+r\u0026amp;theme=826df6b90d7e3e43c048463d\u0026amp;signature=fe8d067d3945205323a4d28ab1081b2ac7956fbbc10bb925df061c5872bee400\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Invoice - Timbrix\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Authenticate with either a Supabase session (send the X-Organization-Id header, must be a member of that organization) or an API key (external integrations, requires the write:invoices scope — the organization is resolved from the key). The customer can be sent inline (customer) or referenced by ID (customerId).\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://timbrify.mintlify.site/_mintlify/api/og/v2?division=Invoices\u0026amp;title=Create+Invoice\u0026amp;description=Authenticate+with+either+a+Supabase+session+%28send+the+%60X-Organization-Id%60+header%2C+must+be+a+member+of+that+organization%29+or+an+API+key+%28external+integrations%2C+r\u0026amp;theme=826df6b90d7e3e43c048463d\u0026amp;signature=fe8d067d3945205323a4d28ab1081b2ac7956fbbc10bb925df061c5872bee400\">\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/create\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/invoices/create.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/create#webpage\",\"url\":\"https://docs.timbrix.mx/api-reference/invoices/create\",\"name\":\"Create Invoice\",\"description\":\"Authenticate with either a Supabase session (send the X-Organization-Id header, must be a member of that organization) or an API key (external integrations, requires the write:invoices scope — the organization is resolved from the key). The customer can be sent inline (customer) or referenced by ID (customerId).\",\"dateModified\":\"2026-11-11T23:01:57.700Z\",\"isPartOf\":{\"@id\":\"https://docs.timbrix.mx#website\"},\"breadcrumb\":{\"@id\":\"https://docs.timbrix.mx/api-reference/invoices/create#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.timbrix.mx/api-reference/invoices/create#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Invoices\",\"item\":\"https://docs.timbrix.mx/api-reference/invoices/list\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Invoice\",\"item\":\"https://docs.timbrix.mx/api-reference/invoices/create\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.timbrix.mx/api-reference/invoices/create#apireference\",\"headline\":\"Create Invoice\",\"name\":\"Create Invoice\",\"description\":\"Authenticate with either a Supabase session (send the X-Organization-Id header, must be a member of that organization) or an API key (external integrations, requires the write:invoices scope — the organization is resolved from the key). The customer can be sent inline (customer) or referenced by ID (customerId).\",\"url\":\"https://docs.timbrix.mx/api-reference/invoices/create\",\"mainEntityOfPage\":{\"@id\":\"https://docs.timbrix.mx/api-reference/invoices/create#webpage\"},\"dateModified\":\"2026-11-11T23:01:57.700Z\",\"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/create.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 Invoice PDF","openapi":"GET /invoices/{uuid}/pdf","description":"Authenticate with either a Supabase session (member of the invoice's organization) or an API key belonging to that same organization. The PDF is generated on demand from the stamped XML — nothing is persisted.","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","description":"Send the paid invoices (`documents: [{ invoiceUuid, amount }]`, 1 to 50, same customer and currency). Timbrix computes the installment number, previous and remaining balances and proportional taxes, and stamps one Complemento de Pago 2.0. Each one counts as a CFDI of your plan.","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","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","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":"Create Invoice - Timbrix","buildId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","deploymentId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CDiBsYGW.js","utils-KF9rPlmF.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C26urKTX.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BdjmJAC1.js","snippetPresets-3IpDBjt3.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-D4x_2vvo.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BIWdc5Pa.js","shallow-LQqfiMNd.js","getApiPlaygroundDisplay-DryzlOZG.js","CodeSnippet-tcJujU4r.js","CodeSnippets-BHp0nVLL.js","Page-1CZdsdAn.js","getPastedJson-DU-1ayUv.js","icon-CZK2hPr4.js","MethodPill-DOaqmTFC.js","DuplicateIcon-B5-nUxxl.js","createIcon-CDP_U77G.js","DynamicMarkdown-GHvayGOn.js","SectionHeading-BYvpkmUD.js","axios-vUo_bRtp.js","Markdown-uxhlayGT.js","clsx-B35qUV0p.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BvrGG8gU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CAf0yVYe.js"]}