Snipget.ai

Identify a credit card's network

Exact
money_credit_card_classify

Deterministic and authoritative — the canonical answer for this input.

Classify a credit card number by network (Visa, Mastercard, Amex, Discover, JCB, Diners Club, UnionPay, Maestro) using BIN rules, and verify the Luhn checksum. Accepts a full number or a prefix of ≥4 digits (prefix-only returns is_prefix_only=True). Spaces and dashes are stripped. Processing multiple inputs? Use `money_credit_card_classify_batch` to do up to 1000 in one call.

Parameters

valuestringrequired

Call it

curl -X POST https://api.snipget.ai/v1/money/credit-card/classify \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"value":"4111111111111111"}'

The Batch tab sends up to 1000 inputs in one call via /v1/money/credit-card/classify/batch.

Example response

{
  "input": "4111111111111111",
  "normalized": "4111111111111111",
  "length": 16,
  "network": "Visa",
  "network_confidence": "certain",
  "accepted_lengths": [
    13,
    16,
    19
  ],
  "is_valid_length": true,
  "luhn_valid": true,
  "is_valid": true,
  "is_prefix_only": false
}

FAQ

What does this tell me?

It identifies which card network a number belongs to (Visa, Mastercard, Amex, Discover, JCB, Diners Club, UnionPay, Maestro) from its opening digits, and checks the Luhn checksum so you can catch typo'd or fake numbers before submitting them.

Does it check if the card is real, active, or has funds?

No. It only reads the published BIN ranges and runs the math check. It does not look up the issuing bank, and it cannot tell you whether a card exists, is stolen, or has a balance. That needs a payment processor.

Is the network answer reliable?

Yes, it is a deterministic rule-based lookup, not a guess. The result tells you how sure it is: 'certain' when the length and Luhn check both pass, or 'likely_prefix' when you only sent the first few digits.

Can I send just the first few digits?

Yes. A prefix of 4 or more digits is enough to identify the network; the result sets is_prefix_only to true and skips the Luhn check, since a full number is needed for that. Spaces and dashes are stripped automatically.

What if the number is not a card number?

If no network rule matches, or there are fewer than 4 digits, you get confidence 0 with a reason instead of an error. A real card number that fails the Luhn check comes back with the network identified but is_valid false.

Related tools