Skip to main content

Pay-by-link (Czech Republic)

tip

Accepting this payment channel requires an additional agreement with the acquiring agent designated by dpay.pl.

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.

Looking for Slovak bank payments? See Pay-by-link (Slovakia).

POST/api/v1_0/payments/registerFull payment registration contract: parameters, checksum, and error codes.Full contract in the API Reference

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"
emailstringCustomer email address"customer@example.com"
client_namestringCustomer first name"Jan"
client_surnamestringCustomer surname"Novak"
accept_tosbooleanConfirmation that the customer has accepted the terms and conditionstrue
url_successstringURL after a successful payment"https://myshop.example/success"
url_failstringURL after a failed payment"https://myshop.example/failure"
url_ipnstringURL for IPN notifications"https://myshop.example/api/ipn"
checksumstringSHA-256 checksum(see below)
The channel field is required

For a white-label integration, the channel field is mandatory. Without it, the system will not know which bank to redirect the customer to. Providing channel also requires the email, client_name, client_surname, and accept_tos fields; omitting any of them results in a validation error (HTTP 422).

Generating the checksum

The checksum is generated in the same way as for 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",
"email": "customer@example.com",
"client_name": "Jan",
"client_surname": "Novak",
"accept_tos": true,
"url_success": "https://myshop.example/success",
"url_fail": "https://myshop.example/failure",
"url_ipn": "https://myshop.example/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.example/success';
$urlFail = 'https://myshop.example/failure';
$urlIpn = 'https://myshop.example/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,
'email' => 'customer@example.com',
'client_name' => 'Jan',
'client_surname' => 'Novak',
'accept_tos' => true,
'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'] === true && !$result['error']) {
header('Location: ' . $result['msg']);
exit;
}

API response

Success

{
"error": false,
"msg": "https://secure.dpay.pl/transfer@pay@abc-def-123-456",
"status": true,
"transactionId": "abc-def-123-456"
}

The status field is a boolean (true/false), while msg contains the URL to which you should redirect the customer. The customer will be taken directly to the selected bank.

IPN handling

IPN notifications work in the same way as for standard payments. See IPN handling for details.

Currency

Use the CZK currency for Czech banks. Using an incorrect currency results in a transaction error.