StmtRecon
ISO 20022 return and status reasons

DS04 ISO 20022 reason — Order rejected for content

DS04 identifies order rejected for content in a pain.002 status report. A bank-side content rejection interrupts the payment run. Inspect the original order and keep its invoices available for investigation.

Open this sample in Air-Gapped Converter

Worked bank sample

Synthetic bank data for local reconciliation.

<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.002.001.10"><CstmrPmtStsRpt>
<GrpHdr><MsgId>ACK-DS04</MsgId><CreDtTm>2026-11-30T09:00:00Z</CreDtTm></GrpHdr>
<OrgnlGrpInfAndSts><OrgnlMsgId>PAY-604</OrgnlMsgId><OrgnlMsgNmId>pain.001.001.09</OrgnlMsgNmId>
<GrpSts>RJCT</GrpSts>
<StsRsnInf><Rsn><Cd>DS04</Cd></Rsn></StsRsnInf>
</OrgnlGrpInfAndSts></CstmrPmtStsRpt></Document>

The status table should show PAY-604, RJCT and DS04. Its amount cells stay empty. Use the original group ID to locate the payment run in the ERP.

The sample reports a group rejection. The SDK checks the paired pain.001 initiation. The extraction below reads the unprefixed pain.002 layout shown here. Pass the original instruction as the second filename.

Field anatomy

Field or pathMeaning in this fileType or formatERP or Excel import risk
OrgnlGrpInfAndSts/OrgnlMsgIdOriginal payment file identifierMax35TextMatching the acknowledgement’s own MsgId leaves the payment run open.
OrgnlGrpInfAndSts/GrpStsGroup processing statusRJCTA group rejection recorded as cash creates a false ledger entry.
StsRsnInf/Rsn/CdOrderRejectedExternalStatusReason1CodeDo not use DS04 as a booked return reason. File the exception against the original message identifier.

Root cause and ERP fix

  1. The order payload diverged from the approved version. Compare the signed or approved file digest with the delivered bytes.
  2. The bank identified a content inconsistency. Obtain its order-level diagnostic before choosing a field to repair.
  3. An ERP job interpreted transmission success as acceptance. Link the group rejection to the original run and review all instructions in scope.

Inspect with the MIT parser

Save the sample as iso-20022-reason-ds04.xml and the script as inspect.mjs. With @stmtrecon/parser installed, run node inspect.mjs iso-20022-reason-ds04.xml original.xml.

Open the matching original.xml file
import { readFile } from 'node:fs/promises';
import { inspect } from '@stmtrecon/parser';
const text = await readFile(process.argv[2], 'utf8');
const original = inspect(await readFile(process.argv[3]));
const group = text.match(/<OrgnlGrpInfAndSts>([\s\S]*?)<\/OrgnlGrpInfAndSts>/)?.[1];
const id = group?.match(/<OrgnlMsgId>([^<]+)<\/OrgnlMsgId>/)?.[1];
const reason = group?.match(/<StsRsnInf>\s*<Rsn>\s*<Cd>([^<]+)<\/Cd>/)?.[1];
if (id === original.header.messageId && reason === 'DS04') console.log(id, reason);
Open this sample in Air-Gapped Converter

Export a multi-sheet Excel workbook with balance checks and batch reconciliation on your device. No Node installation or cloud upload is required.

npm package · SDK source · Format reference

Related ISO 20022 return and status reasons

Export your full workbook

Purchases are currently unavailable. Existing licenses can be activated offline.