IPN (Instant Payment Notification)
The payment process and confirmation of transaction may take from several minutes to several hours. Our service will notify you about confirmation by sending a POST request with data to the status URL you specified. The notification will occur twice: after the transaction appears on the network (1st confirmation) and after its 12th confirmation.
Data in JSON format:
type: message type = (in-payment / track-tracking / out-sending)
date: date and time in UNIX format
token: token = (only for token transaction, ERC20 token ID)
txid: transaction txid (hash)
confirmations: number of confirmations = (1/12)
To verify the signature, you must calculate a hash from the received data and compare it with the value in the sign field.
A hash is a (40-character hexadecimal number) result of the sha1 function from the string received by connecting through the colon (:) the values of the type, date, from, to, [token,] amount, txid, confirmations, tag and API key.
The service expects a text response from the IPN handler.
This text can be seen in the office on the "Notifications" tab.
PHP IPN Handler Code Example:
$_POST = @json_decode(file_get_contents('php://input'), true);
$sign = sha1(implode(':', array(
//$_POST['token'], // only for token transactions
$cfg['apikey'] // API access key
if ($sign !== $_POST['sign'])
die('Sign wrong'); // this answer will be visible in the dashboard
Notifications come from IP = 18.104.22.168