OleqPay Docs
Oleq Payment Gateway API

Callbacks & Salt

Receive transaction results and verify their authenticity.

After each transaction is processed, Oleq sends a POST request to your CallbackUrl. Always verify the Salt signature before crediting accounts or updating records. Your callback endpoint must respond with HTTP 200 OK promptly.

C2B callback payload

{
  "RefID": "263022",
  "BankCode": "KE_MPESA",
  "Reference": "AADFW39GL8WRA",
  "AccountCode": "12345",
  "TransType": "STKPUSH",
  "TransID": "UC5R484D2P",
  "TransTime": "03/05/2026 16:30:12",
  "TransAmount": "50.0000",
  "BusinessShortCode": "261074",
  "BillRefNumber": "zcepadk25ogx",
  "OrgAccountBalance": "0.0000",
  "MSISDN": "254710111222",
  "FirstName": "",
  "LastName": "",
  "Narration": "Success. Request accepted for processing",
  "Salt": "cc1ba133b381ca4a067b34cc0be1e1dd..."
}
FieldDescription
RefIDInternal reference ID assigned by Oleq
BankCodePayment channel identifier (e.g. KE_MPESA)
ReferenceUnique M-Pesa transaction reference used in Salt computation
TransIDM-Pesa transaction ID (e.g. UC5R484D2P)
TransTimeTransaction timestamp in MM/dd/yyyy HH:mm:ss format
TransAmountAmount received, 4 decimal places (e.g. "50.0000")
BillRefNumberMaps to the Account field from the original C2B request
MSISDNCustomer phone number (used in Salt verification)
SaltSHA-256 signature for verifying callback authenticity

Salt verification — C2B

Salt = sha256(AuthKey + MSISDN + TransAmount + Reference)
C# — Salt verification
// Verify C2B callback Salt
string raw = authKey + msisdn + transAmount + reference;
string computed = ComputeSha256(raw);

bool isValid = string.Equals(computed, callbackSalt,
    StringComparison.OrdinalIgnoreCase);

static string ComputeSha256(string input) {
    using var sha = SHA256.Create();
    var bytes = sha.ComputeHash(Encoding.UTF8.GetBytes(input));
    return BitConverter.ToString(bytes)
        .Replace("-", "").ToLower();
}

B2C callback payload

{
  "RefID": "ZCEPALVKJA13",
  "BankCode": "KE_MPESA",
  "AccountCode": "12345",
  "Occasion": "ZCEPALVKJA13",
  "TransType": "B2C",
  "TransID": "UC5R484EMS",
  "BillRefNumber": "ZCEPALVKJA13",
  "UReference": "ZCEPALVKJA13",
  "Reference": "UC5R484EMS",
  "TransTime": "3/5/2026 4:38:24 PM",
  "TransAmount": "100.00",
  "BusinessShortCode": "12345",
  "OrgAccountBalance": "10",
  "MSISDN": "254710814935",
  "FirstName": "JOHN",
  "LastName": "DOE",
  "Salt": "c87852c2bda148af7a3c7d0602dce6e9..."
}

Expected callback acknowledgment response:

{ "status": "00", "message": "Callback recieved successfully." }

Salt verification — B2C

Salt = sha256(AuthKey + MSISDN + TransAmount + TransID)

In B2C callbacks, the Reference field contains the M-Pesa TransID (e.g. UC5R484EMS), not your original reference. Use this value when computing the Salt.

On this page