{"uid":"cap_5eh7Hkltsng3IVhbijiy7","slug":"brainiac-invoice-total-validator-6d83b8ca","name":"BRAINIAC Invoice Total Validator","description":"Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.","url":"https://www.brainiac.software/api/v1/accounts-payable/invoice-total-validate?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"file":{"type":"object","required":["mediaType","fileBase64"],"properties":{"filename":{"type":"string","maxLength":180,"minLength":1},"mediaType":{"enum":["application/pdf","text/plain","text/csv"],"type":"string"},"fileBase64":{"type":"string","maxLength":12000000,"minLength":1}},"additionalProperties":false},"invoice":{"type":"object","properties":{"tax":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"lines":{"type":"array","items":{"type":"object","required":["description"],"properties":{"sku":{"type":"string","maxLength":80,"minLength":1},"tax":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"amount":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"quantity":{"type":"number","maximum":1000000000,"minimum":-1000000000},"unitPrice":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"description":{"type":"string","maxLength":300,"minLength":1}},"additionalProperties":false},"maxItems":200},"total":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"dueDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"taxRate":{"type":"number","maximum":100,"minimum":0},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"discount":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"poNumber":{"type":"string","maxLength":80,"minLength":1},"shipping":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"subtotal":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"paymentTerms":{"type":"string","maxLength":120,"minLength":1},"supplierName":{"type":"string","maxLength":200,"minLength":1},"invoiceNumber":{"type":"string","maxLength":80,"minLength":1}},"additionalProperties":false}}},"responseSchema":{"type":"json","example":{"tax":0,"total":60,"status":"error","discount":0,"findings":[{"code":"total_mismatch","detail":"The total 60.00 does not equal 55.00 from the present figures (subtotal, discount, tax, shipping). Missing tax, discount, or shipping was not added as zero.","severity":"error"}],"shipping":0,"subtotal":55,"checkedAt":"2026-11-02T19:00:00.000Z","lineTotal":55,"limitations":["No payment was initiated.","Tax rules, purchase orders, supplier records, and payment terms are not invented when they are absent.","Only the invoice, purchase order, and prior invoices in this request are compared.","A figure that is not on the invoice is left out of the arithmetic. It is not treated as zero."],"expectedTotal":55,"paymentInitiated":false}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.04","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.04/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_2tCdBX-0A09g0xxiy5XFk","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.04","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates that an invoice's total matches the arithmetic of its line items, subtotal, tax, shipping, and discount fields, flagging any mismatches or errors.","exampleAgentPrompt":"Can you check if this invoice adds up correctly? The stated total is $60.00, the subtotal is $55.00, there's no tax or shipping listed, and I want to know if the total matches the line items before we process payment.","exampleUseCases":[{"title":"Pre-payment invoice arithmetic check","prompt":"Before we pay this vendor invoice, verify that the stated total of $1,247.50 actually matches the line items — subtotal is $1,150.00, tax is $97.50, no shipping or discount — and flag any mismatches."},{"title":"AP automation discrepancy detection","prompt":"We received an invoice with a total of $3,200.00 but the lines only add up to $2,980.00 with $150.00 shipping and $70.00 tax. Can you validate it and tell me exactly what's wrong?"},{"title":"Uploaded invoice file validation","prompt":"I have a PDF invoice here — can you check whether the total on it is mathematically correct based on the line items, discounts, and taxes listed on the document?"}],"resultDescription":"A JSON object containing the validation status ('ok' or 'error'), a list of findings each with a code, detail, and severity (e.g. 'total_mismatch'), computed values for lineTotal, subtotal, tax, discount, shipping, expectedTotal, and the actual total from the invoice, plus a checkedAt timestamp and a list of limitations explaining what was and was not evaluated.","failureModes":["Total mismatch detected and returned as an error finding with detail explaining the discrepancy","Missing required fields in the invoice object cause validation to be incomplete or skipped","Base64-encoded file exceeds size limit (12MB) causing request rejection","Unsupported media type for uploaded file returns validation error","Ambiguous or absent figures are excluded from arithmetic rather than assumed to be zero, which may produce unexpected expected totals","Payment via x402/USDC fails, preventing the call from being processed at all"],"whenToPreferThis":"Use this endpoint when you need a fast, accountless, pay-per-call check that invoice totals are arithmetically consistent with their component fields (line items, subtotal, tax, shipping, discount) before initiating payment or booking. It is ideal for AP automation pipelines that need to flag bad invoices cheaply without standing up dedicated accounting software integrations. Prefer it over general-purpose document parsing when you already have structured invoice data or a PDF/CSV and need a deterministic arithmetic verdict rather than data extraction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-11T12:19:40.069Z","isFirstParty":false,"canonicalSlug":"brainiac-invoice-total-validator-6d83b8ca"}