{"uid":"cap_xLh0Rf3GFYviBbvj6LnNF","slug":"sales-commission-payout-audit-e3bea580","name":"Sales Commission Payout Audit","description":"Public static preview plus paid token controls, risk consensus, AI security, webhook reliability, developer security, schedule risk, decision analysis, API release compatibility, accounts-payable reconciliation, e-commerce return eligibility, SaaS subscription-proration, sales-commission reconciliation, parcel-charge reconciliation, SLA service-credit reconciliation, advertising spend-and-fee audit, contract-renewal audit, workforce timecard reconciliation, hotel booking-commission reconciliation, and warehouse cycle-count adjustment reconciliation products for autonomous agents.","url":"https://rooke-token-risk-pilot.rookepoole.workers.dev/v1/x402/sales-commission-payout-audit","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"plan":{"type":"object","required":["planId","planVersion","currency","periodStart","periodEnd","quotaMinor","payoutMode","tiers","payoutCapMinor"],"properties":{"tiers":{"type":"array","items":{"type":"object","required":["minimumCreditedAmountMinor","rateBps"],"properties":{"rateBps":{"type":"integer","maximum":10000,"minimum":0},"minimumCreditedAmountMinor":{"type":"integer","maximum":9007199254740991,"minimum":0}},"additionalProperties":false},"maxItems":50,"minItems":1},"planId":{"type":"string","maxLength":120,"minLength":1},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"periodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"payoutMode":{"enum":["FLAT_RETROACTIVE","MARGINAL"],"type":"string"},"quotaMinor":{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0},"periodStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"planVersion":{"type":"string","maxLength":120,"minLength":1},"payoutCapMinor":{"anyOf":[{"type":"integer","maximum":9007199254740991,"minimum":0},{"type":"null"}]}},"additionalProperties":false},"policy":{"type":"object","required":["toleranceMinor"],"properties":{"toleranceMinor":{"type":"integer","maximum":1000000,"minimum":0}},"additionalProperties":false},"statement":{"type":"object","required":["statementId","observedGrossCommissionMinor","observedBonusMinor","observedClawbackMinor","observedNetPayoutMinor"],"properties":{"statementId":{"type":"string","maxLength":120,"minLength":1},"observedBonusMinor":{"type":"integer","maximum":9007199254740991,"minimum":0},"observedClawbackMinor":{"type":"integer","maximum":9007199254740991,"minimum":0},"observedNetPayoutMinor":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991},"observedGrossCommissionMinor":{"type":"integer","maximum":9007199254740991,"minimum":0}},"additionalProperties":false},"representative":{"type":"object","required":["representativeId","deals","adjustments"],"properties":{"deals":{"type":"array","items":{"type":"object","required":["dealId","creditedAt","commissionableAmountMinor","creditBps","eligible"],"properties":{"dealId":{"type":"string","maxLength":120,"minLength":1},"eligible":{"type":"boolean"},"creditBps":{"type":"integer","maximum":10000,"minimum":0},"creditedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"commissionableAmountMinor":{"type":"integer","maximum":9007199254740991,"minimum":0}},"additionalProperties":false},"maxItems":500},"adjustments":{"type":"array","items":{"type":"object","required":["adjustmentId","type","amountMinor","reasonCode"],"properties":{"type":{"enum":["BONUS","CLAWBACK"],"type":"string"},"reasonCode":{"type":"string","maxLength":120,"minLength":1},"amountMinor":{"type":"integer","maximum":9007199254740991,"minimum":0},"adjustmentId":{"type":"string","maxLength":120,"minLength":1}},"additionalProperties":false},"maxItems":200},"representativeId":{"type":"string","maxLength":120,"minLength":1}},"additionalProperties":false}}},"responseSchema":{"type":"json","example":{"plan":{"planId":"PLAN-AE","payoutMode":"FLAT_RETROACTIVE","planVersion":"2026-Q1"},"summary":{"dealCount":1,"toleranceMinor":0,"adjustmentCount":2,"creditedDealCount":1,"excludedDealCount":0},"verdict":"MATCHED_WITHIN_TOLERANCE","currency":"USD","expected":{"bonusMinor":50000,"clawbackMinor":10000,"netPayoutMinor":680000,"capReductionMinor":0,"grossCommissionMinor":640000},"observed":{"bonusMinor":50000,"clawbackMinor":10000,"netPayoutMinor":680000,"grossCommissionMinor":640000},"riskFlags":[],"variances":{"bonusMinor":0,"clawbackMinor":0,"netPayoutMinor":0,"grossCommissionMinor":0,"observedArithmeticMinor":0},"attainment":{"quotaMinor":10000000,"attainmentBps":"8000","achievedTierIndex":1,"totalCreditedMinor":8000000},"reportHash":"sha256-hex","adjustments":[],"dealResults":[],"statementId":"STMT-42","evidenceGaps":["CALLER_SUPPLIED_PLAN_DEAL_AND_STATEMENT_FACTS_NOT_AUTHENTICATED"],"claimBoundary":{"fundsMoved":false,"payoutApproved":false,"payrollModified":false},"schemaVersion":"SALES_COMMISSION_PAYOUT_AUDIT_V1","tierBreakdown":[],"representativeId":"REP-42","requestCommitment":"sha256-hex","recommendedDisposition":"MATCHED_NO_ACTION"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"9","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":"$9/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"9","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"9","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_jy6shklqdSmtKtvT5gyjf","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"9","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Audits a sales representative's commission statement against a defined compensation plan, computing expected payouts across tiers and flagging variances, risk items, and disposition recommendations.","exampleAgentPrompt":"Audit rep REP-42's Q1 2026 commission statement STMT-42 under plan PLAN-AE v2026-Q1 using FLAT_RETROACTIVE mode — they have one deal totaling $80,000 credited, a $500 bonus, a $100 clawback, and a net payout of $6,800, with a quota of $100,000 and no payout cap; use zero tolerance and tell me if the numbers match.","exampleUseCases":[{"title":"Pre-payroll commission accuracy check","prompt":"Before we run payroll this Friday, audit rep REP-101's March commission statement STMT-2024-03 against plan PLAN-ENTERPRISE v2024-Q1 — MARGINAL mode, quota $500,000, three tiers at 5%, 8%, and 12%, no payout cap, observed gross commission $42,000, bonus $2,000, clawback $500, net $43,500, tolerance 100 cents. Tell me the verdict and any risk flags."},{"title":"Post-period variance investigation","prompt":"A rep is disputing their Q4 commission — can you run an audit on statement STMT-Q4-DISPUTE for rep REP-77 under plan PLAN-SMB v2023-Q4 using FLAT_RETROACTIVE mode? Quota is $200,000, two tiers at 7% and 10%, no cap, observed gross $18,000, bonus $0, clawback $1,000, net $17,000, zero tolerance. I want to see exactly where the variance is and whether the attainment tier was applied correctly."},{"title":"Automated commission gate in agent workflow","prompt":"As part of our deal-close workflow, audit the commission for rep REP-55 on statement STMT-DEAL-789 under plan PLAN-FIELD v2026-Q2, MARGINAL payout, quota $300,000, one tier at 6%, cap $20,000, observed gross $19,000, bonus $500, clawback $0, net $19,500, tolerance 50 cents — and only proceed to payout approval if the verdict is MATCHED_WITHIN_TOLERANCE."}],"resultDescription":"Returns a structured JSON audit report including: a verdict (e.g. MATCHED_WITHIN_TOLERANCE or DISCREPANCY_FOUND), expected and observed commission figures (gross, bonus, clawback, net) in minor currency units, per-field variances, attainment basis points and achieved tier index, a tier breakdown, any risk flags, evidence gaps (e.g. unauthenticated caller-supplied facts), a recommended disposition, a claim boundary indicating whether funds were moved or payroll modified, and a cryptographic report hash and request commitment for auditability.","failureModes":["Invalid plan schema (missing required tier fields or payout mode enum) returns a 400-level validation error","Period dates in wrong format (not YYYY-MM-DD) cause schema rejection","Tier array with zero items or more than 50 items is rejected","Tolerance or payout cap values exceeding integer bounds cause schema errors","Payment of $9 USDC not included or insufficient causes 402 Payment Required response","Caller-supplied plan and statement facts are not authenticated, always returned as evidence gap CALLER_SUPPLIED_PLAN_DEAL_AND_STATEMENT_FACTS_NOT_AUTHENTICATED","Arithmetic inconsistency in observed values may produce DISCREPANCY verdict rather than an error"],"whenToPreferThis":"Use this endpoint when you need a deterministic, structured audit of a single sales representative's commission statement against a defined compensation plan — particularly when you need a cryptographically committed report hash for downstream audit trails, a machine-readable verdict for automated payroll gates, or a risk-flag list for compliance review. Prefer this over manual spreadsheet reconciliation or generic calculation services when you need tier-aware attainment computation, payout cap enforcement, and clawback handling in a single auditable call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:32:56.943Z","isFirstParty":false}