Skip to main content
POST
Create and stamp a CFDI 4.0 invoice via the configured PAC

Authorizations

X-API-Key
string
header
required

API Key for authentication (sk_test_... for sandbox, sk_live_... for production)

Headers

x-timbrix-client
string
required
X-Timbrix-Client
string

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.

X-Organization-Id
string

Required for Supabase session auth. Ignored when authenticating with an API key (the organization resolves from the key).

Body

application/json
date
string
required
Example:

"2026-07-30T22:50:00"

use
string
required

SAT uso CFDI catalog code

Example:

"G03"

items
object[]
required
type
enum<string>

Ingreso, Egreso, or Traslado (default: I)

Available options:
I,
E,
T
Example:

"I"

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.

Example:

"d3bfbc57-44af-4390-a064-f0afab85e5df"

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.

series
string

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 |.

Maximum string length: 25
Example:

"A"

folioNumber
string

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 |.

Maximum string length: 40
Example:

"1"

paymentForm
string

SAT forma de pago catalog code — required unless type is T (Traslado)

Example:

"01"

paymentMethod
enum<string>

Default: PUE

Available options:
PUE,
PPD
Example:

"PUE"

currency
string

Default: MXN

Example:

"MXN"

exchange
number

Default: 1

Example:

1

export
string

SAT clave de exportación catalog code — default: 01

Example:

"01"

customer
object
customerId
string

Existing customer ID — mutually exclusive with customer

idempotencyKey
string

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"

Response

id
string
required

Timbrix invoice record ID

Example:

"0f2a1c3e-1a2b-4c3d-9e8f-1234567890ab"

uuid
string
required

Folio fiscal UUID asignado por el SAT vía PAC

Example:

"d3bfbc57-44af-4390-a064-f0afab85e5df"

status
enum<string>
required

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.

Available options:
vigente,
cancelado
Example:

"vigente"

cancellationStatus
enum<string> | null
required

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.

Available options:
pendiente,
rechazada,
en_proceso
cancellationDesynced
boolean
required

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

type
enum<string>
required

I = Ingreso, E = Egreso, T = Traslado, P = Pago

Available options:
I,
E,
T,
P
Example:

"I"

series
string
required
Example:

"A"

folioNumber
string
required
Example:

"1"

total
number
required
Example:

116

date
string
required
Example:

"2026-07-30T22:50:00"

xml
string
required

XML del CFDI timbrado (UTF-8)

createdAt
string
required
Example:

"2026-07-30T22:50:03.412Z"

environment
enum<string>
required

Ambiente en el que se timbró el CFDI. Los CFDI de sandbox no tienen validez fiscal ante el SAT.

Available options:
sandbox,
production
Example:

"production"

channel
enum<string> | null
required

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.

Available options:
web,
api,
sdk,
cli,
mcp
Example:

"mcp"

rfcReceptor
string
required

RFC del receptor del CFDI

Example:

"GODE561231GR8"

Relaciones de este CFDI (CfdisRelacionados). Con tipo 04 apunta al CFDI que sustituye.

substitutedBy
object[]
required

CFDI cuya relación 04 apunta a este comprobante (sustitutos emitidos).

paymentMethod
enum<string> | null
required

Método de pago; null en Traslado, Pago y facturas anteriores a este campo.

Available options:
PUE,
PPD
Example:

"PPD"

balance
object | null
required

Saldo pendiente de una factura PPD (total menos complementos de pago vigentes o en timbrado); null en las demás.

Example:

160

payment
object

Solo en complementos de pago (type P): el pago y las facturas que liquida.

warnings
object[]

Solo si hay advertencias de la lista 69-B del SAT (receptor Presunto). Un replay por idempotencyKey no las recalcula.