UnHash

Decode M-Pesa MSISDN hash

With our easy to use API, streamline your process for easier remittance by decoding hashes received from the M-Pesa API

Get Started
hero

Decode M-Pesa Hash quickly and efficiently

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.

about
shape
shape

UnHash - How it works

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 testing
about

Unlimited Packages Available

Unlock 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?

  • ✅ Unlimited Requests
  • ✅ Fixed Time Duration
  • ✅ No Overages
  • ✅ Best Price Guarantee

Act now and take advantage of this rare offer – the smartest way to save more while getting everything you need!

Gold



Price in Kes

500.00


UNLIMITED REQUESTS

Duration

30 days



SUBSCRIBE

Bronze



Price in Kes

300.00


UNLIMITED REQUESTS

Duration

15 days



SUBSCRIBE

Silver



Price in Kes

200.00


UNLIMITED REQUESTS

Duration

10 days



SUBSCRIBE

Platinum



Price in Kes

1,200.00


UNLIMITED REQUESTS

Duration

90 days



SUBSCRIBE

Pay As You Go

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.

How to use UnHash API

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))
}

Sample Responses


Successful request
                                            
{
    "status": "success",
    "msisdn": "254712345678",
    "message": "Success"
}
                                        
Unsuccessful request
                                            
{
    "status": "error",
    "msisdn": "",
    "message": "Insufficient units"
}
                                        
NOTE: Please track your balances and subscription expiry dates. We shall try our best to remind you to recharge when the balance go below the set threshold or if the subscription expiry date is near.

📖 Frequently Asked Questions (FAQ)

UnHash is a utility API that helps developers and consumers decode SHA256 M-Pesa phone number hashes (MSISDNs) received from the Daraja API. It converts the hash into a clear-text phone number.

Following Kenya’s Data Protection Act, telcos like Safaricom limited the sharing of personal data — including phone numbers — with third parties. Unfortunately, many systems still rely on phone numbers for notifications, validation, and communication. UnHash bridges that gap securely.

You send a SHA256 hash via a simple HTTP API call. UnHash instantly decodes the hash and returns the corresponding phone number (MSISDN) in the response. It’s secure, fast, and developer-friendly.

Each successful request costs Ksh 0.30 (billed per unit). For high-volume usage, we offer unlimited subscription plans that can be tailored to your business needs. Contact us for custom pricing.

The API is designed for speed. You’ll receive the decoded phone number instantly after submitting the hash, making it ideal for real-time workflows.