Skip to content

Test vs live credentials

Every gateway stores two independent sets of credentials — one for test mode (sandbox) and one for live mode (real money). This page explains how the two are kept separate and how to wire each one correctly.

Side-by-side Test mode and Live mode credential cards with separate fields and per-mode Test connection buttons

How each gateway maps modes

GatewayTest endpointLive endpoint
PowerTranz Direct / HPPhttps://staging.ptranz.comhttps://gateway.ptranz.com
MPGS Direct / HPPDetermined by Region preset = mtf (Mastercard Test Facility) or the Gateway URL you enter for test modeRegion preset (ap / eu / na / sagicor) or your custom live Gateway URL
PayPalPayPal sandbox API basePayPal production API base

When you save a gateway, the system creates two GatewayCredentialVersion rows — one tagged mode: test and one tagged mode: live. Each row holds its own encrypted credentials. Changing one never affects the other.

Enabled modes

Each gateway has an Enabled modes array (at least one of test, live). This independently controls whether each mode can route traffic:

  • A gateway with enabled_modes: ['test'] can never process a live transaction even if live credentials are filled in.
  • A gateway with enabled_modes: ['live'] won't show up to sandbox testers — useful once you're sure the configuration works and want to keep developers off your live keys.
  • Most production setups end up with both enabled.

Portal-wide mode pill

The Test / Live pill in the top bar of the portal scopes everything you look at — transactions, payment links, subscriptions — to that mode. It also pins newly-created payment links to whichever mode you're viewing.

The two mode systems interact like this:

Portal pillLink modeGateway enabled modesWhat happens
Testtestgateway has test enabledRoutes to test credentials
Testtestgateway has only live enabledLink can't process — pick another gateway or enable test on this one
Livelivegateway has live enabledRoutes to live credentials
Livetest (legacy)gateway has test enabledTest link still works — but you won't see it in the list until you flip the pill

Per-mode currencies

Each gateway has separate test currencies and live currencies lists. A common production setup looks like:

SettingTestLive
Enabled modesyesyes
CurrenciesUSD (just one — for sandbox smoke testing)USD, JMD, TTD, BBD (the real list)

This way a developer can confirm a sandbox payment works in USD without you having to maintain a full currency matrix on the test side.

Common credential mix-ups

Don't paste live credentials into the test slot

Most processors will silently accept the auth handshake but flag you for compliance review when traffic starts flowing. PowerTranz especially will reject live credentials hitting the staging URL with a confusing error.

Mistakes we see often

MistakeSymptomFix
Live PowerTranz password in the test slotTest charges return "Authentication failed" against staging.ptranz.comRe-paste the staging password from your processor portal
MPGS test merchant ID + live API password401 on the connection testBoth fields must come from the same MPGS environment
MPGS region_preset = sagicor but credentials are MTFConnection test passes but real card numbers all declineSagicor live profiles use different merchant IDs from MTF; reset
HPP PageSet/PageName not configured per-modeTest charges redirect to a 404 on the PowerTranz portalThe HPP fields are per_mode — fill both test and live boxes
enabled_modes: ['live'] on a brand-new gatewayTest mode users get "No gateway available" errorsAdd test to enabled modes or switch portal to Live

Test the connection

After saving, hit Test connection on each mode card. The system attempts a real handshake with the gateway and surfaces the actual response:

  • Green checkmark — credentials are valid. You're ready to charge a sandbox card.
  • HTTP 401 — wrong API password or processing password.
  • HTTP 404 — wrong merchant ID or gateway URL (often a region-preset mismatch).
  • "Could not reach gateway" — outbound network or DNS issue from the Genius Checkout host.

Always test both modes

After saving, run the connection test once for test and once for live. A passing test mode says nothing about whether live works — the credentials and URLs are different secrets entirely.

Next step

Try a sandbox payment with a test card →

Released under the proprietary Genius Checkout license.