BVN Verification with IdentityPass
For any fintech application in Nigeria, Identity Verification and KYC (Know Your Customer) are regulatory requirements. IdentityPass (by Prembly) offers robust APIs to handle this.
Getting Started
First, sign up for an IdentityPass account and retrieve your API keys.
The API Request
We will use Node.js and axios to make a server-side request. Never expose your secret keys in your frontend application.
const axios = require('axios');
async function verifyBVN(bvnNumber) {
try {
const response = await axios.post(
'https://api.myidentitypass.com/api/v2/biometrics/merchant/data/verification/bvn',
{ number: bvnNumber },
{
headers: {
'x-api-key': process.env.IDENTITYPASS_SECRET_KEY,
'app-id': process.env.IDENTITYPASS_APP_ID,
'Content-Type': 'application/json'
}
}
);
if (response.data.status) {
console.log('BVN Data:', response.data.bvn_data);
return response.data.bvn_data;
} else {
throw new Error('Verification failed');
}
} catch (error) {
console.error('Error verifying BVN:', error.response?.data || error.message);
throw error;
}
}
Data Handling & Security
- Do not store BVN data indefinitely. Only store the validation status or the minimum required information to prevent data exposure.
- Rate Limiting. Ensure your endpoint is rate-limited so users do not abuse the BVN checking service, which costs money per API call.
- Always use HTTPS.
By following these steps, you can safely integrate IdentityPass BVN checks into your onboarding flow.
Ready to start building?
Explore the most comprehensive directory of APIs for Nigerian developers and find exactly what you need.
Browse the API Directory