Skip to main content
Send payouts directly to your connected accounts from your platform balance. Connected accounts must complete identity verification and add a payout method before they can receive funds.
1

Complete KYC verification

Before a user can receive payouts, they must complete identity verification (KYC). Use the hosted account onboarding flow to guide users through this process:
import Whop from "@whop/sdk";

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

const accountLink = await client.accountLinks.create({
  company_id: "biz_xxxxxxxxxxxxx",
  use_case: "account_onboarding",
  return_url: "https://yourapp.com/onboarding/complete",
  refresh_url: "https://yourapp.com/onboarding/refresh",
});

// Redirect the user to complete KYC
console.log(accountLink.url);
Redirect the user to the url returned in the response. After completing verification, they will be redirected back to your return_url.
2

Add a payout method

Before creating a payout, the account needs a payout method. Use the embedded component to let users add a payout method:
"use client";

import {
  Elements,
  PayoutsSession,
  PayoutMethodElement,
} from "@whop/embedded-components-react-js";
import { loadWhopElements } from "@whop/embedded-components-vanilla-js";

const elements = loadWhopElements();

export function AddPayoutMethod({ companyId }: { companyId: string }) {
  return (
    <Elements elements={elements}>
      <PayoutsSession
        token={() =>
          fetch(`/api/token?companyId=${companyId}`)
            .then((res) => res.json())
            .then((data) => data.token)
        }
        companyId={companyId}
        redirectUrl="https://yourapp.com/verification-complete"
      >
        <PayoutMethodElement fallback={<div>Loading...</div>} />
      </PayoutsSession>
    </Elements>
  );
}
3

Get the default payout method

List the connected account’s payout methods and find the one with is_default: true:
import Whop from "@whop/sdk";

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

const payoutMethods = await client.payoutMethods.list({
  company_id: "biz_xxxxxxxxxxxxx",
});

const defaultMethod = payoutMethods.data.find((method) => method.is_default);
console.log(defaultMethod.id);
4

Create a payout

import Whop from "@whop/sdk";

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

const withdrawal = await client.withdrawals.create({
  company_id: "biz_xxxxxxxxxxxxx",
  amount: 100.0,
  currency: "usd",
  payout_method_id: "pm_xxxxxxxxxxxxx",
});

console.log(withdrawal.id);
In this example:
  • company_id is the connected account to pay out
  • amount is the payout amount (100.00 USD) - fees will be deducted from this amount
  • currency is the ISO currency code
  • payout_method_id is the ID of the payout method to use (from step 3)
The request will return an error if the amount exceeds the available balance.

API Reference

Create Withdrawal API

See the full API reference for creating withdrawals