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

# Test vs Live Mode

> Understanding Monigo's dual-environment model.

Monigo operates in two modes: **test** and **live**. The mode is determined entirely by which API key you use.

## How environments are separated

| Behaviour                 | Test mode                 | Live mode        |
| ------------------------- | ------------------------- | ---------------- |
| Events ingested           | Yes                       | Yes              |
| Invoices generated        | Yes                       | Yes              |
| Customers charged         | No                        | Yes              |
| Payouts submitted         | No                        | Yes              |
| Webhook deliveries        | To test endpoint (if set) | To live endpoint |
| Data visible in dashboard | Test tab                  | Live tab         |

## Switching modes

You switch between modes by changing the API key in your requests. There is no global toggle — each request is independently scoped to the key used.

This means you can run test and live traffic simultaneously using different keys, which is useful during gradual rollouts.

## Recommended workflow

1. **Develop** locally using `mk_test_` keys
2. **Stage** using test keys pointed at a staging API
3. **Deploy** to production with `mk_live_` keys via environment variables

```bash theme={null}
# .env.local
MONIGO_API_KEY=mk_test_...

# .env.production
MONIGO_API_KEY=mk_live_...
```

## Resetting test data

Test data can be cleared from the dashboard under **Settings → Developer → Reset Test Data**. This is useful when you want a clean state before a demo or before going live.
