This is sample of webhook in php

// Error logging
ini_set('log_errors', 1);
ini_set('error_log', '/home/Your-directory-here/StroAccountWebHook_error_log.txt');

// Set the response header
header('Content-Type: application/json');

$input = file_get_contents("php://input");

// Use fopen, fwrite, and fclose to write the data to a file
$file = fopen('/home/Your-directory-here/StroAccountWebHook.txt', 'w');
if ($file !== false) {
fwrite($file, $input);
fclose($file);
} else {
error_log("Failed to open StroAccountWebHook.txt for writing.");
}

$response = json_decode($input, true);

if (is_array($response) && isset($response["sessionId"])) {
// Extracting fields from the webhook payload
$sessionId = $response["sessionId"];
$accountNumber = $response["accountNumber"];
$tranRemarks = $response["tranRemarks"];
$transactionAmount = $response["transactionAmount"];
$settledAmount = $response["settledAmount"];
$feeAmount = $response["feeAmount"];
$vatAmount = $response["vatAmount"];
$currency = $response["currency"];
$initiationTranRef = $response["initiationTranRef"];
$settlementId = $response["settlementId"];
$sourceAccountNumber = $response["sourceAccountNumber"];
$sourceAccountName = $response["sourceAccountName"];
$sourceBankName = $response["sourceBankName"];
$channelId = $response["channelId"];
$tranDateTime = $response["tranDateTime"];

// ... (you can add further processing here, if needed)

} else {
error_log("Webhook data was not received or lacked the sessionId field.");
echo "Fail";
http_response_code(400);
}

sample of core php webhook url can be https://URL/StroAccountWebHook.php

sample of laravel webhook url can be https://URL/StroAccountWebHook