Webhooks
Receive real-time payment notifications.
Configure a webhook URL in your dashboard settings. We'll send POST requests with payment updates signed using HMAC-SHA512.
Verification
verify-webhook.ts
import crypto from "crypto";
function verifyWebhook(body: string, signature: string, secret: string) {
const hmac = crypto
.createHmac("sha512", secret)
.update(body)
.digest("hex");
return crypto.timingSafeEqual(
Buffer.from(hmac, "hex"),
Buffer.from(signature, "hex")
);
}