# code402 LEI Check

> code402 LEI Check is a paid API for AI agents from hcrb.in, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-12).

Validates a Legal Entity Identifier (LEI) code using offline deterministic checksum verification, returning validity, reason, normalized form, and country.

## Facts

- Endpoint: POST https://hcrb.in/v1/tools/lei-check/call?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/code402-lei-check-7f29c66f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NDBjb7IXV2Bg8aFenUuoJ

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 code402-lei-check-7f29c66f -d '<json body>'
```

Example prompt: Check whether the LEI code 5493001KJTIIGC8Y1R12 is valid — tell me if the checksum passes and what country it belongs to.

## When to prefer this

Choose this endpoint when you need fast, deterministic, offline LEI validation without relying on the GLEIF database lookup or any external registry call. It is ideal for format and checksum verification in high-throughput compliance pipelines, pre-submission validation for trade reporting (MiFID II, EMIR), or any scenario where you need a cheap ($0.005/call), trustless, receipt-backed validation with no ML or scraping. Use it when you don't need live registry data (entity name, status) but just need to confirm the identifier is structurally and mathematically valid.

## Known failure modes

- Invalid or malformed input string returns valid=false with a descriptive reason
- Network or payment failure (HTTP 402 if free quota exhausted and no payment provided)
- LEI that passes format but fails checksum returns valid=false with checksum failure reason
- Empty or missing input field returns an error response

## How this service works

Offline deterministic checks (no ML, no scraping) for business identifiers and rental due-diligence, paid per call via x402 (gasless EIP-3009 USDC on Base). Checksum-verifiable (IBAN, LEI, VAT, ABA, ISBN, SEDOL…) vs format-only (EIN, IFSC, SWIFT/BIC…) — every response returns a scope field. Non-custodial, signed receipts. First 3 calls/day free.

## Output

Returns a JSON object with: `valid` (boolean indicating if the LEI passed checksum/format validation), `reason` (human-readable explanation such as 'checksum valid' or specific failure reason), `normalized` (canonically formatted LEI string), `country` (jurisdiction derived from the LEI), `scope` (indicating whether checksum-verifiable or format-only), and `tool` (identifier for this check type).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "lei"
   ],
   "properties": {
    "lei": {
     "type": "string",
     "description": "20-character Legal Entity Identifier."
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "schema": {
  "type": "object",
  "required": [
   "valid",
   "reason"
  ],
  "properties": {
   "tool": {
    "type": "string"
   },
   "scope": {
    "type": "string"
   },
   "valid": {
    "type": "boolean"
   },
   "reason": {
    "type": "string"
   },
   "country": {
    "type": "string"
   },
   "normalized": {
    "type": "string"
   }
  }
 },
 "example": {
  "valid": true,
  "reason": "checksum valid"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/code402-lei-check-7f29c66f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hcrb.in](https://www.zero.xyz/host/hcrb.in/llms.txt)
