npx skills add ...
npx skills add whopio/whop-payments-network-skill --skill whop-payments-network
Integrate the Whop Payments Network into your platform — pay-ins, payouts, checkout, embedded components, API patterns, and webhooks.
npx skills add whopio/whop-payments-network-skill --skill whop-payments-network
Whop provides a full payments network: accept payments (pay-ins), send payouts, embed checkout and wallet components, handle webhooks, manage connected accounts, and send notifications. This skill covers the patterns you need to integrate Whop into any platform.
| Package | Purpose | Install |
|---|---|---|
@whop/sdk | Server-side API client (TypeScript) | npm install @whop/sdk |
whop-sdk | Server-side API client (Python) | pip install whop-sdk |
whop_sdk | Server-side API client (Ruby) | gem install whop_sdk |
@whop/checkout | Embedded checkout React component | npm install @whop/checkout |
@whop/embedded-components-react-js | Embedded payout/wallet/KYC/chat components (React) | npm install @whop/embedded-components-react-js |
@whop/embedded-components-vanilla-js | Embedded components (Vanilla JS) | npm install @whop/embedded-components-vanilla-js |
Base URL: https://api.whop.com/api/v1
For webhook verification, add the webhook secret:
| Type | When to use | How to get |
|---|---|---|
| Company API Key | Your own company data, connected accounts, platform operations | Dashboard > Developer > Company API Keys |
| App API Key | Access data on companies that installed your app | Dashboard > Developer > Create App > Env Vars |
| OAuth Token | Act on behalf of a specific user | OAuth 2.1 + PKCE flow |
Key config: type: "oidc", issuer: "https://api.whop.com", token_endpoint_auth_method: "none", id_token_signed_response_alg: "ES256", checks: ["pkce", "nonce"]. Profile fields: sub, name, email, picture, username.
Note: OAuth/OIDC is still marked "in development" in official docs. The NextAuth pattern works but may change.
Use Whop entities as your datastore instead of running your own database:
| Your concept | Whop entity | Store custom data via |
|---|---|---|
| User accounts | Companies | metadata on company |
| Listings / catalog items | Products | description (can store JSON) |
| Pricing / variants | Plans | plan fields + metadata |
| Purchases / bookings | Memberships | membership lookup |
This works well for marketplaces, booking platforms, and listing sites where Whop handles all transactional state.
Each vendor/creator gets a child company. Platform takes application_fee_amount on checkouts:
All payments go to the platform. Platform distributes via transfers after admin approval:
Products are the catalog layer above plans. A product has multiple plans (pricing variants).
Use
product_idto link a plan to a product.access_pass_idis a legacy alias — preferproduct_idfor new integrations.
All .list() methods return async iterators:
Create a plan, redirect to plan.purchase_url. Sandbox: https://sandbox.whop.com/checkout/{plan.id}.
Server — create checkout configuration:
Client — render embed:
In production, redirect_url must be HTTPS. Localhost (HTTP) works in sandbox but will be rejected in production.
Or use planId directly (no server config needed):
Aggregate cart total into one checkout, serialize items in metadata.cart:
See references/checkout-embed.md for full prop reference, programmatic controls, and sandbox testing.
await client.ledgerAccounts.retrieve("biz_xxx") — returns balances, KYC status, payments_approval_status.Before you can send transfers to connected accounts, your platform needs a positive balance. Use the Top-ups API to add funds by charging a saved payment method. Top-ups have no fees.
Three ways money enters a platform:
application_fee_amount. Money flows through checkout.transfers.create().See Add funds to your balance for full guide.
See references/payouts.md for hosted payouts, embedded wallet components, and the interactive playground.
Setup: Dashboard > Developer > Create Webhook > select events > provide URL.
See references/webhooks.md for all events, company vs app webhooks, and validation.
Send push notifications to users with deep linking:
Embed real-time chat via ChatElement inside ChatSession + Elements wrappers. See references/chat-sdk.md for React, Vanilla JS, and Swift examples.
transfers.create({ amount: 4500 }) = $45.00, but withdrawals.create({ amount: 45 }) = $45.00.application_fee_amount must be > 0 AND < total price — zero or equal-to-total will error.event field, not type — The webhook body uses event as the key. Some docs incorrectly show type.membership_went_valid instead of membership.went.valid. Normalize with .replace(/_/g, ".").returnUrl is required for external payment methods — Apple Pay, Google Pay, PayPal redirects fail without it.btoa(process.env.WHOP_WEBHOOK_SECRET) to SDK's webhookKey.waitUntil() or background jobs for heavy processing.(client.companies as any).update(id, { metadata }).appID.purchase_url and plan.id — Use these for redirect flows or plan references.https://sandbox.whop.com/checkout/{planId}.setupFutureUsage: "off_session" — Required on checkout embed when you plan to charge the user later via chargeUser API.403 until the company re-approves..id when consuming the full list.Apps must request permissions before accessing company data. Each API endpoint has required scopes.
Setup: Dashboard > Developer > App > Permissions tab > Add permissions with justification > Install app > Approve.
When updating permissions, creators see a "Re-approve" button. Handle 403 errors gracefully until re-approved.
| Transport | URL |
|---|---|
| HTTP Streaming (Cursor) | https://mcp.whop.com/mcp |
| SSE (Claude) | https://mcp.whop.com/sse |
| Docs MCP | https://docs.whop.com/mcp |
| File | Contents |
|---|---|
references/checkout-embed.md | Full prop reference, programmatic controls, Vanilla JS, sandbox, Apple Pay |
references/payouts.md | Embedded wallet components, hosted payouts, account links, playground |
references/chat-sdk.md | Chat SDK for React, Vanilla JS, Swift with full examples |
references/api-reference.md | SDK initialization, key endpoints, MCP server setup |
references/webhooks.md | Webhook events, validation, company vs app webhooks |
codebase-scan.md | Prompt to analyze a client's codebase for Whop integration planning |