Validating account details

Flow showing how to validate account details

Call Validate service

To validate account details, you need to call Validate, supplying the country code, checking level and the relevant BBAN fields for the checking level.

Get validation response

To find out the result of the validation, you need to retrieve the validation response. The response always includes the conditions returned by Bank Wizard. These conditions show whether the validation was successful and whether the account details were reformatted.

If the validation was successful, the response also includes the IBAN formed by Bank Wizard and the reformatted account details.

Are there any client errors?

Client errors are returned if you have not supplied the correct data or the data is not in the correct format. If you receive any of these errors, you should re-prompt the user for the incorrectly formatted or missing information and then call Validate again.

Are there any errors?

You need to check the returned conditions for errors. If any of the conditions are errors the validation has failed.

Depending on your business rules, you may also need to check the conditions for specific warnings that you want to treat as errors. For example, if you are setting up a Direct Debit, you must reject the details if Warning 6 - Bank branch does not support Direct Debit transactions is returned. However you can ignore this condition if this is a Direct Credit transaction.

You should also test for conditions that show that Bank Wizard could not confirm that the account details are correct; for example Warning 2 - Modulus check algorithm is unavailable for these account details. In this case to confirm the details, you could ask the user to re-enter the account details so that you can compare them with the originals or you could perform a verification.

Display results

Depending on your business requirements you could display any returned warning and information conditions before asking the user to accept the details. You could also display the formed IBAN.

If the account details were changed to the format required for electronic processing, you may also want to display the reformatted account details. You can determine whether the account details have been reformatted by testing for Warning 1 - Account details were not in standard form and have been transposed.

You should never display the data access key to the user.

Do you want to retrieve any data?

If the validation was successful you can use the supplied data access key to retrieve bank and branch data, including the branch address, SEPA data and SWIFT data.

Next step: Retrieving bank and branch data