Try the BIN Lookup API
API OnlineTry: 424242 (VISA), 555555 (Mastercard), 378282 (Amex)
API Response (from Proxy)
Looking up BIN...
Coverage and response times depend on the underlying data source and server configuration.
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).
*Availability depends on server hosting. Data update frequency depends on the underlying data source.
API Performance*
Plan Options
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.
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 Path | string (digits) | Yes | The first 6 to 8 digits of a payment card number (BIN/IIN). |
api_key | Query String | string | Yes | Your personal API key, obtained upon plan activation/purchase. |
HTTP Headers
While not strictly required for basic GET requests, you can include standard HTTP headers:
Header | Required | Description |
---|---|---|
Accept | No | Specify desired response format (e.g., application/json or application/xml ). If omitted, the API default (set in admin settings, usually JSON) is used. |
Content-Type | If 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:
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.
Name of the issuing bank or financial institution. Returns 'Unknown' if not found.
Card brand (e.g., VISA, MASTERCARD, AMEX). Returns 'Unknown' if not found.
Card type (e.g., DEBIT, CREDIT). Returns 'Unknown' if not found.
Card level or product tier (e.g., CLASSIC, PLATINUM, BUSINESS). Returns 'Unknown' if not found.
ISO 3166-1 alpha-2 country code of the issuing bank (e.g., 'US', 'GB'). Returns 'Unknown' if not found.
Full country name of the issuing bank (e.g., 'United States', 'United Kingdom'). Returns 'Unknown' if not found.
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 Status | Code | Description |
---|---|---|
400 Bad Request | rest_invalid_param | Invalid BIN format (not 6-8 digits). Check the {bin} path parameter. |
401 Unauthorized | no_api_key | Missing api_key query parameter. Authentication is required. |
403 Forbidden | invalid_api_key | API key not found, invalid, or does not match an active purchase record. (Message configurable in settings) |
403 Forbidden | key_not_active | API key is valid but associated subscription/purchase is not 'active' (e.g., expired, cancelled). (Message configurable) |
403 Forbidden | feature_mismatch | API key is not valid for the 'bin_api' feature. |
403 Forbidden | key_expired | The API key's subscription has passed its expiry date. |
403 Forbidden | ip_not_allowed | Request IP address is not in the allowed list configured in the plugin settings. |
404 Not Found | rest_no_route | Incorrect API endpoint URL or API is disabled in settings. |
429 Too Many Requests | rate_limit_exceeded_day / rate_limit_exceeded_month | Daily or monthly request limit associated with the API key's plan has been exceeded. (Message configurable) |
500 Server Error | db_table_missing | Required BIN data table (e.g., wp_bsp_bins) not found in the database. Check plugin setup. |
500 Server Error | xml_format_error / internal_data_error | Internal error during response formatting or data handling. Check server logs. |
503 Service Unavailable | plugin_dependency_missing | Required 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
- 5 Requests / Day
- 3,000 Requests / Month
- Limited data fields
No credit card required.
Pro
- Unlimited Daily Requests (Fair Use*)
- 50,000 Requests / Month
- Full data fields included
Business
- 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