# Invoice Preflight

> Invoice Preflight is a paid API for AI agents from mcp.dropenginehq.com, paid per call via x402, $0.065/call, status unknown (last checked 2026-10-03).

Validates an invoice document against expected amounts, line items, and purchase details, returning a match/discrepancy/needs_review decision with field-level evidence.

## Facts

- Endpoint: POST https://mcp.dropenginehq.com/api/invoice-preflight?utm_source=zero.xyz
- Price: $0.065/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/invoice-preflight-fd88b9ff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_x5QaMXlBNztpcrMxpm24G

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 invoice-preflight-fd88b9ff -d '<json body>'
```

Example prompt: Can you check this invoice from Example Ltd (https://invoices.example.com/inv-8821.pdf) against our purchase order PO-8841 — I'm expecting a subtotal of $100.00, tax of $24.00, and a total of $124.00 USD, with line items for Service A ($60) and Service B ($40)?

## When to prefer this

Use this endpoint when you need automated, evidence-backed invoice validation against known expected values — particularly in accounts payable workflows, procurement three-way matching, or before releasing payments. It supports multiple input formats (PDF via URL or base64, PNG, JPEG, UBL XML), returns structured field-level evidence with document source citations, and produces a clear machine-readable decision. Prefer it over general OCR or document parsing tools when you specifically need comparative validation with a match/discrepancy verdict rather than just data extraction.

## Known failure modes

- Document URL is not publicly accessible or exceeds 10 MB — returns error
- PDF has more than 3 pages — may be rejected or partially processed
- Base64 payload is malformed or exceeds size limit — returns parsing error
- UBL XML is malformed or non-compliant — returns parsing error
- Expected values missing required fields (description/amount on line items) — validation error
- Currency code not exactly 3 characters — schema validation error
- Invoice text is unreadable/scanned at low quality — may return needs_review
- Mismatched currency codes between expected and actual — flagged as discrepancy

## How this service works

Check invoice amounts, purchase details and line items; return match, discrepancy or needs_review with evidence.

## Output

Returns a top-level decision ('match', 'discrepancy', or 'needs_review'), an array of field-level checks each showing the expected vs. actual value and status, the full extracted invoice object (number, supplier, PO, line items, subtotal, tax, total, currency), an evidence array citing the exact XML/document source path for each extracted field, any warnings, and a SHA-256 hash of the source document.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "expected": {
   "type": "object",
   "properties": {
    "tax": {
     "type": "string"
    },
    "total": {
     "type": "string"
    },
    "currency": {
     "type": "string",
     "maxLength": 3,
     "minLength": 3
    },
    "subtotal": {
     "type": "string"
    },
    "line_items": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "description",
       "amount"
      ],
      "properties": {
       "amount": {
        "type": "string"
       },
       "description": {
        "type": "string",
        "maxLength": 300,
        "minLength": 1
       }
      },
      "additionalProperties": false
     },
     "maxItems": 1000,
     "minItems": 1
    },
    "supplier_name": {
     "type": "string"
    },
    "purchase_order": {
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "mime_type": {
   "enum": [
    "application/pdf",
    "image/png",
    "image/jpeg"
   ],
   "type": "string"
  },
  "document_url": {
   "type": "string",
   "description": "Public HTTPS URL to a PDF, PNG, or JPEG (up to 10 MB, 3 pages for this tool)."
  },
  "document_xml": {
   "type": "string",
   "description": "UBL Invoice XML document, up to 1 MB."
  },
  "document_base64": {
   "type": "string",
   "description": "Base64 encoded PDF, PNG, or JPEG (up to 10 MB, 3 pages for this tool)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "checks": [
   {
    "field": "supplier_name",
    "actual": "Example Ltd",
    "status": "match",
    "expected": "Example Ltd"
   },
   {
    "field": "purchase_order",
    "actual": "PO-8841",
    "status": "match",
    "expected": "PO-8841"
   },
   {
    "field": "currency",
    "actual": "USD",
    "status": "match",
    "expected": "USD"
   },
   {
    "field": "total",
    "actual": "124.00",
    "status": "match",
    "expected": "124.00"
   },
   {
    "field": "line_items_sum",
    "actual": "100.00",
    "status": "match",
    "calculated": "100.00"
   },
   {
    "field": "subtotal_plus_tax",
    "actual": "124.00",
    "status": "match",
    "calculated": "124.00"
   }
  ],
  "invoice": {
   "tax": "24.00",
   "total": "124.00",
   "number": "INV-8821",
   "currency": "USD",
   "subtotal": "100.00",
   "line_items": [
    {
     "amount": "60.00",
     "description": "Service A"
    },
    {
     "amount": "40.00",
     "description": "Service B"
    }
   ],
   "supplier_name": "Example Ltd",
   "purchase_order": "PO-8841"
  },
  "decision": "match",
  "evidence": [
   {
    "text": "INV-8821",
    "field": "number",
    "source": "Invoice/ID"
   },
   {
    "text": "Example Ltd",
    "field": "supplier_name",
    "source": "Invoice/AccountingSupplierParty/Party/PartyLegalEntity/RegistrationName"
   },
   {
    "text": "PO-8841",
    "field": "purchase_order",
    "source": "Invoice/OrderReference/ID"
   },
   {
    "text": "USD",
    "field": "currency",
    "source": "Invoice/DocumentCurrencyCode"
   },
   {
    "text": "100.00",
    "field": "subtotal",
    "source": "Invoice/LegalMonetaryTotal/TaxExclusiveAmount"
   },
   {
    "text": "24.00",
    "field": "tax",
    "source": "Invoice/TaxTotal/TaxAmount"
   },
   {
    "text": "124.00",
    "field": "total",
    "source": "Invoice/LegalMonetaryTotal/PayableAmount"
   }
  ],
  "warnings": [],
  "source_sha256": "924b90ef73afa563db0e69f5f512e96e8041e9c6e192748011f1a8a809469fed"
 }
}
```

## More

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