Physical POS
Environments

Environments

Test and live keys use the same address: https://api-gateway.lunixi.com/api/v1/physical-pos. There is no separate test address. The key you sign the request with decides the environment:

KeyEnvironment
mk_test_…Test (TEST)
mk_live_…Live (LIVE)

Do not send the environment in the request. If you send an environment field in the query or the body (whatever its value), the request gets 400 physical_pos.input.environment_invalid with details.field environment and details.reason not_allowed.

A test key can only read

In Physical POS, a test key can only read every record. Every request that creates a record, changes it or changes its status (all POST and PATCH endpoints) gets 403 physical_pos.environment.test_key_read_only with a test key. The request is rejected without touching any record.

Manage records with a live key or in the panel. You can call every GET endpoint with a test key.

A test key sees the same stores and registers as a live key. Because terminal and device records cannot be created in the test environment, a test key's terminal, bank row, device and device link lists come back empty.

You can try the read flows and signature, authentication and scope errors with a test key. Write flows work only with a live key; keep the live key on your server only.

Which record lives where

RecordEnvironmentWith a test keyWith a live key
Catalog (vendors, models, banks)Platform-wideReadRead
StoreEnvironment-lessReadRead and write
RegisterEnvironment-lessReadRead and write
Logical terminalThe record's environmentRead (the list comes back empty)Live terminals, read and write
Bank rowThe terminal's environmentRead (the list comes back empty)Read and write
DeviceThe record's environmentRead (the list comes back empty)Live devices, read and write
Device linkThe terminal's environmentRead (the list comes back empty)Read and write
Overview countsMixedStore and register counts are environment-less; terminal and device counts come from testStore and register counts are environment-less; terminal and device counts come from live

Stores and registers are environment-less

Your stores and registers are your real-world points of sale; test and live keys see the same store and register records.

Terminal and device records are environment-bound

Logical terminal and device records belong to an environment, and their environment never changes. A terminal's bank rows and device links are in the terminal's environment too.

  • A key sees only the terminals and devices in its own environment.
  • A request for a record in the other environment gets the same 404 as a record that does not exist (for example 404 physical_pos.terminal.not_found).
  • A terminal code is unique within an environment.
  • A device can be linked only to a terminal in its own environment.
  • The environment field in responses shows the record's environment (TEST or LIVE).

Idempotency keys are separated by environment

Idempotency-Key values are kept separately per key environment. Details: Common Rules › Idempotency-Key.

Related