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

# Bank account lookup

> Verify a recipient bank account before initiating a transfer

<CardGroup cols={2}>
  <Card title="Perform bank account lookup" icon="money-bill" href="/nomba-api-reference/transfers/perform-bank-account-lookup">
    Perform a bank account lookup before processing bank transfer payments
  </Card>
</CardGroup>

<Note>
  You can use [this](/docs/products/transfers/fetch-bank-codes-and-names) to retrieve the specific `bankCode` for any desired bank.
</Note>

Always verify a recipient account before initiating a transfer. This confirms the account exists and returns the account holder's name — which you should display to your user for confirmation before sending funds.

# `POST /v1/transfers/bank/lookup`

<CodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.nomba.com/v1/transfers/bank/lookup \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --header 'accountId: <accountid>' \
    --data '{
    "accountNumber": "0554772814",
    "bankCode": "053"
  }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.nomba.com/v1/transfers/bank/lookup', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${accessToken}`,
      'Content-Type': 'application/json',
      'accountId': accountId,
    },
    body: JSON.stringify({
      accountNumber: '0554772814',
      bankCode: '053',
    }),
  });

  const { code, data } = await response.json();

  if (code !== '00') {
    throw new Error('Account lookup failed — check account number and bank code');
  }

  // Show the account name to the user before proceeding with transfer
  console.log(`Recipient: ${data.accountName} (${data.accountNumber})`);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.nomba.com/v1/transfers/bank/lookup',
      headers={
          'Authorization': f'Bearer {access_token}',
          'Content-Type': 'application/json',
          'accountId': account_id,
      },
      json={
          'accountNumber': '0554772814',
          'bankCode': '053',
      },
  )

  result = response.json()

  if result['code'] != '00':
      raise Exception('Account lookup failed — check account number and bank code')

  # Show the account name to the user before proceeding with transfer
  print(f"Recipient: {result['data']['accountName']} ({result['data']['accountNumber']})")
  ```

  ```json Response theme={null}
  {
    "code": "00",
    "description": "Success",
    "data": {
      "accountNumber": "0554772814",
      "accountName": "M.A Animashaun"
    }
  }
  ```
</CodeGroup>

#### Request body

<ParamField body="accountNumber" type="string" required>
  The account number to be looked up.
</ParamField>

<ParamField body="bankCode" type="string" required>
  The code of the bank that the account number belongs to. Obtain this from [`GET /v1/transfers/banks`](/docs/products/transfers/fetch-bank-codes-and-names).
</ParamField>

#### Response body

<ResponseField name="code" type="string" required>
  Response code. `"00"` indicates a valid account was found.
</ResponseField>

<ResponseField name="description" type="string" required>
  Response description.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="object" defaultOpen="true">
    <ResponseField name="accountNumber" type="string" required>
      The verified account number.
    </ResponseField>

    <ResponseField name="accountName" type="string" required>
      The name on the account. Display this to the user before confirming the transfer.
    </ResponseField>
  </Expandable>
</ResponseField>
