Node.js Library

🪢 Flick PaymentSDK is a secure and quick way to for customer to access accounts and interacting with Flick API (Identity, Financial Data, Payout, Collections, Misc) Flick Payment SDK is a drop-in framework that handles connecting a financial institution to your app (multi-factor authentication, error handling, credential validation, etc). It works with all major Typescript and javascript frameworks.

Getting Started

• Register on the Flick website and get your public and secret keys.

• Set up a server to exchange tokens to access user financial data with your Flick secret key.

Installation

Step 1: You can install the package using NPM or Yarn

 npm install flickpaysdk

or

yarn add flickpaysdk

• Then add it into your project;

const  Flickpay = require('flickpay-sdk');

 if you're using ES6 modules

import Flickpay  from 'flickpaysdk'

Step 2: Initializing Flickpay

To initialize the Flickpay SDK, create a new instance of the Flickpay class with your secret key.

const flickpay = new Flickpay('YOUR_SECRET_KEY');

Step 3: Checkout Process

You can initiate a checkout process using the flickCheckOut method

const checkoutRequest = {
    amount: '1000',
    Phoneno: '1234567890',
    currency_collected: 'NGN',
    currency_settled: 'USD',
    email: < '[email protected]',
    redirectUrl:'https://example.com/redirect',
    webhookUrl: 'https://example.com/webhook',
    transactionId:'1234567890'
};

flickpay.flickCheckOut(checkoutRequest)
    .then(response => {
        console.log(response);
    })
    .catch(error => {
        console.error(error);
    });

Best Practices

Always handle errors returned by API calls. • Securely store and handle secret keys to prevent unauthorized access.