Skip to main content
GET
/
v1
/
account-name-validation
Validate account name
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.fingopay.io/v1/account-name-validation', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
import requests

url = "https://api.fingopay.io/v1/account-name-validation"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
curl --request GET \
--url https://api.fingopay.io/v1/account-name-validation \
--header 'Authorization: Bearer <token>'
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.fingopay.io/v1/account-name-validation"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.fingopay.io/v1/account-name-validation")
.header("Authorization", "Bearer <token>")
.asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fingopay.io/v1/account-name-validation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
using RestSharp;


var options = new RestClientOptions("https://api.fingopay.io/v1/account-name-validation");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);
{
  "status": "success",
  "message": "Account validated",
  "data": {
    "found": true,
    "accountId": "0112345678900",
    "accountName": "Jane Wambui",
    "accountType": "pesalink",
    "freezeStatus": "0",
    "restrictStatus": "0",
    "errorMessage": "Account does not exist."
  }
}
{
"error": {
"message": "<string>",
"param": "<string>",
"requestId": "<string>"
}
}
{
"error": {
"message": "<string>",
"param": "<string>",
"requestId": "<string>"
}
}

Authorizations

Authorization
string
header
required

Use your API key as a Bearer token. Example: Authorization: Bearer sk_live_...

Query Parameters

country
enum<string>
required

Country code (ISO 3166-1 alpha-2). Currently only KE (Kenya) is supported.

Available options:
KE
Example:

"KE"

accountId
string
required

The account identifier to validate. For M-Pesa this is the phone number (e.g. 254712345678), for bank accounts this is the account number, for tills/paybills this is the business number.

Example:

"0112345678900"

accountType
enum<string>
required

The type of account to validate.

Available options:
choice_bank,
mpesa_paybill,
mpesa_till,
mpesa_mobile,
pesalink
bankCode
string

Bank code from the /v1/local-bank-codes endpoint. Required when accountType is pesalink.

Example:

"07000"

Response

Validation result returned. Check the found field to determine whether the account exists.

status
string
required
Example:

"success"

message
string
required
Example:

"Account validated"

data
object
required

Result of account name validation. When found is false, the account does not exist or could not be validated.