whop
Installation
SKILL.md
Whop
Pick the right Whop skill for the user's goal, after checking what the project already has. Every whop-* skill is optional: when one isn't installed, use the docs page in its row instead.
Inspect the project first
Look before asking. These answers decide which skill applies and how its code must look.
- Language and Whop packages.
package.jsonand the lockfile (@whop/sdk,@whop/elements-react,@whop/elements),requirements.txtorpyproject.toml(whop-sdk),Gemfile(whop_sdk). Note the installed@whop/sdkversion:node_modules/@whop/sdk/package.json. - Old Whop code. The
@whop/apipackage,@whop/sdkbelow 2.0, a client built from aWhopclass instead ofWhopClient, calls onplansorcompanies,company_id, orapi/v2URLs mean the code predates the current API. Fix that first withwhop-migrate; don't add new code on top. - Another processor.
stripe,@stripe/,paddle,lemonsqueezyand the like. Only move it to Whop if the user asks (whop-migrate). - Framework and server boundary. Where server code runs (API routes, server actions, a backend folder), so keys and webhook handlers go there.
- Environment. Env var names (
WHOP_API_KEY,WHOP_WEBHOOK_SECRET,WHOP_ENVIRONMENT) and whether the client targets sandbox (WhopEnvironment.Sandbox,sandbox-api.whop.com) or production. Read names, never print values. - Existing Whop code. Search for
WhopClient,unwrapWebhook,purchase_url,checkAccessandwebhooks/whoproutes. Extend what's there rather than adding a second client or handler.
The installed SDK is the source of truth for names on that version: node_modules/@whop/sdk/reference.md documents every method. It is long, so search it for the method you need (grep -n "checkAccess") instead of reading it whole. Your memory of the Whop API is likely out of date; prefer the docs and the installed types.