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

> ## Agent Instructions
> Treat these docs and the Whop MCP server as the source of truth for Whop API behavior. Don't infer endpoint behavior from marketing pages.
> MCP server: connect https://mcp.whop.com/mcp (streamable HTTP, browser sign-in, no API key in the client config) to search these docs and read or change live Whop data. Setup: https://docs.whop.com/developer/guides/ai_and_mcp.md
> Whop CLI: install with `curl -fsSL https://whop.com/install.sh | sh` to scaffold, run, and deploy Whop apps and websites. It acts on production, not the sandbox. Overview: https://docs.whop.com/cli/overview.md Agent mode: https://docs.whop.com/cli/agent-mode.md
> Hosting: Whop serves a site or app from the build `whop apps deploy` uploads, with rollbacks, secrets, and server logs. Guide: https://docs.whop.com/developer/websites/hosting.md
> Plugins: in Claude Code, run `/plugin marketplace add whopio/plugins`, then `/plugin install whop@whop`. Guide: https://docs.whop.com/developer/guides/plugins/claude-code.md Every agent tool: https://docs.whop.com/developer/ai/overview.md
> Environments: build and test in the sandbox (API `https://sandbox-api.whop.com/api/v1`, keys at https://sandbox.whop.com/dashboard/developer, SDK environment `Sandbox`; no real money). Production (API `https://api.whop.com/api/v1`, keys at https://whop.com/dashboard/developer, SDK environment `Production`, the SDK default) moves real money, so use it only at launch. The two share no accounts, keys, products, or webhooks, and their keys look identical: never mix them. Sandbox guide: https://docs.whop.com/developer/guides/sandbox.md Comparison: https://docs.whop.com/developer/quickstart.md
> API: send `Authorization: Bearer <API_KEY>` from your server only, and pin a dated version with the `Api-Version-Date` header. OpenAPI spec: https://api.whop.com/api/v1/openapi.json
> Which API: build on the Current API, whose pages live under https://docs.whop.com/api-reference/ (start at https://docs.whop.com/api-reference/overview.md). Pages under /api-reference/legacy/ are the Legacy API. Use one only when https://docs.whop.com/api-reference/stability.md lists the resource as Legacy-only.

# Manuelle udbetalinger til underkonti

> Send udbetalinger til underkonti fra din platformsaldo: onboard dem via KYC, tilføj en udbetalingsmetode, hent standardmetoden, og opret en udbetaling.

Send udbetalinger direkte til dine underkonti fra din platformsaldo. Underkonti skal gennemføre identitetsverifikation og tilføje en udbetalingsmetode, før de kan modtage midler.

**1. Gennemfør KYC-verifikation**

Før en bruger kan modtage udbetalinger, skal vedkommende gennemføre identitetsverifikation (KYC). Brug det hostede onboardingflow for konti til at guide brugere gennem processen:

```typescript TypeScript theme={null}
import { WhopClient } from "@whop/sdk";

const client = new WhopClient({
  token: "Account API Key",
});

const accountLink = await client.accountLinks.create({
  account_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 theme={null}
from whop_sdk import Whop

client = Whop(
    token="Account API Key",
)

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

```rust Rust theme={null}
use whop_sdk::prelude::*;

let config = ClientConfig {
    token: Some("Account API Key".to_string()),
    ..Default::default()
};
let client = Whop::new(config).expect("Failed to build client");

let account_link = client
    .account_links
    .create(
        &CreateAccountLinksRequest {
            account_id: "biz_xxxxxxxxxxxxx".to_string(),
            use_case: AccountLinkUseCases::AccountOnboarding,
            return_url: "https://yourapp.com/onboarding/complete".to_string(),
            refresh_url: "https://yourapp.com/onboarding/refresh".to_string(),
        },
        None,
    )
    .await?;

// Redirect the user to complete KYC
println!("{}", account_link.url);
```

```go Go theme={null}
import (
    "context"
    "fmt"
    "log"

    whopsdk "github.com/whopio/whopsdk-go/v2"
    "github.com/whopio/whopsdk-go/v2/client"
    "github.com/whopio/whopsdk-go/v2/option"
)

client := client.NewWhop(option.WithToken("Account API Key"))

accountLink, err := client.AccountLinks.Create(context.TODO(), &whopsdk.CreateAccountLinksRequest{
    AccountID:  "biz_xxxxxxxxxxxxx",
    UseCase:    whopsdk.AccountLinkUseCasesAccountOnboarding,
    ReturnURL:  "https://yourapp.com/onboarding/complete",
    RefreshURL: "https://yourapp.com/onboarding/refresh",
})
if err != nil {
    log.Fatal(err)
}

// Redirect the user to complete KYC
fmt.Println(accountLink.URL)
```

Omdiriger brugeren til den `url`, der returneres i svaret. Når verifikationen er gennemført, omdirigeres brugeren tilbage til din `return_url`.

**2. Tilføj en udbetalingsmetode**

Før du opretter en udbetaling, skal kontoen have en udbetalingsmetode. Monter [Withdraw-elementet](https://docs.whop.com/da/elements/latest/wallet/withdraw.md) med et adgangstoken for underkontoen. Det viser kontoens udbetalingsmetoder og indsamler en ny, når der ikke findes nogen:

```tsx React theme={null}
"use client";

import { WhopElements, Wallet, WithdrawElement } from "@whop/elements-react";
import { loadWhop } from "@whop/elements";

export function AddPayoutMethod({
  accountId,
  accessToken,
}: {
  accountId: string;
  accessToken: string;
}) {
  return (
    <WhopElements elements={loadWhop()}>
      <Wallet accountId={accountId} accessToken={accessToken}>
        <WithdrawElement />
      </Wallet>
    </WhopElements>
  );
}
```

Generer `accessToken` på din server for underkontoen, som vist i [Aktivér udbetalinger for underkonti](https://docs.whop.com/da/developer/platforms/render-payout-portal.md). Du kan også sende brugeren til den [hostede udbetalingsportal](https://docs.whop.com/da/developer/platforms/render-payout-portal.md#hosted-payout-portal) i stedet. For kun at acceptere en PayPal-konto, efter at kontohaveren har logget ind for at bevise ejerskab, skal du [tilknytte en PayPal-udbetalingsmetode](https://docs.whop.com/da/developer/guides/connect-paypal-payout-method.md).

**3. Hent standardudbetalingsmetoden**

Vis underkontoens udbetalingsmetoder, og find den med `is_default: true`:

```typescript TypeScript theme={null}
import { WhopClient } from "@whop/sdk";

const client = new WhopClient({
  token: "Account API Key",
});

const payoutMethods = await client.payoutMethods.listPayoutMethod({
  account_id: "biz_xxxxxxxxxxxxx",
});

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

```python Python theme={null}
from whop_sdk import Whop

client = Whop(
    token="Account API Key",
)

payout_methods = client.payout_methods.list_payout_method(
    account_id="biz_xxxxxxxxxxxxx",
)

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

```rust Rust theme={null}
use whop_sdk::prelude::*;

let config = ClientConfig {
    token: Some("Account API Key".to_string()),
    ..Default::default()
};
let client = Whop::new(config).expect("Failed to build client");

let payout_methods = client
    .payout_methods
    .list_payout_method(
        &ListPayoutMethodQueryRequest {
            account_id: "biz_xxxxxxxxxxxxx".to_string(),
            ..Default::default()
        },
        None,
    )
    .await?;

let default_method = payout_methods.data.iter().find(|method| method.is_default);
println!("{:?}", default_method.map(|method| &method.id));
```

```go Go theme={null}
import (
    "context"
    "fmt"
    "log"

    whopsdk "github.com/whopio/whopsdk-go/v2"
    "github.com/whopio/whopsdk-go/v2/client"
    "github.com/whopio/whopsdk-go/v2/option"
)

client := client.NewWhop(option.WithToken("Account API Key"))

page, err := client.PayoutMethods.ListPayoutMethod(context.TODO(), &whopsdk.ListPayoutMethodRequest{
    AccountID: "biz_xxxxxxxxxxxxx",
})
if err != nil {
    log.Fatal(err)
}

var defaultMethod *whopsdk.PayoutMethodListItem
for _, method := range page.Results {
    if method.IsDefault {
        defaultMethod = method
        break
    }
}
if defaultMethod != nil {
    fmt.Println(defaultMethod.ID)
}
```

**4. Opret en udbetaling**

API-version `2026-11-03` og nyere kræver et tilbud. Kald først `POST /payouts/quotes` med den konto, udbetalingsmetode, det beløb, den valuta og den hastighed, du vil indsende:

```bash theme={null}
curl https://api.whop.com/api/v1/payouts/quotes \
  -H "Authorization: Bearer $WHOP_API_KEY" \
  -H "Api-Version-Date: 2026-11-03" \
  -H "Idempotency-Key: payout-quote-unique-key" \
  -H "Content-Type: application/json" \
  -d '{"account_id":"biz_xxxxxxxxxxxxx","payout_method_id":"potk_xxxxxxxxxxxxx","amount":100,"currency":"usd","speed":"standard"}'
```

Erstat `QUOTE_TOKEN_FROM_RESPONSE` nedenfor med den returnerede `quote_token`, og indsend før `expires_at`. Hvis en udbetalingsrequest får timeout, skal du prøve igen med samme `Idempotency-Key` for udbetalingen og det oprindelige token. Brug en anden nøgle til tilbudsrequesten.

```typescript TypeScript theme={null}
import { WhopClient } from "@whop/sdk";

const client = new WhopClient({
  token: "Account API Key",
});

const payout = await client.payouts.create({
  account_id: "biz_xxxxxxxxxxxxx",
  amount: 100.0,
  currency: "usd",
  payout_method_id: "potk_xxxxxxxxxxxxx",
  quote_token: "QUOTE_TOKEN_FROM_RESPONSE",
});

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

```python Python theme={null}
from whop_sdk import Whop

client = Whop(
    token="Account API Key",
)

payout = client.payouts.create(
    request={
        "account_id": "biz_xxxxxxxxxxxxx",
        "amount": 100.0,
        "currency": "usd",
        "payout_method_id": "potk_xxxxxxxxxxxxx",
        "quote_token": "QUOTE_TOKEN_FROM_RESPONSE",
    },
)

print(payout.id)
```

```rust Rust theme={null}
use whop_sdk::prelude::*;

let config = ClientConfig {
    token: Some("Account API Key".to_string()),
    ..Default::default()
};
let client = Whop::new(config).expect("Failed to build client");

let payout = client
    .payouts
    .create(
        &CreatePayoutsRequestBody::Value(json!({
            "account_id": "biz_xxxxxxxxxxxxx",
            "amount": 100.0,
            "currency": "usd",
            "payout_method_id": "potk_xxxxxxxxxxxxx",
            "quote_token": "QUOTE_TOKEN_FROM_RESPONSE",
        })),
        None,
    )
    .await?;

println!("{}", payout.id);
```

```go Go theme={null}
import (
    "context"
    "fmt"
    "log"

    whopsdk "github.com/whopio/whopsdk-go/v2"
    "github.com/whopio/whopsdk-go/v2/client"
    "github.com/whopio/whopsdk-go/v2/option"
)

client := client.NewWhop(option.WithToken("Account API Key"))

payout, err := client.Payouts.Create(context.TODO(), &whopsdk.CreatePayoutsRequestBody{
    Unknown: map[string]any{
        "account_id":       "biz_xxxxxxxxxxxxx",
        "amount":           100.0,
        "currency":         "usd",
        "payout_method_id": "potk_xxxxxxxxxxxxx",
        "quote_token": "QUOTE_TOKEN_FROM_RESPONSE",
    },
})
if err != nil {
    log.Fatal(err)
}

fmt.Println(payout.ID)
```

I dette eksempel:

* `account_id` er den underkonto, der skal udbetales til
* `amount` er udbetalingsbeløbet (100,00 USD) - gebyrer trækkes fra dette beløb
* `currency` er ISO-valutakoden
* `payout_method_id` er ID'et for den udbetalingsmetode, der skal bruges (fra trin 3)

Requesten returnerer en fejl, hvis beløbet overstiger den disponible saldo.

### Dæk udbetalingsgebyrer for dine underkonti

Som standard trækkes udbetalingsgebyrer fra underkontoens saldo. Du kan i stedet vælge at dække disse gebyrer fra din platformsaldo ved at sætte `platform_covers_fees` til `true` på både tilbudsrequesten og udbetalingsrequesten:

```typescript TypeScript theme={null}
const payout = await client.payouts.create({
  account_id: "biz_xxxxxxxxxxxxx",
  amount: 100.0,
  currency: "usd",
  payout_method_id: "potk_xxxxxxxxxxxxx",
  quote_token: "QUOTE_TOKEN_FROM_RESPONSE",
  platform_covers_fees: true,
});
```

```python Python theme={null}
payout = client.payouts.create(
    request={
        "account_id": "biz_xxxxxxxxxxxxx",
        "amount": 100.0,
        "currency": "usd",
        "payout_method_id": "potk_xxxxxxxxxxxxx",
        "quote_token": "QUOTE_TOKEN_FROM_RESPONSE",
        "platform_covers_fees": True,
    },
)
```

```rust Rust theme={null}
client
    .payouts
    .create(
        &CreatePayoutsRequestBody::Value(json!({
            "account_id": "biz_xxxxxxxxxxxxx",
            "amount": 100.0,
            "currency": "usd",
            "payout_method_id": "potk_xxxxxxxxxxxxx",
            "quote_token": "QUOTE_TOKEN_FROM_RESPONSE",
            "platform_covers_fees": true
        })),
        None,
    )
    .await?;
```

```go Go theme={null}
_, err := client.Payouts.Create(context.TODO(), &whopsdk.CreatePayoutsRequestBody{
    Unknown: map[string]any{
        "account_id":           "biz_xxxxxxxxxxxxx",
        "amount":               100.0,
        "currency":             "usd",
        "payout_method_id":     "potk_xxxxxxxxxxxxx",
        "quote_token": "QUOTE_TOKEN_FROM_RESPONSE",
        "platform_covers_fees": true,
    },
})
if err != nil {
    log.Fatal(err)
}
```

Når `platform_covers_fees` er `true`, modtager underkontoen hele udbetalingsbeløbet, og gebyret debiteres i stedet fra din platforms saldo. Det kræver, at din platforms politik for gebyrdækning dækker udbetalingsmetoden, eller en API-nøgle, der er autoriseret til at administrere dine underkontis gebyrer.

## API-reference

> [card] [Create Payout API](https://docs.whop.com/da/api-reference/payouts/create-payout.md)
>
> Se den fulde API-reference for oprettelse af udbetalinger

## Relaterede ressourcer

> [card] [Betal underkonti](https://docs.whop.com/da/developer/platforms/collect-payments-for-subaccounts.md)
>
> Overfør midler til dine underkonti

> [card] [Vis udbetalingsportalen](https://docs.whop.com/da/developer/platforms/render-payout-portal.md)
>
> Lad dine brugere hæve deres midler


## Related topics

- [Eksempelintegration](https://docs.whop.com/da/developer/guides/example-integration.md)
- [Aktivér udbetalinger for underkonti](https://docs.whop.com/da/developer/platforms/render-payout-portal.md)
- [Platform-quickstart](https://docs.whop.com/da/developer/platforms/quickstart.md)
