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

# BIC validation

> The `bic` endpoint validates Business Identifier Codes, providing detailed breakdown of bank codes, country information, and institution types for international banking operations.

## Getting started

### Base URL

```
https://bankvalidation.cleariflow.com/v1/bic/
```

### Validation endpoint

The `bic` endpoint requires your API key and a BIC parameter to perform comprehensive validation of Business Identifier Codes.

```
https://bankvalidation.cleariflow.com/v1/bic/
? api_key = YOUR_UNIQUE_API_KEY
& bic = DEUTDEFF500
```

This successful request validates a German BIC and returns detailed information:

<ResponseExample>
  ```json theme={"system"}
  {
    "bic": "DEUTDEFF500",
    "is_valid": true,
    "country_code": "DE",
    "country_name": "Germany",
    "bank_code": "DEUT",
    "bank_name": "Bank information not available",
    "location_code": "F",
    "branch_code": "500",
    "details": {
      "type": "BIC",
      "active": true,
      "institution_type": "Bank"
    }
  }
  ```
</ResponseExample>

### Request parameters

<ParamField query="api_key" type="String" required>
  Your unique API key. Note that each user has unique API keys *for each of
  Cleariflow APIs*, so your Bank Validation API key will not work for your Exchange
  Rates API, for example.
</ParamField>

<ParamField query="bic" type="String" required>
  The Business Identifier Code to validate. Spaces are allowed and will be automatically removed during processing. The BIC should follow the ISO 9362 standard format.
</ParamField>

### Response parameters

The API response is returned in a universal and lightweight [JSON format](https://www.json.org/json-en.html).

<ResponseField name="bic" type="String">
  The normalized BIC without spaces, returned in uppercase format.
</ResponseField>

<ResponseField name="is_valid" type="Boolean">
  Overall validation result indicating whether the BIC is valid according to all validation rules.
</ResponseField>

<ResponseField name="country_code" type="String">
  The two-letter ISO country code (e.g., DE for Germany, US for United States).
</ResponseField>

<ResponseField name="country_name" type="String">
  The full name of the country associated with the BIC.
</ResponseField>

<ResponseField name="bank_code" type="String">
  The 4-character bank identifier code (e.g., DEUT for Deutsche Bank).
</ResponseField>

<ResponseField name="bank_name" type="String">
  The name of the bank (currently shows "Bank information not available").
</ResponseField>

<ResponseField name="location_code" type="String">
  The 2-character location code indicating the city or region (e.g., FF for Frankfurt).
</ResponseField>

<ResponseField name="branch_code" type="String">
  The 3-character branch code (optional, may be empty for 8-character BICs).
</ResponseField>

<ResponseField name="details" type="Object">
  Additional detailed information about the BIC type and status.
</ResponseField>

<ResponseField name="details.type" type="String">
  The type of identifier (typically "BIC").
</ResponseField>

<ResponseField name="details.active" type="Boolean">
  Whether the BIC is currently active and in use.
</ResponseField>

<ResponseField name="details.institution_type" type="String">
  The type of financial institution (e.g., "Bank", "Credit Union").
</ResponseField>

## Examples

### Valid German BIC (8 characters)

**Request:**

```
GET https://bankvalidation.cleariflow.com/v1/bic/?api_key=YOUR_API_KEY&bic=DEUTDEFF
```

**Response:**

```json theme={"system"}
{
  "bic": "DEUTDEFF",
  "is_valid": true,
  "country_code": "DE",
  "country_name": "Germany",
  "bank_code": "DEUT",
  "bank_name": "Bank information not available",
  "location_code": "FF",
  "branch_code": "",
  "details": {
    "type": "BIC",
    "active": true,
    "institution_type": "Bank"
  }
}
```

### Valid German BIC (11 characters with branch)

**Request:**

```
GET https://bankvalidation.cleariflow.com/v1/bic/?api_key=YOUR_API_KEY&bic=DEUTDEFF500
```

**Response:**

```json theme={"system"}
{
  "bic": "DEUTDEFF500",
  "is_valid": true,
  "country_code": "DE",
  "country_name": "Germany",
  "bank_code": "DEUT",
  "bank_name": "Bank information not available",
  "location_code": "FF",
  "branch_code": "500",
  "details": {
    "type": "BIC",
    "active": true,
    "institution_type": "Bank"
  }
}
```

### Valid US BIC

**Request:**

```
GET https://bankvalidation.cleariflow.com/v1/bic/?api_key=YOUR_API_KEY&bic=CHASUS33
```

**Response:**

```json theme={"system"}
{
  "bic": "CHASUS33",
  "is_valid": true,
  "country_code": "US",
  "country_name": "United States",
  "bank_code": "CHAS",
  "bank_name": "Bank information not available",
  "location_code": "33",
  "branch_code": "",
  "details": {
    "type": "BIC",
    "active": true,
    "institution_type": "Bank"
  }
}
```

### Valid UK BIC

**Request:**

```
GET https://bankvalidation.cleariflow.com/v1/bic/?api_key=YOUR_API_KEY&bic=NWBKGB2L
```

**Response:**

```json theme={"system"}
{
  "bic": "NWBKGB2L",
  "is_valid": true,
  "country_code": "GB",
  "country_name": "United Kingdom",
  "bank_code": "NWBK",
  "bank_name": "Bank information not available",
  "location_code": "2L",
  "branch_code": "",
  "details": {
    "type": "BIC",
    "active": true,
    "institution_type": "Bank"
  }
}
```

### Invalid BIC

**Request:**

```
GET https://bankvalidation.cleariflow.com/v1/bic/?api_key=YOUR_API_KEY&bic=INVALID
```

**Response:**

```json theme={"system"}
{
  "bic": "INVALID",
  "is_valid": false,
  "country_code": "",
  "country_name": "",
  "bank_code": "",
  "bank_name": "Bank information not available",
  "location_code": "",
  "branch_code": "",
  "details": {
    "type": "BIC",
    "active": true
  }
}
```

## Error handling

### Missing BIC parameter

**Request:**

```
GET https://bankvalidation.cleariflow.com/v1/bic/?api_key=YOUR_API_KEY
```

**Response:**

```json theme={"system"}
{
  "error": {
    "message": "Missing bic",
    "code": "missing_bic"
  }
}
```

### Missing API key

**Request:**

```
GET https://bankvalidation.cleariflow.com/v1/bic/?bic=DEUTDEFF500
```

**Response:**

```json theme={"system"}
{
  "error": {
    "message": "API key is required",
    "code": "missing_api_key"
  }
}
```

## BIC Structure

The BIC consists of several components:

1. **Bank Code (4 characters)**: Unique identifier for the financial institution
2. **Country Code (2 characters)**: ISO 3166-1 alpha-2 country code
3. **Location Code (2 characters)**: City or region identifier
4. **Branch Code (3 characters)**: Optional branch identifier (XXX for main office)

### Format examples

* **8-character BIC**: `DEUTDEFF` (Deutsche Bank, Germany, Frankfurt)
* **11-character BIC**: `DEUTDEFF500` (Deutsche Bank, Germany, Frankfurt, Branch 500)

### Common location codes

* **FF**: Frankfurt, Germany
* **33**: New York, United States
* **2L**: London, United Kingdom
* **PP**: Paris, France
* **MM**: Milan, Italy

## Validation Rules

The API performs comprehensive validation including:

1. **Length Validation**: Checks if the BIC is 8 or 11 characters long
2. **Format Validation**: Verifies the BIC follows the ISO 9362 standard
3. **Character Validation**: Ensures only alphanumeric characters are used
4. **Country Code Validation**: Validates the country code format
5. **Bank Code Validation**: Checks the bank identifier format

### BIC format requirements

* **Bank Code**: 4 alphanumeric characters
* **Country Code**: 2 alphabetic characters (ISO 3166-1)
* **Location Code**: 2 alphanumeric characters
* **Branch Code**: 3 alphanumeric characters (optional)

## BIC vs SWIFT

BIC (Business Identifier Code) and SWIFT are often used interchangeably:

* **BIC**: The official ISO 9362 standard name
* **SWIFT**: The messaging network that popularized the code
* **SWIFT Code**: Alternative name for BIC

All BICs can be used for SWIFT messaging, but not all SWIFT codes are valid BICs.

## Supported Countries

The API supports BIC validation for 50+ countries including:

* **Europe**: Germany, France, Italy, Spain, Netherlands, Belgium, Austria, Switzerland, UK, Poland
* **Americas**: United States, Canada, Brazil, Mexico
* **Asia**: Japan, Singapore, Hong Kong, Australia
* **Africa**: South Africa, Egypt, Nigeria

For a complete list of supported countries, see the [Supported Countries](/bank-validation/countries) page.

## Use Cases

BIC validation is essential for:

1. **International Wire Transfers**: Ensuring accurate routing information
2. **SEPA Payments**: European payment system requirements
3. **Banking Applications**: Customer account validation
4. **Financial Compliance**: Regulatory reporting requirements
5. **Payment Processing**: E-commerce and fintech applications
