{"uid":"cap_5vVZk1H1_iga6lCJhK0B1","slug":"rafid-invoice-anomaly-check-20985f7b","name":"Rafid Invoice Anomaly Check","description":"Rafid Agent API provides structured intelligence and paid APIs for AI agents across property, company and risk, supplier, finance, document, website, automotive, logistics, recruitment, trading, voice, video and business-planning workflows.","url":"https://api.rafidsystem.com/api/v1/x402/finance/invoice-anomaly-check?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","additionalProperties":true},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","additionalProperties":true}}}}},"responseSchema":{"type":"json","example":{"mode":"context_aware","scoring":{"model":"iac-1.0.0","rawScore":147.3,"components":[{"code":"POSSIBLE_DUPLICATE","points":36,"severity":"high","basePoints":40,"confidence":0.9}],"levelBands":{"low":"0-14","high":"40-64","medium":"15-39","critical":"65-100"},"escalationBonus":26,"cappedBySeverity":true,"escalationReasons":["3 independent risk families with ≥ medium anomalies (duplicate, payment_details, po_contract)..."],"lowSeverityPoints":4.3,"highSeverityPoints":117,"mediumSeverityPoints":0},"summary":"4 anomalies detected (POSSIBLE_DUPLICATE, BANK_ACCOUNT_CHANGED, PO_MISMATCH, INVOICE_NUMBER_A...","asOfDate":"2026-09-23","decision":"hold","anomalies":[{"code":"POSSIBLE_DUPLICATE","field":"invoiceNumber","evidence":{},"severity":"high","confidence":0.9,"explanation":"A same-supplier invoice with the same amount and a slightly altered invoice number (e.g. suff..."}],"checkedAt":"2026-09-23T00:00:00.000Z","riskLevel":"critical","riskScore":100,"contextUsed":{"contract":false,"purchaseOrder":true,"paymentHistory":0,"approvalContext":false,"supplierProfile":false,"historicalInvoices":4,"supplierHistoryMatched":4},"limitations":["The capability identifies invoice anomalies and risk indicators. It does not independently es..."],"anomalyCount":4,"invoiceSummary":{"total":9660,"dueDate":"2026-10-20","currency":"USD","supplierId":"SUP-291","invoiceDate":"2026-09-20","supplierName":"ABC Trading LLC","invoiceNumber":"INV-2026-1043-A","lineItemCount":1,"bankAccountMasked":"****6789"},"financialChecks":{"computed":{"tolerance":0.01,"expectedTax":460,"lineItemsSum":9200,"expectedTotal":9660},"taxValid":true,"totalValid":true,"subtotalValid":true,"lineTotalsValid":true},"dataCompleteness":{"missingRequiredFields":[],"missingRecommendedFields":[]},"recommendedAction":"Compare this invoice with the matched invoice and supporting documents to rule out a duplicat..."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.25","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.25/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_iPgTNGS8hJE8XucsXQcSn","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.25","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes an invoice for fraud indicators, duplicates, mismatches, and financial inconsistencies, returning a structured risk score and recommended action.","exampleAgentPrompt":"Can you run an anomaly check on this invoice from ABC Trading LLC — invoice number INV-2026-1043-A for $9,660 USD due October 20, with supplier ID SUP-291 — and tell me if it looks like a duplicate or if the bank details have changed?","exampleUseCases":[{"title":"Duplicate invoice detection before payment","prompt":"Before we approve this payment, can you check if invoice INV-2026-1043-A from supplier SUP-291 for $9,660 is a duplicate of anything we've already paid? It came in today with a slightly modified invoice number."},{"title":"Flagging changed bank account on supplier invoice","prompt":"Our supplier ABC Trading LLC just sent us an invoice with a different bank account than usual — invoice INV-2026-887 for $14,200. Can you run a fraud check on it to see if the bank account change is flagged as suspicious?"},{"title":"PO mismatch check for procurement audit","prompt":"We received invoice INV-2026-2201 from supplier SUP-104 for $32,500 referencing PO-8801, but the amounts don't seem to line up. Can you run an anomaly check and tell me if there's a PO mismatch or any other red flags before we send it to accounts payable?"}],"resultDescription":"Returns a structured JSON object containing: an overall risk score (0–100) and risk level (low/medium/high/critical), a decision recommendation (e.g. 'hold' or 'approve'), a list of detected anomalies with codes (e.g. POSSIBLE_DUPLICATE, BANK_ACCOUNT_CHANGED, PO_MISMATCH), severity levels and confidence scores per anomaly, financial validation results (tax, totals, line items), context used in the assessment, and a recommended action narrative. Also includes an invoice summary and a data completeness report.","failureModes":["Missing required invoice fields cause validation errors","Insufficient historical invoice data reduces anomaly detection accuracy","Unrecognized supplier ID may limit context-aware scoring","Ambiguous or incomplete PO reference prevents PO mismatch checks","Network or service timeouts on large invoice payloads","Payment authorization failure if x402 USDC balance is insufficient"],"whenToPreferThis":"Use this endpoint when you need structured, scored fraud and anomaly analysis on individual invoices before approving payment — especially when duplicate detection, bank account change alerts, PO contract mismatches, or financial math validation are required. Prefer this over generic rule-based checks when you want a context-aware risk score that incorporates supplier history, payment history, and escalation bonuses for multi-family risk signals.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:37:53.700Z","isFirstParty":false,"canonicalSlug":"rafid-invoice-anomaly-check-20985f7b"}