Data8 Logo

DescriptionEndpoint URLsParametersAdvanced OptionsResultsCredit UsageSample CodeLive Demo
IsValid
Validates a sort code & account number
Description

Checks if a sort code is a valid UK 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.

Endpoint URLs

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

Protocol URL
JSON
JSON
https://webservices.data-8.co.uk/BankAccountValidation/IsValid.json
OPEN API
OPEN API
https://webservices.data-8.co.uk/swagger/BankAccountValidation/swagger.json
SOAP
SOAP
https://webservices.data-8.co.uk/bankaccountvalidation.asmx
Parameters
The following parameters can be supplied to this method:
Name Description
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.
Name Description
Common Options
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.
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
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:
Name Description
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

Credit Usage

Requests to this method do not consume credits, but you must have some credits available.

Sample Code

Request Format

{
  "sortCode": "11-02-57",
  "bankAccountNumber": "01234567",
  "options": {
    "CountryCode": "GB"
  }
}

Response Format

{
  "Status": {
    "Success": true,
    "CreditsRemaining": 1000
  },
  "Valid": "Invalid",
  "SortCode": "11-02-57",
  "AccountNumber": "01234567",
  "BICCode": "HLFXGB21W46",
  "IBAN": "IBAN GB91 HLFX 1102 5701 2345 67",
  "BranchName": "Ealing (110257)",
  "ShortBankName": "HALIFAX",
  "FullBankName": "HALIFAX (A TRADING NAME OF BANK OF SCOTLAND PLC)",
  "Address": {
    "Address": {
      "Lines": [
        "Halifax",
        "PO Box 722",
        "",
        "",
        "LEEDS",
        "West Yorkshire",
        "LS1 9GG"
      ]
    },
    "RawAddress": {
      "Organisation": "HALIFAX",
      "Department": "",
      "AddressKey": 0,
      "OrganisationKey": 0,
      "BuildingNumber": 0,
      "SubBuildingName": "",
      "BuildingName": "",
      "DependentThoroughfareName": "",
      "ThoroughfareName": "",
      "DoubleDependentLocality": "",
      "DependentLocality": "",
      "Locality": "LEEDS",
      "Postcode": "LS1 9GG",
      "Dps": "",
      "PoBox": "PO BOX 722",
      "PostalCounty": "WEST YORKSHIRE"
    }
  },
  "AcceptsBACSPayments": true,
  "AcceptsDirectDebitTransactions": true,
  "AcceptsDirectCreditTransactions": true,
  "AcceptsUnpaidChequeClaimTransactions": false,
  "AcceptsBuildingSocietyCreditTransactions": true,
  "AcceptsDividendInterestPaymentTransactions": true,
  "AcceptsDirectDebitInstructionTransactions": true,
  "AcceptsCHAPSPayments": true,
  "AcceptsCheques": true,
  "AcceptsFasterPayments": true
}

Depending on your chosen authentication method you will need to modify this request slightly:

API Key

Post the request to
https://webservices.data-8.co.uk/BankAccountValidation/IsValid.json?key=your-api-key
and do NOT include the username or password properties in the request JSON document.
Read More

Username and Password

Post the request to
https://webservices.data-8.co.uk/BankAccountValidation/IsValid.json
and include username and password properties in the request JSON document.
Do not use for client-side requests!
Read More

JWT Token

Obtain a JWT token for your user and post the request to
https://webservices.data-8.co.uk/BankAccountValidation/IsValid.json
Include the JWT token in the request headers as:
Authorization: Bearer your-jwt-token
Read More
Live Demo
Parameter Value
Parameters
sortCode
sortCode
bankAccountNumber
bankAccountNumber
Common Options
ApplicationName
ApplicationName
Address Formatting Options
Formatter
Formatter
DefaultFormatter PAFStandardFormatter NoOrganisationFormatter
MaxLines
MaxLines
MaxLineLength
MaxLineLength
FixTownCounty
FixTownCounty
falsetrue
FixBuilding
FixBuilding
falsetrue
NormalizeCase
NormalizeCase
falsetrue
NormalizeTownCase
NormalizeTownCase
falsetrue
UseAnyAvailableCounty
UseAnyAvailableCounty
falsetrue
UnwantedPunctuation
UnwantedPunctuation
Service-Specific Options
CountryCode
CountryCode
Credits Remaining Today: 5
Try It Now!
An error has occurred. This application may no longer respond until reloaded. Reload 🗙