# Luhn Checksum Validator

> Luhn Checksum Validator is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-20).

Validates whether a numeric string passes the Luhn (mod 10) checksum algorithm used by most payment card numbers.

## Facts

- Endpoint: GET https://x402.agentindex.world/validate/luhn?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/luhn-checksum-validator-6969c828
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CT6E78E0DdcboFsi-GNpn

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 luhn-checksum-validator-6969c828
```

Example prompt: Can you check if the card number 4532015112830366 passes the Luhn checksum — I want to know if it's a valid card number before I try to process a payment with it?

## When to prefer this

Use this endpoint when you need a fast, lightweight structural check on a payment card number before attempting a real transaction. It is ideal for pre-validation in checkout flows, fraud detection pipelines, or any scenario where you want to filter out obviously invalid card numbers without running a full authorization. It does not verify the card exists or has funds — it only checks the checksum.

## Known failure modes

- Non-numeric characters other than spaces or hyphens cause a validation error
- Number too short or a single digit fails the pattern constraint
- Empty string or missing number parameter returns an error
- Numbers with letters or special symbols are rejected by the input schema

## How this service works

Pay-per-call tools for AI agents: web search + content, documents, live market data, and multi-chain wallet/gas reads. Mainnet test from $0.000001 USDC on Base. Pay-per-call tools for AI agents in USDC on Base (x402/MPP): search, pdf, web-read, extract, summarize, fact-check, translate, jobs, discover. See GET /capabilities.

## Output

A pass/fail result indicating whether the provided numeric string satisfies the Luhn (mod 10) checksum condition, confirming the number is structurally consistent with a real payment card number.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "title": "LuhnInput",
     "required": [
      "number"
     ],
     "properties": {
      "number": {
       "type": "string",
       "title": "Number",
       "pattern": "^[0-9][0-9\\s-]*[0-9]$"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "title": "LuhnOutput",
     "required": [
      "valid"
     ],
     "properties": {
      "valid": {
       "type": "boolean",
       "title": "Valid"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valid": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/luhn-checksum-validator-6969c828/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
