Build DIOT Batch File (Operaciones con Terceros)
Skill: Convert third-party operations into the DIOT batch file uploaded to the SAT portal
Region: Mexico (México)
Category: Tax — IVA (Declaración Informativa de Operaciones con Terceros)
Does: Takes a period's purchase/expense operations with suppliers and produces the DIOT (Declaración Informativa de Operaciones con Terceros) batch file — one record per proveedor with Tipo de Tercero, Tipo de Operación, supplier RFC, and the IVA acreditable broken down by rate — for upload to the SAT portal.
System: SAT DIOT — batch file (.txt pipe-delimited / .dec) uploaded via the SAT portal
The DIOT is the monthly informative return of operations with third parties (mainly purchases and the input VAT — IVA acreditable — claimed on them). It is filed even with no operations. Records are loaded either by capture in the SAT online form or by uploading a batch file built from the accounting system. Supplier RFCs must be valid and the IVA amounts must reconcile with what was credited in the period's IVA return. Field positions and the accepted file layout change between versions — always build against the current DIOT specification.
When this applies
- Every taxpayer obligated to file IVA reports the period's operations with suppliers in the DIOT, due by the last day of the month following the period (monthly).
- One record per supplier per
Tipo de Operación; foreign suppliers without an RFC are reported with the nationality / foreign-resident fields instead. - A nil DIOT ("sin operaciones") is still required when there is nothing to report.
Input data required
| Field | DIOT meaning |
|---|---|
| Tipo de Tercero | 04 proveedor nacional, 05 proveedor extranjero, 15 proveedor global |
| Tipo de Operación | 03 prestación de servicios profesionales, 06 arrendamiento, 85 otros |
| RFC del proveedor | supplier RFC (13/12 chars) — omitted for foreign suppliers |
| ID fiscal / país (extranjero) | tax ID, nombre del extranjero, país de residencia |
| Valor de actos a la tasa de IVA 16% | base of operations taxed at 16% (IVA acreditable pagado) |
| Valor de actos a la tasa de IVA 8% (región fronteriza) | base at the 8% border rate |
| Actos a tasa 0% / exentos | value of zero-rated and exempt purchases |
| IVA retenido / IVA no acreditable | retained VAT and non-creditable VAT portions |
| IVA acreditable del periodo | input VAT actually credited |
Mexican specifics: report only paid operations (IVA is creditable when effectively paid). Amounts are entered as whole pesos (no decimals) in the batch layout. The sum of IVA acreditable across records should tie to the input VAT claimed on the IVA declaration.
File layout (pipe-delimited batch record)
TipoTercero|TipoOperacion|RFC|IDFiscal|Nombre|PaisResidencia|Nacionalidad|
ValorActos16|IVA16|ValorActos16NoAcred|IVA16NoAcred|ValorActosFronteriza8|IVA8|
ValorActos0|ValorActosExentos|IVARetenido|IVADevoluciones|...
- One line per supplier/operation; fields separated by
|; no header row. - Empty numeric fields are
0; monetary fields are integer pesos. TipoTercero/TipoOperacionuse the DIOT catalog codes; foreign suppliers (05) leaveRFCempty and fillIDFiscal,Nombre,PaisResidencia,Nacionalidad.
Calculation rules
IVA16(acreditable) =ValorActos16× 16% on operations actually paid in the period.- Border-region purchases use the 8% rate (
ValorActosFronteriza8× 8%). - Non-creditable VAT (e.g. on non-deductible expenses) goes in the
NoAcredcolumns, not the acreditable columns. IVARetenidorecords VAT withheld from the supplier (e.g. fletes, honorarios, arrendamiento).- Total
IVA acreditableacross all records must reconcile with the input VAT credited in the period's IVA monthly declaration.
Worked example (two suppliers, pipe-delimited, whole pesos)
04|85|XAXX010101000||PROVEEDOR NACIONAL SA|||50000|8000|0|0|0|0|0|0|0|0
04|03|MABC850101AB1||DESPACHO CONTABLE SC|||20000|3200|0|0|0|0|0|0|3200|0
05|85||TAXID-998877|FOREIGN VENDOR LLC|USA|Estadounidense|0|0|0|0|0|0|0|12000|0|0
Reading line 1: proveedor nacional (04), otros (85), RFC XAXX010101000, base 50,000 at 16% → IVA acreditable 8,000. Line 2: servicios profesionales with 3,200 IVA retenido. The file is uploaded in the SAT DIOT application for the period.
Validation checklist
- Period correct; a nil DIOT submitted if there are no operations
- One record per supplier per
Tipo de Operación;TipoTercero/TipoOperacionfrom the current DIOT catalog - National supplier RFCs valid; foreign suppliers (
05) carryIDFiscal,Nombre,PaisResidencia,Nacionalidad(no RFC) - Only paid operations included; amounts in whole pesos, empty numerics as
0 -
IVA16/IVA8consistent with the rate × base; non-creditable and retained VAT in their own columns - Total IVA acreditable reconciles with the period's IVA monthly declaration
- File layout matches the current DIOT specification and loads without errors in the SAT portal
Last updated: 2026-06-04 — confirm the active CFDI/SAT schema version, catálogos, and PAC/portal requirements against the current SAT specifications before use.