For Stripe subscriptions, when renewal time hits, the draft invoice is created 1 hour before payment is done.
Sometimes a user cancels during that 1 hour:
In this case what happened was that the payment goes through half an hour after they had cancelled. This is unexpected for the user. What was even more unexpected was that the user was demoted as though they had successfully cancelled before payment, just five minutes after the payment:
“Demoted by s2Member: Mon Sep 14, 2020 2:00 pm UTC”
The timeline looks like this:
12:54 - Invoice drafted
13:34 - User cancels subscription
13:55 - Invoice is paid
14:00 - User is demoted.
I think this may be an edge case that is not being handled properly.