{"uid":"cap_37cKkKzDCZa3b3QNBubiA","slug":"brainiac-invoice-duplicate-detector-a85e9895","name":"BRAINIAC Invoice Duplicate Detector","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-duplicate-detect?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},"candidates":{"type":"array","items":{"type":"object","required":["id"],"properties":{"id":{"type":"string","maxLength":80,"minLength":1},"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},"maxItems":50}}},"responseSchema":{"type":"json","example":{"status":"duplicate","matches":[{"detail":"Candidate prior-1 has the same supplier and invoice number.","relation":"identifier","severity":"error","candidateId":"prior-1"},{"detail":"Candidate prior-1 has the same supplier, invoice number, date, currency, total, and line fingerprint.","relation":"fingerprint","severity":"error","candidateId":"prior-1"}],"findings":[{"code":"duplicate_identifier","detail":"Candidate prior-1 has the same supplier and invoice number.","severity":"error"},{"code":"duplicate_fingerprint","detail":"Candidate prior-1 has the same supplier, invoice number, date, currency, total, and line fingerprint.","severity":"error"}],"checkedAt":"2026-11-02T19:00:00.000Z","fingerprint":"81301f34292355546cfc99b23fa3fed9aced6e6a3ff14b0adfb42132d9fb2a4e","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.","Duplicate detection compares only the invoices in this request. It does not mean the invoice is unique in an accounts payable ledger."],"supplierName":"Northwind Paper Ltd","invoiceNumber":"INV-100","paymentInitiated":false,"fingerprintComplete":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4rwaBCs5js_LCjCC2FsqI","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Detects duplicate invoices by comparing an incoming invoice against a set of prior invoices using identifier matching and content fingerprinting.","exampleAgentPrompt":"Before we pay this invoice from Northwind Paper Ltd (INV-100, $2,450 USD, dated 2026-11-01), check it against these three prior invoices we received from them this quarter to make sure it's not a duplicate.","exampleUseCases":[{"title":"Block duplicate vendor invoice payment","prompt":"We just received invoice INV-205 from Acme Supplies for $3,800 — before we process payment, compare it against the last 10 invoices from Acme Supplies to make sure we haven't already paid this one."},{"title":"Audit batch of submitted invoices","prompt":"I have a new invoice (PDF attached) from GlobalTech for $12,500 and four prior invoices from them on file — can you fingerprint the new one and check whether it's a duplicate of any of the existing ones?"},{"title":"Catch re-submitted invoice after system error","prompt":"Our vendor resubmitted invoice INV-889 after claiming it was lost, but I think we already paid it last month. Compare this invoice — $6,200 from TechParts Co., dated 2026-09-15 — against the prior version we have on file and tell me if they match."}],"resultDescription":"Returns a status ('duplicate' or 'unique'), a list of matches with candidateId, relation type (identifier or fingerprint), severity (error/warning), and detail message, plus a findings array with error codes, a SHA-256 fingerprint hash of the incoming invoice, a boolean indicating whether the fingerprint is complete, the extracted supplier name and invoice number, a timestamp of when the check ran, and a limitations disclaimer noting that only the invoices in the request are compared.","failureModes":["Missing required file or invoice fields returns a validation error","Invoice too large (base64 exceeds 12MB limit) causes a payload rejection","Unsupported media type (not PDF, plain text, or CSV) causes rejection","No prior invoices provided means no comparison can be made — returns unique by default","Malformed date format in invoiceDate or dueDate causes schema validation failure","Corrupted or unreadable PDF/CSV may result in partial fingerprint with fingerprintComplete=false"],"whenToPreferThis":"Use this endpoint when you need a lightweight, stateless duplicate-invoice check that compares a new invoice against a set of known prior invoices you supply in the request — ideal for pre-payment validation in automated AP workflows. It is not a replacement for a full AP ledger deduplication system, as it only compares invoices within the current request payload. Prefer this over manual review when processing invoices programmatically via AI agents, especially when you have prior invoice data available to supply as candidates.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-11T14:52:15.958Z","isFirstParty":false,"canonicalSlug":"brainiac-invoice-duplicate-detector-a85e9895"}