# Card information by BIN

With this API request, you will be able to find out the BIN information of the card.

```
https://unitpay.ru/api?
     method=getBinInfo
     params[login]=partner@mail
     params[bin]=477964
     params[secretKey]=key
```

<table data-header-hidden><thead><tr><th width="161.55550130208331">name</th><th width="145.2222900390625">type</th><th>description</th></tr></thead><tbody><tr><td><strong>login</strong></td><td>string</td><td>Email associated with the UnitPay system</td></tr><tr><td><strong>secretKey</strong></td><td>string</td><td>Partner's secret key, available in <a href="https://unitpay.money/partner/profile/edit">profile settings</a></td></tr><tr><td><strong>bin</strong></td><td>number</td><td>First 6 digits of the card number</td></tr></tbody></table>

#### Successful response

```
{"result": {
    "bin": "477964",
    "bank": "Alfa Bank",
    "countryCode": "RU",
    "brand": "VISA",
    "category": "CLASSIC",
    "bankUrl": "http://alfabank.com/russia/",
    "bankPhone": "7 495 620-91-91"
}}
```

<table data-header-hidden><thead><tr><th width="171.55556233723956">name</th><th width="125.7777099609375">type</th><th>description</th></tr></thead><tbody><tr><td><strong>bin</strong></td><td>string</td><td>First 6 digits of the card number</td></tr><tr><td><strong>bank</strong></td><td>string</td><td>Name of the bank where the card was issued</td></tr><tr><td><strong>countryCode</strong></td><td>string</td><td>Country code in Alpha-2 format (ISO 3166-1)</td></tr><tr><td><strong>brand</strong></td><td>string</td><td>Name of the international system in which the card is serviced</td></tr><tr><td><strong>category</strong></td><td>string</td><td>Категория карты</td></tr><tr><td><strong>type</strong></td><td>string</td><td>Card type</td></tr><tr><td><strong>bankUrl</strong></td><td>string</td><td>Bank url</td></tr><tr><td><strong>bankPhone</strong></td><td>string</td><td>Bank phone number</td></tr></tbody></table>

#### Example of an incorrect answer

```
{"error": {
    "message": "Nothing was found for your request",
    "code": 100
}}
```

<table data-header-hidden><thead><tr><th width="138.4444580078125">name</th><th width="138.22224934895831">type</th><th>description</th></tr></thead><tbody><tr><td><strong>message</strong></td><td>string</td><td>Information describing the request error</td></tr><tr><td><strong>code</strong></td><td>string</td><td>Error code, detailed decoding in the table below</td></tr></tbody></table>

#### Description of errors

<table data-header-hidden><thead><tr><th width="136.22222900390625"></th><th>Описание</th></tr></thead><tbody><tr><td><strong>100</strong></td><td>Nothing was found for your request</td></tr></tbody></table>

#### Technical errors:

<table data-header-hidden><thead><tr><th width="137.33331298828125">name</th><th>description</th></tr></thead><tbody><tr><td><strong>-32000</strong></td><td>Invalid authorisation parameters (login, secret key)</td></tr><tr><td><strong>-32602</strong></td><td>Invalid query parameters</td></tr><tr><td><strong>-32603</strong></td><td>Internal technical error</td></tr></tbody></table>
