{"uid":"cap_x5QaMXlBNztpcrMxpm24G","slug":"invoice-preflight-fd88b9ff","name":"Invoice Preflight","description":"Check invoice amounts, purchase details and line items; return match, discrepancy or needs_review with evidence.","url":"https://mcp.dropenginehq.com/api/invoice-preflight?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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)."}}},"responseSchema":{"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"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.065","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.065/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.065","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.065","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ENY7_jc6Hm77G9m4MOccH","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.065","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates an invoice document against expected amounts, line items, and purchase details, returning a match/discrepancy/needs_review decision with field-level evidence.","exampleAgentPrompt":"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)?","exampleUseCases":[{"title":"AP automation before payment release","prompt":"Before we pay this vendor invoice, check it against our PO: the supplier should be Acme Supplies, PO number is PO-2024-003, subtotal $4,500.00, tax $450.00, total $4,950.00 USD. Here's the invoice PDF: https://files.mycompany.com/invoice-acme-march.pdf"},{"title":"Detecting overbilling on a freelancer invoice","prompt":"I got an invoice from a freelancer — can you verify it against what we agreed? I'm expecting 3 line items: Design work $1,200, Revisions $300, Rush fee $150, so subtotal $1,650, no tax, total $1,650 USD. The invoice is attached as a base64-encoded JPEG."},{"title":"Automated three-way match for procurement","prompt":"Run a preflight check on this UBL XML invoice from our supplier GlobalParts Inc — purchase order PO-9981, currency EUR, subtotal 8,200.00, tax 1,312.00, total 9,512.00 — and tell me if it matches or if there are any discrepancies."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-03T00:34:31.274Z","isFirstParty":false,"canonicalSlug":"invoice-preflight-fd88b9ff"}