Skip to main content

Test environment

DPay Web EID provides a complete sandbox environment that lets you test an integration without affecting production or billing.

Sandbox vs production

FeatureSandboxProduction
Base URLhttps://WSKAZANY_PRZEZ_SUPPORT.snd.dpay.pl/api/v1https://WSKAZANY_PRZEZ_SUPPORT.dpay.pl/api/v1
API keysdeid_test_xxxdeid_live_xxx
BillingNone - test sessions are not billedFull billing
Demo providerAvailableAvailable (for testing)
Real dataNoYes

Switching between environments

To switch your integration between environments, replace:

  1. Base URL - with the correct host
  2. 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, staging and production - 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_id to 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