EQGate

Webhooks

Receive real-time payment notifications

Webhooks

EQGate sends webhooks to notify you of payment events in real-time.

Webhook URL

Set your webhook URL in two ways:

  1. Default webhook - Configure in the Equidity Cloud dashboard
  2. Per-address webhook - Pass callback_url when creating an address

Webhook Events

deposit.detected

Sent when a deposit is first detected:

{
  "event": "deposit.detected",
  "transaction_id": "tx_abc123",
  "address": "TXabc123def456...",
  "chain": "TRON",
  "token": "USDT",
  "amount": 100,
  "tx_hash": "abc123def456...",
  "timestamp": "2024-01-15T11:30:00.000Z"
}

deposit.confirmed

Sent when deposit reaches required confirmations:

{
  "event": "deposit.confirmed",
  "transaction_id": "tx_abc123",
  "address": "TXabc123def456...",
  "amount": 100,
  "fee": 1,
  "net_amount": 99,
  "confirmations": 19,
  "timestamp": "2024-01-15T11:32:00.000Z"
}

deposit.completed

Sent when funds are forwarded to your wallet:

{
  "event": "deposit.completed",
  "transaction_id": "tx_abc123",
  "address": "TXabc123def456...",
  "amount": 100,
  "fee": 1,
  "net_amount": 99,
  "tx_hash": "abc123def456...",
  "sweep_tx_hash": "def456ghi789...",
  "timestamp": "2024-01-15T11:35:00.000Z"
}

Webhook Signature

All webhooks include a signature header for verification:

X-Webhook-Signature: sha256=abc123def456...

Verifying Signatures (JavaScript)

import crypto from 'crypto';
 
function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
 
  return `sha256=${expected}` === signature;
}
 
app.post('/webhook', express.raw({ type: 'application/json' }), (req, res) => {
  const signature = req.headers['x-webhook-signature'];
  const payload = req.body.toString();
 
  if (!verifyWebhook(payload, signature, process.env.EQGATE_API_SECRET)) {
    return res.status(401).send('Invalid signature');
  }
 
  const event = JSON.parse(payload);
  // Handle event...
  res.status(200).send('OK');
});

Retry Policy

EQGate retries failed webhooks with exponential backoff:

AttemptDelay
1Immediate
21 minute
35 minutes
430 minutes
52 hours

On this page