API to Check BIN 371449

API to Check BIN 371449

You need to identify exactly what “371449” represents so you can route a card payment correctly, score risk, and set network-specific rules without touching full PANs. By the end of this guide, you’ll be able to validate BIN 371449 via a single POST request, interpret the response for your payment or onboarding flow, and handle edge cases like not-found lookups and caching.

Why BIN 371449 matters and what it tells you

A Bank Identification Number (BIN), also known as an Issuer Identification Number (IIN), is the leading portion of a card number used to determine the card network, issuing bank, and the country of issuance. You never need the full Primary Account Number (PAN) to make high-confidence routing or risk decisions—the BIN is enough for most operational checks.

Illustration: API to Check BIN 371449

For BIN 371449:

  • Network brand: AMERICAN EXPRESS
  • Card type: CREDIT
  • Level: PERSONAL
  • Issuer: AMERICAN EXPRESS US CONSUMER
  • Country: UNITED STATES (US)

These attributes let you apply network-specific business logic (for example, AmEx acceptance and pricing), country-based compliance checks, and issuer-level rules during checkout or customer onboarding. You can perform this lookup in your API tier without ever storing a full card number.

Endpoint overview: validating a BIN with one request

Use the BIN validation endpoint to look up 371449 and receive issuer, brand, country, and card characteristics. The method and endpoint are:

  • Method: POST
  • URL: https://www.bankdatastack.com/api/v1/bin/validate
  • Headers: X-API-Key, Content-Type: application/json
  • Body: JSON with the “bin” field

Below is a complete, copy-pasteable cURL request you can run in your terminal. Replace YOUR_API_KEY with your actual key.

curl -X POST "https://www.bankdatastack.com/api/v1/bin/validate" -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" -d '{"bin":"371449"}'

Interpreting the JSON response for BIN 371449

Here’s a realistic JSON response for this BIN. You’ll use these fields to enforce acceptance, set routing, and power risk checks in your system.

{
    "status": "success",
    "data": {
        "bin": "371449",
        "valid": true,
        "cardBrand": "AMERICAN EXPRESS",
        "cardType": "CREDIT",
        "cardLevel": "PERSONAL",
        "issuerName": "AMERICAN EXPRESS US CONSUMER",
        "countryName": "UNITED STATES",
        "countryCode": "US"
    }
}

How to use key fields:

  • valid: If true, you can trust the lookup and proceed with network-, issuer-, or country-specific logic. If false, treat the BIN as unknown and apply fallback handling (see “Handling not-found or invalid lookups”).
  • cardBrand: Route according to network capabilities. AMERICAN EXPRESS may follow distinct acceptance and interchange rules.
  • cardType: CREDIT vs DEBIT vs PREPAID can drive surcharge policies, 3-D Secure prompts, and risk scoring.
  • cardLevel: PERSONAL vs BUSINESS can influence KYC/underwriting requirements and transaction limits.
  • issuerName: For issuer-specific risk models or exemptions. Do not assume product tiers beyond what’s returned.
  • countryCode/countryName: Enforce cross-border logic, sanctions screening workflows, and region-based 3DS requirements.

Python example: validate BIN 371449 and apply routing logic

The sample below shows how to call the endpoint from Python, interpret the response, and derive simple flags for downstream systems. You can adapt this to your gateway middleware or risk engine.

import requests

API_URL = "https://www.bankdatastack.com/api/v1/bin/validate"
API_KEY = "YOUR_API_KEY"

def check_bin(bin_value: str) -> dict:
headers = {
"X-API-Key": API_KEY,
"Content-Type": "application/json"
}
payload = {"bin": bin_value}
resp = requests.post(API_URL, headers=headers, json=payload, timeout=10)
resp.raise_for_status()
return resp.json()

def route_and_flags(bin_data: dict) -> dict:
status = bin_data.get("status")
data = (bin_data or {}).get("data", {})
valid = data.get("valid", False)

result = {
"valid": valid,
"accept": False,
"network": None,
"country": None,
"is_credit": False,
"is_business": False,
"issuer": None
}

if status != "success" or not valid:
return result # Unknown BIN or lookup failed; apply your fallback policy

brand = data.get("cardBrand")
ctype = data.get("cardType")
level = data.get("cardLevel")

result["network"] = brand
result["country"] = data.get("countryCode")
result["issuer"] = data.get("issuerName")
result["is_credit"] = (ctype == "CREDIT")
result["is_business"] = (level == "BUSINESS")

# Example acceptance rule set:
# - Accept AMERICAN EXPRESS credit cards issued in the US
# - Defer other cases for additional checks
if brand == "AMERICAN EXPRESS" and result["is_credit"] and result["country"] == "US":
result["accept"] = True

return result

if __name__ == "__main__":
bin_value = "371449"
bin_response = check_bin(bin_value)
decision = route_and_flags(bin_response)
print("BIN Decision:", decision)

Production notes:

  • Always guard against missing fields; only use fields documented by the API.
  • Separate retrieval (BIN lookup) from policy (routing, risk). This makes testing and auditing easier.
  • Log the BIN and result, not the PAN. Avoid storing any sensitive card data beyond the minimum you need.

Where to insert BIN checks in your flows

During checkout authorization

When a user enters card details, extract just the first 6 digits for the BIN. Call the BIN endpoint before creating a payment intent. Use the response to:

  • Choose the acquiring route appropriate for AMERICAN EXPRESS vs other brands.
  • Trigger 3-D Secure for high-risk combinations (country, product type).
  • Apply business vs personal rules (limits, documentation, tax calculations).

During merchant or customer onboarding

If you collect a representative card for testing payouts or for card-on-file setups, validate its BIN to ensure it matches the target region and permitted networks. For example, if your program is US-only, reject non-US BINs automatically.

Support and chargeback handling

In back office tools, show the brand, type, issuer, and country from the BIN lookup to help ops and compliance staff understand the transaction context. You can prefetch and cache this so dashboards stay responsive.

Identifier formats and checksums: what you need to know

BINS vs PANs:

  • BIN (IIN): Historically 6 digits. Some issuers and networks now use 8-digit IINs. For this guide, 371449 is a 6-digit BIN. The endpoint accepts a “bin” field—use the 6 digits you capture at the start of the PAN unless your product has explicitly migrated to 8-digit logic.
  • PAN: Full card number (typically 15 digits for AMERICAN EXPRESS; 16 for many other brands). The PAN includes a Luhn checksum, but you should not store PANs unless your PCI scope and controls permit it.

Checksums and validation:

  • BINs by themselves do not carry a checksum; the Luhn algorithm applies to the full PAN. Your client-side form may use Luhn to quickly reject typos, but BIN lookups do not require the full number.
  • A “valid” BIN lookup means the BIN is recognized in the reference data. It does not confirm the card is active or has available credit; that requires authorization with the network.

Handling not-found or invalid lookups

If the response indicates valid is false or the BIN is unrecognized:

  • Treat the card as unknown and route using a generic fallback (e.g., your default acquirer or a secondary KYC flow).
  • Consider prompting the user to re-check the card brand selection only if your UI collects it explicitly; do not ask for additional PAN digits for BIN validation.
  • Log the event for monitoring so you can track BIN coverage and update your caching or sync strategies as needed.

BIN coverage evolves with issuer changes. Implement a periodic process to refresh your cache and re-check frequently encountered but previously unknown BINs.

Caching and performance strategies

BIN results are stable enough to cache aggressively:

  • Cache successful lookups for a reasonable TTL (for example, multiple days) to reduce latency and external calls during peak checkout traffic.
  • Cache negative lookups separately with a shorter TTL so you re-test unknown BINs on a regular cadence.
  • Use a key like BIN:{value} and store only the non-sensitive fields you need (brand, issuer, country, type, level, and a timestamp). Do not store PANs.

In distributed systems, keep cache invalidation simple. If you detect unexpected routing failures for a known BIN, clear that entry and fetch fresh data immediately.

Security, privacy, and PCI scope

  • Only send the BIN to the API. Avoid sending the full PAN to any service that does not explicitly require it.
  • Never store full PANs in your logs or analytics. The BIN alone (first 6 digits) is not considered full card data.
  • If you tokenize cards, perform the BIN lookup before tokenization, or ask your tokenization provider to surface the BIN-derived metadata without exposing the PAN.
  • Restrict API key access to your server-side components. Do not embed your key in client-side JavaScript.

Testing with the live endpoint

Use your own API key and the official examples to validate your integration. The cURL shown above is live for BIN 371449 and will return AMERICAN EXPRESS, CREDIT, PERSONAL, and US issuer attributes. For reference on other banking identifiers you may validate in adjacent flows (not for card routing), see the documentation.

  • SWIFT example: CHASUS33
  • IBAN example: GB82WEST12345698765432 (note: the USA does not use IBAN)
  • US routing number example: 021000021

Explore endpoints and payload details in the Documentation. When you’re ready to ship, get an API key and start a 7-day trial on the Starter plan ($49.99/month) without committing long-term.

Operational playbook: putting BIN 371449 into production

1) Capture and sanitize

  • From the card input, read only the first 6 digits for BIN detection. Do not log raw field values; mask them immediately in any debug output.
  • If your compliance requires it, run a Luhn check on the PAN client-side to reduce typos before you send anything to your server; the BIN lookup itself does not require Luhn.

2) Lookup and decision

  • POST the BIN to the validation endpoint.
  • If valid is true, store a compact record in your cache with cardBrand, cardType, cardLevel, issuerName, and countryCode.
  • Use cardBrand to choose the acquiring path and cardType/cardLevel to set surcharge and authentication policies.

3) Fallbacks

  • If the BIN is not recognized, apply a conservative routing default and log the event for review.
  • Optionally, re-try the lookup after a short backoff if your network conditions suggest a transient failure.

4) Monitoring

  • Emit counters for “bin.lookup.success” and “bin.lookup.miss”.
  • Track network distribution by brand and country to inform acquiring optimization over time.

How BIN fits with other bank identifiers

If you support bank transfers and cards in the same product, you’ll interact with several identifier types. The table below contrasts core attributes, including official examples you can use in test flows.

Identifier Purpose Typical Length / Format Checksum Country Usage Example
BIN (IIN) Identify card network, issuer, and card attributes 6 (some programs use 8) No (Luhn applies to full PAN, not the BIN) Global 371449
SWIFT/BIC Identify a bank for cross-border wires 8 or 11 alphanumeric No Global CHASUS33
IBAN Identify specific bank accounts in IBAN countries Country-specific length; includes country code Yes (mod-97) Europe and others; not used in the USA GB82WEST12345698765432
US Routing (ABA) Route domestic ACH/wire in the USA 9 digits Yes USA 021000021

Common pitfalls to avoid

  • Storing PANs: Store only the BIN and derived metadata you need. Avoid persisting PANs in logs or databases unless you are equipped for PCI DSS scope.
  • Assuming brand-specific lengths without checking: AMERICAN EXPRESS cards are typically 15 digits; do not apply 16-digit assumptions globally.
  • Overfitting to issuer names: issuerName is useful, but product tiers vary. Drive policies from cardBrand/cardType/cardLevel first.
  • Ignoring country rules: Use countryCode to activate cross-border 3DS policies and sanctioned-country workflows.

Deployment checklist

  • Server-side integration with X-API-Key header.
  • Timeouts set (e.g., 5–10 seconds) and retries with backoff for transient failures.
  • Caching for successful and negative lookups with sensible TTLs.
  • Structured logs with request IDs and masked identifiers.
  • Unit tests using fixed inputs (e.g., BIN 371449) to verify parsing of brand/type/level/country fields.

FAQ

What if my program uses 8-digit BINs?
Many issuers have transitioned to 8-digit IINs. If your product captures 8 digits, you can still pass the leading 6 for compatibility unless you specifically require 8-digit resolution. Coordinate the input policy with your acquirer and data provider.

Does a successful BIN lookup guarantee the card will authorize?
No. BIN data identifies the network, issuer, and attributes. Authorization (funds/credit availability, fraud checks) occurs when you submit the transaction to the network via your gateway or acquirer.

How should I handle prepaid or debit cards?
Use cardType and cardLevel from the response. If PREPAID or DEBIT is returned, you can apply different fraud controls or surcharge rules. If a field is absent, fall back to neutral policies.

Can I use this data in the browser?
Do not expose your API key client-side. Call the endpoint from your server or an edge worker you control, and return only the minimal metadata needed for the UI.

What does “valid: false” mean?
It indicates the BIN is not recognized in the reference dataset returned by the API. Apply a generic route, consider requesting another payment method, and re-check later in case coverage improves.

Ready to ship BIN checks for 371449 and beyond? Start your 7-day trial on the Starter plan ($49.99/month) and get an API key here: Register. For full endpoint details and more identifier types, see the Documentation.

Ready to get started?

Get your API key and start validating bank data in minutes.

Get API Key