Skip to main content
Whop provides a sandbox environment for testing your integration without affecting production data or making real payments.

Sandbox URLs

EnvironmentURL
Frontendhttps://sandbox.whop.com
APIhttps://sandbox-api.whop.com/api/v1
Create your sandbox account and API keys at sandbox.whop.com.

SDK configuration

To use the sandbox environment with the Whop SDK, set the baseURL parameter:
import Whop from "@whop/sdk";

const client = new Whop({
	apiKey: process.env["WHOP_API_KEY"],
	baseURL: "https://sandbox-api.whop.com/api/v1",
});

Embedded components

The environment option requires @whop/embedded-components-vanilla-js version 0.0.6 or later.
To use embedded components (like payout elements) in sandbox mode, set the environment option when loading the SDK:
import { loadWhopElements } from "@whop/embedded-components-vanilla-js";

const elements = loadWhopElements({
	environment: "sandbox", // Use "production" for live environment (default)
});

// Create a payouts session as usual
const session = elements.createPayoutsSession({
	token: yourAccessToken,
	companyId: "your-company-id",
	redirectUrl: "https://yourapp.com/callback",
});
With React:
import { loadWhopElements } from "@whop/embedded-components-vanilla-js";
import { Elements, PayoutsSession } from "@whop/embedded-components-react-js";

const elements = loadWhopElements({
	environment: "sandbox",
});

function App() {
	return (
		<Elements elements={elements}>
			<PayoutsSession
				token={yourAccessToken}
				companyId="your-company-id"
				redirectUrl="https://yourapp.com/callback"
			>
				{/* Your payout components */}
			</PayoutsSession>
		</Elements>
	);
}

API keys & webhooks

API keys and webhooks work the same in sandbox as they do in production:
  • Create API keys at sandbox.whop.com/dashboard/developer
  • Configure webhooks to receive events from sandbox
  • Use the same authentication headers (Authorization: Bearer YOUR_API_KEY)

Test cards

Use the following test card numbers to simulate payments in sandbox:
Card NumberDescription
4242 4242 4242 4242Successful payment
4000 0000 0000 0002Declined payment
4000 0000 0000 0341Card setup succeeds, but later charges are declined
5385 3083 6013 5181Requires 3D Secure (enter Checkout1! on 3DS screen)
For all test cards:
  • Use any future expiration date (e.g., 12/34)
  • Use any 3-digit CVC (e.g., 123)
  • Use any billing address
Use 4000 0000 0000 0341 to test recovery flows where a card is saved successfully, but a future charge against that saved card fails.

Known limitations

The sandbox environment has some limitations compared to production:
The following features are not available or may not work as expected in sandbox:
  • Payouts - Payout functionality is not available yet
  • Apps & Messaging - Do not use apps or messaging features in sandbox
  • Alternative payment methods - Only card payments are supported (no Apple Pay, Google Pay, etc.)