@@ -212,9 +212,9 @@ Sample Response
212212}
213213```
214214
215- ## Resolve bvn details
215+ ## Initiate BVN Consent
216216
217- This describes how to fetch bvn information
217+ This describes how to initiate bvn consent flow for your customer.
218218
219219``` javascript
220220const Flutterwave = require (' flutterwave-node-v3' );
@@ -223,11 +223,14 @@ const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_K
223223
224224
225225
226- const resolveBvn = async () => {
226+ const initiateBvn = async () => {
227227
228228 try {
229229 const payload = {
230- " bvn" : " 123456789010"
230+ " bvn" : " 12347832211" ,
231+ " firstname" : " Lyra" ,
232+ " lastname:" " Balacqua" ,
233+ " redirect_url" : " https://example-url.company.com"
231234 }
232235 const response = await flw .Misc .bvn (payload)
233236 console .log (response);
@@ -238,35 +241,65 @@ const resolveBvn = async () => {
238241}
239242
240243
241- resolveBvn ();
244+ initiateBvn ();
242245```
243246
244247Sample Response
245248
246249``` javascript
247250{
248- " status" : " success" ,
249- " message" : " BVN details fetched" ,
250- " data" : {
251- " bvn" : " 123456789" ,
252- " first_name" : " Wendy" ,
253- " middle_name" : " Chucky" ,
254- " last_name" : " Rhoades" ,
255- " date_of_birth" : " 01-01-1905" ,
256- " phone_number" : " 08012345678" ,
257- " registration_date" : " 01-01-1921" ,
258- " enrollment_bank" : " 044" ,
259- " enrollment_branch" : " Idejo" ,
260- " image_base_64" : null ,
261- " address" : null ,
262- " gender" : " Male" ,
263- " email" : null ,
264- " watch_listed" : null ,
265- " nationality" : " Nigerian" ,
266- " marital_status" : null ,
267- " state_of_residence" : null ,
268- " lga_of_residence" : null ,
269- " image" : null
251+ " status" : " success" ,
252+ " message" : " Bvn verification initiated" ,
253+ " data" : {
254+ " url" : " https://nibss-bvn-consent-management.dev-flutterwave.com/cms/BvnConsent?session=MWNkNDI4ZWYtMjgwNy00ZjA1LWE5NzUtNzUyZGUyZDRjZWQz" ,
255+ " reference" : " FLW71DC60942BAD76D2BD5B4E"
256+ }
257+ }
258+ ```
259+
260+ ## Verify BVN consent
261+
262+ This describes how to Verify consent and retirve the customer's BVN information.
263+
264+ ``` javascript
265+ const Flutterwave = require (' flutterwave-node-v3' );
266+
267+ const flw = new Flutterwave (process .env .FLW_PUBLIC_KEY , process .env .FLW_SECRET_KEY );
268+
269+
270+
271+ const verifyBvn = async () => {
272+
273+ try {
274+ const payload = {
275+ " reference" : " FLW71DC60942BAD76D2BD5B4E"
276+ }
277+ const response = await flw .Misc .verifybvn (payload)
278+ console .log (response);
279+ } catch (error) {
280+ console .log (error)
281+ }
282+
283+ }
284+
285+
286+ verifyBVN ();
287+ ```
288+
289+ Sample Response
290+
291+ ``` javascript
292+ {
293+ " status" : " success" ,
294+ " message" : " Bvn details fetched" ,
295+ " data" : {
296+ " first_name" : " Lyra" ,
297+ " last_name" : " Balacqua" ,
298+ " status" : " INITIATED" ,
299+ " reference" : " FLW71DC60942BAD76D2BD5B4E" ,
300+ " callback_url" : null ,
301+ " bvn_data" : null ,
302+ " created_at" : " 2024-02-16T08:28:10.000Z"
270303 }
271304}
272305```
0 commit comments