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

# Collect payments for connected accounts

> Direct charges and transfers for connected accounts

There are two ways to collect payments for connected accounts:

1. **Direct charges**: Create a checkout for the connected account and collect an application fee.
2. **Transfers**: Collect payment to your platform account and transfer funds to connected accounts later.

## Direct charges

Create a checkout configuration with a connected account's company ID to charge customers directly on the connected account. The connected account is responsible for Whop fees, refunds, and disputes.

### How it works

1. Create a checkout configuration for your connected account with an `application_fee_amount`
2. When a customer purchases, the charge is created directly on the connected account
3. Your platform collects the application fee, and the remaining amount goes to the connected account
4. The connected account handles any disputes or refunds for the transaction

### Example

**`TypeScript`**

```typescript TypeScript
import Whop from "@whop/sdk";

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

const checkoutConfig = await client.checkoutConfigurations.create({
	company_id: "biz_xxxxxxxxxxxxx", // Connected account's company ID
	plan: {
		initial_price: 10.0,
		plan_type: "one_time",
		application_fee_amount: 1.23,
	},
});

console.log(checkoutConfig.purchase_url);
```

**`Python`**

```python Python
from whop_sdk import Whop

client = Whop(
    api_key="my_api_key",
)

checkout_config = client.checkout_configurations.create(
    company_id="biz_xxxxxxxxxxxxx",  # Connected account's company ID
    plan={
        "initial_price": 10.0,
        "plan_type": "one_time",
        "application_fee_amount": 1.23,
    },
)

print(checkout_config.purchase_url)
```

In this example:

* `company_id` is the connected account's company ID where the charge will be created
* `plan.initial_price` is the total payment amount (10.00 USD)
* `plan.application_fee_amount` is the fee your platform collects (1.23 USD)
* The connected account receives 8.77 USD (10.00 - 1.23)

### Limitations

* The `application_fee_amount` must be positive and less than the total payment amount
* The application fee collected is capped at the captured amount of the payment

## Transfers

Use transfers when your platform collects the payment first, or when your backend decides how much and when each connected account should be paid.

### Before you transfer

* **Origin company**: the company sending funds must complete KYC and have enough balance for the transfer. You can top up the balance from the dashboard or via [Add funds to your balance](/developer/platforms/add-funds-to-your-balance).
* **Destination company**: the recipient must already have a Whop company. If they do not, onboard them first with [Enroll connected accounts](/developer/platforms/enroll-connected-accounts).
* **Settlement ownership**: with transfers, your platform is the merchant of record for the original payment. Your platform handles fees, disputes, and refunds on that payment.

### Example

Collect payment to your platform company, then transfer the connected account's share:

**`TypeScript`**

```typescript TypeScript
import Whop from "@whop/sdk";

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

const transfer = await client.transfers.create({
	amount: 90.0,
	currency: "usd",
	origin_id: "biz_yyyyyyyyyyyyy", // Platform's company ID
	destination_id: "biz_xxxxxxxxxxxxx", // Connected account's company ID
	metadata: {
		order_id: "order_12345",
	},
});

console.log(transfer.id);
```

**`Python`**

```python Python
from whop_sdk import Whop

client = Whop(
    api_key="my_api_key",
)

transfer = client.transfers.create(
    amount=90.0,
    currency="usd",
    origin_id="biz_yyyyyyyyyyyyy",  # Platform's company ID
    destination_id="biz_xxxxxxxxxxxxx",  # Connected account's company ID
    metadata={
        "order_id": "order_12345",
    },
)

print(transfer.id)
```

In this example:

* `origin_id` is your platform's company ID (where funds are deducted from)
* `destination_id` is the connected account's company ID (where funds are credited to)
* `amount` is the amount to transfer
* `metadata` stores custom data for your reference

### Handle transfer failures

Transfers fail if the origin company is not verified, the origin balance is too low, or the destination company cannot receive funds yet. Fix the underlying cause before retrying. Do not blindly retry failed transfers.

### Common uses

* Scheduled creator payouts
* Affiliate payouts
* Marketplace splits after an order settles

## Which flow should I use?

|              | Direct charges                     | Transfers                 |
| ------------ | ---------------------------------- | ------------------------- |
| **Fees**     | Connected account pays Whop fees   | Platform pays Whop fees   |
| **Disputes** | Connected account handles disputes | Platform handles disputes |
| **Refunds**  | Connected account handles refunds  | Platform handles refunds  |

Use transfers when your backend controls payout timing and amount. Use direct charges when the connected account should own fees, disputes, and refunds from the original purchase.

## API Reference

#### [Create Checkout Configuration](/api-reference/checkout-configurations/create-checkout-configuration)

Create checkout configurations with application fees

#### [Create Transfer](/api-reference/transfers/create-transfer)

Transfer funds between accounts

## Related resources

#### [Accept payments](/developer/guides/accept-payments)

Learn about checkout links and embedded checkout

#### [Enroll connected accounts](/developer/platforms/enroll-connected-accounts)

Create recipient companies and finish onboarding before paying them