Resources
Banks

Banks API

The Banks API allows you to retrieve lists of banks for specific countries. This is essential for building beneficiary forms and validating bank account information.

Get Banks by Country

Retrieve a list of all banks available for a specific country. This endpoint is commonly used to populate bank selection dropdowns in your application.

Endpoint

GET /api/v1/banks/{country_code}

Authentication

This endpoint requires JWT authentication. Include your access token in the Authorization header:

Authorization: Bearer <your-access-token>

Path Parameters

ParameterTypeDescription
country_codestringISO 3166-1 alpha-2 country code (e.g., "NG" for Nigeria, "US" for United States, "CA" for Canada)

Supported Country Codes

Common country codes include:

  • NG - Nigeria
  • US - United States
  • CA - Canada
  • GB - United Kingdom
  • KE - Kenya
  • GH - Ghana
  • ZA - South Africa

Note: The list of supported countries may vary. Contact support if you need banks for a country not listed here.

Success Response (200 OK)

Returns an array of bank objects:

[
  {
    "id": 1,
    "name": "Access Bank",
    "code": "044",
    "national_bank_code": "044"
  },
  {
    "id": 2,
    "name": "GTBank",
    "code": "058",
    "national_bank_code": "058"
  },
  {
    "id": 3,
    "name": "First Bank of Nigeria",
    "code": "011",
    "national_bank_code": "011"
  },
  {
    "id": 4,
    "name": "Zenith Bank",
    "code": "057",
    "national_bank_code": "057"
  }
]

Response Fields

FieldTypeDescription
idintegerUnique identifier for the bank
namestringFull name of the bank
codestringBank code used for transactions
national_bank_codestringNational bank code (may be the same as code)

Error Responses

Status CodeDescription
400Invalid country code format
401Unauthorized - Invalid or missing JWT token
404Banks not found for the specified country code
500Internal server error

Example: cURL

# Get banks for Nigeria
curl -X GET /api/v1/banks/NG \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
 
# Get banks for United States
curl -X GET /api/v1/banks/US \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
 
# Get banks for Canada
curl -X GET /api/v1/banks/CA \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Example: HTTP Request

GET /api/v1/banks/NG HTTP/1.1
Host: api.sznd.app
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json

Use Cases

  1. Beneficiary Forms - Populate bank selection dropdowns when users add beneficiaries
  2. Account Validation - Use bank codes to validate account numbers before creating beneficiaries
  3. Bank Lookup - Display bank names in transaction details and receipts
  4. Multi-Country Support - Dynamically load banks based on the user's selected country

Best Practices

  1. Cache Results - Bank lists don't change frequently, so consider caching the response to reduce API calls
  2. Handle Errors Gracefully - Some country codes may not be supported; provide fallback options
  3. Store Bank IDs - Use the id field when creating beneficiaries, as it's more reliable than codes
  4. Validate Country Code - Ensure the country code is in ISO 3166-1 alpha-2 format before making the request

Related Endpoints


Next Steps

After retrieving the bank list, you can:

  1. Create Beneficiaries - Use the bank id or code when creating beneficiary records
  2. Validate Accounts - Use the account lookup endpoint to verify account numbers
  3. Display Bank Names - Show user-friendly bank names in your UI

For more information, see: