Test mode
Every merchant account has a test mode beside its live mode. Use it while you build and in your CI: the API is the same, nothing in test mode moves real money, and test data never mixes with live data.
One host, the key decides
Section titled “One host, the key decides”There is one API address for both modes. The key you send decides the mode of a request:
| Key | Mode |
|---|---|
sk_test_<market>_… |
Test: test data, no real money |
sk_live_<market>_… |
Live: real payments, real money |
There is no test host, no test flag and no test parameter: switching your integration to live is switching its key. A request has no other way to choose its mode, so a test key never reaches live data, and a live key never reaches test data.
Every object says which mode it was made in: livemode is true for a payment made with a live key and false for one made with a test key. Object ids look the same in both modes.
What is separate
Section titled “What is separate”Test mode has its own environment for each market, and in it:
- its own keys: test keys are made and listed in the merchant portal in Test mode (API keys), and work only in test mode;
- its own payments, and its own webhook endpoints and the events they are sent;
- no money and no payer: the UTR a test payment is confirmed with decides what happens to it. Magic UTRs take it to any status you choose; any other UTR leaves it
processing, as a live payment whose money nobody has seen yet, until its late-payment window closes and it fails (Testing); a test payout (once your market takes payouts) is sent nowhere, and its amount’s last two digits, magic amounts, take it topaid,failedorrequires_review(Payouts › Test mode); - a rate limit: 25 requests a second per test key, 100 per account (Rate limits);
- a retention: test payments are deleted 90 days after they were made.
What is shared: your merchant, its accounts and their ids, your team and their roles, and your payout addresses: both modes list the same ones. Both modes run the same API versions, so try a new version in test mode first, with the PSP-Version header. The IP allowlist limits live keys only: test keys work from anywhere, your laptop and CI too.
Everything else is live
Section titled “Everything else is live”A test payment goes through the statuses, amounts and errors a live payment would on the same path, and a test request is checked as strictly as a live one: the same parameters, the same errors, the same idempotency. An integration that works in test mode works in live mode with its live key.
A market with no test environment refuses its test keys with 404 resource_missing.
Try it
Section titled “Try it”The API reference sends real requests to test mode: open an endpoint under Resources, choose Test request, and paste a test key under Authentication. The key stays in the page and is gone when you close it; the docs refuse a live key before anything is sent.