You need to validate a card quickly, without building your own BIN database or maintaining vendor scrapers. By the end of this guide, you’ll be calling a single endpoint to check a card’s BIN and reading back key attributes like brand, type, level, issuer, and country—ready to plug into your checkout, risk rules, or finance workflows.
What you can do with a simple BIN check
The Card Checker API returns validation and metadata based on a card’s BIN (Bank Identification Number). With one request, you can learn whether the BIN is valid and get fields like card_brand (e.g., MASTERCARD), card_type (e.g., CREDIT), card_level (e.g., GOLD), issuer_name_bank, and iso_country_code. Finance and payments teams use this to:
- Pre-validate cards before attempting authorization to reduce avoidable gateway calls.
- Enforce routing or risk policies by brand, type, level, issuer, or country.
- Enhance transaction logs with issuer and country details for analytics and reconciliation.
- Build customer support tooling that identifies card attributes without storing full PANs.
The API is listed on Zyla API Hub, an API marketplace with more than 10,000 public APIs. You get one account, one API key, and a subscription + quota model across APIs you choose—no pay-per-call surprises and no separate auth per vendor.
Getting started on Zyla API Hub
Open the Card Checker API page and subscribe to get your key. The listing offers a 7-day trial so you can test in your environment first. Once subscribed, you’ll have an API key you can use across Zyla endpoints via an Authorization header.
- Start 7-day trial on Card Checker API
- Visit the hub homepage to explore other Finance & Payments APIs: zylalabs.com
Authentication across Zyla is straightforward: add Authorization: Bearer YOUR_API_KEY to your requests. Billing is subscription + quota, not pay-per-call. Check the API page for current access options and pricing.
The endpoint you’ll call
The Card Checker API exposes one simple endpoint to validate a BIN and return card metadata.
- Method: GET
- URL: https://zylalabs.com/api/2333/card-checker-api/2243/check-card
- Required query parameter: bin (number)
Description: enter a 6-digit BIN number in the bin parameter to validate and retrieve card details.
cURL example (copy-paste ready)
curl -s -X GET "https://zylalabs.com/api/2333/card-checker-api/2243/check-card?bin=444444" \
-H "Authorization: Bearer YOUR_API_KEY"
Official sample response
{
"status": 200,
"success": true,
"isValid": true,
"message": "The BIN number is valid.",
"data": {
"bin_iin": "557829",
"card_brand": "MASTERCARD",
"card_type": "CREDIT",
"card_level": "GOLD",
"issuer_name_bank": "AKBANK T.A.S.",
"issuer_bank_website": "------",
"issuer_bank_phone": "4442525",
"iso_country_name": "TURKEY",
"iso_country_code": "TR"
}
}
What to read from this payload:
- isValid: boolean that indicates whether the supplied BIN is recognized as valid.
- message: human-readable validation status.
- data.bin_iin: the BIN/IIN associated with the result.
- data.card_brand, data.card_type, data.card_level: identifiers useful for routing and UI labels.
- data.issuer_name_bank, issuer_bank_phone, issuer_bank_website: issuer details you can store for reference.
- data.iso_country_name, data.iso_country_code: country info for compliance checks and fraud rules.
Python example: check a BIN and branch on validation
The snippet below demonstrates a simple GET call, parses the response, and shows where to plug your policy logic (e.g., decline prepaid credit cards, allow only certain countries, or prompt for additional verification).
import os
import requests
API_KEY = os.getenv("ZYLA_API_KEY", "YOUR_API_KEY")
BASE_URL = "https://zylalabs.com/api/2333/card-checker-api/2243/check-card"
def check_bin(bin_number: str) -> dict:
url = f"{BASE_URL}?bin={bin_number}"
headers = {"Authorization": f"Bearer {API_KEY}"}
resp = requests.get(url, headers=headers, timeout=10)
resp.raise_for_status()
return resp.json()
if __name__ == "__main__":
result = check_bin("444444")
# Core fields you will commonly use
is_valid = result.get("isValid")
message = result.get("message")
data = result.get("data", {}) or {}
print("BIN valid:", is_valid)
print("Message:", message)
if is_valid:
brand = data.get("card_brand")
card_type = data.get("card_type")
level = data.get("card_level")
issuer = data.get("issuer_name_bank")
country_code = data.get("iso_country_code")
print("Brand:", brand)
print("Type:", card_type)
print("Level:", level)
print("Issuer:", issuer)
print("Country:", country_code)
# Example policy hooks:
# - If you need to restrict by country:
# if country_code not in {"US", "CA", "GB"}:
# print("Route to manual review")
# - If you only accept certain brands/types:
# if brand != "MASTERCARD" or card_type != "CREDIT":
# print("Show alternative payment method")
else:
# Fallback when BIN is not valid (e.g., ask user to re-enter)
print("Invalid BIN; prompt for correction.")
Implementation notes that save time
- Only the bin query parameter is required. Use the first 6 digits of the card number; do not transmit full PANs to reduce PCI exposure in your systems.
- Performance: BIN lookups are lightweight, ideal to trigger on blur events in your checkout form or server-side before authorization. Consider short client or edge caching keyed by BIN to reduce repeated requests during a session.
- Fallback UX: If isValid is false, re-prompt the user for the first 6 digits. Keep error text neutral: “Please check the first 6 digits of your card.”
- Normalization: Store brand/type/level values as given by the API (e.g., MASTERCARD, CREDIT) and map them to any internal enums at your boundary layer.
- Auditing: Log the isValid flag, bin_iin, brand, type, level, issuer, and iso_country_code to your payments audit logs. Avoid storing the full card number.
Real-world finance and payments use cases
- Checkout form optimization: After a user types the first 6 digits, detect card_brand and show the appropriate brand icon. If the brand or type is unsupported, prompt for another card before the submit event.
- Routing rules: Send MASTERCARD CREDIT GOLD cards to a gateway with the best interchange rate or acceptance profile for that brand/type.
- Compliance filters: Disallow or flag BINs from embargoed or unsupported countries by checking iso_country_code.
- Fraud heuristics: Combine issuer_name_bank and iso_country_code with IP geolocation, billing country, and device signals. Mismatches can raise risk scores.
- Customer support: When a payment fails, support agents can quickly identify issuer and brand from the BIN to guide users to call their bank if needed.
Call the same API from AI agents via MCP
If you automate tasks using MCP-compatible clients (e.g., code assistants that can call tools), you can invoke Zyla APIs through the MCP endpoint. Point your client at:
https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY
From there, instruct the agent to call the Card Checker API endpoint using the GET method and the bin query parameter. It will pass your Authorization header automatically if your MCP client is configured with the API key. For general information on MCP usage, see the MCP page.
How to integrate in your payments flow
1) Client-side pre-check (optional)
When the user inputs the first 6 digits, call your backend with the BIN only. Your backend then calls the Card Checker API and returns a minimal payload (brand, type, level, country). This avoids exposing your Zyla API key to the browser.
2) Server-side validation before auth
Right before creating a payment intent or authorization, call the API with the same BIN to confirm it’s valid and to capture the issuer and country for your logs and rules. If isValid is false, short-circuit the attempt and ask for a different card.
3) Logging and analytics
Store key fields alongside your transaction attempt so you can segment declines, acceptance, and chargebacks by brand/type/issuer/country. This helps tune routing and fraud models over time.
Error handling patterns
- HTTP layer: Treat non-2xx as transient or terminal based on your retry policy. Network timeouts can be retried quickly; persistent 4xx/5xx should be surfaced to logs with correlation IDs.
- Response semantics: Use the isValid boolean and message for user-friendly flows. Avoid parsing issuer_bank_website for routing unless you have a specific reason—issuer_name_bank and country are more stable drivers.
- Resilience: Implement short exponential backoff with jitter on transient errors. Cache positive BIN lookups briefly to avoid sudden blips impacting checkout.
Security and privacy notes
- Never send full card numbers to your BIN-checking endpoint. Extract the first 6 digits and discard the rest for this check.
- Keep your Zyla API key server-side; do not embed it in web or mobile clients. Use your backend as a thin proxy if you want instant client UX.
- Log only what you need. BIN, brand, type, level, issuer, and country are typically sufficient for analysis and rules.
Working inside engineering constraints
- Latency budget: The BIN check is fast and can be performed during form entry or just before authorization. If you’re extremely latency-sensitive, add a client or edge cache keyed by BIN for a short TTL.
- Idempotency: The request is a read; consider it idempotent. You can safely retry on transient failures.
- Internationalization: iso_country_code is ISO alpha-2 (e.g., TR). Map it to your localization layer for display names or country-specific business rules.
Reference: Endpoint recap
- GET https://zylalabs.com/api/2333/card-checker-api/2243/check-card
- Query parameter: bin (number, required). Example: 444444
- Auth header: Authorization: Bearer YOUR_API_KEY
- Response fields you’ll typically use: isValid, message, data.bin_iin, data.card_brand, data.card_type, data.card_level, data.issuer_name_bank, data.iso_country_code
Quality-of-life tips for production
- Feature flag the integration so you can roll out per-market or per-segment.
- Add observability: track request count, 2xx/4xx/5xx rates, and p95 latency for the BIN check.
- Create invariants in tests: mock the JSON above to verify your routing logic for MASTERCARD CREDIT GOLD in TR.
- Document your internal mapping from API-provided strings (e.g., “MASTERCARD”) to your enums to prevent silent mismatches.
FAQ
What’s the minimum I need to call the API?
A valid Zyla API key and the first 6 digits of the card (bin parameter). Add the Authorization: Bearer YOUR_API_KEY header.
Can I use this at checkout without storing full card numbers?
Yes. Send only the first 6 digits (BIN). Do not send or store the full PAN for this validation step.
Which fields should I persist?
Typically: isValid, bin_iin, card_brand, card_type, card_level, issuer_name_bank, and iso_country_code. These are most useful for routing, fraud, and reporting.
Is there a free plan?
No free plan. The listing offers a 7-day trial so you can evaluate before committing. Check the API page for current access options and pricing.
Can I call it from an AI coding agent?
Yes. Configure your MCP-compatible client to use the Zyla MCP endpoint, then have it issue a GET call to the Card Checker API with the bin parameter. See the MCP page linked above for details.
Ready to implement card checks in minutes? Open the listing and start your trial: Start 7-day trial on Card Checker API. Explore more finance integrations at zylalabs.com and ship your validation flow this week.