Peleza β€” Trust built on data
πŸ‡°πŸ‡ͺ KYC
On this page

Bank Account

Verify a Kenyan bank account and resolve the account holder name via POST /api/v1/bank-account/ke. Call GET /api/v1/banks/ke first to obtain a valid bank_id. Other country codes are not supported yet. Verification HTTP 200 is billable; listing banks and validation/provider errors are not.

List supported banks

Returns every bank supported for Kenyan verification, each with an id and display name. Use id as bank_id on the verify request below. Auth required; this call is not billed.

GET/api/v1/banks/ke
{{baseUrl}}/api/v1/banks/ke
200 OKSample dataExample response
{
  "success": true,
  "response_code": 200,
  "message": "Banks fetched successfully",
  "country": "ke",
  "data": {
    "banks": [
      { "id": 1, "name": "KCB" },
      { "id": 8, "name": "Co-operative Bank" },
      { "id": 34, "name": "Equity Bank" },
      { "id": 42, "name": "Post Bank" }
    ],
    "count": 42
  },
  "request_id": "550e8400-e29b-41d4-a716-446655440000"
}
FieldTypeDescription
countrystringCountry code from the path (ke)
data.banksarraySupported banks, sorted by id ascending
data.banks[].idintegerValue to send as bank_id when verifying
data.banks[].namestringBank display name for UI selection
data.countintegerNumber of banks in the list

Verify bank account

POST/api/v1/bank-account/ke
{{baseUrl}}/api/v1/bank-account/ke
HeaderTypeDescription
AuthorizationstringBearer YOUR_ACCESS_TOKEN from the OAuth client-credentials flow
Content-Typestringapplication/json

Body Parameters

ParameterTypeDescriptionRequired
account_numberstringBank account number (max 50 characters)required
bank_idintegerBank identifier from GET /api/v1/banks/ke (e.g. 34 = Equity Bank)required
consentbooleanMust be true β€” confirms data-subject consent to perform this verificationrequired
customer_numberstringOptional reference for your own tracking (max 255 characters)optional

Sample request body

All verification APIs require consent: true in the JSON body.

Sample dataSample request body
{
  "account_number": "0123456789",
  "bank_id": 34,
  "consent": true
}

Response

200 OKSample dataExample response
{
  "success": true,
  "response_code": 200,
  "message": "Bank Account Details Fetched Successfully",
  "country": "ke",
  "data": {
    "account_number": "0123456789",
    "bank": { "id": 34, "name": "Equity Bank" },
    "account_holder": { "name": "JAMES KAMAU" },
    "status": "valid"
  },
  "request_id": "550e8400-e29b-41d4-a716-446655440000"
}

Response Fields

FieldTypeDescription
successbooleanWhether the request succeeded
response_codenumberApplication response code (typically mirrors HTTP)
messagestringHuman-readable status message
countrystringCountry code from the path (ke)
data.account_numberstringAccount number that was verified
data.bank.idintegerBank identifier used for the lookup
data.bank.namestringBank display name
data.account_holder.namestringResolved account holder name
data.statusstring"valid" when the account is confirmed; "invalid" otherwise
request_idstringUUID for support and audit trails

Error codes

Standard Peleza HTTP / response_code values (same across all API calls). Validation message text is endpoint-specific. Full reference: Error Codes.

CodeWhenBilled?
200Account holder details returnedYes
400Validation β€” account_number / bank_id (unknown bank ID)No
401Missing or invalid Bearer tokenNo
402Insufficient wallet balance or credit limitNo
403No active wallet or billing profile (or service not enabled)No
404Resource not found after verification completed β€” or unsupported countryYes (found path completed) / No (unsupported country)
408Upstream timeout / service errorNo
429Rate limitedNo
502Upstream bad or unreadable responseNo
503Verification failed or service unavailableNo

Invalid bank ID

400Sample dataInvalid bank ID
{
  "success": false,
  "response_code": 400,
  "message": "Invalid bank ID provided. Please provide a valid bank ID.",
  "country": "ke",
  "errors": { "bank_id": ["Invalid bank ID"] },
  "request_id": "550e8400-e29b-41d4-a716-446655440030"
}

Verification failed

503Sample dataVerification failed
{
  "success": false,
  "response_code": 503,
  "message": "Bank account verification failed. Please check the account number and try again.",
  "country": "ke",
  "errors": {
    "account_number": ["Bank account verification failed. Please check the account number and try again."]
  },
  "request_id": "550e8400-e29b-41d4-a716-446655440031"
}

Set {{baseUrl}} to https://api.peleza.com (production) or https://sandbox.peleza.com (sandbox). Authenticated calls need a Bearer token from POST /api/v1/oauth/token.