🔒Postback Security
You should verify the signature received in the postback to ensure that the call comes from our servers.
Signature parameter should match MD5 of user_id
transaction_id
payout
secret_key
. You can find your secret
in your placement page.
Postback Examples (GET):
<?php
$secret = "SECRET_KEY"; // Get your secret from placement settings
$user_id = isset($_GET['user_id']) ? $_GET['user_id'] : null;
$transaction_id = isset($_GET['transaction_id']) ? $_GET['transaction_id'] : null;
$payout = isset($_GET['payout']) ? $_GET['payout'] : null;
$signature = isset($_GET['signature']) ? $_GET['signature'] : null;
// Validate Signature
if(md5($user_id . $transaction_id . $payout . $secret) != $signature)
{
echo "ERROR: Signature doesn't match";
return;
}
// Further processing can be done here
echo "Signature is valid. Process the postback.";
?>
Don’t forget to check the transaction_id against your database to ensure it doesn’t already exist.
Status Code
Please return status code 200
, if you have successfully processed the postback.
Last updated