> ## Documentation Index
> Fetch the complete documentation index at: https://flutterwaveinc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Bank Account Verification

> Learn how to resolve customer's account details for Nigerian Banks only.

It's important to verify users' credentials before initiating payments or giving value. Flutterwave gives you the ability to verify bank account numbers through our [resolve account details](/api-reference/misc/verify-bvn-consent) endpoint —you give us your customer's account number and bank, and we'll return the account name.

Here's an example with our [SDKs](/sdk-plugins/backend-libraries/nodejs):

<CodeGroup>
  ```javascript Node.js theme={null}
  // Install with: npm i flutterwave-node-v3

  const Flutterwave = require('flutterwave-node-v3');
  const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_KEY);
  const details = {
    account_number: "0690000032",
    account_bank: "044"
  };
  flw.Misc.verify_Account(details)
    .then(response => console.log(response));
  ```

  ```php PHP  theme={null}
  // Install with: composer require flutterwavedev/flutterwave-v3

  $flw = new \Flutterwave\Rave(getenv('FLW_SECRET_KEY')); // Set `PUBLIC_KEY` as an environment variable
  $accountService = new \Flutterwave\Misc();
  $details = [
    "account_number" => "0690000032",
    "account_bank" => "044"
  ];
  $response = $accountService->verifyAccount($details);
  ```

  ```ruby Ruby theme={null}
  # Install with: gem install flutterwave_sdk

  require 'flutterwave_sdk'

  flw = Flutterwave.new(ENV["FLW_PUBLIC_KEY"], ENV["FLW_SECRET_KEY"], ENV["FLW_ENCRYPTION_KEY"])
  misc = Misc.new(flw)
  details = {
    account_number: "0690000032",
    account_bank: "044"
  }
  response = misc.resolve_account details
  print response
  ```

  ```python Python  theme={null}
  # Install with: pip install rave_python

  import os
  from rave_python import Rave

  rave = Rave(os.getenv("FLW_PUBLIC_KEY"), os.getenv("FLW_SECRET_KEY"))
  details = {
    "account_number": "0690000032",
    "account_bank": "044"
  }
  response = rave.Transfer.accountResolve(details)
  print(response)
  ```

  ```go Go theme={null}
  // Install with: go get github.com/Flutterwave/Rave-go/rave

  import (
    "fmt"
    "os"
    "github.com/Flutterwave/Rave-go/rave"
  )
  var r = rave.Rave{
    false,
    os.Getenv("FLW_PUBLIC_KEY"),
    os.Getenv("FLW_SECRET_KEY"),
  }
  var transfer = rave.Transfer{
      r,
  }
  details := rave.AccountResolveData {
    RecipientAccount: "0690000034",
    DestBankCode:     "044",
    PublicKey:        r.GetPublicKey(),
  }
  err, response := transfer.ResolveAccount(details)
  if err != nil {
      panic(err)
  }
  fmt.Println(response)
  ```

  ```json cURL theme={null}
  curl --request POST 'https://api.flutterwave.com/v3/accounts/resolve' \
    --header 'Authorization: Bearer YOUR_SECRET_KEY'\
    --header 'Content-Type: application/json'\
    --data-raw '{
      "account_number": "0690000032",
      "account_bank": "044"
  }'
  ```
</CodeGroup>

If the account is valid, you'll receive a response with a `status` of `"success"`, and the account details within the `data` key:

```json theme={null}
{
    "status": "success",
    "message": "Account details fetched",
    "data": {
      "account_number": "0690000032",
      "account_name": "Pastor Bright"
    }
}
```

If the account number is invalid, you'll get an error response:

```json theme={null}
{
  "status": "error",
  "message": "Sorry, that account number is invalid, please check and try again",
  "data": null
}
```

## Resolving Flutterwave Merchant IDs

You can also use the account resolution endpoint with Flutterwave merchant IDs. This is helpful for verifying wallet details before starting a wallet-to-wallet transfer. To do this, use `flutterwave` as the `account_code`, and the merchant ID as the `account_number`.

<Info>
  The merchant ID is displayed on the merchant dashboard below the business name at the top left.
</Info>

<img src="https://mintcdn.com/flutterwaveinc/8LJ4mpYLmd_SNb9Z/images/merchant-id-max.png?fit=max&auto=format&n=8LJ4mpYLmd_SNb9Z&q=85&s=fc7706c8691ae5442aff346461e8736e" alt="merchant_id" width="2880" height="1576" data-path="images/merchant-id-max.png" />

Sample request will look like this:

<CodeGroup>
  ```json Sample Request theme={null}
  {
      "account_number": "7981223",
      "account_bank": "flutterwave"
  }
  ```
</CodeGroup>

Response will look like this:

<CodeGroup>
  ```json Sample Response theme={null}
  {
    "status": "success",
    "message": "Account details fetched",
    "data": {
      "account_number": "7981223",
      "account_name": "Flutterwave Developer Account"
    }
  }
  ```
</CodeGroup>
