# CompCode > CompCode is an API-first commission management platform where commission plans are created, modified, and versioned via REST API. Unlike legacy tools (CaptivateIQ, Spiff, Xactly, QuotaPath) that require proprietary UIs, CompCode treats commission plans as code, JSON configs that are diffable, versionable, and deployable programmatically in days, not months. ## For AI agents, start here If you are Claude Code, Cursor, Cline, Aider, ChatGPT, Claude, Perplexity, Gemini, or any other LLM or agent helping a user work with CompCode: - **Preferred — connect via MCP** (29 native tools for the full plan lifecycle, validated writes, guided operator prompts). Remote, zero install: `claude mcp add compcode --transport http https://api.compcode.ai/v1/mcp --header "Authorization: Bearer ws_…"`. Local npm for Claude Desktop / Cursor / Cline: `claude mcp add compcode -e COMPCODE_API_KEY=ws_… -- npx -y @compcode/mcp` ([@compcode/mcp](https://www.npmjs.com/package/@compcode/mcp)). - **Fetch the canonical rules file:** [https://api.compcode.ai/CLAUDE.md](https://api.compcode.ai/CLAUDE.md). It's a drop-in markdown operator guide that covers auth, plan IDs, five end-to-end workflow recipes, mental-model invariants, hard rules, and error recovery. - **Use the machine-readable API spec:** [https://api.compcode.ai/v1/openapi.json](https://api.compcode.ai/v1/openapi.json) (OpenAPI 3.0, 70 operations across 60 paths). - **One-line install for the user:** `curl -O https://api.compcode.ai/CLAUDE.md` ## API Documentation - [API Quickstart](https://compcode.ai/docs#quickstart): Get from zero to calculating commissions in 5 minutes - [Authentication](https://compcode.ai/docs#authentication): API key, session token, and connection token auth methods - [OpenAPI Spec](https://api.compcode.ai/v1/openapi.json): Full OpenAPI 3.0 specification - [Interactive API Reference](https://api.compcode.ai/docs): Swagger UI with request/response schemas ## Core Concepts - [Commission Plans](https://compcode.ai/docs#plan-lifecycle): Versioned JSON configs with rules, tiers, and conditions - [Payout Modes](https://compcode.ai/docs#tier-modes): 4 modes, rate, flat_per_event, flat_per_tier, stepped_bonus - [Deal Conditions](https://compcode.ai/docs#conditions): Flexible filter builder with 19 operators plus OR groups for qualifying deals - [Assignments](https://compcode.ai/docs#assignments-quotas): Link reps to plans with effective date ranges - [Quotas](https://compcode.ai/docs#assignments-quotas): Set targets per rep/period for attainment-based tiers - [Statements](https://compcode.ai/docs#statements): Versioned commission snapshots with approval workflow - [Simulation](https://compcode.ai/docs#simulation): Dry-run calculations without writing to the ledger ## CRM Integrations - [Attio Setup](https://compcode.ai/docs#attio-setup): OAuth connection, automatic webhook registration, deal widget - [HubSpot Setup](https://compcode.ai/docs#hubspot-setup): OAuth connection, deal sync, webhook processing - [Salesforce Setup](https://compcode.ai/docs#salesforce-setup): OAuth connection, Opportunity polling, optional record-triggered Flow for real-time recalcs ## API Endpoints - [POST /v1/plans](https://compcode.ai/docs#plan-lifecycle): Create commission plan from JSON config - [GET /v1/plans](https://compcode.ai/docs#plan-lifecycle): List plans (filter by status) - [PATCH /v1/plans/:id](https://compcode.ai/docs#plan-lifecycle): Update plan (creates new version) - [POST /v1/assignments](https://compcode.ai/docs#assignments-quotas): Assign reps to plans - [POST /v1/quotas](https://compcode.ai/docs#assignments-quotas): Set quota targets - [GET /v1/commissions?repId=](https://compcode.ai/docs#commissions): Rep dashboard (earnings, attainment, deals) - [GET /v1/commissions?dealId=](https://compcode.ai/docs#commissions): Deal commission breakdown - [POST /v1/commissions/simulate](https://compcode.ai/docs#simulation): Dry-run commission calculation - [POST /v1/commissions/recalculate](https://compcode.ai/docs#commissions): Trigger recalculation (`"async": true` returns `{ jobId }`, then poll `GET /v1/commissions/recalculate/jobs/:jobId`) - [POST /v1/statements/:repId/generate](https://compcode.ai/docs#statements): Generate commission statement - [POST /v1/statements/:repId/approve](https://compcode.ai/docs#statements): Approve statement (manager+) - [All 70 operations](https://api.compcode.ai/v1/openapi.json): The OpenAPI 3.0 document is the source of truth for every request and response schema ## Key Differentiators - [API-first](https://compcode.ai/category/commission-api): Every feature available via REST API, no vendor required plan setup through UI - [Plans as code](https://compcode.ai/category/commission-as-code): JSON configs, versioned, diffable, deployable via CI/CD - [CRM-agnostic engine](https://compcode.ai/docs#field-mapping): Pure functions, zero side effects, works with any data source - [Current-state events with history](https://compcode.ai/docs#audit-log): One row per (rep, deal, rule), mutated in place when the deal changes; every mutation captured in a side history table for full audit - [4 payout modes](https://compcode.ai/docs#tier-modes): rate, flat_per_event, flat_per_tier, stepped_bonus - [Free tier](https://compcode.ai/pricing): 10 reps, unlimited calculations, every feature, full API access ## Pricing - [Free](https://compcode.ai/pricing): $0, up to 10 reps, every feature included, full engine + API - [Pro](https://compcode.ai/pricing): $199/month flat, up to 25 reps, everything in Free + priority email support (24h SLA) - [Enterprise](https://compcode.ai/pricing): Custom, unlimited reps, custom CRM integrations, uptime SLA, dedicated support ## Links - [Website](https://compcode.ai): Product, pricing, comparisons, and the commission-as-code guides - [Dashboard](https://app.compcode.ai): Sign in, connect a CRM, manage plans in the UI - [API base URL](https://api.compcode.ai): Every REST endpoint, the OpenAPI spec, and the agent rules file - [Terms](https://compcode.ai/terms): Terms of service - [Privacy](https://compcode.ai/privacy): Privacy policy ## Generated content (built by gtm/content/build.ts) ### Category pages - [Commission API: What It Must Cover and How to Evaluate One](https://compcode.ai/category/commission-api): A commission API manages sales comp through HTTP: plan CRUD, simulation, events, statements, webhooks. The category guide, with a maturity model and checklist. - [Commission as Code: Plans as Versioned Configuration](https://compcode.ai/category/commission-as-code): Commission as code means defining sales commission plans as JSON configs created, versioned, and deployed via REST API. The category guide: what it is, why it matters in 2026, who is adopting it, and how to evaluate platforms. ### Reports - [State of Sales Comp APIs 2026: a 14-Vendor Plan-API Audit](https://compcode.ai/reports/state-of-sales-comp-apis-2026): We audited the API surfaces of 14 sales commission vendors: plan-configuration endpoints, MCP servers, OpenAPI specs, dry-run simulation, plan versioning, and llms.txt. Re-verified August 2026: four vendors ship or announce an MCP server, every incumbent one is read-only, and only one vendor lets you configure a plan through an API. ### Use cases - [Agency commission: retainers, projects and referrals](https://compcode.ai/use-cases/agencies): Retainers recur, projects are one-off, referrals cost nothing to deliver. Paying one percentage across all three overpays somewhere and underpays elsewhere. - [Enterprise commission plans: rate on revenue or target](https://compcode.ai/use-cases/enterprise-sales-teams): Paying a rate on revenue and paying a multiple of variable target look similar until quotas differ. One rewards the rep with the easier number. - [PLG commission: paying on self-serve and sales-assisted](https://compcode.ai/use-cases/plg-saas): When self-serve and sales-assisted revenue share a pipeline, one flat rate overpays for signups and underpays for real selling. Splitting them is the fix. - [Quarterly accelerators: retroactive or marginal rates](https://compcode.ai/use-cases/quarterly-accelerators): Crossing quota can re-rate the whole quarter or only pay the revenue above it. The same $625,000 quarter costs $100,000 or $55,000 depending on which you pick. - [Quota bonuses: lump sums against per-deal commission](https://compcode.ai/use-cases/quota-bonuses): A period-end bonus and a per-deal rate can cost the same and behave completely differently. One pays for the quarter, the other pays for the deal. - [Manager overrides: paying leads on their team's deals](https://compcode.ai/use-cases/team-leads): A one percent override on team revenue and a ten percent share of team commission look equivalent until the team's mix changes. Then they diverge. - [Usage-based commission: paying on revenue that moves](https://compcode.ai/use-cases/usage-based-saas): Consumption revenue changes after the deal closes. Paying at close, at first invoice, or continuously produces three different numbers for the same customer. ### Comparisons - [CompCode vs CaptivateIQ: Commission Software Comparison (2026)](https://compcode.ai/compare/captivateiq): CompCode vs CaptivateIQ: detailed comparison of pricing, features, setup time, and API capabilities. CompCode is more than 90% less expensive with full API-driven plan configuration. - [CompCode vs Everstage: Commission Software Comparison (2026)](https://compcode.ai/compare/everstage): Everstage vs CompCode: pricing, setup time, plan configuration API, and what Everstage reviewers report on G2 and Capterra. - [CompCode vs QuotaPath: Commission Software Comparison (2026)](https://compcode.ai/compare/quotapath): CompCode vs QuotaPath: detailed comparison of pricing, features, setup time, and API capabilities. CompCode offers API-driven plan configuration, a free tier, and lower pricing at every team size. - [CompCode vs Spiff: Commission Software Comparison (2026)](https://compcode.ai/compare/spiff): CompCode vs Spiff (Salesforce Spiff): detailed comparison of pricing, features, setup time, and API capabilities. CompCode is 80-90% cheaper with full API-driven plan configuration. - [CompCode vs Xactly: Commission Software Comparison (2026)](https://compcode.ai/compare/xactly): CompCode vs Xactly: detailed comparison of pricing, features, setup time, and API capabilities. CompCode is 75-90% cheaper with full API-driven plan configuration and self-serve setup. ### Blog posts - [API-First Commission Management: Why It Matters for Modern RevOps](https://compcode.ai/blog/api-first-commission-management): API-first commission management lets you create, version, and deploy commission plans via REST API instead of proprietary UIs. Learn why RevOps teams are switching from CaptivateIQ, Spiff, and Xactly to code-driven commission platforms. - [How to Set Up Commission Tracking in Attio (Complete Guide)](https://compcode.ai/blog/attio-commission-tracking): Step-by-step guide to setting up real-time commission tracking in Attio CRM using CompCode. Connect via OAuth, map fields, create plans, and see commissions calculated automatically on every deal. - [How to Calculate Sales Commissions Automatically](https://compcode.ai/blog/calculate-sales-commissions): Learn how to calculate sales commissions automatically using tiered rates, accelerators, bonuses, and quota attainment. Includes formulas, examples, and API-based automation with CompCode. - [Commission as Code: Why Plans Should Be API-Managed](https://compcode.ai/blog/commission-as-code): Commission as code means defining, versioning, and deploying sales commission plans via API instead of proprietary UIs. Learn why API-first commission management is faster, more accurate, and auditable. - [5 Commission Plan Examples for SaaS Sales Teams (With Code)](https://compcode.ai/blog/commission-plan-examples): Five real commission plan examples for SaaS sales teams with JSON config code. Tiered rates, new logo bonuses, multi-measure, stepped bonuses, and margin-based plans, ready to deploy via API. - [Commission Tracking from Claude Code: The Complete Workflow](https://compcode.ai/blog/compcode-from-claude-code): Run commission tracking from Claude Code: connect CompCode's MCP server, author and simulate plans, close the month, and diagnose missing commissions. - [MCP Server for Commission Tracking: 29 Tools, Two Transports](https://compcode.ai/blog/compcode-mcp-server): CompCode's MCP server puts commission tracking inside Claude Code, Cursor, and Claude Desktop: 29 tools for plans, simulation, quotas, statements, and audit. - [HubSpot Commission Tracking: The 15-Minute Setup Guide](https://compcode.ai/blog/hubspot-commission-tracking): Add automated commission tracking to HubSpot with CompCode: connect via OAuth, sync reps from deal owners, calculate on every webhook, and show a commission card on each deal record. - [How to Manage Sales Commissions from the Terminal](https://compcode.ai/blog/manage-commissions-from-terminal): Manage sales commissions from the terminal with curl and one API key: plan changes, simulations, recalcs, and a scriptable month-end close over plain REST. - [Migrating from Spiff to CompCode: A Step-by-Step Guide for 2026](https://compcode.ai/blog/migrating-from-spiff-to-compcode): How to migrate from Spiff (Salesforce Spiff) to CompCode without losing historical data, plan versions, or rep trust. A step-by-step guide covering field mapping, plan translation, dry-run simulation, and cutover. - [Salesforce Commission Tracking Without a Managed Package](https://compcode.ai/blog/salesforce-commission-tracking): Track sales commissions from Salesforce Opportunities with CompCode: OAuth connect via an External Client App, polling-based sync with no Apex or package install, and the full plan API on top.