What happened
The payment processor knows the payment failed. The system never got the message. The subscription stays active, and nobody knows for how long.
The important question isn't "where's the bug". It's: who decided what's supposed to happen when a charge fails? Because something was already decided. The system behaves. It's just that nobody chose that behavior.
The decision. Two answers, two prices.
Immediate block
The charge fails, access stops at that moment, and the customer gets a message.
The price. Simple to build. Hard on a good customer whose credit card expired: they find out when they're thrown out.
Grace period
Access stays open for a few days, the system tries to charge again, and the customer gets a way to update the payment method.
The price. Convenient for the customer. Requires another state in the system, an end date, and a recurring charge someone has to schedule. And it opens a question: what happens to credits accumulated during the grace period.
There is no right answer. There is an answer someone made, and an answer the system made for them.
What the decision leads to
One decision, four places. This is what changes in each of them, whichever answer is chosen.
The subscription statesNot just "active" and "cancelled". Also "failed", "in grace", "blocked". Every state is a screen, a message, and different access.
The payment eventsThe processor sends a failure event. The system has to receive it and change state. Without that, the processor knows and the system doesn't.
The permissionsWhat the subscriber in grace sees, and what they don't. What's left for them when blocked.
What the customer seesThe message, the screen, and the way to fix it. A decision the customer doesn't see is a decision they discover on the phone.
What was proven, and what not yet
This is how you know it holds:
A charge failure event from the processor reaches the system and changes the subscription state
A test that simulates a failure and sees: the state changed, the message went out, access changed
What happens to credits during the grace period, written down and tested
Without the decision, this is what hasn't been proven yet. With the decision, this is the handover verification list.
Who decides
This decision belongs to the product owner, not to whoever builds and not to the AI. It isn't technical: block or grace is a question about what kind of business you want to be. What's technical is what it leads to, and that has to be written down before building.