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

# Resolve bank account

> Verify a bank account number and get the account holder's name

## Overview

Verify that a bank account number is valid and retrieve the account holder's name. Use this before creating a recipient to confirm account details with the user.

## Authentication

<ParamField header="X-Api-Key" type="string" required>
  Your merchant API key
</ParamField>

## Request Body

<ParamField body="account_number" type="string" required>
  Bank account number to verify (typically 10 digits)

  **Example:** `1234567890`
</ParamField>

<ParamField body="bank_code" type="string" required>
  Bank code from the [List Banks](/api-reference/banks/list-banks) endpoint

  **Example:** `044`
</ParamField>

## Request Examples

<CodeGroup>
  ```json JSON theme={null}
  {
    "account_number": "1234567890",
    "bank_code": "044"
  }
  ```

  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.daya.co/v1/banks/resolve \
    --header 'X-Api-Key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "account_number": "1234567890",
      "bank_code": "044"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.daya.co/v1/banks/resolve', {
    method: 'POST',
    headers: {
      'X-Api-Key': 'YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      account_number: '1234567890',
      bank_code: '044'
    })
  });
  const result = await response.json();
  console.log(result);
  ```
</CodeGroup>

## Response

<ResponseField name="account_number" type="string" required>
  The verified bank account number
</ResponseField>

<ResponseField name="account_name" type="string" required>
  The account holder's full name as registered with the bank
</ResponseField>

### Success Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "account_number": "1234567890",
    "account_name": "JOHN DOE"
  }
  ```
</ResponseExample>

## Error Responses

<ResponseExample>
  ```json 400 Bad Request - Validation failed theme={null}
  {
    "error": {
      "code": "validation_failed",
      "message": "Validation failed",
      "details": "account_number is required"
    }
  }
  ```

  ```json 400 Bad Request - Invalid account theme={null}
  {
    "error": {
      "code": "validation_failed",
      "message": "Could not resolve account number for the specified bank"
    }
  }
  ```

  ```json 400 Bad Request - Invalid bank code theme={null}
  {
    "error": {
      "code": "validation_failed",
      "message": "Invalid bank code"
    }
  }
  ```

  ```json 502 Bad Gateway - Provider unavailable theme={null}
  {
    "error": {
      "code": "INTEGRATION_FAILED",
      "message": "Bank verification provider unavailable, please try again"
    }
  }
  ```
</ResponseExample>

## Next Steps

<CardGroup cols={2}>
  <Card title="List Supported Banks" icon="building-columns" href="/api-reference/banks/list-banks">
    Get bank codes to use with this endpoint
  </Card>

  <Card title="Create Transfer" icon="money-bill-transfer" href="/api-reference/transfers/create-transfer">
    Send funds to a Nigerian bank account
  </Card>
</CardGroup>
