FinchContext
Run with

Build Contabilidad Electrónica XML (Catálogo de Cuentas + Balanza)

Skill: Convert the ledger into the SAT Contabilidad Electrónica XML deliverables

Region: Mexico (México) Category: Accounting — Contabilidad Electrónica Does: Takes the chart of accounts and the trial balance and produces the Contabilidad Electrónica XML deliverables required by the SAT — the Catálogo de Cuentas (catalogocuentas:Catalogo) and the monthly Balanza de Comprobación (BCE:Balanza) — built to the SAT XSD and submitted through the Buzón Tributario. Standard: SAT Contabilidad Electrónica (Anexo 24) — Catálogo de cuentas 1.3 + Balanza de comprobación 1.3

Contabilidad Electrónica requires uploading the Catálogo de Cuentas (once, then when it changes) and a monthly Balanza de Comprobación mapped to the SAT código agrupador (the standardized account grouping). Each account in the catálogo declares its CodAgrup, NumCta, Nivel and Natur (D/A); the balanza reports opening, debit, credit and closing balances per account. Files are signed with the e.firma (FIEL) and delivered through the Buzón Tributario. Validate against the Anexo 24 XSD before sending.


When this applies


Input data required

Deliverable Key nodes / attributes
Catálogo header Catalogo@Version=1.3, @RFC, @Mes, @Anio
Each account Ctas@CodAgrup (código agrupador SAT), @NumCta, @Desc, @Nivel, @Natur (D/A)
Balanza header Balanza@Version=1.3, @RFC, @Mes, @Anio, @TipoEnvio (N normal / C complementaria)
Each balance line Ctas@NumCta, @SaldoIni, @Debe, @Haber, @SaldoFin
Signing e.firma (FIEL) certificate + sello over the XML

Mexican specifics: the NumCta in the balanza must exist in the uploaded catálogo; the código agrupador (CodAgrup) maps each account to the SAT's standard grouping so the authority can read any taxpayer's accounts uniformly. Amounts are in MXN with 2 decimals.


Document structure

catalogocuentas:Catalogo (Version=1.3, RFC, Mes, Anio)
└── catalogocuentas:Ctas (CodAgrup, NumCta, Desc, SubCtaDe, Nivel, Natur)  [one per account]

BCE:Balanza (Version=1.3, RFC, Mes, Anio, TipoEnvio)
└── BCE:Ctas (NumCta, SaldoIni, Debe, Haber, SaldoFin)  [one per account]

Both files carry namespaces under http://www.sat.gob.mx/esquemas/ContabilidadE/1_3/... and xsi:schemaLocation to the Anexo 24 XSD.


Calculation rules


Worked example (Catálogo + Balanza, abridged)

<?xml version="1.0" encoding="UTF-8"?>
<catalogocuentas:Catalogo
  xmlns:catalogocuentas="http://www.sat.gob.mx/esquemas/ContabilidadE/1_3/CatalogoCuentas"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  Version="1.3" RFC="AAA010101AAA" Mes="06" Anio="2026">
  <catalogocuentas:Ctas CodAgrup="101.01" NumCta="101-01" Desc="Caja" Nivel="2" Natur="D"/>
  <catalogocuentas:Ctas CodAgrup="102.01" NumCta="102-01" Desc="Bancos nacionales" Nivel="2" Natur="D"/>
  <catalogocuentas:Ctas CodAgrup="201.01" NumCta="201-01" Desc="Proveedores nacionales" Nivel="2" Natur="A"/>
  <catalogocuentas:Ctas CodAgrup="401.01" NumCta="401-01" Desc="Ventas y/o servicios gravados" Nivel="2" Natur="A"/>
</catalogocuentas:Catalogo>
<?xml version="1.0" encoding="UTF-8"?>
<BCE:Balanza
  xmlns:BCE="http://www.sat.gob.mx/esquemas/ContabilidadE/1_3/BalanzaComprobacion"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  Version="1.3" RFC="AAA010101AAA" Mes="06" Anio="2026" TipoEnvio="N">
  <BCE:Ctas NumCta="102-01" SaldoIni="150000.00" Debe="500000.00" Haber="420000.00" SaldoFin="230000.00"/>
  <BCE:Ctas NumCta="201-01" SaldoIni="80000.00" Debe="300000.00" Haber="350000.00" SaldoFin="130000.00"/>
  <BCE:Ctas NumCta="401-01" SaldoIni="0.00" Debe="0.00" Haber="450000.00" SaldoFin="450000.00"/>
</BCE:Balanza>

Each file is signed with the e.firma (FIEL) and uploaded through the Buzón Tributario 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.