# Bank Details Lookup

Source: https://docs.gocardless.com/docs/api-reference/bank-details-lookup

## Perform a bank details lookup

`POST /bank_details_lookups`

Performs a bank details lookup. As part of the lookup, a modulus check and
reachability check are performed.

For UK-based bank accounts, where an account holder name is provided (and an account number, a sort code or an iban
are already present), we verify that the account holder name and bank account number match the details held by
the relevant bank.

If your request returns an [error](#api-usage-errors) or the `available_debit_schemes`
attribute is an empty array, you will not be able to collect payments from the
specified bank account. GoCardless may be able to collect payments from an account
even if no `bic` is returned.

Bank account details may be supplied using [local details](#appendix-local-bank-details) or an IBAN.

_ACH scheme_ For compliance reasons, an extra validation step is done using
a third-party provider to make sure the customer's bank account can accept
Direct Debit. If a bank account is discovered to be closed or invalid, the
customer is requested to adjust the account number/routing number and
succeed in this check to continue with the flow.

_Note:_ Usage of this endpoint is monitored. If your organisation relies on GoCardless for
modulus or reachability checking but not for payment collection, please get in touch.

### Request body

Wrap request body attributes in a `bank_details_lookups` object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `iban` | string | No | International Bank Account Number. Alternatively you can provide [local details](#appendix-local-bank-details). |
| `account_number` | string | No | Bank account number - see [local details](#appendix-local-bank-details) for more information. Alternatively you can provide an `iban`. |
| `bank_code` | string | No | Bank code - see [local details](#appendix-local-bank-details) for more information. Alternatively you can provide an `iban`. |
| `branch_code` | string | No | Branch code - see [local details](#appendix-local-bank-details) for more information. Alternatively you can provide an `iban`. |
| `country_code` | string | No | [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) alpha-2 code. Must be provided if specifying local details. |
| `account_holder_name` | string | No | The account holder name associated with the account number (if available). If provided and the country code is GB, a payer name verification will be performed. |

### Responses

| Status | Description |
| --- | --- |
| 201 | Resource created successfully |
| 400 | Bad Request |
| 401 | Unauthorised |
| 404 | Not found |
| 422 | Validation Error |
| 500 | Internal Error |
