# BIN Lookup API

> BIN Lookup is a BIN checker API: send the first 6 to 8 digits of a payment card and get the card brand, type (debit or credit), issuing bank and country of issuance back as JSON. Check incoming cards at checkout before you charge them.

**Endpoint:** `GET https://api.apiverve.com/v1/binlookup`  
**Category:** Finance  
**Cost:** 10 credits per call  
**Canonical page:** https://apiverve.com/marketplace/binlookup

## Overview

A BIN lookup API with a free plan: send the first six to eight digits of a card as the bin parameter. The API resolves the BIN against payment card records and returns the card network, card type, issuing bank name and issuing country, plus the number rules for that scheme: valid card lengths, whether the Luhn check applies, and the security code name and size. Paid plans add the card category, the issuer phone and website where the bank has published them, ISO alpha-2, alpha-3 and numeric country codes, the country currency and flag, and coordinates.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/binlookup?bin=448590&ip=81.2.69.142" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `bin` | string | Yes | The first 6 to 8 digits of the card number (BIN). A full card number is also accepted; only its first 8 digits are used. length 6-23 |
| `ip` | string | No | Optional IP address of the customer paying with the card. When given, customerIp says which country the IP is in and whether it matches the country that issued the card. ip |

## Response fields

- `bin` — string · The BIN number provided in the request
- `brand` — string · Card brand (VISA, Mastercard, American Express, etc.)
- `type` — string · Card type (CREDIT or DEBIT)
- `category` — string · Card category (PURCHASING, TRAVEL, etc.) · (premium)
- `country` — string · Country where card was issued
- `issuer` — object · The issuing bank: name, country, phone and website
  - `issuer.name` — string · Full name of the issuing bank
  - `issuer.country` — string · Country where issuer is located · (premium)
  - `issuer.phone` — object · Contact phone number of the issuer · (premium)
  - `issuer.website` — object · Official website URL of the issuer · (premium)
- `location` — object · Issuing country coordinates and ISO codes
  - `location.latitude` — string · Latitude coordinate of issuer location · (premium)
  - `location.longitude` — string · Longitude coordinate of issuer location · (premium)
  - `location.alpha2` — string · Two-letter ISO country code of location · (premium)
  - `location.alpha3` — string · Three-letter ISO country code of location · (premium)
  - `location.numeric` — string · ISO 3166-1 numeric code of the issuing country (e.g. 208 for Denmark) · (premium)
  - `location.currency` — string · ISO 4217 code of the issuing country's currency (e.g. DKK), or null when the country uses more than one · (premium)
  - `location.currencies` — array · Every ISO 4217 currency code in use in the issuing country · (premium)
  - `location.flag` — string · Flag emoji of the issuing country · (premium)
  - `location.isEU` — boolean · Whether the issuing country is an EU member state
  - `location.isEEA` — boolean · Whether the issuing country is in the European Economic Area (the EU plus Iceland, Liechtenstein and Norway)
  - `location.isSEPA` — boolean · Whether the issuing country is in the Single Euro Payments Area (SEPA), per the European Payments Council
- `number` — object · Card number rules for the scheme this BIN belongs to, or nulls if the prefix matches no single scheme
  - `number.scheme` — string · Machine-readable scheme id matched from the BIN prefix (visa, mastercard, american-express, discover, jcb, unionpay, rupay, etc.). RuPay BINs report rupay with 16-digit numbers and a 3-digit CVV
  - `number.lengths` — array · Valid card number lengths for the scheme, in digits (e.g. [16, 18, 19] for Visa)
  - `number.luhn` — boolean · Whether card numbers in this scheme are checked with the Luhn checksum (false for UnionPay, where it is not guaranteed)
  - `number.code` — object · Security code the scheme uses
    - `number.code.name` — string · Name of the security code (CVV, CVC, CID, etc.)
    - `number.code.size` — number · Number of digits in the security code
- `customerIp` — object · Where the customer IP passed in ip is, compared with the card's issuing country. A card used from a different country than the one that issued it is a common fraud signal. Null when no ip is sent · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "bin": "448590",
    "brand": "VISA",
    "type": "CREDIT",
    "category": "PURCHASING",
    "country": "UNITED STATES",
    "issuer": {
      "name": "JPMORGAN CHASE BANK N.A. - COMMERCIAL",
      "country": "UNITED STATES",
      "phone": null,
      "website": null
    },
    "location": {
      "latitude": "37.0902",
      "longitude": "-95.7129",
      "alpha2": "US",
      "alpha3": "USA",
      "numeric": "840",
      "currency": "USD",
      "currencies": [
        "USD"
      ],
      "flag": "🇺🇸",
      "isEU": false,
      "isEEA": false,
      "isSEPA": false
    },
    "number": {
      "scheme": "visa",
      "lengths": [
        16,
        18,
        19
      ],
      "luhn": true,
      "code": {
        "name": "CVV",
        "size": 3
      }
    },
    "customerIp": null
  }
}
```

## Use cases

- **Checkout Brand Detection** — Display the matching Visa or Mastercard logo automatically when customers type the first six digits into your checkout form.
- **Debit vs Credit Routing** — Apply different fees, limits or review rules to debit and credit cards before you run the authorization.
- **Debit Fee Optimization** — Route transactions through lower-cost debit payment rails whenever the lookup confirms an incoming debit card.
- **Billing Country Mismatch** — Flag suspicious orders for manual review if the card issuing country does not match the customer billing address.

## SDKs

- **npm** — `npm install @apiverve/binlookup` (https://www.npmjs.com/package/@apiverve/binlookup)
- **PyPI** — `pip install apiverve-binlookup` (https://pypi.org/project/apiverve-binlookup/)
- **NuGet** — `dotnet add package APIVerve.API.BINLookup` (https://www.nuget.org/packages/APIVerve.API.BINLookup)
- **Source** — https://github.com/apiverve/binlookup-api

## More

- Full reference: https://docs.apiverve.com/ref/binlookup
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
