π 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
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
card_bin | string | β Yes | First 4-6 digits of card number | 453212 |
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/jsonResponse
Success Response (200 OK)
{
"bin": "453212",
"brand": "VISA",
"type": "CREDIT",
"category": "CLASSIC",
"issuer": "BANCO SANTANDER S.A.",
"code": "BR",
"country": "BRAZIL"
}Response Fields
| Field | Type | Description | Example Values |
|---|---|---|---|
bin | string | The queried BIN number | "453212", "5312" |
brand | string | Card network brand | "VISA", "MASTERCARD", "AMEX", "ELO" |
type | string | Card type | "CREDIT", "DEBIT", "PREPAID" |
category | string | Card category level | "CLASSIC", "GOLD", "PLATINUM", "CORPORATE" |
issuer | string | Name of the issuing bank | "BANCO SANTANDER S.A." |
code | string | ISO 3166-1 alpha-2 country code | "BR", "US", "MX" |
country | string | Full 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
| Brand | BIN Range | Countries | Notes |
|---|---|---|---|
| VISA | 4xxxxx | Global | Most common worldwide |
| MASTERCARD | 51-55, 2221-2720 | Global | Second most common |
| AMEX | 34, 37 | Global | Primarily USA, requires 4 digits CVC |
| ELO | 4011, 4312, 438935, 451416, 50 | Brazil | Brazilian local brand |
| DINERS | 36, 38 | Global | Popular in Latin America |
| DISCOVER | 6011, 644-649, 65 | USA | Limited international acceptance |
| HIPERCARD | 606282, 637095, 637599 | Brazil | Brazilian local brand |
| JCB | 3528-3589 | Japan | Asian 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 DebitUpdated 17 days ago
