API Reference

πŸ” BIN Lookup API

Overview

The BIN Lookup API allows you to retrieve detailed information about a payment card based on its Bank Identification Number (BIN). This endpoint provides real-time card metadata including issuer, brand, type, category, and country of origin.


πŸ“š What is a BIN?

Definition

A BIN (Bank Identification Number), also known as IIN (Issuer Identification Number), is the first 4 to 8 digits of a payment card number that identifies:

  • Card Brand (Visa, Mastercard, American Express, etc.)
  • Issuing Bank (Chase, Bank of America, Santander, etc.)
  • Card Type (Credit, Debit, Prepaid)
  • Card Category (Classic, Gold, Platinum, Corporate)
  • Country of Issue

Structure

Card Number: 4532 1234 5678 9010

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”
β”‚   BIN   β”‚   Account Number β”‚ CVV β”‚
β”‚ 4532 12 β”‚  34 5678 901     β”‚ 0   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”˜
   ↑
   6 digits (Traditional BIN)
   
Modern cards may use 8-digit BINs:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”
β”‚    BIN    β”‚ Account Number β”‚ CVV β”‚
β”‚ 4532 1234 β”‚  5678 901      β”‚ 0   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”˜
   ↑
   8 digits (Modern BIN)

Common Use Cases

βœ… Fraud Prevention - Verify card origin matches customer location
βœ… Payment Routing - Route to specific processor based on card type
βœ… User Experience - Auto-detect card brand and display appropriate logo
βœ… Compliance - Validate card category for business rules
βœ… Analytics - Track card usage patterns by issuer/country


πŸš€ API Endpoint

Request

GET /api/v1/bank/wallet/bin/{card_bin}

Path Parameters

ParameterTypeRequiredDescriptionExample
card_binstringβœ… YesFirst 4-6 digits of card number453212

Validation Rules

  • Format: Must be 4 to 6 numeric digits
  • Pattern: ^[0-9]{4,6}$
  • Examples:
    • βœ… 4532 (4 digits - minimum)
    • βœ… 453212 (6 digits - standard)
    • ❌ 123 (too short)
    • ❌ 4532123 (too long)
    • ❌ 45a2 (contains letters)

Headers

Authorization: Bearer {your_access_token}
Content-Type: application/json

Response

Success Response (200 OK)

{
  "bin": "453212",
  "brand": "VISA",
  "type": "CREDIT",
  "category": "CLASSIC",
  "issuer": "BANCO SANTANDER S.A.",
  "code": "BR",
  "country": "BRAZIL"
}

Response Fields

FieldTypeDescriptionExample Values
binstringThe queried BIN number"453212", "5312"
brandstringCard network brand"VISA", "MASTERCARD", "AMEX", "ELO"
typestringCard type"CREDIT", "DEBIT", "PREPAID"
categorystringCard category level"CLASSIC", "GOLD", "PLATINUM", "CORPORATE"
issuerstringName of the issuing bank"BANCO SANTANDER S.A."
codestringISO 3166-1 alpha-2 country code"BR", "US", "MX"
countrystringFull country name"BRAZIL", "UNITED STATES", "MEXICO"

Error Responses

400 Bad Request - Invalid BIN Format

{
  "code": "card_bin_invalid"
}

Causes:

  • BIN contains letters or special characters
  • BIN is shorter than 4 digits
  • BIN is longer than 6 digits

401 Unauthorized

{
  "code": "unauthorized"
}

404 Not Found - BIN Not in Database

{
  "code": "bin_not_found"
}

Note: Our BIN database is regularly updated, but some newer or regional cards may not be included yet.


🌍 Supported Card Brands

BrandBIN RangeCountriesNotes
VISA4xxxxxGlobalMost common worldwide
MASTERCARD51-55, 2221-2720GlobalSecond most common
AMEX34, 37GlobalPrimarily USA, requires 4 digits CVC
ELO4011, 4312, 438935, 451416, 50BrazilBrazilian local brand
DINERS36, 38GlobalPopular in Latin America
DISCOVER6011, 644-649, 65USALimited international acceptance
HIPERCARD606282, 637095, 637599BrazilBrazilian local brand
JCB3528-3589JapanAsian market focus


πŸ§ͺ Testing

Test BINs (Sandbox Environment)

Use these test BINs in your development/staging environment:

453212 - VISA Credit 
531234 - Mastercard Debit
374512 - American Express
650432 - Elo Credit
401178 - Elo Debit