Test environment
DPay Web EID provides a complete sandbox environment that lets you test an integration without affecting production or billing.
Sandbox vs production
| Feature | Sandbox | Production |
|---|---|---|
| Base URL | https://WSKAZANY_PRZEZ_SUPPORT.snd.dpay.pl/api/v1 | https://WSKAZANY_PRZEZ_SUPPORT.dpay.pl/api/v1 |
| API keys | deid_test_xxx | deid_live_xxx |
| Billing | None - test sessions are not billed | Full billing |
| Demo provider | Available | Available (for testing) |
| Real data | No | Yes |
Switching between environments
To switch your integration between environments, replace:
- Base URL - with the correct host
- API key - with a key for the relevant environment
PHP example:
<?php
$baseUrl = getenv('APP_ENV') === 'production'
? 'https://WSKAZANY_PRZEZ_SUPPORT.dpay.pl/api/v1'
: 'https://WSKAZANY_PRZEZ_SUPPORT.snd.dpay.pl/api/v1';
$apiKey = getenv('DPAY_EID_API_KEY'); // deid_live_xxx or deid_test_xxx
Demo provider
Both environments, sandbox and production, include a special demo provider. It lets you test the entire verification flow without integrating with real providers such as mObywatel or banks.
A session that uses the demo provider waits for manual approval or rejection in the administration panel. It is ideal for:
- End-to-end integration pipeline tests
- Demonstrating the integration to clients
- Testing webhook handlers
curl -X POST https://WSKAZANY_PRZEZ_SUPPORT.snd.dpay.pl/api/v1/verifications \
-H "Authorization: Bearer deid_test_your_key" \
-H "Content-Type: application/json" \
-d '{"provider": "demo"}'
See Verification methods - Demo for details of how the Demo provider works.
Best practices
- Keep separate keys for
local,stagingandproduction- never use a production key in a development environment - Log session IDs during testing so that you can find the sessions later in the panel
- Use
external_idto map EID sessions to your own order or application identifiers - Configure webhooks in the sandbox using a tunnel such as ngrok to test a local endpoint