Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.whop.com/llms.txt

Use this file to discover all available pages before exploring further.

To enroll a connected account on your platform, create a Company object for them under your platform company. That company can then accept direct charges, receive transfers, and use Whop payout flows.

Example

Create a company for the connected account:
import Whop from "@whop/sdk";

const client = new Whop({
	apiKey: "Company API Key",
});

const company = await client.companies.create({
	email: "merchant@example.com",
	parent_company_id: "biz_xxxxxxxxxxxxx",
	title: "Acme Merchant Store",
	metadata: {
		internal_user_id: "user_12345",
		seller_tier: "gold",
	},
});

console.log(company.id);
In this example:
  • email is the connected account’s email address. This is used to identify the connected account and send them important notifications about their account.
  • parent_company_id is your platform’s company ID (the parent company)
  • title is the display name for the connected account. This is required.
  • metadata contains custom key-value pairs:
    • internal_user_id: Your platform’s internal identifier for this connected account
    • seller_tier: A classification or tier level for the connected account (e.g., “bronze”, “silver”, “gold”)
  • The response includes a company.id that you can use to reference this connected account in future API calls
The email address should belong to the connected account (business or individual) who will be managing the account. This person will receive account setup and payment notifications.

Finish onboarding

If the recipient does not already have a Whop company, send them an account onboarding link after you create the company. They complete KYC through that link, and then the company can receive transfers and other payout flows.
const accountLink = await client.accountLinks.create({
	company_id: company.id,
	refresh_url: "https://yourapp.com/onboarding/refresh",
	return_url: "https://yourapp.com/onboarding/complete",
	use_case: "account_onboarding",
});

console.log(accountLink.url);
After the recipient completes onboarding, you can:
  • create checkout flows for them with application fees.
  • transfer funds to their company balance.
  • let them withdraw funds with the payout portal.

Getting started

Before you can enroll connected accounts, you need to set up your platform account:
  1. Sign up for a platform account: Create a Company account at whop.com/dashboard
  2. Generate a Company API key: Go to your developer settings page and generate a Company API key
  3. Use the API key for authentication: This API key is how you authenticate with the Whop API and control your connected accounts
The Company API key provides the necessary permissions to create and manage connected accounts (companies) under your platform account.

Custom metadata

You can attach custom metadata to companies when creating them. Metadata allows you to store additional information about each connected account as key-value pairs. This is useful for:
  • Storing your internal user or merchant identifiers
  • Tracking connected account tiers or classifications
  • Linking to your platform’s database records
Metadata is stored on the Company object and can be retrieved later for reporting, filtering, or integration purposes.

API Reference

Create Company API

See the full API reference for creating companies and all available parameters

Next steps

After creating a Company for a connected account:

Collect and split payments

Choose between direct charges and transfers

Render payout portal

Let connected accounts withdraw their funds