# Go live: from sandbox to production

> What changes when real patients use your app: a checklist for your code, organization verification and the DPA, the plans, switching to a production key and what to watch after launch.

Source: https://developers.anpheros.com/guides/go-live

The last of the five steps. Your app works in the sandbox; this page is what changes when real
patients use it. The API, the SDKs and the base URL stay the same: only the key, the data and the
contract change.

**In short:**

| | Sandbox | Production |
|---|---|---|
| Patients | 30 synthetic ones, plus up to 50 of your own test patients | real patients |
| Key | `sk_test_…`, self-service in the dashboard | `sk_live_…`, issued after verification |
| Contract | none | data processing agreement (DPA) signed |
| Price | free | from €99 a month, first month free |
| Base URL | `https://platform.anpheros.com` | the same |

## 1. Check your app against the sandbox

Before you ask for production, make sure the app handles what production will send it:

- **Errors:** your code reads the status and the message, retries `429` after `Retry-After` and
  logs the `Anpheros-Request-Id`. See [Troubleshooting](https://developers.anpheros.com/guides/troubleshooting).
- **Writes:** every create sends an `Idempotency-Key` and an `author_type`, so a retry never creates
  a duplicate and every value has a known author. See [Getting started](https://developers.anpheros.com/guides/getting-started).
- **People:** an app that acts for a person uses OAuth and the person's consent, never an API key on
  the device. See [Authentication and OAuth](https://developers.anpheros.com/guides/authentication).
- **Changes:** you react to [webhooks](https://developers.anpheros.com/guides/webhooks) and verify their signature, instead of polling.
- **Keys:** API keys stay on your servers, never in a mobile app, a web page or a repository.

## 2. Verify your organization and sign the DPA

Write to platform@anpheros.com from your company address with your organization's name, country and
registration number, and a few lines on what the app does and which data it stores. We verify the
organization and send you the data processing agreement. Production opens once both are done.

## 3. Choose a plan

| Plan | Price a month | Stored patients |
|---|---|---|
| Starter | €99 | 2,500 |
| Growth | €299 | 10,000 |
| Scale | €799 | 50,000 |

The first month of production is free on every plan, once per organization, and starts when your
first production key is issued. During the private beta there is no card on file: invoices are sent
by email. Details, what counts as a patient and what happens past a plan: [Pricing](https://developers.anpheros.com/guides/pricing).

## 4. Switch the key

When production opens, your organization gets a production project and its `sk_live_…` key. Replace
the sandbox key in your server's configuration with it. Nothing else in your code changes. Keep the sandbox for development and tests: sandbox
and production never see each other's data, and a test key on a production project is refused with
`This key does not match its project's environment.`

## 5. After launch

- **Limits:** 600 requests a minute per key by default; see [Limits and rate limits](https://developers.anpheros.com/guides/limits).
- **Reliability:** where Anpheros runs, backups and how incidents are communicated:
  [Reliability, status and incidents](https://developers.anpheros.com/guides/reliability).
- **Changes to the API:** how breaking changes are announced: [Versioning and deprecation](https://developers.anpheros.com/guides/versioning).
- **Support:** platform@anpheros.com, with the `Anpheros-Request-Id` of the request.

## Frequently asked questions

### Do I have to rewrite anything to go live?
No. The API, the SDKs and the base URL are the same. You replace the `sk_test_…` key with an `sk_live_…` key from a production project.

### Can I keep using the sandbox after going live?
Yes. The sandbox stays free, and it is the right place for development, tests and demos.

### How long does verification take?
It depends on the documents we need for your organization. Write to platform@anpheros.com early, while you are still building in the sandbox.
