Webhook Troubleshooting Guide
Solutions to common webhook problems and debugging strategies.
Debugging Tools
Dashboard Delivery Attempts
The BlockEden dashboard provides powerful debugging tools:
- Navigate to Accept Payments → Webhooks
- Click on an endpoint to view its delivery attempts
- Expand any attempt to see:
Full request body sent by BlockEden Full response body from your server HTTP status code Error messages Response time Retry schedule
Replay Failed Events
Don't worry if a webhook delivery fails - you can replay it:
- Find the failed attempt in the dashboard
- Click Replay Event button
- The event will be resent immediately
- Check if it succeeds this time
Test Your Endpoint
Use the Test button to send a sample event:
- Click Test on your endpoint
- A
webhook.test.eventis sent with sample data - Verify your server receives and processes it correctly
- Check server logs and dashboard for results
Common Issues
Issue: "Invalid Signature" (401 Unauthorized)
Symptoms:
- Your endpoint returns HTTP 401
- Logs show "Invalid signature" or "Unauthorized"
- All webhook deliveries fail with signature errors
Cause 1: Using Parsed JSON Instead of Raw Body
This is the most common mistake. You must verify the signature against the raw request body, not the parsed JSON.
Wrong
// <ion-icon name="close-circle" style={{verticalAlign: "middle", fontSize: "1.2em", color: "#ef4444"}}></ion-icon> WRONG - Body is already parsed and modified
app.use(express.json());
app.post('/webhooks', (req, res) => {
const body = JSON.stringify(req.body); // This won't match!
const signature = crypto
.createHmac('sha256', secret)
.update(body)
.digest('hex');
// Verification will fail
});
Correct
// <ion-icon name="checkmark-circle" style={{verticalAlign: "middle", fontSize: "1.2em", color: "#10b981"}}></ion-icon> CORRECT - Use raw body
app.post('/webhooks',
express.raw({ type: 'application/json' }),
(req, res) => {
const body = req.body; // Raw Buffer
const signature = crypto
.createHmac('sha256', secret)
.update(body)
.digest('hex');
// Verification will succeed
}
);
Cause 2: Wrong Secret
You may be using an old secret or the wrong endpoint's secret.
Solution:
- Go to dashboard → Click Rotate Secret on your endpoint
- Copy the new secret immediately (it's only shown once)
- Update your environment variable:
WEBHOOK_SECRET=your_new_secret - Restart your server
- Click Test to verify it works
Cause 3: Whitespace or Encoding Issues
Ensure you're using the exact raw bytes without modification.
// Correct approach
const signature = crypto
.createHmac('sha256', secret)
.update(req.body) // Must be Buffer, not modified string
.digest('hex');