Links

Refunds

If the card payment method is enabled, you have card refunds as well. However, bank refunds are not enabled by default. If you would like to start using kevin. bank refunds, please contact our support team at [email protected].
Refunds can be either full or partial and are applicable to both card and bank payments. You can refund the payment multiple times without exceeding the initial payment amount with a partial refund.
The merchant must initiate each refund by indicating the refund amount. Everything else is handled by kevin. Every card payment refund is received the following night. Bank payment refunds are received on a daily basis on the next workday.
Refunds can be initiated in multiple ways:
  1. 1.
    On the most popular kevin. modules, such as WooCommerce, PrestaShop, Opencart, Magento, etc.
  2. 3.
    Using kevin. API.
Please note, that the refund option is only available for the merchants who have a transit account with kevin.
Currently, bank refunds can be processed in EUR and PLN currencies. To process a bank refund, payments must be collected to kevin. internal account.
Bank refund process

Initiate payment refund

Full or partial refunds are initiated the same way. In both cases, it is required to indicate the refund amount. If the total sum of refunds exceeds the payment amount, then the refund will not be initiated.
PHP
Node.js
cURL
The example below is written using kevin. PHP library.
1
use Kevin\Client;
2
3
$clientId = 'my-client-id';
4
$clientSecret = 'my-client-secret';
5
$options = ['error' => 'array', 'version' => '0.3', 'lang' => 'en'];
6
7
$kevinClient = new Client($clientId, $clientSecret, $options);
8
9
$paymentId = 'my-payment-id';
10
$attr = [
11
'amount' => '0.01',
12
'Webhook-URL' => 'https://example.com/notify'
13
];
14
15
$response = $kevinClient->payment()->initiatePaymentRefund($paymentId, $attr);
The example below is written using kevin. Node.js library.
1
const options = {
2
paymentId: 'my-payment-id',
3
amount: '1.23',
4
};
5
6
const refund = await client.payment.initiatePaymentRefund(options);
curl --request POST \
--url https://api.kevin.eu/platform/v0.3/pis/payment/{paymentId}/refunds \
--header 'Client-Id: my-client-id' \
--header 'Client-Secret: my-client-secret' \
--header 'Content-Type: application/json' \
--header 'Webhook-URL: https://example.com/notify' \
--data '{
"amount": "0.01"
}'

Get payment refunds

Because multiple refunds are allowed for a single payment, the list of refunds for an individual payment can be retrieved.
PHP
Node.js
cURL
The example below is written using kevin. PHP library.
1
use Kevin\Client;
2
3
$clientId = 'my-client-id';
4
$clientSecret = 'my-client-secret';
5
$options = ['error' => 'array', 'version' => '0.3', 'lang' => 'en'];
6
7
$kevinClient = new Client($clientId, $clientSecret, $options);
8
9
$paymentId = 'my-payment-id';
10
$response = $kevinClient->payment()->getPaymentRefunds($paymentId);
The example below is written using kevin. Node.js library.
1
const kevin = require('@kevin.eu/kevin-platform-client');
2
3
const clientId = 'my-client-id';
4
const clientSecret = 'my-client-secret';
5
6
const client = new kevin.Client(clientId, clientSecret);
7
8
const paymentId = 'my-payment-id';
9
10
const response = await client.payment.getPaymentRefunds(paymentId);
11
12
const paymentRefunds = response.data;
curl --request GET \
--url https://api.kevin.eu/platform/v0.3/pis/payment/{paymentId}/refunds \
--header 'Client-Id: my-client-id' \
--header 'Client-Secret: my-client-secret'