Create an invoice
Authorizations
API key: Authorization: Bearer sk_test_... or sk_live_....
Headers
Pin a dated API release (Stripe-style). Omit to use the current version. An unknown value returns 400 request.invalid_version. Echoed back on every response.
"2026-07-10"
Connect: act on behalf of one of your connected accounts (its acct_…/org_… id). Omit to act as your own organization. Not honored on /v1/api_keys.
"org_2P9connectedacct"
Safely retry any POST. The first response is stored for 24h and replayed byte-for-byte for identical retries (the replay adds an idempotent-replayed: true header). Reusing the key with a different body is 409 idempotency.key_reuse; an in-flight duplicate is 409 idempotency.key_processing. This makes retrying a 502/429 safe — no duplicate stamp.
"a1b2c3d4-e5f6-4789-8abc-1234567890ab"
Query Parameters
Comma-separated related objects to inline, e.g. "fiscal_profile".
Bracket-array form of expand, e.g. ?expand[]=fiscal_profile.
Body
Id of the fiscal profile (issuer) to stamp with, e.g. "fp_2P9K3sample".
1CFDI TipoDeComprobante: "I" ingreso (default), "E" egreso (nota de crédito), "P" pago.
I, E, P CFDI Serie (optional invoice series prefix).
1 - 25CFDI Folio; auto-assigned when omitted.
1 - 40CFDI Fecha, ISO-8601; defaults to now at build time. Must be within the past 72 hours.
c_FormaPago code (FormaPago), e.g. "01" efectivo, "03" transferencia, "99" por definir. Required for type I/E; forced to "99" when payment_method is PPD. See GET /v1/catalogs/payment_forms (or the SAT catalogs guide) for each code's meaning.
01, 02, 03, 04, 05, 06, 08, 12, 13, 14, 15, 17, 23, 24, 25, 26, 27, 28, 29, 30, 31, 99 c_MetodoPago: "PUE" pago en una sola exhibición or "PPD" pago en parcialidades o diferido. Required for type I/E.
PUE, PPD c_Moneda currency code (Moneda), e.g. "MXN" (default) or "USD". See GET /v1/catalogs/currencies (or the SAT catalogs guide) for each code's meaning.
MXN, USD, EUR, CAD, GBP, JPY, CHF, CNY, AUD, BRL, ARS, COP, CLP, PEN, DKK, SEK, NOK, HKD, SGD, NZD, KRW, XXX TipoCambio: MXN per 1 unit of currency; required when currency is neither MXN nor XXX.
^-?\d+(\.\d+)?$c_UsoCFDI code (UsoCFDI), e.g. "G03"; falls back to customer.use. Required for type I/E. See GET /v1/catalogs/uso_cfdi (or the SAT catalogs guide) for each code's meaning.
G01, G02, G03, I01, I02, I03, I04, I05, I06, I07, I08, D01, D02, D03, D04, D05, D06, D07, D08, D09, D10, S01, CP01, CN01 c_Exportacion code (Exportacion). Default "01" (no aplica); other codes need the Comercio Exterior complement (not supported in v1). See GET /v1/catalogs/export_types (or the SAT catalogs guide) for each code's meaning.
01, 02, 03, 04 CFDI relation (CfdiRelacionados). Required for type E (nota de crédito).
Customer (Receptor) — who the invoice is for.
Line items (Conceptos). Required for type I/E; must be empty for type P.
Complemento de pagos 2.0 entries. Required for and only valid on type P.
InformacionGlobal for a factura global (público en general XAXX010101000).
Hold the invoice as a signed draft instead of stamping it immediately (default false).
Integrator-owned key-value map (≤50 keys), stored and echoed back verbatim.
Response
Default Response
Always "invoice".
invoice Invoice id, e.g. "inv_2P9K3sample".
True if stamped with a live-mode key against the real SAT.
Lifecycle status: draft, stamping (in flight), stamped, or stamp_failed.
draft, stamping, stamped, stamp_failed CFDI TipoDeComprobante: "I" ingreso, "E" egreso (nota de crédito), "P" pago.
I, E, P Id of the fiscal profile (issuer) that stamped this invoice.
CFDI Serie, or null if unset.
CFDI Folio, or null if unset.
The receptor (customer) as stamped onto the CFDI.
c_Moneda currency code, e.g. "MXN".
Sum of line amounts before taxes, decimal string, e.g. "100.00".
Grand total including taxes, decimal string, e.g. "116.00".
SAT folio fiscal (UUID) once stamped, else null.
When the CFDI was stamped (ISO-8601 UTC), or null.
Issuer digital seal (Sello del CFDI), or null.
SAT digital seal from the TimbreFiscalDigital, or null.
SAT certificate serial that timbró the CFDI, or null.
Cancellation status for this CFDI.
The last stamping error (problem+json shape) when status is stamp_failed, else null.
Path to download the CFDI XML, e.g. "/v1/invoices/:id/xml".
Path to download the CFDI PDF, e.g. "/v1/invoices/:id/pdf".
Integrator-owned key-value map echoed back.
Creation timestamp, ISO-8601 UTC.
Last-update timestamp, ISO-8601 UTC.
The full issuer profile — present only when ?expand=fiscal_profile is requested.