# Credit Card Validator (Luhn Check & Brand Detector)

> Credit Card Validator (Luhn Check & Brand Detector) is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.0022/call, status unknown (last checked 2026-09-14).

Validates a credit card number using the Luhn algorithm and identifies the card brand (Visa, Mastercard, Amex, Discover, etc.), returning validity, card type, and masked PAN — no payment processing involved.

## Facts

- Endpoint: GET https://api.x402node.dev/validate/creditcard
- Price: $0.0022/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-6ac39ec5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__T_ejLRbcOLxOJlBBtRcK

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 api-x402node-dev-6ac39ec5
```

Example prompt: Can you check if this credit card number is valid and tell me what type of card it is: 4532015112830366? I want to know if it passes the Luhn check and whether it's a Visa, Mastercard, Amex, or something else.

## When to prefer this

Use this endpoint when you need to validate a credit card number client-side or server-side before processing, want to identify the card network without charging the card, or need a masked version of the PAN for display. Prefer this over full payment APIs when no transaction is needed — pure structural and algorithmic validation only.

## Known failure modes

- Non-numeric or malformed input returns invalid result
- Empty or missing card number in POST body causes error
- Extremely short or long strings may not match any known brand
- Unknown card ranges return valid Luhn but unrecognized brand

## How this service works

Credit card validator, Luhn algorithm check, card number verification, card type detector, Visa Mastercard Amex Discover Diners JCB UnionPay brand identifier, PAN validation. Validate credit card number via Luhn algorithm and identify card brand. Returns validity, card type, masked number. No payment processing, validation only. Accepts payment on Base or Solana — either network works.

## Output

Returns a JSON object with: `valid` (boolean overall validity), `luhn` (boolean Luhn algorithm result), `brand` (card network string e.g. 'visa', 'mastercard', 'amex', 'discover'), `card_masked` (masked PAN showing only partial digits), and `length` (integer card number length).

## 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",
     "properties": {
      "card": {
       "type": "string",
       "description": "Card (optional)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-6ac39ec5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
