# Stamp an invoice

`POST https://api.fiscalisto.com/v1/invoices`

Checks the invoice against SAT's rules, seals it and stamps it in a single call. Answers with the stamped invoice (status valid) or, if the PAC is slow or SAT doesn't answer, 202 in processing: Fiscalisto retries it on its own and invoice.stamped lets you know. With async: true it answers 202 right away and stamps later. What you can leave out has the usual value: PUE, MXN, use G03 (S01 with regime 616), tax object 02, VAT 16%, quantity 1, unit E48.

## Before you call

- **An issuer that already stamps.** In production, with its digital seal (CSD) current: [`POST /v1/issuers/{id}/certificates`](https://fiscalisto.com/en/docs/api/referencia/emisores/upload-certificate). In test mode it stamps with SAT's test CSD.
- **The `Idempotency-Key` header**, a new one for each call (for example, the order's id in your system). If the response is lost, repeat the call with the same one and it isn't done twice: [Idempotency](https://fiscalisto.com/en/docs/api/idempotencia).

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | header | yes | A new one per CFDI (8 to 255 characters; your order id works). If the response is lost, repeat the request with the same value: it answers the same and never stamps twice. |

## Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `issuer` | string (iss_…) |  | Issuer (iss_…). If the key has a single issuer or the account has only one, it can be left out. |
| `branch` | string (brn_…) |  | Branch (brn_…) the invoice is issued from: its postal code goes in LugarExpedicion, its address on the PDF and, if it has them, its series. Without it, the issuer's tax address (the Matriz). |
| `cost_center` | string (ccn_…) |  | Its cost center (ccn_…): the site, project, branch or department it belongs to, to see income and expenses by center in Reportes. It doesn't change the CFDI. Its credit notes take it on their own. |
| `warehouse` | string (whs_…) |  | Warehouse (whs_…) its track_stock products come out of. By default, its branch's (or the Matriz's). |
| `customer` | string (cus_…) or object |  | The customer (Receptor): the id of one from your catalog (cus_…) or their data. Required except on a transfer (type T), whose recipient is the issuer itself. |
| `customer.tax_id` | string | yes | RFC (Rfc), 12 characters for a persona moral and 13 for a persona física. |
| `customer.legal_name` | string | yes | Name or razón social exactly as on the constancia de situación fiscal, without the capital regime (without «S.A. de C.V.»). (up to 300 characters) |
| `customer.tax_system` | string | yes | Tax regime (RegimenFiscal), a c_RegimenFiscal key: 601, 612, 626… |
| `customer.zip` | string | yes | Postal code of the customer's tax address (DomicilioFiscalReceptor), 5 digits. |
| `customer.email` | string or null |  | Email to send it to (several separated by commas). Only used if sending is requested. |
| `customer.foreign` | object |  | If they're foreign: their country of residence (ResidenciaFiscal, c_Pais) and their tax registration number (NumRegIdTrib), with the generic RFC XEXX010101000. |
| `customer.foreign.country` | string | yes | Country of tax residence, a 3-letter key from c_Pais (USA, CAN…). (3 characters) |
| `customer.foreign.tax_id` | string | yes | Tax identity registration number in their country (NumRegIdTrib). (up to 40 characters) |
| `customer.ieps_taxpayer` | boolean |  | true if the customer is an IEPS taxpayer: IEPS is broken out instead of added to the price, except that of alcohol and tobacco (rates 0.5, 1.6 and 0.304), which always goes in the price (LIEPS art. 19 fr. II). |
| `items` | array of object | yes | Line items (Conceptos), at least one. (up to 200) |
| `items[].product` | string (prd_…) |  | A product from your catalog (prd_…): takes its key, unit, price and taxes. |
| `items[].description` | string |  | Line item description (Descripcion), up to 1,000 characters. (up to 1000 characters) |
| `items[].product_key` | string |  | Product or service key (ClaveProdServ), 8 digits from c_ClaveProdServ. Look it up with GET /v1/sat_catalogs/product_keys?q=… |
| `items[].unit_key` | string |  | Unit key (ClaveUnidad) from c_ClaveUnidad: E48 service unit, H87 piece, ACT activity… By default H87 if the product key is for goods (segments 10 to 60) and E48 if it's for a service. (up to 5 characters) |
| `items[].unit_name` | string or null |  | Unit name (Unidad), up to 20 characters. |
| `items[].sku` | string or null |  | Identification number or SKU (NoIdentificacion). |
| `items[].quantity` | number |  | Quantity (Cantidad). 1 by default. (greater than 0 and up to 1000000000) |
| `items[].unit_price` | number |  | Unit price before taxes (ValorUnitario). (from 0 to 1000000000000) |
| `items[].discount` | number |  | Discount (Descuento). (from 0 to 1000000000000) |
| `items[].taxability` | `01`, `02`, `03`, `04`, `05`, `06`, `07`, `08` |  | Tax object (ObjetoImp), c_ObjetoImp: 01 not subject, 02 subject (the default), 03 not broken out, 04 not taxable… |
| `items[].iva` | `0`, `0.16`, `0.08`, `exento` |  | Transferred VAT rate: 0.16 (the default), 0.08 (border region), 0 or exento. |
| `items[].ieps` | number |  | Transferred IEPS: rate (0.265…) or amount in pesos per unit, depending on ieps_factor. (from 0 to 72.1605) |
| `items[].ieps_factor` | `Tasa`, `Cuota` |  | Tasa or Cuota (IEPS TipoFactor). |
| `items[].ieps_units` | number |  | IEPS units for per-unit rates (liters, cigarettes…), if they aren't the quantity. (greater than 0 and up to 1000000000) |
| `items[].iva_retention` | number |  | Withheld VAT rate (for example 0.106667, two thirds of 16%). (from 0 to 0.16) |
| `items[].isr_retention` | number |  | Withheld ISR rate (for example 0.10 professional fees, 0.0125 RESICO). (from 0 to 0.35) |
| `items[].predial` | array of string |  | Property tax account numbers (CuentaPredial) in leasing. (up to 10) |
| `items[].pedimentos` | array of string |  | Pedimento numbers (InformacionAduanera) of imported goods. (up to 50) |
| `items[].third_party` | object |  | On behalf of third parties (ACuentaTerceros): RFC, name, regime and postal code. |
| `items[].third_party.tax_id` | string | yes | RFC of the party on whose behalf (RfcACuentaTerceros). (up to 13 characters) |
| `items[].third_party.name` | string | yes | Name (NombreACuentaTerceros). (up to 300 characters) |
| `items[].third_party.tax_system` | string | yes | Tax regime (RegimenFiscalACuentaTerceros), c_RegimenFiscal. |
| `items[].third_party.zip` | string | yes | Postal code of their tax address (DomicilioFiscalACuentaTerceros). |
| `items[].iedu` | object |  | Private educational institutions complement (IEDU): student, CURP, level and RVOE. |
| `items[].iedu.student_name` | string | yes | Student's name (nombreAlumno). (up to 300 characters) |
| `items[].iedu.curp` | string | yes | CURP, 18 characters. (18 characters) |
| `items[].iedu.level` | `Preescolar`, `Primaria`, `Secundaria`, `Profesional técnico`, `Bachillerato o su equivalente` | yes | Education level (nivelEducativo). |
| `items[].iedu.rvoe` | string | yes | Official recognition of the studies' validity (autRVOE). (up to 30 characters) |
| `items[].iedu.payer_tax_id` | string or null |  | RFC of whoever pays, if it isn't the recipient (rfcPago). |
| `items[].used_vehicle` | object |  | Used vehicle complement. |
| `items[].used_vehicle.purchase_amount` | number | yes | Acquisition amount (montoAdquisicion). (greater than 0 and up to 1000000000000) |
| `items[].used_vehicle.sale_amount` | number | yes | Sale amount (montoEnajenacion). (greater than 0 and up to 1000000000000) |
| `items[].used_vehicle.vehicle_key` | string | yes | Vehicle key (claveVehicular). (up to 7 characters) |
| `items[].used_vehicle.make` | string | yes | Make (marca). (up to 50 characters) |
| `items[].used_vehicle.type` | string | yes | Type or version (tipo). (up to 50 characters) |
| `items[].used_vehicle.model` | string | yes | Model year (modelo), 4 digits. |
| `items[].used_vehicle.engine_number` | string |  | Engine number (numeroMotor). (up to 17 characters) |
| `items[].used_vehicle.serial_number` | string |  | Serial number (numeroSerie). (up to 17 characters) |
| `items[].used_vehicle.niv` | string |  | Vehicle identification number (NIV). (up to 17 characters) |
| `items[].used_vehicle.guide_value` | number | yes | Value according to the EBC guide or Libro Azul (valor). (greater than 0 and up to 1000000000000) |
| `items[].used_vehicle.customs` | array of object |  | Customs information of the vehicle's import (InformacionAduanera). (up to 10) |
| `items[].used_vehicle.customs[].number` | string | yes | Number of the import document (numero). (up to 100 characters) |
| `items[].used_vehicle.customs[].date` | string | yes | Date of the document (fecha), YYYY-MM-DD. |
| `items[].used_vehicle.customs[].office` | string |  | Customs office (aduana). (up to 100 characters) |
| `items[].hydrocarbon` | object |  | Hidrocarburos y Petrolíferos complement: required on each line item of diesel (15101505) or gasoline (15101514, 15101515) of an invoice or credit note, in liters (LTR). |
| `items[].hydrocarbon.permit_type` | string | yes | CNE or CRE permit type (TipoPermiso, c_TipoPermiso): PER01 to PER11. |
| `items[].hydrocarbon.permit_number` | string | yes | CNE or CRE permit number (NumeroPermiso), like PL/12345/EXP/ES/2016: from 15 to 35 characters. (up to 35 characters) |
| `items[].hydrocarbon.subproduct` | string | yes | Subproduct (SubProductoHYP, c_SubProductoHYP): SP16 regular gasoline, SP17 premium, SP18 automotive diesel… |
| `items[].addenda` | object |  | The recipient's addenda (Walmart, Soriana…), with its own fields. |
| `type` | `I`, `T` |  | I income (by default; with global, global invoice) or T delivery note. Credit notes: POST /v1/credit_notes. Payments: POST /v1/payments. (default "I") |
| `carta_porte` | object |  | Carta Porte 3.1 complement (transfer of goods). |
| `carta_porte.modes` | array of `01`, `02`, `03`, `04` |  | How the goods travel (c_CveTransporte): 01 road, 02 sea, 03 air, 04 rail; several if intermodal. 01 by default. (up to 4) |
| `carta_porte.international` | object |  | International transport (TranspInternac Sí): entry or exit, country, route and customs regimes. |
| `carta_porte.international.direction` | `Entrada`, `Salida` | yes | EntradaSalidaMerc: Entrada or Salida. |
| `carta_porte.international.country` | string | yes | Country of origin or destination (PaisOrigenDestino), c_Pais. (3 characters) |
| `carta_porte.international.via` | string | yes | Route of entry or exit (ViaEntradaSalida), c_CveTransporte (05 pipeline included). (up to 2 characters) |
| `carta_porte.international.regimes` | array of string | yes | Customs regimes (RegimenAduanero), c_RegimenAduanero. (up to 10) |
| `carta_porte.istmo` | object |  | Isthmus of Tehuantepec Interoceanic Corridor: origin and destination hubs (c_RegistroISTMO). |
| `carta_porte.istmo.origin` | string | yes | Origin hub (UbicacionPoloOrigen). (up to 2 characters) |
| `carta_porte.istmo.destination` | string | yes | Destination hub (UbicacionPoloDestino). (up to 2 characters) |
| `carta_porte.reverse_logistics` | boolean |  | Road transport: true if it is reverse logistics, pickup or return. |
| `carta_porte.origin` | object | yes | Origin location (Ubicacion TipoUbicacion Origen): sender, departure date and time and address. |
| `carta_porte.origin.tax_id` | string | yes | Sender's RFC (RFCRemitenteDestinatario); XEXX010101000 if foreign. |
| `carta_porte.origin.name` | string |  | Sender's name (NombreRemitenteDestinatario). (up to 254 characters) |
| `carta_porte.origin.foreign` | object |  | If they're foreign: their country of residence (ResidenciaFiscal, c_Pais) and their tax registration number (NumRegIdTrib), with the generic RFC XEXX010101000. |
| `carta_porte.origin.foreign.tax_id` | string | yes | Tax identity registration number in their country (NumRegIdTrib). (up to 40 characters) |
| `carta_porte.origin.foreign.country` | string | yes | Country of tax residence, a 3-letter key from c_Pais (USA, CAN…). (3 characters) |
| `carta_porte.origin.date_time` | string | yes | Departure (origin) or arrival (destination) date and time, YYYY-MM-DDTHH:MM, local time. |
| `carta_porte.origin.distance_km` | number |  | Distance traveled from the previous location, in km (DistanciaRecorrida). Road and rail. (greater than 0 and up to 99999) |
| `carta_porte.origin.station` | object |  | Station, port or airport (TipoEstacion and NumEstacion from c_Estaciones). Only without road transport. |
| `carta_porte.origin.station.type` | string |  | Station type (TipoEstacion): 01 origin, 02 intermediate, 03 final destination. (up to 2 characters) |
| `carta_porte.origin.station.number` | string |  | Station, port or airport code (NumEstacion), c_Estaciones. (up to 12 characters) |
| `carta_porte.origin.station.name` | string |  | Station name (NombreEstacion). (up to 50 characters) |
| `carta_porte.origin.station.foreign` | boolean |  | true if the station is abroad (it goes without TipoEstacion). |
| `carta_porte.origin.navigation` | `Altura`, `Cabotaje` |  | Sea: traffic type (NavegacionTrafico), Altura or Cabotaje. |
| `carta_porte.origin.address` | object | yes | Address (Domicilio). In Mexico the postal code is enough: state, municipality and locality are taken from c_CodigoPostal. |
| `carta_porte.origin.address.street` | string |  | Street (Calle). (up to 100 characters) |
| `carta_porte.origin.address.exterior` | string |  | Exterior number (NumeroExterior). (up to 55 characters) |
| `carta_porte.origin.address.interior` | string |  | Interior number (NumeroInterior). (up to 55 characters) |
| `carta_porte.origin.address.zip` | string | yes | Postal code (CodigoPostal). In Mexico, state, municipality and locality are derived from it. (up to 12 characters) |
| `carta_porte.origin.address.country` | string |  | Country (Pais), c_Pais. MEX by default. (3 characters) |
| `carta_porte.origin.address.state` | string |  | State (Estado): abroad, c_Estado for USA and CAN, or text. (up to 30 characters) |
| `carta_porte.origin.address.municipality` | string |  | Municipality (Municipio), as text abroad. (up to 120 characters) |
| `carta_porte.origin.address.locality` | string |  | Locality (Localidad), as text abroad. (up to 120 characters) |
| `carta_porte.origin.address.colony` | string |  | Neighborhood (Colonia), as text abroad. (up to 120 characters) |
| `carta_porte.destinations` | array of object | yes | Destination locations (TipoUbicacion Destino), in order: recipient, arrival, distance and address. (up to 20) |
| `carta_porte.destinations[].tax_id` | string | yes | Recipient's RFC (RFCRemitenteDestinatario); XEXX010101000 if foreign. |
| `carta_porte.destinations[].name` | string |  | Recipient's name (NombreRemitenteDestinatario). (up to 254 characters) |
| `carta_porte.destinations[].foreign` | object |  | If they're foreign: their country of residence (ResidenciaFiscal, c_Pais) and their tax registration number (NumRegIdTrib), with the generic RFC XEXX010101000. |
| `carta_porte.destinations[].foreign.tax_id` | string | yes | Tax identity registration number in their country (NumRegIdTrib). (up to 40 characters) |
| `carta_porte.destinations[].foreign.country` | string | yes | Country of tax residence, a 3-letter key from c_Pais (USA, CAN…). (3 characters) |
| `carta_porte.destinations[].date_time` | string | yes | Departure (origin) or arrival (destination) date and time, YYYY-MM-DDTHH:MM, local time. |
| `carta_porte.destinations[].distance_km` | number |  | Distance traveled from the previous location, in km (DistanciaRecorrida). Road and rail. (greater than 0 and up to 99999) |
| `carta_porte.destinations[].station` | object |  | Station, port or airport (TipoEstacion and NumEstacion from c_Estaciones). Only without road transport. |
| `carta_porte.destinations[].station.type` | string |  | Station type (TipoEstacion): 01 origin, 02 intermediate, 03 final destination. (up to 2 characters) |
| `carta_porte.destinations[].station.number` | string |  | Station, port or airport code (NumEstacion), c_Estaciones. (up to 12 characters) |
| `carta_porte.destinations[].station.name` | string |  | Station name (NombreEstacion). (up to 50 characters) |
| `carta_porte.destinations[].station.foreign` | boolean |  | true if the station is abroad (it goes without TipoEstacion). |
| `carta_porte.destinations[].navigation` | `Altura`, `Cabotaje` |  | Sea: traffic type (NavegacionTrafico), Altura or Cabotaje. |
| `carta_porte.destinations[].address` | object | yes | Address (Domicilio). In Mexico the postal code is enough: state, municipality and locality are taken from c_CodigoPostal. |
| `carta_porte.destinations[].address.street` | string |  | Street (Calle). (up to 100 characters) |
| `carta_porte.destinations[].address.exterior` | string |  | Exterior number (NumeroExterior). (up to 55 characters) |
| `carta_porte.destinations[].address.interior` | string |  | Interior number (NumeroInterior). (up to 55 characters) |
| `carta_porte.destinations[].address.zip` | string | yes | Postal code (CodigoPostal). In Mexico, state, municipality and locality are derived from it. (up to 12 characters) |
| `carta_porte.destinations[].address.country` | string |  | Country (Pais), c_Pais. MEX by default. (3 characters) |
| `carta_porte.destinations[].address.state` | string |  | State (Estado): abroad, c_Estado for USA and CAN, or text. (up to 30 characters) |
| `carta_porte.destinations[].address.municipality` | string |  | Municipality (Municipio), as text abroad. (up to 120 characters) |
| `carta_porte.destinations[].address.locality` | string |  | Locality (Localidad), as text abroad. (up to 120 characters) |
| `carta_porte.destinations[].address.colony` | string |  | Neighborhood (Colonia), as text abroad. (up to 120 characters) |
| `carta_porte.goods` | array of object | yes | Goods (Mercancia) being transported. (up to 200) |
| `carta_porte.goods[].product_key` | string | yes | Code of the goods transported (BienesTransp), c_ClaveProdServCP. |
| `carta_porte.goods[].description` | string | yes | Description of the goods (Descripcion). (up to 1000 characters) |
| `carta_porte.goods[].quantity` | number | yes | Quantity (Cantidad). (greater than 0 and up to 1000000000) |
| `carta_porte.goods[].unit_key` | string | yes | Unit code (ClaveUnidad), c_ClaveUnidad. (up to 5 characters) |
| `carta_porte.goods[].weight_kg` | number | yes | Weight in kilograms (PesoEnKg). (from 0.001 to 100000000) |
| `carta_porte.goods[].dimensions` | string |  | Dimensions (Dimensiones), like 30/40/30cm or in plg. (up to 20 characters) |
| `carta_porte.goods[].hazmat` | object |  | Hazardous material (MaterialPeligroso Sí): UN code and packaging. |
| `carta_porte.goods[].hazmat.key` | string | yes | Hazardous material code (CveMaterialPeligroso), c_MaterialPeligroso (UN number). (up to 4 characters) |
| `carta_porte.goods[].hazmat.packaging` | string | yes | Packaging type (Embalaje), c_TipoEmbalaje. (up to 4 characters) |
| `carta_porte.goods[].hazmat.packaging_description` | string |  | Packaging description (DescripEmbalaje). (up to 100 characters) |
| `carta_porte.goods[].cofepris` | object |  | The goods' COFEPRIS data: sector and what each one requires (medicines, precursors, psychotropics, toxic substances, pesticides). |
| `carta_porte.goods[].cofepris.sector` | string | yes | COFEPRIS sector (SectorCOFEPRIS): 01 medicine, 02 precursors and dual-use chemicals, 03 psychotropics and narcotics, 04 toxic substances, 05 pesticides and fertilizers. (up to 2 characters) |
| `carta_porte.goods[].cofepris.active_ingredient` | string |  | Active ingredient name (NombreIngredienteActivo). (up to 1000 characters) |
| `carta_porte.goods[].cofepris.chemical_name` | string |  | Chemical name (NomQuimico). (up to 150 characters) |
| `carta_porte.goods[].cofepris.generic_name` | string |  | Product's generic name (DenominacionGenericaProd). (up to 50 characters) |
| `carta_porte.goods[].cofepris.brand_name` | string |  | Distinctive name or brand (DenominacionDistintivaProd). (up to 50 characters) |
| `carta_porte.goods[].cofepris.manufacturer` | string |  | Manufacturer (Fabricante). (up to 240 characters) |
| `carta_porte.goods[].cofepris.expiry` | string |  | Expiry date (FechaCaducidad), YYYY-MM-DD. (up to 10 characters) |
| `carta_porte.goods[].cofepris.lot` | string |  | Medicine lot (LoteMedicamento). (up to 10 characters) |
| `carta_porte.goods[].cofepris.form` | string |  | Pharmaceutical form (FormaFarmaceutica), c_FormaFarmaceutica. (up to 2 characters) |
| `carta_porte.goods[].cofepris.conditions` | string |  | Special transport conditions (CondicionesEspTransp), c_CondicionesEspeciales. (up to 2 characters) |
| `carta_porte.goods[].cofepris.sanitary_registry` | string |  | Sanitary registration or authorization folio (RegistroSanitarioFolioAutorizacion). (up to 15 characters) |
| `carta_porte.goods[].cofepris.import_permit` | string |  | Import permit (PermisoImportacion). (up to 6 characters) |
| `carta_porte.goods[].cofepris.vucem_folio` | string |  | VUCEM import folio (FolioImpoVUCEM). (up to 25 characters) |
| `carta_porte.goods[].cofepris.cas` | string |  | The substance's CAS number (NumCAS). (up to 15 characters) |
| `carta_porte.goods[].cofepris.importer` | string |  | Importing company's razón social (RazonSocialEmpImp). (up to 80 characters) |
| `carta_porte.goods[].cofepris.pesticide_registry` | string |  | COFEPRIS pesticide sanitary registration (NumRegSanPlagCOFEPRIS). (up to 60 characters) |
| `carta_porte.goods[].cofepris.manufacturer_data` | string |  | Manufacturer's details (DatosFabricante). (up to 600 characters) |
| `carta_porte.goods[].cofepris.formulator_data` | string |  | Formulator's details (DatosFormulador). (up to 600 characters) |
| `carta_porte.goods[].cofepris.maquilador_data` | string |  | Contract manufacturer's details (DatosMaquilador). (up to 600 characters) |
| `carta_porte.goods[].cofepris.authorized_use` | string |  | Authorized use (UsoAutorizado). (up to 1000 characters) |
| `carta_porte.goods[].value` | number |  | Value of the goods (ValorMercancia); required in air transport. (from 0 to 1000000000000000) |
| `carta_porte.goods[].currency` | string |  | Currency of the goods' value (Moneda), c_Moneda. (3 characters) |
| `carta_porte.goods[].tariff` | string |  | Tariff code (FraccionArancelaria), 10 digits. International transport. (up to 10 characters) |
| `carta_porte.goods[].cce_uuid` | string |  | UUID of the CFDI with the foreign trade complement (UUIDComercioExt). (up to 36 characters) |
| `carta_porte.goods[].material` | object |  | Material type (TipoMateria, c_TipoMateria) and its description if it is «otra». |
| `carta_porte.goods[].material.type` | string | yes | Material type (TipoMateria), c_TipoMateria. (up to 2 characters) |
| `carta_porte.goods[].material.description` | string |  | Material description (DescripcionMateria), with type 05 other. (up to 50 characters) |
| `carta_porte.goods[].customs_docs` | array of object |  | Customs documentation (DocumentacionAduanera) for goods in international transport. (up to 20) |
| `carta_porte.goods[].customs_docs[].type` | string | yes | Document type (TipoDocumento), c_DocumentoAduanero: 01 pedimento… (up to 2 characters) |
| `carta_porte.goods[].customs_docs[].pedimento` | string |  | Pedimento number (NumPedimento), in the format «NN  NN  NNNN  NNNNNNN». Only with type 01. (up to 21 characters) |
| `carta_porte.goods[].customs_docs[].doc_id` | string |  | Customs document identifier (IdentDocAduanero), with a type other than 01. (up to 150 characters) |
| `carta_porte.goods[].customs_docs[].importer_tax_id` | string |  | Importer's RFC (RFCImpo), with a pedimento. (up to 13 characters) |
| `carta_porte.goods[].guides` | array of object |  | Parcel delivery: waybills of the packages or pallets (GuiasIdentificacion). (up to 100) |
| `carta_porte.goods[].guides[].number` | string | yes | Tracking number (NumeroGuiaIdentificacion). (up to 30 characters) |
| `carta_porte.goods[].guides[].description` | string | yes | Description of the contents (DescripGuiaIdentificacion). (up to 1000 characters) |
| `carta_porte.goods[].guides[].weight_kg` | number | yes | Weight in kilograms (PesoEnKg). (from 0 to 100000000) |
| `carta_porte.goods[].quantities` | array of object |  | How much goes to each destination (CantidadTransporta), per destination. (up to 40) |
| `carta_porte.goods[].quantities[].quantity` | number | yes | Quantity going to that destination. (greater than 0 and up to 1000000000) |
| `carta_porte.goods[].quantities[].destination` | integer | yes | The destination, by its position in destinations (from 0). (from 0 to 19) |
| `carta_porte.goods[].quantities[].mode` | `01`, `02`, `03`, `04` |  | Mode that quantity travels by (CvesTransporte), c_CveTransporte. |
| `carta_porte.goods[].detail` | object |  | Sea: goods detail (DetalleMercancia): net kilos, tare and pieces. |
| `carta_porte.goods[].detail.net_kg` | number | yes | Net weight in kg (PesoNeto). (from 0 to 100000000) |
| `carta_porte.goods[].detail.tare_kg` | number | yes | Tare in kg (PesoTara). (from 0 to 100000000) |
| `carta_porte.goods[].detail.pieces` | integer |  | Number of pieces (NumPiezas). (from 0 to 1000000000) |
| `carta_porte.goods[].stcc` | string |  | Rail: STCC code (ClaveSTCC). (up to 7 characters) |
| `carta_porte.vehicle` | object |  | Road transport (Autotransporte): vehicle, SCT permit, insurance and trailers. |
| `carta_porte.vehicle.config` | string | yes | Vehicle configuration (ConfigVehicular), c_ConfigAutotransporte: C2, T3S2… (up to 10 characters) |
| `carta_porte.vehicle.plate` | string | yes | Plate (PlacaVM), without dashes or spaces. (up to 10 characters) |
| `carta_porte.vehicle.year` | integer | yes | Model year (AnioModeloVM). (from 0 to 2100) |
| `carta_porte.vehicle.gross_weight` | number | yes | Gross vehicle weight in tons (PesoBrutoVehicular). (from 0 to 999) |
| `carta_porte.vehicle.permit_type` | string | yes | SCT permit type (PermSCT), c_TipoPermiso. (up to 50 characters) |
| `carta_porte.vehicle.permit_number` | string | yes | SCT permit number (NumPermisoSCT). (up to 50 characters) |
| `carta_porte.vehicle.insurer` | string | yes | Civil liability insurer (AseguraRespCivil). (up to 50 characters) |
| `carta_porte.vehicle.policy` | string | yes | Civil liability policy (PolizaRespCivil). (up to 30 characters) |
| `carta_porte.vehicle.env_insurer` | string |  | Environmental damage insurer (AseguraMedAmbiente); mandatory with hazardous material. (up to 50 characters) |
| `carta_porte.vehicle.env_policy` | string |  | Environmental damage policy (PolizaMedAmbiente). (up to 30 characters) |
| `carta_porte.vehicle.cargo_insurer` | string |  | Cargo insurer (AseguraCarga). (up to 50 characters) |
| `carta_porte.vehicle.cargo_policy` | string |  | Cargo policy (PolizaCarga). (up to 30 characters) |
| `carta_porte.vehicle.premium` | number |  | Insurance premium (PrimaSeguro). (from 0 to 1000000000000) |
| `carta_porte.vehicle.trailers` | array of object |  | Trailers or semi-trailers (Remolque): type (c_SubTipoRem) and plate. (up to 2) |
| `carta_porte.vehicle.trailers[].type` | string | yes | Trailer subtype (SubTipoRem), c_SubTipoRem. (up to 10 characters) |
| `carta_porte.vehicle.trailers[].plate` | string | yes | Trailer plate (Placa). (up to 10 characters) |
| `carta_porte.sea` | object |  | Sea transport (TransporteMaritimo): vessel, shipping agent and containers. |
| `carta_porte.sea.permit_type` | string |  | SCT permit type (PermSCT), c_TipoPermiso. (up to 10 characters) |
| `carta_porte.sea.permit_number` | string |  | SCT permit number (NumPermisoSCT). (up to 30 characters) |
| `carta_porte.sea.insurer` | string |  | Civil liability insurer (AseguraRespCivil). (up to 50 characters) |
| `carta_porte.sea.policy` | string |  | Civil liability policy (PolizaRespCivil). (up to 30 characters) |
| `carta_porte.sea.vessel_type` | string | yes | Vessel type (TipoEmbarcacion), c_ConfigMaritima. (up to 4 characters) |
| `carta_porte.sea.registration` | string | yes | Registration (Matricula). (up to 30 characters) |
| `carta_porte.sea.imo` | string | yes | IMO number (NumeroOMI): IMO and 7 digits. (up to 10 characters) |
| `carta_porte.sea.year` | integer |  | Vessel year (AnioEmbarcacion). (from 0 to 2100) |
| `carta_porte.sea.vessel_name` | string |  | Vessel name (NombreEmbarc). (up to 50 characters) |
| `carta_porte.sea.flag` | string | yes | Vessel nationality (NacionalidadEmbarc), c_Pais. (3 characters) |
| `carta_porte.sea.gross_tonnage` | number | yes | Gross tonnage units (UnidadesDeArqBruto). (from 0 to 1000000000) |
| `carta_porte.sea.cargo_type` | string | yes | Cargo type (TipoCarga), c_ClaveTipoCarga. (up to 4 characters) |
| `carta_porte.sea.length` | number |  | Length in meters (Eslora). (from 0 to 100000) |
| `carta_porte.sea.beam` | number |  | Beam in meters (Manga). (from 0 to 100000) |
| `carta_porte.sea.draft` | number |  | Draft in meters (Calado). (from 0 to 100000) |
| `carta_porte.sea.depth` | number |  | Depth in meters (Puntal). (from 0 to 100000) |
| `carta_porte.sea.line` | string |  | Shipping line (LineaNaviera). (up to 50 characters) |
| `carta_porte.sea.agent_name` | string | yes | Consignee shipping agent's name (NombreAgenteNaviero). (up to 100 characters) |
| `carta_porte.sea.agent_authorization` | string | yes | Shipping agent authorization (NumAutorizacionNaviero), c_NumAutorizacionNaviero. (up to 20 characters) |
| `carta_porte.sea.voyage` | string |  | Voyage number (NumViaje). (up to 30 characters) |
| `carta_porte.sea.bill_of_lading` | string |  | Bill of lading number (NumConocEmbarc). (up to 30 characters) |
| `carta_porte.sea.temp_permit` | string |  | Temporary navigation permit (PermisoTempNavegacion), for a foreign vessel. (up to 19 characters) |
| `carta_porte.sea.containers` | array of object |  | Containers (Contenedor). (up to 100) |
| `carta_porte.sea.containers[].type` | string | yes | Container type (TipoContenedor), c_ContenedorMaritimo or c_Contenedor for rail. (up to 6 characters) |
| `carta_porte.sea.containers[].registration` | string |  | Registration (Matricula). (up to 15 characters) |
| `carta_porte.sea.containers[].seal` | string |  | Seal number (NumPrecinto). (up to 20 characters) |
| `carta_porte.sea.containers[].related_id_ccp` | string |  | Ferry: the IdCCP of the onboard road transport's Carta Porte (IdCCPRelacionado). (up to 36 characters) |
| `carta_porte.sea.containers[].truck_plate` | string |  | Ferry: plate of the onboard vehicle (PlacaVMCCP). (up to 10 characters) |
| `carta_porte.sea.containers[].certified_at` | string |  | Ferry: certification date of the vehicle's Carta Porte (FechaCertificacionCCP). (up to 19 characters) |
| `carta_porte.sea.containers[].trailers` | array of object |  | Trailers or semi-trailers (Remolque): type (c_SubTipoRem) and plate. (up to 2) |
| `carta_porte.sea.containers[].trailers[].type` | string | yes | Trailer subtype (SubTipoRem), c_SubTipoRem. (up to 10 characters) |
| `carta_porte.sea.containers[].trailers[].plate` | string | yes | Trailer plate (Placa). (up to 10 characters) |
| `carta_porte.air` | object |  | Air transport (TransporteAereo): permit, waybill and carrier. |
| `carta_porte.air.permit_type` | string | yes | SCT permit type (PermSCT), c_TipoPermiso. (up to 10 characters) |
| `carta_porte.air.permit_number` | string | yes | SCT permit number (NumPermisoSCT). (up to 50 characters) |
| `carta_porte.air.aircraft` | string |  | Aircraft registration (MatriculaAeronave). (up to 11 characters) |
| `carta_porte.air.insurer` | string |  | Civil liability insurer (AseguraRespCivil). (up to 50 characters) |
| `carta_porte.air.policy` | string |  | Civil liability policy (PolizaRespCivil). (up to 30 characters) |
| `carta_porte.air.waybill` | string | yes | Air waybill number (NumeroGuia), 12 to 15 characters. (up to 15 characters) |
| `carta_porte.air.contract_place` | string |  | Place of contract (LugarContrato). (up to 120 characters) |
| `carta_porte.air.carrier` | string | yes | Carrier code (CodigoTransportista), c_CodigoTransporteAereo. (up to 6 characters) |
| `carta_porte.air.shipper` | object |  | Shipper (RFCEmbarcador or NumRegIdTribEmbarc and ResidenciaFiscalEmbarc, NombreEmbarcador). |
| `carta_porte.air.shipper.tax_id` | string |  | Shipper's RFC (RFCEmbarcador). (up to 13 characters) |
| `carta_porte.air.shipper.foreign` | object |  | If they're foreign: their country of residence (ResidenciaFiscal, c_Pais) and their tax registration number (NumRegIdTrib), with the generic RFC XEXX010101000. |
| `carta_porte.air.shipper.foreign.tax_id` | string | yes | Tax identity registration number in their country (NumRegIdTrib). (up to 40 characters) |
| `carta_porte.air.shipper.foreign.country` | string | yes | Country of tax residence, a 3-letter key from c_Pais (USA, CAN…). (3 characters) |
| `carta_porte.air.shipper.name` | string |  | Shipper's name (NombreEmbarcador). (up to 254 characters) |
| `carta_porte.air.rate_charge` | number |  | Valuation charge (CargoPorTasacion). (from 0 to 1000000000000000) |
| `carta_porte.rail` | object |  | Rail transport (TransporteFerroviario): service, traffic, rights of way and cars. |
| `carta_porte.rail.service` | string | yes | Service type (TipoDeServicio), c_TipoDeServicio. (up to 4 characters) |
| `carta_porte.rail.traffic` | string | yes | Traffic type (TipoDeTrafico), c_TipoDeTrafico. (up to 4 characters) |
| `carta_porte.rail.insurer` | string |  | Civil liability insurer (AseguraRespCivil). (up to 50 characters) |
| `carta_porte.rail.policy` | string |  | Civil liability policy (PolizaRespCivil). (up to 30 characters) |
| `carta_porte.rail.rights` | array of object |  | Rights of way (DerechosDePaso): type and kilometers. (up to 50) |
| `carta_porte.rail.rights[].type` | string | yes | Right-of-way type (TipoDerechoDePaso), c_DerechosDePaso. (up to 6 characters) |
| `carta_porte.rail.rights[].km` | number | yes | Kilometers paid (KilometrajePagado). (from 0 to 100000) |
| `carta_porte.rail.cars` | array of object | yes | Cars (Carro). (up to 200) |
| `carta_porte.rail.cars[].type` | string | yes | Car type (TipoCarro), c_TipoCarro. (up to 4 characters) |
| `carta_porte.rail.cars[].registration` | string | yes | Registration (Matricula). (up to 15 characters) |
| `carta_porte.rail.cars[].guide` | string | yes | Car waybill (GuiaCarro). (up to 15 characters) |
| `carta_porte.rail.cars[].net_tons` | number | yes | Car net tons (ToneladasNetasCarro). (from 0 to 1000000) |
| `carta_porte.rail.cars[].containers` | array of object |  | Containers (Contenedor). (up to 10) |
| `carta_porte.rail.cars[].containers[].type` | string | yes | Container type (TipoContenedor), c_ContenedorMaritimo or c_Contenedor for rail. (up to 4 characters) |
| `carta_porte.rail.cars[].containers[].empty_kg` | number | yes | Empty container weight in kg (PesoContenedorVacio). (from 0 to 100000000) |
| `carta_porte.rail.cars[].containers[].net_kg` | number | yes | Net weight in kg (PesoNeto). (from 0 to 100000000) |
| `carta_porte.drivers` | array of object | yes | Operators (FiguraTransporte type 01): RFC, license and name. (up to 5) |
| `carta_porte.drivers[].tax_id` | string or `""` | yes | Operator's RFC (RFCFigura); empty if foreign (with foreign). |
| `carta_porte.drivers[].license` | string | yes | License number (NumLicencia). (up to 16 characters) |
| `carta_porte.drivers[].name` | string | yes | Operator's name (NombreFigura). (up to 254 characters) |
| `carta_porte.drivers[].foreign` | object |  | If they're foreign: their country of residence (ResidenciaFiscal, c_Pais) and their tax registration number (NumRegIdTrib), with the generic RFC XEXX010101000. |
| `carta_porte.drivers[].foreign.tax_id` | string | yes | Tax identity registration number in their country (NumRegIdTrib). (up to 40 characters) |
| `carta_porte.drivers[].foreign.country` | string | yes | Country of tax residence, a 3-letter key from c_Pais (USA, CAN…). (3 characters) |
| `carta_porte.figures` | array of object |  | Other transport figures: 02 owner, 03 lessor, 04 notified party, 05 member of a coordinated group. (up to 10) |
| `carta_porte.figures[].type` | `02`, `03`, `04`, `05` | yes | Figure type (TipoFigura): 02 owner, 03 lessor, 04 notified party, 05 member. |
| `carta_porte.figures[].tax_id` | string |  | The figure's RFC (RFCFigura). |
| `carta_porte.figures[].foreign` | object |  | If they're foreign: their country of residence (ResidenciaFiscal, c_Pais) and their tax registration number (NumRegIdTrib), with the generic RFC XEXX010101000. |
| `carta_porte.figures[].foreign.tax_id` | string | yes | Tax identity registration number in their country (NumRegIdTrib). (up to 40 characters) |
| `carta_porte.figures[].foreign.country` | string | yes | Country of tax residence, a 3-letter key from c_Pais (USA, CAN…). (3 characters) |
| `carta_porte.figures[].name` | string | yes | The figure's name (NombreFigura). (up to 254 characters) |
| `carta_porte.figures[].parts` | array of string |  | Transport parts they own or lease (ParteTransporte), c_ParteTransporte. (up to 20) |
| `carta_porte.figures[].address` | object |  | Address (Domicilio). In Mexico the postal code is enough: state, municipality and locality are taken from c_CodigoPostal. |
| `carta_porte.figures[].address.street` | string |  | Street (Calle). (up to 100 characters) |
| `carta_porte.figures[].address.exterior` | string |  | Exterior number (NumeroExterior). (up to 55 characters) |
| `carta_porte.figures[].address.interior` | string |  | Interior number (NumeroInterior). (up to 55 characters) |
| `carta_porte.figures[].address.zip` | string | yes | Postal code (CodigoPostal). In Mexico, state, municipality and locality are derived from it. (up to 12 characters) |
| `carta_porte.figures[].address.country` | string |  | Country (Pais), c_Pais. MEX by default. (3 characters) |
| `carta_porte.figures[].address.state` | string |  | State (Estado): abroad, c_Estado for USA and CAN, or text. (up to 30 characters) |
| `carta_porte.figures[].address.municipality` | string |  | Municipality (Municipio), as text abroad. (up to 120 characters) |
| `carta_porte.figures[].address.locality` | string |  | Locality (Localidad), as text abroad. (up to 120 characters) |
| `carta_porte.figures[].address.colony` | string |  | Neighborhood (Colonia), as text abroad. (up to 120 characters) |
| `carta_porte_exemption` | `2.7.7.2.1`, `2.7.7.2.2`, `2.7.7.2.3` |  | Only on a delivery note (type T) without carta_porte: the RMF 2026 rule that allows it. 2.7.7.2.1 own goods on a local transfer (not medicines, hydrocarbons or goods for customs clearance); 2.7.7.2.2 parcel or courier delivery on the first or last mile, one line item per package with its tracking number in sku; 2.7.7.2.3 local towing or salvage truck, relating with related (05) the service's income invoice. Sending it declares that the transfer doesn't cross any stretch under federal jurisdiction. The line items go with unit_price 0 and taxability 01 (the default on a delivery note). |
| `ine` | object |  | INE complement (electoral processes). |
| `ine.process` | `Ordinario`, `Precampaña`, `Campaña` | yes | Process type (TipoProceso): Ordinario, Precampaña or Campaña. |
| `ine.committee` | `Ejecutivo Nacional`, `Ejecutivo Estatal`, `Directivo Estatal` |  | Committee type (TipoComite), with the Ordinario process. |
| `ine.accounting_id` | string |  | Accounting code (IdContabilidad), up to 6 digits. |
| `ine.entities` | array of object |  | Entities (Entidad): state code, scope and accounting codes. (up to 64) |
| `ine.entities[].key` | string | yes | Entity code (ClaveEntidad): the state's (JAL, QUE…), NAC (national) or the electoral district CR1 to CR5; these six don't go with Local scope. (3 characters) |
| `ine.entities[].scope` | `Local`, `Federal` |  | Scope (Ambito): Local or Federal. |
| `ine.entities[].accounting_ids` | array of string |  | Accounting codes (IdContabilidad). (up to 50) |
| `leyendas` | array of object |  | Tax legends complement. (up to 10) |
| `leyendas[].text` | string | yes | Text of the legend (textoLeyenda). (up to 1000 characters) |
| `leyendas[].disposition` | string |  | Tax provision (disposicionFiscal), for example LISR. (up to 30 characters) |
| `leyendas[].norm` | string |  | Rule or article (norma). (up to 100 characters) |
| `donation` | object |  | Donee complement: a donation receipt. The issuer must be a donee (tax_system 603) with its official letter in donation_authorization (POST /v1/issuers/{id}). |
| `donation.in_kind` | boolean |  | true if the donation is in kind (goods): it goes with payment form 12 (dación en pago) and one line item per type of good. |
| `donation.deducted` | boolean |  | true if the donor had already deducted the goods they donate: the receipt says the donation isn't deductible. |
| `local_taxes` | array of object |  | Local taxes (implocal complement): state transfers and withholdings. (up to 20) |
| `local_taxes[].retention` | boolean | yes | true if it's a local withholding; false if it's a transfer. |
| `local_taxes[].name` | string | yes | Name of the local tax (ImpLocTrasladado or ImpLocRetenido), like ISH. (up to 100 characters) |
| `local_taxes[].rate` | number | yes | Rate in percent (TasadeTraslado or TasadeRetencion). (from 0 to 100) |
| `local_taxes[].amount` | number | yes | Local tax amount. (from 0 to 1000000000000) |
| `export` | `01`, `02`, `03`, `04` |  | Export (Exportacion), c_Exportacion: 01 not applicable (default), 02 definitive with code A1 (carries comercio_exterior), 03 temporary (without it), 04 definitive with a code other than A1 or without a sale (with or without comercio_exterior; with it, incoterm optional). |
| `comercio_exterior` | object |  | Foreign trade complement 2.0. |
| `comercio_exterior.motive` | `99`, `01`, `02`, `03`, `04`, `05` |  | Transfer reason (MotivoTraslado), c_MotivoTraslado, only on a delivery note: 01 goods invoiced earlier (relate the sales invoice in related), 02 relocation of own goods, 03 consignment, 04 for later sale, 05 third-party property (with owners), 99 other. |
| `comercio_exterior.owners` | array of object |  | Owners of the goods if not the issuer (Propietario), with motive 05. (up to 10) |
| `comercio_exterior.owners[].tax_id` | string | yes | Owner's tax registration number (NumRegIdTrib). (up to 40 characters) |
| `comercio_exterior.owners[].country` | string | yes | Owner's country of residence (ResidenciaFiscal), c_Pais. (3 characters) |
| `comercio_exterior.incoterm` | string |  | Incoterm (Incoterm), c_INCOTERM: EXW, FOB, CIF, DAP, DDP… (3 characters) |
| `comercio_exterior.certificate` | string |  | Certificate of origin number (NumCertificadoOrigen). (up to 40 characters) |
| `comercio_exterior.usd_rate` | number | yes | Exchange rate to dollars (TipoCambioUSD). (greater than 0 and up to 1000000) |
| `comercio_exterior.issuer_curp` | string |  | CURP of the persona física issuer (Emisor Curp). (18 characters) |
| `comercio_exterior.issuer_address` | object |  | Issuer's address (Emisor Domicilio): street and numbers; the rest comes from its postal code. |
| `comercio_exterior.issuer_address.street` | string | yes | Street (Calle). (up to 100 characters) |
| `comercio_exterior.issuer_address.exterior` | string |  | Exterior number (NumeroExterior). (up to 55 characters) |
| `comercio_exterior.issuer_address.interior` | string |  | Interior number (NumeroInterior). (up to 55 characters) |
| `comercio_exterior.issuer_address.zip` | string |  | Issuer's postal code (CodigoPostal). |
| `comercio_exterior.receiver_address` | object |  | Recipient's address abroad (Receptor Domicilio). |
| `comercio_exterior.receiver_address.street` | string | yes | Street (Calle). (up to 100 characters) |
| `comercio_exterior.receiver_address.exterior` | string |  | Exterior number (NumeroExterior). (up to 55 characters) |
| `comercio_exterior.receiver_address.interior` | string |  | Interior number (NumeroInterior). (up to 55 characters) |
| `comercio_exterior.receiver_address.colony` | string |  | Neighborhood (Colonia), as text abroad. (up to 120 characters) |
| `comercio_exterior.receiver_address.locality` | string |  | Locality (Localidad), as text abroad. (up to 120 characters) |
| `comercio_exterior.receiver_address.municipality` | string |  | Municipality (Municipio), as text abroad. (up to 120 characters) |
| `comercio_exterior.receiver_address.state` | string |  | State (Estado), c_Estado for USA and CAN. (up to 30 characters) |
| `comercio_exterior.receiver_address.country` | string | yes | Country (Pais), c_Pais. (3 characters) |
| `comercio_exterior.receiver_address.zip` | string | yes | Postal code in its country (CodigoPostal). (up to 12 characters) |
| `comercio_exterior.recipient` | object |  | Consignee, if not the recipient (Destinatario). |
| `comercio_exterior.recipient.name` | string |  | Consignee's name (Nombre). (up to 300 characters) |
| `comercio_exterior.recipient.tax_id` | string |  | Consignee's tax registration number (NumRegIdTrib). (up to 40 characters) |
| `comercio_exterior.recipient.address` | object | yes | Consignee's address (Domicilio). |
| `comercio_exterior.recipient.address.street` | string | yes | Street (Calle). (up to 100 characters) |
| `comercio_exterior.recipient.address.exterior` | string |  | Exterior number (NumeroExterior). (up to 55 characters) |
| `comercio_exterior.recipient.address.interior` | string |  | Interior number (NumeroInterior). (up to 55 characters) |
| `comercio_exterior.recipient.address.colony` | string |  | Neighborhood (Colonia), as text abroad. (up to 120 characters) |
| `comercio_exterior.recipient.address.locality` | string |  | Locality (Localidad), as text abroad. (up to 120 characters) |
| `comercio_exterior.recipient.address.municipality` | string |  | Municipality (Municipio), as text abroad. (up to 120 characters) |
| `comercio_exterior.recipient.address.state` | string |  | State (Estado): abroad, c_Estado for USA and CAN, or text. (up to 30 characters) |
| `comercio_exterior.recipient.address.country` | string | yes | Country (Pais), c_Pais. MEX by default. (3 characters) |
| `comercio_exterior.recipient.address.zip` | string | yes | Postal code (CodigoPostal). In Mexico, state, municipality and locality are derived from it. (up to 12 characters) |
| `comercio_exterior.goods` | array of object | yes | Goods (Mercancia), one per exported line item. (up to 200) |
| `comercio_exterior.goods[].id` | string |  | Goods identification number (NoIdentificacion): its line item's sku. (up to 100 characters) |
| `comercio_exterior.goods[].tariff` | string |  | Tariff code (FraccionArancelaria), 10 digits with the NICO, current in c_FraccionArancelaria (look it up in `GET /v1/sat_catalogs/customs_tariffs`); one that isn't current is rejected before stamping. |
| `comercio_exterior.goods[].unit` | string |  | Customs unit (UnidadAduana), c_UnidadAduana; 99 for a service. With `tariff` it can be omitted: the tariff code's UMT from the SAT catalog is used (the SAT rejects another one with CCE161). |
| `comercio_exterior.goods[].quantity` | number |  | Quantity in the customs unit (CantidadAduana). (greater than 0 and up to 100000000000000) |
| `comercio_exterior.goods[].unit_value_usd` | number |  | Unit value in dollars (ValorUnitarioAduana). (from 0 to 10000000000000000) |
| `comercio_exterior.notes` | string |  | Complement remarks (Observaciones). (up to 300 characters) |
| `global` | object |  | Global invoice to the general public (InformacionGlobal): frequency, months and year. |
| `global.periodicity` | string | yes | Frequency (Periodicidad), c_Periodicidad: 01 daily, 02 weekly, 03 biweekly, 04 monthly, 05 two-monthly. |
| `global.months` | string | yes | Months (Meses), c_Meses: 01 to 12, or 13 to 18 for two-month periods. |
| `global.year` | integer | yes | Year (Año): the invoice date's or up to five years earlier (CFDI40136). (from 2019 to 2100) |
| `global.keep_concepts` | boolean |  | Only issuers with tax regime 603 (donees and associations): true keeps each line item's description, codes, unit and quantity instead of «Venta», 01010101, ACT. |
| `use` | string |  | CFDI use (UsoCFDI), a c_UsoCFDI key. G03 by default, or S01 with regime 616. |
| `payment_form` | string |  | Payment form (FormaPago), a c_FormaPago key: 01 cash, 03 transfer, 04 credit card, 28 debit, 99 to be defined… Required with PUE; with PPD it's 99. |
| `payment_method` | `PUE`, `PPD` |  | Payment method (MetodoPago): PUE (a single payment, the default) or PPD (in installments or deferred, collected with payment complements). |
| `paid_later` | boolean |  | With PUE: true if it hasn't been paid yet («Por cobrar» in the app) even though it will be paid this month. |
| `currency` | string |  | Currency, an ISO 4217 key from c_Moneda (MXN, USD, EUR…). MXN by default. (3 characters) |
| `series` | string |  | Series (Serie), up to 25 characters. Each series has its own folios. (up to 25 characters) |
| `notes` | string |  | Remarks that appear on the PDF (they don't go into the XML). (up to 1000 characters) |
| `payment_terms` | string |  | Payment terms (CondicionesDePago), up to 1,000 characters without «\|»: «Crédito a 30 días», «50 % anticipo». They go in the XML and the PDF; income and expense receipts only. They don't change when it is due (due_date uses the customer's credit days). (up to 1000 characters) |
| `pdf_language` | `es`, `en`, `bi` |  | PDF language: es (default) or en. |
| `addenda` | object |  | The recipient's addenda (Walmart, Soriana…), with its own fields. |
| `related` | object |  | Related CFDIs (CfdiRelacionados): relation type from c_TipoRelacion and the UUIDs. |
| `related.relationship` | string | yes | Relation type (TipoRelacion): 01 credit note, 03 return, 04 replacement, 07 advance payment… |
| `related.uuids` | array of string | yes | Related tax folios. (up to 20) |
| `exchange_rate` | number |  | Exchange rate to pesos (TipoCambio). Required if the currency isn't MXN; use the DOF's from the previous day. (greater than 0 and up to 1000000) |
| `folio` | integer |  | Folio (Folio). Fiscalisto assigns the series' next one; only send one if it must be that one. (from 1 to 2000000000) |
| `continue_sequence` | boolean |  | With a chosen folio: true so the following ones continue from that number. |
| `date` | string |  | Issue date (Fecha) if not now, YYYY-MM-DDTHH:MM:SS Mexico City time: up to 72 hours earlier. |
| `send_email` | boolean |  | true to send the PDF and the XML by email when stamping, with Fiscalisto's design. Not sent by default. (default false) |
| `email_cc` | string or null |  | CC emails, separated by commas. |
| `metadata` | object |  | Your own data: up to 50 keys of 40 characters with text values of up to 500. They don't go into the CFDI; they come back in the object and in webhooks. |
| `async` | boolean |  | Only in POST /v1/invoices. true: it answers 202 as soon as the invoice is saved with its folio (status processing) and stamps it after answering; invoice.stamped or invoice.failed say how it ended. On the other routes that receive an invoice it changes nothing. (default false) |

Example:

```json
{
  "customer": {
    "tax_id": "ICV060329BY0",
    "legal_name": "INMOBILIARIA CVA",
    "tax_system": "601",
    "zip": "33826",
    "email": "pagos@cva.example"
  },
  "payment_form": "03",
  "items": [
    {
      "description": "Mensualidad",
      "product_key": "86121700",
      "quantity": 2,
      "unit_price": 2500
    }
  ],
  "send_email": true,
  "metadata": {
    "pedido": "A-1042"
  }
}
```

## With the TypeScript SDK

```ts
import { Fiscalisto } from "fiscalisto";

// La llave viene de FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const invoice = await fiscalisto.invoices.create({
  customer: {
    tax_id: "ICV060329BY0",
    legal_name: "INMOBILIARIA CVA",
    tax_system: "601",
    zip: "33826",
    email: "pagos@cva.example",
  },
  payment_form: "03",
  items: [
    {
      description: "Mensualidad",
      product_key: "86121700",
      quantity: 2,
      unit_price: 2500,
    },
  ],
  send_email: true,
  metadata: { pedido: "A-1042" },
}, { idempotencyKey: "pedido-A-1042" });
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

# La llave viene de FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

invoice = fiscalisto.invoices.create({
    "customer": {
        "tax_id": "ICV060329BY0",
        "legal_name": "INMOBILIARIA CVA",
        "tax_system": "601",
        "zip": "33826",
        "email": "pagos@cva.example",
    },
    "payment_form": "03",
    "items": [
        {
            "description": "Mensualidad",
            "product_key": "86121700",
            "quantity": 2,
            "unit_price": 2500,
        },
    ],
    "send_email": True,
    "metadata": {"pedido": "A-1042"},
}, idempotency_key="pedido-A-1042")
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$invoice = $fiscalisto->invoices->create([
    'customer' => [
        'tax_id' => 'ICV060329BY0',
        'legal_name' => 'INMOBILIARIA CVA',
        'tax_system' => '601',
        'zip' => '33826',
        'email' => 'pagos@cva.example',
    ],
    'payment_form' => '03',
    'items' => [
        [
            'description' => 'Mensualidad',
            'product_key' => '86121700',
            'quantity' => 2,
            'unit_price' => 2500,
        ],
    ],
    'send_email' => true,
    'metadata' => ['pedido' => 'A-1042'],
], ['idempotency_key' => 'pedido-A-1042']);
```

## With the .NET SDK

```csharp
using Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var invoice = await fiscalisto.Invoices.CreateAsync(new InvoiceCreate
{
    Customer = new InvoiceCreateCustomer
    {
        TaxId = "ICV060329BY0",
        LegalName = "INMOBILIARIA CVA",
        TaxSystem = "601",
        Zip = "33826",
        Email = "pagos@cva.example",
    },
    PaymentForm = "03",
    Items = new()
    {
        new()
        {
            Description = "Mensualidad",
            ProductKey = "86121700",
            Quantity = 2,
            UnitPrice = 2500,
        },
    },
    SendEmail = true,
    Metadata = new() { ["pedido"] = "A-1042" },
}, new RequestOptions { IdempotencyKey = "pedido-A-1042" });
```

## With the Go SDK

```go
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// La llave viene de FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	invoice, err := client.Invoices.Create(ctx, &fiscalisto.InvoiceCreate{
		Customer: fiscalisto.ObjectOf(fiscalisto.InvoiceCreateCustomer{
			TaxID:     "ICV060329BY0",
			LegalName: "INMOBILIARIA CVA",
			TaxSystem: "601",
			Zip:       "33826",
			Email:     fiscalisto.String("pagos@cva.example"),
		}),
		PaymentForm: fiscalisto.String("03"),
		Items: []fiscalisto.InvoiceCreateItem{
			{
				Description: fiscalisto.String("Mensualidad"),
				ProductKey:  fiscalisto.String("86121700"),
				Quantity:    fiscalisto.Float64(2),
				UnitPrice:   fiscalisto.Float64(2500),
			},
		},
		SendEmail: fiscalisto.Bool(true),
		Metadata:  map[string]string{"pedido": "A-1042"},
	}, fiscalisto.WithIdempotencyKey("pedido-A-1042"))
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(invoice.ID)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.RequestOptions;
import com.fiscalisto.model.InvoiceCreate;
import com.fiscalisto.model.InvoiceCreateCustomer;
import com.fiscalisto.model.InvoiceCreateItem;
import java.util.List;
import java.util.Map;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var invoice = fiscalisto.invoices().create(new InvoiceCreate()
        .setCustomer(new InvoiceCreateCustomer()
                .setTaxId("ICV060329BY0")
                .setLegalName("INMOBILIARIA CVA")
                .setTaxSystem("601")
                .setZip("33826")
                .setEmail("pagos@cva.example"))
        .setPaymentForm("03")
        .setItems(List.of(
                new InvoiceCreateItem()
                        .setDescription("Mensualidad")
                        .setProductKey("86121700")
                        .setQuantity(2)
                        .setUnitPrice(2500)
        ))
        .setSendEmail(true)
        .setMetadata(Map.of("pedido", "A-1042")), RequestOptions.idempotencyKey("pedido-A-1042"));
System.out.println(invoice.getId());
```

## Response 201

OK. Repeating the request with the same Idempotency-Key answers the same, with the same status and the idempotent-replayed: true header.

A `Invoice` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `object` | `"invoice"` | yes | What kind of object it is («invoice», «customer»…). |
| `issuer` | string | yes | The issuer (iss_…). |
| `branch` | string or null | yes | The branch (brn_…) it was stamped from, or null (the issuer's tax address). Its payments and credit notes follow it. |
| `cost_center` | string or null | yes | Its cost center (ccn_…), or null. The one sent when creating it, or the one set or changed later with POST /v1/invoices/{id}. |
| `type` | `I`, `E`, `P`, `T`, `N` | yes | Receipt type (TipoDeComprobante): I income, E expense, P payment, T transfer, N payroll. |
| `status` | `processing`, `pending`, `valid`, `rejected`, `canceled` | yes | processing: the PAC hasn't answered (it resolves on its own; listen for invoice.stamped). valid: stamped. pending: stamped, without the UUID yet (it resolves on its own, like processing). A cancellation waiting on the customer doesn't change status: it stays valid, with cancellation.status pending. rejected: the SAT or the PAC didn't accept it (see error). canceled: canceled. |
| `uuid` | string or null | yes | Tax folio the SAT assigns (UUID of the Timbre Fiscal Digital), in uppercase. |
| `series` | string or null | yes | The series (Serie) it was stamped with, or null. |
| `folio` | string or null | yes | Internal folio. On a rejected one it is the one attempted: it isn't used up, and the series' next CFDI uses it. |
| `date` | string or null | yes | Issue date (Fecha), Mexico City time. |
| `customer` | object | yes | The customer (Receptor) as it ended up in the CFDI: RFC, name, tax regime and postal code (and foreign if they are abroad). |
| `customer.tax_id` | string or null | yes | RFC (Rfc), 12 characters for a persona moral and 13 for a persona física. |
| `customer.legal_name` | string or null | yes | Name or razón social exactly as on the constancia de situación fiscal, without the capital regime (without «S.A. de C.V.»). |
| `customer.tax_system` | string |  | Tax regime (RegimenFiscal), a c_RegimenFiscal key: 601, 612, 626… |
| `customer.zip` | string |  | Postal code of the customer's tax address (DomicilioFiscalReceptor), 5 digits. |
| `customer.foreign` | object |  | If they're foreign: their country of residence (ResidenciaFiscal, c_Pais) and their tax registration number (NumRegIdTrib), with the generic RFC XEXX010101000. |
| `use` | string or null | yes | CFDI use (UsoCFDI), a c_UsoCFDI key. G03 by default, or S01 with regime 616. |
| `payment_form` | string or null | yes | Payment form (FormaPago), a c_FormaPago key: 01 cash, 03 transfer, 04 credit card, 28 debit, 99 to be defined… Required with PUE; with PPD it's 99. |
| `payment_method` | string or null | yes | Payment method (MetodoPago): PUE (a single payment, the default) or PPD (in installments or deferred, collected with payment complements). |
| `payment_terms` | string or null | yes | Payment terms (CondicionesDePago), up to 1,000 characters without «\|»: «Crédito a 30 días», «50 % anticipo». They go in the XML and the PDF; income and expense receipts only. They don't change when it is due (due_date uses the customer's credit days). |
| `notes` | string or null | yes | Note for the customer: it appears on the PDF, not in the XML. Changed after stamping with POST /v1/invoices/{id} (the XML doesn't change; the next PDF carries it). |
| `currency` | string | yes | Currency, an ISO 4217 key from c_Moneda (MXN, USD, EUR…). MXN by default. |
| `exchange_rate` | number or null | yes | Exchange rate to pesos (TipoCambio). Required if the currency isn't MXN; use the DOF's from the previous day. |
| `items` | array of object | yes | Line items (Conceptos), at least one. |
| `subtotal` | number or null | yes | Sum of the amounts before taxes and discounts (SubTotal). |
| `discount` | number or null | yes | Discount (Descuento). |
| `taxes` | object or null | yes | The receipt's taxes summed by type: IVA and IEPS transferred, IVA and ISR withheld and local taxes; null on a payment complement. |
| `taxes.iva` | number or null | yes | IVA transferred. |
| `taxes.ieps` | number or null | yes | IEPS transferred. |
| `taxes.iva_withheld` | number or null | yes | IVA withheld. |
| `taxes.isr_withheld` | number or null | yes | ISR withheld. |
| `taxes.local_transferred` | number or null | yes | Local taxes transferred. |
| `taxes.local_withheld` | number or null | yes | Local taxes withheld. |
| `total` | number or null | yes | Total in the receipt's currency (Total). |
| `payment_status` | `paid`, `partial`, `unpaid` or null | yes | Whether it has been collected (Cuentas por cobrar): paid, partial (payment complements or credit notes for part of it) or unpaid. A PUE is paid, except with paid_later until POST /v1/invoices/{id}/mark_paid. null if it isn't income or isn't valid. |
| `amount_due` | number or null | yes | What is left to collect, in its currency, or null. |
| `amount_paid` | number or null | yes | What was collected: valid payment complements and credit notes, or everything if it is a paid PUE. null if it doesn't apply. |
| `paid_on` | string or null | yes | A PUE that was pending collection (paid_later or mark_unpaid): the day the customer paid (YYYY-MM-DD), the one given to POST /v1/invoices/{id}/mark_paid or that of the deposit reconciled with it. null if there is no recorded payment date (a PUE paid when stamped), if it hasn't been paid or if it is PPD (its payments are in its complements). |
| `due_date` | string or null | yes | While it is still to be collected (unpaid or partial): the day it is due (YYYY-MM-DD), its date plus the credit days on the customer's record (or their customer group's) or, without them, the empresa's (30 if you didn't change them); a PUE with paid_later, the last day of its month. These are the days Cuentas por cobrar and the collection reminders use. null if it was already paid or doesn't apply. |
| `related` | object or null | yes | Related CFDIs (CfdiRelacionados): relation type from c_TipoRelacion and the UUIDs. |
| `payment` | object or null |  | Only on a payment complement (type P). |
| `payment.date` | string or null | yes | Payment date (FechaPago). |
| `payment.payment_form` | string or null | yes | Payment form (FormaPago), a c_FormaPago key: 01 cash, 03 transfer, 04 credit card, 28 debit, 99 to be defined… Required with PUE; with PPD it's 99. |
| `payment.currency` | string | yes | Payment currency (MonedaP). |
| `payment.exchange_rate` | number or null | yes | Exchange rate to pesos (TipoCambio). Required if the currency isn't MXN; use the DOF's from the previous day. |
| `payment.amount` | number | yes | Payment amount (Monto). |
| `payment.operation_number` | string or null | yes | Payment's operation number (NumOperacion), like the SPEI tracking key. |
| `payment.documents` | array of object | yes | The invoices it pays (DoctoRelacionado). |
| `payment.documents[].uuid` | string | yes | Tax folio the SAT assigns (UUID of the Timbre Fiscal Digital), in uppercase. |
| `payment.documents[].series` | string or null | yes | Series of the invoice paid. |
| `payment.documents[].folio` | string or null | yes | Folio of the invoice paid. |
| `payment.documents[].currency` | string | yes | Currency of the invoice paid (MonedaDR). |
| `payment.documents[].partiality` | integer | yes | Installment number (NumParcialidad). (from -9007199254740991 to 9007199254740991) |
| `payment.documents[].previous_balance` | number | yes | Previous balance of the invoice (ImpSaldoAnt). |
| `payment.documents[].amount` | number | yes | What is paid of that invoice (ImpPagado), in the invoice's currency. |
| `payment.documents[].remaining` | number | yes | Outstanding balance after this payment (ImpSaldoInsoluto). |
| `payroll` | object |  | The payroll complement 1.2 as stamped: type, period, employer, employee, earnings, deductions, other payments, their nodes and the totals. |
| `payroll.type` | `O`, `E` | yes | TipoNomina: O ordinary, E extraordinary. |
| `payroll.calculation` | `fiscalisto`, `external` | yes | fiscalisto: Fiscalisto calculated it (POST /v1/payroll_receipts); external: your payroll system calculated it and it was stamped as is (POST /v1/payroll_receipts/external). |
| `payroll.periodicity` | string | yes | Pay frequency (PeriodicidadPago): 02 weekly, 03 every 14 days, 04 every two weeks (the default), 05 monthly. |
| `payroll.period` | object | yes | Period paid: FechaInicialPago, FechaFinalPago and FechaPago. |
| `payroll.period.start` | string | yes | First day of the period (FechaInicialPago), YYYY-MM-DD. |
| `payroll.period.end` | string | yes | Last day of the period (FechaFinalPago), YYYY-MM-DD. |
| `payroll.period.payment_date` | string | yes | Payment date (FechaPago), YYYY-MM-DD. The last day of the period by default. |
| `payroll.days` | number | yes | Days paid (NumDiasPagados). By default, all the period's days that apply to them. |
| `payroll.references` | object or null | yes | Your payroll system's ids (external receipts only). |
| `payroll.references.employee_id` | string or null | yes | The employee's id in your payroll system. |
| `payroll.references.payroll_run_id` | string or null | yes | The payroll run's id in your system. |
| `payroll.employer` | object | yes | The employer (Emisor of the complement): employer registration and CURP if it is a persona física. |
| `payroll.employer.employer_registration` | string or null | yes | Employer registration with IMSS (RegistroPatronal), 11 characters. Required to stamp payroll. |
| `payroll.employer.curp` | string or null | yes | CURP, 18 characters. |
| `payroll.employer.origin_tax_id` | string |  | Origin employer's RFC (RfcPatronOrigen). |
| `payroll.employer.sncf` | object |  | SNCF entity (EntidadSNCF). |
| `payroll.employer.sncf.resource_origin` | string | yes | Source of funds (OrigenRecurso): IP, IF or IM. |
| `payroll.employer.sncf.own_resource_amount` | number or null | yes | Own funds amount (MontoRecursoPropio), with IM. |
| `payroll.employee` | object | yes | The employee (Nomina/Receptor), as stamped. |
| `payroll.employee.id` | string or null | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `payroll.employee.number` | string | yes | Employee number (NumEmpleado). |
| `payroll.employee.curp` | string | yes | CURP, 18 characters. |
| `payroll.employee.social_security_number` | string or null | yes | Social security number (NumSeguridadSocial), 11 digits. |
| `payroll.employee.start_date` | string or null | yes | Start date of the employment relationship (FechaInicioRelLaboral), YYYY-MM-DD. |
| `payroll.employee.seniority` | string or null | yes | Seniority (P52W, P1Y2M3D). |
| `payroll.employee.contract_type` | string | yes | Contract type (TipoContrato), c_TipoContrato. 01 by default, permanent. |
| `payroll.employee.unionized` | boolean or null | yes | true if they're unionized (Sindicalizado). |
| `payroll.employee.workday_type` | string or null | yes | Shift type (TipoJornada), c_TipoJornada. 01 by default, day shift. |
| `payroll.employee.regime_type` | string | yes | Regime type (TipoRegimen): 02 wages and salaries. |
| `payroll.employee.department` | string or null | yes | Department (Departamento). |
| `payroll.employee.position` | string or null | yes | Position (Puesto). |
| `payroll.employee.risk_class` | string or null | yes | The position's risk class with IMSS (RiesgoPuesto), 1 to 5. 1 by default. |
| `payroll.employee.contribution_base_salary` | number or null | yes | Contribution base salary (SalarioBaseCotApor). |
| `payroll.employee.integrated_daily_salary` | number or null | yes | Integrated daily salary (SalarioDiarioIntegrado): not lower than the daily salary. |
| `payroll.employee.state` | string | yes | State where they work (ClaveEntFed): JAL, CMX, NLE… |
| `payroll.employee.bank` | string |  | Bank (Banco), c_Banco. |
| `payroll.employee.bank_account` | string |  | Bank account or CLABE (CuentaBancaria). |
| `payroll.employee.subcontracting` | array of object |  | Subcontracting (SubContratacion). |
| `payroll.employee.subcontracting[].tax_id` | string | yes | RFC (Rfc), 12 characters for a persona moral and 13 for a persona física. |
| `payroll.employee.subcontracting[].percentage` | number | yes | Time percentage (PorcentajeTiempo). |
| `payroll.perceptions` | array of object | yes | Earnings (Percepcion): wages and the rest, taxable and exempt. |
| `payroll.perceptions[].type` | string | yes | Earning type (TipoPercepcion), c_TipoPercepcion: 001 wages… |
| `payroll.perceptions[].key` | string | yes | Employer's code (Clave). |
| `payroll.perceptions[].concept` | string | yes | Concept (Concepto). |
| `payroll.perceptions[].taxed` | number | yes | Taxable amount (ImporteGravado). |
| `payroll.perceptions[].exempt` | number | yes | Exempt amount (ImporteExento). |
| `payroll.perceptions[].overtime` | array of object |  | Overtime (HorasExtra), with earning 019. |
| `payroll.perceptions[].overtime[].days` | integer | yes | Days with overtime (Dias). (from -9007199254740991 to 9007199254740991) |
| `payroll.perceptions[].overtime[].hours_type` | string | yes | c_TipoHoras: 01 double, 02 triple, 03 single. |
| `payroll.perceptions[].overtime[].hours` | integer | yes | Overtime hours (HorasExtra). (from -9007199254740991 to 9007199254740991) |
| `payroll.perceptions[].overtime[].amount_paid` | number | yes | Amount paid (ImportePagado). |
| `payroll.perceptions[].stock_options` | object |  | Shares or securities (AccionesOTitulos), with earning 045. |
| `payroll.perceptions[].stock_options.market_value` | number | yes | Market value (ValorMercado). |
| `payroll.perceptions[].stock_options.grant_price` | number | yes | Price when granted (PrecioAlOtorgarse). |
| `payroll.deductions` | array of object | yes | Deductions (Deduccion): ISR, IMSS contributions and the rest. |
| `payroll.deductions[].type` | string | yes | Deduction type (TipoDeduccion), c_TipoDeduccion: 001 IMSS, 002 ISR… |
| `payroll.deductions[].key` | string | yes | Employer's code (Clave). |
| `payroll.deductions[].concept` | string | yes | Concept (Concepto). |
| `payroll.deductions[].amount` | number | yes | Amount (Importe). |
| `payroll.other_payments` | array of object | yes | Other payments (OtroPago): employment subsidy. |
| `payroll.other_payments[].type` | string | yes | Other payment type (TipoOtroPago), c_TipoOtroPago: 002 employment subsidy. |
| `payroll.other_payments[].key` | string | yes | Employer's code (Clave). |
| `payroll.other_payments[].concept` | string | yes | Concept (Concepto). |
| `payroll.other_payments[].amount` | number | yes | Amount paid (Importe). |
| `payroll.other_payments[].subsidy_caused` | number |  | Subsidy accrued (SubsidioCausado). |
| `payroll.other_payments[].subsidy_applied` | number |  | Of the subsidy accrued, the ISR it avoided (not in the XML). |
| `payroll.other_payments[].balance_compensation` | object |  | Offset of the balance in favor (CompensacionSaldosAFavor), with 004. |
| `payroll.other_payments[].balance_compensation.balance` | number | yes | Balance in favor (SaldoAFavor). |
| `payroll.other_payments[].balance_compensation.year` | integer | yes | Year of the balance in favor (Año). (from -9007199254740991 to 9007199254740991) |
| `payroll.other_payments[].balance_compensation.remaining` | number | yes | Remainder of the balance in favor (RemanenteSalFav). |
| `payroll.separation` | object |  | SeparacionIndemnizacion (earnings 022, 023, 025). |
| `payroll.separation.total_paid` | number | yes | Total paid (TotalPagado). |
| `payroll.separation.years_of_service` | integer | yes | Years of service (NumAñosServicio). (from -9007199254740991 to 9007199254740991) |
| `payroll.separation.last_monthly_salary` | number | yes | Last ordinary monthly salary (UltimoSueldoMensOrd). |
| `payroll.separation.accumulable_income` | number | yes | Cumulative income (IngresoAcumulable). |
| `payroll.separation.non_accumulable_income` | number | yes | Non-cumulative income (IngresoNoAcumulable). |
| `payroll.retirement` | object |  | JubilacionPensionRetiro (earnings 039, 044). |
| `payroll.retirement.total_one_payment` | number |  | Total in a single payment (TotalUnaExhibicion). |
| `payroll.retirement.total_installment` | number |  | Total in installments (TotalParcialidad). |
| `payroll.retirement.daily_amount` | number |  | Daily amount (MontoDiario). |
| `payroll.retirement.accumulable_income` | number | yes | Cumulative income (IngresoAcumulable). |
| `payroll.retirement.non_accumulable_income` | number | yes | Non-cumulative income (IngresoNoAcumulable). |
| `payroll.disabilities` | array of object |  | Disabilities (earning 014 or deduction 006). |
| `payroll.disabilities[].days` | integer | yes | Days paid (NumDiasPagados). By default, all the period's days that apply to them. (from -9007199254740991 to 9007199254740991) |
| `payroll.disabilities[].type` | string | yes | Receipt type (TipoDeComprobante): I income, E expense, P payment, T transfer, N payroll. |
| `payroll.disabilities[].amount` | number or null | yes | Amount. |
| `payroll.imss_days` | object |  | On a receipt Fiscalisto calculated: the IMSS days. |
| `payroll.imss_days.calendar_days` | integer | yes | Calendar days of the period they worked for the employer: IMSS contributions accrue per calendar month (LSS art. 39), not per days paid. (from -9007199254740991 to 9007199254740991) |
| `payroll.imss_days.absences` | integer | yes | Absences on the receipt. (from -9007199254740991 to 9007199254740991) |
| `payroll.imss_days.disability_days` | integer | yes | Sick-leave days on the receipt. (from -9007199254740991 to 9007199254740991) |
| `payroll.imss_days.sickness_and_maternity` | integer | yes | Days contributed for sickness and maternity (surplus, cash benefits, pensioners' medical expenses): the period without the sick leave; absences count (LSS art. 31 fr. I). (from -9007199254740991 to 9007199254740991) |
| `payroll.imss_days.disability_and_old_age` | integer | yes | Days contributed for disability and life and for old-age and severance retirement: also without the absences, up to 7 per month. (from -9007199254740991 to 9007199254740991) |
| `payroll.totals` | object | yes | Totals: earnings, deductions, other payments and net pay. |
| `payroll.totals.salaries` | number | yes | Total wages, salaries and assimilated income (TotalSueldos). |
| `payroll.totals.taxed` | number | yes | Total taxable (TotalGravado). |
| `payroll.totals.exempt` | number | yes | Total exempt (TotalExento). |
| `payroll.totals.separation` | number | yes | Total separation and severance (TotalSeparacionIndemnizacion). |
| `payroll.totals.retirement` | number | yes | Total retirement, pension or withdrawal (TotalJubilacionPensionRetiro). |
| `payroll.totals.perceptions` | number | yes | Total earnings (TotalPercepciones). |
| `payroll.totals.other_deductions` | number | yes | Other deductions (TotalOtrasDeducciones). |
| `payroll.totals.taxes_withheld` | number | yes | Taxes withheld (TotalImpuestosRetenidos). |
| `payroll.totals.deductions` | number | yes | Total deductions (TotalDeducciones). |
| `payroll.totals.other_payments` | number | yes | Total other payments (TotalOtrosPagos). |
| `payroll.totals.subtotal` | number | yes | Receipt subtotal: earnings plus other payments. |
| `payroll.totals.net` | number | yes | Net pay for the employee. |
| `global` | object |  | Only on a global invoice. |
| `cancellation` | object or null | yes | The cancellation, if requested: status, reason, replacement and when. |
| `cancellation.status` | string or null | yes | `pending`: the SAT has the request (it finishes it in minutes, or waits for the recipient's answer). `accepted`: canceled. `rejected`: the recipient rejected it. `lapsed`: the SAT never recorded it; it can be requested again. `scheduled`: the SAT doesn't accept it yet (it doesn't have the replacing CFDI on record, or briefly rejected the signature) and Fiscalisto requests it again on its own. `failed`: Fiscalisto stopped trying; request it again with POST /v1/invoices/{id}/cancel. |
| `cancellation.motive` | string or null | yes | Cancellation reason (c_MotivoCancelacion): 01 with errors, related (carries substitution), 02 with errors, not related (the default), 03 didn't take place, 04 only on a global invoice, when an included sale was invoiced in the customer's name. |
| `cancellation.substitution` | string or null | yes | The CFDI that replaces this one (its id or its UUID), with reason 01. |
| `cancellation.canceled_at` | string (date-time) or null | yes | When it was canceled. |
| `cancellation.next_attempt_at` | string (date-time) or null | yes | With `scheduled`: when Fiscalisto requests it again (null: within the next 15 minutes). |
| `cancellation.error` | string or null | yes | With `scheduled` or `failed`: why it hasn't gone through. |
| `email` | object or null | yes | The email send: to whom, cc to whom and when (null if it hasn't been sent). |
| `email.to` | string or null | yes | To whom (emails separated by commas). |
| `email.cc` | string or null | yes | CC (emails separated by commas). |
| `email.sent_at` | string (date-time) or null | yes | When it was sent. |
| `email.status` | `sent`, `delayed`, `delivered`, `opened`, `bounced`, `complained` | yes | What happened with the last send: the worst of its recipients (bounced or complained weigh more than opened or delivered). sent until the customer's server answers. |
| `email.recipients` | array of object | yes | Each address of the send (to and cc), with its delivery. |
| `email.recipients[].address` | string | yes | The recipient's email address. |
| `email.recipients[].status` | `sent`, `delayed`, `delivered`, `opened`, `bounced`, `complained` | yes | Object status. |
| `email.recipients[].delivered_at` | string (date-time) or null | yes | When the recipient's server accepted it. |
| `email.recipients[].opened_at` | string (date-time) or null | yes | The first time it was opened (approximate: some email clients load images on their own or don't load them). |
| `email.recipients[].bounced_at` | string (date-time) or null | yes | When it bounced. |
| `email.recipients[].bounce_reason` | string or null | yes | Why it bounced, in Spanish: «buzón no existe», «buzón lleno»… |
| `email.recipients[].complained_at` | string (date-time) or null | yes | When the recipient marked it as spam. |
| `error` | object or null | yes | Why the SAT or the PAC didn't accept it: message, SAT code and original text. |
| `error.message` | string | yes | What happened and how to fix it, for a person. |
| `error.sat_code` | string or null | yes | SAT or PAC code (CFDI40xxx). |
| `error.raw` | string | yes | The PAC's original text. |
| `recurring_invoice` | string or null | yes | The recurring invoice (rin_…) that stamped it on its own, or null if it was stamped with a call. |
| `tickets` | array of string | yes | The tickets (`tkt_…`) it invoices: the one your customer invoiced through autofactura, the one your team invoiced from the ticket's page, or the ones associated with it. Empty otherwise; a global invoice's tickets are in GET /v1/tickets with `status=global`. |
| `origin` | object or null | yes | What stamped the invoice; `null` if it was stamped outside Fiscalisto. |
| `origin.type` | `app`, `api`, `assistant`, `point_of_sale`, `autofactura`, `invoice_link`, `quote`, `recurring_invoice`, `global_invoice` | yes | What stamped it: `app` (a person in Fiscalisto), `api`, `assistant` (an AI assistant through MCP), `point_of_sale` (a point-of-sale key), `autofactura` (your customer with a ticket, or the buyer's data from Stripe or Mercado Libre), `invoice_link` (your customer filling in the invoice link), `quote` (your customer accepting the quote), `recurring_invoice` (a recurring invoice by itself) or `global_invoice` (the tickets' automatic global invoice). |
| `origin.name` | string or null | yes | The name of the API or point-of-sale key, the assistant («ChatGPT») or where an autofactura's buyer data came from («Stripe»). |
| `created_at` | string (date-time) or null | yes | When it was created, ISO 8601 with Mexico City time (-06:00). |
| `metadata` | object | yes | Your own data: up to 50 keys of 40 characters with text values of up to 500. They don't go into the CFDI; they come back in the object and in webhooks. |
| `warnings` | array of string |  | Warnings about the invoice (only in the response that stamps it or, with 202, the one that leaves it processing): it is stamped as sent. |
| `email_error` | string |  | Why the email couldn't be sent; the receipt was stamped. |
| `substitutes` | object |  | The invoice this one replaced and whether it was canceled. |
| `substitutes.invoice` | string | yes | The replaced invoice (inv_…). |
| `substitutes.canceled` | boolean | yes | true if the replaced one is already canceled. false isn't final: see substitutes.cancellation. |
| `substitutes.cancel_error` | string |  | Why the replaced one couldn't be canceled (cancel it with POST /v1/invoices/{id}/cancel). |
| `substitutes.cancellation` | object or null | yes | The previous one's cancellation, same as its `cancellation` in GET /v1/invoices/{id}: `accepted` if it is already canceled, `pending` if the SAT is finishing it (or waiting for the recipient), `scheduled` if Fiscalisto requests it again on its own, `failed` if it must be requested again. The previous one's webhook says when it changes. |
| `substitutes.cancellation.status` | string or null | yes | `pending`: the SAT has the request (it finishes it in minutes, or waits for the recipient's answer). `accepted`: canceled. `rejected`: the recipient rejected it. `lapsed`: the SAT never recorded it; it can be requested again. `scheduled`: the SAT doesn't accept it yet (it doesn't have the replacing CFDI on record, or briefly rejected the signature) and Fiscalisto requests it again on its own. `failed`: Fiscalisto stopped trying; request it again with POST /v1/invoices/{id}/cancel. |
| `substitutes.cancellation.motive` | string or null | yes | Cancellation reason (c_MotivoCancelacion): 01 with errors, related (carries substitution), 02 with errors, not related (the default), 03 didn't take place, 04 only on a global invoice, when an included sale was invoiced in the customer's name. |
| `substitutes.cancellation.substitution` | string or null | yes | The CFDI that replaces this one (its id or its UUID), with reason 01. |
| `substitutes.cancellation.canceled_at` | string (date-time) or null | yes | When it was canceled. |
| `substitutes.cancellation.next_attempt_at` | string (date-time) or null | yes | With `scheduled`: when Fiscalisto requests it again (null: within the next 15 minutes). |
| `substitutes.cancellation.error` | string or null | yes | With `scheduled` or `failed`: why it hasn't gone through. |
| `advance_application` | object |  | The advance payment's application: method, application note and its status. |
| `advance_application.advance` | string or null | yes | The advance payment, as an invoice (inv_…). |
| `advance_application.advance_uuid` | string | yes | The advance payment's tax folio. |
| `advance_application.method` | `egreso`, `remanente` | yes | egreso (the full invoice and then a credit note for the advance payment, option A) or remanente (the invoice only for what's left, option B). |
| `advance_application.status` | `done`, `credit_note_pending` | yes | done (ready) or credit_note_pending (the application note still has to be stamped: repeat the request with the same Idempotency-Key). |
| `advance_application.credit_note` | string or null | yes | The advance payment's application note (inv_…), with method egreso. |
| `advance_application.credit_note_error` | string |  | Why the application note wasn't stamped (repeat with the same Idempotency-Key). |

```json
{
  "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg",
  "object": "invoice",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "branch": null,
  "cost_center": null,
  "type": "I",
  "status": "valid",
  "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718",
  "series": null,
  "folio": "1",
  "date": "2026-10-24T10:15:42",
  "customer": {
    "tax_id": "ICV060329BY0",
    "legal_name": "INMOBILIARIA CVA",
    "tax_system": "601",
    "zip": "33826"
  },
  "use": "G03",
  "payment_form": "03",
  "payment_method": "PUE",
  "payment_terms": null,
  "notes": null,
  "currency": "MXN",
  "exchange_rate": null,
  "items": [
    {
      "description": "Mensualidad",
      "product_key": "86121700",
      "unit_key": "E48",
      "unit_name": "Unidad de servicio",
      "sku": "MEN-1",
      "quantity": 2,
      "unit_price": 2500,
      "taxability": "02",
      "iva": "0.16"
    }
  ],
  "subtotal": 5000,
  "discount": 0,
  "taxes": {
    "iva": 800,
    "ieps": 0,
    "iva_withheld": 0,
    "isr_withheld": 0,
    "local_transferred": 0,
    "local_withheld": 0
  },
  "total": 5800,
  "payment_status": "paid",
  "amount_due": 0,
  "amount_paid": 5800,
  "paid_on": null,
  "due_date": null,
  "related": null,
  "cancellation": null,
  "email": {
    "to": "pagos@cva.example",
    "cc": null,
    "sent_at": "2026-10-24T10:15:44-06:00"
  },
  "error": null,
  "recurring_invoice": null,
  "tickets": [],
  "origin": {
    "type": "api",
    "name": "Tienda en línea"
  },
  "created_at": "2026-10-24T10:15:42-06:00",
  "metadata": {
    "pedido": "A-1042"
  }
}
```

## Response 202

The PAC didn't answer in time: the CFDI stays in processing and is stamped on its own in a few moments. Listen for the *.stamped event or look it up with GET; repeating the request with the same Idempotency-Key answers its status without stamping again.

A `Invoice` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `object` | `"invoice"` | yes | What kind of object it is («invoice», «customer»…). |
| `issuer` | string | yes | The issuer (iss_…). |
| `branch` | string or null | yes | The branch (brn_…) it was stamped from, or null (the issuer's tax address). Its payments and credit notes follow it. |
| `cost_center` | string or null | yes | Its cost center (ccn_…), or null. The one sent when creating it, or the one set or changed later with POST /v1/invoices/{id}. |
| `type` | `I`, `E`, `P`, `T`, `N` | yes | Receipt type (TipoDeComprobante): I income, E expense, P payment, T transfer, N payroll. |
| `status` | `processing`, `pending`, `valid`, `rejected`, `canceled` | yes | processing: the PAC hasn't answered (it resolves on its own; listen for invoice.stamped). valid: stamped. pending: stamped, without the UUID yet (it resolves on its own, like processing). A cancellation waiting on the customer doesn't change status: it stays valid, with cancellation.status pending. rejected: the SAT or the PAC didn't accept it (see error). canceled: canceled. |
| `uuid` | string or null | yes | Tax folio the SAT assigns (UUID of the Timbre Fiscal Digital), in uppercase. |
| `series` | string or null | yes | The series (Serie) it was stamped with, or null. |
| `folio` | string or null | yes | Internal folio. On a rejected one it is the one attempted: it isn't used up, and the series' next CFDI uses it. |
| `date` | string or null | yes | Issue date (Fecha), Mexico City time. |
| `customer` | object | yes | The customer (Receptor) as it ended up in the CFDI: RFC, name, tax regime and postal code (and foreign if they are abroad). |
| `customer.tax_id` | string or null | yes | RFC (Rfc), 12 characters for a persona moral and 13 for a persona física. |
| `customer.legal_name` | string or null | yes | Name or razón social exactly as on the constancia de situación fiscal, without the capital regime (without «S.A. de C.V.»). |
| `customer.tax_system` | string |  | Tax regime (RegimenFiscal), a c_RegimenFiscal key: 601, 612, 626… |
| `customer.zip` | string |  | Postal code of the customer's tax address (DomicilioFiscalReceptor), 5 digits. |
| `customer.foreign` | object |  | If they're foreign: their country of residence (ResidenciaFiscal, c_Pais) and their tax registration number (NumRegIdTrib), with the generic RFC XEXX010101000. |
| `use` | string or null | yes | CFDI use (UsoCFDI), a c_UsoCFDI key. G03 by default, or S01 with regime 616. |
| `payment_form` | string or null | yes | Payment form (FormaPago), a c_FormaPago key: 01 cash, 03 transfer, 04 credit card, 28 debit, 99 to be defined… Required with PUE; with PPD it's 99. |
| `payment_method` | string or null | yes | Payment method (MetodoPago): PUE (a single payment, the default) or PPD (in installments or deferred, collected with payment complements). |
| `payment_terms` | string or null | yes | Payment terms (CondicionesDePago), up to 1,000 characters without «\|»: «Crédito a 30 días», «50 % anticipo». They go in the XML and the PDF; income and expense receipts only. They don't change when it is due (due_date uses the customer's credit days). |
| `notes` | string or null | yes | Note for the customer: it appears on the PDF, not in the XML. Changed after stamping with POST /v1/invoices/{id} (the XML doesn't change; the next PDF carries it). |
| `currency` | string | yes | Currency, an ISO 4217 key from c_Moneda (MXN, USD, EUR…). MXN by default. |
| `exchange_rate` | number or null | yes | Exchange rate to pesos (TipoCambio). Required if the currency isn't MXN; use the DOF's from the previous day. |
| `items` | array of object | yes | Line items (Conceptos), at least one. |
| `subtotal` | number or null | yes | Sum of the amounts before taxes and discounts (SubTotal). |
| `discount` | number or null | yes | Discount (Descuento). |
| `taxes` | object or null | yes | The receipt's taxes summed by type: IVA and IEPS transferred, IVA and ISR withheld and local taxes; null on a payment complement. |
| `taxes.iva` | number or null | yes | IVA transferred. |
| `taxes.ieps` | number or null | yes | IEPS transferred. |
| `taxes.iva_withheld` | number or null | yes | IVA withheld. |
| `taxes.isr_withheld` | number or null | yes | ISR withheld. |
| `taxes.local_transferred` | number or null | yes | Local taxes transferred. |
| `taxes.local_withheld` | number or null | yes | Local taxes withheld. |
| `total` | number or null | yes | Total in the receipt's currency (Total). |
| `payment_status` | `paid`, `partial`, `unpaid` or null | yes | Whether it has been collected (Cuentas por cobrar): paid, partial (payment complements or credit notes for part of it) or unpaid. A PUE is paid, except with paid_later until POST /v1/invoices/{id}/mark_paid. null if it isn't income or isn't valid. |
| `amount_due` | number or null | yes | What is left to collect, in its currency, or null. |
| `amount_paid` | number or null | yes | What was collected: valid payment complements and credit notes, or everything if it is a paid PUE. null if it doesn't apply. |
| `paid_on` | string or null | yes | A PUE that was pending collection (paid_later or mark_unpaid): the day the customer paid (YYYY-MM-DD), the one given to POST /v1/invoices/{id}/mark_paid or that of the deposit reconciled with it. null if there is no recorded payment date (a PUE paid when stamped), if it hasn't been paid or if it is PPD (its payments are in its complements). |
| `due_date` | string or null | yes | While it is still to be collected (unpaid or partial): the day it is due (YYYY-MM-DD), its date plus the credit days on the customer's record (or their customer group's) or, without them, the empresa's (30 if you didn't change them); a PUE with paid_later, the last day of its month. These are the days Cuentas por cobrar and the collection reminders use. null if it was already paid or doesn't apply. |
| `related` | object or null | yes | Related CFDIs (CfdiRelacionados): relation type from c_TipoRelacion and the UUIDs. |
| `payment` | object or null |  | Only on a payment complement (type P). |
| `payment.date` | string or null | yes | Payment date (FechaPago). |
| `payment.payment_form` | string or null | yes | Payment form (FormaPago), a c_FormaPago key: 01 cash, 03 transfer, 04 credit card, 28 debit, 99 to be defined… Required with PUE; with PPD it's 99. |
| `payment.currency` | string | yes | Payment currency (MonedaP). |
| `payment.exchange_rate` | number or null | yes | Exchange rate to pesos (TipoCambio). Required if the currency isn't MXN; use the DOF's from the previous day. |
| `payment.amount` | number | yes | Payment amount (Monto). |
| `payment.operation_number` | string or null | yes | Payment's operation number (NumOperacion), like the SPEI tracking key. |
| `payment.documents` | array of object | yes | The invoices it pays (DoctoRelacionado). |
| `payment.documents[].uuid` | string | yes | Tax folio the SAT assigns (UUID of the Timbre Fiscal Digital), in uppercase. |
| `payment.documents[].series` | string or null | yes | Series of the invoice paid. |
| `payment.documents[].folio` | string or null | yes | Folio of the invoice paid. |
| `payment.documents[].currency` | string | yes | Currency of the invoice paid (MonedaDR). |
| `payment.documents[].partiality` | integer | yes | Installment number (NumParcialidad). (from -9007199254740991 to 9007199254740991) |
| `payment.documents[].previous_balance` | number | yes | Previous balance of the invoice (ImpSaldoAnt). |
| `payment.documents[].amount` | number | yes | What is paid of that invoice (ImpPagado), in the invoice's currency. |
| `payment.documents[].remaining` | number | yes | Outstanding balance after this payment (ImpSaldoInsoluto). |
| `payroll` | object |  | The payroll complement 1.2 as stamped: type, period, employer, employee, earnings, deductions, other payments, their nodes and the totals. |
| `payroll.type` | `O`, `E` | yes | TipoNomina: O ordinary, E extraordinary. |
| `payroll.calculation` | `fiscalisto`, `external` | yes | fiscalisto: Fiscalisto calculated it (POST /v1/payroll_receipts); external: your payroll system calculated it and it was stamped as is (POST /v1/payroll_receipts/external). |
| `payroll.periodicity` | string | yes | Pay frequency (PeriodicidadPago): 02 weekly, 03 every 14 days, 04 every two weeks (the default), 05 monthly. |
| `payroll.period` | object | yes | Period paid: FechaInicialPago, FechaFinalPago and FechaPago. |
| `payroll.period.start` | string | yes | First day of the period (FechaInicialPago), YYYY-MM-DD. |
| `payroll.period.end` | string | yes | Last day of the period (FechaFinalPago), YYYY-MM-DD. |
| `payroll.period.payment_date` | string | yes | Payment date (FechaPago), YYYY-MM-DD. The last day of the period by default. |
| `payroll.days` | number | yes | Days paid (NumDiasPagados). By default, all the period's days that apply to them. |
| `payroll.references` | object or null | yes | Your payroll system's ids (external receipts only). |
| `payroll.references.employee_id` | string or null | yes | The employee's id in your payroll system. |
| `payroll.references.payroll_run_id` | string or null | yes | The payroll run's id in your system. |
| `payroll.employer` | object | yes | The employer (Emisor of the complement): employer registration and CURP if it is a persona física. |
| `payroll.employer.employer_registration` | string or null | yes | Employer registration with IMSS (RegistroPatronal), 11 characters. Required to stamp payroll. |
| `payroll.employer.curp` | string or null | yes | CURP, 18 characters. |
| `payroll.employer.origin_tax_id` | string |  | Origin employer's RFC (RfcPatronOrigen). |
| `payroll.employer.sncf` | object |  | SNCF entity (EntidadSNCF). |
| `payroll.employer.sncf.resource_origin` | string | yes | Source of funds (OrigenRecurso): IP, IF or IM. |
| `payroll.employer.sncf.own_resource_amount` | number or null | yes | Own funds amount (MontoRecursoPropio), with IM. |
| `payroll.employee` | object | yes | The employee (Nomina/Receptor), as stamped. |
| `payroll.employee.id` | string or null | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `payroll.employee.number` | string | yes | Employee number (NumEmpleado). |
| `payroll.employee.curp` | string | yes | CURP, 18 characters. |
| `payroll.employee.social_security_number` | string or null | yes | Social security number (NumSeguridadSocial), 11 digits. |
| `payroll.employee.start_date` | string or null | yes | Start date of the employment relationship (FechaInicioRelLaboral), YYYY-MM-DD. |
| `payroll.employee.seniority` | string or null | yes | Seniority (P52W, P1Y2M3D). |
| `payroll.employee.contract_type` | string | yes | Contract type (TipoContrato), c_TipoContrato. 01 by default, permanent. |
| `payroll.employee.unionized` | boolean or null | yes | true if they're unionized (Sindicalizado). |
| `payroll.employee.workday_type` | string or null | yes | Shift type (TipoJornada), c_TipoJornada. 01 by default, day shift. |
| `payroll.employee.regime_type` | string | yes | Regime type (TipoRegimen): 02 wages and salaries. |
| `payroll.employee.department` | string or null | yes | Department (Departamento). |
| `payroll.employee.position` | string or null | yes | Position (Puesto). |
| `payroll.employee.risk_class` | string or null | yes | The position's risk class with IMSS (RiesgoPuesto), 1 to 5. 1 by default. |
| `payroll.employee.contribution_base_salary` | number or null | yes | Contribution base salary (SalarioBaseCotApor). |
| `payroll.employee.integrated_daily_salary` | number or null | yes | Integrated daily salary (SalarioDiarioIntegrado): not lower than the daily salary. |
| `payroll.employee.state` | string | yes | State where they work (ClaveEntFed): JAL, CMX, NLE… |
| `payroll.employee.bank` | string |  | Bank (Banco), c_Banco. |
| `payroll.employee.bank_account` | string |  | Bank account or CLABE (CuentaBancaria). |
| `payroll.employee.subcontracting` | array of object |  | Subcontracting (SubContratacion). |
| `payroll.employee.subcontracting[].tax_id` | string | yes | RFC (Rfc), 12 characters for a persona moral and 13 for a persona física. |
| `payroll.employee.subcontracting[].percentage` | number | yes | Time percentage (PorcentajeTiempo). |
| `payroll.perceptions` | array of object | yes | Earnings (Percepcion): wages and the rest, taxable and exempt. |
| `payroll.perceptions[].type` | string | yes | Earning type (TipoPercepcion), c_TipoPercepcion: 001 wages… |
| `payroll.perceptions[].key` | string | yes | Employer's code (Clave). |
| `payroll.perceptions[].concept` | string | yes | Concept (Concepto). |
| `payroll.perceptions[].taxed` | number | yes | Taxable amount (ImporteGravado). |
| `payroll.perceptions[].exempt` | number | yes | Exempt amount (ImporteExento). |
| `payroll.perceptions[].overtime` | array of object |  | Overtime (HorasExtra), with earning 019. |
| `payroll.perceptions[].overtime[].days` | integer | yes | Days with overtime (Dias). (from -9007199254740991 to 9007199254740991) |
| `payroll.perceptions[].overtime[].hours_type` | string | yes | c_TipoHoras: 01 double, 02 triple, 03 single. |
| `payroll.perceptions[].overtime[].hours` | integer | yes | Overtime hours (HorasExtra). (from -9007199254740991 to 9007199254740991) |
| `payroll.perceptions[].overtime[].amount_paid` | number | yes | Amount paid (ImportePagado). |
| `payroll.perceptions[].stock_options` | object |  | Shares or securities (AccionesOTitulos), with earning 045. |
| `payroll.perceptions[].stock_options.market_value` | number | yes | Market value (ValorMercado). |
| `payroll.perceptions[].stock_options.grant_price` | number | yes | Price when granted (PrecioAlOtorgarse). |
| `payroll.deductions` | array of object | yes | Deductions (Deduccion): ISR, IMSS contributions and the rest. |
| `payroll.deductions[].type` | string | yes | Deduction type (TipoDeduccion), c_TipoDeduccion: 001 IMSS, 002 ISR… |
| `payroll.deductions[].key` | string | yes | Employer's code (Clave). |
| `payroll.deductions[].concept` | string | yes | Concept (Concepto). |
| `payroll.deductions[].amount` | number | yes | Amount (Importe). |
| `payroll.other_payments` | array of object | yes | Other payments (OtroPago): employment subsidy. |
| `payroll.other_payments[].type` | string | yes | Other payment type (TipoOtroPago), c_TipoOtroPago: 002 employment subsidy. |
| `payroll.other_payments[].key` | string | yes | Employer's code (Clave). |
| `payroll.other_payments[].concept` | string | yes | Concept (Concepto). |
| `payroll.other_payments[].amount` | number | yes | Amount paid (Importe). |
| `payroll.other_payments[].subsidy_caused` | number |  | Subsidy accrued (SubsidioCausado). |
| `payroll.other_payments[].subsidy_applied` | number |  | Of the subsidy accrued, the ISR it avoided (not in the XML). |
| `payroll.other_payments[].balance_compensation` | object |  | Offset of the balance in favor (CompensacionSaldosAFavor), with 004. |
| `payroll.other_payments[].balance_compensation.balance` | number | yes | Balance in favor (SaldoAFavor). |
| `payroll.other_payments[].balance_compensation.year` | integer | yes | Year of the balance in favor (Año). (from -9007199254740991 to 9007199254740991) |
| `payroll.other_payments[].balance_compensation.remaining` | number | yes | Remainder of the balance in favor (RemanenteSalFav). |
| `payroll.separation` | object |  | SeparacionIndemnizacion (earnings 022, 023, 025). |
| `payroll.separation.total_paid` | number | yes | Total paid (TotalPagado). |
| `payroll.separation.years_of_service` | integer | yes | Years of service (NumAñosServicio). (from -9007199254740991 to 9007199254740991) |
| `payroll.separation.last_monthly_salary` | number | yes | Last ordinary monthly salary (UltimoSueldoMensOrd). |
| `payroll.separation.accumulable_income` | number | yes | Cumulative income (IngresoAcumulable). |
| `payroll.separation.non_accumulable_income` | number | yes | Non-cumulative income (IngresoNoAcumulable). |
| `payroll.retirement` | object |  | JubilacionPensionRetiro (earnings 039, 044). |
| `payroll.retirement.total_one_payment` | number |  | Total in a single payment (TotalUnaExhibicion). |
| `payroll.retirement.total_installment` | number |  | Total in installments (TotalParcialidad). |
| `payroll.retirement.daily_amount` | number |  | Daily amount (MontoDiario). |
| `payroll.retirement.accumulable_income` | number | yes | Cumulative income (IngresoAcumulable). |
| `payroll.retirement.non_accumulable_income` | number | yes | Non-cumulative income (IngresoNoAcumulable). |
| `payroll.disabilities` | array of object |  | Disabilities (earning 014 or deduction 006). |
| `payroll.disabilities[].days` | integer | yes | Days paid (NumDiasPagados). By default, all the period's days that apply to them. (from -9007199254740991 to 9007199254740991) |
| `payroll.disabilities[].type` | string | yes | Receipt type (TipoDeComprobante): I income, E expense, P payment, T transfer, N payroll. |
| `payroll.disabilities[].amount` | number or null | yes | Amount. |
| `payroll.imss_days` | object |  | On a receipt Fiscalisto calculated: the IMSS days. |
| `payroll.imss_days.calendar_days` | integer | yes | Calendar days of the period they worked for the employer: IMSS contributions accrue per calendar month (LSS art. 39), not per days paid. (from -9007199254740991 to 9007199254740991) |
| `payroll.imss_days.absences` | integer | yes | Absences on the receipt. (from -9007199254740991 to 9007199254740991) |
| `payroll.imss_days.disability_days` | integer | yes | Sick-leave days on the receipt. (from -9007199254740991 to 9007199254740991) |
| `payroll.imss_days.sickness_and_maternity` | integer | yes | Days contributed for sickness and maternity (surplus, cash benefits, pensioners' medical expenses): the period without the sick leave; absences count (LSS art. 31 fr. I). (from -9007199254740991 to 9007199254740991) |
| `payroll.imss_days.disability_and_old_age` | integer | yes | Days contributed for disability and life and for old-age and severance retirement: also without the absences, up to 7 per month. (from -9007199254740991 to 9007199254740991) |
| `payroll.totals` | object | yes | Totals: earnings, deductions, other payments and net pay. |
| `payroll.totals.salaries` | number | yes | Total wages, salaries and assimilated income (TotalSueldos). |
| `payroll.totals.taxed` | number | yes | Total taxable (TotalGravado). |
| `payroll.totals.exempt` | number | yes | Total exempt (TotalExento). |
| `payroll.totals.separation` | number | yes | Total separation and severance (TotalSeparacionIndemnizacion). |
| `payroll.totals.retirement` | number | yes | Total retirement, pension or withdrawal (TotalJubilacionPensionRetiro). |
| `payroll.totals.perceptions` | number | yes | Total earnings (TotalPercepciones). |
| `payroll.totals.other_deductions` | number | yes | Other deductions (TotalOtrasDeducciones). |
| `payroll.totals.taxes_withheld` | number | yes | Taxes withheld (TotalImpuestosRetenidos). |
| `payroll.totals.deductions` | number | yes | Total deductions (TotalDeducciones). |
| `payroll.totals.other_payments` | number | yes | Total other payments (TotalOtrosPagos). |
| `payroll.totals.subtotal` | number | yes | Receipt subtotal: earnings plus other payments. |
| `payroll.totals.net` | number | yes | Net pay for the employee. |
| `global` | object |  | Only on a global invoice. |
| `cancellation` | object or null | yes | The cancellation, if requested: status, reason, replacement and when. |
| `cancellation.status` | string or null | yes | `pending`: the SAT has the request (it finishes it in minutes, or waits for the recipient's answer). `accepted`: canceled. `rejected`: the recipient rejected it. `lapsed`: the SAT never recorded it; it can be requested again. `scheduled`: the SAT doesn't accept it yet (it doesn't have the replacing CFDI on record, or briefly rejected the signature) and Fiscalisto requests it again on its own. `failed`: Fiscalisto stopped trying; request it again with POST /v1/invoices/{id}/cancel. |
| `cancellation.motive` | string or null | yes | Cancellation reason (c_MotivoCancelacion): 01 with errors, related (carries substitution), 02 with errors, not related (the default), 03 didn't take place, 04 only on a global invoice, when an included sale was invoiced in the customer's name. |
| `cancellation.substitution` | string or null | yes | The CFDI that replaces this one (its id or its UUID), with reason 01. |
| `cancellation.canceled_at` | string (date-time) or null | yes | When it was canceled. |
| `cancellation.next_attempt_at` | string (date-time) or null | yes | With `scheduled`: when Fiscalisto requests it again (null: within the next 15 minutes). |
| `cancellation.error` | string or null | yes | With `scheduled` or `failed`: why it hasn't gone through. |
| `email` | object or null | yes | The email send: to whom, cc to whom and when (null if it hasn't been sent). |
| `email.to` | string or null | yes | To whom (emails separated by commas). |
| `email.cc` | string or null | yes | CC (emails separated by commas). |
| `email.sent_at` | string (date-time) or null | yes | When it was sent. |
| `email.status` | `sent`, `delayed`, `delivered`, `opened`, `bounced`, `complained` | yes | What happened with the last send: the worst of its recipients (bounced or complained weigh more than opened or delivered). sent until the customer's server answers. |
| `email.recipients` | array of object | yes | Each address of the send (to and cc), with its delivery. |
| `email.recipients[].address` | string | yes | The recipient's email address. |
| `email.recipients[].status` | `sent`, `delayed`, `delivered`, `opened`, `bounced`, `complained` | yes | Object status. |
| `email.recipients[].delivered_at` | string (date-time) or null | yes | When the recipient's server accepted it. |
| `email.recipients[].opened_at` | string (date-time) or null | yes | The first time it was opened (approximate: some email clients load images on their own or don't load them). |
| `email.recipients[].bounced_at` | string (date-time) or null | yes | When it bounced. |
| `email.recipients[].bounce_reason` | string or null | yes | Why it bounced, in Spanish: «buzón no existe», «buzón lleno»… |
| `email.recipients[].complained_at` | string (date-time) or null | yes | When the recipient marked it as spam. |
| `error` | object or null | yes | Why the SAT or the PAC didn't accept it: message, SAT code and original text. |
| `error.message` | string | yes | What happened and how to fix it, for a person. |
| `error.sat_code` | string or null | yes | SAT or PAC code (CFDI40xxx). |
| `error.raw` | string | yes | The PAC's original text. |
| `recurring_invoice` | string or null | yes | The recurring invoice (rin_…) that stamped it on its own, or null if it was stamped with a call. |
| `tickets` | array of string | yes | The tickets (`tkt_…`) it invoices: the one your customer invoiced through autofactura, the one your team invoiced from the ticket's page, or the ones associated with it. Empty otherwise; a global invoice's tickets are in GET /v1/tickets with `status=global`. |
| `origin` | object or null | yes | What stamped the invoice; `null` if it was stamped outside Fiscalisto. |
| `origin.type` | `app`, `api`, `assistant`, `point_of_sale`, `autofactura`, `invoice_link`, `quote`, `recurring_invoice`, `global_invoice` | yes | What stamped it: `app` (a person in Fiscalisto), `api`, `assistant` (an AI assistant through MCP), `point_of_sale` (a point-of-sale key), `autofactura` (your customer with a ticket, or the buyer's data from Stripe or Mercado Libre), `invoice_link` (your customer filling in the invoice link), `quote` (your customer accepting the quote), `recurring_invoice` (a recurring invoice by itself) or `global_invoice` (the tickets' automatic global invoice). |
| `origin.name` | string or null | yes | The name of the API or point-of-sale key, the assistant («ChatGPT») or where an autofactura's buyer data came from («Stripe»). |
| `created_at` | string (date-time) or null | yes | When it was created, ISO 8601 with Mexico City time (-06:00). |
| `metadata` | object | yes | Your own data: up to 50 keys of 40 characters with text values of up to 500. They don't go into the CFDI; they come back in the object and in webhooks. |
| `warnings` | array of string |  | Warnings about the invoice (only in the response that stamps it or, with 202, the one that leaves it processing): it is stamped as sent. |
| `email_error` | string |  | Why the email couldn't be sent; the receipt was stamped. |
| `substitutes` | object |  | The invoice this one replaced and whether it was canceled. |
| `substitutes.invoice` | string | yes | The replaced invoice (inv_…). |
| `substitutes.canceled` | boolean | yes | true if the replaced one is already canceled. false isn't final: see substitutes.cancellation. |
| `substitutes.cancel_error` | string |  | Why the replaced one couldn't be canceled (cancel it with POST /v1/invoices/{id}/cancel). |
| `substitutes.cancellation` | object or null | yes | The previous one's cancellation, same as its `cancellation` in GET /v1/invoices/{id}: `accepted` if it is already canceled, `pending` if the SAT is finishing it (or waiting for the recipient), `scheduled` if Fiscalisto requests it again on its own, `failed` if it must be requested again. The previous one's webhook says when it changes. |
| `substitutes.cancellation.status` | string or null | yes | `pending`: the SAT has the request (it finishes it in minutes, or waits for the recipient's answer). `accepted`: canceled. `rejected`: the recipient rejected it. `lapsed`: the SAT never recorded it; it can be requested again. `scheduled`: the SAT doesn't accept it yet (it doesn't have the replacing CFDI on record, or briefly rejected the signature) and Fiscalisto requests it again on its own. `failed`: Fiscalisto stopped trying; request it again with POST /v1/invoices/{id}/cancel. |
| `substitutes.cancellation.motive` | string or null | yes | Cancellation reason (c_MotivoCancelacion): 01 with errors, related (carries substitution), 02 with errors, not related (the default), 03 didn't take place, 04 only on a global invoice, when an included sale was invoiced in the customer's name. |
| `substitutes.cancellation.substitution` | string or null | yes | The CFDI that replaces this one (its id or its UUID), with reason 01. |
| `substitutes.cancellation.canceled_at` | string (date-time) or null | yes | When it was canceled. |
| `substitutes.cancellation.next_attempt_at` | string (date-time) or null | yes | With `scheduled`: when Fiscalisto requests it again (null: within the next 15 minutes). |
| `substitutes.cancellation.error` | string or null | yes | With `scheduled` or `failed`: why it hasn't gone through. |
| `advance_application` | object |  | The advance payment's application: method, application note and its status. |
| `advance_application.advance` | string or null | yes | The advance payment, as an invoice (inv_…). |
| `advance_application.advance_uuid` | string | yes | The advance payment's tax folio. |
| `advance_application.method` | `egreso`, `remanente` | yes | egreso (the full invoice and then a credit note for the advance payment, option A) or remanente (the invoice only for what's left, option B). |
| `advance_application.status` | `done`, `credit_note_pending` | yes | done (ready) or credit_note_pending (the application note still has to be stamped: repeat the request with the same Idempotency-Key). |
| `advance_application.credit_note` | string or null | yes | The advance payment's application note (inv_…), with method egreso. |
| `advance_application.credit_note_error` | string |  | Why the application note wasn't stamped (repeat with the same Idempotency-Key). |

```json
{
  "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg",
  "object": "invoice",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "branch": null,
  "cost_center": null,
  "type": "I",
  "status": "processing",
  "uuid": null,
  "series": null,
  "folio": "1",
  "date": "2026-10-24T10:15:42",
  "customer": {
    "tax_id": "ICV060329BY0",
    "legal_name": "INMOBILIARIA CVA",
    "tax_system": "601",
    "zip": "33826"
  },
  "use": "G03",
  "payment_form": "03",
  "payment_method": "PUE",
  "payment_terms": null,
  "notes": null,
  "currency": "MXN",
  "exchange_rate": null,
  "items": [
    {
      "description": "Mensualidad",
      "product_key": "86121700",
      "unit_key": "E48",
      "unit_name": "Unidad de servicio",
      "sku": "MEN-1",
      "quantity": 2,
      "unit_price": 2500,
      "taxability": "02",
      "iva": "0.16"
    }
  ],
  "subtotal": 5000,
  "discount": 0,
  "taxes": {
    "iva": 800,
    "ieps": 0,
    "iva_withheld": 0,
    "isr_withheld": 0,
    "local_transferred": 0,
    "local_withheld": 0
  },
  "total": 5800,
  "payment_status": null,
  "amount_due": null,
  "amount_paid": null,
  "paid_on": null,
  "due_date": null,
  "related": null,
  "cancellation": null,
  "email": null,
  "error": null,
  "recurring_invoice": null,
  "tickets": [],
  "origin": {
    "type": "api",
    "name": "Tienda en línea"
  },
  "created_at": "2026-10-24T10:15:42-06:00",
  "metadata": {
    "pedido": "A-1042"
  }
}
```

## Errors

- `daily_limit` (429): You reached today's limit of something not paid with stamps. Retry-After says how many seconds until midnight in Mexico City.
- `feature_not_in_plan` (403): Live, this part of the API (inventario, portal de proveedores, pedidos, comprobación de gastos) follows the empresa's plan, as in the app: it comes with Operaciones (added to any paid plan; included in Corporativo). The books (the /v1/accounting routes except DIOT, cross checks, IVA refunds and fixed assets) come with Contabilidad (added to Independiente, Emprendedor or Negocio; included in Despacho and Corporativo): without it, changing the books answers this error, and reading them works only up to the last month it had it. Add either in Ajustes › Plan y pagos; test mode has everything.
- `idempotency_key_missing` (400): Stamping requires the Idempotency-Key header (8 to 255 characters, a new one per document), so a retry never stamps twice.
- `insufficient_balance` (402): The account has no live stamps left: to stamp, check RFCs against SAT's lists, look up constancias, request SAT downloads or fetch declarations, the compliance opinion or the mailbox from SAT. Buy a pack in Desarrolladores › Timbres y pagos, or turn on auto-recharge. Never happens in test mode.
- `invoice_invalid` (422): The invoice breaks a SAT rule Fiscalisto checks before sending it to the PAC. No stamp was used. `message_es` says which rule and how to fix it.
- `invoice_rejected` (422): The PAC or the SAT didn't accept it. `sat_code` has their code (CFDI40xxx) and `message_es` what to fix. No stamp was used.
- `issuer_archived` (400): The issuer is archived and no longer stamps. Its documents can still be read and canceled.
- `issuer_linked_empresa` (403): That issuer is an empresa of the app connected to your account: through the API it only offers its Portal de proveedores (/v1/portal_suppliers and /v1/supplier_invoices) and, once someone who may pay suppliers and change Configurar pagos turned them on, its supplier payouts (/v1/payouts and /v1/payroll_payouts). It also stops when whoever connected it (or turned its payouts on) no longer has that permission in the empresa: message_es says which. Do everything else in the app.
- `issuer_missing` (404): There is no such issuer in the account (or it belongs to the other mode).
- `issuer_not_allowed` (403): This key can't use that issuer.
- `issuer_not_ready` (400): The issuer can't do that yet: the message says what it's missing (its CSD, or one in force when stamping; its RFC and tax details for viáticos). Upload it and repeat the request with the same Idempotency-Key.
- `issuer_required` (400): The account has several issuers and the request doesn't say which: send `issuer` (iss_…).
- `livemode_mismatch` (400): The object belongs to the other mode: an fk_test_ key only sees test data and an fk_live_ key only live data.
- `request_in_progress` (409): Another request with the same Idempotency-Key is still running. Repeat it in a moment with the same key: it will answer the same.
- `resource_missing` (404): There's no object with that id (or it belongs to another issuer or the other mode).
- `stamp_rate_limit` (429): Too many stamps in a row for the same issuer. Wait what Retry-After says; for many invoices use POST /v1/invoice_batches, for a payroll run POST /v1/payroll_batches.

Plus those of any call (key, fields, limits): https://fiscalisto.com/en/docs/api/errores.md.
