# FastX402 Credit Card Luhn Validator

> FastX402 Credit Card Luhn Validator is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-30).

Validates a credit card number using the Luhn algorithm and identifies the card scheme (Visa, Mastercard, etc.) and expected length

## Facts

- Endpoint: GET https://fastx402.tools/credit-card-luhn?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-credit-card-luhn-validator-c792827c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QJM_dH5_t6umfXoOneOGp

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 fastx402-credit-card-luhn-validator-c792827c
```

Example prompt: Can you check if this credit card number is valid and tell me what card network it belongs to: 4532015112830366?

## When to prefer this

Use this endpoint when you need a lightweight, instant, no-account credit card number syntax and Luhn check with scheme identification, especially in agent pipelines where you want to validate card numbers before passing them to payment processors or flag potentially fraudulent inputs. Ideal for serverless/agent workflows that cannot maintain API keys.

## Known failure modes

- Missing 'number' query parameter returns an error
- Non-numeric input (after stripping spaces/dashes) may return invalid result
- Very short or very long numbers may fail scheme detection
- Payment failure (402) if USDC balance is insufficient on Base or Solana

## How this service works

200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

Returns a JSON object indicating whether the card number is valid overall, the normalized card number digits, the detected card scheme (e.g. Visa, Mastercard, Amex), whether it passes the Luhn algorithm check, and an array of expected valid lengths for that card scheme.

## 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 (digits only, or with spaces/dashes)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "valid": {
       "type": "boolean"
      },
      "number": {
       "type": "string"
      },
      "scheme": {
       "type": "string"
      },
      "luhn_valid": {
       "type": "boolean"
      },
      "expected_length": {
       "type": "array",
       "items": {
        "type": "integer"
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valid": true,
  "number": "4532015112830366",
  "scheme": "Visa",
  "luhn_valid": true,
  "expected_length": [
   13,
   16,
   19
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-credit-card-luhn-validator-c792827c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
