Skip to main content
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

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

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);
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

Alternatively, collect payment to your platform account and transfer funds to connected accounts after the fact:
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);
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

Which flow should I use?

Direct chargesTransfers
FeesConnected account pays Whop feesPlatform pays Whop fees
DisputesConnected account handles disputesPlatform handles disputes
RefundsConnected account handles refundsPlatform handles refunds

API Reference