.isValidCreditorIdentifierEPC()

Method is used to check whether CI check digit is valid according to ISO 7064 Mod 97-10.

Description of the method

Description:

.isValidCreditorIdentifierEPC() method is used to check whether CI check digit is valid according to ISO 7064 Mod 97-10. EPC gathers several countries’ check digit calculation in a separate document:  EPC262-08 Creditor Identifier Overview v2.3. Most countries use mod 97-10 to calculate check digit, but some countries use different version of this check and some use different check altogether. Usage of this method should be reviewed bank by bank. The method checks the following points:

  • First two characters should form a valid country code
  • Next two are the check digits according to ISO 7064 Mod 97-10
  • Characters 5-7 are filled with the creditor business code. If not used it's filled with 'ZZZ'
  • The last characters 8-35 are filled with the bank specific number of the creditor

It’s worth noting that country code is checked from characters in first two positions and based on those, the check digit is calculated. This rule excepts that those two country code characters are indeed valid. The creditor business code is ignored when calculating the check digit.

Available for: string
Parameters: -
Return type: boolean 

Example

Context: TransactionType1
OCL: self.Creditor.Id.isValidCreditorIdentifierEPC()
Description: The example rule checks if the given creditor identifier is valid.

 

The XML snippet below would pass this check.

<Creditor>
    <Id>FI24ZZZ8732598789173923085091851261</Id>
</Creditor>

The other snippet below however would not pass this check.

<Creditor>
    <Id>AA123123</ID>
</Creditor>