Transfers and Payouts to Mobile Money Wallets

You can withdraw your earning via or our dashboard or using our withdraw API.

Dashboard withdraws

To transfer from the dashboard, Click on Finance->Make a Transfer. Enter the details required; Enter the details and complete you transfer.

Withdraw API

Alternatively, u can make payouts using our Withdraw API. Send the Withdraw load to https://silicon-pay.com/api_withdraw Request ($req). To withdraw money to a user mobile money number, pass this as 'mm' req"=>"mm"

General Payload


  // Sample PHP pay Load
  $data_req = [
"req"=>"mm","currency"=>"transfer-currency",
"txRef"=>"unique tx_ref",
"encryption_key"=>" Your Account Encryption Key",
"amount"=>"transfer Amount",
"emailAddress"=>"user-email-address",
"call_back"=>"your-call-back-url",
"phone"=>"recipient MSISDN number",
"reason"=>"reason for transfer","
debit_wallet"=>"Wallet to debit from"
];

// Now Create a Signature that you shall pass in the header of your request.
$secrete_key ="XXXX";
$encryption_key = "XXXXX";
$phone_number = "XXXX";

$msg	=	hash('sha256',$encryption_key).$phone_number;

$signature	= hash_hmac('sha256',$msg, $secrete_key);
  
$headers  = [
  "signature:". $signature,
  'Content-Type: application/json'
];

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://silicon-pay.com/api_withdraw',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>json_encode($data_req),
  CURLOPT_HTTPHEADER => $headers,
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Parameter Description

# Parameter Description
1 encryption_key Your-Account-Encryption-key". Found on top of your dashboard
2 Amount Amount that you are transfering
3 emailAddress Email Address of the recipient
4 phone MSISDN Phone number of the recipient
5 txRef Unique Transaction Reference
6 call_back Call Back url where we shall push a success notification
7 currency This is the currency in which you are transacting in
8 debit_wallet The wallet that you are debiting this transfer from
9 secrete_key This is the secrete key that you recieved when you had created the account. Keep it safe

Response

When all the payload parameters are correct, Send back a json response and process your transfer.


{
"status":"successful",
"amount":10000,
"currency":"UGX",
"txRef":"XSD90",
"message":"Transfer accepted",
"account_number":"256704526090",

};

Success Call Back Notification.

Sample response that shall be triggered and sent to the call back url when the trasanction is successful


{
"status":"successful",
"amount":"XXXXX",
"currency":"XXXX",
"txRef":"XXXXX",
"message":"Transfer recieved",
"account_number":"XXXXX",
"charge":"XXXX",
"secure_hash":"XXXXX"
};

Recieve IPN/Call Back

A secure hash is sent with the call back data. This is to help you confirm that the call back came from us.


// Recieve IPN. 

$body = file_get_contents("php://input");
$dataObject = json_decode($body);

$reference = $dataObject->txRef;
$secure_hash = $dataObject->secure_hash;
$secrete_key ="Enter your account Secrete key";

// Generate a secure hash on your end.
  $cipher = 'aes-256-ecb';
	$generated_hash = openssl_encrypt($reference, $cipher, $secrete_key);
  
  if($generated_hash == $secure_hash){
    // The call back came from us. 
    // Give value to your customers.
  }

Check Transfer Status.

It is good practice to check the tranfer status on our end before giving value to your cuatomers.

We do not send callback notifications for failed or pending transactions, Therefore in case you need to know the status of the transaction always querry the transfer status endpoint.


// Sample Pay Load
$payload = ["encryption_key"=>"XXXXX"];

//parameters
$transaction_reference =  "XXXXX";

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://silicon-pay.com/tranfer_status/'.$transaction_reference,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>json_encode($payload),
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Sample Check Transfer status Response

Sample response for a successful check transfer status



{"code":200,"status":"SUCCESSFUL","amount":"270800","currency":"UGX"}