# UnionPay Card Luhn Validator

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

Validates whether a card number passes the Luhn checksum algorithm and matches the UnionPay card network pattern

## Facts

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

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 unionpay-card-luhn-validator-62b161b7 -d '<json body>'
```

Example prompt: Can you check if the card number 6250941006528599 is a valid UnionPay card — run it through the Luhn check and confirm it matches the UnionPay pattern?

## When to prefer this

Use this endpoint when you need a stateless, deterministic check of whether a card number is both Luhn-valid and a UnionPay card — no storage, no LLM inference, no side effects. Prefer the free sandbox POST /v1/sandbox/check-card-unionpay for testing; use this paid endpoint in production flows where you need reliable, low-latency card validation at $0.003 USDC per call.

## Known failure modes

- Missing or empty card number input returns a validation error
- Card number exceeding 20 characters is rejected by schema
- Malformed request body returns a 400-level error
- Payment failure (insufficient USDC) returns 402 and the check is not performed
- Non-numeric characters in card number may cause unexpected validation results

## How this service works

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

## Output

Returns whether the submitted card number passes the Luhn checksum and whether it matches the UnionPay card network prefix/pattern, with no data retained after the check.

## 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/unionpay-card-luhn-validator-62b161b7/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)
