# EU Invoice Pre-Check Batch (Spain Agent Toolkit)

> EU Invoice Pre-Check Batch (Spain Agent Toolkit) is a paid API for AI agents from es.redtapeapi.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-18).

Validates up to 50 EU VAT numbers via VIES, verifies IBANs, and optionally calculates invoice due dates with regional holiday awareness in a single batch call.

## Facts

- Endpoint: GET https://es.redtapeapi.com/v1/eu/invoice/precheck/batch?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/eu-invoice-pre-check-batch-spain-agent-toolkit-5a02232a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ite3-eOB1UHnfAJhuRh6N

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 eu-invoice-pre-check-batch-spain-agent-toolkit-5a02232a
```

Example prompt: Before we process this week's payment run, can you batch-check these 5 supplier invoices — VAT numbers DE811569869, ES12345678A, FR40303265045, IT12345678901, and BE0123456749 — with their IBANs, all issued on 2025-07-01 with 30-day payment terms, and flag any that fail VIES or have IBAN problems?

## When to prefer this

Use this endpoint when you need to validate multiple EU supplier invoices in one shot — combining VIES VAT number verification, IBAN validation, optional Spanish NIF/CIF checking, and due-date calculation with regional holiday awareness. Prefer it over single-item checks when processing payment batches or onboarding multiple suppliers. It requires no account setup and is paid per-call via x402/USDC, making it ideal for agentic workflows that need compliance checks without infrastructure overhead.

## Known failure modes

- VIES service temporarily unavailable causing VAT check failure
- Invalid VAT number format causing rejection before VIES lookup
- IBAN checksum failure returning issue detail for that item
- Batch exceeds 50 items returning 400 validation error
- Invalid date format for issueDate causing parsing error
- paymentTermDays out of 0-365 range causing rejection
- Network timeout on VIES external call returning partial results

## How this service works

Pay-per-call Spain and EU utilities for AI agents over x402 (USDC). No accounts, no API keys. Public open data, live official checks (EU VIES) and offline computation; nothing is stored.

## Output

A JSON object containing: a count of items processed, a results array where each entry has an index, a verdict (ok/fail/review), and a list of specific issues if any; plus a summary with counts per verdict category and the number of distinct VAT numbers checked.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "items": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "vatNumber",
     "iban"
    ],
    "properties": {
     "iban": {
      "type": "string",
      "description": "Supplier IBAN, spaces allowed"
     },
     "region": {
      "type": "string",
      "description": "Optional ISO 3166-2 region for regional holidays, e.g. DE-BY, ES-CT"
     },
     "country": {
      "type": "string",
      "description": "Optional ISO country whose holidays apply to the due date (default: VAT country)"
     },
     "issueDate": {
      "type": "string",
      "description": "Optional invoice date YYYY-MM-DD; enables the due-date calculation"
     },
     "vatNumber": {
      "type": "string",
      "description": "EU VAT number with country prefix (VIES: EL for Greece, XI for Northern Ireland), e.g. DE811569869"
     },
     "spanishTaxId": {
      "type": "string",
      "description": "Optional Spanish NIF/NIE/CIF to validate (and match against an ES VAT number)"
     },
     "paymentTermDays": {
      "type": "integer",
      "description": "Optional payment term in calendar days (0-365, default 30 when issueDate is given)"
     }
    }
   },
   "maxItems": 50,
   "minItems": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 2,
  "results": [
   {
    "index": 0,
    "verdict": "ok"
   },
   {
    "index": 1,
    "issues": [
     "VAT number is not registered/active in VIES (not valid for intra-EU supplies)."
    ],
    "verdict": "fail"
   }
  ],
  "summary": {
   "ok": 1,
   "fail": 1,
   "review": 0
  },
  "distinctVatNumbers": 2
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/eu-invoice-pre-check-batch-spain-agent-toolkit-5a02232a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from es.redtapeapi.com](https://www.zero.xyz/host/es.redtapeapi.com/llms.txt)
