# Delx Luhn Valid

> Delx Luhn Valid is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-16).

Validates a digit string (e.g. a credit card number) using the Luhn checksum algorithm, returning whether it passes and its digit count.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/luhn-valid
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-luhn-valid-42acd5b7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_H_f7cVkaU-c2P83YYzW0f

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 delx-luhn-valid-42acd5b7 -d '<json body>'
```

Example prompt: Before I send this to the payment processor, run a Luhn check on the card number 4532015112830366 and tell me if it's valid.

## When to prefer this

Use this endpoint when you need a fast, cheap, stateless pre-flight check to reject obviously invalid card-shaped digit strings before submitting them to a payment processor or identity system. It is not a substitute for real card authorization or issuer validation — it only confirms the Luhn checksum. Ideal for agents that want to avoid wasting expensive payment API calls on malformed card numbers.

## Known failure modes

- Non-digit characters in input may cause validation failure or error response
- Empty string input may return invalid or error
- Input with spaces or dashes (unstripped) may fail — caller should normalize first
- Network or payment authorization failure for the $0.001 USDC x402 fee could block the call

## How this service works

Luhn check for digit strings (cards/IDs). Call when you reject obviously invalid card-shaped numbers before payment UI. Returns valid boolean and digit count for $0.001 USDC via x402 on Base. Checksum only—not issuer, funds, or PAN storage. No network, no keys, no retention. Results are advisory; the caller owns budgets, auth, and production controls.

## Output

Returns a JSON object with a boolean indicating whether the digit string passes the Luhn checksum, and an integer representing the number of digits in the input string. No issuer lookup, no network verification, no PAN storage — purely an algorithmic checksum result.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "number": {
   "type": "string",
   "description": "Input field: number."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valid": true,
  "digits": 16,
  "schema": "delx/util-luhn-valid/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-luhn-valid-42acd5b7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
