# 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: - **Fetch the canonical rules file:** [https://compcode.ai/CLAUDE.md](https://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://app.compcode.ai/api/openapi.json](https://app.compcode.ai/api/openapi.json) (OpenAPI 3.0, 61 endpoints). - **One-line install for the user:** `curl -O https://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://app.compcode.ai/api-docs/openapi.json): Full OpenAPI 3.0 specification - [Interactive API Reference](https://app.compcode.ai/api-docs): Swagger UI with request/response schemas ## Core Concepts - [Commission Plans](https://compcode.ai/docs#plans): Versioned JSON configs with rules, tiers, and conditions - [Payout Modes](https://compcode.ai/docs#payout-modes): 4 modes, rate, flat_per_event, flat_per_tier, stepped_bonus - [Deal Conditions](https://compcode.ai/docs#conditions): Flexible filter builder with 18 operators for qualifying deals - [Assignments](https://compcode.ai/docs#assignments): Link reps to plans with effective date ranges - [Quotas](https://compcode.ai/docs#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 ## API Endpoints - `POST /api/plans`, Create commission plan from JSON config - `GET /api/plans`, List plans (filter by status) - `PATCH /api/plans/:id`, Update plan (creates new version) - `POST /api/assignments`, Assign reps to plans - `POST /api/quotas`, Set quota targets - `GET /api/commissions?repId=`, Rep dashboard (earnings, attainment, deals) - `GET /api/commissions?dealId=`, Deal commission breakdown - `POST /api/commissions/simulate`, Dry-run commission calculation - `POST /api/commissions/recalculate`, Trigger recalculation - `POST /api/statements/:repId/generate`, Generate commission statement - `POST /api/statements/:repId/approve`, Approve statement (manager+) ## Key Differentiators - **API-first**: Every feature available via REST API, no vendor required plan setup through UI - **Plans as code**: JSON configs, versioned, diffable, deployable via CI/CD - **CRM-agnostic engine**: Pure functions, zero side effects, works with any data source - **Current-state events with history**: 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**: rate, flat_per_event, flat_per_tier, stepped_bonus - **Free tier**: 10 reps, 500 calculations/month, full API access ## Pricing - **Free**: $0, 10 reps, 500 calcs/month, full engine + API - **Pro**: $15/rep/month, unlimited calcs, statements, dashboard, clawbacks - **Enterprise**: Custom, unlimited reps, SSO, ASC 606, dedicated support ## Links - Website: https://compcode.ai - Dashboard: https://app.compcode.ai - API Base URL: https://app.compcode.ai - Terms: https://compcode.ai/terms - Privacy: https://compcode.ai/privacy ## Generated content (built by gtm/content/build.ts) ### Category pages - [Commission as Code](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. ### 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 60-90% less expensive with full API-driven plan configuration. - [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 60-75% 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 Explained: Why Your Commission 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. - [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.