Skip to content

Test mode and live mode

cTpeWay has two modes. They are two separate places, not a setting on your data.

Test mode Live mode
Funds Test coins with no value. Real funds.
Networks Public test networks. The real networks.
API key starts with ctp_test_sk_ ctp_live_sk_
Data Its own invoices, addresses, payments, webhook endpoints and keys. Its own, never mixed with test data.
Payment simulator Available. Not available.

There is no “mode” parameter in the API. A request is a test request or a live request because of the key that signs it:

Prefix What it is
ctp_test_sk_ Secret key, test mode.
ctp_live_sk_ Secret key, live mode.
ctp_test_pk_, ctp_live_pk_ Publishable keys for the browser. See API keys and domains.
whsec_ The signing secret of a webhook endpoint.

Moving your integration from test to live is a change of key and nothing else in your code.

Everything that belongs to you exists once per mode:

  • invoices, reusable deposit addresses, payments and settlements;
  • API keys and webhook endpoints, each with its own signing secret;
  • master wallets and addresses. Your test addresses are on test networks.

An object created with a test key cannot be read with a live key, and the other way round.

Objects and events carry a boolean livemode. It is false for everything from test mode, so a webhook handler can tell the two apart.

Test mode is not a mock. It runs on public test networks with the same rules as live mode:

  • payments are detected and confirmed on the test network;
  • the 0.5% platform fee and the network fees are charged, in test coins;
  • a token deposit is Held when the test master wallet is short of native coin, and released when you top it up.

So you can watch a deposit go from Pending to Held to Released before any real money is involved. See Settlement and the platform fee.

You do not need test coins to begin. The payment simulator creates payments with no network and no faucet. See Testing.

  • The Test / Live switch is in the top bar on every page.
  • In test mode the dashboard carries a coloured band, and every list, key and invoice shows a Test badge.
  • A new account starts in test mode, with a checklist that ends with going live.
  • An account moved from cTpeWay v1 opens in live mode, with test mode one click away.

A test invoice shows a banner, Test invoice — no real funds, names the test network on every network label, and links to a faucet.

In live mode, webhook URLs and checkout redirect URLs must be on a domain you have verified. In test mode localhost and hostnames ending in .test are accepted as well, so you can develop on your own machine. See API keys and domains.

When your integration works in test mode, follow Going live.