CtrlSum

ISO20022 describes ControlSum as an optional element which can be given in GrpdHdr and in PmtInf levels. When given in GrpHdr it is used to indicate the total number of individual amounts in the message. When given in PmtInf it is used to indicate the total number of individual amounts in the group.

(Bank specific rules may still apply to make either of the levels mandatory.)

Unless otherwise decided with the bank, the validator checks whether the amounts specified in the message match with the value given in CtrlSum.

The following has valid CtrlSums:

<GrpHdr> 
<CtrlSum>30.3</CtrlSum>
</GrpHdr>
<PmtInf>
<CtrlSum>10.1</CtrlSum>
    <CdtTrfTxInf>
     <InstdAmt Ccy="EUR">10.1</InstdAmt>
    </CdtTrfTxInf>
</PmtInf>
<PmtInf>
<CtrlSum>20.2</CtrlSum>
<CdtTrfTxInf>
<InstdAmt Ccy="EUR">10.1</InstdAmt>
</CdtTrfTxInf>
<CdtTrfTxInf>
<InstdAmt Ccy="USD">10.1</InstdAmt>
</CdtTrfTxInf>
<PmtInf>

(Various elements removed for the sake of the example)