Bank Account Validation API Specifications
1. What is the SortCodes API?
Reverse SORT code is an online system, which provides businesses with an interface where they can perform real-time SORT code validation and identification.
Those functions come in the form of add-on modules, which expand the functionality of your portal.
The SORT module adds access to our extensive SORT code database to your portal. You can access the data through an API and make automatic calls or integrate the SORT/BIC identification database in your software solution.
SORT module provides you with the following functionality:
- Retrieve information about the bank based on the sort code.
- Automatically generates a valid IBAN format for the supplied sort code and account number
- Identify support of FPS payments/CHAPS and Direct Debit for the account/bank/sort combination.
- Multiple results displayed in a code-friendly XML structured response
3. API Usage
The API system allows you to automate Sort code validation via a simple HTTP GET or POST request.
The accepted parameters are listed in the table below:
|sortcode||6||String||The Sort Code|
|account||8||String||Bank Account Number|
|api_key||128||String||Your personal API key.|
EXAMPLE Sort Code and Account Number validation query.
An example usage of the SORT Code API with a GET request can be found below:
- API is your API key
- SORT is the bank’s sort code.
- Account is the account number.
- Once an HTTP GET or POST request is made with the correct API key, the system will return the results in an XML format.
The sort code API also can perform sort code searches only by submiting the following request:
You can find an example XML response in the next section “API XML Response Structure”
4. API XML Response Structure
An XML Schema of the API’s response can be found in the documentation archive.
A detailed description of the fields returned can be seen in the table below:
|SORT_CODE||8 or 11||String||The SORT/BIC code you searched for is displayed if searching by SORT code. If searching by bank name the SORT code of the corresponding bank and branch is displayed.|
|ACCOUNT||8||String||The Account Number you submitted is displayed for back reference.|
|IBAN||256||String||An International Bank Account Number is generated from the Sort Code and Account Number supplied.|
|BANK_NAME||256||String||Name of the bank or financial institution which owns this SORT/BIC number.|
|BANK_BIC||11||String||BIC Code of the corresponding bank branch.|
|CHAPS_BIC||11||String||BIC code required for CHAPS transactions to clients of this specific bank branch.|
|BRANCH_NAME||128||String||Name of the specific branch to which the SORT/BIC code is assigned.|
|COUNTRY||32||String||Full name of the country of origin e.g. “United States”|
|COUNTRY_CODE||2||String||Two letter abbreviation of the country code e.g. US, UK, AU, FR … etc.|
|BANK_CITY||128||String||The name of the city in which the branch is located.|
|BANK_ADDRESS||128||String||Address of the current bank or branch.|
A sample XML reply from the API for a SORT code search would be:
<bank_name>BARCLAYS BANK PLC</bank_name>
<branch_name>BARCLAYBANK B'CARD N'PTON</branch_name>
<bank_address>Dept AC Barclaycard House</bank_address>
5. API Errors
In case of an error the SORT API returns an XML response containing the error message.
Below you can find a description of all possible error messages that could be returned:
<error>Invalid API Key</error>
<error>Account number or Sort code is not valid!</error>
<error>Sort code cannot be found</error>
<error>No more queries available, you need to purchase additional queries.</error>
<error>IP Address not allowed</error>