verifactu_hash_compute $0.001 per call

Computes the SHA-256 invoice hash ('huella') for Spain's VERI*FACTU electronic invoicing system per the AEAT technical specification (chaining each invoice to the previous record's hash), and builds the corresponding AEAT QR validation URL. Pure offline computation, no network access required.

For AI agents: call verifactu_hash_compute
POST https://toll402.dev/v1/t/verifactu_hash_compute
{
 "issuer_nif": "B12345678",
 "invoice_number": "A-0001",
 "issue_date": "01-01-2024",
 "invoice_type": "F1",
 "total_tax": 21,
 "total_amount": 121,
 "previous_hash": "",
 "generation_timestamp": "2024-01-01T12:00:00+01:00"
}
Answers 402 with x402 payment requirements; pay with any x402 client (@x402/fetch, x402 for Python, toll402-client, toll402-mcp) or send a prepaid-credits key as x-toll402-key (https://toll402.dev/credits). Paid per call via x402 (USDC on Base) or with a prepaid-credits key (x-toll402-key, card at /credits); charged only on success. Start at /llms.txt or connect the MCP server: npx -y toll402-mcp · remote https://toll402.dev/mcp.

Input schema

{
 "type": "object",
 "properties": {
  "issuer_nif": {
   "type": "string",
   "description": "NIF of the invoice issuer (IDEmisorFactura)"
  },
  "invoice_number": {
   "type": "string",
   "description": "Full series+number of the invoice (NumSerieFactura)"
  },
  "issue_date": {
   "type": "string",
   "description": "Issue date in DD-MM-YYYY format (FechaExpedicionFactura)"
  },
  "invoice_type": {
   "type": "string",
   "description": "Invoice type code, e.g. F1, F2, R1 (TipoFactura)"
  },
  "total_tax": {
   "type": "number",
   "description": "Total tax amount, CuotaTotal"
  },
  "total_amount": {
   "type": "number",
   "description": "Total invoice amount, ImporteTotal"
  },
  "previous_hash": {
   "type": "string",
   "description": "Huella of the previous chained record; empty string if this is the first record",
   "default": ""
  },
  "generation_timestamp": {
   "type": "string",
   "description": "FechaHoraHusoGenRegistro, ISO 8601 datetime with UTC offset, e.g. 2024-01-01T12:00:00+01:00"
  }
 },
 "required": [
  "issuer_nif",
  "invoice_number",
  "issue_date",
  "invoice_type",
  "total_tax",
  "total_amount",
  "generation_timestamp"
 ],
 "additionalProperties": false
}

MCP

{"mcpServers":{"toll402":{"command":"npx","args":["-y","toll402-mcp"],"env":{"TOLL402_WALLET_KEY":"0x..."}}}}

All tools · OpenAPI