# HALOWERK Invoice Extract

> HALOWERK Invoice Extract is a paid API for AI agents from handel.halowerk.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-11).

Parses a hybrid electronic invoice (ZUGFeRD, Factur-X, XRechnung, or Peppol BIS) from a base64-encoded PDF or XML and returns structured invoice data including header, line items, tax breakdown, and totals.

## Facts

- Endpoint: POST https://handel.halowerk.com/v1/invoice-extract?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/halowerk-invoice-extract-f1723ddc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BU7OeLw5rLGC_T9bINJOW

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 halowerk-invoice-extract-f1723ddc -d '<json body>'
```

Example prompt: I have a ZUGFeRD invoice PDF encoded in base64 — can you extract all the structured data from it, including the line items and tax breakdown, and flag any discrepancies between the stated totals and the computed ones?

## When to prefer this

Choose this endpoint when you need to programmatically extract structured data from European electronic invoices in hybrid PDF (ZUGFeRD, Factur-X) or standalone XML (XRechnung, Peppol BIS, EN 16931 CII/UBL) formats. It is especially valuable for accounts payable automation, ERP ingestion pipelines, or compliance workflows where you need both extracted data and automatic total verification in a single call. Prefer it over generic PDF extraction tools because it understands the specific e-invoice XML standards and can surface embedded machine-readable data even from hybrid PDFs.

## Known failure modes

- Document too large: base64 string exceeds 250,000 characters — returns an error
- No embedded XML found: PDF does not contain a ZUGFeRD or Factur-X attachment — returns parsing error
- Malformed XML: embedded or standalone XML does not conform to EN 16931 CII or UBL syntax
- Unsupported format: non-invoice PDF or unrecognized XML structure — returns format error
- Base64 decoding failure: invalid base64 string — returns decoding error
- Total verification mismatch: returns computed vs stated totals with deviation details rather than failing

## How this service works

Reads a hybrid invoice and returns it as data. Accepts a PDF with an embedded ZUGFeRD or Factur-X XML, or the EN 16931 XML on its own, in either syntax the standard allows: CII, which ZUGFeRD and Factur-X use, and UBL, which XRechnung and Peppol BIS use.

## Output

A structured JSON object containing the parsed invoice data: header fields (buyer, seller, invoice number, dates, currency), line items (if requested), tax breakdown by rate, stated and computed totals, and a list of any deviations found between stated and recomputed figures.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "include_lines": {
   "type": "boolean",
   "default": true,
   "description": "Whether to return the individual invoice lines. False returns only header, tax breakdown and totals."
  },
  "verify_totals": {
   "type": "boolean",
   "default": true,
   "description": "Whether to recompute the stated totals from the lines and the tax breakdown and report every deviation."
  },
  "document_base64": {
   "type": "string",
   "maxLength": 250000,
   "minLength": 16,
   "description": "The document as base64. Either a PDF with an embedded ZUGFeRD or Factur-X XML, or the EN 16931 XML itself (CII or UBL). The JSON body of this hub is capped at 256 kB, so the base64 text must stay below 250000 characters, which is roughly 187 kB of file."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/halowerk-invoice-extract-f1723ddc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from handel.halowerk.com](https://www.zero.xyz/host/handel.halowerk.com/llms.txt)
