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

# Resolve NGN Account Number

> Verify Nigerian bank account details before initiating payments

## Overview

The account resolution endpoint allows you to validate Nigerian bank account numbers and retrieve account holder names before initiating transfers. This verification helps prevent failed transactions and ensures accurate payments.

<Note>
  This endpoint should be called before creating beneficiaries or initiating
  transfers to Nigerian bank accounts.
</Note>

## Endpoint

```bash theme={null}
POST /payment-methods/resolve-bank-account
```

## Request Parameters

<ParamField body="account_number" type="string" required>
  Bank account number to verify \* Must be exactly 10 digits \* Numbers only (0-9)
</ParamField>

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

  * 3-6 digit identifier \* Must be for an active Nigerian bank
</ParamField>

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.spendjuice.com/payment-methods/resolve-bank-account" \
  -H "Authorization:  YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "account_number": "0234247896",
    "bank_code": "058"
  }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.spendjuice.com/payment-methods/resolve-bank-account",
    {
      method: "POST",
      headers: {
        Authorization: " YOUR_API_KEY",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        account_number: "0234247896",
        bank_code: "058",
      }),
    },
  );

  const data = await response.json();
  ```

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

  response = requests.post(
      'https://api.spendjuice.com/payment-methods/resolve-bank-account',
      headers={
          'Authorization': ' YOUR_API_KEY',
          'Content-Type': 'application/json'
      },
      json={
          'account_number': '0234247896',
          'bank_code': '058'
      }
  )
  ```
</CodeGroup>

## Response Examples

<CodeGroup>
  ```json 200 Success theme={null}
  {
    "data": {
      "account_name": "ANON NYMOUS",
      "account_number": "0234247896",
      "bank_code": "058"
    }
  }
  ```

  ```json 400 Invalid Account Number theme={null}
  {
    "error": {
      "code": "invalid_account_number",
      "message": "Invalid account number provided",
      "type": "validation_error"
    }
  }
  ```

  ```json 404 Account Not Found theme={null}
  {
    "error": {
      "code": "account_not_found",
      "message": "Account number not found for the specified bank",
      "type": "not_found_error"
    }
  }
  ```

  ```json 503 Bank Unavailable theme={null}
  {
    "error": {
      "code": "bank_not_available",
      "message": "Bank resolution service temporarily unavailable",
      "type": "service_error"
    }
  }
  ```
</CodeGroup>

<Card title="Need Help?">
  For additional assistance:

  * Review our [Error Handling Guide](/errors)
  * Contact [support@juicyway.com](mailto:support@juicyway.com)
</Card>
