Skip to navigation

Test and live

Build and test every flow in the sandbox, then move to production by changing a single credential.
View as Markdown

Mitu provides two separate environments. The sandbox is where you build and test your integration, with every flow available and no real money moving. Production is where real customers and agents pay your business. The two are fully separated, so nothing you do while testing can affect live customers, payments or records.

The environment is determined by the API key your servers use rather than by a setting in the dashboard. The same account can therefore run a test integration and a live one side by side, and moving to production requires no change to your code beyond the key it uses.

EnvironmentSelected byAPI addressPurpose
SandboxA test API keyhttps://sandbox.mitu.aiBuilding and testing, without real money.
ProductionA live API keyhttps://api.mitu.aiServing real customers and agents.

Moving from test to live

1

Create a test key

Under API keys in the Mitu dashboard, create a key and choose Test as its environment. New keys default to Live, so confirm the environment before you create one.

2

Build against the sandbox

Send requests made with your test key to the sandbox address. The SDKs select the correct environment from the key automatically, so with an SDK you change only the key.

3

Test every flow end to end

Exercise each flow your business relies on in the sandbox, including payments, notifications, retries and failure cases, so that production behaves exactly as you have already seen it behave.

4

Go live

When your integration is complete and your business has been verified, create a live key, deploy it to your production servers and direct them to the production address.

Environment practices

  1. Keep keys in separate environments
    Give test and live keys only to the corresponding environments in your own infrastructure, so a test system can never act on live data.
  2. Register an endpoint per environment
    Each webhook endpoint belongs to one environment, so register a separate endpoint for test and for live traffic.
  3. Never test with a live key
    Testing with a live key moves real money and creates real records. Use the sandbox for every test, however small.

Separating test and live in this way lets your team develop and test with complete freedom, while production remains untouched until you deliberately move to it.