Skip to main content

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?

Prevent Errors

Avoid sending money to wrong accounts

Confirm Identity

Verify account name matches expected recipient

Reduce Fraud

Detect invalid or suspicious accounts

Save Time

Catch issues before transaction processing

Get Supported Banks

Retrieve the list of banks supported for offramp payouts.
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);
Response:
{
  "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"
    }
  ]
}

Bank NameSWIFT Code
Access BankABNGNGLA
Guaranty Trust Bank (GTBank)GTBINGLA
First Bank of NigeriaFBNINGLA
United Bank for Africa (UBA)UNAFNGLA
Zenith BankZEIBNGLA
Ecobank NigeriaECOCNGLA
Fidelity BankFIDTNGLA
First City Monument Bank (FCMB)FCMBNGLA
Stanbic IBTC BankSBICNGLA
Sterling BankSTBLNGLA
Union BankUBNINGLA
Wema BankWEMANGLA
Providus BankPRVSNGLA
Keystone BankKSBNNGLA
Polaris BankPLARNGLX

Verify Bank Account

Verify a bank account before sending an offramp payout.
// 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);
}
Request Parameters:
ParameterTypeRequiredDescription
bankCodestringYesBank code (e.g., “GTBINGLA” for GTBank)
accountNumberstringYes10-digit account number
Response:
{
  "statusCode": 200,
  "message": "Account verified successfully",
  "data": {
    "bankCode": "GTBINGLA",
    "bankName": "Guaranty Trust Bank",
    "accountNumber": "0123456789",
    "accountName": "JOHN DOE"
  }
}

Verification Flow

1

Get Bank Code

Find the recipient’s bank code from the supported banks list
2

Verify Account

Call the verification endpoint with bank code and account number
3

Check Account Name

Confirm the returned account name matches the expected recipient
4

Proceed with Offramp

Use the verified details to initiate your offramp transaction

Complete Verification Example

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');

Error Handling

Error: Account number not foundPossible 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
Error: Account name doesn’t match expectedCauses:
  • Recipient gave wrong account number
  • Account belongs to different person
  • Name format differs (e.g., “John Doe” vs “DOE JOHN”)
Solution:
// 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)');
}
Error: Bank code not in supported listSolution:
  • Check supported banks list
  • Use alternative bank if available
  • Contact support to request bank support
Error: Verification request timed outCauses:
  • Bank service temporarily down
  • Network issues
  • High traffic
Solution:
  • Retry after a few seconds
  • Try during off-peak hours
  • Contact support if persists

Best Practices

Always Verify First

Never skip verification. Always verify before initiating offramp

Check Name Match

Confirm account name matches expected recipient

Save Verified Details

Cache verified account details for repeat transactions

Handle Errors Gracefully

Implement proper error handling and user feedback

Use Correct Bank Code

Double-check bank code from supported banks list

Validate Input

Ensure 10-digit account number before verification

Next Steps

Overview

Learn about offramp basics

Exchange

Get quotes and initiate swaps

Tracking

Monitor transaction progress

Error Handling

Handle API errors properly