Invoice Preflight
by Invoice Preflight in Markets & finance
Check invoice amounts, purchase details and line items; return match, discrepancy or needs_review with evidence.
https://mcp.dropenginehq.com/api/invoice-preflight- Price
- $0.065
- per call in USDC
- Uptime
- 100%
- last 30 days
- Response time
- 496 ms
- 610 ms slowest 5%
- Last check
- Passed
- 4 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://mcp.dropenginehq.com/api/invoice-preflight
Each call costs $0.065 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://mcp.dropenginehq.com/api/invoice-preflight
content-type: application/json
{
"document_xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">\n <cbc:ID>INV-8821</cbc:ID>\n <cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>\n <cac:OrderReference><cbc:ID>PO-8841</cbc:ID></cac:OrderReference>\n <cac:AccountingSupplierParty><cac:Party><cac:PartyLegalEntity><cbc:RegistrationName>Example Ltd</cbc:RegistrationName></cac:PartyLegalEntity></cac:Party></cac:AccountingSupplierParty>\n <cac:TaxTotal><cbc:TaxAmount currencyID=\"USD\">24.00</cbc:TaxAmount></cac:TaxTotal>\n <cac:LegalMonetaryTotal><cbc:TaxExclusiveAmount currencyID=\"USD\">100.00</cbc:TaxExclusiveAmount><cbc:PayableAmount currencyID=\"USD\">124.00</cbc:PayableAmount></cac:LegalMonetaryTotal>\n <cac:InvoiceLine><cbc:ID>1</cbc:ID><cbc:LineExtensionAmount currencyID=\"USD\">60.00</cbc:LineExtensionAmount><cac:Item><cbc:Name>Service A</cbc:Name></cac:Item></cac:InvoiceLine>\n <cac:InvoiceLine><cbc:ID>2</cbc:ID><cbc:LineExtensionAmount currencyID=\"USD\">40.00</cbc:LineExtensionAmount><cac:Item><cbc:Name>Service B</cbc:Name></cac:Item></cac:InvoiceLine>\n</Invoice>",
"expected": {
"currency": "USD",
"purchase_order": "PO-8841",
"supplier_name": "Example Ltd",
"total": "124.00"
}
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
document_base64 | string | No | Base64 encoded PDF, PNG, or JPEG (up to 10 MB, 3 pages for this tool). |
document_url | string | No | Public HTTPS URL to a PDF, PNG, or JPEG (up to 10 MB, 3 pages for this tool). |
document_xml | string | No | UBL Invoice XML document, up to 1 MB. |
expected | object | No | |
mime_type | string | No | One of: application/pdf, image/png, image/jpeg. |
Example response
The provider's example. We can't check it without paying.
Example response, 99 lines
{
"checks": [
{
"actual": "Example Ltd",
"expected": "Example Ltd",
"field": "supplier_name",
"status": "match"
},
{
"actual": "PO-8841",
"expected": "PO-8841",
"field": "purchase_order",
"status": "match"
},
{
"actual": "USD",
"expected": "USD",
"field": "currency",
"status": "match"
},
{
"actual": "124.00",
"expected": "124.00",
"field": "total",
"status": "match"
},
{
"actual": "100.00",
"calculated": "100.00",
"field": "line_items_sum",
"status": "match"
},
{
"actual": "124.00",
"calculated": "124.00",
"field": "subtotal_plus_tax",
"status": "match"
}
],
"decision": "match",
"evidence": [
{
"field": "number",
"source": "Invoice/ID",
"text": "INV-8821"
},
{
"field": "supplier_name",
"source": "Invoice/AccountingSupplierParty/Party/PartyLegalEntity/RegistrationName",
"text": "Example Ltd"
},
{
"field": "purchase_order",
"source": "Invoice/OrderReference/ID",
"text": "PO-8841"
},
{
"field": "currency",
"source": "Invoice/DocumentCurrencyCode",
"text": "USD"
},
{
"field": "subtotal",
"source": "Invoice/LegalMonetaryTotal/TaxExclusiveAmount",
"text": "100.00"
},
{
"field": "tax",
"source": "Invoice/TaxTotal/TaxAmount",
"text": "24.00"
},
{
"field": "total",
"source": "Invoice/LegalMonetaryTotal/PayableAmount",
"text": "124.00"
}
],
"invoice": {
"currency": "USD",
"line_items": [
{
"amount": "60.00",
"description": "Service A"
},
{
"amount": "40.00",
"description": "Service B"
}
],
"number": "INV-8821",
"purchase_order": "PO-8841",
"subtotal": "100.00",
"supplier_name": "Example Ltd",
"tax": "24.00",
"total": "124.00"
},
"source_sha256": "924b90ef73afa563db0e69f5f512e96e8041e9c6e192748011f1a8a809469fed",
"warnings": []
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.065.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://mcp.dropenginehq.com/api/invoice-preflight' \
-H 'content-type: application/json' \
--data-raw '{"document_xml":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">\n <cbc:ID>INV-8821<\/cbc:ID>\n <cbc:DocumentCurrencyCode>USD<\/cbc:DocumentCurrencyCode>\n <cac:OrderReference><cbc:ID>PO-8841<\/cbc:ID><\/cac:OrderReference>\n <cac:AccountingSupplierParty><cac:Party><cac:PartyLegalEntity><cbc:RegistrationName>Example Ltd<\/cbc:RegistrationName><\/cac:PartyLegalEntity><\/cac:Party><\/cac:AccountingSupplierParty>\n <cac:TaxTotal><cbc:TaxAmount currencyID=\"USD\">24.00<\/cbc:TaxAmount><\/cac:TaxTotal>\n <cac:LegalMonetaryTotal><cbc:TaxExclusiveAmount currencyID=\"USD\">100.00<\/cbc:TaxExclusiveAmount><cbc:PayableAmount currencyID=\"USD\">124.00<\/cbc:PayableAmount><\/cac:LegalMonetaryTotal>\n <cac:InvoiceLine><cbc:ID>1<\/cbc:ID><cbc:LineExtensionAmount currencyID=\"USD\">60.00<\/cbc:LineExtensionAmount><cac:Item><cbc:Name>Service A<\/cbc:Name><\/cac:Item><\/cac:InvoiceLine>\n <cac:InvoiceLine><cbc:ID>2<\/cbc:ID><cbc:LineExtensionAmount currencyID=\"USD\">40.00<\/cbc:LineExtensionAmount><cac:Item><cbc:Name>Service B<\/cbc:Name><\/cac:Item><\/cac:InvoiceLine>\n<\/Invoice>","expected":{"currency":"USD","purchase_order":"PO-8841","supplier_name":"Example Ltd","total":"124.00"}}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://mcp.dropenginehq.com/api/invoice-preflight' \
-H 'content-type: application/json' \
--data-raw '{"document_xml":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">\n <cbc:ID>INV-8821<\/cbc:ID>\n <cbc:DocumentCurrencyCode>USD<\/cbc:DocumentCurrencyCode>\n <cac:OrderReference><cbc:ID>PO-8841<\/cbc:ID><\/cac:OrderReference>\n <cac:AccountingSupplierParty><cac:Party><cac:PartyLegalEntity><cbc:RegistrationName>Example Ltd<\/cbc:RegistrationName><\/cac:PartyLegalEntity><\/cac:Party><\/cac:AccountingSupplierParty>\n <cac:TaxTotal><cbc:TaxAmount currencyID=\"USD\">24.00<\/cbc:TaxAmount><\/cac:TaxTotal>\n <cac:LegalMonetaryTotal><cbc:TaxExclusiveAmount currencyID=\"USD\">100.00<\/cbc:TaxExclusiveAmount><cbc:PayableAmount currencyID=\"USD\">124.00<\/cbc:PayableAmount><\/cac:LegalMonetaryTotal>\n <cac:InvoiceLine><cbc:ID>1<\/cbc:ID><cbc:LineExtensionAmount currencyID=\"USD\">60.00<\/cbc:LineExtensionAmount><cac:Item><cbc:Name>Service A<\/cbc:Name><\/cac:Item><\/cac:InvoiceLine>\n <cac:InvoiceLine><cbc:ID>2<\/cbc:ID><cbc:LineExtensionAmount currencyID=\"USD\">40.00<\/cbc:LineExtensionAmount><cac:Item><cbc:Name>Service B<\/cbc:Name><\/cac:Item><\/cac:InvoiceLine>\n<\/Invoice>","expected":{"currency":"USD","purchase_order":"PO-8841","supplier_name":"Example Ltd","total":"124.00"}}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.065 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.065" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.065 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fmcp.dropenginehq.com%2Fapi%2Finvoice-preflight&method=POST
const res = await pay("https://mcp.dropenginehq.com/api/invoice-preflight", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"document_xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">\n <cbc:ID>INV-8821<\/cbc:ID>\n <cbc:DocumentCurrencyCode>USD<\/cbc:DocumentCurrencyCode>\n <cac:OrderReference><cbc:ID>PO-8841<\/cbc:ID><\/cac:OrderReference>\n <cac:AccountingSupplierParty><cac:Party><cac:PartyLegalEntity><cbc:RegistrationName>Example Ltd<\/cbc:RegistrationName><\/cac:PartyLegalEntity><\/cac:Party><\/cac:AccountingSupplierParty>\n <cac:TaxTotal><cbc:TaxAmount currencyID=\"USD\">24.00<\/cbc:TaxAmount><\/cac:TaxTotal>\n <cac:LegalMonetaryTotal><cbc:TaxExclusiveAmount currencyID=\"USD\">100.00<\/cbc:TaxExclusiveAmount><cbc:PayableAmount currencyID=\"USD\">124.00<\/cbc:PayableAmount><\/cac:LegalMonetaryTotal>\n <cac:InvoiceLine><cbc:ID>1<\/cbc:ID><cbc:LineExtensionAmount currencyID=\"USD\">60.00<\/cbc:LineExtensionAmount><cac:Item><cbc:Name>Service A<\/cbc:Name><\/cac:Item><\/cac:InvoiceLine>\n <cac:InvoiceLine><cbc:ID>2<\/cbc:ID><cbc:LineExtensionAmount currencyID=\"USD\">40.00<\/cbc:LineExtensionAmount><cac:Item><cbc:Name>Service B<\/cbc:Name><\/cac:Item><\/cac:InvoiceLine>\n<\/Invoice>",
"expected": {
"currency": "USD",
"purchase_order": "PO-8841",
"supplier_name": "Example Ltd",
"total": "124.00"
}
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.065 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.065"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://mcp.dropenginehq.com/api/invoice-preflight",
json={
"document_xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">\n <cbc:ID>INV-8821</cbc:ID>\n <cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>\n <cac:OrderReference><cbc:ID>PO-8841</cbc:ID></cac:OrderReference>\n <cac:AccountingSupplierParty><cac:Party><cac:PartyLegalEntity><cbc:RegistrationName>Example Ltd</cbc:RegistrationName></cac:PartyLegalEntity></cac:Party></cac:AccountingSupplierParty>\n <cac:TaxTotal><cbc:TaxAmount currencyID=\"USD\">24.00</cbc:TaxAmount></cac:TaxTotal>\n <cac:LegalMonetaryTotal><cbc:TaxExclusiveAmount currencyID=\"USD\">100.00</cbc:TaxExclusiveAmount><cbc:PayableAmount currencyID=\"USD\">124.00</cbc:PayableAmount></cac:LegalMonetaryTotal>\n <cac:InvoiceLine><cbc:ID>1</cbc:ID><cbc:LineExtensionAmount currencyID=\"USD\">60.00</cbc:LineExtensionAmount><cac:Item><cbc:Name>Service A</cbc:Name></cac:Item></cac:InvoiceLine>\n <cac:InvoiceLine><cbc:ID>2</cbc:ID><cbc:LineExtensionAmount currencyID=\"USD\">40.00</cbc:LineExtensionAmount><cac:Item><cbc:Name>Service B</cbc:Name></cac:Item></cac:InvoiceLine>\n</Invoice>",
"expected": {
"currency": "USD",
"purchase_order": "PO-8841",
"supplier_name": "Example Ltd",
"total": "124.00",
},
},
)
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 4 h ago | Passed | 402 | 495 ms | $0.065 |
| 9 h ago | Passed | 402 | 504 ms | $0.065 |
| 13 h ago | Passed | 402 | 496 ms | $0.065 |
| 18 h ago | Passed | 402 | 551 ms | $0.065 |
| 22 h ago | Passed | 402 | 537 ms | $0.065 |
Show 10 older checks
| 27 h ago | Passed | 402 | 485 ms | $0.065 |
| 31 h ago | Passed | 402 | 457 ms | $0.065 |
| 35 h ago | Passed | 402 | 396 ms | $0.065 |
| 39 h ago | Passed | 402 | 587 ms | $0.065 |
| 44 h ago | Passed | 402 | 495 ms | $0.065 |
| 2 days ago | Passed | 402 | 525 ms | $0.065 |
| 2 days ago | Passed | 402 | 552 ms | $0.065 |
| 2 days ago | Passed | 402 | 648 ms | $0.065 |
| 3 days ago | Passed | 402 | 610 ms | $0.065 |
| 3 days ago | Passed | 402 | 451 ms | $0.065 |