> This page is for For Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://whop.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://whop.ferndocs.com/_mcp/server.

# Manual payouts to connected accounts

> Onboard connected accounts and programmatically pay them out

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.

#### 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:

**`TypeScript`**

```typescript TypeScript
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);
```

**`Python`**

```python Python
from whop_sdk import Whop

client = Whop(
    api_key="my_api_key",
)

account_link = client.account_links.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
print(account_link.url)
```

Redirect the user to the `url` returned in the response. After completing verification, they will be redirected back to your `return_url`.

#### 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:

**`React`**

```tsx React
"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>
  );
}
```

#### Get the default payout method

List the connected account's payout methods and find the one with `is_default: true`:

**`TypeScript`**

```typescript TypeScript
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);
```

**`Python`**

```python Python
from whop_sdk import Whop

client = Whop(
    api_key="my_api_key",
)

payout_methods = client.payout_methods.list(
    company_id="biz_xxxxxxxxxxxxx",
)

default_method = next((m for m in payout_methods.data if m.is_default), None)
print(default_method.id)
```

#### Create a payout

**`TypeScript`**

```typescript TypeScript
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);
```

**`Python`**

```python Python
from whop_sdk import Whop

client = Whop(
    api_key="my_api_key",
)

withdrawal = client.withdrawals.create(
    company_id="biz_xxxxxxxxxxxxx",
    amount=100.0,
    currency="usd",
    payout_method_id="pm_xxxxxxxxxxxxx",
)

print(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.

### Cover payout fees for your connected accounts

By default, payout fees are deducted from the connected account's balance. You can choose to cover these fees from your platform balance instead by setting `platform_covers_fees` to `true`:

**`TypeScript`**

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

**`Python`**

```python Python
withdrawal = client.withdrawals.create(
    company_id="biz_xxxxxxxxxxxxx",
    amount=100.0,
    currency="usd",
    payout_method_id="pm_xxxxxxxxxxxxx",
    platform_covers_fees=True,
)
```

When `platform_covers_fees` is `true`, the payout fee will be debited from your platform's ledger account instead of the connected account's balance.

## API Reference

#### [Create Withdrawal API](/api-reference/withdrawals/create-withdrawal)

See the full API reference for creating withdrawals

## Related resources

#### [Pay connected accounts](/developer/platforms/collect-payments-for-connected-accounts)

Transfer funds to your connected accounts

#### [Render payout portal](/developer/platforms/render-payout-portal)

Let your users withdraw their funds