Webhooks
Once your user has used the payment button and paid, it's time listening for webhooks.
Setup your URL
Automatic Retrying
Verify Signature
<?php
define('SECRET_KEY', '123test');
$request= json_decode(file_get_contents("php://input"), true);
if (!check_signature($request)) {
header("Status: 401 Unauthorized");
exit;
}
function check_signature($request) {
return $signature === hash_hmac(
'sha256',
$request['order']['transaction_id'] . $request['status'],
SECRET_KEY
);
}Payment Statuses
Last updated