DEV Community

Zonovra
Zonovra

Posted on

I Built a Webhook Debugger with Replay — No Install, No CLI (FastAPI + AWS Lambda)

The Problem Every Developer Hits

You're integrating with Stripe. You set up a webhook endpoint. A payment comes in and... your handler crashes.

Now you need to:

  • See what Stripe actually sent
  • Fix your code
  • Trigger the same webhook again to test

But you can't make another real payment just to test. And Stripe's webhook logs only show you the last few attempts.

This happens with every webhook-based API — GitHub, Shopify, Twilio, SendGrid, Slack.

What I Built

HookCatcher — a webhook debugger with one-click replay.

How it works:

1. Create an endpoint → get a unique url

POST /endpoints
{"label": "Stripe Test"}

https://api.example.com/hook/XzjDcT_55wk4zV7hexj-WQ

2. Point your webhook source to that URL

Paste it into Stripe → Developers → Webhooks → Add endpoint.

3. Every request is captured

Method, headers, body, query params, source IP, timestamp — everything.


json
{
  "method": "POST",
  "headers": {
    "content-type": "application/json",
    "x-stripe-signature": "sig_test_abc123"
  },
  "body": "{\"event\":\"payment.completed\",\"amount\":49.99}",
  "source_ip": "54.187.174.169",
  "received_at": "2026-04-22T20:13:43Z"
}

4. Replay to your local server

POST /requests/replay
{
  "request_id": "5ca786ed-3d5",
  "target_url": "http://localhost:8000/webhook"
}

The exact same headers, body, and content type are sent to your local server. Fix your code, replay again. No need to trigger the real event.

Why Not Just Use ngrok / webhook.site?

Feature                 ngrok   webhook.site    HookCatcher
Receive webhooks    ✅ ✅         ✅
Request history         ❌ Limited         ✅ 24h free / 30d pro
Full header inspection  ❌ ✅         ✅
One-click replay    ❌ ❌         ✅
REST API            ❌ ❌         ✅
No install required ❌(cli)    ✅         ✅

The replay feature is the key differentiator. Capture once, replay as many times as you need.

Tech Stack
FastAPI — Python async API framework

DynamoDB — stores users, endpoints, and captured requests (pay-per-request, $0 at low traffic)

AWS Lambda + API Gateway — serverless, scales to zero, $0 hosting on free tier

DynamoDB TTL — auto-deletes old requests after 30 days (free cleanup, no cron jobs)

Total Aws cost at launch: $0/month

Architecture

Webhook source (Stripe, GitHub, etc.)
    → API Gateway
    → Lambda (FastAPI)
    → DynamoDB (store request)

Developer opens dashboard
    → Views captured requests
    → Clicks "Replay"
    → Lambda sends request to developer's target url

What I Learned Building This

1 DynamoDB ttl is underrated — set a ttl attribute with a Unix timestamp and DynamoDB deletes expired items automatically. No cron jobs, no cleanup Lambda, no cost.

2 Api Gateway catches everything — using a catch-all route ($default), any http method sent to /hook/{id} gets forwarded to Lambda. One route handles get, post, put, patch, delete.

3 Replay needs header filtering — you can't replay Host, Content-Length, or X-Forwarded-For headers. They need to be stripped before sending to the target url.

Try It

  🔗 https://hookcatcher.zonovra.com

  Free: 1 endpoint, 24-hour history

  Pro: 10 endpoints, 30-day history — £10/month

It's my second product launch this month (first was SnapReceipt — an AI receipt scanner). Both built with FastAPI + aws serverless, both running on free tier.

Would love feedback from anyone who works with webhooks. What features would make this a must-have for your workflow?

Enter fullscreen mode Exit fullscreen mode

Top comments (0)