Public
Documentation Settings

Kobowallet documentation

Welcome to Kobowallet.co developer's page, kobowallet is a leading partner in providing value added service to clients all at an affordable rate, we have done all the heavy and technical complaint work just to make payment and life seamless for you.

Happy Integrations !!!

WEBHOOK

Webhook is our way of reaching out to you, for every transaction you made on our platform to let your know the status of each transaction and below is the sample data you are expected to receive from us.

NB: Webhook is available only for Airtime and Databundle, please be patient while we make it available across all services.

json
{
    "success": true,
    "status": "approved",
    "message": "Approved, purchase successful",
    "data": {
        "reference": "Z9bDdCrDZxYaa9Hs",
        "customer_reference": "12r3dx1h23sw0-ql3",
        "description": "Purchase of  (0137200146355) Worth N100",
        "amount": "100",
        "recipient": "07033671502",
        "type": "electricity",
        "meter_token": "3688-3760-2613-6123-9605",
        "meter_unit": 1.5,
        "meter_receipt": "16776667059989",
        "refund": "NA"
    }
}

WEBHOOK VERIFICATION

It is pertinent to verify that the request on your webhook endpoint is actually from us before you start processing it, please see the code below to verify using our signature.

php
// only a post request with kobowallet signature header should be processed.
if((strtoupper($_SERVER['REQUEST_METHOD']) != 'POST')||!array_key_exists('x-kobowallet-signature', $_SERVER)) 
    exit();
// Retrieve the request's body
$input = @file_get_contents("php://input");
define('KOBOWALLET_SECRET_KEY','YOUR_AGENT_TOKEN');
// validate event do all at once to avoid timing attack
if($_SERVER['HTTP_X_KOBOWALLET_SIGNATURE'] == hash_hmac('sha512', $input, KOBOWALLET_SECRET_KEY))
{
   //decode the jsonfied data and proceed with your operation
    $data = json_decode($input);
} else {
    exit();
}
?>

BASE URL

https://kobowallet.co/api/v1