Test and live mode
Every account has two modes. The API key decides which one a request uses: ps_ keys work in test mode, ps_ keys in live mode. Both use the same address, https://api..
What test mode does
- Sends nothing. Notices by e-mail and SMS go to a test sink, never to a real address or phone. The delivery still moves on as if they were sent: you get
delivery.and the rest.notified - Costs nothing. Test deliveries are never billed and do not use the free allowance.
- Keeps the two apart. Test mode and live mode never see each other's deliveries, files, batches or events. Asking for an object from the other mode answers
404, the same as for one that does not exist. - Runs the same code. Everything else works as in live mode: validation, idempotency, webhooks, the recipient's page, the certificate.
Deliveries, batches and webhook endpoints carry livemode. A webhook endpoint made with a test key receives only test-mode events, and one made with a live key only live ones.
The recipient's side in test mode
Open the delivery's delivery_ yourself to act as the recipient. Each verification_ works like this in test mode:
| Level | In test mode |
|---|---|
low | The link alone, as in live mode. |
medium | No SMS is sent. The code is always 000000. |
substantial | The ID document check runs in the provider's sandbox. |
high | eID sign-in goes through the eID providers' test systems: sign in with a test identity, never a real one. |
Moving to live
- Make a live key in API keys in the portal, with only the permissions it needs.
- Store it in your secret store, and switch the key your code reads. Nothing else changes: same address, same requests.
- Choose a plan in the portal before you send more than the free allowance.
A live key sends real notices to real people. Keep it out of logs, URLs and front-end code.