<?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: Karan Palukuri</title>
    <description>The latest articles on DEV Community by Karan Palukuri (@karan_palukuri).</description>
    <link>https://dev.to/karan_palukuri</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%2F4165544%2F0d06522c-adb4-4aa1-af37-56675b5045b0.png</url>
      <title>DEV Community: Karan Palukuri</title>
      <link>https://dev.to/karan_palukuri</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/karan_palukuri"/>
    <language>en</language>
    <item>
      <title>Stripe removed invoice.payment_intent in the basil API and it quietly broke my failed-payment workflow</title>
      <dc:creator>Karan Palukuri</dc:creator>
      <pubDate>Tue, 06 Oct 2026 06:32:00 +0000</pubDate>
      <link>https://dev.to/karan_palukuri/stripe-removed-invoicepaymentintent-in-the-basil-api-and-it-quietly-broke-my-failed-payment-2aa8</link>
      <guid>https://dev.to/karan_palukuri/stripe-removed-invoicepaymentintent-in-the-basil-api-and-it-quietly-broke-my-failed-payment-2aa8</guid>
      <description>&lt;p&gt;Someone on Reddit tried my free Stripe decline-code workflow on a fresh test account and got nothing back. I figured they'd set it up wrong. They hadn't.&lt;/p&gt;

&lt;p&gt;Their account was on API version &lt;code&gt;2025-03-31.basil&lt;/code&gt;. From that version the invoice doesn't have &lt;code&gt;payment_intent&lt;/code&gt;, &lt;code&gt;charge&lt;/code&gt; or &lt;code&gt;paid&lt;/code&gt; anymore. My code read &lt;code&gt;invoice.payment_intent&lt;/code&gt;, got &lt;code&gt;undefined&lt;/code&gt;, and requested &lt;code&gt;/v1/payment_intents/undefined&lt;/code&gt;. Stripe returned a 404 and the workflow just stopped. No retry, no email for that customer, and nothing in the logs that pointed at why.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;Ask for the invoice's payments and expand the payment intent in the same call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET /v1/invoice_payments?invoice=in_123&amp;amp;limit=1&amp;amp;expand[]=data.payment.payment_intent
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The newest attempt comes first, so &lt;code&gt;data[0].payment.payment_intent&lt;/code&gt; is the one you used to read straight off the invoice. From there &lt;code&gt;last_payment_error.decline_code&lt;/code&gt; works like before.&lt;/p&gt;

&lt;h2&gt;
  
  
  Other things that moved
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;invoice.paid&lt;/code&gt; (the boolean) is gone. Check &lt;code&gt;status === "paid"&lt;/code&gt;, or your "did they already pay?" re-check will always say no.&lt;/li&gt;
&lt;li&gt;Webhook endpoints keep the API version they were created with, so you can get the old and new shapes at once. Keep the old path as a fallback.&lt;/li&gt;
&lt;li&gt;3D Secure shows up as &lt;code&gt;requires_action&lt;/code&gt;. There's no decline code to classify and retrying does nothing, so send those customers to the hosted invoice page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I tested all of this against real failing test invoices: a hard decline, a soft decline and a 3DS card. All three route correctly now.&lt;/p&gt;

&lt;p&gt;The full write-up is here: &lt;a href="https://revguardlabs.org/guides/stripe-invoice-payment-intent-missing-basil" rel="noopener noreferrer"&gt;https://revguardlabs.org/guides/stripe-invoice-payment-intent-missing-basil&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks to akl773 on r/n8n for reporting it.&lt;/p&gt;

</description>
      <category>stripe</category>
      <category>api</category>
      <category>webdev</category>
      <category>automation</category>
    </item>
  </channel>
</rss>
