Software developer · Writing system design with real numbers and tests
Software developer who writes about system design the practical way. I take interview-style questions like rate limiters, flash sales, and large file uploads, then test them on my own machine and share what actually breaks. New post every few days at System Design with Param.
Markdown supported · ⌘↵ to post
Great point, Paul Hartness . Renewals are the harder version of this, because nobody is sitting there to tap Pay again.
I'd model it the way Stripe does: a past_due state between active and canceled. Access continues for a grace period while the gateway retries. When the last retry fails, cut access and tell the user to pay to continue banner or something..
Might do a short on this. Thanks for adding it!
How have you handled it?
Paul Hartness
"A timeout means I don't know, not failed" is the line I'd pin above every payments handler.
The same idea shows up on subscription renewals, where nobody taps Pay again: the gateway retries on its own schedule over days. So "not paid yet" needs its own state with its own rule for access, rather than being read as failed (cut them off) or as fine (ignore it). Otherwise the app either locks out a customer whose card is about to clear, or keeps serving one whose retries have all run out.