Skip to main content

Pay-by-link (Czech Republic)

dpay.pl enables direct integration with banks in the Czech Republic using the white-label method (Pay-by-Link). The customer is redirected directly to the selected bank, without an intermediary gateway page.

Supported banks

BankChannel IDCurrency
Ceska sporitelna332CZK
mBank (CZ)333CZK
Komercni banka336CZK
Raiffeisenbank (CZ)337CZK
Moneta Money Bank340CZK
Fio Banka343CZK
CSOB346CZK
UniCredit Bank (CZ)349CZK

Endpoint

Use the standard payment registration endpoint:

POST https://api-payments.dpay.pl/api/v1_0/payments/register
Content-Type: application/json

Request parameters

All fields are required:

FieldTypeDescriptionExample
transactionTypestringTransaction type"transfers"
servicestringService name from the panel"abc123"
valuestringTransaction amount"499.00"
currency_codestringCurrency code"CZK"
channelstringPayment channel ID (bank)"332"
url_successstringURL after successful payment"https://myshop.com/success"
url_failstringURL after failed payment"https://myshop.com/error"
url_ipnstringURL for IPN notifications"https://myshop.com/api/ipn"
checksumstringSHA-256 checksum(see below)
The channel field is required

For white-label integration, the channel field is mandatory. Without it, the system will not know which bank to redirect the customer to.

Generating the checksum

The checksum is generated identically to a standard payment:

sha256({service}|{SecretHash}|{value}|{url_success}|{url_fail}|{url_ipn})

Request example

cURL

curl -X POST https://api-payments.dpay.pl/api/v1_0/payments/register \
-H "Content-Type: application/json" \
-d '{
"transactionType": "transfers",
"service": "abc123",
"value": "499.00",
"currency_code": "CZK",
"channel": "332",
"url_success": "https://myshop.com/success",
"url_fail": "https://myshop.com/error",
"url_ipn": "https://myshop.com/api/ipn",
"checksum": "e3b0c44298fc1c149afb..."
}'

PHP

<?php
$service = getenv('DPAY_SERVICE');
$secretHash = getenv('DPAY_SECRET_HASH');

$value = '499.00';
$currencyCode = 'CZK';
$channel = '332'; // Ceska sporitelna
$urlSuccess = 'https://myshop.com/success';
$urlFail = 'https://myshop.com/error';
$urlIpn = 'https://myshop.com/api/ipn';

$checksum = hash('sha256',
$service . '|' . $secretHash . '|' . $value . '|' .
$urlSuccess . '|' . $urlFail . '|' . $urlIpn
);

$payload = json_encode([
'transactionType' => 'transfers',
'service' => $service,
'value' => $value,
'currency_code' => $currencyCode,
'channel' => $channel,
'url_success' => $urlSuccess,
'url_fail' => $urlFail,
'url_ipn' => $urlIpn,
'checksum' => $checksum,
]);

$ch = curl_init('https://api-payments.dpay.pl/api/v1_0/payments/register');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_RETURNTRANSFER => true,
]);

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);

if ($result['status'] === 'success') {
header('Location: ' . $result['message']);
exit;
}

API response

Success

{
"status": "success",
"message": "https://api-payments.dpay.pl/pay/redirect/abc-def-123",
"transactionId": "abc-def-123-456"
}

After clicking the URL from message, the customer will be redirected directly to the selected bank.

IPN handling

IPN notifications work identically to standard payments. See IPN Handling for details.

Currency

For Czech banks, use the CZK currency. Using an incorrect currency will cause a transaction error.