# Invoice Audit API

> Invoice Audit API is a paid API for AI agents from www.getbags.app, paid per call via x402, $0.25/call, status unknown (last checked 2026-12-01).

Audits a structured invoice for math errors, line total mismatches, duplicate lines, PO discrepancies, and duplicate invoice numbers, returning findings with severity and expected vs. observed values.

## Facts

- Endpoint: GET https://www.getbags.app/api/agent/link/pl-c5a332aa-4390-4b95-8524-ccf5fad6429c?utm_source=zero.xyz
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/invoice-audit-api-70e4857e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lM4epkTzUNgV36AMZQoSA

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-audit-api-70e4857e
```

Example prompt: Audit this invoice from Acme Supplies (invoice #INV-2024-0091) with 3 line items — 10 units of Widget A at $5.00 each, 5 units of Widget B at $12.00 each, 2 units of Widget C at $8.00 each — subtotal $126.00, tax $12.60, total $138.60; compare it against PO #PO-7742 with a total of $130.00 and check our historical invoices for duplicates.

## When to prefer this

Use this endpoint when you need automated, structured invoice auditing before approving payment — especially when you want to catch math errors, validate against a purchase order, or detect duplicate invoice submissions. It is well-suited for accounts payable automation pipelines, procurement compliance workflows, and finance audit bots that process structured invoice JSON. Prefer this over manual review or generic LLM prompting when you need consistent severity-tagged findings with explicit expected vs. observed values.

## Known failure modes

- Missing required invoice object returns validation error
- Invoice items array empty or exceeds 500 items limit
- Non-decimal-string numbers in quantity or unit_price fields cause parsing errors
- Purchase order number mismatch flagged as finding rather than error
- Historical invoices array exceeds 100 objects limit
- Invalid currency code (not 3 letters) causes rejection
- Network or payment failure returns HTTP 402 or timeout

## How this service works

Audits an invoice for math and matching errors: wrong line totals, subtotal/total mismatches, duplicate lines, prices or quantities over a purchase order, PO number mismatches, and duplicate invoice numbers. Send structured JSON; returns findings with severity and expected vs. observed values.

## Output

Returns a list of audit findings, each with a severity level (e.g. error, warning), a description of the issue, and expected vs. observed values — covering math errors in line totals, subtotal/total mismatches, duplicate line items, prices or quantities exceeding the PO, PO number mismatches, and duplicate invoice numbers.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "invoice": {
   "type": "object",
   "description": "Required. Fields: supplier (string), invoice_number (string), items (array of 1-500: description, quantity, unit_price, optional sku and amount; numbers as decimal strings), optional currency (3 letters, default USD), subtotal, tax, shipping, discount, total, purchase_order_number."
  },
  "customerName": {
   "type": "string",
   "description": "Optional buyer name"
  },
  "customerEmail": {
   "type": "string",
   "description": "Optional buyer email for the receipt/customer record"
  },
  "purchase_order": {
   "type": "object",
   "description": "Optional. Compare against a PO: number, items (same shape as invoice items), total."
  },
  "historical_invoices": {
   "type": "array",
   "description": "Optional. Up to 100 objects with supplier and invoice_number, used to detect duplicate invoices."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/invoice-audit-api-70e4857e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.getbags.app](https://www.zero.xyz/host/www.getbags.app/llms.txt)
