> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loqate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bank Validation Quick Start Guide

> Get started with Bank Validation APIs. Verify UK account numbers and sort codes, or validate IBANs for EMEA regions to reduce payment failures.

**Bank Validation verifies bank account numbers and sort codes to reduce failed payments and fraud.**

***

## Coverage

* **UK accounts:** Full validation including account number and sort code verification
* **International accounts:** IBAN validation for EMEA regions (excluding US)

## Available Endpoints

Bank Validation provides four API endpoints:

### UK Validation

* [**Individual Validate**](https://docs.loqate.com/api-reference/bank-validation/individual) - Validate a single UK bank account and sort code
* [**Batch Validate**](https://docs.loqate.com/api-reference/bank-validation/batch) - Validate multiple UK accounts in bulk
* [**RetrieveBySortcode**](https://docs.loqate.com/api-reference/bank-validation/retrievebysortcode) - Validate using only the sort code

### International Validation

* [**International Validate**](https://docs.loqate.com/api-reference/bank-validation/international) - Validate international bank accounts (EMEA, excluding US)

## Getting Started

1. [Create an API key](https://docs.loqate.com/loqate-basics/create-an-api-key) if you don't have one
2. Choose the appropriate endpoint for your use case
3. Make your first request using the endpoint documentation above

Here's a simple example request for the **Individual Validate** endpoint:

<CodeGroup>
  ```shell cURL theme={null}
  curl --request GET \
    --url https://api.addressy.com/BankAccountValidation/Interactive/Validate/v2.00/json6.ws
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.addressy.com/BankAccountValidation/Interactive/Validate/v2.00/json6.ws"

  response = requests.get(url)

  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const url = 'https://api.addressy.com/BankAccountValidation/Interactive/Validate/v2.00/json6.ws';
  const options = {method: 'GET', body: undefined};

  try {
    const response = await fetch(url, options);
    const data = await response.json();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
  ```

  ```php PHP theme={null}
  <?php

  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.addressy.com/BankAccountValidation/Interactive/Validate/v2.00/json6.ws",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
  ]);

  $response = curl_exec($curl);
  $err = curl_error($curl);

  curl_close($curl);

  if ($err) {
    echo "cURL Error #:" . $err;
  } else {
    echo $response;
  }
  ```

  ```go Go theme={null}
  package main

  import (
  	"fmt"
  	"net/http"
  	"io"
  )

  func main() {

  	url := "https://api.addressy.com/BankAccountValidation/Interactive/Validate/v2.00/json6.ws"

  	req, _ := http.NewRequest("GET", url, nil)

  	res, _ := http.DefaultClient.Do(req)

  	defer res.Body.Close()
  	body, _ := io.ReadAll(res.Body)

  	fmt.Println(res)
  	fmt.Println(string(body))

  }
  ```

  ```java Java theme={null}
  HttpResponse<String> response = Unirest.get("https://api.addressy.com/BankAccountValidation/Interactive/Validate/v2.00/json6.ws")
    .asString();
  ```

  ```ruby Ruby theme={null}
  require 'uri'
  require 'net/http'

  url = URI("https://api.addressy.com/BankAccountValidation/Interactive/Validate/v2.00/json6.ws")

  http = Net::HTTP.new(url.host, url.port)
  http.use_ssl = true

  request = Net::HTTP::Get.new(url)

  response = http.request(request)
  puts response.read_body
  ```
</CodeGroup>

## What Bank Validation Returns

Bank Validation confirms:

* Whether the account number matches the sort code
* Bank and branch information for the sort code

Response should be in the following format:

```json theme={null}
{
  "Items": [
    {
      "IsCorrect": "False",
      "IsDirectDebitCapable": "False",
      "StatusInformation": "UnknownSortCode",
      "CorrectedSortCode": "",
      "CorrectedAccountNumber": "",
      "IBAN": "",
      "Bank": "",
      "BankBIC": "",
      "Branch": "",
      "BranchBIC": "",
      "ContactAddressLine1": "",
      "ContactAddressLine2": "",
      "ContactPostTown": "",
      "ContactPostcode": "",
      "ContactPhone": "",
      "ContactFax": "",
      "FasterPaymentsSupported": "",
      "CHAPSSupported": ""
    }
  ]
}
```

And you can use this information below to interpret the response fields:

<AccordionGroup>
  <Accordion title="Response Fields">
    ### Validation Results

    | Field                  | Type    | Description                                                                                                                                                                             |
    | ---------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `IsCorrect`            | boolean | Whether the account number and sort code are valid                                                                                                                                      |
    | `IsDirectDebitCapable` | boolean | Whether the branch can accept direct debits                                                                                                                                             |
    | `StatusInformation`    | string  | Details about the validation outcome. `DetailsChanged` means check corrected fields for BACS submission. `CautiousOK` indicates the sort code exists but has no validation rules (rare) |

    ### Corrected Details

    | Field                    | Type   | Description                                                                |
    | ------------------------ | ------ | -------------------------------------------------------------------------- |
    | `CorrectedSortCode`      | string | The correct sort code (6 digits, no hyphens). May differ from the original |
    | `CorrectedAccountNumber` | string | The correct account number (8 digits, BACS format)                         |
    | `IBAN`                   | string | Correctly formatted IBAN for the account                                   |

    ### Bank Information

    | Field       | Type   | Description                           |
    | ----------- | ------ | ------------------------------------- |
    | `Bank`      | string | Name of the banking institution       |
    | `BankBIC`   | string | Banking institution's BIC (SWIFT BIC) |
    | `Branch`    | string | Name of the account holding branch    |
    | `BranchBIC` | string | Branch's BIC                          |

    ### Contact Information

    | Field                 | Type   | Description                                                                                      |
    | --------------------- | ------ | ------------------------------------------------------------------------------------------------ |
    | `ContactAddressLine1` | string | Line 1 of branch contact address (may be contact centre for BACS enquiries, not physical branch) |
    | `ContactAddressLine2` | string | Line 2 of branch contact address                                                                 |
    | `ContactPostTown`     | string | Branch contact post town                                                                         |
    | `ContactPostcode`     | string | Branch contact postcode                                                                          |
    | `ContactPhone`        | string | Branch contact phone number                                                                      |
    | `ContactFax`          | string | Branch contact fax number                                                                        |

    ### Payment Services

    | Field                     | Type    | Description                                  |
    | ------------------------- | ------- | -------------------------------------------- |
    | `FasterPaymentsSupported` | boolean | Whether the account supports Faster Payments |
    | `CHAPSSupported`          | boolean | Whether the account supports CHAPS           |
  </Accordion>

  <Accordion title="Error Response Fields">
    When an error occurs, the API returns an error response with the following structure:

    | Field         | Type   | Description                  |
    | ------------- | ------ | ---------------------------- |
    | `Error`       | string | The error ID                 |
    | `Description` | string | A description of the error   |
    | `Cause`       | string | The cause of the error       |
    | `Resolution`  | string | Actions to resolve the error |

    ### Common Error Codes

    | Status Code | Meaning               | Common Causes                                                             |
    | ----------- | --------------------- | ------------------------------------------------------------------------- |
    | **400**     | Bad Request           | Invalid parameters, malformed request, missing required fields            |
    | **401**     | Unauthorized          | Invalid or missing API key                                                |
    | **403**     | Forbidden             | API key doesn't have permission for this service, or daily limit exceeded |
    | **500**     | Internal Server Error | Server-side issue, temporary service disruption                           |

    **Tip:** Check the `Resolution` field for specific steps to fix the error. For more details on error responses, see [Individual Bank Validation](/api-reference/bank-validation/individual) in API documentation.
  </Accordion>
</AccordionGroup>

**Note:** Bank Validation does not return information about account holders. Only sort code and account number validity are verified.

## Try Bank Validation

Test Bank Validation using the [Individual Validate Playground](/api-reference/bank-validation/individual?playground=open) to make your first request.

## FAQ

<AccordionGroup>
  <Accordion title="Why doesn't the branch address match the physical location?">
    Many banks use central processing depots for BACS and other transactions. A sort code may return the bank's central depot address rather than the specific branch location.
  </Accordion>

  <Accordion title="Is Bank Validation available worldwide?">
    Most Bank Validation services are UK-only. The [International Validate](https://docs.loqate.com/api-reference/bank-validation/international) endpoint covers EMEA regions (excluding US).
  </Accordion>
</AccordionGroup>
