# Mastercard Luhn Validator

> Mastercard Luhn Validator is a paid API for AI agents from agentshelf.syntexa.ch, paid per call via x402, $0.008/call, status unknown (last checked 2026-10-02).

Validates whether a card number passes the Luhn algorithm and matches the Mastercard card-number format

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/check-card-mastercard?utm_source=zero.xyz
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mastercard-luhn-validator-2fb8eec3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_APnWVsgY_u9avAVQEisiD

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 mastercard-luhn-validator-2fb8eec3 -d '<json body>'
```

Example prompt: Can you check if the card number 5412345678901234 is a valid Mastercard — run both the Luhn checksum and the Mastercard format check on it?

## When to prefer this

Use this endpoint when you need to validate a card number specifically as a Mastercard (IIN prefix + length) AND verify its Luhn checksum in a single call, with no data retention. Prefer the free sandbox endpoint POST /v1/sandbox/check-card-mastercard for testing. Choose this over generic Luhn-only validators when Mastercard network identification matters.

## Known failure modes

- Input card number string is empty or exceeds 20 characters — request rejected
- Card number contains non-numeric characters — validation may fail or return false
- Card number fails Luhn check — returns invalid result
- Card number passes Luhn but does not match Mastercard prefix/length — returns false for Mastercard match
- Payment of $0.008 USDC not provided — HTTP 402 response
- Malformed request body — 400 error

## How this service works

Call when an agent needs whether a number passes Luhn and matches mastercard. Nothing is stored. Exact $0.008 USDC. Prefer unpaid POST /v1/sandbox/check-card-mastercard first.

## Output

Returns a boolean or structured result indicating whether the supplied card number passes the Luhn mod-10 checksum and conforms to the Mastercard IIN/prefix and length format requirements. No card data is stored or logged.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "description": "JSON value for schema-check SKUs. Omit it on string checks such as email or IBAN."
  },
  "value": {
   "type": "string",
   "examples": [
    "411111"
   ],
   "maxLength": 20000,
   "minLength": 1,
   "description": "Value to check. The route description names the format: email, phone, IBAN, postal code, VAT, national id, or similar."
  },
  "schema": {
   "description": "JSON Schema document for schema-check SKUs. Omit it on string checks."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mastercard-luhn-validator-2fb8eec3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentshelf.syntexa.ch](https://www.zero.xyz/host/agentshelf.syntexa.ch/llms.txt)
