curl --request GET \
--url https://api.staging.kairosafrika.cloud/paygw/v1/accountholders/233559400612 \
--header 'Authorization: Basic $(echo -n "username:password" | base64)'
const username = 'your_username';
const password = 'your_password';
const credentials = btoa(`${username}:${password}`);
const response = await fetch('https://api.staging.kairosafrika.cloud/paygw/v1/accountholders/233559400612', {
method: 'GET',
headers: {
'Authorization': `Basic ${credentials}`
}
});
const result = await response.json();
console.log(result);
import requests
import base64
username = 'your_username'
password = 'your_password'
credentials = base64.b64encode(f'{username}:{password}'.encode()).decode()
response = requests.get(
'https://api.staging.kairosafrika.cloud/paygw/v1/accountholders/233559400612',
headers={
'Authorization': f'Basic {credentials}'
}
)
result = response.json()
print(result)
<?php
$username = 'your_username';
$password = 'your_password';
$credentials = base64_encode($username . ':' . $password);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.staging.kairosafrika.cloud/paygw/v1/accountholders/233559400612',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic ' . $credentials
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
{
"statusCode": "0000",
"statusMessage": "Successful",
"transactionId": "454545455",
"sequenceNo": "030720241222005656869",
"data": {
"accountName": "Lord Acheampong",
"msisdn": "233559400612",
"network": "MTN"
},
"links": [
{
"rel": "<string>",
"href": "<string>"
}
]
}{
"error": "INSUFFICIENT_FUNDS",
"message": "The customer has insufficient funds for this transaction",
"details": {}
}{
"error": "INSUFFICIENT_FUNDS",
"message": "The customer has insufficient funds for this transaction",
"details": {}
}Endpoints
Get Account Holder
Retrieve details of an account holder by their ID
GET
/
v1
/
accountholders
/
{accountHolderId}
curl --request GET \
--url https://api.staging.kairosafrika.cloud/paygw/v1/accountholders/233559400612 \
--header 'Authorization: Basic $(echo -n "username:password" | base64)'
const username = 'your_username';
const password = 'your_password';
const credentials = btoa(`${username}:${password}`);
const response = await fetch('https://api.staging.kairosafrika.cloud/paygw/v1/accountholders/233559400612', {
method: 'GET',
headers: {
'Authorization': `Basic ${credentials}`
}
});
const result = await response.json();
console.log(result);
import requests
import base64
username = 'your_username'
password = 'your_password'
credentials = base64.b64encode(f'{username}:{password}'.encode()).decode()
response = requests.get(
'https://api.staging.kairosafrika.cloud/paygw/v1/accountholders/233559400612',
headers={
'Authorization': f'Basic {credentials}'
}
)
result = response.json()
print(result)
<?php
$username = 'your_username';
$password = 'your_password';
$credentials = base64_encode($username . ':' . $password);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.staging.kairosafrika.cloud/paygw/v1/accountholders/233559400612',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic ' . $credentials
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
{
"statusCode": "0000",
"statusMessage": "Successful",
"transactionId": "454545455",
"sequenceNo": "030720241222005656869",
"data": {
"accountName": "Lord Acheampong",
"msisdn": "233559400612",
"network": "MTN"
},
"links": [
{
"rel": "<string>",
"href": "<string>"
}
]
}{
"error": "INSUFFICIENT_FUNDS",
"message": "The customer has insufficient funds for this transaction",
"details": {}
}{
"error": "INSUFFICIENT_FUNDS",
"message": "The customer has insufficient funds for this transaction",
"details": {}
}Get Account Holder
This endpoint allows you to retrieve details of an account holder by their unique identifier. Endpoint:GET /v1/accountholders/{accountHolderId}
curl --request GET \
--url https://api.staging.kairosafrika.cloud/paygw/v1/accountholders/233559400612 \
--header 'Authorization: Basic $(echo -n "username:password" | base64)'
const username = 'your_username';
const password = 'your_password';
const credentials = btoa(`${username}:${password}`);
const response = await fetch('https://api.staging.kairosafrika.cloud/paygw/v1/accountholders/233559400612', {
method: 'GET',
headers: {
'Authorization': `Basic ${credentials}`
}
});
const result = await response.json();
console.log(result);
import requests
import base64
username = 'your_username'
password = 'your_password'
credentials = base64.b64encode(f'{username}:{password}'.encode()).decode()
response = requests.get(
'https://api.staging.kairosafrika.cloud/paygw/v1/accountholders/233559400612',
headers={
'Authorization': f'Basic {credentials}'
}
)
result = response.json()
print(result)
<?php
$username = 'your_username';
$password = 'your_password';
$credentials = base64_encode($username . ':' . $password);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.staging.kairosafrika.cloud/paygw/v1/accountholders/233559400612',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic ' . $credentials
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
Path Parameter
- accountHolderId (string, required): The unique identifier of the account holder to retrieve.
- Example:
233559400612
- Example:
Responses
200 OK - Success Response
Returns account holder details when found.{
"statusCode": "0000",
"statusMessage": "Successful",
"transactionId": "454545455",
"sequenceNo": "030720241222005656869",
"data": {
"accountName": "John Doe",
"msisdn": "2335548908839",
"network": "MTN"
},
"links": []
}
404 Not Found - Account Holder Not Found
{
"statusCode": "0404",
"statusMessage": "Account holder not found",
"transactionId": null,
"sequenceNo": null,
"data": null,
"links": []
}
401 Unauthorized - Invalid Credentials
{
"statusCode": "0401",
"statusMessage": "Unauthorized",
"transactionId": null,
"sequenceNo": null,
"data": null,
"links": []
}
Response Fields
- statusCode (string): Status code indicating the result of the request
"0000": Successful"0404": Account holder not found"0401": Unauthorized
- statusMessage (string): Human-readable status message
- transactionId (string): Unique transaction identifier for tracking
- sequenceNo (string): Sequence number for the request
- data (object): Account holder information when successful
- accountName (string): Account holder’s full name
- msisdn (string): Mobile subscriber identifier
- network (string): Mobile network provider (e.g., MTN, Vodafone)
- links (array): HATEOAS links for related actions
Usage Example
The examples above show how to authenticate and retrieve account holder information using different programming languages.Authorizations
Basic authentication using base64 encoded username:password
Path Parameters
The unique identifier of the account holder
Response
Account holder details retrieved successfully
Status code indicating the result of the request
Example:
"0000"
Human-readable status message
Example:
"Successful"
Unique transaction identifier for tracking
Example:
"454545455"
Sequence number for the request
Example:
"030720241222005656869"
Account holder information when successful
Show child attributes
Show child attributes
HATEOAS links for related actions
Show child attributes
Show child attributes