DEV Community

naval
naval

Posted on

how long do your users keep access when a card gets declined?

stripe doesn't cancel on the first failed payment. the sub goes to past_due and stripe retries over the next days. so your app has to decide what a past_due user can still reach.

i've seen three choices: full access until stripe gives up, access with a banner and a fixed grace window, or cut off at the first failure.

what do you do, and did a support thread ever make you change it?

Top comments (2)

Collapse
 
hamichidev profile image
Hamichi •

We'd pick the middle option: full access with a banner during a fixed grace window, then read-only rather than a hard lockout. The detail that matters is where the window starts: store the time of the first failed invoice.payment_failed and count from that, not from current_period_end or the latest retry, or every retry event quietly extends the grace. When invoice.paid arrives, clear that stored time and the banner in the same write. Do you end the window after a fixed number of days, or when Stripe's retry schedule finally moves the subscription to unpaid or canceled?

Collapse
 
smtahosin profile image
S M Tahosin •

Hey Naval! Banner + grace.. 3 days full, then read-only. Worst ticket was an expired card, not declined lol. Guy renewed in 4 minutes. First-failure cutoff makes support work :D

Some comments may only be visible to logged-in visitors. Sign in to view all comments.