# Test and live

> Every app is in test, live or paused. Test mode is for you and your testers, with pretend $LIA; live is for everyone. Keys, sessions and charges belong to one mode. From the Lia developer docs: https://docs.lialabs.org/concepts/test-and-live

## Status

| Status | Who can open it | Your keys |
| --- | --- | --- |
| `test` | You (the app's developer) and its testers, in test mode | Test key works. Live key is refused. |
| `live` | Everyone, in live mode. Your testers too, in live mode. | Both keys work. |
| `paused` | Nobody. It's hidden from the Apps Center. | Both keys are refused with `bad_key`. |

New apps start in test. The Lia team adds your testers (by Lia username) and switches the app to live when you're ready. A live app can't be opened in test mode; to keep testing changes after launch, ask the team for a second app in test that points at your staging address.

## Test mode

While you test, everything works as it will live, with pretend $LIA:

- **Lia's header says Test** next to your developer name, so nobody mistakes it for the real thing.
- **Payments are pretend.** The pay sheet shows the real price, but nobody's balance moves and nobody needs enough $LIA. The charge is real in every other way: your server sees it, delivers it and can refund it, and webhooks are sent.
- **Rewards are pretend.** Your pool isn't used and the daily limit per player doesn't apply. The reward is recorded and its webhook is sent, but no $LIA reaches the player.
- **Notifications reach testers only**, can be sent every 30 seconds (instead of every hour) and at least 20 a day, and don't count toward the person's daily total from all apps.
- **Ads are real ads**, played and counted as in live.

## Keys and modes

Your **test key** (`lia_test_…`) only sees test mode: test sessions, test charges, test players and test ads. Your **live key** (`lia_live_…`) only sees live ones. A charge made in test is `not_found` to the live key, and the other way round.

So your server can tell which mode it's in from the key it uses. A good pattern:

```js
// One server for both: pick the key by where it runs.
const LIA_KEY = process.env.NODE_ENV === "production" ? process.env.LIA_LIVE_KEY : process.env.LIA_TEST_KEY;
```

Every response that involves a player or a charge also says its `mode`.

> **Test mode** Your testers are players in both modes with the same player id. Their scores and cloud storage are shared between test and live, so clear test data from your own records before you launch if it matters.

## What doesn't change between modes

- The player id, name and everything in [`Lia.init()`](/reference/sdk-lifecycle#lia-init) except `mode`.
- Leaderboards and cloud storage (one of each per app).
- Your reward pool's balance (only live rewards use it).
