# Sandbox vs Production Environments

> Understand how to test your bot in Sandbox and move to Production. Learn which data is shared and how to manage environment-specific merchant accounts.

Source: https://docs.botsubscription.com/getting-started/sandbox-vs-production/

BotSubscription provides two environments for your bot: **Sandbox** and **Production**. Understanding how these environments interact is crucial for safely testing your setup before accepting real payments from members.

## Shared vs. Isolated Data

A key feature of BotSubscription is how it handles your project data across environments. Most of your project configuration is shared, while financial and sensitive data is isolated.

### What is Shared?
The following data is valid for both Sandbox and Production:
- Subscription Plans: Plans you create in your dashboard appear in both environments.
- Bot Configuration: Custom messages, commands, and project settings.
- Memberships & Orders: All subscriber data and transaction history are shared.

### What is Isolated?
Only financial and sensitive payment data is environment-specific:
- Merchant Accounts: Payment provider connections (Stripe, PayPal, etc.) are environment-specific.
- Saved Cards: Payment methods saved by members are only valid in the environment where they were added.

<Tip>
Since memberships and orders are shared, any test subscriptions created in Sandbox will remain active when you switch to Production. We strongly recommend terminating test memberships before launching to real customers.
</Tip>

## Managing Environments

The environment logic in BotSubscription allows you to maintain both testing and live setups simultaneously.

### Installing Merchant Accounts
When you install a new merchant account in your dashboard, you are always prompted to select its mode: Production or Sandbox. You can have multiple accounts of both types installed at the same time.

However, please note that you can only have one active account per provider per environment. For example:
- Having one Sandbox Stripe and one Production Stripe account active is perfectly fine.
- You cannot have two active Sandbox Stripe accounts at the same time. If you install a second one, the first must be set to inactive.

### Switching Your Bot's Environment
While you can have both types of merchant accounts installed, your bot operates in only one environment at a time. This is controlled via the `/settings` menu in your bot:

1. Open your bot on Telegram or Discord and run the `/settings` command.
2. Navigate to the Environment submenu.
3. Choose either Sandbox or Production.

How the environment affects your bot:
- In Sandbox Mode: When members try to subscribe, the bot will only display your Sandbox merchant accounts. This allows for safe testing with fake payments.
- In Production Mode: The bot will only show Production merchant accounts, ensuring real customers pay using live payment methods.

<Figure
  src="/img/getting-started/bot-settings-environment-toggle.webp"
  alt="Environment settings menu in bot showing Sandbox and Production options"
  caption="Choose the active environment for your bot in the /settings menu."
/>

## Key Differences at a Glance

| Feature | Sandbox | Production |
| :--- | :--- | :--- |
| Purpose | Testing & Development | Live Business Operations |
| Payments | Simulated (Fake Money) | Real Transactions |
| Merchant Accounts | Required (Sandbox mode) | Required (Production mode) |
| Bot Behavior | Shows Sandbox payment methods | Shows Production payment methods |
| Platform Fees | None | Standard Fees Apply |

## Next Steps

Ready to get started or move to production?

<CardGroup cols={2}>
  <Card 
    title="Create a Plan" 
    icon={<IconBook />} 
    href="https://docs.botsubscription.com/dashboard/plans/#create-a-subscription-plan"
    description="Set up your first subscription plan to test in Sandbox."
  />
  <Card 
    title="Set Up Payments" 
    icon={<IconPayment />} 
    href="https://docs.botsubscription.com/payments/"
    description="Learn how to install merchant accounts for Sandbox and Production."
  />
</CardGroup>
