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
| Parameter | Type | Description |
|---|---|---|
country_code | string | ISO 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
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier for the bank |
name | string | Full name of the bank |
code | string | Bank code used for transactions |
national_bank_code | string | National bank code (may be the same as code) |
Error Responses
| Status Code | Description |
|---|---|
400 | Invalid country code format |
401 | Unauthorized - Invalid or missing JWT token |
404 | Banks not found for the specified country code |
500 | Internal 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/jsonUse Cases
- Beneficiary Forms - Populate bank selection dropdowns when users add beneficiaries
- Account Validation - Use bank codes to validate account numbers before creating beneficiaries
- Bank Lookup - Display bank names in transaction details and receipts
- Multi-Country Support - Dynamically load banks based on the user's selected country
Best Practices
- Cache Results - Bank lists don't change frequently, so consider caching the response to reduce API calls
- Handle Errors Gracefully - Some country codes may not be supported; provide fallback options
- Store Bank IDs - Use the
idfield when creating beneficiaries, as it's more reliable than codes - Validate Country Code - Ensure the country code is in ISO 3166-1 alpha-2 format before making the request
Related Endpoints
- Account Lookup - Verify bank account numbers and retrieve account holder names
- Create Beneficiary - Use bank information when creating beneficiaries
Next Steps
After retrieving the bank list, you can:
- Create Beneficiaries - Use the bank
idorcodewhen creating beneficiary records - Validate Accounts - Use the account lookup endpoint to verify account numbers
- Display Bank Names - Show user-friendly bank names in your UI
For more information, see:
- Beneficiaries API - How to create and manage beneficiaries
- Account Lookup - Verify bank account details