# Agent402 UK — CNPJ Validator

> Agent402 UK — CNPJ Validator is a paid API for AI agents from agent402.co.uk, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Validates a Brazilian CNPJ tax registration number, checking format and mod-11 checksum, and returns the root identifier and validity flags.

## Facts

- Endpoint: POST https://agent402.co.uk/v1/validate/cnpj
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-uk-cnpj-validator-14083c7a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Cet3Cr6MrGmMnv9uWLyEA

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 agent402-uk-cnpj-validator-14083c7a -d '<json body>'
```

Example prompt: Can you check if this Brazilian CNPJ is valid before we process the payout: 04.252.011/0001-65?

## When to prefer this

Use this endpoint when you need a fast, deterministic, offline CNPJ validity check — particularly before initiating payouts, onboarding Brazilian business entities, or storing tax IDs. It avoids wasting LLM tokens on pure deterministic math and does not require an API key. Prefer this over an LLM-based check or a live Receita Federal lookup when offline format+checksum verification is sufficient.

## Known failure modes

- Malformed input with no CNPJ string returns a validation error
- CNPJ with wrong length returns valid:false, valid_checksum:false
- Network or payment failure (402) if USDC balance is insufficient
- Punctuation-only or empty string may cause a parse error response

## How this service works

Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.

## Output

A JSON object with three fields: 'root' (the 8-digit base CNPJ without branch or check digits), 'valid' (boolean indicating overall format validity), and 'valid_checksum' (boolean indicating whether the mod-11 check digits are correct). Allows agents to distinguish formatting errors from checksum failures.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "cnpj": {
   "type": "string",
   "description": "CNPJ, punctuation ok"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "root": "04252011",
  "valid": true,
  "valid_checksum": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-uk-cnpj-validator-14083c7a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.co.uk](https://www.zero.xyz/host/agent402.co.uk/llms.txt)
