# Middleware: the two environments

15-Nov-2026.

An integration meets the middleware in two environments open to it today: the sandbox, where it
is built and tested alone, and staging, where it runs with real terminals and registers. This
page names each one's base URL, what differs between them, and what moving from the sandbox to
staging takes. Of the pages the sandbox serves, it is the one that names either address. An
agent reads the same bytes through the sandbox's MCP server as `mw://environments`, and over HTTP
as `/docs/api/environments.md`.

| | The sandbox | Staging |
|---|---|---|
| Base URL | `https://mw.sandbox.fundimo.com.au` | `https://mw.staging.fundimo.com.au` |
| Mode | `sandbox` | `live` |
| Version | The release the sandbox runs: `Version` in the answer to `GET /v1/health` at this base URL | The release staging runs: `Version` in the answer to `GET /v1/health` at this base URL |
| For | Building and testing alone: a world of your own, simulated terminals, a conformance run and its signed report. A world lasts 30 days, and nothing in it is a record | Real terminals and real registers, on test cards only, never a real card |
| Credential | A sandbox key, `sbx_...`, or a certificate the sandbox issued | A certificate staging issued, alone. A sandbox key is `401 sandbox_key_on_live` |
| How you start | `POST /sandbox/v1/keys`, with no credential | FUNDiMO lists your first server and gives you its pairing code once. Ask for an `admin` one if your own back office will list your registers, devices and other servers |
| Your app on a device | You register it: `POST /sandbox/v1/app-identities` | The operator or your `admin` server registers it |
| Attestation | Not required | Checked. A device that fails is refused or marked as `/docs/api/onboarding-device.md`, Which devices the middleware admits, says. The operator's allowed list of device models starts empty: ask for yours |
| Registers and terminals | One register and nine terminals of your world, linked from the start: seven simulated, `-manual` driven through the MCP server's tools, and `-yours`, your own | A register for each till and a terminal by its serial, each listed, and each linked at the counter |
| These pages, the MCP server, conformance | Served at its base URL: `/llms.txt` and `/mcp` | None: read them at the sandbox |

Each refuses the other's credentials: a `live` middleware refuses every sandbox key and every
sandbox certificate, and the sandbox refuses every live credential. The messages are the same in
both: a sale, its reads, a terminal's frames. What changes is the base URL, the credential and
onboarding. The sandbox answers `404` to the Operator API and serves its own routes under
`/sandbox/v1/` in their place, and a terminal enrols there under the serial `<tester>-yours`, and
on staging under its own. Each walk's In the sandbox section gives the rest:
`/docs/api/onboarding-server.md`, `/docs/api/onboarding-device.md` and `/docs/api/linking.md`.

Neither environment is promised to be serving at every hour. `GET /v1/health` at a base URL
answers `200` when it is.

`Version` in the answer to `GET /v1/health` is the release of the middleware that environment
runs. The sandbox's and staging's releases may differ for a time: a deploy moves staging first
and the sandbox after, and may stop between the two. The sandbox's MCP server states its own
release and reads no other: it never calls staging. A conformance report's `SandboxVersion`
names the sandbox's release, the one that ran the run. Before you move to staging, compare
staging's release with your report's `SandboxVersion`.

## The base URL is a setting

Keep the base URL in one setting from the first line of code, and build every address from it:
each REST call, and a terminal's WebSocket, whose scheme is the base URL's made WebSocket's
(`/docs/api/terminal.md`, Address). Never write either address into code. A server reads the
base URL from its configuration, as the walks' code reads `MW`, and keeps one key and
certificate for each environment it calls.

An app on a device chooses its base URL once, before its first enrolment, from a list it holds
apart from its code, today these two, and never takes an address an installer types. One build
then serves both environments. The app keeps the base URL it chose in its data, beside its
identities (`/docs/api/onboarding-device.md`, step 7).

A credential belongs to the environment that issued it, so enrol in each with that
environment's own code, never with a copied key. To move a device to the other environment, a
person clears the app's data, where it keeps the chosen base URL and its identities, and enrols
the device there. That is a deliberate move, and never what a holder does after a refusal, when
it keeps its key (`/docs/api/onboarding-device.md`, What a holder of a dead certificate does).

## From the sandbox to staging

Each side has a list of its own, its steps in order. Each step names the walk that holds its
detail.

**A POS vendor's server**

1. Set the server's base URL to staging's (`/docs/api/onboarding-server.md`, What you need).
2. FUNDiMO lists your first server and gives you its code once
   (`/docs/api/onboarding-server.md`, step 1).
3. Make a new key, never the sandbox's, and enrol at staging (`/docs/api/onboarding-server.md`,
   steps 2 to 4).
4. Your `admin` server lists a register for each till (`/docs/api/onboarding-server.md`,
   step 7), and each call for a till names its register in `Mw-Register` (step 6).
5. Have a terminal paired at a store that accepts your vendor, and that store's
   `MerchantIdentification`, which its fleet owner gives the merchant (`/docs/api/linking.md`,
   Before you start).
6. Staff link each till to its terminal at the counter (`/docs/api/linking.md`).

**A terminal's app**

1. Have your app registered at staging for the build the device runs
   (`/docs/api/onboarding-device.md`, step 1).
2. Ask the operator to put your device models on its allowed list
   (`/docs/api/onboarding-device.md`, Which devices the middleware admits).
3. The device is listed at its store by its serial, and its code is given to the installer
   (`/docs/api/onboarding-device.md`, step 2).
4. Choose staging in the app before its first enrolment, or clear the app's data on a device
   that was in the sandbox, then the installer types or scans the code
   (`/docs/api/onboarding-device.md`, step 2).
5. The app makes a new key with its attestation and enrols at staging
   (`/docs/api/onboarding-device.md`, steps 3 to 6), where a device that fails attestation is
   refused or marked as Which devices the middleware admits says.
6. The terminal connects on its new certificate (`/docs/api/terminal.md`, Connect).
