kevin. Mobile SDK
Search…
⌃K

Payment Initiation

Good to know: payment initiation is responsible for bank and card payment support.
For initialising the payment initiation flow, you will need to get the payment id and pass it to the SDK. The description of how to get a payment id can be found here.

Customise session configuration

Firstly, you will need to integrate kevin. API and fetch payment ID. Instructions on how to do it can be found here:
PaymentSessionConfiguration has multiple settings to tackle:
  • paymentType - sets payment to be BANK or CARD. The payment needs to be initialised with the corresponding type. See reference here.
  • preselectedCountry - preselects country in our prebuilt UI
  • disableCountrySelection - uses only preselected country and does not allow to change it
  • countryFilter - allows only certain countries to be supported
  • bankFilter - allows to filter banks and show only selected ones to user. It accepts list of bank ids that should be show to user.
  • preselectedBank - preselects bank in our prebuilt UI
  • skipBankSelection - skips bank and country selection and redirects user to the bank SCA immediately
  • skipAuthentication - allows users to skip the SCA bank step and proceed directly to the payment confirmation. Bank payment needs to be initialised with an account access token. See reference here.
// initialize configuration with paymentId fetched from the API
const config = KevinPaymentSessionConfiguration(
paymentId: 'paymentId',
paymentType: KevinPaymentType.bank,
preselectedCountry: KevinCountry.lithuania,
countryFilter: [
KevinCountry.lithuania,
KevinCountry.estonia,
KevinCountry.latvia,
],
bankFilter: ['SWEDBANK_LT', 'SEB_LT', 'LUMINOR_LT', 'REVOLUT_LT'],
preselectedBank: 'SOME_BANK_ID',
);

Initialise payment

Call startPayment() method and wait for the result.
const config = KevinPaymentSessionConfiguration(
paymentId: 'paymentId',
paymentType: KevinPaymentType.bank,
preselectedCountry: KevinCountry.lithuania,
);
final result = await KevinPayments.startPayment(config);