Issue an Invoice (I / E / T)

Issue a CFDI 4.0 by posting to a single endpoint. The type field determines the comprobante variant. This page covers types I (Ingreso), E (Egreso / credit note), and T (Traslado). For payment receipts, payroll, and Carta Porte, see the linked pages.

POST /v1/issued-invoices

Stamping is synchronous: the stamped XML and PDF are returned in the 201 response. No polling required.


Example — type I (Ingreso)

curl -X POST https://api.example.com/v1/issued-invoices \
  -u "$API_KEY:" \
  -H "Content-Type: application/json" \
  -d '{
    "entity_id":      "9b1c0e2a-4d3f-4a1b-8c2d-1e2f3a4b5c6d",
    "type":           "I",
    "series":         "A",
    "folio":          "1024",
    "issuer": {
      "fiscal_regime":  "601",
      "place_of_issue": "06600"
    },
    "receiver": {
      "rfc":           "EKU9003173C9",
      "name":          "ESCUELA KEMPER URGATE",
      "postal_code":   "06600",
      "fiscal_regime": "601",
      "cfdi_use":      "G03"
    },
    "payment_form":   "03",
    "payment_method": "PUE",
    "currency":       "MXN",
    "exportation":    "01",
    "items": [
      {
        "product_code": "81161500",
        "unit_code":    "E48",
        "description":  "Software consulting services",
        "quantity":     10,
        "unit_price":   500.00,
        "tax_object":   "02",
        "taxes": [
          { "type": "iva", "factor": "rate", "rate": 0.160000 }
        ]
      }
    ]
  }'

Response: 201 Created — see Issue response.


Base fields (all types)

Field Type Required Description
entity_id uuid yes UUID of the issuing entity. Must belong to your organization and have an active CSD.
type string yes CFDI type. Allowed: I, E, T, P, N.
series string no Invoice series identifier, up to 25 characters.
folio string no Invoice folio number, up to 40 characters.
issuer object yes Issuer information.
issuer.fiscal_regime string yes c_RegimenFiscal code of the issuer (e.g. 601).
issuer.place_of_issue string yes Postal code where the invoice is issued (LugarExpedicion).

Fields for types I, E, and T

All three types share the same IET field set.

  • E (Egreso): use related to link back to the Ingreso being credited.
  • T (Traslado): typically requires a carta_porte complement (see Carta Porte 3.1); items[].unit_price may be 0.
  • Carta Porte 3.1 is only allowed on types I and T.

Receiver

Field Type Required Description
receiver object yes Invoice recipient.
receiver.rfc string yes Receiver RFC, 12–13 characters. Use XAXX010101000 for the public-in-general RFC.
receiver.name string yes Legal name as registered with the SAT.
receiver.postal_code string yes Receiver's tax domicile postal code (DomicilioFiscalReceptor).
receiver.fiscal_regime string yes Receiver c_RegimenFiscal code.
receiver.cfdi_use string yes Intended use (UsoCFDI, e.g. G03). See SAT catalog c_UsoCFDI.
receiver.tax_id_registration string no Tax registration ID for foreign receivers (NumRegIdTrib). Required when receiver is domiciled abroad.
receiver.tax_residence string no Country of tax residence for foreign receivers (ResidenciaFiscal). SAT c_Pais code (e.g. USA). Required when receiver uses the foreign-entity generic RFC.

Invoice-level fields

Field Type Required Description
payment_form string yes c_FormaPago code (e.g. 03). See SAT catalog c_FormaPago.
payment_method string yes PUE or PPD. See catalogs reference.
currency string no ISO 4217 3-letter currency code. Defaults to MXN.
exchange_rate number conditional Exchange rate to MXN. Required when currency is not MXN. Must be > 0.
exportation string no c_Exportacion code. Defaults to 01 (no exportation).

Related CFDIs (related) — required for type E credit notes

Field Type Required Description
related object no Related CFDIs (CfdiRelacionados). Required on type E credit notes.
related.type string required with related c_TipoRelacion code (01–07). For type E credit notes, use 01 (errors with replacement) or another appropriate code.
related.uuids array of uuid required with related One or more UUIDs of the related CFDIs. Minimum 1.

Global invoice (global) — for public-in-general consolidated CFDIs

Field Type Required Description
global object no Global invoice data (InformacionGlobal).
global.periodicity string required with global c_Periodicidad code (e.g. 04 monthly).
global.months string required with global c_Meses code for the covered month(s) (e.g. 01 January).
global.year string required with global 4-digit year covered by the global invoice.

Line items (items[])

items is required for all types. Minimum 1 item.

Field Type Required Description
items[].product_code string yes SAT product/service code (ClaveProdServ). See SAT catalog c_ClaveProdServ.
items[].unit_code string yes SAT unit of measure code (ClaveUnidad). See SAT catalog c_ClaveUnidad.
items[].description string yes Concept description (Descripcion).
items[].quantity number yes Quantity. Must be > 0.000001.
items[].unit_price number yes Unit value before taxes and discounts (ValorUnitario). Must be ≥ 0.
items[].tax_object string yes Tax object indicator (ObjetoImp). See Tax object.
items[].discount number no Line-level discount amount (Descuento). Must be ≥ 0. Applied before tax calculation.
items[].customs_info array no Customs declaration numbers for imported goods (InformacionAduanera). Each entry: number (string, required) — the NumeroPedimento.
items[].property_account string no SAT fixed-asset account number (CuentaPredial) for real estate transactions.
items[].taxes array no Per-line taxes (Impuestos). Required when tax_object is 02.

Tax fields (items[].taxes[])

Field Type Required Description
items[].taxes[].type string required with taxes Tax type in lowercase. See Tax type.
items[].taxes[].factor string required with taxes Tax factor in lowercase. See Tax factor.
items[].taxes[].rate number required with taxes Tax rate as a decimal (e.g. 0.160000 for 16%). Must be ≥ 0.
items[].taxes[].nature string no transfer (traslado, default) or retention (retención). Use retention for taxes withheld by the issuer.

Example — type E (Egreso / credit note)

An Egreso CFDI reduces the fiscal balance of a prior Ingreso. Include related pointing to the original invoice.

{
  "entity_id":      "9b1c0e2a-4d3f-4a1b-8c2d-1e2f3a4b5c6d",
  "type":           "E",
  "series":         "NC",
  "folio":          "5",
  "issuer": { "fiscal_regime": "601", "place_of_issue": "06600" },
  "receiver": {
    "rfc":           "EKU9003173C9",
    "name":          "ESCUELA KEMPER URGATE",
    "postal_code":   "06600",
    "fiscal_regime": "601",
    "cfdi_use":      "G03"
  },
  "payment_form":   "03",
  "payment_method": "PUE",
  "currency":       "MXN",
  "related": {
    "type":  "01",
    "uuids": ["B4E2CBF2-E0E3-4AEF-8F97-9C6E77B29C1B"]
  },
  "items": [
    {
      "product_code": "81161500",
      "unit_code":    "E48",
      "description":  "Credit note – overbilling adjustment",
      "quantity":     1,
      "unit_price":   500.00,
      "tax_object":   "02",
      "taxes": [
        { "type": "iva", "factor": "rate", "rate": 0.160000 }
      ]
    }
  ]
}

Issue response

201 Created

{
  "id":             "01936f7a-4b2c-7e8d-9f0a-1b2c3d4e5f6a",
  "uuid":           "B4E2CBF2-E0E3-4AEF-8F97-9C6E77B29C1B",
  "status":         "stamped",
  "series":         "A",
  "folio":          "1024",
  "type":           "I",
  "issuer": {
    "tax_id":        "XEXX010101000",
    "name":          "MI EMPRESA SA DE CV",
    "fiscal_regime": "601"
  },
  "receiver": {
    "tax_id":        "EKU9003173C9",
    "name":          "ESCUELA KEMPER URGATE",
    "fiscal_regime": "601",
    "postal_code":   "06600",
    "cfdi_use":      "G03"
  },
  "payment_form":   "03",
  "payment_method": "PUE",
  "currency":       "MXN",
  "subtotal":       6000.00,
  "tax":            960.00,
  "total":          6960.00,
  "certified_at":   "2026-07-01T18:00:00+00:00",
  "cancelled_at":   null,
  "cancellation": {
    "process_status":   null,
    "reason":           null,
    "replacement_uuid": null,
    "receipt":          { "available": false }
  },
  "xml": { "available": true },
  "pdf": { "available": true },
  "created_at": "2026-07-01T18:00:00+00:00"
}

File contents are never inlined in the JSON response. Use the /xml and /pdf endpoints to download the actual files — see List & retrieve.

Response field reference

Field Type Description
id string Internal record UUID. Use this for retrieval, download, and cancellation.
uuid string SAT-assigned CFDI UUID (folio fiscal).
status string Invoice lifecycle status. See Statuses & lifecycle.
series string|null Invoice series, if provided.
folio string|null Invoice folio, if provided.
type string Comprobante type (I, E, T, N, or P).
issuer.tax_id string Issuer RFC (read from the entity's CSD at stamp time).
issuer.name string Issuer legal name.
issuer.fiscal_regime string Issuer c_RegimenFiscal code.
receiver.tax_id string Receiver RFC.
receiver.name string Receiver legal name.
receiver.fiscal_regime string Receiver c_RegimenFiscal code.
receiver.postal_code string Receiver tax domicile postal code.
receiver.cfdi_use string CFDI use code. null on type P and N.
payment_form string|null c_FormaPago code. null on type P and N.
payment_method string|null PUE or PPD. null on type P and N.
currency string ISO 4217 currency code.
subtotal number Sum of line amounts before taxes.
tax number Total tax amount.
total number subtotal + tax minus applicable discounts.
certified_at string|null ISO 8601 timestamp when the SAT stamped the CFDI.
cancelled_at string|null ISO 8601 timestamp of confirmed cancellation. null for active invoices.
cancellation.process_status string|null Cancellation workflow state. null if none requested.
cancellation.reason string|null SAT cancellation reason code (01–04).
cancellation.replacement_uuid string|null UUID of the replacement CFDI when reason 01 was used.
cancellation.receipt.available bool true when the SAT cancellation receipt (acuse) is stored.
xml.available bool true when the stamped XML is stored and downloadable.
pdf.available bool true when the printable PDF is stored and downloadable.
created_at string ISO 8601 timestamp when the record was created.

Related pages