Welcome
Mazzuma provides easy to use interfaces for connecting your web application or mobile application to the service. This allow you to gain mobile money payments from customers and clients with optimal ease and at no extra charges (standard mobile money operator charges apply).
Usage
MAZ Token API
First Steps
In order to start sending and receiving Mazzuma tokens, you would have to register to use the service. Head over to the website and create a new Mazzuma account. You would enter a unique wallet username you would wish to use during the registration process. Once registered, log into your account. You would have an API key generated, which you can view in the API section. This API Key should be noted, as it would authorise payments in your account.
Send Mazzuma Tokens
Sample Request
var xhr = new XMLHttpRequest();
xhr.open("POST", 'https://client.teamcyst.com/phase3/mazexchange-api.php', true);
//Send the proper header information along with the request
xhr.setRequestHeader("Content-type", "application/json");
xhr.onreadystatechange = function() {
//Call a function when the state changes.
if(xhr.readyState == XMLHttpRequest.DONE && xhr.status == 200) {
// Request finished. Do processing here.
}
}
//Replace requestPayload with the payload you would be sending
xhr.send(requestPayload);
<?php
$url = 'https://client.teamcyst.com/phase3/mazexchange-api.php';
$additional_headers = array(
'Content-Type: application/json'
);
$data = array(
"amount"=> 1,
"recipient"=> "",
"sender"=> "",
"apikey"=> ""
);
$data = json_encode($data);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // $data is the request payload in JSON format
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $additional_headers);
$server_output = curl_exec ($ch);
?>
# Note this sample is functional for python 3 only.
# It also makes use of the requests library, available at python-requests.org
import requests
url= 'https://client.teamcyst.com/phase3/mazexchange-api.php'
payload = # the payload object for the request
response = requests.post(url, data=payload)
REQUEST
POST https://client.teamcyst.com/phase3/mazexchange-api.php
CONTENT TYPE
application/json
PAYLOAD
Your payload should be sent in JSON format.
Key | Type | Description |
---|---|---|
amount | Number | The amount to be sent |
recipient | String | This is the unique username of the recipient of the transaction. |
sender | String | This is the unique username of the sender of the transaction. |
option | String | The option for this request should be send_maz |
reference | String | A unique payment memo that is attached to transaction to make tracking easy |
apikey | String | The API key generated when you created the Mazzuma Business account. This can be accessed or changed via the web dashboard. |
SAMPLE RESPONSE
{"code":1,"status":"success","hash":"XXXXX"}
Receive Mazzuma Tokens
When receiving MAZ tokens, a notification will be sent to the callbackURL that you set using this API.
REQUEST
POST https://client.teamcyst.com/phase3/mazexchange-api.php
PAYLOAD
Key | Type | Description |
---|---|---|
apikey | String | Your account API Key |
option | String | The option for this request should be set_callback_url |
callback_url | String | Your callback URL |
SAMPLE RESPONSE
{"code":1,"status":"success"}
Checking Transaction Status
REQUEST
GET https://client.teamcyst.com/checktransaction.php?hash=<TRANSACTION_HASH>
PAYLOAD
Your payload should be sent in JSON format.
Key | Type | Description |
---|---|---|
hash | String | The hash of the transaction you want to check. |
SAMPLE RESPONSE
{"code":200,"hash":"d6c002acf0425f3aa5bf6f44543bb99cd137474b","status":"Successful"}
Get Account Balance
REQUEST
POST https://client.teamcyst.com/phase3/mazexchange-api.php
PAYLOAD
Key | Type | Description |
---|---|---|
apikey | String | Your account API Key |
option | String | The option for this request should be get_balance |
SAMPLE RESPONSE
{"code":1,"status":"success","username":"exchangeusername","balance":"1234.00"}
Validate Account
REQUEST
POST https://client.teamcyst.com/phase3/mazexchange-api.php
PAYLOAD
Key | Type | Description |
---|---|---|
apikey | String | Your account API Key |
option | String | The option for this request should be validate_account |
username | String | The account username you wish to validate |
SAMPLE RESPONSE
{"code":1,"status":"success","username":"username","message":"Account is valid"}
Get Chain Transactions
REQUEST
POST https://client.teamcyst.com/phase3/mazexchange-api.php
PAYLOAD
Key | Type | Description |
---|---|---|
option | String | The option for this request should be get_chain |
SAMPLE RESPONSE
[{"block_details":{"amount":"","from":"","to":""},"current_hash":"","index":"","previous_hash":"","timestamp":""}]
Get User Transactions
REQUEST
POST https://client.teamcyst.com/phase3/mazexchange-api.php
PAYLOAD
Key | Type | Description |
---|---|---|
apikey | String | Your account API Key |
option | String | The option for this request should be get_transactions |
SAMPLE RESPONSE
{"code":1,"status":"success","transactions":[{"hash":"","amount":"","sender":"","recipient":"","completed":""}]}