Developers guide

Get our API and documentation

For developers



    // Embed on your website or App
<form method="POST" action="https://pay.ug/sci/pay" target="_blank" accept-charset="utf-8">
    <input name="merchant" type="hidden" value="12" />
    <input name="item_name" type="hidden" value="Testing payment" />
    <input name="amount" type="hidden" value="3500" /> 
    <input name="currency" type="hidden" value="debit_base" />
    <input name="custom" type="hidden" value="comment" />
    <button type="submit">Pay now!</button>
</form>


Set of tools for receiving payments


Receiving payments in the system PAY.UG or integration with the user's site


Example of a notification handler in PHP



// merchant password		
$merchant_password = "t43t43t34t43t34t6545845";

// transaction info
$amount = $_POST['amount'];
$fee = $_POST['fee'];
$total = $_POST['total'];
$currency = $_POST['currency'];
$payer = $_POST['payer'];
$receiver = $_POST['receiver'];
$status = $_POST['status'];
$date = $_POST['date'];
$id_transfer = $_POST['id_transfer'];

// Merchant info
$merchant_name = $_POST['merchant_name'];
$merchant_id = $_POST['merchant_id'];
$balance = $_POST['balance'];

// Purchase Information
$item_name = $_POST['item_name'];
$custom = $_POST['custom'];

// Verification of the transaction
$hash = $_POST['hash'];

$hash_string = $total.':'.$merchant_password.':'.$date.':'.$id_transfer;
		
$user_hash = strtoupper(md5($hash_string));

if ($hash_string == $user_hash) {

	echo "Confirmed!";

} else {

	echo "Disabled!";

}