Skip to main content

Getting your API key

  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/pay_xxxxxxxxxxxxxx \
    -H "Authorization: Bearer YOUR_API_KEY"

Using an SDK

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

Example usage

Make sure you app has the required permissions to make api calls. See Permissions for more information.
import Whop from "@whop/sdk";

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

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

console.log(paymentListResponse.id);
I