<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ben Nguyen</title>
    <description>The latest articles on DEV Community by Ben Nguyen (@benngvu).</description>
    <link>https://dev.to/benngvu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3973463%2Fa4cec6ce-7fc6-449c-80f2-c59c213672dc.png</url>
      <title>DEV Community: Ben Nguyen</title>
      <link>https://dev.to/benngvu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/benngvu"/>
    <language>en</language>
    <item>
      <title>How I debug Stripe webhooks locally without losing my mind</title>
      <dc:creator>Ben Nguyen</dc:creator>
      <pubDate>Mon, 08 Jun 2026 06:04:21 +0000</pubDate>
      <link>https://dev.to/benngvu/how-i-debug-stripe-webhooks-locally-without-losing-my-mind-2jld</link>
      <guid>https://dev.to/benngvu/how-i-debug-stripe-webhooks-locally-without-losing-my-mind-2jld</guid>
      <description>&lt;p&gt;Every developer who has integrated Stripe payments has been here:&lt;/p&gt;

&lt;p&gt;You're building a subscription feature. Stripe fires a &lt;code&gt;customer.subscription.updated&lt;/code&gt; event. Your handler isn't working. And you have absolutely no idea why.&lt;/p&gt;

&lt;p&gt;So you start the ritual:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open Stripe dashboard&lt;/li&gt;
&lt;li&gt;Find the event under &lt;strong&gt;Developers → Webhooks&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click through 3 screens to see the payload&lt;/li&gt;
&lt;li&gt;Copy the JSON into a Notion doc (or a random &lt;code&gt;.txt&lt;/code&gt; file on your desktop)&lt;/li&gt;
&lt;li&gt;Stare at it&lt;/li&gt;
&lt;li&gt;Make a change&lt;/li&gt;
&lt;li&gt;Go back to Stripe, trigger another test event&lt;/li&gt;
&lt;li&gt;Repeat&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you've done this more than twice, you know how painful it is. And the worst part? &lt;strong&gt;You can't easily replay that event to your localhost.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The real problem with debugging webhooks locally
&lt;/h2&gt;

&lt;p&gt;Stripe CLI helps — &lt;code&gt;stripe listen --forward-to localhost:3000/webhook&lt;/code&gt; is genuinely useful. But it has real limitations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You lose all history the moment you close the terminal&lt;/li&gt;
&lt;li&gt;You can't replay a specific past event without digging through Stripe dashboard again&lt;/li&gt;
&lt;li&gt;If something breaks at 3am in production, good luck reconstructing what payload came in&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The feedback loop is just too slow. Trigger event → dig through dashboard → copy payload → fix code → repeat. Every cycle takes 2–3 minutes.&lt;/p&gt;

&lt;p&gt;Over time, this adds up. And it's completely unnecessary friction.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I wanted instead
&lt;/h2&gt;

&lt;p&gt;I wanted something simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A URL I can paste into Stripe in 20 seconds&lt;/li&gt;
&lt;li&gt;Events show up &lt;strong&gt;live&lt;/strong&gt; the moment they arrive — no refresh, no polling&lt;/li&gt;
&lt;li&gt;I can click &lt;strong&gt;replay&lt;/strong&gt; and that exact payload hits my localhost&lt;/li&gt;
&lt;li&gt;History is saved so I can debug yesterday's 3am anomaly today&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I looked around. Hookdeck and Svix exist, but they're focused on webhook infrastructure and reliability — queuing, retries, fan-out. That's great, but overkill when I just want to &lt;strong&gt;see what the hell is coming in and replay it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;PeekAt&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  How PeekAt works
&lt;/h2&gt;

&lt;p&gt;The flow is dead simple:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Get your endpoint&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sign up, copy your unique URL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://peekat.dev/wh/a7f2k9
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Paste it into Stripe&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Go to Stripe Dashboard → Developers → Webhooks → Add endpoint. Takes 20 seconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Trigger an event&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Make a test payment, or use Stripe CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;stripe trigger payment_intent.succeeded
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. See it live&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The event streams instantly to your PeekAt dashboard — full headers, body, timestamp, signature. No refresh needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Replay to localhost&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Click replay. The exact same payload hits your local dev server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;→ localhost:3000/webhook
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fix your handler. Replay again. Done.&lt;/p&gt;




&lt;h2&gt;
  
  
  The part that saves the most time
&lt;/h2&gt;

&lt;p&gt;The replay feature sounds simple but it changes the workflow completely.&lt;/p&gt;

&lt;p&gt;Before: fix code → go back to Stripe → trigger new test event → wait → check result.&lt;/p&gt;

&lt;p&gt;After: fix code → click replay in PeekAt → check result immediately.&lt;/p&gt;

&lt;p&gt;You're iterating on the &lt;strong&gt;same payload&lt;/strong&gt; every time. No new test payments, no new Stripe events, no hunting through dashboards. Just fix and replay.&lt;/p&gt;

&lt;p&gt;This is especially useful for edge cases — &lt;code&gt;payment_intent.payment_failed&lt;/code&gt; with a specific decline code, or &lt;code&gt;customer.subscription.deleted&lt;/code&gt; with a particular metadata structure. You don't want to keep triggering those manually.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's coming next
&lt;/h2&gt;

&lt;p&gt;PeekAt is in early access right now. The core flow (receive → inspect → replay) is working. Coming soon:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Smart event detection&lt;/strong&gt; — auto-detect Stripe event type, show the handler code skeleton you need&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CLI tool&lt;/strong&gt; — route webhooks to localhost without any tunnel setup&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Team workspaces&lt;/strong&gt; — shared endpoint for your whole team&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Slack/email alerts&lt;/strong&gt; — get notified when your endpoint returns non-2xx&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;If you've felt this pain, I'd genuinely love your feedback.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://peekat.dev" rel="noopener noreferrer"&gt;peekat.dev&lt;/a&gt; — free tier available, no credit card needed.&lt;/p&gt;

&lt;p&gt;What webhook debugging pain points am I missing? Drop a comment — building this in public and all feedback directly shapes what gets built next.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built with Node.js + Fastify + PostgreSQL + WebSockets. Deployed on Railway.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webhook</category>
      <category>stripe</category>
      <category>webdev</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
