FinchContext
Run with

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


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|...

Calculation rules


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


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.