{"uid":"cap_hl5K4CCJdo0PXSGtQOGVr","slug":"taskmint-invoice-arithmetic-validator-fc7ef005","name":"TaskMint Invoice Arithmetic Validator","description":"Exact native USDC on Base; externally owned wallets only. Generate a private 32-byte random request_token for each new job, persist the entire body, and reuse it for challenge/retry and recovery. The token grants result access. Do not log or share it. HTTP 202 or an uncertain transport failure requires recovery with the identical body without a signature, never a new purchase. Results expire after 24 hours. Ten bounded deterministic services. Local execution is free; hosted jobs require customer-authorized payment only when billable.","url":"https://taskmint-sign-proof-node22-production.up.railway.app/api/agent/invoice_arithmetic?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"payload":{"type":"object","required":["currency","scale","lines","subtotal_minor","tax_minor","shipping_minor","discount_minor","total_minor"],"properties":{"lines":{"type":"array","items":{"type":"object","required":["quantity","unit_minor","line_minor"],"properties":{"quantity":{"type":"integer","maximum":1000000,"minimum":1},"line_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]{0,17})$"},"unit_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]{0,17})$"}},"additionalProperties":false},"maxItems":50,"minItems":1},"scale":{"type":"integer","maximum":4,"minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"tax_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]{0,17})$"},"total_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]{0,17})$"},"discount_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]{0,17})$"},"shipping_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]{0,17})$"},"subtotal_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]{0,17})$"}},"additionalProperties":false},"request_token":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Generate 32 cryptographically random bytes as lowercase hex for each new job. Keep this private result credential and reuse the identical body for retries. Replace the synthetic example token."}}},"responseSchema":{"type":"json","example":{"state":"paid","result":{"flags":[],"scale":2,"scope":"Exact arithmetic of supplied amounts. Scale is caller-declared, not inferred from currency. Tax and shipping are taken as supplied; discount is subtracted. No rounding, FX, tax compliance, authenticity or accounting approval.","valid":true,"issues":[],"status":"resolved","service":"invoice_arithmetic","summary":"0 arithmetic mismatches across 2 lines","version":"0.5.0","currency":"USD","expected":{"line_minor":["5997","1000"],"total_minor":"7997","total_decimal":"79.97","subtotal_minor":"6997"}},"service":"invoice_arithmetic"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_I5vn3DxSdfEgkGay73xmn","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates invoice arithmetic by checking that line totals, subtotals, tax, shipping, discount, and grand total are internally consistent using exact integer arithmetic.","exampleAgentPrompt":"Can you verify that my USD invoice math is correct? I have 2 line items: 3 units at $19.99 each (line total $59.97) and 1 unit at $10.00; subtotal is $69.97, tax is $5.00, shipping is $4.00, discount is $2.00, and grand total is $76.97 — scale is 2 decimal places.","exampleUseCases":[{"title":"Pre-send invoice sanity check","prompt":"Before I email this invoice to my client, can you confirm the math is right? It's in USD, scale 2. I have 5 units at $12.00 each (line total $60.00) and 2 units at $8.50 each (line total $17.00). Subtotal is $77.00, tax is $6.16, shipping is $0, discount is $5.00, and the total I have is $78.16."},{"title":"E-commerce checkout total verification","prompt":"My checkout system calculated a total for a customer order in USD (scale 2): 1 item at $29.99, 3 items at $4.99 each (line total $14.97), subtotal $44.96, tax $3.60, shipping $5.99, no discount, grand total $54.55. Can you verify those numbers are arithmetically correct?"},{"title":"Billing discrepancy investigation","prompt":"A customer is disputing their invoice — can you check if the arithmetic is actually wrong? It's a EUR invoice, scale 2: 10 units at $8.00 each (line $80.00), subtotal $80.00, tax $16.00, shipping $10.00, discount $5.00, total claimed is $101.00. Does that add up?"}],"resultDescription":"Returns a JSON object with a 'state' field (e.g. 'paid'), a 'result' object containing: 'valid' (boolean), 'status' ('resolved' or error), 'issues' (array of detected mismatches), 'flags' (array of warnings), 'summary' (human-readable mismatch count), 'expected' (recomputed values for each checked field including line totals and grand total in minor units and decimal), 'currency', 'scale', 'scope' (disclaimer of what is and is not checked), 'service', and 'version'.","failureModes":["Invalid request_token format (not 64-char lowercase hex) — rejected before payment","Line item count outside 1–50 range — schema validation error","quantity, unit_minor, or line_minor values out of allowed range — schema rejection","Ambiguous transport failure (HTTP 202 or network error) — must retry with identical body and token, never resubmit with new token","Results expire after 24 hours — token becomes invalid for retrieval","Payment not authorized by customer wallet — job not started","Non-EOA wallet used for payment — rejected by x402 protocol"],"whenToPreferThis":"Choose this endpoint when you need deterministic, exact integer arithmetic validation of invoice line items and totals — particularly when working with minor-unit (cent-level) amounts where floating-point errors are unacceptable. Prefer this over client-side calculation checks when you need an auditable, externally-verified result. It does not perform tax compliance, FX conversion, or accounting approval — it only checks internal arithmetic consistency.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T00:51:09.455Z","isFirstParty":false,"canonicalSlug":"taskmint-invoice-arithmetic-validator-fc7ef005"}