Try the BIN Lookup API

API Online

Try: 424242 (VISA), 555555 (Mastercard), 378282 (Amex)

500K+ BINs | 200+ Countries | ~50ms Time

Coverage and response times depend on the underlying data source and server configuration.

Fast & Reliable

BIN Lookup API

Validate and get detailed information about any credit card BIN (Bank Identification Number) in real-time via a simple REST API. Access is managed via API key validation (typically linked to a purchased plan).

High Availability*
Regularly Updated Data*
Easy Integration

*Availability depends on server hosting. Data update frequency depends on the underlying data source.

Reliable

API Performance*

Flexible

Plan Options

Scalable

Request Handling*

* Depends on server hosting and configuration.

API Documentation (For Direct Integration)

How developers with an API key can integrate and use the service directly.

Endpoint & Auth
Parameters
Headers
Responses
Error Codes

API Endpoint & Authentication

The API is accessed via a standard REST endpoint. Authentication is required using an API key provided as a query parameter.

Endpoint Structure

Allowed Methods: GET

https://orunk.xyz/wp-json/bin/v1/lookup/{bin}

Replace https://orunk.xyz/wp-json with the actual base URL for your WordPress REST API (e.g., https://yoursite.com/wp-json).
Replace {bin} with the 6 to 8 digit Bank Identification Number you want to look up (this is part of the URL path).

Authentication

Authentication requires an active API key, typically obtained after purchasing a plan. Include the key as a query string parameter named api_key:

?api_key=YOUR_API_KEY_HERE

Replace YOUR_API_KEY_HERE with your personal API key found in your account or purchase confirmation details.

Example Request (cURL)

# Basic GET request for BIN 424242 using your key
curl -X GET \
"https://orunk.xyz/wp-json/bin/v1/lookup/424242?api_key=YOUR_API_KEY_HERE"

Remember to replace placeholders with your actual API base URL and API key.

Note: The interactive "Try It" feature on this page uses a separate, rate-limited proxy endpoint (`.../orunk/v1/bin-lookup-proxy/...`) for demonstration purposes and does not require you to enter your API key there. The endpoint described above (`.../bin/v1/lookup/...`) is for direct integration into your applications using your purchased key.

Request Parameters

The direct API uses URL path and query string parameters:

Parameter Location Type Required Description
{bin}URL Pathstring (digits)YesThe first 6 to 8 digits of a payment card number (BIN/IIN).
api_keyQuery StringstringYesYour personal API key, obtained upon plan activation/purchase.

HTTP Headers

While not strictly required for basic GET requests, you can include standard HTTP headers:

HeaderRequiredDescription
AcceptNoSpecify desired response format (e.g., application/json or application/xml). If omitted, the API default (set in admin settings, usually JSON) is used.
Content-TypeIf sending data (POST/PUT)Specifies the format of data being sent in the request body (e.g., application/json). Not applicable for standard GET requests.

Example Request with Header (cURL)

# Request JSON response explicitly
curl -X GET \
-H "Accept: application/json" \
"https://orunk.xyz/wp-json/bin/v1/lookup/555555?api_key=YOUR_API_KEY_HERE"

Success Response (200 OK)

Successful lookups return an HTTP 200 OK status code. The response body format is determined by the API settings (default: JSON) or the Accept header and includes the following fields:

binstring

The actual BIN number matched in the database (may be shorter than the queried BIN if a prefix matched) or the queried BIN if not found.

bank_namestring

Name of the issuing bank or financial institution. Returns 'Unknown' if not found.

card_brandstring

Card brand (e.g., VISA, MASTERCARD, AMEX). Returns 'Unknown' if not found.

card_typestring

Card type (e.g., DEBIT, CREDIT). Returns 'Unknown' if not found.

card_levelstring

Card level or product tier (e.g., CLASSIC, PLATINUM, BUSINESS). Returns 'Unknown' if not found.

country_isostring

ISO 3166-1 alpha-2 country code of the issuing bank (e.g., 'US', 'GB'). Returns 'Unknown' if not found.

country_namestring

Full country name of the issuing bank (e.g., 'United States', 'United Kingdom'). Returns 'Unknown' if not found.

sourcestring

Indicates the source of the data: 'database' (live lookup), 'cache' (retrieved from temporary cache for performance), or 'not_found'. (Note: This field is excluded from the proxy endpoint used in the "Try It" demo).

Example JSON Response (Success)

{
  "bin": "457173",
  "bank_name": "JPMORGAN CHASE BANK, N.A.",
  "card_brand": "VISA",
  "card_type": "DEBIT",
  "card_level": "CLASSIC",
  "country_iso": "US",
  "country_name": "United States",
  "source": "database"
}

Example XML Response (Success)

<bin_lookup>
  <bin>457173bin>
  <bank_name>JPMORGAN CHASE BANK, N.A.bank_name>
  <card_brand>VISAcard_brand>
  <card_type>DEBITcard_type>
  <card_level>CLASSICcard_level>
  <country_iso>UScountry_iso>
  <country_name>United Statescountry_name>
  <source>databasesource>
bin_lookup>

Error Responses

If an error occurs, the API returns an appropriate HTTP status code (e.g., 4xx, 5xx) and a response body (usually JSON, see WP REST API Error Format for structure) containing a specific error code and descriptive message.

HTTP StatusCodeDescription
400 Bad Requestrest_invalid_paramInvalid BIN format (not 6-8 digits). Check the {bin} path parameter.
401 Unauthorizedno_api_keyMissing api_key query parameter. Authentication is required.
403 Forbiddeninvalid_api_keyAPI key not found, invalid, or does not match an active purchase record. (Message configurable in settings)
403 Forbiddenkey_not_activeAPI key is valid but associated subscription/purchase is not 'active' (e.g., expired, cancelled). (Message configurable)
403 Forbiddenfeature_mismatchAPI key is not valid for the 'bin_api' feature.
403 Forbiddenkey_expiredThe API key's subscription has passed its expiry date.
403 Forbiddenip_not_allowedRequest IP address is not in the allowed list configured in the plugin settings.
404 Not Foundrest_no_routeIncorrect API endpoint URL or API is disabled in settings.
429 Too Many Requestsrate_limit_exceeded_day / rate_limit_exceeded_monthDaily or monthly request limit associated with the API key's plan has been exceeded. (Message configurable)
500 Server Errordb_table_missingRequired BIN data table (e.g., wp_bsp_bins) not found in the database. Check plugin setup.
500 Server Errorxml_format_error / internal_data_errorInternal error during response formatting or data handling. Check server logs.
503 Service Unavailableplugin_dependency_missingRequired dependency (like Orunk Users for key validation) is not active or missing.

Example JSON Error Response (403 Forbidden)

{
  "code": "key_not_active",
  "message": "Access denied.", // Example message from settings
  "data": {
    "status": 403
  }
}

Powerful Use Cases

How businesses can use the BIN Lookup API

E-commerce

Automatically detect card types (`card_brand`, `card_type`) to show appropriate payment icons and optimize checkout flows.

  • Show correct card logos during checkout
  • Understand customer payment preferences
  • Tailor payment options based on card type

Fraud Prevention

Detect mismatches between card country (`country_name`, `country_iso`) and user location to flag potential fraud.

  • Identify high-risk geographic patterns
  • Verify card origin country
  • Add data points to risk scoring models

Travel & Hospitality

Verify cards match the traveler's expected country to prevent booking issues and reduce declines.

  • Ensure cards are appropriate for the region
  • Check card type (credit/debit) for holds
  • Improve authorization success rates

API Plans

Choose the plan that fits your API usage needs. Access requires an API key obtained via purchase.

Free

Free
 
  • 5 Requests / Day
  • 3,000 Requests / Month
  • Limited data fields
  •  

No credit card required.

Most Popular

Pro

$9.00
per month
  • Unlimited Daily Requests (Fair Use*)
  • 50,000 Requests / Month
  • Full data fields included
  •  

Business

$29.00
per month
  • Unlimited Daily Requests (Fair Use*)
  • 200,000 Requests / Month
  • Includes all Pro features
  • Priority Support (via Plan)

Plan limits and features are enforced by the API key validation system. Ensure you have the correct key for your chosen plan. *Fair use policies may apply to unlimited usage.

Frequently Asked Questions

Get answers to common questions about the BIN Lookup API