<?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>Forem: edhiblemeer</title>
    <description>The latest articles on Forem by edhiblemeer (@edhiblemeer).</description>
    <link>https://forem.com/edhiblemeer</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%2F3915565%2Fc8a89af7-6062-41a5-8c85-2d218edd7afb.png</url>
      <title>Forem: edhiblemeer</title>
      <link>https://forem.com/edhiblemeer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/edhiblemeer"/>
    <language>en</language>
    <item>
      <title>I built reach for 14 days. Then realized I had nowhere for it to land.</title>
      <dc:creator>edhiblemeer</dc:creator>
      <pubDate>Wed, 06 May 2026 16:22:51 +0000</pubDate>
      <link>https://forem.com/edhiblemeer/i-built-reach-for-14-days-then-realized-i-had-nowhere-for-it-to-land-3g2b</link>
      <guid>https://forem.com/edhiblemeer/i-built-reach-for-14-days-then-realized-i-had-nowhere-for-it-to-land-3g2b</guid>
      <description>&lt;p&gt;The morning after I shipped my &lt;a href="https://dev.to/edhiblemeer/stripe-webhook-was-silently-failing-for-5-days-the-4xx-retry-trap-and-the-beginning-of-month-time-5d2o"&gt;Build-in-Public post #6 (Stripe webhook silently failing for 5 days)&lt;/a&gt;, I got a question that hit:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"PR is great. But how do I actually turn this into deals?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Honest answer: I didn't have one.&lt;/p&gt;

&lt;p&gt;In 14 days I'd built:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;26 blog posts on the company landing page&lt;/li&gt;
&lt;li&gt;A Zenn technical post (Japanese)&lt;/li&gt;
&lt;li&gt;A dev.to technical post (English)&lt;/li&gt;
&lt;li&gt;50+ URLs indexed in Google Search Console&lt;/li&gt;
&lt;li&gt;Search clicks growing from 0 → 40&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The PR was working. But "And then what?" had no answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The structural problem: no landing page for the leads
&lt;/h2&gt;

&lt;p&gt;Picture the funnel for a reader of my Stripe webhook incident report:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;They read the technical post on dev.to → reach&lt;/li&gt;
&lt;li&gt;They click my profile to see who wrote it → bio&lt;/li&gt;
&lt;li&gt;They think "interesting, who is this person and how do I hire them?" → no answer → bounce&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;My company landing page (&lt;code&gt;tasteck.tech&lt;/code&gt;) is for &lt;strong&gt;buyers of the SaaS&lt;/strong&gt; — store owners and individual operators in Japan's nightlife industry. Nothing there speaks to "I read your Stripe debugging post and want to hire you for a NestJS spot project."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PR reach × landing page quality = deals&lt;/strong&gt;. If the second factor is zero, multiplying the first one harder doesn't help.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I shipped in one day
&lt;/h2&gt;

&lt;h3&gt;
  
  
  A. Built &lt;code&gt;/work&lt;/code&gt; in Next.js (~30 min)
&lt;/h3&gt;

&lt;p&gt;A consulting page at &lt;code&gt;tasteck.tech/work&lt;/code&gt;. Contents:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;4 services, tiered by engagement size:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;1-hour tech / industry consult: ¥5,000 ($33)&lt;/li&gt;
&lt;li&gt;Stripe / billing design review: from ¥30,000 ($200)&lt;/li&gt;
&lt;li&gt;NestJS / Next.js spot dev: from ¥100,000 ($670)&lt;/li&gt;
&lt;li&gt;Build-in-Public ghostwriting / ops: from ¥50,000 / month ($335)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;10 concrete achievements&lt;/strong&gt;, not vague claims:

&lt;ul&gt;
&lt;li&gt;8 years of running a niche-SaaS in production&lt;/li&gt;
&lt;li&gt;1467× query speedup on a slow report endpoint&lt;/li&gt;
&lt;li&gt;Stripe incident: full repair in 4 hours&lt;/li&gt;
&lt;li&gt;Multi-feature release executed in a single day (April 15)&lt;/li&gt;
&lt;li&gt;EC2 migration with no downtime&lt;/li&gt;
&lt;li&gt;14-day Build-in-Public campaign with measurable SEO lift&lt;/li&gt;
&lt;li&gt;Two products in beta concurrently&lt;/li&gt;
&lt;li&gt;Multilingual content rollout (JP + EN)&lt;/li&gt;
&lt;li&gt;14-column CSV export for tax filing&lt;/li&gt;
&lt;li&gt;Full rebrand&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;English CTA&lt;/strong&gt; for international readers (hourly $40)&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;FAQ&lt;/strong&gt;: cross-industry OK / NDA / process / payment terms&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Contact&lt;/strong&gt;: &lt;code&gt;mailto:&lt;a href="mailto:info@tasteck.tech"&gt;info@tasteck.tech&lt;/a&gt;&lt;/code&gt; direct (no form yet)&lt;/li&gt;

&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;☝️ The achievements section started at 4. A friend pointed out, "your past commits and blog posts are &lt;em&gt;full&lt;/em&gt; of bigger wins than what you're claiming." That outside view doubled the credibility of the page. SaaS operators are too modest about themselves.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  B. Wire up 6 channels in the same day (~15 min)
&lt;/h3&gt;

&lt;p&gt;Just having the page isn't enough — readers don't go hunting. So I added a "I'm available, here's where" signal everywhere:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Header nav on &lt;code&gt;tasteck.tech&lt;/code&gt; → "Consulting" link&lt;/li&gt;
&lt;li&gt;Footer same&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sitemap.xml&lt;/code&gt; (priority 0.85)&lt;/li&gt;
&lt;li&gt;dev.to bio: &lt;code&gt;website_url&lt;/code&gt;, &lt;code&gt;summary&lt;/code&gt;, &lt;code&gt;available_for&lt;/code&gt;, &lt;code&gt;skills_languages&lt;/code&gt;, &lt;code&gt;location&lt;/code&gt; — all rewritten in English&lt;/li&gt;
&lt;li&gt;Zenn (Japanese tech platform) website URL → &lt;code&gt;tasteck.tech/work&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;X bio: added "🛠 Consulting → tasteck.tech/work"&lt;/li&gt;
&lt;li&gt;X pinned tweet: replaced "company intro" with "consulting available"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Six surfaces, one day.&lt;/p&gt;

&lt;h3&gt;
  
  
  C. Request GSC indexing (~1 min)
&lt;/h3&gt;

&lt;p&gt;URL inspection → "Request indexing." Done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design decisions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Transparent pricing
&lt;/h3&gt;

&lt;p&gt;Hiding numbers means people who can't afford you waste your time. Putting &lt;strong&gt;¥5K / ¥30K / ¥100K / ¥50K-month&lt;/strong&gt; up front filters in only the people who actually have the budget. Funnel quality &amp;gt; funnel volume.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tiered services as a stairway
&lt;/h3&gt;

&lt;p&gt;1-hour at ¥5K is a low-friction entry. Monthly retainer at ¥50K is the ceiling. The intent: someone might come in for the cheap consult, find it useful, then escalate to spot dev → ongoing retainer. Turn one-time encounters into multi-stage relationships.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cross-industry / English explicitly OK
&lt;/h3&gt;

&lt;p&gt;I run a vertical SaaS in Japan's nightlife industry. But my technical stack (Stripe / NestJS / Next.js / TypeORM / AWS) is fully transferable. So the FAQ explicitly says &lt;strong&gt;"non-industry projects welcome, English inquiries welcome."&lt;/strong&gt; That single sentence dramatically expands the addressable market.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;mailto:&lt;/code&gt; over Stripe Payment Link / Google Forms
&lt;/h3&gt;

&lt;p&gt;For the first inquiries, lower friction wins. I want to read what people are asking before deciding whether structured intake is even useful. Once volume justifies it, I'll add a form.&lt;/p&gt;

&lt;h2&gt;
  
  
  Audience layers
&lt;/h2&gt;

&lt;p&gt;Three concentric circles:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Source&lt;/th&gt;
&lt;th&gt;Likely ask&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Domestic SaaS founders / side-project devs&lt;/td&gt;
&lt;td&gt;Zenn, X, landing blog&lt;/td&gt;
&lt;td&gt;Stripe webhook bug fixes, NestJS spot work, 1-hour consults&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;International SaaS devs&lt;/td&gt;
&lt;td&gt;dev.to, GitHub&lt;/td&gt;
&lt;td&gt;NestJS / Next.js spot dev, Build-in-Public ghostwriting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nightlife industry shops&lt;/td&gt;
&lt;td&gt;Landing page TOP&lt;/td&gt;
&lt;td&gt;Custom development on top of my SaaS, ops outsourcing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Confidence ranking: Layer 1 highest (warm Japanese audience), Layer 2 next (right after each English post), Layer 3 slowest-burn.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'm measuring (Day 15-21)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GA / GSC pageviews on &lt;code&gt;/work&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mailto:&lt;/code&gt; link click count&lt;/li&gt;
&lt;li&gt;Actual inquiry email volume&lt;/li&gt;
&lt;li&gt;Conversion to paid engagements + ARPU&lt;/li&gt;
&lt;li&gt;Referrer breakdown&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'll publish raw numbers in Build-in-Public post #8 in two weeks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;The "right" order would have been: ship &lt;code&gt;/work&lt;/code&gt; first, then drive PR at it. I did it backwards.&lt;/p&gt;

&lt;p&gt;But there's a silver lining to the wrong order: the credibility section on &lt;code&gt;/work&lt;/code&gt; is filled with &lt;strong&gt;specific, dated, verifiable achievements&lt;/strong&gt; because the PR phase forced me to document them. A &lt;code&gt;/work&lt;/code&gt; page launched on Day 1 with no track record would have been forgettable.&lt;/p&gt;

&lt;p&gt;If you're a SaaS operator running PR and wondering where the deals are: spend half a day shipping a landing page for the leads. The ROI on subsequent PR changes the moment that page exists.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Original Japanese version&lt;/strong&gt;: &lt;a href="https://tasteck.tech/blog/2026-05-07-launching-tasteck-work-consulting" rel="noopener noreferrer"&gt;Build-in-Public 第 7 弾&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Hire me&lt;/strong&gt;: &lt;a href="https://tasteck.tech/work" rel="noopener noreferrer"&gt;tasteck.tech/work&lt;/a&gt; — non-industry projects welcome, English OK&lt;br&gt;
&lt;strong&gt;Previous post&lt;/strong&gt;: &lt;a href="https://dev.to/edhiblemeer/stripe-webhook-was-silently-failing-for-5-days-the-4xx-retry-trap-and-the-beginning-of-month-time-5d2o"&gt;Stripe webhook silently failing for 5 days&lt;/a&gt;&lt;/p&gt;

</description>
      <category>buildinpublic</category>
      <category>indiehackers</category>
      <category>startup</category>
      <category>marketing</category>
    </item>
    <item>
      <title>Stripe Webhook Was Silently Failing for 5 Days: The 4xx Retry Trap and the Beginning-of-Month Time Bomb</title>
      <dc:creator>edhiblemeer</dc:creator>
      <pubDate>Wed, 06 May 2026 08:36:01 +0000</pubDate>
      <link>https://forem.com/edhiblemeer/stripe-webhook-was-silently-failing-for-5-days-the-4xx-retry-trap-and-the-beginning-of-month-time-5d2o</link>
      <guid>https://forem.com/edhiblemeer/stripe-webhook-was-silently-failing-for-5-days-the-4xx-retry-trap-and-the-beginning-of-month-time-5d2o</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;21 &lt;code&gt;invoice.paid&lt;/code&gt; webhooks failed for &lt;strong&gt;5 straight days&lt;/strong&gt; in production.&lt;/li&gt;
&lt;li&gt;We only noticed because Stripe sent a "we'll auto-disable this endpoint by 5/10" warning email.&lt;/li&gt;
&lt;li&gt;Root cause: a DB integrity gap caused our handler to &lt;code&gt;throw HttpException(BAD_REQUEST)&lt;/code&gt; 竊・Stripe treats 4xx as &lt;strong&gt;retry-eligible&lt;/strong&gt; 竊・infinite retry loop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lesson&lt;/strong&gt;: Stripe webhook 4xx is &lt;em&gt;not&lt;/em&gt; "client error, give up." It's "please try again." DB lookup misses should be &lt;code&gt;console.warn + 200 OK&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Bonus lesson: &lt;code&gt;invoice.paid&lt;/code&gt; only fires on subscription cycle (once a month). Five days of silent failure went completely unnoticed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm running &lt;a href="https://tasteck.tech" rel="noopener noreferrer"&gt;tasteck&lt;/a&gt;, an industry-specific SaaS for the Japanese nightlife industry. This is a real incident report from production.&lt;/p&gt;

&lt;h2&gt;
  
  
  The wake-up call
&lt;/h2&gt;

&lt;p&gt;One morning, an email from Stripe:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We've encountered an issue when sending an event to your webhook endpoint at &lt;a href="https://api.tasteck.tech/.../payment/webhook" rel="noopener noreferrer"&gt;https://api.tasteck.tech/.../payment/webhook&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We've attempted to send 16 events since 2026-05-01 02:02:21 UTC, all failing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stripe will stop sending events to this endpoint by 2026-05-10 02:02:21 UTC.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If we didn't fix it before 5/10, the endpoint would be &lt;strong&gt;automatically disabled&lt;/strong&gt;. Subscription invoice notifications would just stop. That's catastrophic for a billing-driven SaaS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Triage: is the endpoint dead?
&lt;/h2&gt;

&lt;p&gt;First, a sanity check with curl:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"type":"ping"}'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  https://api.tasteck.tech/.../payment/webhook
&lt;span class="c"&gt;# 竊・201 Created&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The endpoint is alive. Only &lt;strong&gt;specific events from Stripe&lt;/strong&gt; are failing. Different problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding the actual error in PM2 logs
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh prod &lt;span class="s2"&gt;"grep 'subscription' /home/ec2-user/.pm2/logs/api-error.log | tail"&lt;/span&gt;

&lt;span class="c"&gt;# 竊・HttpException: Subscription item not found.  ﾃ・0+&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The handler code (NestJS + TypeORM):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;stripeSubscriptionItem&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;em&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getRepository&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;StripeSubscriptionItem&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;stripe_id = :stripeId&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;stripeId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;subscriptionId&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getOne&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;stripeSubscriptionItem&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;HttpException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Subscription item not found.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;HttpStatus&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;BAD_REQUEST&lt;/span&gt;  &lt;span class="c1"&gt;// 竊・this is the problem&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Trap #1: Stripe webhook 4xx IS retry-eligible
&lt;/h2&gt;

&lt;p&gt;This is where REST-API instincts betray you.&lt;/p&gt;

&lt;p&gt;A normal API: "client gave us bad data 竊・return 4xx 竊・client should fix it 竊・don't retry."&lt;/p&gt;

&lt;p&gt;But Stripe webhooks are not a normal API. From their docs:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Stripe considers any HTTP response code in the range 200-299 as a successful delivery. &lt;strong&gt;Anything else, including 4xx and 5xx, is treated as a failure and Stripe will retry.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So our chain was:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;DB has integrity gap for one customer&lt;/li&gt;
&lt;li&gt;Handler can't find the record&lt;/li&gt;
&lt;li&gt;Handler throws &lt;code&gt;HttpException(400)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Stripe sees 4xx 竊・schedules retry (exponential backoff)&lt;/li&gt;
&lt;li&gt;Retry hits the same DB gap 竊・another 4xx 竊・another retry&lt;/li&gt;
&lt;li&gt;After 3 days, Stripe gives up 竊・emits "we'll auto-disable in 7 days" email&lt;/li&gt;
&lt;li&gt;Endpoint gets auto-disabled. Game over.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The fix is structural&lt;/strong&gt;: webhook handlers should almost never return 4xx for application-level "data not found" cases. Log a warning, return 200, move on. The 4xx semantic doesn't fit the protocol.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trap #2: &lt;code&gt;invoice.paid&lt;/code&gt; only fires on the 1st of the month
&lt;/h2&gt;

&lt;p&gt;Why didn't we notice for 5 days?&lt;/p&gt;

&lt;p&gt;Because &lt;code&gt;invoice.paid&lt;/code&gt; is a &lt;strong&gt;subscription cycle event&lt;/strong&gt;. For a monthly subscription, it fires &lt;em&gt;once a month&lt;/em&gt;, on renewal day. So:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Day 1 of the month: 20 customers renew 竊・1 of them is broken 竊・1 failure that day&lt;/li&gt;
&lt;li&gt;Day 2-3: Stripe retries that 1 failure several times 竊・spikes our error log briefly&lt;/li&gt;
&lt;li&gt;Day 4-30: nothing happens. Logs are silent. Sentry alerts based on rolling-7-day baselines see no change.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is a class of bugs I'd call &lt;strong&gt;calendar-aligned bugs&lt;/strong&gt;: they only fire on a specific day of the month, hide inside normal noise, and Sentry's "anomaly detection" can't see them because the baseline includes the spike too.&lt;/p&gt;

&lt;p&gt;For SaaS founders, the takeaway:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Daily error count alerts won't catch month-aligned failures.&lt;/li&gt;
&lt;li&gt;You need &lt;strong&gt;per-event-type success rate alerts&lt;/strong&gt; that fire on absolute thresholds, not anomaly-based ones.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The real cause: one customer with no &lt;code&gt;subscription_items&lt;/code&gt; row
&lt;/h2&gt;

&lt;p&gt;I queried prod RDS to figure out which customer was hosed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;company_groups&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;customer_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'cus_xxx'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;-- 竊・1 row (plan='starter')&lt;/span&gt;

&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;stripe_subscriptions&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;company_group_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;96&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;-- 竊・2 rows (1 active, 1 deleted)&lt;/span&gt;

&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;stripe_subscription_items&lt;/span&gt;
  &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;stripe_subscription_id&lt;/span&gt; &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;175&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;176&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;-- 竊・0 rows 笞・・```&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;endraw&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="n"&gt;Zero&lt;/span&gt; &lt;span class="k"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;The&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;raw&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="nv"&gt;`stripe_subscription_items`&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;endraw&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;table&lt;/span&gt; &lt;span class="n"&gt;just&lt;/span&gt; &lt;span class="n"&gt;had&lt;/span&gt; &lt;span class="k"&gt;no&lt;/span&gt; &lt;span class="n"&gt;record&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;this&lt;/span&gt; &lt;span class="n"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;Probably&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;missed&lt;/span&gt; &lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="n"&gt;during&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="k"&gt;data&lt;/span&gt; &lt;span class="n"&gt;migration&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;or&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;race&lt;/span&gt; &lt;span class="n"&gt;during&lt;/span&gt; &lt;span class="n"&gt;initial&lt;/span&gt; &lt;span class="n"&gt;subscription&lt;/span&gt; &lt;span class="n"&gt;creation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;We&lt;/span&gt; &lt;span class="n"&gt;don&lt;/span&gt;&lt;span class="s1"&gt;'t know exactly when.

## Fix A: data repair (root cause)

Look up the actual subscription item from the Stripe Dashboard:

- subscription item ID: {% raw %}`si_xxx`
- price: `price_xxx` (ﾂ･15,000 / month)
- 竊・matches DB plan_type `starter`

Insert the missing row:



```sql
INSERT INTO stripe_subscription_items
  (stripe_subscription_id, stripe_id, plan_type, is_annual)
VALUES
  (176, '&lt;/span&gt;&lt;span class="n"&gt;sub_xxx&lt;/span&gt;&lt;span class="s1"&gt;', '&lt;/span&gt;&lt;span class="n"&gt;starter&lt;/span&gt;&lt;span class="s1"&gt;', 0);
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Click "Resend" on a failed event in Stripe Dashboard 竊・30 seconds later: &lt;strong&gt;201 OK&lt;/strong&gt; 笨・&lt;/p&gt;

&lt;h2&gt;
  
  
  Fix B: handler robustness (preventive)
&lt;/h2&gt;

&lt;p&gt;Data repair is a per-customer band-aid. To prevent future "data integrity gap 竊・retry storm" cases, change the handler:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Before (3 places in customer.subscription.deleted and invoice.paid)&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;stripeSubscriptionItem&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;HttpException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Subscription item not found.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;HttpStatus&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;BAD_REQUEST&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// After&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;stripeSubscriptionItem&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;warn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;`[webhook] StripeSubscriptionItem not found for sub_id=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;stripeSub&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; (stripe_id=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;subscriptionId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;), skipping plan update`&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// exits switch, returns 200&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3 throw sites in two case blocks (&lt;code&gt;customer.subscription.deleted&lt;/code&gt; and &lt;code&gt;invoice.paid&lt;/code&gt;), all replaced with &lt;code&gt;warn + break&lt;/code&gt;. Stripe sees 200, stops retrying. The plan-update side effect is skipped, which is fine because the customer's plan was already correct (we just couldn't &lt;em&gt;verify&lt;/em&gt; it via DB).&lt;/p&gt;

&lt;h2&gt;
  
  
  Verification
&lt;/h2&gt;

&lt;p&gt;After Fix A, manually triggered retry from Stripe Dashboard:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;2026-05-05T05:27:01.500Z POST /payment/webhook 201 2 Stripe/1.0
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next day, Stripe's natural retry of the remaining 20 failed events:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;2026-05-06T04:15:28.736Z POST /payment/webhook 201 2 Stripe/1.0
2026-05-06T04:17:25.577Z POST /payment/webhook 201 2 Stripe/1.0
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All clean. 5/10 auto-disable risk fully averted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist for your own webhook handlers
&lt;/h2&gt;

&lt;p&gt;Borrow this if it's useful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Are you throwing 4xx for any DB lookup miss in your webhook? 竊・consider warn + 200 instead&lt;/li&gt;
&lt;li&gt;[ ] Do you have a &lt;code&gt;default:&lt;/code&gt; case that returns 200 for unknown event types?&lt;/li&gt;
&lt;li&gt;[ ] Are you alerting on &lt;strong&gt;per-event-type success rate&lt;/strong&gt;, not just total error count? (Catches month-aligned failures)&lt;/li&gt;
&lt;li&gt;[ ] Is there a periodic batch checking referential integrity between your subscription / customer / item tables?&lt;/li&gt;
&lt;li&gt;[ ] Are your webhook signature verification failures returning 4xx (they should 窶・that's the &lt;em&gt;correct&lt;/em&gt; use of 4xx, since Stripe needs to know its retry won't help)?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The meta-lesson
&lt;/h2&gt;

&lt;p&gt;The bug here was small (a missing DB row). The damage was disproportionate because:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The protocol's "4xx = retry" semantic doesn't match REST intuition&lt;/li&gt;
&lt;li&gt;Calendar-aligned events hide inside normal logs&lt;/li&gt;
&lt;li&gt;Sentry-style anomaly detection can't see month-1 spikes&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Webhook integrations are deceptively easy at first and quietly break later. Worth a half-hour audit of yours.&lt;/p&gt;




&lt;p&gt;Posting these as I find them. I run &lt;a href="https://tasteck.tech" rel="noopener noreferrer"&gt;tasteck&lt;/a&gt;, a vertical SaaS, and I've been writing about the operational side in &lt;a href="https://tasteck.tech/blog" rel="noopener noreferrer"&gt;Build-in-Public posts&lt;/a&gt; (Japanese). This is the first one I've written in English 窶・if you want more in this style, say so in the comments.&lt;/p&gt;

</description>
      <category>stripe</category>
      <category>webhook</category>
      <category>nestjs</category>
      <category>incident</category>
    </item>
  </channel>
</rss>
