BIN & Card Validator API logo
FinanceMAINTAINED1 token / call

BIN & Card Validator API

Card scheme from a BIN and full-number validation with Luhn and length rules, nothing stored

Detect a card's scheme (Visa, Mastercard, Amex, Discover, Diners, JCB, UnionPay, Maestro) from its BIN/IIN, and validate a full card number with the Luhn checksum and per-scheme length rules. Computed entirely from the number β€” no card data is stored.

Every call needs an X-Api-Key header. A free key includes 500 tokens a month, no card required. 1 token per call, so the free plan covers about 500 calls a month.

No credit card requiredAccess to 125+ APIsCancel anytime
response.json
{
  "card": "453201******0366",
  "last4": "0366",
  "bin": "453201",
  "scheme": "visa",
  "length": 16,
  "expected_lengths": [
    13,
    16,
    19
  ],
  "luhn_valid": true,
  "length_valid": true,
  "valid": true
}
Production Ready
Battle-tested infrastructure with a 99.9% uptime SLA. Rate limits are generous, responses are consistent.
Simple Integration
Standard REST + JSON. Works with any HTTP client. Copy-ready code snippets in 4 languages.
One Key, 125+ APIs
Your DataAndAPIs subscription unlocks every API on the platform β€” anime, finance, sports, and more.

Use cases for BIN & Card Validator API

  • Show the right card logo as the customer types the first six digits of a card number.

  • Catch mistyped card numbers in a checkout form before sending them to the payment gateway and paying for a declined attempt.

  • Validate card numbers in test fixtures or data imports without touching a payment processor.

  • Enforce accepted-scheme rules, such as no Amex, client-side with a quick scheme lookup.

BIN & Card Validator API endpoints

Every endpoint with its parameters and a real example response.

GETLookup BIN

https://api-bin-lookup.dataandapis.com/v1/bin/{bin}

Path parameters

ParameterExample
bin453201Required

Example request

curl "https://api-bin-lookup.dataandapis.com/v1/bin/453201" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "bin": "453201",
  "scheme": "visa",
  "expected_lengths": [
    13,
    16,
    19
  ]
}

GETValidate Card

https://api-bin-lookup.dataandapis.com/v1/validate

Query parameters

ParameterExample
number4532015112830366Required

Example request

curl "https://api-bin-lookup.dataandapis.com/v1/validate?number=4532015112830366" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "card": "453201******0366",
  "last4": "0366",
  "bin": "453201",
  "scheme": "visa",
  "length": 16,
  "expected_lengths": [
    13,
    16,
    19
  ],
  "luhn_valid": true,
  "length_valid": true,
  "valid": true
}

Where the data comes from

Source
Published scheme prefix ranges and length rules for the eight supported card networks, with the Luhn checksum. Pure computation, no external data.
Freshness
Computed on every call. Scheme rules are updated with each release of the API.

One install. Every endpoint.

No proprietary SDKs needed. Any HTTP client works. Pick your language and paste.

3languages
2endpoints
RESTarchitecture
1key for all APIs
  • Fully typed responses β€” auto-completion in your IDE
  • Tracks the API in lockstep β€” new endpoints land same day
  • One key works across 125+ APIs on the platform
import axios from 'axios';

const { data } = await axios.get(
  'https://api-bin-lookup.dataandapis.com/v1/bin/{bin}',
  { headers: { 'X-Api-Key': process.env.API_KEY } }
);

BIN & Card Validator API Β· X-Api-Key

Explore the endpoints

Browse request parameters and inspect live example responses.

Available Endpoints

Request Parameters

API URL

Headers

X-Api-Key

Path Parameters

bin
import axios from 'axios';

const url = 'https://api-bin-lookup.dataandapis.com/v1/bin/{bin}';
const { data } = await axios.get(url, {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' }
});

One subscription. Every API.

Tokens unlock this API and 125+ others on DataAndAPIs. Switch APIs any time β€” we promote.

FREE

$0/mo

500 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Community support
Start free
Most Popular

STARTER

$6.99/mo

25,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Email support
Subscribe

PRO

$24.99/mo

100,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority email support
Subscribe

ULTRA

$99.99/mo

1,000,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority support
Subscribe

Need higher volume, dedicated infra, or a custom contract? Talk to sales β†’

Questions about BIN & Card Validator API

Ship BIN & Card Validator API this afternoon.

500 free tokens. No card. Plus 125+ other APIs on the same key.