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.co.ke/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.co.ke/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.co.ke/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.co.ke/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.co.ke/checks/service_lookup/v1/available_service';

$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.co.ke/checks/service_lookup/v1/available_service"
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.co.ke/checks/service_lookup/v1/available_service"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.co.ke/checks/service_lookup/v1/available_service"
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.co.ke/checks/service_lookup/v1/available_service

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.co.ke/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.co.ke/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.co.ke/checks/service_lookup/v1/fxlookup"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.co.ke/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.co.ke/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.co.ke/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.co.ke/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.co.ke/checks/service_lookup/v1/feelookup"
var request = require('request'),
oauth_token = "ACCESS_TOKEN",
url = "https://sandbox.wayawaya.co.ke/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.co.ke/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

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://www.wayawaya.co.ke/app_serve/pp_services.php"
-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://www.wayawaya.co.ke/app_serve/pp_services.php

Query Parameters

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

Send to Account

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://www.wayawaya.co.ke/app_serve/pp_services.php/2"
-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://www.wayawaya.co.ke/app_serve/pp_services.php/<ID>

URL Parameters

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

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://www.wayawaya.co.ke/app_serve/pp_services.php/2"
-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://www.wayawaya.co.ke/app_serve/pp_services.php

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://www.wayawaya.co.ke/app_serve/pp_services.php/2"
-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://www.wayawaya.co.ke/app_serve/pp_services.php

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.

Payment Services

Card token Initial

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://www.wayawaya.co.ke/app_serve/pp_services.php"
-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://www.wayawaya.co.ke/app_serve/pp_services.php

Query Parameters

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

Card Token complete

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://www.wayawaya.co.ke/app_serve/pp_services.php/2"
-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://www.wayawaya.co.ke/app_serve/pp_services.php/<ID>

URL Parameters

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

Card Authorize

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://www.wayawaya.co.ke/app_serve/pp_services.php/2"
-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://www.wayawaya.co.ke/app_serve/pp_services.php

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.

Card Capture

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://www.wayawaya.co.ke/app_serve/pp_services.php/2"
-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://www.wayawaya.co.ke/app_serve/pp_services.php

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.

Card AuthorizeCapture

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://www.wayawaya.co.ke/app_serve/pp_services.php/2"
-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://www.wayawaya.co.ke/app_serve/pp_services.php

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.

Mobile Pay

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://www.wayawaya.co.ke/app_serve/pp_services.php/2"
-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://www.wayawaya.co.ke/app_serve/pp_services.php

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.

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://www.wayawaya.co.ke/app_serve/pp_services.php"
-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://www.wayawaya.co.ke/app_serve/pp_services.php

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://www.wayawaya.co.ke/app_serve/pp_services.php"
-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://www.wayawaya.co.ke/app_serve/pp_services.php

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://www.wayawaya.co.ke/app_serve/pp_services.php/2"
-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://www.wayawaya.co.ke/app_serve/pp_services.php/<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://www.wayawaya.co.ke/app_serve/pp_services.php/2"
-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://www.wayawaya.co.ke/app_serve/pp_services.php

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://www.wayawaya.co.ke/app_serve/pp_services.php"
-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://www.wayawaya.co.ke/app_serve/pp_services.php

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://www.wayawaya.co.ke/app_serve/pp_services.php/2"
-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://www.wayawaya.co.ke/app_serve/pp_services.php

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://www.wayawaya.co.ke/app_serve/pp_services.php/2"
-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://www.wayawaya.co.ke/app_serve/pp_services.php

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://www.wayawaya.co.ke/app_serve/pp_services.php/2"
-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://www.wayawaya.co.ke/app_serve/pp_services.php

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
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
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.