Skip to the content

IsValid

Validates a sort code & account number

Live Demo

To connect to this service you'll need to use one of these endpoints:

JSON
Open API
SOAP

Description

Checks if a sort code is a valid UK or Ireland sort code, and retrieve additional information about the associated bank.

If an account number is also specified, checks if it is a potentially valid account number for that sort code.

Credit Usage

Each request to this method consumes 1 BankAccountValidation credit.

Parameters

The following parameters can be supplied to this method

username

username

See the available authentication methods. If you are using username & password authentication, specify the username to authenticate as. If you are using API Key authentication and you are not using the JSON, Javascript or ADO APIs, use your API Key here with the prefix apikey-, e.g. apikey-ABCD-1234-EFGH-5678
password

password

If you are using username & password authentication, specify the password to use for authentication. Otherwise leave this blank.
sortCode

sortCode

The sort code to validate. The formatting of this number does not matter, so can be supplied with or without the standard dashes.

bankAccountNumber

bankAccountNumber

If specified, indicates the account number to validate along with the sortCode. Leave blank to validate the sort code only.

options

options

An array of options that control further details of how this method operates. See the Advanced Options section below for more information.

Advanced Options

The following options can be specified as part of the option parameter. Each option is specified as a key/value pair. The list of available names is shown below, along with a description of the allowable values for that name.

Common Options
Name Description
ApplicationName

ApplicationName

Gives the name of the calling application - used to break down usage by application in the usage reports on the dashboard
Address Formatting Options
There are a large number of options to control how the raw address details are combined & formatted for presentation. They are described in more detail with live interactive examples on the address formatting reference. A summary of the available options is also listed below.
Name Description
Formatter

Formatter

Pick from one of the available formatters to control how the raw address is converted into a human-readable address:
  • DefaultFormatter
  • PAFStandardFormatter
  • NoOrganisationFormatter
MaxLines

MaxLines

The number of lines to format the address over. An additional line will be included at the end of the results for the postcode
MaxLineLength

MaxLineLength

The maximum number of characters that can appear in each address line
FixTownCounty

FixTownCounty

true to ensure that the town and county are returned in the last two address lines, or false if they should appear in the first available line
FixBuilding

FixBuilding

Ensures the building name/number is always placed in the first line
NormalizeCase

NormalizeCase

Converts all text in the address except the town name to proper case
NormalizeTownCase

NormalizeTownCase

Converts the town name to proper case
UseAnyAvailableCounty

UseAnyAvailableCounty

Uses any available county to populate the formatted address, not just the postal county
ExcludeCounty

ExcludeCounty

Excludes the county, if any, from the formatted address
UnwantedPunctuation

UnwantedPunctuation

A string containing any punctuation characters to be removed from the formatted address
Service-Specific Options
Name Description
CountryCode

CountryCode

The ISO 2-character code for the country the details are from. Currently supported values are "GB" and "IE". If not specified, "GB" is assumed.

Results

This method returns an object containing the following fields:

Status

Status

Indicates whether the method call was successful, or if some error occurred. If the Success field is true, the other results described below can be used to get the results of the method. If Success is false, some error occurred in calling the method, such as the authentication failed or the account is out of credits. The details of the error can be obtained from the ErrorMessage field, and any other results should be ignored
Valid

Valid

Indicates if the supplied details are valid. This can be one of the following values:

  • Valid - the bank account number passes the validation rules applied to the selected bank
  • Invalid - the bank account number fails the validation rules applied to the selected bank
  • NotValidated - no validation rules are available for the selected bank
SortCode

SortCode

Returns the sort code in a standardised format with dashes

AccountNumber

AccountNumber

The account number in a standardised format

BICCode

BICCode

The BIC code for the bank for this branch to be used with international payments

IBAN

IBAN

The IBAN number for this account to be used with international payments

BranchName

BranchName

The name of the bank branch. For most high-street banks, this will be the town name the branch is located in.

ShortBankName

ShortBankName

The normal accepted name of the bank

FullBankName

FullBankName

The full official name of the bank

Address

Address

The postal address of the branch. Note that this may not be the same as the physical location of the branch as many banks centralise all their operations

AcceptsBACSPayments

AcceptsBACSPayments

Indicates if the account can receive payments through the BACS network

AcceptsDirectDebitTransactions

AcceptsDirectDebitTransactions

Indicates if the account can be used to take Direct Debit payments

AcceptsDirectCreditTransactions

AcceptsDirectCreditTransactions

Indicates if the account can be used to take Direct Credit payments

AcceptsUnpaidChequeClaimTransactions

AcceptsUnpaidChequeClaimTransactions

Indicates if the bank can process claims for unpaid cheques

AcceptsBuildingSocietyCreditTransactions

AcceptsBuildingSocietyCreditTransactions

Indicates if the account can be used to take credits from building societies

AcceptsDividendInterestPaymentTransactions

AcceptsDividendInterestPaymentTransactions

Indicates if the account can be used to take credits from dividend payments

AcceptsDirectDebitInstructionTransactions

AcceptsDirectDebitInstructionTransactions

Indicates if the bank can process direct debit instructions

AcceptsCHAPSPayments

AcceptsCHAPSPayments

Indicates if the account can receive payments through the CHAPS network

AcceptsCheques

AcceptsCheques

Indicates if the account can receive payments by cheque

AcceptsFasterPayments

AcceptsFasterPayments

Indicates if the account can receive payments through the Faster Payments network

Live Demo

sortCode
bankAccountNumber
options
Name Value
Common Options
Address Formatting Options
Service-Specific Options

Sample Code