Live vs. test mode

How Preczn's Test and Live environments differ, what is isolated between them, and how to select a mode from the API or the dashboard.

Every Preczn platform has two modes: Test mode and Live mode. Both use the same API host and the same Dashboard. The mode decides which records you see and whether transactions go to each processor's sandbox or to production.

Your platform starts in Test mode. Preczn turns on Live mode when you're ready to process real payments.

The following diagram shows how a request finds its mode:

flowchart LR
    A["Your request"] --> B["<img src='https://files.readme.io/cf81688a760902dd88bc091cf29030cb150243a4dfad5e5fa2044ddb12dabb5e-Preczn_logo_white.png' width='110' /><br/>The API key's mode decides"]
    B -->|"Test mode key"| C["Test mode records<br/>and processor sandboxes"]
    B -->|"Live mode key"| D["Live mode records<br/>and processor production"]
    classDef platform fill:#2563eb,stroke:#1d4ed8,color:#ffffff
    classDef preczn fill:#4013be,stroke:#300e90,color:#ffffff
    classDef test fill:#b45309,stroke:#92400e,color:#ffffff
    classDef live fill:#059669,stroke:#047857,color:#ffffff
    class A platform
    class B preczn
    class C test
    class D live

What each mode keeps separate

Each record belongs to one mode and can't be seen from the other. Nothing copies or moves records between modes.

Kept separate in each modeShared by both modes
Merchants, with their locations, owners, and documentsYour platform
Connections and their processor credentialsDashboard users and their roles
Plans and routing rulesThe activity log
Tokens
Transactions
Boarding forms and form templates
Webhook subscriptions and their delivery history
API keys

Because users are shared, one login works in both modes.


How the API picks a mode

The API key you send decides the mode. There's no mode header, query parameter, or second host. A Test mode key reads and writes only Test mode records, and a Live mode key only Live mode records.

A key's mode is fixed when you create it. To move an integration to Live mode, generate a Live mode key and use it in place of the Test mode key. Nothing else about your requests changes. For the key prefixes, see API keys.

Test mode object IDs carry test_ in their prefix, so your logs show the mode too. See Object ID prefixes.


How the Dashboard picks a mode

The mode pill in the top bar shows TEST or LIVE. Every page shows only the current mode's records until you switch.

  • To switch to Test mode, select the pill.
  • To switch to Live mode, select the pill, then select Switch to Live in the confirmation.
TEST
Switch to Live mode?
Real transactions and data will be affected.
Cancel Switch to Live

Before Live mode is on for your platform, the pill is disabled and says to contact Preczn. A Dashboard user whose account is limited to Test mode can't switch either. An administrator can lift that limit in User Management.

📘

Check the mode before you look for missing data

An empty merchant list or a transaction you can't find is usually the other mode, not a missing record. Check the pill in the Dashboard, or the prefix of the API key you sent.


Where test transactions go

A Test mode transaction goes to a real processor's sandbox, not to production. Preczn applies your Test mode plans and routing rules the same way it applies them in Live mode. Test transactions don't move money.

Your Test mode connections need each processor's sandbox credentials, and your Live mode connections need production credentials. See Add a connection to your platform.

For test card numbers and bank accounts, see Test data.


Webhooks in each mode

Each webhook subscription belongs to the mode it was created in and receives only that mode's events. To receive the same events in both modes, create one subscription in each mode. Point the Test mode subscription at a development endpoint, so test activity never reaches your production systems. See Subscribe to webhooks.


Move to Live mode

Preczn turns on Live mode for your platform. It isn't a setting you change. Contact your Preczn representative when these are true:

  1. Your integration processes Test mode transactions end to end.
  2. Your plans and routing rules route the way you expect in Test mode.
  3. You have production credentials from each processor you plan to use.
  4. Your webhook endpoint verifies signatures and handles your events.

Live mode starts empty. Create your Live mode merchants and connections, add production credentials, create your plans and rules, generate Live mode API keys, and create Live mode webhook subscriptions.


Did this page help you?