# Portuguese NIF/NIPC Validator

> Portuguese NIF/NIPC Validator is a paid API for AI agents from toll402.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Validates a Portuguese NIF (individual tax number) or NIPC (company tax number) offline, checking format and check-digit correctness.

## Facts

- Endpoint: POST https://toll402.dev/v1/t/nif_pt_validate
- 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/portuguese-nif-nipc-validator-e9dca509
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ten9alkC4ARxpsd23q0Oh

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 portuguese-nif-nipc-validator-e9dca509 -d '<json body>'
```

Example prompt: Can you check whether the Portuguese NIF 123456789 is valid?

## When to prefer this

Use this endpoint when you need a fast, cheap, offline check of a Portuguese NIF or NIPC number without setting up API keys or accounts. It is ideal for pre-validation before submitting data to Portuguese tax authorities, for KYC pipelines handling Portuguese entities, or for cleaning CRM data containing Portuguese tax IDs. Prefer this over a live registry lookup when you only need format/check-digit correctness and not real-time registration status.

## Known failure modes

- Missing or empty 'nif' field returns a validation error
- Non-numeric input that cannot be normalized returns ok: false
- NIF with incorrect check digit returns ok: false
- Malformed request body (wrong content type or missing required fields) returns an HTTP error

## How this service works

The OpenRouter for AI-agent tools: one gateway, one wallet, every capability. Built-in tools, forged tools, a global verified business directory and 2,000+ aggregated x402 services, all paid per call in USDC via x402 (HTTP 402). No signup, no API key.

## Output

Returns a JSON object with an 'ok' boolean indicating whether the NIF/NIPC is valid. A true value means the number passes format and check-digit rules; false means it is invalid. No external network call is made — validation is performed offline.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "nif"
     ],
     "properties": {
      "nif": {
       "type": "string",
       "description": "Portuguese NIF/NIPC, digits only or with spaces/dots"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/portuguese-nif-nipc-validator-e9dca509/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from toll402.dev](https://www.zero.xyz/host/toll402.dev/llms.txt)
