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

# BIN Lookup

> Look up the card brand, type, category, issuing bank and country from the first 6 to 11 digits of a card number.

Returns what is known about a card from its BIN (also called IIN): the first 6 to 11 digits of the card number. Send more digits for a more precise result.

Each call is billed as a card validation.

## Error Responses

| Code | HTTP Status | Condition |
| - | - | - |
| none | 400 | `iin` is missing or is not 6 to 11 digits. |
| none | 401 | The `Authorization` header is missing, badly formatted, or the API key is not valid. The response body is empty. See [Authentication and Permission Failures](https://developers.pcibooking.net/reference/error-handling.md#authentication-and-permission-failures). |
| -160 | 404 | No data was found for this BIN. |

## Parameters

### Authentication

**API key only.** This endpoint does not accept access tokens or session tokens.

**Authorization** `string` *required*

Your API key prefixed with `APIKEY`. Example: `APIKEY your-api-key`. The `x-pcibooking-api-key` header is also accepted. See the [Authentication guide](https://developers.pcibooking.net/getting-started/authentication.md).

### Request Body

**iin** `string` *required*

The first 6 to 11 digits of the card number. Digits only.

```javascript Node.js theme={null}
const response = await fetch('https://service.pcibooking.net/api/payments/iin/full', {
  method: 'POST',
  headers: {
    'Authorization': 'APIKEY your-api-key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ iin: '41111111' })
});

console.log(await response.json());
```

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

response = requests.post(
    'https://service.pcibooking.net/api/payments/iin/full',
    headers={
        'Authorization': 'APIKEY your-api-key',
        'Content-Type': 'application/json'
    },
    json={'iin': '41111111'}
)

print(response.json())
```

## Response

| Field | Type | Description |
| - | - | - |
| `bin` | string | The BIN that matched. |
| `brand` | string | Card brand, for example `VISA`. |
| `type` | string | `DEBIT`, `CREDIT`, `DEBIT OR CREDIT` or `CHARGE CARD`. |
| `category` | string | Card category, for example `BUSINESS`, `PREPAID` or `CLASSIC`. |
| `issuingOrganization` | string | Name of the issuing bank. |
| `countryCode` | string | Issuing country, as a 2-letter ISO 3166 code. |

To get the same details for a stored card, use [Risk Assessment](https://developers.pcibooking.net/api-reference/manage-tokens/risk-assessment.md).

```json 200 theme={null}
{
  "issuingOrganization": "EXAMPLE BANK",
  "type": "CREDIT",
  "category": "CLASSIC",
  "countryCode": "US",
  "bin": "411111",
  "brand": "VISA"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.