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

# Bank Verification

> Verify bank accounts before sending offramp payouts

## Overview

Before initiating an offramp transaction, you must verify the recipient bank account. This ensures the account is valid and matches the expected account holder name.

**What you'll learn:**

* Get supported banks
* Verify bank account details
* Understand verification responses
* Handle verification errors
* Best practices

***

## Why Verify Bank Accounts?

<CardGroup cols={2}>
  <Card title="Prevent Errors" icon="shield-check">
    Avoid sending money to wrong accounts
  </Card>

  <Card title="Confirm Identity" icon="user-check">
    Verify account name matches expected recipient
  </Card>

  <Card title="Reduce Fraud" icon="ban">
    Detect invalid or suspicious accounts
  </Card>

  <Card title="Save Time" icon="clock">
    Catch issues before transaction processing
  </Card>
</CardGroup>

***

## Get Supported Banks

Retrieve the list of banks supported for offramp payouts.

<CodeGroup>
  ```javascript Node.js theme={null}
  import MoneiSDK from 'monei-sdk';

  const monei = new MoneiSDK({
    apiKey: process.env.MONEI_API_KEY,
  });

  // Get all supported banks
  const banks = await monei.offrampPayouts.getBanks();

  console.log(`Found ${banks.length} supported banks\n`);

  banks.forEach(bank => {
    console.log(`${bank.name}`);
    console.log(`  Code: ${bank.code}`);
  });

  // Search for specific bank
  const gtb = banks.find(b => b.name.includes('Guaranty Trust'));
  console.log('\nGTBank Code:', gtb.code);
  ```

  ```python Python theme={null}
  from monei import MoneiClient

  monei = MoneiClient(
      api_key=os.getenv('MONEI_API_KEY')
  )

  # Get supported banks
  banks = monei.offramp_payouts.get_banks()

  print(f'Found {len(banks)} supported banks\n')

  for bank in banks:
      print(f'{bank.name}')
      print(f'  Code: {bank.code}')

  # Find specific bank
  gtb = next(b for b in banks if 'Guaranty Trust' in b.name)
  print(f'\nGTBank Code: {gtb.code}')
  ```

  ```bash cURL theme={null}
  curl https://api.monei.cc/api/v1/offramp/payouts/banks \
    -H "x-api-key: YOUR_API_KEY"
  ```
</CodeGroup>

**Response:**

```json theme={null}
{
  "statusCode": 200,
  "message": "Banks retrieved successfully",
  "data": [
    {
      "name": "Access Bank",
      "code": "ABNGNGLA"
    },
    {
      "name": "Guaranty Trust Bank",
      "code": "GTBINGLA"
    },
    {
      "name": "First Bank of Nigeria",
      "code": "FBNINGLA"
    },
    {
      "name": "United Bank for Africa",
      "code": "UNAFNGLA"
    },
    {
      "name": "Zenith Bank",
      "code": "ZEIBNGLA"
    }
  ]
}
```

***

## Popular Nigerian Banks

| Bank Name                       | SWIFT Code |
| ------------------------------- | ---------- |
| Access Bank                     | ABNGNGLA   |
| Guaranty Trust Bank (GTBank)    | GTBINGLA   |
| First Bank of Nigeria           | FBNINGLA   |
| United Bank for Africa (UBA)    | UNAFNGLA   |
| Zenith Bank                     | ZEIBNGLA   |
| Ecobank Nigeria                 | ECOCNGLA   |
| Fidelity Bank                   | FIDTNGLA   |
| First City Monument Bank (FCMB) | FCMBNGLA   |
| Stanbic IBTC Bank               | SBICNGLA   |
| Sterling Bank                   | STBLNGLA   |
| Union Bank                      | UBNINGLA   |
| Wema Bank                       | WEMANGLA   |
| Providus Bank                   | PRVSNGLA   |
| Keystone Bank                   | KSBNNGLA   |
| Polaris Bank                    | PLARNGLX   |

***

## Verify Bank Account

Verify a bank account before sending an offramp payout.

<CodeGroup>
  ```javascript Node.js theme={null}
  // Verify bank account
  const verification = await monei.offrampPayouts.verifyBankAccount({
    bankCode: 'GTBINGLA', // GTBank
    accountNumber: '0123456789'
  });

  console.log('Verification Successful!');
  console.log('Bank Name:', verification.bankName);
  console.log('Bank Code:', verification.bankCode);
  console.log('Account Number:', verification.accountNumber);
  console.log('Account Name:', verification.accountName);

  // Check if name matches expected
  const expectedName = 'JOHN DOE';
  if (verification.accountName.includes(expectedName)) {
    console.log('✓ Account name matches!');
  } else {
    console.log('⚠️ Account name mismatch');
    console.log('Expected:', expectedName);
    console.log('Got:', verification.accountName);
  }
  ```

  ```python Python theme={null}
  # Verify bank account
  verification = monei.offramp_payouts.verify_bank_account(
      bank_code='GTBINGLA',
      account_number='0123456789'
  )

  print('Verification Successful!')
  print(f'Bank: {verification.bank_name}')
  print(f'Code: {verification.bank_code}')
  print(f'Account: {verification.account_number}')
  print(f'Name: {verification.account_name}')

  # Check name match
  expected_name = 'JOHN DOE'
  if expected_name in verification.account_name:
      print('✓ Account name matches!')
  else:
      print('⚠️ Account name mismatch')
      print(f'Expected: {expected_name}')
      print(f'Got: {verification.account_name}')
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.monei.cc/api/v1/offramp/payouts/verify \
    -H "x-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "bankCode": "GTBINGLA",
      "accountNumber": "0123456789"
    }'
  ```
</CodeGroup>

**Request Parameters:**

| Parameter       | Type   | Required | Description                             |
| --------------- | ------ | -------- | --------------------------------------- |
| `bankCode`      | string | Yes      | Bank code (e.g., "GTBINGLA" for GTBank) |
| `accountNumber` | string | Yes      | 10-digit account number                 |

**Response:**

```json theme={null}
{
  "statusCode": 200,
  "message": "Account verified successfully",
  "data": {
    "bankCode": "GTBINGLA",
    "bankName": "Guaranty Trust Bank",
    "accountNumber": "0123456789",
    "accountName": "JOHN DOE"
  }
}
```

***

## Verification Flow

<Steps>
  <Step title="Get Bank Code">
    Find the recipient's bank code from the supported banks list
  </Step>

  <Step title="Verify Account">
    Call the verification endpoint with bank code and account number
  </Step>

  <Step title="Check Account Name">
    Confirm the returned account name matches the expected recipient
  </Step>

  <Step title="Proceed with Offramp">
    Use the verified details to initiate your offramp transaction
  </Step>
</Steps>

***

## Complete Verification Example

<CodeGroup>
  ```javascript Node.js theme={null}
  async function verifyAndOfframp(accountNumber, expectedName) {
    try {
      // 1. Get banks list
      const banks = await monei.offrampPayouts.getBanks();
      
      // 2. Find GTBank
      const gtb = banks.find(b => b.name.includes('Guaranty Trust'));
      
      if (!gtb) {
        throw new Error('GTBank not found in supported banks');
      }
      
      console.log('Bank found:', gtb.name);
      console.log('Bank code:', gtb.code);
      
      // 3. Verify account
      const verification = await monei.offrampPayouts.verifyBankAccount({
        bankCode: gtb.code,
        accountNumber: accountNumber
      });
      
      console.log('\n✓ Account verified');
      console.log('Account Name:', verification.accountName);
      
      // 4. Check name match
      if (!verification.accountName.includes(expectedName.toUpperCase())) {
        throw new Error(
          `Name mismatch! Expected: ${expectedName}, Got: ${verification.accountName}`
        );
      }
      
      console.log('✓ Name matches expected recipient');
      
      // 5. Proceed with offramp
      const order = await monei.offrampExchange.initiateSwap({
        amount: 100,
        token: 'USDT',
        network: 'base',
        fiatCurrency: 'NGN',
        bankCode: verification.bankCode,
        accountNumber: verification.accountNumber,
        accountName: verification.accountName
      });
      
      console.log('\n✓ Offramp initiated');
      console.log('Order Reference:', order.reference);
      console.log('Deposit Address:', order.onChain.depositAddress);
      
      return order;
      
    } catch (error) {
      console.error('Error:', error.message);
      throw error;
    }
  }

  // Usage
  await verifyAndOfframp('0123456789', 'John Doe');
  ```

  ```python Python theme={null}
  async def verify_and_offramp(account_number, expected_name):
      try:
          # 1. Get banks
          banks = monei.offramp_payouts.get_banks()
          
          # 2. Find GTBank
          gtb = next((b for b in banks if 'Guaranty Trust' in b.name), None)
          
          if not gtb:
              raise Exception('GTBank not found')
          
          print(f'Bank: {gtb.name}')
          print(f'Code: {gtb.code}')
          
          # 3. Verify account
          verification = monei.offramp_payouts.verify_bank_account(
              bank_code=gtb.code,
              account_number=account_number
          )
          
          print(f'\n✓ Account verified')
          print(f'Name: {verification.account_name}')
          
          # 4. Check name
          if expected_name.upper() not in verification.account_name:
              raise Exception(
                  f'Name mismatch! Expected: {expected_name}, '
                  f'Got: {verification.account_name}'
              )
          
          print('✓ Name matches')
          
          # 5. Initiate offramp
          order = monei.offramp_exchange.initiate_swap(
              amount=100,
              token='USDT',
              network='base',
              fiat_currency='NGN',
              bank_code=verification.bank_code,
              account_number=verification.account_number,
              account_name=verification.account_name
          )
          
          print(f'\n✓ Offramp initiated')
          print(f'Reference: {order.reference}')
          
          return order
          
      except Exception as error:
          print(f'Error: {error}')
          raise

  # Usage
  await verify_and_offramp('0123456789', 'John Doe')
  ```
</CodeGroup>

***

## Error Handling

<AccordionGroup>
  <Accordion icon="circle-xmark" title="Invalid Account Number">
    **Error:** Account number not found

    **Possible causes:**

    * Account number is incorrect
    * Account number doesn't exist
    * Bank code is wrong
    * Account was closed

    **Solution:**

    * Verify account number with recipient
    * Check bank code is correct
    * Try different bank if transferred
  </Accordion>

  <Accordion icon="exclamation-triangle" title="Name Mismatch">
    **Error:** Account name doesn't match expected

    **Causes:**

    * Recipient gave wrong account number
    * Account belongs to different person
    * Name format differs (e.g., "John Doe" vs "DOE JOHN")

    **Solution:**

    ```javascript theme={null}
    // Flexible name matching
    function namesMatch(expected, actual) {
      // Normalize both names
      const normalize = (name) => 
        name.toUpperCase()
          .replace(/[^A-Z\s]/g, '')
          .trim()
          .split(/\s+/)
          .sort()
          .join(' ');
      
      const expectedNorm = normalize(expected);
      const actualNorm = normalize(actual);
      
      // Check if one contains the other
      return actualNorm.includes(expectedNorm) || 
             expectedNorm.includes(actualNorm);
    }

    if (namesMatch('John Doe', verification.accountName)) {
      console.log('✓ Names match (flexible)');
    }
    ```
  </Accordion>

  <Accordion icon="ban" title="Bank Not Supported">
    **Error:** Bank code not in supported list

    **Solution:**

    * Check supported banks list
    * Use alternative bank if available
    * Contact support to request bank support
  </Accordion>

  <Accordion icon="clock" title="Verification Timeout">
    **Error:** Verification request timed out

    **Causes:**

    * Bank service temporarily down
    * Network issues
    * High traffic

    **Solution:**

    * Retry after a few seconds
    * Try during off-peak hours
    * Contact support if persists
  </Accordion>
</AccordionGroup>

***

## Best Practices

<CardGroup cols={2}>
  <Card title="Always Verify First" icon="shield-check">
    Never skip verification. Always verify before initiating offramp
  </Card>

  <Card title="Check Name Match" icon="user-check">
    Confirm account name matches expected recipient
  </Card>

  <Card title="Save Verified Details" icon="floppy-disk">
    Cache verified account details for repeat transactions
  </Card>

  <Card title="Handle Errors Gracefully" icon="bug">
    Implement proper error handling and user feedback
  </Card>

  <Card title="Use Correct Bank Code" icon="hashtag">
    Double-check bank code from supported banks list
  </Card>

  <Card title="Validate Input" icon="check">
    Ensure 10-digit account number before verification
  </Card>
</CardGroup>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Overview" icon="circle-info" href="/offramp/overview">
    Learn about offramp basics
  </Card>

  <Card title="Exchange" icon="arrow-right-arrow-left" href="/offramp/exchange">
    Get quotes and initiate swaps
  </Card>

  <Card title="Tracking" icon="location-crosshairs" href="/offramp/tracking">
    Monitor transaction progress
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/core-concepts/error-handling">
    Handle API errors properly
  </Card>
</CardGroup>
