<?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: North Metric</title>
    <description>The latest articles on DEV Community by North Metric (@northmetric).</description>
    <link>https://dev.to/northmetric</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4232001%2F0d4684ce-adeb-42f3-a573-584f56cd9ce6.png</url>
      <title>DEV Community: North Metric</title>
      <link>https://dev.to/northmetric</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/northmetric"/>
    <language>en</language>
    <item>
      <title>What Stripe's Smart Retries don't recover (and what to do on day 0)</title>
      <dc:creator>North Metric</dc:creator>
      <pubDate>Mon, 09 Nov 2026 14:18:23 +0000</pubDate>
      <link>https://dev.to/northmetric/what-stripes-smart-retries-dont-recover-and-what-to-do-on-day-0-3aik</link>
      <guid>https://dev.to/northmetric/what-stripes-smart-retries-dont-recover-and-what-to-do-on-day-0-3aik</guid>
      <description>&lt;p&gt;Smart Retries is one of the best things Stripe gives a small SaaS for free. On new accounts it's on by default, set to up to 8 retries within 2 weeks, and it picks retry times with a model trained on Stripe's whole network. For most soft declines (insufficient funds, a processing hiccup), the right move is to let it work and stay out of the way.&lt;/p&gt;

&lt;p&gt;But there's a class of failed payments it can't touch, and the dashboard doesn't make that obvious.&lt;/p&gt;

&lt;h2&gt;
  
  
  When Stripe doesn't retry at all
&lt;/h2&gt;

&lt;p&gt;Stripe's own docs list the cases. It won't retry a failed subscription payment when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;there's no payment method on file,&lt;/li&gt;
&lt;li&gt;the issuer returned a &lt;strong&gt;hard decline code&lt;/strong&gt;,&lt;/li&gt;
&lt;li&gt;the card is India-issued (recurring payment rules), or&lt;/li&gt;
&lt;li&gt;a Connect account was disconnected.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The hard decline codes are &lt;code&gt;incorrect_number&lt;/code&gt;, &lt;code&gt;lost_card&lt;/code&gt;, &lt;code&gt;pickup_card&lt;/code&gt;, &lt;code&gt;stolen_card&lt;/code&gt;, &lt;code&gt;revocation_of_authorization&lt;/code&gt;, &lt;code&gt;revocation_of_all_authorizations&lt;/code&gt;, &lt;code&gt;authentication_required&lt;/code&gt;, &lt;code&gt;highest_risk_level&lt;/code&gt; and &lt;code&gt;transaction_not_allowed&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here's the part that catches people: for those failures, retries still get &lt;em&gt;scheduled&lt;/em&gt; and &lt;code&gt;attempt_count&lt;/code&gt; still goes up on &lt;code&gt;invoice.payment_failed&lt;/code&gt;. But nothing actually runs until the customer adds a new payment method. So the invoice looks like it's "in recovery" for two weeks while nothing is happening.&lt;/p&gt;

&lt;p&gt;If a customer's card was reported lost on day 0, waiting for the retry schedule just means asking them for a new card two weeks late.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three buckets instead of one
&lt;/h2&gt;

&lt;p&gt;The fix is to sort every failure by its decline code as it happens:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Bucket&lt;/th&gt;
&lt;th&gt;Codes&lt;/th&gt;
&lt;th&gt;What to do&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Wait&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Soft declines: &lt;code&gt;insufficient_funds&lt;/code&gt;, &lt;code&gt;processing_error&lt;/code&gt;, &lt;code&gt;try_again_later&lt;/code&gt;, &lt;code&gt;do_not_honor&lt;/code&gt;…&lt;/td&gt;
&lt;td&gt;Nothing yet. Let Smart Retries run. Emailing now mostly reaches people whose payment would have gone through on its own.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Ask now&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Stripe's hard declines (&lt;code&gt;lost_card&lt;/code&gt;, &lt;code&gt;stolen_card&lt;/code&gt;, &lt;code&gt;authentication_required&lt;/code&gt;…)&lt;/td&gt;
&lt;td&gt;Send one personal note today with a link to update the card or confirm the payment.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Review&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Radar blocks (&lt;code&gt;highest_risk_level&lt;/code&gt;) and &lt;code&gt;fraudulent&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Have a person look before anyone contacts the customer.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;expired_card&lt;/code&gt; isn't on Stripe's hard-decline list, and the card account updater refreshes many replaced cards on its own. It goes in &lt;strong&gt;Wait&lt;/strong&gt;, but it's worth flagging cards &lt;em&gt;before&lt;/em&gt; they expire (more on that below).&lt;/p&gt;

&lt;h2&gt;
  
  
  The code
&lt;/h2&gt;

&lt;p&gt;A small classifier. The &lt;code&gt;ASK_NOW&lt;/code&gt; set comes straight from Stripe's list of codes it won't retry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// decline-buckets.js&lt;/span&gt;
&lt;span class="c1"&gt;// Stripe won't retry these until the customer adds a new payment method.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ASK_NOW&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;incorrect_number&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lost_card&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pickup_card&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;stolen_card&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;revocation_of_authorization&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;revocation_of_all_authorizations&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;authentication_required&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;transaction_not_allowed&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="c1"&gt;// Radar blocks and suspected fraud: a person should look first.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;REVIEW&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;highest_risk_level&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fraudulent&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;bucket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;declineCode&lt;/span&gt;&lt;span class="p"&gt;)&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;declineCode&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;review&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;          &lt;span class="c1"&gt;// not an issuer decline: check the error type&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ASK_NOW&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;has&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;declineCode&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ask_now&lt;/span&gt;&lt;span class="dl"&gt;'&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="nx"&gt;REVIEW&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;has&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;declineCode&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;review&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;wait&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                               &lt;span class="c1"&gt;// soft decline: leave it to Smart Retries&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;bucket&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the webhook handler. &lt;code&gt;payment_intent.payment_failed&lt;/code&gt; carries the decline code on &lt;code&gt;last_payment_error&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Stripe&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;stripe&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;bucket&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./decline-buckets&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;stripe&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Stripe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;STRIPE_API_KEY&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/stripe/webhook&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&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="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;stripe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;webhooks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;constructEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;stripe-signature&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;STRIPE_WEBHOOK_SECRET&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Webhook error: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&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="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;payment_intent.payment_failed&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;object&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;pi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;last_payment_error&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;bucket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;decline_code&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;log&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;pi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;pi&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="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;decline_code&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="c1"&gt;// ask_now -&amp;gt; queue one personal note today&lt;/span&gt;
    &lt;span class="c1"&gt;// wait    -&amp;gt; do nothing until retries end&lt;/span&gt;
    &lt;span class="c1"&gt;// review  -&amp;gt; send to a person&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sendStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4242&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two things to add before you run this for real:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dedupe by event ID.&lt;/strong&gt; Stripe can deliver the same event more than once. The &lt;a href="https://github.com/north-metric/stripe-churn-signals" rel="noopener noreferrer"&gt;stripe-churn-signals&lt;/a&gt; repo stores processed IDs in a file so retries are ignored even after a restart.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Filter to subscription payments&lt;/strong&gt; if you also take one-off payments. Which field links a PaymentIntent to its invoice depends on your API version, so check it against the version your account is pinned to.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Also listen for &lt;code&gt;invoice.payment_failed&lt;/code&gt;: when &lt;code&gt;next_payment_attempt&lt;/code&gt; is &lt;code&gt;null&lt;/code&gt;, the retries are over. That's the moment a "wait" invoice turns into an "ask now" one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the day-0 note should say
&lt;/h2&gt;

&lt;p&gt;Keep it short and personal, from a real person rather than &lt;code&gt;noreply@&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what happened in plain words ("your bank declined the renewal" / "the card on file was replaced"),&lt;/li&gt;
&lt;li&gt;one link: the invoice's &lt;code&gt;hosted_invoice_url&lt;/code&gt;, where they can pay with a new card on Stripe's own page,&lt;/li&gt;
&lt;li&gt;no countdown threats.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Someone whose card was lost or stolen usually isn't ignoring you; they just haven't updated every subscription yet. Start with one note, not a sequence.&lt;/p&gt;

&lt;h2&gt;
  
  
  The ones you can catch before they fail
&lt;/h2&gt;

&lt;p&gt;Card expiry isn't a webhook event. Once a week, list subscriptions whose default card expires within 30 days and send a heads-up to the ones worth the most. The repo's &lt;a href="https://github.com/north-metric/stripe-churn-signals/blob/main/CHECKLIST.md" rel="noopener noreferrer"&gt;weekly checklist&lt;/a&gt; covers this along with other signals webhooks don't send.&lt;/p&gt;

&lt;h2&gt;
  
  
  Count recovery honestly
&lt;/h2&gt;

&lt;p&gt;If you send notes, measure them properly. A payment that comes back during Smart Retries isn't something your note recovered. Count an invoice as recovered only if it's paid &lt;em&gt;after&lt;/em&gt; your note, within a fixed window (we use 30 days), and keep the retry recoveries in a separate column. Otherwise every tool, including your own script, looks better than it is.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What each code means and whether to retry: &lt;a href="https://www.northmetric.io/stripe-decline-codes" rel="noopener noreferrer"&gt;Stripe decline codes, explained&lt;/a&gt;, with a page per code such as &lt;a href="https://www.northmetric.io/stripe-decline-codes/lost_card" rel="noopener noreferrer"&gt;&lt;code&gt;lost_card&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://www.northmetric.io/stripe-decline-codes/insufficient_funds" rel="noopener noreferrer"&gt;&lt;code&gt;insufficient_funds&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://www.northmetric.io/stripe-decline-codes/authentication_required" rel="noopener noreferrer"&gt;&lt;code&gt;authentication_required&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Stripe's docs: &lt;a href="https://docs.stripe.com/billing/revenue-recovery/smart-retries" rel="noopener noreferrer"&gt;Automate payment retries&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Open-source listener for the other churn signals: &lt;a href="https://github.com/north-metric/stripe-churn-signals" rel="noopener noreferrer"&gt;north-metric/stripe-churn-signals&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I work on North Metric, which does this for SaaS on Stripe: it starts &lt;a href="https://www.northmetric.io/failed-payment-recovery" rel="noopener noreferrer"&gt;where Stripe's retries stop&lt;/a&gt;, drafts the day-0 note for hard declines and missing cards, and counts only the money its own notes bring back. Everything above works without it.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>stripe</category>
      <category>saas</category>
      <category>webhooks</category>
      <category>node</category>
    </item>
    <item>
      <title>Which Stripe signals predict churn (and how to read them without a data team)</title>
      <dc:creator>North Metric</dc:creator>
      <pubDate>Sat, 07 Nov 2026 12:10:55 +0000</pubDate>
      <link>https://dev.to/northmetric/which-stripe-signals-predict-churn-and-how-to-read-them-without-a-data-team-3na2</link>
      <guid>https://dev.to/northmetric/which-stripe-signals-predict-churn-and-how-to-read-them-without-a-data-team-3na2</guid>
      <description>&lt;p&gt;Most small SaaS teams find out about churn from a Stripe email saying a subscription was canceled. By then the customer made the decision weeks ago. The card failed twice, the team dropped from eight seats to three, or someone quietly set the subscription to cancel at period end.&lt;/p&gt;

&lt;p&gt;Bigger companies catch this with a customer success team and a health score. You probably don't have either. You do have Stripe, though, and Stripe already records most of the warning signs. This post covers which objects and events to look at, what each one means, and how to turn them into a weekly list without building a data pipeline.&lt;/p&gt;

&lt;p&gt;For context on why this matters: median monthly churn for SaaS under $300k ARR is around 6.5% (ChartMogul, 2021-22 data). At that rate, you replace most of your customer base every year just to stand still. (We keep a &lt;a href="https://www.northmetric.io/benchmarks/saas-churn-rate" rel="noopener noreferrer"&gt;table of churn benchmarks by stage and MRR band&lt;/a&gt; if you want to see where you sit.)&lt;/p&gt;

&lt;h3&gt;
  
  
  Before you start: use a read-only key
&lt;/h3&gt;

&lt;p&gt;Everything below only needs read access. In the Stripe dashboard, create a &lt;strong&gt;restricted key&lt;/strong&gt; with read permissions for Customers, Subscriptions, Invoices, Charges and Payment Methods, plus webhook access if you're listening for events. Don't use your secret key for analytics scripts, and don't give it to any tool that only needs to read.&lt;/p&gt;

&lt;h3&gt;
  
  
  Signal 1: failed payments (&lt;code&gt;invoice.payment_failed&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;Involuntary churn is the easiest kind to fix and the kind most teams ignore. In Stripe's data, failed payments cause about &lt;strong&gt;22% of SaaS churn, 16% for B2B&lt;/strong&gt; (Stripe data via Churnkey, 2024).&lt;/p&gt;

&lt;p&gt;On each &lt;code&gt;invoice.payment_failed&lt;/code&gt; event, look at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;attempt_count&lt;/code&gt;: how many times Stripe has tried.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;next_payment_attempt&lt;/code&gt;: when the next retry is. If it's &lt;code&gt;null&lt;/code&gt;, retries are over, and the subscription is about to be canceled, marked unpaid, or left past due, depending on your settings.&lt;/li&gt;
&lt;li&gt;The decline code on the related charge (&lt;code&gt;failure_code&lt;/code&gt;, or &lt;code&gt;decline_code&lt;/code&gt; on the error). &lt;code&gt;insufficient_funds&lt;/code&gt; accounts for roughly &lt;strong&gt;41-42% of failed payments&lt;/strong&gt; (Churnkey, State of Retention 2025) and often clears on a later retry. &lt;code&gt;expired_card&lt;/code&gt; and &lt;code&gt;incorrect_number&lt;/code&gt; won't clear, so email those customers immediately. There's a &lt;a href="https://www.northmetric.io/stripe-decline-codes" rel="noopener noreferrer"&gt;reference of what each Stripe decline code means and what to do about it&lt;/a&gt; if you want the full list.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The tooling matters less than you'd think. Smart Retries alone recovered about &lt;strong&gt;51%&lt;/strong&gt; of failed payments, and adding a payment wall and dunning lifted that to about &lt;strong&gt;70%&lt;/strong&gt; (Churnkey). Dunning emails on their own recover little: the first recovers &lt;strong&gt;2.8%&lt;/strong&gt; (Churnkey). A recovered monthly subscription lasts about &lt;strong&gt;seven more months&lt;/strong&gt; on average (Stripe, reported by FF News, 2024), so each save is worth more than one invoice.&lt;/p&gt;

&lt;h3&gt;
  
  
  Signal 2: cards about to expire
&lt;/h3&gt;

&lt;p&gt;Pull the default payment method for each active subscription and check &lt;code&gt;card.exp_month&lt;/code&gt; and &lt;code&gt;card.exp_year&lt;/code&gt;. Anything expiring this month or next goes on the list.&lt;/p&gt;

&lt;p&gt;Card networks' automatic updater fixes many of these, and you'll see &lt;code&gt;payment_method.automatically_updated&lt;/code&gt; when it does. It doesn't catch all of them, and a short "your card expires soon" email before the renewal date costs nothing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Signal 3: &lt;code&gt;cancel_at_period_end&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;When a customer cancels through the customer portal or your own flow, the subscription usually stays active with &lt;code&gt;cancel_at_period_end: true&lt;/code&gt; until the period ends. This is the most honest signal you have: the customer has already decided, and you have days or weeks to change their mind.&lt;/p&gt;

&lt;p&gt;If you use Stripe's customer portal with cancellation reasons turned on, &lt;code&gt;cancellation_details.feedback&lt;/code&gt; and &lt;code&gt;cancellation_details.comment&lt;/code&gt; tell you why. Budget is the top stated reason for cancelling (about &lt;strong&gt;33%&lt;/strong&gt;), with infrequent usage close behind (about &lt;strong&gt;31%&lt;/strong&gt;) and rising (Churnkey, State of Retention 2025). Those two need very different responses.&lt;/p&gt;

&lt;h3&gt;
  
  
  Signal 4: downgrades and seat drops (&lt;code&gt;customer.subscription.updated&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;Contraction usually comes before churn. A team that goes from ten seats to four is telling you something, even though it's still paying.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;customer.subscription.updated&lt;/code&gt; includes &lt;code&gt;data.previous_attributes&lt;/code&gt;, which holds only the fields that changed. Compare the old and new items:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Express + stripe-node. Needs the raw body for signature checks.&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/stripe/webhook&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&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="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;stripe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;webhooks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;constructEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;stripe-signature&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
      &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;STRIPE_WEBHOOK_SECRET&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Webhook error: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&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="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;customer.subscription.updated&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sub&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;object&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;prev&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;previous_attributes&lt;/span&gt; &lt;span class="o"&gt;||&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="nx"&gt;prev&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cancel_at_period_end&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;sub&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cancel_at_period_end&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;flag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sub&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;scheduled_cancel&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;sub&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="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="nx"&gt;prev&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;seats&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;quantity&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="c1"&gt;// Normalize to a monthly amount, so annual-to-monthly switches aren't flagged.&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;perMonth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;day&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;365&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;week&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;52&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;month&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;year&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
        &lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;recurring&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
          &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;monthly&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;unit_amount&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;quantity&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;perMonth&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;interval&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;interval_count&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
          &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;monthly&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;0&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="nf"&gt;seats&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sub&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nf"&gt;seats&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;prev&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="nf"&gt;flag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sub&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;seat_drop&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;sub&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="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;value&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sub&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nf"&gt;value&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;prev&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="nf"&gt;flag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sub&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;downgrade&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;sub&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="p"&gt;}&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="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;invoice.payment_failed&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;inv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;object&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nf"&gt;flag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;inv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;inv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;next_payment_attempt&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;payment_retrying&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;payment_final&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;inv&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="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sendStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&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;p&gt;&lt;code&gt;flag()&lt;/code&gt; can just write a row to a table or a spreadsheet. Normalizing matters: without it, a customer moving from $1,000 a year to $100 a month looks like a downgrade, although they now pay more. Only compare items in the same currency. If you use tiered or usage-based prices, &lt;code&gt;unit_amount&lt;/code&gt; can be null, so compare the upcoming invoice amount instead. Field names also move between Stripe API versions, so check them against the version your account is pinned to.&lt;/p&gt;

&lt;p&gt;A complete, tested version of this listener (signature checks, de-duplication of retried events that survives restarts, all the signals in this post, CSV output) is on GitHub as &lt;a href="https://github.com/north-metric/stripe-churn-signals" rel="noopener noreferrer"&gt;stripe-churn-signals&lt;/a&gt;, MIT licensed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Signal 5: usage declines
&lt;/h3&gt;

&lt;p&gt;Billing tells you &lt;em&gt;that&lt;/em&gt; an account is at risk. Usage tells you &lt;em&gt;why&lt;/em&gt;. If you bill by usage through Stripe meters, a falling meter total is the signal. If you don't, pull a weekly active-user or core-action count per account from your product analytics.&lt;/p&gt;

&lt;p&gt;Two rules keep this simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Compare each account with &lt;strong&gt;its own&lt;/strong&gt; baseline, not with other customers. A 50% drop in the last 14 days against its previous 28-day average is a useful starting threshold.&lt;/li&gt;
&lt;li&gt;Watch new accounts closely. In Amplitude's 2025 benchmarks, &lt;strong&gt;69%&lt;/strong&gt; of products with strong 7-day activation also had strong 3-month retention. Accounts that never activate rarely renew.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Signal 6: upcoming renewals
&lt;/h3&gt;

&lt;p&gt;Annual customers churn on a schedule. &lt;code&gt;invoice.upcoming&lt;/code&gt; fires before each renewal (the timing is set in Billing settings). An annual renewal in the next 30-60 days on an account with weak usage should be the first thing you look at that week.&lt;/p&gt;

&lt;h3&gt;
  
  
  Putting it together without a data team
&lt;/h3&gt;

&lt;p&gt;You don't need a model. A simple weekly sheet works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;One row per active subscription: customer, MRR, and a column per signal above.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High risk:&lt;/strong&gt; two or more strong signals (for example, a failed payment plus a usage drop, or a seat drop plus a renewal within 30 days). &lt;strong&gt;Medium:&lt;/strong&gt; one strong signal. &lt;strong&gt;Low:&lt;/strong&gt; one weak signal.&lt;/li&gt;
&lt;li&gt;Sort by MRR within each risk band. A medium-risk account paying $800 a month usually deserves attention before a high-risk one paying $19.&lt;/li&gt;
&lt;li&gt;Match the action to the signal: a card-update link for payment issues, a short personal check-in for usage drops, a right-sized plan for seat drops.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then close the loop. Record what you did and whether the customer stayed. Research on retention targeting (Ascarza, &lt;em&gt;Journal of Marketing Research&lt;/em&gt;, 2018) found that targeting customers by how they respond to outreach beats targeting by risk alone. Your own outcome log is how you learn which customers respond.&lt;/p&gt;

&lt;h3&gt;
  
  
  Wrapping up
&lt;/h3&gt;

&lt;p&gt;None of this needs more than read access to Stripe and an hour a week. Start with failed payments and &lt;code&gt;cancel_at_period_end&lt;/code&gt;, since they're the most reliable signals. Add usage once those are routine.&lt;/p&gt;

&lt;p&gt;If you'd rather not wire it up yourself, we build &lt;a href="https://www.northmetric.io" rel="noopener noreferrer"&gt;North Metric&lt;/a&gt;, which reads Stripe billing and product usage, ranks at-risk customers by revenue, and suggests a save action for each. You can start with a free churn report. Either way, the list above works fine with a spreadsheet.&lt;/p&gt;

</description>
      <category>saas</category>
      <category>stripe</category>
      <category>startup</category>
      <category>analytics</category>
    </item>
  </channel>
</rss>
