Skip to main content
POST
Preview a CFDI 4.0 invoice as an unstamped PDF

Authorizations

X-API-Key
string
header
required

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

Headers

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

PDF de vista previa del CFDI