> ## Documentation Index
> Fetch the complete documentation index at: /llms.txt
> Use this file to discover all available pages before exploring further.

# Environments

> Sandbox and live are separate. Each has its own base URL, keys, wallets and webhook endpoints.

Payve has two environments. They share nothing: a key, a wallet balance or a webhook endpoint in one does not exist in the other.

| | Sandbox | Live |
| - | - | - |
| Money | Simulated | Real |
| Key prefix | `sk_test_` | `sk_live_` |
| Base URL | `https://sandbox.api.payvehq.com` | `https://api.payvehq.com` |
| Dashboard access | Open from the environment toggle | Opens once your business is approved |
| Payment providers | A simulator with fixed test values | Real banks and mobile money |
| Webhook endpoints | The ones you add in Sandbox | The ones you add in Live |

## One codebase, two settings

Read the base URL and the key from configuration. Going live is then a change of two values, not a change of code.

```bash
# Sandbox
export PAYVE_API_URL="https://sandbox.api.payvehq.com"
export PAYVE_API_KEY="sk_test_..."

# Live
export PAYVE_API_URL="https://api.payvehq.com"
export PAYVE_API_KEY="sk_live_..."
```

Every example in these docs uses `PAYVE_API_URL` and `PAYVE_API_KEY`.

> [!WARNING]
>
> A key is tied to its environment. A sandbox key sent to the live API, or a live key sent to the
> sandbox, returns `401`. The prefix does not route the request. The base URL does.

## What differs in the sandbox

* **No real money moves.** Payouts, pay-ins and conversions run against a simulator.
* **Outcomes are scripted.** Specific account numbers, card numbers and phone numbers produce specific results. See [Test in the sandbox](/testing/sandbox.md).
* **Name checks return made-up names.** The same account number always returns the same name.
* **Bank-transfer pay-ins create a new virtual account each time.** In live, a bank-transfer pay-in reuses your permanent virtual account for that currency.

## What is the same

The endpoints, request bodies, response shapes, statuses, error codes, idempotency rules and webhook format are the same in both environments. Code that passes in the sandbox runs unchanged in live.

## Switch environment in the dashboard

Use the environment toggle in the [dashboard](https://app.payvehq.com). It changes which keys, endpoints, wallets and transactions you see. The toggle lets you into **Live** only after your business is approved.

When you are ready, follow [Going live](/get-started/going-live.md).
