Search…
Check Logs
The check_logs method of the receive endpoint returns logs for payments with callbacks sent to a given callback URL.
get
https://blockchainapi.org
/api/eth?method=check_logs
Check callback logs
The following block shows an example of the request URL:

Example code

PHP
<?php
$api_base = "https://blockchainapi.org/api/eth?method=check_logs";
$callbackUrl = 'https://google.com?user=1&secret=123';
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $api_base.'&callback='.$callbackUrl
));
$response = curl_exec($curl);
$http_status_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($http_status_code == 200) {
$decoded = json_decode($response, true);
if($decoded['success']) {
return json_encode($decoded['success'], JSON_PRETTY_PRINT);
// The above line will return an array of the output
} else {
return json_encode(array('error' => 'The supplied callback URL has never been sent any callbacks\/notifications.'), JSON_PRETTY_PRINT);
}
} else {
return $response;
}
?>
Copy link
On this page
get
Check callback logs
Example code