Test mode vs live mode
The platform encodes the environment inside the credential itself.
There is no separate sandbox.* host or --test flag.
Credential prefixes
| Prefix | Mode | Where to use |
|---|---|---|
dv_sk_test_… | test | Server side: local dev, CI, integration tests, demos |
dv_sk_live_… | live | Server side: production traffic |
dv_pk_test_… / dv_pk_live_… | test / live | Public keys, safe to embed in an app; identify the tenant and mode, grant nothing by themselves |
dv_tok_test_… / dv_tok_live_… | test / live | Session tokens minted by POST /v1/sessions with a secret key of the same mode |
The mode of any credential is the third segment of the string, so a client can read it without decoding anything:
final mode = token.split('_')[2]; // 'test' or 'live'
client, _ := ekyc.NewClient(ekyc.Config{APIKey: "dv_sk_test_..."})
client.Mode // "test"
Behavioural differences
The same endpoints serve both modes, and the same models score both. The platform treats them differently in these places:
- Data separation. Every stored result carries its mode, and the dashboard's live ⇄ test toggle shows one at a time. A test-mode token cannot read live-mode results and vice versa.
- Usage and billing. Usage is metered per mode and shown separately on the dashboard's Usage page. Plan quotas and invoices are based on live usage.
- Webhooks. An endpoint is registered for one mode; test events go only to endpoints registered for test mode.
- Rate limits. A test secret key is limited to 25 requests per second (burst 50) against 100 per second (burst 200) for a live key. Session tokens are limited to 10 requests per minute (burst 20) in both modes.
- Liveness replay window. A frame that was already scored is refused for 24 hours under a live key but only 60 seconds under a test key, so integration tests can reuse a fixture image. See Liveness checks.
- Component scores. Liveness responses in test mode always include the
per-model
componentsbreakdown; in live mode they do so only when ops enable it for your tenant. - Storage. Test-mode results follow the same storage policy and retention settings as live; there is no separate test-mode purge.
- Decision thresholds apply to both modes. The dashboard's Decision thresholds page has no per-mode split.
Mistakes to avoid
- Never log a
dv_sk_*key. Logging frameworks often capture full HTTP headers. Configure scrubbing. - Don't use a
dv_sk_live_…in development. Test keys exist so you can iterate without polluting your live data. - Don't accept a
dv_tok_live_…in a debug build. Read the mode from the prefix and refuse live tokens where you expect test ones.