Webhook

Method POST
RESPONSE parameters
coin TRX or USDT or USDC
txid Transaction hash on the blockchain
payment_id FastPay payment ID
amount Amount actually paid by client
amount_usd Amount actually paid by client in USD
amount_uah Amount actually paid by client in UAH
amount_rub Amount actually paid by client in RUB
commission Commission FastPay
order_id Order ID in your system
address Address
signature The signature is created
using the HMAC-SHA256 hashing
algorithm and includes the
request body and your shop API key

We recommend that you check from which IP address notifications are coming to your result url. We send notifications from the IP address: 5.34.181.10, 2a02:27ab:0:2::2e2

PHP EXAMPLE
function getIP() {
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) return $_SERVER['HTTP_X_FORWARDED_FOR'];
return $_SERVER['REMOTE_ADDR'];
}

if (!in_array(getIP(), array('5.34.181.10','2a02:27ab:0:2::2e2'))) {
die('IP does not match!');
}

$shopKey = 'lSbwfqtEsQzjDkQ7J5Qf82hcHgs3lIDa';
$signature = $_POST['signature'];
unset($_POST['signature']);
$hash = hash_hmac('sha256', http_build_query($_POST), $shopKey);
if ($hash !== $signature) {
die('HMAC signature does not match!');
}

$coin = $_POST['coin']; // TRX or USDT or USDC
$txid = $_POST['txid']; // Transaction hash on the blockchain
$payment_id = $_POST['payment_id']; // FastPay payment ID
$amount = $_POST['amount']; // Amount actually paid by client
$amount_usd = $_POST['amount_usd']; // Amount actually paid by client in USD
$amount_uah = $_POST['amount_uah']; // Amount actually paid by client in UAH
$amount_rub = $_POST['amount_rub']; // Amount actually paid by client in RUB
$commission = $_POST['commission']; // Commission FastPay
$order_id = $_POST['order_id']; // Order ID in your system
$address = $_POST['address']; // Address

// Update the balance in the database