# Credit Card Number Validator (Luhn + Brand + IIN)

> Credit Card Number Validator (Luhn + Brand + IIN) is a paid API for AI agents from bank-validators.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-02).

Validates a test credit card number via Luhn checksum, identifies the card brand (Visa, Mastercard, Amex, etc.) from IIN ranges, and checks length validity — returning masked output only.

## Facts

- Endpoint: GET https://bank-validators.x402tookit.com/card-check?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/credit-card-number-validator-luhn-brand-iin-a6258364
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0g0IwKMtDes42QedhHSlW

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability credit-card-number-validator-luhn-brand-iin-a6258364
```

Example prompt: Can you validate the test card number 4242424242424242 — check if it passes the Luhn checksum, what brand it is, and whether the length is right for that card type?

## When to prefer this

Choose this endpoint when you need to validate the structural integrity of a credit/debit card number during testing or development — specifically when you want Luhn checksum, brand identification from IIN ranges, and length validation in a single call. Prefer it over generic Luhn libraries when brand-level IIN classification and masked output are required. Not suitable for real card numbers or live card authentication.

## Known failure modes

- Missing 'number' query parameter returns an error
- Real card numbers rejected or flagged — endpoint is for test numbers only
- Unknown IIN prefix returns null brand and null length data
- Non-numeric input or malformed string may return validation failure
- Upstream IIN registry degraded returns degraded:true with partial results

## How this service works

Luhn check plus card brand and length from IIN ranges (Visa, Mastercard, Amex...). Test numbers only; output is masked.

## Output

Returns a JSON object with: luhnValid (boolean), brand name (e.g. 'Visa'), typicalLengths array for the brand, lengthMatchesBrand (boolean), masked card string, verdict summary, whether it is a published test number, the IIN source, a disclaimer, and any degraded/not-checked flags.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "number"
     ],
     "properties": {
      "number": {
       "type": "string",
       "description": "Card number, TEST numbers only (e.g. 4242 4242 4242 4242); never a real card"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "brand": {
       "type": [
        "null",
        "string"
       ]
      },
      "digits": {
       "type": [
        "null",
        "number"
       ]
      },
      "masked": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ]
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "luhnValid": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "typicalLengths": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "number"
       }
      },
      "lengthMatchesBrand": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "isPublishedTestNumber": {
       "type": [
        "boolean",
        "null"
       ]
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/credit-card-number-validator-luhn-brand-iin-a6258364/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from bank-validators.x402tookit.com](https://www.zero.xyz/host/bank-validators.x402tookit.com/llms.txt)
