{"uid":"cap_a5UbaoK77ddhkhgTqx5NI","slug":"handel-invoice-audit-1efacb27","name":"Handel Invoice Audit","description":"Rebuilds an invoice from its lines and compares the result with the stated totals. Line by line it checks quantity times unit price against the line total, applies line and document discounts in the right order, groups the net amounts by tax rate and computes the tax per group, then compares net, tax and gross with what the document claims.","url":"https://handel.halowerk.com/v1/invoice-audit","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","required":["quantity","unit_price"],"properties":{"quantity":{"type":"number"},"tax_rate":{"type":"number","maximum":100,"minimum":0,"description":"Tax rate in percent for this line."},"line_total":{"type":"number","description":"The stated line total. Recomputed if absent."},"unit_price":{"type":"number"},"description":{"type":"string","maxLength":300},"discount_pct":{"type":"number","maximum":100,"minimum":0,"description":"Discount on this line in percent."}},"additionalProperties":false},"maxItems":500,"minItems":1,"description":"The invoice lines."},"country":{"type":"string","maxLength":2,"minLength":2,"description":"Country whose standard rates the tax rates are checked against."},"currency":{"type":"string","default":"EUR","maxLength":3,"minLength":3},"due_date":{"type":"string","maxLength":10,"description":"Due date as YYYY-MM-DD."},"stated_net":{"type":"number","description":"Net total as stated on the invoice."},"stated_tax":{"type":"number","description":"Tax total as stated."},"invoice_date":{"type":"string","maxLength":10,"description":"Invoice date as YYYY-MM-DD."},"stated_gross":{"type":"number","description":"Gross total as stated."},"reverse_charge":{"type":"boolean","default":false,"description":"Whether the invoice claims the reverse charge."},"default_tax_rate":{"type":"number","maximum":100,"minimum":0,"description":"Tax rate for lines that do not carry one."},"customer_vat_number":{"type":"string","maxLength":20,"description":"Customer VAT number, required for the reverse charge."},"document_discount_pct":{"type":"number","maximum":100,"minimum":0,"description":"Discount on the whole document, applied after line discounts."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_qHPUupJ9038-s6v_Q5YyN","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates an invoice by recomputing all line totals, discounts, tax groups, and grand totals from raw line data, then comparing each computed figure against the document's stated values.","exampleAgentPrompt":"Can you audit this invoice for me? It claims a net total of €1,240.00, tax of €235.60, and gross of €1,475.60 — here are the line items with quantities, unit prices, a 5% line discount, and a 3% document-level discount. Run the numbers and tell me if anything doesn't match.","exampleUseCases":[{"title":"AP team catches supplier overcharge","prompt":"Before we pay this supplier invoice, can you verify all the line totals, discounts, and VAT against what they've actually stated? The invoice claims a gross total of €8,420.00 — here are the 12 line items with quantities and unit prices, a 10% document discount, and a 20% tax rate."},{"title":"Automated invoice approval workflow","prompt":"We're processing invoices automatically — can you check this one line by line to confirm the quantity-times-price calculations are right, the 5% trade discount has been applied correctly, and the VAT at 19% matches the stated totals before we approve it?"},{"title":"Auditor spot-checks past invoices","prompt":"I'm reviewing a batch of historical invoices for our audit. Start with this one: it has 8 lines, a mix of 7% and 19% tax rates, a 2% early-payment discount, and stated totals of net €3,100, tax €498, gross €3,598 — does the arithmetic hold up?"}],"resultDescription":"A structured audit report breaking down each invoice line's recomputed total versus the stated value, grouping net amounts by tax rate with computed tax per group, and providing a final comparison of recomputed net, tax, and gross totals against the document's claims — including mismatch flags where figures diverge.","failureModes":["Missing required line fields (quantity, unit price, or line total) cause validation to fail","Ambiguous discount application order leads to comparison errors if not specified correctly","Invoices with unsupported tax structures (e.g. compound taxes) may not be handled","Malformed or non-numeric values in line items return an error","Rounding convention mismatches between the invoice issuer and the audit engine may produce minor false positives"],"whenToPreferThis":"Choose this endpoint when you need to arithmetically validate an invoice's internal consistency — recomputing every calculation from raw line data and checking it against stated totals. It is ideal for accounts-payable automation, pre-payment auditing, supplier invoice verification, and compliance checks. Prefer it over generic document parsers when you already have structured line-item data and need a trustworthy, deterministic math check rather than data extraction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:40:25.942Z","isFirstParty":false}