BIN Lookup
Lookup card network, type, bank, and issuance information from BIN (Bank Identification Number).
Overview
The BIN Lookup endpoint allows you to retrieve card information by providing the first 8 digits of a card number (BIN). This is useful for identifying card details before processing a payment, enabling you to:- Determine card network (visa, mastercard, rupay, amex, etc.)
- Identify card type (credit or debit)
- Get bank information
- Check if the card is domestic or international
Use Cases
- Pre-validation: Validate card details before submitting payment
- UI Enhancement: Show card network logo or bank name as user types
- Payment Flow Optimization: Determine payment method eligibility based on card type
- Fraud Prevention: Identify potentially suspicious cards before processing
Request
Endpoint
Headers
| Header | Required | Description |
|---|---|---|
X-Client-ID | Yes | Your Client ID |
X-Client-Secret | Yes | Your Client Secret |
X-Merchant-ID | Conditionally | Required for PSP merchants managing multiple merchant accounts |
X-API-Version | No | API version (defaults to latest) |
Content-Type | Yes | Must be application/json |
Request Body
| Parameter | Type | Required | Description | Constraints |
|---|---|---|---|---|
bin | string | Yes | BIN code (first 8 digits of card number) | Pattern: ^[0-9]{6,9}$ |
Example Request
Response
Success Response (200 OK)
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the request was successful |
message | string | Response message |
data | object | BIN lookup data |
data.bank | string | Bank name that issued the card |
data.network | string | Card network (visa, mastercard, rupay, amex, diners, maestro, sbi_maestro) |
data.card_type | string | Card type (credit_card or debit_card) |
data.is_domestic | boolean | Whether the card is domestic (issued in India) or international |
Error Responses
400 Bad Request - Invalid BIN
401 Unauthorized
500 Internal Server Error
Examples
JavaScript/TypeScript
Python
Notes
- BIN code must be 8 digits
- The endpoint returns
nullvalues for fields that cannot be determined - Card network values (visa, mastercard, etc.)
- Bank names are returned
is_domesticistruefor cards issued in India,falsefor international cards
Authorizations
Client Application ID - Your unique application identifier used to authenticate API requests. You can find your Client ID in the Developer Settings section of the merchant dashboard.
Client Secret Key - Your secret key used alongside the Client ID for secure authentication. Keep this confidential and never expose it in client-side code. Available in the Developer Settings section of the merchant dashboard.
Merchant Identifier - The unique ID for the merchant account. This is required for PSP (Payment Service Provider) merchants who manage multiple merchant accounts. You can find merchant IDs in the Merchant Management section of the dashboard.
API Version - Specifies which version of the API to use (e.g., '1.X.X', '2.X.X', or '3.X.X'). This header allows you to control which API version your integration uses. Default version information is available in the Developer Settings.
Body
BIN lookup request
BIN code (first 6-8 digits of card number)
^[0-9]{6,9}$"41111111"