paytrack docs
Testing
Use test keys and controlled failures before connecting live payment operations.
What test keys can do
Test keys (ptrk_test_) are read-only. They read your real workspace data, so you can build and check list, detail and report calls safely, but they can never create, change or delete anything.
Any write with a test key (POST, PATCH, DELETE) is refused with HTTP 403 and the error code test_mode_read_only. Nothing is recorded and no money moves.
Sandbox (rolling out)
When the sandbox is switched on, a test key works on your workspace's own sandbox instead: a separate practice workspace, created the first time you use the key, with five sample customers. You can create and change customers, payment plans, payments and webhooks there freely. Nothing in the sandbox touches your real records, appears in the paytrack app or sends any message.
Anything that could charge a real card stays live-only: creating payment mandates or collection schedules with a test key returns 403 not_available_in_sandbox.
Writes need a live key
Live test requests
The playground sends live browser requests only when you paste a copied test key. Existing raw keys cannot be recovered, and the playground does not generate fake request IDs.
Test checklist
- Create a test key and call
/account. - Send a
POSTwith the test key and confirm the API returns403 test_mode_read_only. - Revoke a test key and confirm the API returns
401. - Send a malformed key and confirm the invalid key response.
- Remove a required scope and confirm the API returns
403. - Test plan-restricted endpoints such as reports, reminders, or webhooks.
- Send a test webhook and verify your endpoint signature check.
- Review request IDs in Developer Logs after every test.
Playground usage
// Paste a ptrk_test_ key only when you want to test live API behavior. // Never paste ptrk_live_ keys into browser tooling.