Bank account validation is very straightforward using the PHP SoapClient object. The code sample below demonstrates two functions of the bank account and sortcode validation methods of the API, namely the GetBank and ModulusCheck. The userId and password embedded in the code will permit you access to the functions for a short period of time, after which you would need to purchase the appropriate clicks (see pricing).
Generally on a website we recommend you perform a GetBank in order to get the bank details, name address etc. If you are performing bank account validation for direct debits then you can check if a sortcode will allow direct debits by checking the flag 'PermitDebits'. This will be set to true if direct debits are allowed. It is also useful to allow the user to check thier bank details. If you do not need or want to display the bank account details then performing a modulus check on it's own is sufficient. It performs a Validate sortcode check on the fly as a modulus check is meaningless without knowing the sortcode is valid.
Note that you are only charged for a Modulus Check click even if you do a GetBank first.
Copyright notice. Please feel free to copy the sources or any elements elements of the sources as long as you are using them to interface with our bank account validation API.