With our easy to use API, streamline your process for easier remittance by decoding hashes received from the M-Pesa API
Get Started
After the Data Protection act in Kenya, telcos such as Safaricom were required to minimize the personal data
that was shared with third-parties. This data included phone numbers.
Unfortunately, many systems in place relied on these phone numbers for notifications and general communication.
UnHash is a utility API created to help developers and consumers to decode SHA256 MSISDN received from the M-Pesa Daraja API. The provided hash is decoded and the clear-text MSISDN phone number is shown.
UnHash has a beautiful API that is used to decode the hashes. The hash is provided through a request and a phone number is returned with the response instantly.
The catch? Every successful request is billed in units. Each unit is Kshs 0.30. We do offer unlimited subscription-based packages that can be tailored to your needs and usage.
Get 3 units for testingUnlock Unlimited Access – Unbeatable Packages at Unmatched Prices!
Discover our exclusive packages designed to give you unlimited requests for the entire duration of your plan – no limits, no hidden fees, just pure value. Whether you're a power user or just getting started, our packages deliver maximum flexibility at shockingly competitive prices.
Why settle for less when you can get it all?
Act now and take advantage of this rare offer – the smartest way to save more while getting everything you need!
We have a Pay As You Go payment plan where you are billed one unit per request. Each unit is Kshs 0.30. To check your units balance, kindly login to your profile. To Top Up your units, kindly follow the instructions as shown on your user profile.
You can use the Decode Hash page on your dashboard or use our API.
Here are sample requests in a few popular programming languages. Get the API Key on your API Key & Docs
curl -d '{"hash":"7132104d6aae9c3fac82095a42c2817952bca48e09d98d5bf4ac08218982fb90"}' \
-H "Authorization: API-KEY" \
https://app.bennito254.com/api/v1/decode
<?php
$url = 'https://app.bennito254.com/api/v1/decode';
$data = ['hash' => '7132104d6aae9c3fac82095a42c2817952bca48e09d98d5bf4ac08218982fb90'];
$headers = [
'Content-Type: application/json',
'Authorization: API-KEY'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests
url = "https://app.bennito254.com/api/v1/decode"
headers = {
"Authorization": "API-KEY",
"Content-Type": "application/json"
}
data = {
"hash": "7132104d6aae9c3fac82095a42c2817952bca48e09d98d5bf4ac08218982fb90"
}
response = requests.post(url, json=data, headers=headers)
print(response.text)
import axios from 'axios';
const url = 'https://app.bennito254.com/api/v1/decode';
const data = {
hash: '7132104d6aae9c3fac82095a42c2817952bca48e09d98d5bf4ac08218982fb90'
};
axios.post(url, data, {
headers: {
Authorization: 'API-KEY',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error.message);
});
package main
import (
"bytes"
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://app.bennito254.com/api/v1/decode"
jsonData := []byte(`{"hash":"7132104d6aae9c3fac82095a42c2817952bca48e09d98d5bf4ac08218982fb90"}`)
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "API-KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"status": "success",
"msisdn": "254712345678",
"message": "Success"
}
{
"status": "error",
"msisdn": "",
"message": "Insufficient units"
}