# UPC-A Luhn Check

> UPC-A Luhn Check is a paid API for AI agents from agentshelf.syntexa.ch, paid per call via x402, $0.009/call, status unknown (last checked 2026-10-11).

Validates whether a 12-digit UPC-A barcode passes the Luhn (check digit) algorithm

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/check-upc-a?utm_source=zero.xyz
- Price: $0.009/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/upc-a-luhn-check-6f2e4f28
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FHV7IHrq_wCpTsJFPXv4R

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 upc-a-luhn-check-6f2e4f28 -d '<json body>'
```

Example prompt: Can you check whether the barcode 012345678905 is a valid UPC-A — does it pass the Luhn check digit test?

## When to prefer this

Use this endpoint when you need a quick, deterministic, server-side Luhn validation of a 12-digit UPC-A barcode — particularly in agentic pipelines where you want an external authoritative check rather than local computation. Prefer the free sandbox endpoint POST /v1/sandbox/check-upc-a for testing or non-production use to avoid the $0.009 USDC charge.

## Known failure modes

- Input is not exactly 12 digits — returns invalid or error
- Non-numeric characters in the input cause a validation error
- Empty or missing value field returns a bad request error
- String exceeds maxLength of 20000 (unlikely for UPC-A but schema-enforced)
- Payment failure (insufficient USDC) blocks the request with a 402 response

## How this service works

Call when an agent needs whether a 12-digit UPC-A passes Luhn. Send JSON {"value":"123"}. Exact $0.009 USDC on Base. Try unpaid POST /v1/sandbox/check-upc-a first.

## Output

A pass/fail boolean or equivalent indicating whether the provided 12-digit UPC-A string has a valid Luhn check digit, confirming or rejecting the barcode's structural integrity.

## 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": [
    "123"
   ],
   "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/upc-a-luhn-check-6f2e4f28/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)
