Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all,
Vanilla are planning an update to the site on April 24th (next Wednesday). It is a major PHP8 update which is expected to boost performance across the site. The site will be down from 7pm and it is expected to take about an hour to complete. We appreciate your patience during the update.
Thanks all.

How to validate bank account, sort code

Options
  • 28-05-2010 1:19pm
    #1
    Closed Accounts Posts: 353 ✭✭


    I'm doing a website.

    The customer enters in his IBAN. I found an algorithm to validate IBAN (from Bank of Malta)......works well, just involves calculating a check digit.


    The customer has also the option to enter in his bank account number and Sort code (instead of IBAN).

    Is it possible to validate a bank account number ? Is there a check digit involved ? What about sort code ?


Comments

  • Registered Users Posts: 352 ✭✭fergalfrog


    You should be able to get a list of sort codes somewhere as really these are just identifiers for banks and/or their branches.

    Other than checking you have the right number of digits to validate the a/c number you will need to use a third-party who can check if the bank account number exists or not. I am not aware of such a facility especially since it seems to take a day or two for a bank to work out an account doesn't exist (if you happen to put in the wrong number on a bank transfer for example).


  • Closed Accounts Posts: 353 ✭✭MungoMan


    fergalfrog wrote: »
    You should be able to get a list of sort codes somewhere as really these are just identifiers for banks and/or their branches.

    Other than checking you have the right number of digits to validate the a/c number you will need to use a third-party who can check if the bank account number exists or not.


    cheers Fergal

    How many digits does a bank account have, is it always 8 ?

    My two bank accounts have 8 digits, one of them with BOI, and one with a UK bank. Also I once had a German account, it also had 8 digits


  • Registered Users Posts: 352 ✭✭fergalfrog


    I have 2 bank accounts in Australia and both are 8 digits. However you would be better to find this out from someone with more of a clue - I am a mere web developer so I'm not sure whether or not this is something all banks in the world have agreed upon (and if it might change in the future).

    Good luck with it.


  • Closed Accounts Posts: 353 ✭✭MungoMan


    I'm wrong, my German account had 9 digits !


  • Registered Users Posts: 352 ✭✭fergalfrog


    Maybe someone else has figured it out a bit more but for true validation you would need to connect to something that can connect to the banks system(s) and verify if the account exists. I would be pretty sure there is no such thing. I set up a direct debit thing before using a third party and as far as I recall there were no such checks that could be done. After x amount of hours you could check to see if it got set up ok but that was about the height of it.


  • Advertisement
  • Closed Accounts Posts: 353 ✭✭MungoMan


    fergalfrog wrote: »
    Maybe someone else has figured it out a bit more but for true validation you would need to connect to something that can connect to the banks system(s) and verify if the account exists. I would be pretty sure there is no such thing. I set up a direct debit thing before using a third party and as far as I recall there were no such checks that could be done. After x amount of hours you could check to see if it got set up ok but that was about the height of it.


    Yes I agree, and it verifies what I found out from other sources.


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Moved from Design.


  • Moderators, Technology & Internet Moderators Posts: 1,333 Mod ✭✭✭✭croo


    MungoMan wrote: »
    I found an algorithm to validate IBAN (from Bank of Malta)......works well, just involves calculating a check digit.

    The IBAN Structure changes from country to country! So be careful. I remember looking at this a few years ago, did the work for Ireland only to discover that it would be then different for every other country [which was not good for me as I had intended on adding it to a worldwide ERP project I was working on]. I can't find the code right now but from my hazy memory the algorithm was the same for all IBAN but the order of the fields concatenated before the calculation is made changed from country to country.

    I found the wikipedia a good source of info on this topic.


  • Registered Users Posts: 5,618 ✭✭✭Civilian_Target


    We deal with this kind of stuff at work, and honestly, the only validation i really found that works is the CRC validation in Credit Card numbers, and checking that it hasn't already expired.

    Given that in some countries (like France), bank account numbers and IBANs can have letters in the middle of them, for internet banking the best thing to do is just try and validate the payment, and don't try and be too clever ;)


Advertisement