Skip to main content

Use cases

Our API provides a powerful way to interact with whop programmatically. Some common use cases include
  • I’m a company owner and I want to pull payments made only to my company. -> Use Company API keys
  • I’m a developer and I want to list memberships for any company that has installed my app. -> Use App API keys
  • I’m a developer using whop for platforms I want to retrieve payment details for payments made to a sub merchant of my platform. -> Use Company API keys of the main “platform” company.
Access to different features of our api is controlled by a fine-grained permission system, allowing you to implement strong security practices in your applications. Always make sure your api key has the required permissions enabled for your desired usage. Each endpoint will document the required permission scopes.

Company API keys

Use company api keys when you only want to fetch data, or perform actions for your own company, and or submerchant companies.
  1. Go to your developer dashboard.
  2. Click the “Create” button in the “Company API Keys” section
  3. Give your api key a name. For example “Data pipeline” or “GHL Integration”
  4. Select a role or a custom set of permissions. (You can always update this later and add more if you need)
  5. Create the api key, and copy it from the modal.

App API keys

Use app api keys when you are building an app and need to access data on companies that have installed your app.
  1. Go to your developer dashboard.
  2. Click the Create app button and give your app a name. You can change this name later.
  3. Your API key is the hidden text after WHOP_API_KEY in the Environment variables section. Use the reveal button to show the key, copy it and keep it in a safe place. You will need it to make API calls.

Making API calls

Our public api is available at https://api.whop.com/api/v1 You can test the api by using curl to fetch your public user profile data:
# replace "j" with your own whop username
curl https://api.whop.com/api/v1/users/j
To make authenticated requests you need to include your API key in the Authorization header using the Bearer scheme:
# replace "YOUR_API_KEY" with your real API key
curl https://api.whop.com/api/v1/payments?company_id=biz_xxxxxxxxxxx \
    -H "Authorization: Bearer YOUR_API_KEY"

Whop SDKs

We recommending using our SDKs to make API calls in your apps. We currently support

Example usage

Make sure your api key has the required permissions to make api calls. If building an app, see Permissions for more information.
import Whop from "@whop/sdk";

const client = new Whop({
  apiKey: process.env["WHOP_API_KEY"], // This is the default and can be omitted
  appID: "app_xxxxxxxxxxxxxx", // only required when building an app
});

const page = await client.payments.list({ company_id: "biz_xxxxxxxxxxxxxx" });
const paymentListResponse = page.data[0];

console.log(paymentListResponse.id);

MCP

You can also access the API via our mcp server available at https://mcp.whop.com/mcp (cursor) or https://mcp.whop.com/sse (claude) Learn more here