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

# Environments

> How the test and live environments differ, and how to move between them.

Pruva has two environments, **test** and **live**. They share the same API, the same base URL, and the same request and response shapes. The difference is the key you use and what happens behind the request.

An API key belongs to exactly one environment, and the environment is part of the key string:

```text theme={null}
pruva_test_...   test environment
pruva_live_...   live environment
```

You never pass the environment separately. The key you send decides it.

## What differs

|                   | Test                            | Live                                    |
| ----------------- | ------------------------------- | --------------------------------------- |
| Approval required | No                              | Yes, your organization must be approved |
| Wallet charged    | No                              | Yes, at the scope's price               |
| Provider called   | Sandbox or stubbed behavior     | The real provider                       |
| Data returned     | Sample or provider sandbox data | Real records                            |
| Base URL          | `https://api.pruva.africa`      | `https://api.pruva.africa`              |

The point of test is to build and verify your integration, the request you send, the response you parse, your error handling, without approval, without spending from your wallet, and without hitting real records.

## Moving to live

When your integration works against test, going live is mostly a matter of swapping the key. Before you do:

<Steps>
  <Step title="Get your organization approved">
    Live checks require an **approved** organization. A live key on an unapproved org returns `403 not yet approved`. Approval is requested from the dashboard.
  </Step>

  <Step title="Activate the scopes you need">
    Each scope must be active for your organization before a live key can run it. An inactive scope returns `403`, the same as a key that lacks the scope.
  </Step>

  <Step title="Fund your wallet">
    Live checks are charged at each scope's price. Make sure your wallet has a balance, and consider a low balance alert so checks do not start failing for funds.
  </Step>

  <Step title="Swap the key">
    Replace your `pruva_test_...` key with a `pruva_live_...` key. No other code change is needed; the request is identical.
  </Step>
</Steps>

<Warning>
  Keep test and live keys clearly separated in your configuration. A `test` key running where you expected `live` will silently return sample data and charge nothing, which is easy to miss until real users are affected. The environment prefix in the key string is there to make this mistake visible.
</Warning>

## Which environment am I in?

Read the prefix of the key you are sending. If it starts with `pruva_test_`, you are in test; `pruva_live_`, you are in live. There is no separate flag to check and no separate host to remember.

<Note>
  See the [Going live checklist](/guides/going-live) for the full list of things to confirm before your first real check.
</Note>
