{"service":"Subpay invoice reader","reads":"Reads invoices, bills and receipts from PDF into structured JSON — vendor, customer, dates, PO, line items, discount, tax, shipping, total, balance due — and checks the arithmetic: quantity × unit price, lines to subtotal, tax rate, total and balance due. The response says exactly which figures don't add up.","endpoint":"POST /api/v1/invoice","price":"$0.04 per page (up to 25 pages)","pricing":"Each document is quoted before payment: pages × the per-page price, up to 25 pages. The 402 response states the exact amount.","checks":{"line_math":"quantity × unit price = line amount, per line","lines_to_subtotal":"line amounts sum to the subtotal","tax_rate":"tax ≤ rate × (subtotal − discount) for each tax line with a printed rate","total":"subtotal − discount + tax + shipping + other charges = total","balance_due":"total − amount paid = balance due","dates":"due date on or after the invoice date","note":"passed: null means the figures needed weren't printed. Failures also appear in `warnings`."},"payment":{"protocol":"x402","scheme":"exact","asset":"USDC","chains":[{"chain":"base","network":"eip155:8453","testnet":false},{"chain":"solana","network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","testnet":false}]},"available":true,"accepts":["application/pdf body","multipart/form-data with field `file`","application/json { document: <base64 PDF>, fileName? }"],"maxBytes":4194304,"maxPages":25,"example":{"invoice":{"documentType":"INVOICE","invoiceNumber":"INV-1042","invoiceDate":"2026-10-01","dueDate":"2026-10-31","currency":"USD","vendor":{"name":"Acme Supply Co.","taxId":"12-3456789"},"customer":{"name":"Northwind LLC"},"lineItems":[{"description":"Widget A","quantity":10,"unitPrice":12.5,"amount":125},{"description":"Install labor","quantity":2,"unitPrice":85,"amount":170}],"subtotal":295,"taxes":[{"label":"Sales tax","ratePercent":7,"amount":20.65}],"total":315.65,"balanceDue":315.65},"checks":[{"name":"line_math","passed":true,"detail":"quantity × unit price = amount on all 2 priced line(s)"},{"name":"lines_to_subtotal","passed":true,"detail":"2 line amount(s) sum to the subtotal 295.00"},{"name":"tax_rate","passed":true,"detail":"tax = rate × taxable amount on 1 tax line(s)"},{"name":"total","passed":true,"detail":"subtotal − discount + tax + shipping + other charges = total"}],"warnings":[],"confidence":0.95},"charging":"Only successful reads are charged. Failed reads return an error and the payment is not settled.","retention":"Documents are read and discarded, never stored.","mcp":"https://subpay.ai/invoice/mcp — tool extract_invoice, same price, paid per call over x402","llms":"https://subpay.ai/llms.txt","terms":"https://subpay.ai/api-terms — by sending a request or payment you agree to these terms."}