One-time payment

One-time payments are simple to set up since no token, scope, or exchange code is required. To make a one-time payment, the user must first log in and select a bank account.

If you want your consumers to be able to bypass the login or account selection part of the bank payment process, then the account linking feature is a must-have. Once your client links their bank account, all the payments for the next 90 days can be done in one click.

Bank payment

  1. Initiate payment by calling the /pis/payment endpoint with a bankPaymentMethod object (please use your valid IBAN instead of the example LT000000000000000000):

The example below is written using kevin. PHP library. All other possible attributes and their explanations can be found in the API documentation.

use Kevin\Client;

$clientId = 'my-client-id';
$clientSecret = 'my-client-secret';
$options = ['error' => 'array', 'version' => '0.3', 'lang' => 'en'];

$kevinClient = new Client($clientId, $clientSecret, $options);

$attr = [
    'Redirect-URL' => 'https://redirect.kevin.eu/payment.html',
    'bankId' = 'SEB_LT',
    'redirectPreferred' = false,
    'description' => 'Test',
    'currencyCode' => 'EUR',
    'amount' => '0.01',
    'bankPaymentMethod' => [
        'endToEndId' => '1',
        'creditorName' => 'John Smith',
        'creditorAccount' => [
            'iban' => 'LT000000000000000000'
        ],
    ],
];

$response = $kevinClient->payment()->initPayment($attr);

2. From the payment initiation request you will receive a confirmLink. The payment link can lead the user to kevin. frame page or bank environment. At the beginning, the payment will have a default started status group and remains in such status until client confirms the payment. The payment link expires after 7 days and cannot be reused.

{
    "id": "e4dd60bb-574f-4a13-910a-57c9795d905f",
    "bankStatus": "STRD",
    "statusGroup": "started",
    "confirmLink": "https://psd2.kevin.eu/payment/confirm?paymentId=e4dd60bb-574f-4a13-910a-57c9795d905f"
}

3. If you set the optional Webhook-URL header, as soon as the payment reaches its final status, we will send a request to your provided url. You can read more in the section below:

Payment verification

Bank selection

Bank selection can take place either on your or kevin. side. If you choose the first option, you must provide the bankId query parameter in your payment initiation request. The supported bank list can be obtained from the /auth/banks endpoint. Additionally, your custom checkout page must contain a Terms and Conditions agreement checkbox.

A default country in the kevin.'s frame page is determined by IP address. This behaviour could be overridden by passing country code as a query parameter (for more details please check Frame customisation). If a determined country does not have any banks integrated, the bank list will be empty.

If your project is a test one, you will receive a list of test banks only, which is different comparing to live project bank list. In such situation, payments are not real. Test banks have their own login credentials.

Payment flow

With the redirectPreferred query parameter, you can determine the payment flow. If set to true, flow will be based mostly on the bank side. Otherwise, if set to false and the bank supports such feature, on kevin. side. To verify if such feature is supported, you can get the information about banks from the /auth/banks endpoint.

Last updated