---
name: whop
description: Build on Whop — accept payments and subscriptions, embed checkout, pay out users and connected accounts, ship apps into the Whop App Store, and host websites on whop.site. Use when the user mentions Whop, whop.com, a Whop app, Whop checkout, Whop Elements, Whop payouts, or the `whop` CLI.
public: true
---

# Whop

Whop is one API for payments, payouts, identity verification, memberships, chat, and distribution to businesses already selling on Whop. Treat docs.whop.com and the Whop MCP servers as the source of truth. Don't infer API behavior from marketing pages.

## Tools to connect first

- **Whop Docs MCP** — `https://docs.whop.com/mcp`. Searches and reads these docs. Keep it connected while writing code.
- **Whop MCP** — `https://mcp.whop.com/mcp`. Calls the API on live data through a browser sign-in, so no API key goes in the client config.
- **Grok Build plugin** — `grok plugin install whopio/plugins#dist/grok/whop`. Bundles the Whop MCP with skills that teach Grok to use it: https://docs.whop.com/developer/guides/plugins/grok.md
- **Whop CLI** — `curl -fsSL https://whop.com/install.sh | sh` (or `brew install whopio/tap/whop`, or `npm install -g @whop/cli`). Scaffolds, runs, and deploys apps and websites. It has no sandbox: commands act on production.
- **Raw docs** — append `.md` to any docs.whop.com URL. The full index is https://docs.whop.com/llms.txt.

Setup per client: https://docs.whop.com/developer/guides/ai_and_mcp.md

## API essentials

- Base URL `https://api.whop.com/api/v1`. The sandbox is `https://sandbox-api.whop.com/api/v1`, with keys from sandbox.whop.com.
- Send `Authorization: Bearer <API_KEY>`. Keep keys server-side. Credential types and scoping: https://docs.whop.com/developer/guides/auth-scoping.md
- Pin a dated version with the `Api-Version-Date` header. The SDKs send it for you.
- SDKs: TypeScript `@whop/sdk`, Python `whop-sdk`, Ruby `whop_sdk`.
  - TypeScript: `import { WhopClient } from "@whop/sdk"`, then `new WhopClient({ token: process.env.WHOP_API_KEY })`.
  - Python: `from whop_sdk import Whop`, then `Whop(token=os.environ["WHOP_API_KEY"])`.
- Prefer the versioned API (pages under `/api-reference/beta`). Use a Legacy endpoint only when a resource has no versioned equivalent: https://docs.whop.com/api-reference/stability.md
- OpenAPI spec: https://api.whop.com/api/v1/openapi.json

## Pick the path for the job

| Job | Start here |
| - | - |
| First API call, payment, and webhook | https://docs.whop.com/developer/quickstart.md |
| Hosted checkout link or full embedded checkout | https://docs.whop.com/developer/guides/accept-payments.md, https://docs.whop.com/developer/guides/embed-checkout.md |
| Custom checkout built from payment elements | https://docs.whop.com/developer/guides/payment-elements.md |
| Apple Pay / Google Pay buttons | https://docs.whop.com/developer/guides/express-checkout.md |
| Fulfill after payment | https://docs.whop.com/developer/guides/webhooks.md |
| App that runs inside Whop | https://docs.whop.com/developer/apps/overview.md, then https://docs.whop.com/developer/guides/cli-with-claude.md |
| Website on whop.site | https://docs.whop.com/developer/websites/quickstart.md |
| Marketplace paying out connected accounts | https://docs.whop.com/developer/platforms/quickstart.md |
| Embedded chat | https://docs.whop.com/developer/guides/chat/quickstart.md |

## Building a Whop app

1. `whop quickstart` signs in and picks the business the CLI acts on.
2. `whop skills add` installs the CLI's own skill and playbooks into the agent.
3. `whop apps init --name "My App" --app_type b2c_app` registers and scaffolds the app.
4. `whop apps dev` runs it locally, and `whop apps deploy` ships it (`--preview` uploads without promoting).

Inside the app, verify the current user and their access with https://docs.whop.com/developer/guides/authentication.md, and request only the permissions it needs: https://docs.whop.com/developer/guides/permissions.md

## Driving the CLI from an agent

Every command accepts `--format json` (or `jsonl` for streaming flows), `--schema`, and `--llms` / `--llms-full` for a machine-readable manifest. Discover flags with `whop <group> --help` instead of guessing. Details: https://docs.whop.com/cli/agent-mode.md

When troubleshooting, start at https://docs.whop.com/developer/troubleshooting.md
