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

# Alt Hesap Para Çekmelerini Etkinleştirin

> Alt hesaplarınızın kendi para çekmelerini Whop Elements veya barındırılan bir portal ile yönetmesine izin verin

Alt hesaplarınızın Know Your Customer (KYC) doğrulamasını tamamlamasına, para çekme yöntemleri eklemesine ve paralarını kendi başlarına çekmesine izin verin. [Whop Elements](https://docs.whop.com/tr/elements/latest/getting-started.md) cüzdan yüzeylerini doğrudan uygulamanıza yerleştirebilir veya kullanıcıları Whop tarafından barındırılan bir portala yönlendirebilirsiniz.

## Gömülü para çekme portalı

### Sunucu tarafı uygulaması

Cüzdan öğelerini yerleştirmek için sunucunuzda alt hesap için bir erişim token'ı oluşturun. Öğeler o hesabın bakiyesini ve para çekmelerini bununla okur. Bu token'ın kapsamını nasıl belirleyeceğinizi ve Whop'un diğer kimlik bilgisi türleriyle nasıl karşılaştırıldığını öğrenmek için [Kimlik doğrulama ve API anahtarları](https://docs.whop.com/tr/developer/guides/auth-scoping.md) sayfasına bakın.

```tsx Next.JS theme={null}
// app/api/token/route.ts
import { WhopClient } from "@whop/sdk";
import type { NextRequest } from "next/server";

const whop = new WhopClient({
	token: process.env.WHOP_API_KEY,
});

export async function GET(request: NextRequest) {
	// Authenticate your user here
	const accountId = request.nextUrl.searchParams.get("accountId");

	if (!accountId) {
		return new Response(null, { status: 400 });
	}
	const tokenResponse = await whop.accessTokens
		.create({
			account_id: accountId,
		})
		.catch(() => {
			return null;
		});
	if (!tokenResponse) {
		return new Response(null, { status: 500 });
	}
	const token = tokenResponse.token;
	return Response.json({
		token,
	});
}
```

```typescript Express.js theme={null}
import express from "express";
import { WhopClient } from "@whop/sdk";

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

app.use(express.json());

app.post("/api/access-token", async (req, res) => {
	// Authenticate your user here
	const { accountId } = req.body;

	const { token } = await client.accessTokens.create({
		account_id: accountId,
	});

	res.json({ token });
});

app.listen(3000, () => {
	console.log("Server running on port 3000");
});
```

```python Python theme={null}
from whop_sdk import Whop
from flask import Flask, request, jsonify

app = Flask(__name__)
client = Whop(token="Account API Key")

@app.route('/api/access-token', methods=['POST'])
def create_access_token():
    data = request.get_json()
    # Authenticate your user here
    account_id = data.get('accountId')

    access_token = client.access_tokens.create(
        account_id=account_id
    )

    return jsonify({'token': access_token.token})
```

> [card] [Create Access Token API](https://docs.whop.com/tr/api-reference/legacy/access-tokens/create-access-token.md)
>
> Erişim token'ı oluşturma ve tüm kullanılabilir parametreler için
> API referansının tamamına bakın

## İstemci tarafı kurulumu

```bash npm theme={null}
npm install @whop/elements-react @whop/elements
```

```bash pnpm theme={null}
pnpm add @whop/elements-react @whop/elements
```

```html HTML theme={null}
<script src="https://cdn.whop.com/elements/amber/elements.js" data-whop-elements></script>
```

## İstemci tarafı uygulaması

Alt hesap için bir `Wallet` tanıtıcısı oluşturun ve ihtiyaç duyduğunuz yüzeyleri onun altına yerleştirin. Tanıtıcı, erişim token'ını altındaki her öğeye gönderir; bu nedenle bu öğelerin okuduğu her kapsamı taşıyan tek bir token oluşturun.

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

import { useEffect, useState } from "react";
import {
	ActivityElement,
	BalanceElement,
	Balances,
	Wallet,
	WhopElements,
	WithdrawElement,
} from "@whop/elements-react";
import { loadWhop } from "@whop/elements";

export function PayoutPortal({ accountId }: { accountId: string }) {
	const [accessToken, setAccessToken] = useState<string | null>(null);

	useEffect(() => {
		fetch(`/api/token?accountId=${accountId}`)
			.then((res) => res.json())
			.then((data) => setAccessToken(data.token));
	}, [accountId]);

	if (!accessToken) return null;

	return (
		<WhopElements elements={loadWhop()}>
			<Wallet accountId={accountId} accessToken={accessToken}>
				<Balances>
					<BalanceElement />
				</Balances>
				<WithdrawElement />
				<ActivityElement />
			</Wallet>
		</WhopElements>
	);
}
```

```html JavaScript theme={null}
<div id="balance"></div>
<div id="withdraw"></div>
<div id="activity"></div>

<script type="module">
  const accountId = "biz_xxxxxxxxxxxxx";
  const { token } = await (await fetch(`/api/token?accountId=${accountId}`)).json();

  const wallet = window.WhopElements().wallet.create({ accountId, accessToken: token });
  wallet.create("balances").create("balance").mount("#balance");
  wallet.create("withdraw").mount("#withdraw");
  wallet.create("activity").mount("#activity");
</script>
```

> [!NOTE]
>
> iOS'ta cüzdan SDK'sı `BalanceElement`, `ListElement` ve `ActivityElement` öğelerini sunar. [Elements ile Başlarken](https://docs.whop.com/tr/elements/latest/getting-started.md) sayfasına bakın ve Swift sekmesini seçin.

### Kimlik doğrulama

Bir alt hesabın para çekebilmesi için kimliğini doğrulaması gerekir. Bilgileri toplayan, barındırılan sağlayıcı oturumunu çalıştıran ve sonucu bildiren eksiksiz sayfa içi akış için [KYC öğesini](https://docs.whop.com/tr/elements/latest/verifications/kyc.md) yerleştirin. Ya da doğrulama dahil bekleyen her işlemi göstermek ve kullanıcının her birini başlatmasına izin vermek için [RequiredActions öğesini](https://docs.whop.com/tr/elements/latest/dashboard/required-actions.md) yerleştirin.

```tsx React theme={null}
import { WhopElements, Verifications, KycElement } from "@whop/elements-react";
import { loadWhop } from "@whop/elements";

export function VerifyIdentity({ accountId }: { accountId: string }) {
	return (
		<WhopElements elements={loadWhop()}>
			<Verifications
				accountId={accountId}
				getToken={() =>
					fetch(`/api/token?accountId=${accountId}`)
						.then((res) => res.json())
						.then((data) => data.token)
				}
			>
				<KycElement onCompleted={() => console.log("Verified")} />
			</Verifications>
		</WhopElements>
	);
}
```

## `Wallet` seçenekleri

| Seçenek | Tür | Zorunlu | Açıklama |
| - | - | - | - |
| `accountId` | `string` | Evet | Alt hesabın `biz_` önekli kimliği. |
| `accessToken` | `string` | Evet, kendi alan adınızda | Sunucunuzdan gelen token. Bu olmadan okumalar, görüntüleyenin yalnızca whop.com üzerinde çalışan whop.com oturumunu kullanır. |
| `currency` | `string` | Hayır | Tutar alanları için ISO 4217 kodu. Varsayılan olarak `usd`. |
| `appearance` | `Appearance` | Hayır | Tanıtıcının altındaki her öğe için tema ve parça bazında stil. Bkz. [Görünüm](https://docs.whop.com/tr/elements/latest/appearance.md). |

Tüm seçenekler, olaylar ve yöntemler [Wallet referansında](https://docs.whop.com/tr/elements/latest/wallet/overview) listelenmiştir.

### Kapsamlar

Öğeler oluşturduğunuz token ile okuma yapar; bu nedenle ihtiyaç duydukları her kapsamı o tek token üzerinde verin:

* [Balances](https://docs.whop.com/tr/elements/latest/wallet/balances) ve [Activity](https://docs.whop.com/tr/elements/latest/wallet/activity.md), `company:balance:read` ile okur.
* [Withdraw](https://docs.whop.com/tr/elements/latest/wallet/withdraw.md), `payout:withdraw_funds`, `payout:destination:read` ve banka eklemek için `payout:create_destination` gerektirir.
* [KYC](https://docs.whop.com/tr/elements/latest/verifications/kyc.md), `identity:read` ve `identity:write` gerektirir.

`scoped_actions` olmadan oluşturulan bir token, API anahtarınızın tüm izinlerini devralır.

### Token'ı yenileme

Erişim token'larının süresi varsayılan olarak bir saat, en fazla üç saat sonra dolar. Süresi dolmadan önce tanıtıcıda yenisini ayarlayın:

```ts theme={null}
wallet.update({ accessToken: await fetchToken(accountId) });
```

React'te yeni değeri `accessToken` prop'u olarak iletin.

> [!NOTE]
>
> `accessToken`, SDK'nın çağırdığı bir geri çağırma değil, sizin ayarladığınız bir değerdir. `Verifications` istisnadır: bir `getToken` geri çağırması alır ve öğe yerleşmeden önce onu çağırır.

## Barındırılan para çekme portalı

Para çekme portalını uygulamanıza gömmek yerine kullanıcıları Whop tarafından barındırılan bir para çekme portalına yönlendirebilirsiniz. Bu, özel bir kullanıcı arayüzü oluşturmak istemediğinizde veya hızlı bir entegrasyona ihtiyaç duyduğunuzda kullanışlıdır.

Bir hesap bağlantısı oluşturun ve kullanıcıyı döndürülen URL'ye yönlendirin:

```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: "payouts_portal",
	return_url: "https://yourapp.com/payouts/complete",
	refresh_url: "https://yourapp.com/payouts/refresh",
});

// Redirect the user to the hosted portal
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="payouts_portal",
    return_url="https://yourapp.com/payouts/complete",
    refresh_url="https://yourapp.com/payouts/refresh",
)

# Redirect the user to the hosted portal
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::PayoutsPortal,
            return_url: "https://yourapp.com/payouts/complete".to_string(),
            refresh_url: "https://yourapp.com/payouts/refresh".to_string(),
        },
        None,
    )
    .await?;

// Redirect the user to the hosted portal
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.AccountLinkUseCasesPayoutsPortal,
    ReturnURL:  "https://yourapp.com/payouts/complete",
    RefreshURL: "https://yourapp.com/payouts/refresh",
})
if err != nil {
    log.Fatal(err)
}

// Redirect the user to the hosted portal
fmt.Println(accountLink.URL)
```

Bu örnekte:

* `account_id`, platform veya alt hesaptır
* `use_case`, portal türünü belirtir
* `return_url`, kullanıcı sitenize dönmek istediğinde Whop'un onu yönlendirdiği yerdir
* `refresh_url`, oturumun süresi dolarsa Whop'un kullanıcıyı yönlendirdiği yerdir

### Kullanılabilir kullanım durumları

| Kullanım durumu | Açıklama |
| - | - |
| `account_onboarding` | KYC ve kimlik doğrulama |
| `payouts_portal` | Para çekmeler, para çekme yöntemleri, KYC ve kimlik doğrulama |

Hesap bağlantısını oluşturduktan sonra kullanıcıyı yanıtta döndürülen `url` adresine yönlendirin. Kullanıcı para çekme akışını Whop tarafından barındırılan portalda tamamlar, ardından Whop onu `return_url` adresinize yönlendirir.

## İlgili kaynaklar

> [card] [Cüzdan öğeleri](https://docs.whop.com/tr/elements/latest/wallet/overview)
>
> Her cüzdan yüzeyi; seçenekleri, olayları ve kapsamlarıyla birlikte

> [card] [Alt hesaplara ödeme yapın](https://docs.whop.com/tr/developer/platforms/collect-payments-for-subaccounts.md)
>
> Alt hesaplara para transfer edin


## Related topics

- [Alt Hesaplara Manuel Ödemeler](https://docs.whop.com/tr/developer/platforms/manual-payouts.md)
- [Alt Hesapları Kaydedin](https://docs.whop.com/tr/developer/platforms/enroll-subaccounts.md)
- [Tercih Edilen Mutabakat Para Birimi](https://docs.whop.com/tr/developer/payouts/preferred-settlement-currency.md)
