ValidateFin

pain.008.001.02 — NbOfTxs and CtrlSum wrong at both levels

Un adeudo directo SEPA que se cuenta y se suma mal, en los dos niveles a la vez: el lote contiene realmente 2 cobros por 300,00 EUR, pero NbOfTxs dice 3 y CtrlSum dice 250,00 — en el PmtInf y otra vez en el GrpHdr. Son cuatro errores, no dos: los totales de control se comprueban en el lote de pagos Y en la cabecera, porque un fichero multilote puede lucir un total de cabecera correcto sobre dos totales de lote equivocados. El XML está bien formado y el XSD oficial lo acepta: para un esquema, NbOfTxs y CtrlSum son solo números.

pain.008.001.02 — Inválido

Un adeudo directo SEPA que se cuenta y se suma mal, en los dos niveles a la vez: el lote contiene realmente 2 cobros por 300,00 EUR, pero NbOfTxs dice 3 y CtrlSum dice 250,00 — en el PmtInf y otra vez en el GrpHdr. Son cuatro errores, no dos: los totales de control se comprueban en el lote de pagos Y en la cabecera, porque un fichero multilote puede lucir un total de cabecera correcto sobre dos totales de lote equivocados. El XML está bien formado y el XSD oficial lo acepta: para un esquema, NbOfTxs y CtrlSum son solo números.

Adeudo directo SEPA (pain.008) pain.008.001.02 ISO 20022 / SDD COREResultado esperado: Inválido — 4 errores

Lo que muestra este fichero

Un adeudo directo SEPA que se cuenta y se suma mal, en los dos niveles a la vez: el lote contiene realmente 2 cobros por 300,00 EUR, pero NbOfTxs dice 3 y CtrlSum dice 250,00 — en el PmtInf y otra vez en el GrpHdr. Son cuatro errores, no dos: los totales de control se comprueban en el lote de pagos Y en la cabecera, porque un fichero multilote puede lucir un total de cabecera correcto sobre dos totales de lote equivocados. El XML está bien formado y el XSD oficial lo acepta: para un esquema, NbOfTxs y CtrlSum son solo números.

Transacciones2
Total300,00 €
EsquemaCORE
Fecha en el fichero2026-03-10

Los defectos que contiene

  • CtrlSumPmtInf CtrlSum mismatch: a payment batch declares 250.00 but its transactions total 300.00.
  • NbOfTxsPmtInf NbOfTxs mismatch: a payment batch declares 3 but contains 2 transactions.
  • CtrlSumCtrlSum mismatch: header declares 250.00 but calculated total is 300.00.
  • NbOfTxsNbOfTxs mismatch: header declares 3 but found 2 transactions.

Citado literalmente del validador, sin parafrasear.

Última verificación: Licencia: CC-BY-4.0

Todas las partes, IBAN e importes siguientes son ficticios. Los IBAN son estructuralmente válidos —superan el mod-97— pero no corresponden a ninguna cuenta real.

Contenido del fichero

<?xml version="1.0" encoding="UTF-8"?>
<!--
  ValidateFin sample file — SEPA Direct Debit, pain.008.001.02, BROKEN ON PURPOSE.
  Expected validation result: INVALID — both control totals lie, at both levels.

  The batch really contains 2 collections adding up to 300.00 EUR, but NbOfTxs says 3
  and CtrlSum says 250.00 — in the PmtInf AND in the GrpHdr. That is four errors, not
  two: the totals are checked on the payment batch and again on the file header, and a
  file with several batches can very well have a correct header total sitting on top of
  two batches whose own totals are wrong.

  This is the classic symptom of a payment file assembled in a loop where one record
  was dropped after the header was written. The XML is well-formed and the official XSD
  accepts it: NbOfTxs and CtrlSum are just numbers to a schema.

  All parties and account numbers are fictitious.
  Reference page: https://validatefin.com/en/resources/samples/sepa-pain008-invalid-totals
  License: CC-BY-4.0
-->
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.02"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <CstmrDrctDbtInitn>
    <GrpHdr>
      <MsgId>SDD-BADTOTALS-20260302</MsgId>
      <CreDtTm>2026-03-02T11:00:00</CreDtTm>
      <NbOfTxs>3</NbOfTxs>
      <CtrlSum>250.00</CtrlSum>
      <InitgPty>
        <Nm>Editions Lumiere SARL</Nm>
      </InitgPty>
    </GrpHdr>
    <PmtInf>
      <PmtInfId>PMT-SDD-BADTOTALS-001</PmtInfId>
      <PmtMtd>DD</PmtMtd>
      <NbOfTxs>3</NbOfTxs>
      <CtrlSum>250.00</CtrlSum>
      <PmtTpInf>
        <SvcLvl>
          <Cd>SEPA</Cd>
        </SvcLvl>
        <LclInstrm>
          <Cd>CORE</Cd>
        </LclInstrm>
        <SeqTp>RCUR</SeqTp>
      </PmtTpInf>
      <ReqdColltnDt>2026-03-10</ReqdColltnDt>
      <Cdtr>
        <Nm>Editions Lumiere SARL</Nm>
        <PstlAdr>
          <TwnNm>Paris</TwnNm>
          <Ctry>FR</Ctry>
        </PstlAdr>
      </Cdtr>
      <CdtrAcct>
        <Id>
          <IBAN>FR7610107001011234567890129</IBAN>
        </Id>
        <Ccy>EUR</Ccy>
      </CdtrAcct>
      <CdtrAgt>
        <FinInstnId>
          <BIC>CCBPFRPP</BIC>
        </FinInstnId>
      </CdtrAgt>
      <ChrgBr>SLEV</ChrgBr>
      <CdtrSchmeId>
        <Id>
          <PrvtId>
            <Othr>
              <Id>FR72ZZZ123456</Id>
              <SchmeNm>
                <Prtry>SEPA</Prtry>
              </SchmeNm>
            </Othr>
          </PrvtId>
        </Id>
      </CdtrSchmeId>
      <DrctDbtTxInf>
        <PmtId>
          <EndToEndId>E2E-BADTOTALS-2026-0301</EndToEndId>
        </PmtId>
        <InstdAmt Ccy="EUR">180.00</InstdAmt>
        <DrctDbtTx>
          <MndtRltdInf>
            <MndtId>MNDT-2024-000731</MndtId>
            <DtOfSgntr>2024-09-12</DtOfSgntr>
            <AmdmntInd>false</AmdmntInd>
          </MndtRltdInf>
        </DrctDbtTx>
        <DbtrAgt>
          <FinInstnId>
            <BIC>PSSTFRPP</BIC>
          </FinInstnId>
        </DbtrAgt>
        <Dbtr>
          <Nm>Camille Rousseau</Nm>
          <PstlAdr>
            <TwnNm>Lyon</TwnNm>
            <Ctry>FR</Ctry>
          </PstlAdr>
        </Dbtr>
        <DbtrAcct>
          <Id>
            <IBAN>FR1420041010050500013M02606</IBAN>
          </Id>
        </DbtrAcct>
        <RmtInf>
          <Ustrd>Abonnement annuel 2026 - facture AB-2026-0731</Ustrd>
        </RmtInf>
      </DrctDbtTxInf>
      <DrctDbtTxInf>
        <PmtId>
          <EndToEndId>E2E-BADTOTALS-2026-0302</EndToEndId>
        </PmtId>
        <InstdAmt Ccy="EUR">120.00</InstdAmt>
        <DrctDbtTx>
          <MndtRltdInf>
            <MndtId>MNDT-2025-001188</MndtId>
            <DtOfSgntr>2025-01-20</DtOfSgntr>
            <AmdmntInd>false</AmdmntInd>
          </MndtRltdInf>
        </DrctDbtTx>
        <DbtrAgt>
          <FinInstnId>
            <BIC>GEBABEBB</BIC>
          </FinInstnId>
        </DbtrAgt>
        <Dbtr>
          <Nm>Bureau Verhoeven BVBA</Nm>
          <PstlAdr>
            <TwnNm>Gent</TwnNm>
            <Ctry>BE</Ctry>
          </PstlAdr>
        </Dbtr>
        <DbtrAcct>
          <Id>
            <IBAN>BE68539007547034</IBAN>
          </Id>
        </DbtrAcct>
        <RmtInf>
          <Ustrd>Abonnement annuel 2026 - facture AB-2026-0788</Ustrd>
        </RmtInf>
      </DrctDbtTxInf>
    </PmtInf>
  </CstmrDrctDbtInitn>
</Document>

Cómo sabemos que estos resultados se sostienen

Cada fichero de esta biblioteca pasa por el propio validador del sitio en cada build. El resultado esperado indicado arriba lo verifica un test automatizado: si un fichero dejara de coincidir con lo que afirma esta página, el build fallaría. Dos fixtures heredadas se repararon así antes de publicarse: tres IBAN no superaban el mod-97 y varios nombres usaban caracteres fuera del juego SEPA básico.

Adeudo directo SEPA (pain.008)