🐋 Free Bitcoin whale alerts →btcfi.aiindigo.com
Developers/

Webhook Events

Subscribe to events and receive real-time HTTP POST notifications when things happen on Terrace.

How Webhooks Work

1. Register
Create an endpoint URL and select the events you want to receive.
2. Verify
Each delivery includes an HMAC-SHA256 signature in the X-Webhook-Signature header.
3. Respond
Return a 2xx status within 10 seconds. Failed deliveries retry up to 5 times.

Verifying Signatures

import crypto from 'crypto';

function verifyWebhook(body: string, signature: string, secret: string): boolean {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(body)
    .digest('hex');
  return signature === `sha256=${expected}`;
}

// In your handler:
const sig = req.headers['x-webhook-signature'];
const isValid = verifyWebhook(rawBody, sig, YOUR_WEBHOOK_SECRET);
Configure Webhooks