# code402 CNPJ Check

> code402 CNPJ 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-11).

Validates a Brazilian CNPJ (Cadastro Nacional da Pessoa Jurídica) business identifier using offline deterministic checksum verification, paid per call via x402 micropayments.

## Facts

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

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-cnpj-check-71aae181 -d '<json body>'
```

Example prompt: Can you verify that this Brazilian company registration number is valid — CNPJ 11.222.333/0001-81 — and tell me if it passes the checksum?

## When to prefer this

Use this endpoint when you need a fast, offline, deterministic validation of a Brazilian CNPJ number with checksum verification — not just format checking. Ideal for KYB (Know Your Business) pipelines, supplier onboarding, rental due diligence, or any workflow where you need a cheap ($0.005), auditable, non-ML confirmation that a Brazilian business ID is structurally and mathematically valid. Prefer over scraping Brazilian government registries when offline verification suffices.

## Known failure modes

- Invalid or malformed CNPJ input returns valid:false with a descriptive reason
- Network or payment failure if x402 USDC transaction cannot be processed
- Rate limit exceeded beyond 3 free daily calls without payment
- Ambiguous input (letters, wrong length) may return format error in reason field

## 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 a boolean 'valid' field, a 'reason' string explaining the outcome (e.g. 'checksum valid' or the specific failure), a 'scope' field indicating whether verification was checksum-level or format-only, a 'normalized' string with the standardized CNPJ format, and a 'country' field. Also echoes the 'tool' name used.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "cnpj"
   ],
   "properties": {
    "cnpj": {
     "type": "string",
     "description": "14-digit Brazilian CNPJ; punctuation allowed (e.g. 00.000.000/0001-91)."
    }
   }
  }
 }
}
```

## 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-cnpj-check-71aae181/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)
