Insights · 6 min read
Stripe subscriptions: handling failed payments without losing customers
By Austin Hunter ·
We run our own paid subscription products on Stripe and build billing for clients, and the same problems come up again and again. Cards expire, banks decline renewals, and the app either cuts people off too early or lets them use it unpaid for months. Most of it comes down to one rule.
The rule: Stripe is the source of truth
Your app shouldn't decide on its own who has paid. It should react to Stripe's webhooks (events like a subscription being created, updated or deleted, or an invoice being paid or failing) and store the result. The checkout page saying "success" isn't enough: payments can still fail, be disputed or be refunded later.
Get the webhooks right
- Verify every webhook's signature, so nobody can fake a "paid" event.
- Handle events more than once safely (Stripe retries), and in any order.
- Store the subscription status, the current period's end and the plan on your user record, and grant access from that.
- Log every event you receive, so support can answer "why was I cut off?" in a minute.
Let Stripe retry before you cut access
Stripe can retry failed renewals automatically over several days, and it can email customers to update their card. Turn those on, and decide how your app behaves while a payment is past due: usually keep access for a short grace period with a clear in-app banner, then restrict it. Cutting people off on the first failed charge loses customers whose card simply expired.
Make updating a card easy
Stripe's hosted customer portal lets customers update their card, change plans or cancel without you building any of it. Link to it from your app's billing page and from your failed-payment emails.
Check the edge cases
- Upgrades and downgrades in the middle of a billing period (proration).
- Free trials that end without a card on file.
- Refunds and disputes: does access change, and should it?
- Usage-based charges with a monthly cap, if you meter usage.
How we can help
If your billing logic was built quickly, our Production health check reviews payments alongside data access, backups and monitoring for a fixed $990, and gives you a fixed price to fix what's wrong.