Environments (TEST / LIVE)

Flow provides two fully isolated environments — TEST and LIVE. They share absolutely nothing: no transactions, no customers, no gateway credentials, no webhook endpoints, no API call logs.

 TESTLIVE
Real moneyNoYes
Gateway credentialsSandboxProduction
API key prefixmp_test_*mp_live_*
Data isolationCompound DB unique key on (merchant_id, environment)Same

Hosts

Flow runs in the Kingdom, on Google Cloud's Dammam region. TEST and LIVE share the same hosts; the key decides the environment. The UAT stack is a separate, free-tier deployment for early integration work.

 Production (KSA)UAT
APIhttps://api.flow.minnha.sahttps://minnha-api.onrender.com
Hosted checkouthttps://pay.flow.minnha.sahttps://minnha-checkout.vercel.app
Dashboardhttps://app.flow.minnha.sahttps://minnha-dashboard.vercel.app
Gateway callbacks and merchant webhooks leave production from one fixed address, 34.166.253.120. Allow-list it where a gateway or your firewall asks for one.

How the environment is decided

  1. If the request carries an X-Api-Key, the prefix wins (mp_test_* → TEST, mp_live_* → LIVE).
  2. Else, the optional X-Environment header is used (dashboard requests).
  3. Else, the request defaults to TEST.
The SDKs accept an environment option to switch on the fly: await minnha.transactions.list({}, { environment: "LIVE" }). It's purely a hint — the server still enforces it from the key.

Dashboard switcher

The merchant dashboard has a TEST/LIVE switcher in the sidebar. Switching to LIVE requires explicit confirmation and displays a red banner so you can't mistake which data you're looking at.

Going live

  1. Get a mp_live_* key.
  2. Configure your gateway in LIVE (Dashboard → Developers → Gateway Credentials → LIVE).
  3. Register a LIVE webhook endpoint.
  4. Set MINNHA_API_KEY to your mp_live_* key in production.
  5. Smoke-test with a real card for 1 SAR. Refund immediately.