Card Validator API

GET

Catch invalid cards and identify card brands at checkout.

Card Validator checks whether a card number is valid, identifies the card brand, and flags risk. It runs the Luhn checksum, detects the scheme (Visa, Mastercard, Amex and more), returns the PCI-safe BIN and last 4 digits, flags known processor test cards, and returns a composite risk score.

Try it — live request, no key required

Request
GETapi.apiverve.com/v1/cardvalidator?number=4900264223817524
Query parameters
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "card": {
      "niceType": "Visa",
      "type": "visa",
      "patterns": [
        4
      ],
      "gaps": [
        4,
        8,
        12
      ],
      "lengths": [
        16,
        18,
        19
      ],
      "code": {
        "name": "CVV",
        "size": 3
      },
      "matchStrength": 1
    },
    "brand": "Visa",
    "cardNumber": "4900264223817524",
    "bin": "490026",
    "last4": "7524",
    "isValid": true,
    "isPotentiallyValid": true,
    "isTestCard": false,
    "riskScore": 0,
    "riskLevel": "low"
  }
}

About the Card Validator API

Card Validator works by validating the card number against the Luhn algorithm and the brand's prefix and length rules. It identifies the card scheme, extracts the BIN and last four digits, checks the number against a list of known published test cards, and returns a risk score summarizing how safe the number is to trust.

What people use it for

Dynamic Checkout Formatting
When shoppers type card numbers during checkout, frontend forms inspect partial validity to display matching brand icons and security code hints immediately.
Test Card Interception
Flag published processor test numbers in production checkouts before sending them to gateways, preventing failed authorization attempts or merchant penalty fees.
Payment Method Tokenization
Subscription billing services verify Luhn checksums and separate the bank identification number and last four digits before storing masked records in customer vaults.
Account Signup Screening
To block automated trial abuse, fraud prevention systems score incoming payment details and reject generated numbers that fail mathematical card validity checks.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use Card Validator

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Card Validator API.

Read the docs →
Which card brands and schemes can it detect?
It identifies major card schemes including Visa, Mastercard, and American Express, checking numbers against each brand's specific prefix and length rules alongside the standard Luhn algorithm checksum.
Are the risk score and test card detection included on the Free plan?
No. Test card detection, the composite risk score, and the risk level are premium fields reserved for paid plans. Free plan responses return core validation such as validity, brand, BIN, and the last four digits, while any paid plan unlocks test card detection, formatting rules, and risk scoring.
What happens if a user submits an incomplete card number?
The API evaluates partial input and populates the potential validity field so you can see if the prefix could become valid as the customer types. If fewer than 6 digits are provided, the BIN returns null, and if fewer than 4 digits are entered, the last four digits field returns null.
How many card validations does the Free plan cover?
The Free plan includes 100 card validations per month across 200 credits, since each validation consumes 2 credits. On the Starter plan, 200,000 credits cover up to 100,000 card checks each month, which works out to about $0.30 per 1,000 calls.
Can I use the validation results inside my commercial checkout flow?
Yes, provided you subscribe to a paid plan. Commercial use requires Starter or higher. You can use the returned card scheme details and risk scores directly within your checkout or billing flows, but you cannot resell or redistribute the raw API data.

Ready to build with Card Validator? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs