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

# Sandbox'ta Test Edin

> Whop SDK'sını ve Elements'i sandbox'a yönlendirin, test API anahtarları ve webhook'lar oluşturun, test kartlarıyla ödemeleri simüle edin ve sandbox sınırlamalarını inceleyin.

Whop, üretim verilerini etkilemeden veya gerçek ödemeler yapmadan entegrasyonunuzu test etmeniz için bir sandbox ortamı sağlar.

## Sandbox URL'leri

| Ortam | URL |
| - | - |
| Ön yüz | `https://sandbox.whop.com` |
| API | `https://sandbox-api.whop.com/api/v1` |

Sandbox hesabınızı ve API anahtarlarınızı [sandbox.whop.com](https://sandbox.whop.com) adresinde oluşturun.

## Yazılım geliştirme kiti yapılandırması

Sandbox ortamını Whop SDK'sı ile kullanmak için `Sandbox` ortamını iletin. Bir ortam, SDK'nın iletişim kurduğu her ana bilgisayarı adlandırır; böylece her istek tek seferde sandbox'a taşınır.

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

const client = new WhopClient({
	token: process.env["WHOP_API_KEY"],
	environment: WhopEnvironment.Sandbox,
});
```

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

client = Whop(
    token=os.environ.get("WHOP_API_KEY"),
    environment=WhopEnvironment.SANDBOX,
)
```

```ruby Ruby theme={null}
require "whop_sdk"

client = Whop_sdk::Client.new(
  token: ENV.fetch("WHOP_API_KEY"),
  environment: Whop_sdk::Environment::SANDBOX,
)
```

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

let config = ClientConfig {
    token: Some(std::env::var("WHOP_API_KEY").unwrap()),
    base_url: "https://sandbox-api.whop.com/api/v1".to_string(),
    ..Default::default()
};
let client = Whop::new(config).expect("Failed to build client");
```

```go Go theme={null}
import (
    "os"

    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(os.Getenv("WHOP_API_KEY")),
    option.WithEnvironment(whopsdk.Environments.Sandbox),
)
```

> [!NOTE]
>
> `Sandbox` ortamı SDK 2.0 ile geldi. 1.x sürümünde istemciyi bunun yerine `https://sandbox-api.whop.com/api/v1` adresine yönlendirin: TypeScript'te `baseUrl`, Python ve Ruby'de `base_url`, Go'da `option.WithBaseURL`. TypeScript, Ruby ve Go 2.0'da bu geçersiz kılmayı korur, ancak bu her isteği tek bir ana bilgisayara gönderir. Bu durumda farklı bir ana bilgisayara ulaşması gereken işlemler reddedilir; bu nedenle `environment` kullanın. 2.0 Python istemcisinde `base_url` parametresi yoktur. Rust SDK'sı hâlâ 1.x sürümündedir ve `base_url` değerini korur.

## Sandbox'ta Elements

[Whop Elements](https://docs.whop.com/tr/elements/latest/getting-started.md) öğelerini sandbox'a yönlendirmek için SDK örneğini oluştururken `environment` değerini ayarlayın. Bu seçenek, öğelerin bir alıcının yazdıklarını nereye gönderdiğini değiştirmenin tek yoludur.

Bir varyant seçmeye yönelik Elements özelliği, uyumluluk için `plan` adını korur.

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

function App() {
	return (
		<WhopElements elements={loadWhop()} environment="sandbox">
			<Payments accountId="biz_xxxxxxxxxxxxx" plan="plan_xxxxxxxxxxxxx">
				<PaymentElement />
				<BrandingElement />
			</Payments>
		</WhopElements>
	);
}
```

```html JavaScript theme={null}
<script src="https://cdn.whop.com/elements/amber/elements.js" data-whop-elements></script>
<script type="module">
  const whop = window.WhopElements({ environment: "sandbox" });
  const payments = whop.payments.create({
    accountId: "biz_xxxxxxxxxxxxx",
    plan: "plan_xxxxxxxxxxxxx",
  });
  payments.create("payment").mount("#payment");
  payments.create("branding").mount("#branding");
</script>
```

## Uygulama programlama arayüzü anahtarları ve webhook'lar

API anahtarları ve webhook'lar sandbox'ta da üretimde olduğu gibi çalışır:

* API anahtarlarını [sandbox.whop.com/dashboard/developer](https://sandbox.whop.com/dashboard/developer) adresinde oluşturun
* Sandbox'tan olay almak için webhook'ları yapılandırın
* Aynı kimlik doğrulama başlıklarını kullanın (`Authorization: Bearer YOUR_API_KEY`)

## Test kartları

Sandbox'ta ödemeleri simüle etmek için aşağıdaki test kartı numaralarını kullanın:

| Kart Numarası | Açıklama |
| - | - |
| `4242 4242 4242 4242` | Başarılı ödeme |
| `4000 0000 0000 0002` | Reddedilen ödeme |
| `4000 0000 0000 0341` | Kart kurulumu başarılı olur, ancak işlemci sonraki ücretleri reddeder |
| `5385 3083 6013 5181` | 3D Secure gerektirir (3DS ekranında `Checkout1!` girin) |

Üretimde, reddedilen bir ödeme kartı veren kuruluştan gelen bir kod taşır. [Ödeme reddi kodlarının açıklaması](https://docs.whop.com/tr/payments-and-billing/payment-issues/payment-decline-reasons.md) her birinin ne anlama geldiğini listeler.

Tüm test kartları için:

* Gelecekteki herhangi bir son kullanma tarihini kullanın (ör. 12/34)
* Herhangi bir 3 haneli kart doğrulama kodu kullanın (ör. 123)
* Herhangi bir fatura adresi kullanın

Bir kartı başarıyla kaydettiğiniz ancak kaydedilen o kart için gelecekteki bir ücretin
başarısız olduğu kurtarma akışlarını test etmek için `4000 0000 0000 0341` kullanın.

## Sandbox'ta ödeme yöntemleri

Kart ödemelerini test etmek için yukarıdaki [test kartlarını](#test-cards) kullanın.

Şu yöntemler de sandbox'ta her sağlayıcının kendi test akışı üzerinden tamamlanır: PayPal, Bancontact, iDEAL, Cash App Pay, Pix ve Boleto.

Şu yöntemler henüz sandbox'ta desteklenmemektedir:

* Apple Pay ve Google Pay
* Banka hesapları (ACH)
* SEPA Direct Debit
* AB banka havaleleri ve elektronik havaleler
* Alipay, WeChat Pay ve MobilePay

## Bilinen sınırlamalar

> [!WARNING]
>
> Aşağıdaki özellikler sandbox'ta kullanılamaz:

* Para çekmeler
* Kripto yatırmaları ve zincir üstü transferler
* Discord doğrudan mesajları ve rol senkronizasyonu
* Güncel arama sonuçları
* Üretimde çalışan bazı zamanlanmış ve arka plan işleri, örneğin dolandırıcılık incelemeleri ve özet e-postaları


## Related topics

- [Yapay Zekâ ve MCP](https://docs.whop.com/tr/developer/guides/ai_and_mcp.md)
- [Claude Code için Whop eklentisi](https://docs.whop.com/tr/developer/guides/plugins/claude-code.md)
- [Grok Build için Whop eklentisi](https://docs.whop.com/tr/developer/guides/plugins/grok.md)
