DEV Community

Cover image for An A-to-Z Guide to BVN Verification: What to Know and How to Integrate

An A-to-Z Guide to BVN Verification: What to Know and How to Integrate

The fintech industry in Nigeria is driving the adoption of truly digital financial services. From payment services to credit systems, we’ve seen the massive adoption of fintech. Individuals with active phone numbers can be quickly onboarded, be provided with a working account, and start making financial transactions. Traditional banks have adapted by adjusting their “Know Your Customer (KYC)” processes during account opening and other digital financial services.

At the heart of this digital transformation is the Bank Verification Number (BVN). The BVN has enabled banks, fintech, and other financial institutions (OFIs) to understand existing customers and identify new ones. As a developer in these industries, you must understand BVN and how to integrate it into your application.

In this guide, we will discuss BVN, why it is important, how the verification process works, and how to integrate it into your application. We will also cover the best practices you need to know when implementing BVN verification.

What is BVN?

BVN is an 11-digit number that is unique to an individual and can be used to identify the person across all bank institutions. It is a security measure implemented by the Central Bank of Nigeria (CBN) to uniquely identify customers and curb or reduce fraudulent activities.

BVN was first introduced by the CBN on February 14, 2014, under the Central Bank of Nigeria Act 1958. Its primary goal is to enhance customer confidence in the Nigerian banking system and protect financial transactions.

Why is BVN Verification Important?

For some years, PINs, passwords, and tokens have been the conventional methods most financial institutions use to authenticate customers. Despite the security they offer, they have also shown some lapses, especially when malicious actors get hold of such information.

BVN has become pivotal in the registration process for financial services. It is unique to an individual and contains details like name, phone number, date of birth, and biometric information. With this information, financial institutions can verify the customer's identity and legitimacy.

How Does BVN Verification Work?

When a customer provides their BVN, the financial institution can verify the individual’s identity and claim by checking their personal details such as name, date of birth, phone number, and biometric information.

BVN verification

How to Integrate BVN Verification Into Your Application

When you want to integrate BVN verification into your application (e.g., web and mobile), one of the most important decisions you’ll need to make is choosing the right BVN provider. The provider you choose can make or break your application's user experience. You need a reliable provider that offers a well-documented API and accessible support if you need assistance.

Flutterwave’s BVN verification services stand out as a best-in-class option for you, which supports an end-to-end verification process. To add BVN verification to your application, you’ll do the following:

  1. Activate the BVN Feature: Send an email to hi@flutterwavego.com to activate it.

  2. Get your API key: Log into your Flutterwave dashboard and navigate to the API keys section under the Settings menu.

Get API key

  1. Initiate Consent: Before you obtain a customer’s BVN details, you must first obtain their consent. To do this, use your API key to make a request to the initiate BVN consent endpoint by passing in the customer’s BVN, firstname, lastname, and redirect_url.

Using curl



curl -X POST https://api.flutterwave.com/v3/bvn/verifications \
-H "Authorization: Bearer your_secret_key_here" \
-H "Content-Type: application/json" \
-d '{
  "bvn": "your_bvn_here",
  "firstname": "John",
  "lastname": "Doe",
  "redirect_url": "add your redirect url here"
}'


Enter fullscreen mode Exit fullscreen mode

Using JavaScript



#using Fetch API
fetch('https://api.flutterwave.com/v3/bvn/verifications', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_secret_key_here'
  },
  body: JSON.stringify({
    bvn: 'your_bvn_here'
    firstname: 'John',
    lastname: 'Doe',
    redirect_url: 'add your redirect url here'
  })
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));


Enter fullscreen mode Exit fullscreen mode

Upon a successful request, Flutterwave provides a redirect link and a reference for the consent request. When your user follows the link, they will be prompted to enter their BVN, confirm their consent with a token, and select the information they wish to share with you.

  1. Retrieve BVN Information: After your customer gives their consent, they will be redirected to the redirect_url you provided, and you can then make a request to the verify BVN endpoint using the reference returned above.

Using curl



curl -X GET https://api.flutterwave.com/v3/bvn/verifications/your_reference_here \
-H "Authorization: Bearer your_secret_key_here" \
-H "Content-Type: application/json"


Enter fullscreen mode Exit fullscreen mode

Using JavaScript



#using Fetch API
fetch('https://api.flutterwave.com/v3/bvn/verifications/your_reference_here', {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_secret_key_here'
  }
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));


Enter fullscreen mode Exit fullscreen mode

To retrieve the customer data, you can either listen to a webhook or poll the BVN verification endpoint at regular intervals.

Best Practices for BVN Verification

Beyond Flutterwave providing a robust end-to-end endpoint to integrate BVN verification into your application, there are some important things you need to keep in mind when building an application that deals with customer data. Below are some points you should consider:

  • Avoid having your users fill in the same information twice. For example, you should pre-fill the BVN field after they provide it during the consent stage.
  • Never hardcode API keys into your codebase. Instead, use environment variables.
  • Ensure your application follows security best practices, such as using HTTPOnly cookies, implementing session timeouts, encryption, and more.
  • Associate the BVN consent reference with the customer for easy retrieval in subsequent interactions.

Next Steps

This post covered what the BVN is, why it’s important, how the verification process works, how to integrate it, and best practices for implementation. Beyond BVN verification, at Flutterwave, we offer a robust suite of products and APIs to help you move quickly and build financial services efficiently.

If you need further support or additional clarification, we have a dedicated team ready to assist you every step of the way. Reach out to Flutterwave support to get started.

Check out these resources to learn more:

You can also join our Slack community to stay up-to-date with our latest developments and connect with a vibrant network of users and developers.

Top comments (0)