Payment Initiation

Note: this tutorial is only dedicated to point out which API methods should be used in order to correctly implement our mobile SDK for online payments. Full API docs can be found at docs.kevin.eu.

Initiating bank payment

We do support both authenticated and unauthenticated bank payments. Unauthenticated bank payments are easy to implement. However, the user will be asked to log in to his bank account each time he wants to make a payment.

Authenticated bank payments will skip login steps, but implementation requires an already authenticated bank account. Instructions on how to authenticate the user bank account can be found here:

pageAuthentication

API method structure can be found here.

Example using our PHP library:

$client = new Client($id, $secret, ['version' => '0.3', 'error' => 'array']);
$attrs = [
    'Authorization' => 'account-bearer-token', // optional, will allow to skip login
    'Redirect-URL' => 'https://your.callback.url', // must match SDK callback url
    'Webhook-URL' => 'https://your.webhook.url', // optional, add if you want to track payment execution state
    'description' => 'your-description',
    'currencyCode' => 'EUR',
    'amount' => '0.01',
    'bankPaymentMethod' => [
        'endToEndId' => '1',
        'creditorName' => 'your-creditor-name',
        'creditorAccount' => [
            'iban' => 'your-creditor-iban',
        ],
    ],
];
$response = json_encode($client->payment()->initPayment($attrs));

Received payment id should be passed to the SDK when attempting to perform the payment. We do recommend providing a Webhook-URL parameter (or a header if used not in PHP library), because mobile SDK will treat payment as successful even if the returned status in will be returned as pending (which not always might result as successful).

Last updated