Bank Codes API Documentation
Overview

The Bank Codes API allows merchants and developers to fetch a list of banks and their codes for a specified country. This is essential for payment integrations, bank selection UIs, and financial operations requiring bank identification.

  • Purpose: Retrieve up-to-date bank codes by country.
  • Target Audience: Fintech developers, payment integrators, internal teams building financial products.
  • Version: v2

Quickstart
  1. Obtain an API bearer token (see Authentication below).
  2. Make a POST request to /api/v2/banks/get-by-country with your country code.
  3. Receive a list of banks and their codes in the response.

Prerequisites
  • Valid API credentials (bearer token).
  • Base URL: https://base-url-here.com
  • Internet access.

Authentication & Authorization

All requests require a valid Bearer Token in the Authorization header.

  1. Login to your dashboard or contact support to obtain your API token.
  2. Include the token in the header: Authorization: Bearer <your_token>
Security Best Practices: Never share your API token. Store it securely. Rotate tokens regularly. Tokens may expire or be revoked for security reasons.

Endpoint Reference
HTTP MethodPOST
Endpoint URL/api/v2/banks/get-by-country
Base URLhttps://base-url-here.com
DescriptionFetches a list of banks and their codes for a given country.
Request Headers
HeaderTypeDescriptionRequired
AuthorizationstringBearer tokenYes
Acceptstringapplication/jsonYes
Content-Typestringapplication/jsonYes
Request Body
FieldTypeDescriptionRequired
country_codestringCountry code (e.g., KES, TZS)Yes
{
    "country_code": "KES"
}

Code Samples
curl --location --request POST 'https://base-url-here.com/api/v2/banks/get-by-country' \
--header 'Authorization: Bearer <your_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "country_code": "KES"
}'
Success Response
FieldTypeDescription
successbooleanIndicates if the request was successful
messagestringResponse message
dataarrayList of bank objects
{
    "success": true,
    "message": "Successfully initiated",
    "data": [
        {
            "name": "UBA Kenya Bank Ltd",
            "currency": "KES",
            "code": "76"
        },
        {
            "name": "Victoria Commercial Bank Ltd",
            "currency": "KES",
            "code": "54"
        }
    ]
}

Error Responses
Status CodeExampleDescription
400{"success": false, "message": "Invalid country code."}Bad Request
401{"success": false, "message": "Unauthorized."}Missing or invalid token
429{"success": false, "message": "Rate limit exceeded."}Too many requests
500{"success": false, "message": "Internal server error."}Server error

Data Model: Bank Object
FieldTypeDescription
namestringBank name
currencystringCurrency code (e.g., KES)
codestringBank code

Rate Limiting

Default: 1500 requests per second. Exceeding this returns HTTP 429 with a Retry-After header.

This endpoint is rate limited to prevent abuse and ensure fair usage.

If you need more requests, please contact support.


Versioning

This endpoint is part of API version v2. For future changes, refer to the changelog.


Terms of Use & Legal

By using this API, you agree to our Terms of Service and Privacy Policy. Do not share sensitive data or credentials.