Banks

Lookup table for NG bank codes. Returns the (code, name, slug, kind) tuples Swappr knows about, filtered to banks you can actually pay to.

code is the CBN 3-digit code — what you pass as recipient.bank_code in payouts and beneficiaries.


List banks

GET /v1/banks?currency=NGN

ParamRequiredNotes
currencyyesMust be NGN (only currency with a public bank list today)

Response

{
  "object": "list",
  "data": [
    {
      "code": "044",
      "name": "Access Bank",
      "slug": "access-bank",
      "kind": "dmb"
    },
    {
      "code": "058",
      "name": "Guaranty Trust Bank",
      "slug": "gtbank",
      "kind": "dmb"
    },
    ...
  ]
}

Bank kinds

KindDescription
dmbDeposit Money Bank — the major commercial banks
mfbMicrofinance Bank
mobile_moneyMobile money operator (e.g. OPay, PalmPay)
psbPayment Service Bank
merchant_bankMerchant bank
fintechFintech / neobank

Caching

This endpoint is heavily cached (5-minute TTL). The bank list rarely changes; safe to cache locally for hours.

// Fetch once at app start, cache in memory
let bankList: Bank[] | null = null;
let bankListExpiresAt = 0;
 
async function getBanks() {
  if (bankList && Date.now() < bankListExpiresAt) return bankList;
 
  const res = await fetch('https://api.swappr.me/v1/banks?currency=NGN', {
    headers: { 'Authorization': `Bearer ${process.env.SWAPPR_API_KEY}` },
  });
  const data = await res.json();
 
  bankList = data.data;
  bankListExpiresAt = Date.now() + 60 * 60 * 1000; // 1h
  return bankList;
}

Notes

  • Only banks marked is_exposed_to_merchants in our DB appear here. We curate the list — by default, ~80-90 of 906 NIBSS-registered banks are exposed.
  • Bank codes are CBN 3-digit codes, not NIBSS NIP codes. Some upstream rails want 6-digit NIP codes natively — Swappr handles that translation server-side; you always pass CBN codes.
  • slug is a stable lowercase identifier useful for icons + autocomplete.

Errors

CodeHTTPCause
unsupported_currency400Anything other than NGN