NAV Navbar
shell php python javascript

Introduction

Welcome to the WayaWaya API! You can use our API to access WayaWaya API endpoints, which can can send various supported requests and responses .

We have language bindings in Shell, Php, Python, and JavaScript! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right. .

Authentication

To authorize, use this code:

<?php
$url = 'https://sandbox.wayawaya.com/auth/v1/genww?access_type=secure_credentials';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
$credentials = base64_encode('TRANSACTION_KEY:KEY_ID');
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: '.$credentials)); //setting a custom header
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);

$curl_response = curl_exec($curl);

echo json_decode($curl_response);

?>
import requests
from requests.auth import HTTPBasicAuth

transaction_key = "TRANSACTION_KEY"
key_id = "KEY_ID"
api_URL = "https://sandbox.wayawaya.com/auth/v1/genww?access_type=secure_credentials"

r = requests.get(api_URL, auth=HTTPBasicAuth(transaction_key, key_id))

print (r.text)
# With shell, you can just pass the correct header with each request
curl -X GET https://sandbox.wayawaya.com/auth/v1/genww?access_type=secure_credentials  \
-H "Accept: application/json" \
-u "TRANSACTION_KEY:KEY_ID"
var request = require('request'),
transaction_key = "TRANSACTION_KEY",
key_id = "KEY_ID",
url = "https://sandbox.wayawaya.com/auth/v1/genww?access_type=secure_credentials"
auth = "Basic " + new Buffer(transaction_key + ":" + key_id).toString("base64");

request(
{
url : url,
headers : {
"Authorization" : auth
}
},
function (error, response, body) {
// Use Body Object to access Authentication Key
}
)

Make sure to replace TRANSACTION_KEY with your Transaction key and KEY_ID with your Key ID .

WayaWaya uses API keys to allow access to the API. You can register for a new WayaWaya API key at our developer portal(https://www.wayawaya.com/developers).

WayaWaya expects for the Base64 encoded Combined Transaction Key and Key ID to be included in this API requests to the server in a header that looks like the following:

Authorization: base64_concated_credentials

Service Lookup

Search Available Services

<?php
$url = 'https://sandbox.wayawaya.com/pp_services';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization: ACCESS_TOKEN')); //setting custom header


$curl_post_data = array(
//Fill in the request parameters with valid values
'request_key' => ' ',
'request_code' => ' ',
'country' => ' ',
'acc_type' => ' ',
'QueueTimeOutURL' => 'http://your_timeout_url',
'ResultURL' => 'http://your_result_url'
);

$data_string = json_encode($curl_post_data);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$curl_response = curl_exec($curl);
print_r($curl_response);

echo $curl_response;
?>
import requests

access_token = "Access-Token"
api_url = "https://sandbox.wayawaya.com/pp_services"
headers = { "Authorization": " %s" % access_token }
request = {
"request_key": " ",
"request_code":" ",
"country": " ",
"acc_type": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}

response = requests.post(api_url, json = request, headers=headers)

print (response.text)
curl -X POST --header "Authorization: <Access-Token>" --header "Content-Type: application/json" -d "{
\"request_key\":\" \",
\"request_code\":\" \",
\"country\":\" \",
\"acc_type\":\" \",
\"QueueTimeOutURL\":\"http://your_timeout_url\",
\"ResultURL\":\"http://your_result_url\"
}" "https://sandbox.wayawaya.com/pp_services"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.com/pp_services"
auth = "" + oauth_token;

request(
{
method: 'POST'
url : url,
headers : {
"Authorization" : auth
},
json : {
"request_key": " ",
"request_code":" ",
"country": " ",
"acc_type": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}
},
function (error, response, body) {
// Use the body object to extract the response
console.log(body)
}
)

The above command returns JSON structured like this:

[
  {
    "id": 1,
    "name": "sendtomobile",
    "country": {
    "id": 254,
    "name": "kenya",
    "provider": "mpesa",
    "lower_limit": 5,
    "upper_limit": 700
    }
  },
  {
  "id": 2,
  "name": "sendtoaccount",
  "country": {
  "id": 254,
  "name": "kenya",
  "provider": "visadirect",
  "lower_limit": 5,
  "upper_limit": 1500
  }
  }
]

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
country kenya Change to the country where you are accessing services
acc_type merchant Default Account type is Merchant.

Exchange Rate Lookup

<?php
$url = 'https://sandbox.wayawaya.com/checks/service_lookup/v1/fxlookup';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization: ACCESS_TOKEN')); //setting custom header


$curl_post_data = array(
//Fill in the request parameters with valid values
'request_key' => ' ',
'request_code' => ' ',
'country' => ' ',
'source_currency' => ' ',
'QueueTimeOutURL' => 'http://your_timeout_url',
'ResultURL' => 'http://your_result_url'
);

$data_string = json_encode($curl_post_data);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$curl_response = curl_exec($curl);
print_r($curl_response);

echo $curl_response;
?>
import requests

access_token = "Access-Token"
api_url = "https://sandbox.wayawaya.com/checks/service_lookup/v1/fxlookup"
headers = { "Authorization": " %s" % access_token }
request = {
"request_key": " ",
"request_code":" ",
"country": " ",
"source_currency": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}

response = requests.post(api_url, json = request, headers=headers)

print (response.text)
curl -X POST --header "Authorization: <Access-Token>" --header "Content-Type: application/json" -d "{
\"request_key\":\" \",
\"request_code\":\" \",
\"country\":\" \",
\"source_currency\":\" \",
\"QueueTimeOutURL\":\"http://your_timeout_url\",
\"ResultURL\":\"http://your_result_url\"
}" "https://sandbox.wayawaya.com/checks/service_lookup/v1/fxlookup"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.com/checks/service_lookup/v1/fxlookup"
auth = "" + oauth_token;

request(
{
method: 'POST'
url : url,
headers : {
"Authorization" : auth
},
json : {
"request_key": " ",
"request_code":" ",
"country":" ",
"source_currency": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}
},
function (error, response, body) {
// Use the body object to extract the response
console.log(body)
}
)

The above command returns JSON structured like this:

{
  "id": 1,
  "source_currency": "USD",
  "receive_currency": "KES",
  "exrate": 98.54
}

This endpoint retrieves specific exchange rates for specified source currency.

HTTPS Request

POST https://sandbox.wayawaya.com/checks/service_lookup/v1/fxlookup

URL Parameters

Parameter Default Description
country kenya The destination country of transaction recipient
source_currency usd The originating transaction source currency.

Fee lookup

<?php
$url = 'https://sandbox.wayawaya.com/checks/service_lookup/v1/feelookup';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization: ACCESS_TOKEN')); //setting custom header


$curl_post_data = array(
//Fill in the request parameters with valid values
'request_key' => ' ',
'request_code' => ' ',
'service_type' => ' ',
'source_type' => ' ',
'source_id' => ' ',
'destination_id' => ' ',
'QueueTimeOutURL' => 'http://your_timeout_url',
'ResultURL' => 'http://your_result_url'
);

$data_string = json_encode($curl_post_data);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$curl_response = curl_exec($curl);
print_r($curl_response);

echo $curl_response;
?>
import requests

access_token = "Access-Token"
api_url = "https://sandbox.wayawaya.com/checks/service_lookup/v1/feelookup"
headers = { "Authorization": " %s" % access_token }
request = {
"request_key": " ",
"request_code":" ",
"service_type": " ",
"source_type": " ",
"source_id": " ",
"destination_id": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}

response = requests.post(api_url, json = request, headers=headers)

print (response.text)
curl -X POST --header "Authorization: <Access-Token>" --header "Content-Type: application/json" -d "{
\"request_key\":\" \",
\"request_code\":\" \",
\"service_type\":\" \",
\"source_type\":\" \",
\"source_id\":\" \",
\"destination_id\":\" \",
\"QueueTimeOutURL\":\"http://your_timeout_url\",
\"ResultURL\":\"http://your_result_url\"
}" "https://sandbox.wayawaya.com/checks/service_lookup/v1/feelookup"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.com/checks/service_lookup/v1/feelookup"
auth = "" + oauth_token;

request(
{
method: 'POST'
url : url,
headers : {
"Authorization" : auth
},
json : {
"request_key": " ",
"request_code":" ",
"service_type": " ",
"source_type": " ",
"source_id": " ",
"destination_id": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}
},
function (error, response, body) {
// Use the body object to extract the response
console.log(body)
}
)

The above command returns JSON structured like this:

{
  "id": 1,
  "service" : "sendtomobile"
  "source_type" : "currency"
   "source_id" : "USD"
    "destination_id" : "KES"
}

This endpoint checks fees charged for specific transactions

HTTPS Request

DELETE https://sandbox.wayawaya.com/checks/service_lookup/v1/feelookup

URL Parameters

Parameter Required Description
service_type YES The type of service e.g sendtomobile
source_type YES the Source type e.g currency.
source_id YES Identifier for source of transaction e.g USD
destination_id YES Identifier for receiver of transactions e.g KES.

Payout Services

Send to Mobile

<?php
$url = 'https://sandbox.wayawaya.com/pp_services';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization: ACCESS_TOKEN')); //setting custom header


$curl_post_data = array(
//Fill in the request parameters with valid values
'request_key' => 'XXXX',
'merchant_trans_id' => 'XXXXX',
'request_type' => 'sendtomobile',
'account_no' => 'XXXXXX',
'source_currency' => 'XXXXXX',
'sender_firstname' => 'XXXXXX',
'sender_lastname' => 'XXXXXX',
'sender_phonenumber' => 'XXXXXX',
'sender_email' => 'XXXXXX',
'sender_deviceid' => 'XXXXXX',
'sender_ipaddress' => 'XXXXXX',
'sender_address' => 'XXXXXX',
'sender_postalcode' => 'XXXXXX',
'sender_city' => 'XXXXXX',
'sender_country' => 'XXXXXX',
'receive_currency' => 'XXXXXX',
'receive_wallet' => 'XXXXXX',
'receive_phonenumber' => 'XXXXXX',
'receive_firstname' => 'XXXXXX',
'receive_lastname' => 'XXXXXX',
'receive_country' => 'XXXXXX',
'receive_address' => 'XXXXXX',
'receive_postalcode' => 'XXXXXX',
'receive_city' => 'XXXXXX',
'amount' => '123.00',
'card_token' => 'xxxxxxxxxxxxx',
'card_user_id' => 'xxxxxxxxxxxxx',
'cust_phone_no' => 'XXXXXX',
'QueueTimeOutURL' => 'http://your_timeout_url',
'ResultURL' => 'http://your_result_url'
);

$data_string = json_encode($curl_post_data);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$curl_response = curl_exec($curl);
print_r($curl_response);

echo $curl_response;
?>
import requests

access_token = "Access-Token"
api_url = "https://sandbox.wayawaya.com/pp_services"
headers = { "Authorization": " %s" % access_token }
request = {
"request_key" : "XXXX",
"merchant_trans_id" : "XXXXX",
"request_type" : "sendtomobile",
"account_no" : "XXXXXX",
"source_currency" : "XXX",
"sender_firstname" : "XXXXXXX",
"sender_lastname" : "XXXXXXX",
"sender_phonenumber" : "XXXXXXX",
"sender_email" : "XXXXXXX",
"sender_firstname" : "XXXXXXX",
"sender_deviceid" : "XXXXXXX",
"sender_ipaddress" : "XXXXXXX",
"sender_address" : "XXXXXXX",
"sender_postalcode" : "XXXXXXX",
"sender_city" : "XXXXXXX",
"receive_currency" : "XXXXXXX",
"receive_wallet" : "XXXXXXX",
"receive_phonenumber" : "XXXXXXX",
"receive_firstname" : "XXXXXXX",
"receive_lastname" : "XXXXXXX",
"receive_country" : "XXXXXXX",
"receive_address" : "XXXXXXX",
"receive_postalcode" : "XXXXXXX",
"receive_city" : "XXXXXXX",
"amount" : "XXXXXX",
"card_user_id" : "XXXXXX",
"card_token" : "XXXXXX",
"cust_phone_no" : "XXXXXX",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}

response = requests.post(api_url, json = request, headers=headers)

print (response.text)
curl -X POST --header "Authorization: <Access-Token>" --header "Content-Type: application/json" -d "{
\"request_key\":\" \",
\"merchant_trans_id\":\" \",
\"request_type\":\"sendtomobile\",
\"source_currency\" : \" \",
\"sender_firstname\" : \" \",
\"sender_lastname\" : \" \",
\"sender_phonenumber\" : \" \",
\"sender_email\" : \" \",
\"sender_firstname\" : \" \",
\"sender_deviceid\" : \" \",
\"sender_ipaddress\" : \" \",
\"sender_address\" : \" \",
\"sender_postalcode\" : \" \",
\"sender_city\" : \" \",
\"receive_currency\" : \" \",
\"receive_walletv\" : \" \",
\"receive_phonenumber\" : \" \",
\"receive_firstname\" : \" \",
\"receive_lastname\" :\" \",
\"receive_country\" : \" \",
\"receive_address\" : \" \",
\"receive_postalcode\" : \" \",
\"receive_city\" : \" \",
\"account_no\":\" \",
\"amount\":\" \",
\"card_user_id\":\" \",
\"card_token\":\" \",
\"cust_phone_no\":\" \",
\"QueueTimeOutURL\":\"http://your_timeout_url\",
\"ResultURL\":\"http://your_result_url\"
}" "https://sandbox.wayawaya.com/pp_services"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.com/pp_services"
auth = "" + oauth_token;

request(
{
method: 'POST'
url : url,
headers : {
"Authorization" : auth
},
json : {
"request_key": " ",
"merchant_trans_id":" ",
"request_type" : "sendtomobile",
"account_no" : "XXXXXX",
"source_currency" : "XXX",
"sender_firstname" : "XXXXXXX",
"sender_lastname" : "XXXXXXX",
"sender_phonenumber" : "XXXXXXX",
"sender_email" : "XXXXXXX",
"sender_firstname" : "XXXXXXX",
"sender_deviceid" : "XXXXXXX",
"sender_ipaddress" : "XXXXXXX",
"sender_address" : "XXXXXXX",
"sender_postalcode" : "XXXXXXX",
"sender_city" : "XXXXXXX",
"receive_currency" : "XXXXXXX",
"receive_wallet" : "XXXXXXX",
"receive_phonenumber" : "XXXXXXX",
"receive_firstname" : "XXXXXXX",
"receive_lastname" : "XXXXXXX",
"receive_country" : "XXXXXXX",
"receive_address" : "XXXXXXX",
"receive_postalcode" : "XXXXXXX",
"receive_city" : "XXXXXXX",
"amount" : "XXXXXX",
"card_user_id" : "XXXXXX",
"card_token" : "XXXXXX",
"cust_phone_no" : "XXXXXX",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}
},
function (error, response, body) {
// Use the body object to extract the response
console.log(body)
}
)

The above command returns JSON structured like this:

{
"header": {
"timestamp":"2019-07-05 15:45:23",
"response_code":"0",
"response_description":"OK"
},
"body": {
"merchant_trans_id":"9909013",
"ww_trans_id":"xxxxxxxxxxxxxx",
“wcBalance”:"0.00",
“transactionFee”:50.40,
"exchangeRate":"0.00",
“recipient_details”:”XXXXXXXX”
“recipient_validated”:”YES”
}
}

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
request_key xxxxx123 Unique alphanumeric value shared to merchant/developer
merchant_trans_id xxxx123 Unique Alphanumeric value identifying transacactions(length of between 8 - 16 characters).
request_type KPLC_PRE value identifying transaction type
account_no 1231233113 KPLC Pre-Paid Metre number
account_no 1231233113 KPLC Pre-Paid Metre number
amount 12122.00 The electricity token purchase amount
source_currency XXX Source Currency e.g KES
sender_firstname XXXXXXX sending user firstname
sender_lastname XXXXXXX Sending user lastname
sender_phonenumber XXXXXXX Sending user phone number
sender_email XXXXXXX Sending user E-Mail
sender_devicelocation XXXXXXX Sender real device location obtained from WayaWaya SDK or per set Guidelines
sender_simid XXXXXXX Sender SIM Card number obtained using WayaWaya SDK or per Set Guidelines
sender_simserial XXXXXXX Sender SIM Card serial obtained from WayaWaya SDK or per set Guidelines
sender_deviceid XXXXXXX Sender Device ID Captured using wayawaya SDK or obtained as per guidelines
sender_ipaddress XXXXXXX Sender IP address
sender_address XXXXXXX Sender physical address should match with card billing address
sender_postalcode XXXXXXX Sender postal code location
sender_city XXXXXXX Sender City location
receive_currency XXXXXXX Recipient currency eg KES
receive_wallet XXXXXXX Recipient wallet e.g MPESA & Airtel Money
receive_phonenumber XXXXXXX Recipient Phone Number in international number format without leading (+)
receive_firstname XXXXXXX Recipient First name
receive_lastname XXXXXXX Recipient last name
receive_country XXXXXXX Recipient receiving Country
receive_address XXXXXXX Recipient Address
receive_postalcode XXXXXXX Recipient Postal Code
receive_city XXXXXXX Recipient City
amount XXXXXX Transaction Amount
card_user_id XXXXXX Strored Card customer token Userid registered by WayaWaya
card_token XXXXXX Stored customer card token issued by WayaWaya
cust_phone_no 2547xxxxxxxx Paying customer Phone number
QueueTimeOutURL http://your_timeout_url Time-out URL
ResultURL http://your_result_url Response URL

Send to Account

<?php
$url = 'https://sandbox.wayawaya.com/pp_services';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization: ACCESS_TOKEN')); //setting custom header


$curl_post_data = array(
//Fill in the request parameters with valid values
'request_key' => 'XXXX',
'merchant_trans_id' => 'XXXXX',
'request_type' => 'sendtoaccount',
'account_no' => 'XXXXXX',
'source_currency' => 'XXXXXX',
'sender_firstname' => 'XXXXXX',
'sender_lastname' => 'XXXXXX',
'sender_phonenumber' => 'XXXXXX',
'sender_email' => 'XXXXXX',
'sender_deviceid' => 'XXXXXX',
'sender_ipaddress' => 'XXXXXX',
'sender_address' => 'XXXXXX',
'sender_postalcode' => 'XXXXXX',
'sender_city' => 'XXXXXX',
'sender_country' => 'XXXXXX',
'receive_currency' => 'XXXXXX',
'receive_bank' => 'XXXXXX',
'receive_bankcountry' => 'XXXXXX',
'receive_accountno' => 'XXXXXX',
'receive_firstname' => 'XXXXXX',
'receive_lastname' => 'XXXXXX',
'receive_country' => 'XXXXXX',
'receive_address' => 'XXXXXX',
'receive_postalcode' => 'XXXXXX',
'receive_city' => 'XXXXXX',
'amount' => '123.00',
'card_token' => 'xxxxxxxxxxxxx',
'card_user_id' => 'xxxxxxxxxxxxx',
'cust_phone_no' => 'XXXXXX',
'QueueTimeOutURL' => 'http://your_timeout_url',
'ResultURL' => 'http://your_result_url'
);

$data_string = json_encode($curl_post_data);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$curl_response = curl_exec($curl);
print_r($curl_response);

echo $curl_response;
?>
import requests

access_token = "Access-Token"
api_url = "https://sandbox.wayawaya.com/pp_services"
headers = { "Authorization": " %s" % access_token }
request = {
"request_key" : "XXXX",
"merchant_trans_id" : "XXXXX",
"request_type" : "sendtomobile",
"account_no" : "XXXXXX",
"source_currency" : "XXX",
"sender_firstname" : "XXXXXXX",
"sender_lastname" : "XXXXXXX",
"sender_phonenumber" : "XXXXXXX",
"sender_email" : "XXXXXXX",
"sender_firstname" : "XXXXXXX",
"sender_deviceid" : "XXXXXXX",
"sender_ipaddress" : "XXXXXXX",
"sender_address" : "XXXXXXX",
"sender_postalcode" : "XXXXXXX",
"sender_city" : "XXXXXXX",
"receive_currency" : "XXXXXXX",
"receive_bank" : "XXXXXX",
"receive_bankcountry" : "XXXXXX",
"receive_accountno" : "XXXXXX",
"receive_firstname" : "XXXXXXX",
"receive_lastname" : "XXXXXXX",
"receive_country" : "XXXXXXX",
"receive_address" : "XXXXXXX",
"receive_postalcode" : "XXXXXXX",
"receive_city" : "XXXXXXX",
"amount" : "XXXXXX",
"card_user_id" : "XXXXXX",
"card_token" : "XXXXXX",
"cust_phone_no" : "XXXXXX",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}

response = requests.post(api_url, json = request, headers=headers)

print (response.text)
curl -X POST --header "Authorization: <Access-Token>" --header "Content-Type: application/json" -d "{
\"request_key\":\" \",
\"merchant_trans_id\":\" \",
\"request_type\":\"sendtomobile\",
\"source_currency\" : \" \",
\"sender_firstname\" : \" \",
\"sender_lastname\" : \" \",
\"sender_phonenumber\" : \" \",
\"sender_email\" : \" \",
\"sender_firstname\" : \" \",
\"sender_deviceid\" : \" \",
\"sender_ipaddress\" : \" \",
\"sender_address\" : \" \",
\"sender_postalcode\" : \" \",
\"sender_city\" : \" \",
\"receive_currency\" : \" \",
\"receive_currency\" : \"XXXXXXX\",
\"receive_bank\" : \"XXXXXX\",
\"receive_bankcountry\" : \"XXXXXX\",
\"receive_firstname\" : \" \",
\"receive_lastname\" :\" \",
\"receive_country\" : \" \",
\"receive_address\" : \" \",
\"receive_postalcode\" : \" \",
\"receive_city\" : \" \",
\"account_no\":\" \",
\"amount\":\" \",
\"card_user_id\":\" \",
\"card_token\":\" \",
\"cust_phone_no\":\" \",
\"QueueTimeOutURL\":\"http://your_timeout_url\",
\"ResultURL\":\"http://your_result_url\"
}" "https://sandbox.wayawaya.com/pp_services"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.com/pp_services"
auth = "" + oauth_token;

request(
{
method: 'POST'
url : url,
headers : {
"Authorization" : auth
},
json : {
"request_key": " ",
"merchant_trans_id":" ",
"request_type" : "sendtomobile",
"account_no" : "XXXXXX",
"source_currency" : "XXX",
"sender_firstname" : "XXXXXXX",
"sender_lastname" : "XXXXXXX",
"sender_phonenumber" : "XXXXXXX",
"sender_email" : "XXXXXXX",
"sender_firstname" : "XXXXXXX",
"sender_deviceid" : "XXXXXXX",
"sender_ipaddress" : "XXXXXXX",
"sender_address" : "XXXXXXX",
"sender_postalcode" : "XXXXXXX",
"sender_city" : "XXXXXXX",
"receive_currency" : "XXXXXXX",
"receive_bank" : "XXXXXX",
"receive_bankcountry" : "XXXXXX",
"receive_accountno" : "XXXXXX",
"receive_firstname" : "XXXXXXX",
"receive_lastname" : "XXXXXXX",
"receive_country" : "XXXXXXX",
"receive_address" : "XXXXXXX",
"receive_postalcode" : "XXXXXXX",
"receive_city" : "XXXXXXX",
"amount" : "XXXXXX",
"card_user_id" : "XXXXXX",
"card_token" : "XXXXXX",
"cust_phone_no" : "XXXXXX",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}
},
function (error, response, body) {
// Use the body object to extract the response
console.log(body)
}
)

The above command returns JSON structured like this:

{
"header": {
"timestamp":"2019-07-05 15:45:23",
"response_code":"0",
"response_description":"OK"
},
"body": {
"merchant_trans_id":"9909013",
"ww_trans_id":"xxxxxxxxxxxxxx",
“wcBalance”:"0.00",
“transactionFee”:50.40,
"exchangeRate":"0.00",
“recipient_details”:”XXXXXXXX”
“recipient_validated”:”YES”
}
}

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
request_key xxxxx123 Unique alphanumeric value shared to merchant/developer
merchant_trans_id xxxx123 Unique Alphanumeric value identifying transacactions(length of between 8 - 16 characters).
request_type KPLC_PRE value identifying transaction type
account_no 1231233113 KPLC Pre-Paid Metre number
account_no 1231233113 KPLC Pre-Paid Metre number
amount 12122.00 The electricity token purchase amount
source_currency XXX Source Currency e.g KES
sender_firstname XXXXXXX sending user firstname
sender_lastname XXXXXXX Sending user lastname
sender_phonenumber XXXXXXX Sending user phone number
sender_email XXXXXXX Sending user E-Mail
sender_devicelocation XXXXXXX Sender real device location obtained from WayaWaya SDK or per set Guidelines
sender_simid XXXXXXX Sender SIM Card number obtained using WayaWaya SDK or per Set Guidelines
sender_simserial XXXXXXX Sender SIM Card serial obtained from WayaWaya SDK or per set Guidelines
sender_deviceid XXXXXXX Sender Device ID Captured using wayawaya SDK or obtained as per guidelines
sender_ipaddress XXXXXXX Sender IP address
sender_address XXXXXXX Sender physical address should match with card billing address
sender_postalcode XXXXXXX Sender postal code location
sender_city XXXXXXX Sender City location
receive_currency XXXXXXX Recipient currency eg KES
receive_bank XXXXXXX Recipient Bank as described in Bank Lookup service
receive_bankcountry XXXXXXX Recipient Bank as described in Bank Lookup service
receive_accountno XXXXXXX Recipient Bank Account Number
receive_firstname XXXXXXX Recipient First name
receive_lastname XXXXXXX Recipient last name
receive_country XXXXXXX Recipient receiving Country
receive_address XXXXXXX Recipient Address
receive_postalcode XXXXXXX Recipient Postal Code
receive_city XXXXXXX Recipient City
amount XXXXXX Transaction Amount
card_user_id XXXXXX Strored Card customer token Userid registered by WayaWaya
card_token XXXXXX Stored customer card token issued by WayaWaya
cust_phone_no 2547xxxxxxxx Paying customer Phone number
QueueTimeOutURL http://your_timeout_url Time-out URL
ResultURL http://your_result_url Response URL

Wallet Look Up

require 'feelookup'

api = feelookup::APIClient.authorize!('ww_authenticated_user')
api.Services.feelookup(2)
import feelookup

api = feelookup.authorize('ww_authenticated_user')
api.Services.feelookup(2)
curl "https://sandbox.wayawaya.com/pp_services"
-X feelookup
-H "Authorization: ww_authenticated_user"

The above command returns JSON structured like this:

{
"id": 1,
"service" : "sendtomobile"
"source_type" : "currency"
"source_id" : "USD"
"destination_id" : "KES"
}

This endpoint checks fees charged for specific transactions

HTTPS Request

DELETE https://sandbox.wayawaya.com/pp_services

URL Parameters

Parameter Required Description
service_type YES The type of service e.g sendtomobile
source_type YES the Source type e.g currency.
source_id YES Identifier for source of transaction e.g USD
destination_id YES Identifier for receiver of transactions e.g KES.

Bank Look Up

require 'feelookup'

api = feelookup::APIClient.authorize!('ww_authenticated_user')
api.Services.feelookup(2)
import feelookup

api = feelookup.authorize('ww_authenticated_user')
api.Services.feelookup(2)
curl "https://sandbox.wayawaya.com/pp_services"
-X feelookup
-H "Authorization: ww_authenticated_user"

The above command returns JSON structured like this:

{
"id": 1,
"service" : "sendtomobile"
"source_type" : "currency"
"source_id" : "USD"
"destination_id" : "KES"
}

This endpoint checks fees charged for specific transactions

HTTPS Request

DELETE https://sandbox.wayawaya.com/pp_services

URL Parameters

Parameter Required Description
service_type YES The type of service e.g sendtomobile
source_type YES the Source type e.g currency.
source_id YES Identifier for source of transaction e.g USD
destination_id YES Identifier for receiver of transactions e.g KES.

Bill Payments

KPLC tokens

<?php
$url = 'https://sandbox.wayawaya.com/pp_services';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization: ACCESS_TOKEN')); //setting custom header


$curl_post_data = array(
//Fill in the request parameters with valid values
'request_key' => 'XXXX',
'merchant_trans_id' => 'XXXXX',
'request_type' => 'KPLC_PRE',
'account_no' => 'XXXXXX',
'amount' => '123.00',
'cust_phone_no' => 'XXXXXX',
'QueueTimeOutURL' => 'http://your_timeout_url',
'ResultURL' => 'http://your_result_url'
);

$data_string = json_encode($curl_post_data);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$curl_response = curl_exec($curl);
print_r($curl_response);

echo $curl_response;
?>
import requests

access_token = "Access-Token"
api_url = "https://sandbox.wayawaya.com/pp_services"
headers = { "Authorization": " %s" % access_token }
request = {
"request_key" : "XXXX",
"merchant_trans_id" : "XXXXX",
"request_type" : "KPLC_PRE",
"account_no" : "XXXXXX",
"amount" : "XXXXXX",
"cust_phone_no" : "XXXXXX",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}

response = requests.post(api_url, json = request, headers=headers)

print (response.text)
curl -X POST --header "Authorization: <Access-Token>" --header "Content-Type: application/json" -d "{
\"request_key\":\" \",
\"merchant_trans_id\":\" \",
\"request_type\":\" \",
\"account_no\":\" \",
\"amount\":\" \",
\"cust_phone_no\":\" \",
\"QueueTimeOutURL\":\"http://your_timeout_url\",
\"ResultURL\":\"http://your_result_url\"
}" "https://sandbox.wayawaya.com/pp_services"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.com/pp_services"
auth = "" + oauth_token;

request(
{
method: 'POST'
url : url,
headers : {
"Authorization" : auth
},
json : {
"request_key": " ",
"merchant_trans_id":" ",
"request_type": " ",
"account_no": " ",
"amount": " ",
"cust_phone_no": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}
},
function (error, response, body) {
// Use the body object to extract the response
console.log(body)
}
)

The above command returns JSON structured like this:

{
"header": {
"timestamp":"2019-07-05 15:45:23",
"response_code":"0",
"response_description":"OK"
},
"body": {
"merchant_trans_id":"9909013",
"ww_trans_id":"101",
"wcBalance”:"100.55",
“commissionBalance”:”50.40”,
"ref1":"12345678901234",
“ref2”:”0.00”
}
}

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
request_key xxxxx123 Unique alphanumeric value shared to merchant/developer
merchant_trans_id xxxx123 Unique Alphanumeric value identifying transacactions(length of between 8 - 16 characters).
request_type KPLC_PRE value identifying transaction type
account_no 1231233113 KPLC Pre-Paid Metre number
amount 12122.00 The electricity token purchase amount
cust_phone_no 2547xxxxxxxx Paying customer Phone number

KPLC PostPaid

<?php
$url = 'https://sandbox.wayawaya.com/pp_services';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization: ACCESS_TOKEN')); //setting custom header


$curl_post_data = array(
//Fill in the request parameters with valid values
'request_key' => 'XXXX',
'merchant_trans_id' => 'XXXXX',
'request_type' => 'KPLC_POST',
'account_no' => 'XXXXXX',
'amount' => '123.00',
'cust_phone_no' => 'XXXXXX',
'QueueTimeOutURL' => 'http://your_timeout_url',
'ResultURL' => 'http://your_result_url'
);

$data_string = json_encode($curl_post_data);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$curl_response = curl_exec($curl);
print_r($curl_response);

echo $curl_response;
?>
import requests

access_token = "Access-Token"
api_url = "https://sandbox.wayawaya.com/pp_services"
headers = { "Authorization": " %s" % access_token }
request = {
"request_key" : "XXXX",
"merchant_trans_id" : "XXXXX",
"request_type" : "KPLC_POST",
"account_no" : "XXXXXX",
"amount" : "103.00",
"cust_phone_no" : "XXXXXX",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}

response = requests.post(api_url, json = request, headers=headers)

print (response.text)
curl -X POST --header "Authorization: <Access-Token>" --header "Content-Type: application/json" -d "{
\"request_key\":\" \",
\"merchant_trans_id\":\" \",
\"request_type\":\" \",
\"account_no\":\" \",
\"amount\":\" \",
\"cust_phone_no\":\" \",
\"QueueTimeOutURL\":\"http://your_timeout_url\",
\"ResultURL\":\"http://your_result_url\"
}" "https://sandbox.wayawaya.com/pp_services"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.com/pp_services"
auth = "" + oauth_token;

request(
{
method: 'POST'
url : url,
headers : {
"Authorization" : auth
},
json : {
"request_key": " ",
"merchant_trans_id":" ",
"request_type": " ",
"account_no": " ",
"amount": " ",
"cust_phone_no": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}
},
function (error, response, body) {
// Use the body object to extract the response
console.log(body)
}
)

The above command returns JSON structured like this:

{
"header": {
"timestamp":"2019-07-05 15:45:23",
"response_code":"0",
"response_description":"OK"
},
"body": {
"merchant_trans_id":"9909013",
"ww_trans_id":"101",
"wcBalance”:"100.55",
“commissionBalance”:”50.40”,
"ref1":"",
“ref2”:””
}
}

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
request_key xxxxx123 Unique alphanumeric value shared to merchant/developer
merchant_trans_id xxxx123 Unique Alphanumeric value identifying transacactions(length of between 8 - 16 characters).
request_type KPLC_POST value identifying transaction type
amount 12122.00 The bill payment amount
account_no 123123 KPLC Post-Paid Account number
cust_phone_no 2547xxxxxxxx Paying customer Phone number

KPLC Pre-Paid Bill Validate

<?php
$url = 'https://sandbox.wayawaya.com/pp_services';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization: ACCESS_TOKEN')); //setting custom header


$curl_post_data = array(
//Fill in the request parameters with valid values
'request_key' => 'XXXX',
'merchant_trans_id' => 'XXXXX',
'request_type' => 'KPLCPRE_BILL',
'account_no' => 'XXXXXX',
'cust_phone_no' => 'XXXXXX',
'QueueTimeOutURL' => 'http://your_timeout_url',
'ResultURL' => 'http://your_result_url'
);

$data_string = json_encode($curl_post_data);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$curl_response = curl_exec($curl);
print_r($curl_response);

echo $curl_response;
?>
import requests

access_token = "Access-Token"
api_url = "https://sandbox.wayawaya.com/pp_services"
headers = { "Authorization": " %s" % access_token }
request = {
"request_key" : "XXXX",
"merchant_trans_id" : "XXXXX",
"request_type" : "KPLCPRE_BILL",
"account_no" : "XXXXXX",
"cust_phone_no" : "XXXXXX",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}

response = requests.post(api_url, json = request, headers=headers)

print (response.text)
curl -X POST --header "Authorization: <Access-Token>" --header "Content-Type: application/json" -d "{
\"request_key\":\" \",
\"merchant_trans_id\":\" \",
\"request_type\":\" \",
\"account_no\":\" \",
\"cust_phone_no\":\" \",
\"QueueTimeOutURL\":\"http://your_timeout_url\",
\"ResultURL\":\"http://your_result_url\"
}" "https://sandbox.wayawaya.com/pp_services"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.com/pp_service/"
auth = "" + oauth_token;

request(
{
method: 'POST'
url : url,
headers : {
"Authorization" : auth
},
json : {
"request_key": " ",
"merchant_trans_id":" ",
"request_type": " ",
"account_no": " ",
"cust_phone_no": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}
},
function (error, response, body) {
// Use the body object to extract the response
console.log(body)
}
)

The above command returns JSON structured like this:

{
"header": {
"timestamp":"2019-07-05 15:45:23",
"response_code":"0",
"response_description":"OK"
},
"body": {
"merchant_trans_id":"9909013",
"ww_trans_id":"101",
"wcBalance”:"100.55",
“commissionBalance”:”50.40”,
"MetreName":"John Doe",
“ref2”:””
}
}

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
request_key xxxxx123 Unique alphanumeric value shared to merchant/developer
merchant_trans_id xxxx123 Unique Alphanumeric value identifying transacactions(length of between 8 - 16 characters).
request_type KPLCPRE_BILL value identifying transaction type
account_no 123123 KPLC Pre-Paid Metre number
cust_phone_no 2567xxxxxxxx Paying customer Phone number

KPLC Postpaid Bill Check

<?php
$url = 'https://sandbox.wayawaya.com/pp_services';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization: ACCESS_TOKEN')); //setting custom header


$curl_post_data = array(
//Fill in the request parameters with valid values
'request_key' => 'XXXX',
'merchant_trans_id' => 'XXXXX',
'request_type' => 'KPLC_POST_BILL',
'account_no' => 'XXXXXX',
'cust_phone_no' => 'XXXXXX',
'QueueTimeOutURL' => 'http://your_timeout_url',
'ResultURL' => 'http://your_result_url'
);

$data_string = json_encode($curl_post_data);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$curl_response = curl_exec($curl);
print_r($curl_response);

echo $curl_response;
?>
import requests

access_token = "Access-Token"
api_url = "https://sandbox.wayawaya.com/pp_services"
headers = { "Authorization": " %s" % access_token }
request = {
"request_key" : "XXXX",
"merchant_trans_id" : "XXXXX",
"request_type" : "KPLC_POST",
"account_no" : "XXXXXX",
"cust_phone_no" : "XXXXXX",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}

response = requests.post(api_url, json = request, headers=headers)

print (response.text)
curl -X POST --header "Authorization: <Access-Token>" --header "Content-Type: application/json" -d "{
\"request_key\":\" \",
\"merchant_trans_id\":\" \",
\"request_type\":\" \",
\"account_no\":\" \",
\"cust_phone_no\":\" \",
\"QueueTimeOutURL\":\"http://your_timeout_url\",
\"ResultURL\":\"http://your_result_url\"
}" "https://sandbox.wayawaya.com/pp_services"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.com/pp_service/"
auth = "" + oauth_token;

request(
{
method: 'POST'
url : url,
headers : {
"Authorization" : auth
},
json : {
"request_key": " ",
"merchant_trans_id":" ",
"request_type": " ",
"account_no": " ",
"cust_phone_no": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}
},
function (error, response, body) {
// Use the body object to extract the response
console.log(body)
}
)

The above command returns JSON structured like this:

{
"header": {
"timestamp":"2019-07-05 15:45:23",
"response_code":"0",
"response_description":"OK"
},
"body": {
"merchant_trans_id":"9909013",
"ww_trans_id":"101",
"wcBalance”:"100.55",
“commissionBalance”:”50.40”,
"ref1":"",
“ref2”:””
}
}

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
request_key xxxxx123 Unique alphanumeric value shared to merchant/developer
merchant_trans_id xxxx123 Unique Alphanumeric value identifying transacactions(length of between 8 - 16 characters).
request_type KPLC_POST_BILL value identifying transaction type
account_no 123123 KPLC Post-Paid Account number
cust_phone_no 2547xxxxxxxx Paying customer Phone number

Airtime

<?php
$url = 'https://sandbox.wayawaya.com/pp_services';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization: ACCESS_TOKEN')); //setting custom header


$curl_post_data = array(
//Fill in the request parameters with valid values
'request_key' => 'XXXX',
'merchant_trans_id' => 'XXXXX',
'request_type' => 'AIRTIME_SAF',
'account_no' => 'XXXXXX',
'amount' => '123.00',
'cust_phone_no' => 'XXXXXX',
'QueueTimeOutURL' => 'http://your_timeout_url',
'ResultURL' => 'http://your_result_url'
);

$data_string = json_encode($curl_post_data);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$curl_response = curl_exec($curl);
print_r($curl_response);

echo $curl_response;
?>
import requests

access_token = "Access-Token"
api_url = "https://sandbox.wayawaya.com/pp_services"
headers = { "Authorization": " %s" % access_token }
request = {
"request_key" : "XXXX",
"merchant_trans_id" : "XXXXX",
"request_type" : "AIRTIME_SAF",
"account_no" : "XXXXXX",
"amount" : "103.00",
"cust_phone_no" : "XXXXXX",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}

response = requests.post(api_url, json = request, headers=headers)

print (response.text)
curl -X POST --header "Authorization: <Access-Token>" --header "Content-Type: application/json" -d "{
\"request_key\":\" \",
\"merchant_trans_id\":\" \",
\"request_type\":\" \",
\"account_no\":\" \",
\"amount\":\" \",
\"cust_phone_no\":\" \",
\"QueueTimeOutURL\":\"http://your_timeout_url\",
\"ResultURL\":\"http://your_result_url\"
}" "https://sandbox.wayawaya.com/pp_services"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.com/pp_services"
auth = "" + oauth_token;

request(
{
method: 'POST'
url : url,
headers : {
"Authorization" : auth
},
json : {
"request_key": " ",
"merchant_trans_id":" ",
"request_type": " ",
"account_no": " ",
"amount": " ",
"cust_phone_no": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}
},
function (error, response, body) {
// Use the body object to extract the response
console.log(body)
}
)

The above command returns JSON structured like this:

{
"header": {
"timestamp":"2019-07-05 15:45:23",
"response_code":"0",
"response_description":"OK"
},
"body": {
"merchant_trans_id":"9909013",
"ww_trans_id":"101",
"wcBalance”:"100.55",
“commissionBalance”:”50.40”,
"ref1":"",
“ref2”:””
}
}

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
request_key xxxxx123 Unique alphanumeric value shared to merchant/developer
merchant_trans_id xxxx123 Unique Alphanumeric value identifying transacactions(length of between 8 - 16 characters).
request_type AIRTIME_SAF/AIRTIME_AIRTEL value identifying transaction type
account_no 123123 Account Number to be loaded
amount 12122.00 The bill payment amount
cust_phone_no 2547xxxxxxxx Paying customer Phone number

PayTV

<?php
$url = 'https://sandbox.wayawaya.com/pp_services';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization: ACCESS_TOKEN')); //setting custom header


$curl_post_data = array(
//Fill in the request parameters with valid values
'request_key' => 'XXXX',
'merchant_trans_id' => 'XXXXX',
'request_type' => 'TV_DSTV',
'account_no' => 'XXXXXX',
'amount' => '123.00',
'cust_phone_no' => 'XXXXXX',
'QueueTimeOutURL' => 'http://your_timeout_url',
'ResultURL' => 'http://your_result_url'
);

$data_string = json_encode($curl_post_data);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$curl_response = curl_exec($curl);
print_r($curl_response);

echo $curl_response;
?>
import requests

access_token = "Access-Token"
api_url = "https://sandbox.wayawaya.com/pp_services"
headers = { "Authorization": " %s" % access_token }
request = {
"request_key" : "XXXX",
"merchant_trans_id" : "XXXXX",
"request_type" : "TV_DSTV",
"account_no" : "XXXXXX",
"amount" : "103.00",
"cust_phone_no" : "XXXXXX",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}

response = requests.post(api_url, json = request, headers=headers)

print (response.text)
curl -X POST --header "Authorization: <Access-Token>" --header "Content-Type: application/json" -d "{
\"request_key\":\" \",
\"merchant_trans_id\":\" \",
\"request_type\":\" \",
\"account_no\":\" \",
\"amount\":\" \",
\"cust_phone_no\":\" \",
\"QueueTimeOutURL\":\"http://your_timeout_url\",
\"ResultURL\":\"http://your_result_url\"
}" "https://sandbox.wayawaya.com/pp_services"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.com/pp_services"
auth = "" + oauth_token;

request(
{
method: 'POST'
url : url,
headers : {
"Authorization" : auth
},
json : {
"request_key": " ",
"merchant_trans_id":" ",
"request_type": " ",
"account_no": " ",
"amount": " ",
"cust_phone_no": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}
},
function (error, response, body) {
// Use the body object to extract the response
console.log(body)
}
)

The above command returns JSON structured like this:

{
"header": {
"timestamp":"2019-07-05 15:45:23",
"response_code":"0",
"response_description":"OK"
},
"body": {
"merchant_trans_id":"9909013",
"ww_trans_id":"101",
"wcBalance”:"100.55",
“commissionBalance”:”50.40”,
"ref1":"",
“ref2”:””
}
}

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
request_key xxxxx123 Unique alphanumeric value shared to merchant/developer
merchant_trans_id xxxx123 Unique Alphanumeric value identifying transacactions(length of between 8 - 16 characters).
request_type TV_DSTV/TV_ZUKU/TV_GOTV/TV_STAR value identifying transaction type
account_no 123123 Account Number to be loaded
amount 12122.00 The bill payment amount
cust_phone_no 2547xxxxxxxx Paying customer Phone number

Yaka Pre-Paid

<?php
$url = 'https://sandbox.wayawaya.com/pp_services';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization: ACCESS_TOKEN')); //setting custom header


$curl_post_data = array(
//Fill in the request parameters with valid values
'request_key' => 'XXXX',
'merchant_trans_id' => 'XXXXX',
'request_type' => 'YAKA',
'account_no' => 'XXXXXX',
'amount' => '123.00',
'cust_phone_no' => 'XXXXXX',
'QueueTimeOutURL' => 'http://your_timeout_url',
'ResultURL' => 'http://your_result_url'
);

$data_string = json_encode($curl_post_data);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$curl_response = curl_exec($curl);
print_r($curl_response);

echo $curl_response;
?>
import requests

access_token = "Access-Token"
api_url = "https://sandbox.wayawaya.com/pp_services"
headers = { "Authorization": " %s" % access_token }
request = {
"request_key" : "XXXX",
"merchant_trans_id" : "XXXXX",
"request_type" : "YAKA",
"account_no" : "XXXXXX",
"amount" : "XXXXXX",
"cust_phone_no" : "XXXXXX",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}

response = requests.post(api_url, json = request, headers=headers)

print (response.text)
curl -X POST --header "Authorization: <Access-Token>" --header "Content-Type: application/json" -d "{
\"request_key\":\" \",
\"merchant_trans_id\":\" \",
\"request_type\":\" \",
\"account_no\":\" \",
\"amount\":\" \",
\"cust_phone_no\":\" \",
\"QueueTimeOutURL\":\"http://your_timeout_url\",
\"ResultURL\":\"http://your_result_url\"
}" "https://sandbox.wayawaya.com/pp_services"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.com/pp_services"
auth = "" + oauth_token;

request(
{
method: 'POST'
url : url,
headers : {
"Authorization" : auth
},
json : {
"request_key": " ",
"merchant_trans_id":" ",
"request_type": " ",
"account_no": " ",
"amount": " ",
"cust_phone_no": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}
},
function (error, response, body) {
// Use the body object to extract the response
console.log(body)
}
)

The above command returns JSON structured like this:

{
"header": {
"timestamp":"2019-07-05 15:45:23",
"response_code":"0",
"response_description":"OK"
},
"body": {
"merchant_trans_id":"9909013",
"ww_trans_id":"101",
"wcBalance”:"100.55",
“commissionBalance”:”50.40”,
"ref1":"12345678901234",
“ref2”:”0.00”
}
}

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
request_key xxxxx123 Unique alphanumeric value shared to merchant/developer
merchant_trans_id xxxx123 Unique Alphanumeric value identifying transacactions(length of between 8 - 16 characters).
request_type YAKA value identifying transaction type
account_no 1231233113 yAKA Pre-Paid Metre number
amount 12122.00 The electricity token purchase amount
cust_phone_no 2567xxxxxxxx Paying customer Phone number

UMEME PostPaid

<?php
$url = 'https://sandbox.wayawaya.com/pp_services';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization: ACCESS_TOKEN')); //setting custom header


$curl_post_data = array(
//Fill in the request parameters with valid values
'request_key' => 'XXXX',
'merchant_trans_id' => 'XXXXX',
'request_type' => 'UMEME',
'account_no' => 'XXXXXX',
'amount' => '123.00',
'cust_phone_no' => 'XXXXXX',
'QueueTimeOutURL' => 'http://your_timeout_url',
'ResultURL' => 'http://your_result_url'
);

$data_string = json_encode($curl_post_data);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$curl_response = curl_exec($curl);
print_r($curl_response);

echo $curl_response;
?>
import requests

access_token = "Access-Token"
api_url = "https://sandbox.wayawaya.com/pp_services"
headers = { "Authorization": " %s" % access_token }
request = {
"request_key" : "XXXX",
"merchant_trans_id" : "XXXXX",
"request_type" : "UMEME",
"account_no" : "XXXXXX",
"amount" : "103.00",
"cust_phone_no" : "XXXXXX",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}

response = requests.post(api_url, json = request, headers=headers)

print (response.text)
curl -X POST --header "Authorization: <Access-Token>" --header "Content-Type: application/json" -d "{
\"request_key\":\" \",
\"merchant_trans_id\":\" \",
\"request_type\":\" \",
\"account_no\":\" \",
\"amount\":\" \",
\"cust_phone_no\":\" \",
\"QueueTimeOutURL\":\"http://your_timeout_url\",
\"ResultURL\":\"http://your_result_url\"
}" "https://sandbox.wayawaya.com/pp_services"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.com/pp_services"
auth = "" + oauth_token;

request(
{
method: 'POST'
url : url,
headers : {
"Authorization" : auth
},
json : {
"request_key": " ",
"merchant_trans_id":" ",
"request_type": " ",
"account_no": " ",
"amount": " ",
"cust_phone_no": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}
},
function (error, response, body) {
// Use the body object to extract the response
console.log(body)
}
)

The above command returns JSON structured like this:

{
"header": {
"timestamp":"2019-07-05 15:45:23",
"response_code":"0",
"response_description":"OK"
},
"body": {
"merchant_trans_id":"9909013",
"ww_trans_id":"101",
"wcBalance”:"100.55",
“commissionBalance”:”50.40”,
"ref1":"",
“ref2”:””
}
}

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
request_key xxxxx123 Unique alphanumeric value shared to merchant/developer
merchant_trans_id xxxx123 Unique Alphanumeric value identifying transacactions(length of between 8 - 16 characters).
request_type UMEME value identifying transaction type
amount 12122.00 The bill payment amount
account_no 123123 UMEME Post-Paid Account number
cust_phone_no 2547xxxxxxxx Paying customer Phone number

UMEME Postpaid Bill Check

<?php
$url = 'https://sandbox.wayawaya.com/pp_services';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization: ACCESS_TOKEN')); //setting custom header


$curl_post_data = array(
//Fill in the request parameters with valid values
'request_key' => 'XXXX',
'merchant_trans_id' => 'XXXXX',
'request_type' => 'UMEME_BILL',
'account_no' => 'XXXXXX',
'cust_phone_no' => 'XXXXXX',
'QueueTimeOutURL' => 'http://your_timeout_url',
'ResultURL' => 'http://your_result_url'
);

$data_string = json_encode($curl_post_data);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$curl_response = curl_exec($curl);
print_r($curl_response);

echo $curl_response;
?>
import requests

access_token = "Access-Token"
api_url = "https://sandbox.wayawaya.com/pp_services"
headers = { "Authorization": " %s" % access_token }
request = {
"request_key" : "XXXX",
"merchant_trans_id" : "XXXXX",
"request_type" : "UMEME_BILL",
"account_no" : "XXXXXX",
"cust_phone_no" : "XXXXXX",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}

response = requests.post(api_url, json = request, headers=headers)

print (response.text)
curl -X POST --header "Authorization: <Access-Token>" --header "Content-Type: application/json" -d "{
\"request_key\":\" \",
\"merchant_trans_id\":\" \",
\"request_type\":\" \",
\"account_no\":\" \",
\"cust_phone_no\":\" \",
\"QueueTimeOutURL\":\"http://your_timeout_url\",
\"ResultURL\":\"http://your_result_url\"
}" "https://sandbox.wayawaya.com/pp_services"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.com/pp_service/"
auth = "" + oauth_token;

request(
{
method: 'POST'
url : url,
headers : {
"Authorization" : auth
},
json : {
"request_key": " ",
"merchant_trans_id":" ",
"request_type": " ",
"account_no": " ",
"cust_phone_no": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}
},
function (error, response, body) {
// Use the body object to extract the response
console.log(body)
}
)

The above command returns JSON structured like this:

{
"header": {
"timestamp":"2019-07-05 15:45:23",
"response_code":"0",
"response_description":"OK"
},
"body": {
"merchant_trans_id":"9909013",
"ww_trans_id":"101",
"wcBalance”:"100.55",
“commissionBalance”:”50.40”,
"ref1":"",
“ref2”:””
}
}

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
request_key xxxxx123 Unique alphanumeric value shared to merchant/developer
merchant_trans_id xxxx123 Unique Alphanumeric value identifying transacactions(length of between 8 - 16 characters).
request_type UMEME_BILL value identifying transaction type
account_no 123123 UMEME Post-Paid Account number
cust_phone_no 2567xxxxxxxx Paying customer Phone number

NWSC KAMPALA

<?php
$url = 'https://sandbox.wayawaya.com/pp_services';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization: ACCESS_TOKEN')); //setting custom header


$curl_post_data = array(
//Fill in the request parameters with valid values
'request_key' => 'XXXX',
'merchant_trans_id' => 'XXXXX',
'request_type' => 'NWSC_KAMPALA',
'account_no' => 'XXXXXX',
'amount' => '123.00',
'cust_phone_no' => 'XXXXXX',
'QueueTimeOutURL' => 'http://your_timeout_url',
'ResultURL' => 'http://your_result_url'
);

$data_string = json_encode($curl_post_data);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$curl_response = curl_exec($curl);
print_r($curl_response);

echo $curl_response;
?>
import requests

access_token = "Access-Token"
api_url = "https://sandbox.wayawaya.com/pp_services"
headers = { "Authorization": " %s" % access_token }
request = {
"request_key" : "XXXX",
"merchant_trans_id" : "XXXXX",
"request_type" : "NWSC_KAMPALA",
"account_no" : "XXXXXX",
"amount" : "103.00",
"cust_phone_no" : "XXXXXX",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}

response = requests.post(api_url, json = request, headers=headers)

print (response.text)
curl -X POST --header "Authorization: <Access-Token>" --header "Content-Type: application/json" -d "{
\"request_key\":\" \",
\"merchant_trans_id\":\" \",
\"request_type\":\" \",
\"account_no\":\" \",
\"amount\":\" \",
\"cust_phone_no\":\" \",
\"QueueTimeOutURL\":\"http://your_timeout_url\",
\"ResultURL\":\"http://your_result_url\"
}" "https://sandbox.wayawaya.com/pp_services"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.com/pp_services"
auth = "" + oauth_token;

request(
{
method: 'POST'
url : url,
headers : {
"Authorization" : auth
},
json : {
"request_key": " ",
"merchant_trans_id":" ",
"request_type": " ",
"account_no": " ",
"amount": " ",
"cust_phone_no": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}
},
function (error, response, body) {
// Use the body object to extract the response
console.log(body)
}
)

The above command returns JSON structured like this:

{
"header": {
"timestamp":"2019-07-05 15:45:23",
"response_code":"0",
"response_description":"OK"
},
"body": {
"merchant_trans_id":"9909013",
"ww_trans_id":"101",
"wcBalance”:"100.55",
“commissionBalance”:”50.40”,
"ref1":"",
“ref2”:””
}
}

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
request_key xxxxx123 Unique alphanumeric value shared to merchant/developer
merchant_trans_id xxxx123 Unique Alphanumeric value identifying transacactions(length of between 8 - 16 characters).
request_type NWSC_KAMPALA value identifying transaction type
amount 12122.00 The bill payment amount
account_no 123123 NWSC KAMPALA Post-Paid Account number
cust_phone_no 2547xxxxxxxx Paying customer Phone number

NWSC_KAMPALA Bill Check

<?php
$url = 'https://sandbox.wayawaya.com/pp_services';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json','Authorization: ACCESS_TOKEN')); //setting custom header


$curl_post_data = array(
//Fill in the request parameters with valid values
'request_key' => 'XXXX',
'merchant_trans_id' => 'XXXXX',
'request_type' => 'NWSC_KAMPALA_BILL',
'account_no' => 'XXXXXX',
'cust_phone_no' => 'XXXXXX',
'QueueTimeOutURL' => 'http://your_timeout_url',
'ResultURL' => 'http://your_result_url'
);

$data_string = json_encode($curl_post_data);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$curl_response = curl_exec($curl);
print_r($curl_response);

echo $curl_response;
?>
import requests

access_token = "Access-Token"
api_url = "https://sandbox.wayawaya.com/pp_services"
headers = { "Authorization": " %s" % access_token }
request = {
"request_key" : "XXXX",
"merchant_trans_id" : "XXXXX",
"request_type" : "NWSC_KAMPALA_BILL",
"account_no" : "XXXXXX",
"cust_phone_no" : "XXXXXX",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}

response = requests.post(api_url, json = request, headers=headers)

print (response.text)
curl -X POST --header "Authorization: <Access-Token>" --header "Content-Type: application/json" -d "{
\"request_key\":\" \",
\"merchant_trans_id\":\" \",
\"request_type\":\" \",
\"account_no\":\" \",
\"cust_phone_no\":\" \",
\"QueueTimeOutURL\":\"http://your_timeout_url\",
\"ResultURL\":\"http://your_result_url\"
}" "https://sandbox.wayawaya.com/pp_services"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.com/pp_service/"
auth = "" + oauth_token;

request(
{
method: 'POST'
url : url,
headers : {
"Authorization" : auth
},
json : {
"request_key": " ",
"merchant_trans_id":" ",
"request_type": " ",
"account_no": " ",
"cust_phone_no": " ",
"QueueTimeOutURL": "http://your_timeout_url",
"ResultURL": "http://your_result_url"
}
},
function (error, response, body) {
// Use the body object to extract the response
console.log(body)
}
)

The above command returns JSON structured like this:

{
"header": {
"timestamp":"2019-07-05 15:45:23",
"response_code":"0",
"response_description":"OK"
},
"body": {
"merchant_trans_id":"9909013",
"ww_trans_id":"101",
"wcBalance”:"100.55",
“commissionBalance”:”50.40”,
"ref1":"",
“ref2”:””
}
}

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
request_key xxxxx123 Unique alphanumeric value shared to merchant/developer
merchant_trans_id xxxx123 Unique Alphanumeric value identifying transacactions(length of between 8 - 16 characters).
request_type NWSC_KAMPALA_BILL value identifying transaction type
account_no 123123 NWSC Kampala Post-Paid Account number
cust_phone_no 2567xxxxxxxx Paying customer Phone number

Resources

Create Card Customer

require 'servicelookup'

api = servicelookup::APIClient.authorize!('ww_authenticated_user')
api.Services.get
import servicelookup

api = servicelookup.authorize('ww_authenticated_user')
api.Services.get()
curl "https://sandbox.wayawaya.com/pp_services"
-H "Authorization: ww_authenticated_user"
const servicelookup = require('servicelookup');

let api = servicelookup.authorize('ww_authenticated_user');
let Services = api.Services.get();

The above command returns JSON structured like this:

[
{
"id": 1,
"name": "sendtomobile",
"country": {
"id": 254,
"name": "kenya",
"provider": "mpesa",
"lower_limit": 5,
"upper_limit": 700
}
},
{
"id": 2,
"name": "sendtoaccount",
"country": {
"id": 254,
"name": "kenya",
"provider": "visadirect",
"lower_limit": 5,
"upper_limit": 1500
}
}
]

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
country kenya Change to the country where you are accessing services
acc_type merchant Default Account type is Merchant.

Verify Card Customer

require 'servicelookup'

api = servicelookup::APIClient.authorize!('ww_authenticated_user')
api.Services.get
import servicelookup

api = servicelookup.authorize('ww_authenticated_user')
api.Services.get()
curl "https://sandbox.wayawaya.com/pp_services"
-H "Authorization: ww_authenticated_user"
const servicelookup = require('servicelookup');

let api = servicelookup.authorize('ww_authenticated_user');
let Services = api.Services.get();

The above command returns JSON structured like this:

[
{
"id": 1,
"name": "sendtomobile",
"country": {
"id": 254,
"name": "kenya",
"provider": "mpesa",
"lower_limit": 5,
"upper_limit": 700
}
},
{
"id": 2,
"name": "sendtoaccount",
"country": {
"id": 254,
"name": "kenya",
"provider": "visadirect",
"lower_limit": 5,
"upper_limit": 1500
}
}
]

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
country kenya Change to the country where you are accessing services
acc_type merchant Default Account type is Merchant.

Retrieve Card Customer

require 'fxlookup'

api = fxlookup::APIClient.authorize!('ww_authenticated_user')
api.Services.get(2)
import fxlookup

api = fxlookup.authorize('ww_authenticated_user')
api.Services.get(2)
curl "https://sandbox.wayawaya.com/pp_services"
-H "Authorization: ww_authenticated_user"
const fxlookup = require('fxlookup');

let api = fxlookup.authorize('ww_authenticated_user');
let max = api.Services.get(2);

The above command returns JSON structured like this:

{
"id": 1,
"source_currency": "USD",
"receive_currency": "KES",
"exrate": 98.54
}

This endpoint retrieves specific exchange rates for specified source currency.

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services/<ID>

URL Parameters

Parameter Default Description
country kenya The destination country of transaction recipient
source_currency usd The originating transaction source currency.

Create Mobile Customer

require 'feelookup'

api = feelookup::APIClient.authorize!('ww_authenticated_user')
api.Services.feelookup(2)
import feelookup

api = feelookup.authorize('ww_authenticated_user')
api.Services.feelookup(2)
curl "https://sandbox.wayawaya.com/pp_services"
-X feelookup
-H "Authorization: ww_authenticated_user"

The above command returns JSON structured like this:

{
"id": 1,
"service" : "sendtomobile"
"source_type" : "currency"
"source_id" : "USD"
"destination_id" : "KES"
}

This endpoint checks fees charged for specific transactions

HTTPS Request

DELETE https://sandbox.wayawaya.com/pp_services

URL Parameters

Parameter Required Description
service_type YES The type of service e.g sendtomobile
source_type YES the Source type e.g currency.
source_id YES Identifier for source of transaction e.g USD
destination_id YES Identifier for receiver of transactions e.g KES.

Verify Mobile Customer

require 'servicelookup'

api = servicelookup::APIClient.authorize!('ww_authenticated_user')
api.Services.get
import servicelookup

api = servicelookup.authorize('ww_authenticated_user')
api.Services.get()
curl "https://sandbox.wayawaya.com/pp_services"
-H "Authorization: ww_authenticated_user"
const servicelookup = require('servicelookup');

let api = servicelookup.authorize('ww_authenticated_user');
let Services = api.Services.get();

The above command returns JSON structured like this:

[
{
"id": 1,
"name": "sendtomobile",
"country": {
"id": 254,
"name": "kenya",
"provider": "mpesa",
"lower_limit": 5,
"upper_limit": 700
}
},
{
"id": 2,
"name": "sendtoaccount",
"country": {
"id": 254,
"name": "kenya",
"provider": "visadirect",
"lower_limit": 5,
"upper_limit": 1500
}
}
]

This endpoint retrieves all services supported for the account

HTTPS Request

POST https://sandbox.wayawaya.com/pp_services

Query Parameters

Parameter Default Description
country kenya Change to the country where you are accessing services
acc_type merchant Default Account type is Merchant.

Retrieve Mobile Customer

require 'feelookup'

api = feelookup::APIClient.authorize!('ww_authenticated_user')
api.Services.feelookup(2)
import feelookup

api = feelookup.authorize('ww_authenticated_user')
api.Services.feelookup(2)
curl "https://sandbox.wayawaya.com/pp_services"
-X feelookup
-H "Authorization: ww_authenticated_user"

The above command returns JSON structured like this:

{
"id": 1,
"service" : "sendtomobile"
"source_type" : "currency"
"source_id" : "USD"
"destination_id" : "KES"
}

This endpoint checks fees charged for specific transactions

HTTPS Request

DELETE https://sandbox.wayawaya.com/pp_services

URL Parameters

Parameter Required Description
service_type YES The type of service e.g sendtomobile
source_type YES the Source type e.g currency.
source_id YES Identifier for source of transaction e.g USD
destination_id YES Identifier for receiver of transactions e.g KES.

Update customer

require 'feelookup'

api = feelookup::APIClient.authorize!('ww_authenticated_user')
api.Services.feelookup(2)
import feelookup

api = feelookup.authorize('ww_authenticated_user')
api.Services.feelookup(2)
curl "https://sandbox.wayawaya.com/pp_services"
-X feelookup
-H "Authorization: ww_authenticated_user"

The above command returns JSON structured like this:

{
"id": 1,
"service" : "sendtomobile"
"source_type" : "currency"
"source_id" : "USD"
"destination_id" : "KES"
}

This endpoint checks fees charged for specific transactions

HTTPS Request

DELETE https://sandbox.wayawaya.com/pp_services

URL Parameters

Parameter Required Description
service_type YES The type of service e.g sendtomobile
source_type YES the Source type e.g currency.
source_id YES Identifier for source of transaction e.g USD
destination_id YES Identifier for receiver of transactions e.g KES.

Delete Customer

require 'feelookup'

api = feelookup::APIClient.authorize!('ww_authenticated_user')
api.Services.feelookup(2)
import feelookup

api = feelookup.authorize('ww_authenticated_user')
api.Services.feelookup(2)
curl "https://sandbox.wayawaya.com/pp_services"
-X feelookup
-H "Authorization: ww_authenticated_user"

The above command returns JSON structured like this:

{
"id": 1,
"service" : "sendtomobile"
"source_type" : "currency"
"source_id" : "USD"
"destination_id" : "KES"
}

This endpoint checks fees charged for specific transactions

HTTPS Request

DELETE https://sandbox.wayawaya.com/pp_services

URL Parameters

Parameter Required Description
service_type YES The type of service e.g sendtomobile
source_type YES the Source type e.g currency.
source_id YES Identifier for source of transaction e.g USD
destination_id YES Identifier for receiver of transactions e.g KES.

Errors

The WayaWaya API uses the following error codes:

Error Code Meaning
0 Request Type not Set-- Your request is invalid.
1 Succesfull request
2 Transaction ID not set
3 Transaction key not set
4 Key id not set
5 Partner ID not set
6 Password field not set
7 Account credentials sent to the API are incorrect
8 Account is Inactive
9 Incorrect Account configuration
10 Request not supported
11 Recipient Country not set
12 Source currency not set
13 Recipient currency not found
14 Service unavailable
15 Recipient ID/Phone number format is not supported
16 Incorrect transaction string
17 Incorrect Transaction number
20 Card Declined with error code embedded in error_message key
21 Card processed successfully with message embedded in success_message key
22 unsupported IP credentials for request source
23 The PAN/Cardnumber in the request is invalid, PAN/Cardnumber must be 16 Digits long
24 The CVV number in the request length is invalid, the CVV is a 3 Digit number at the back of a User’s Cardnumber
25 Card Expiry date number must be submitted in the format MMYY or MM/YY
26 The amount value must be included with the request
27 Transaction currency details must be set with the request
28 Cardholder names cannot be valid
29 Cardnumber Token value must be included with this request
30 Card user ID value must be included with the request
400 Bad Request -- Your request is invalid.401
403 Forbidden -- The Service requested is hidden for administrators only.
404 Not Found -- The specified Service could not be found.
405 Method Not Allowed -- You tried to access a Service with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The Service requested has been removed from our servers.
429 Too Many Requests -- You'resending too many requests! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.