Continuing the discussion from Discourse subscriptions - changing price - how to cancel auto-renewal instead of whole subscription:
Feature request: It would be good if the user could choose to cancel the subscription at the end of the cycle, instead of only being able to cancel it immediately.
I’ve seen this in the Stripe documentation, under the heading “Cancel at end of cycle”:
If you instead want to cancel the subscription at the end of the current billing period (that is, for the duration of time the customer has already paid for), update the subscription with a cancel_at_period_end
value of true
:
…
You can reactivate subscriptions scheduled for cancellation (with the cancel_at_period_end
parameter) by updating cancel_at_period_end
to false
. You can reactivate the subscription at any point up to the end of the period.
1 Like
It turns out that the user can do what I asked (I’ve changed “allow” to “clarify” in the title now)… so here are two new but related…
Feature requests: The default wording should make clear the two types of cancellation. The admin interface should have the same “Status” column as the user interface.
Here are some details…
It seems that “cancel” in Discourse Subscriptions means two different things depending on who is doing it! For the user it only cancels auto-renewal; for the admin it cancels the whole subscription immediately.
-
If the user clicks the bin icon at u/.../billing/subscriptions
the prompt is “Are you sure you want to cancel this subscription?”
Choosing Yes triggers the customer.subscription.updated
webhook.
Two notable parts of the response are "cancel_at_period_end": true
and "status": "active"
. The user’s subscription page still stays “Status: Active” but for “Renews” it now states “cancelled”. The user remains in the subscribed group.
Annoyingly, the admin interface doesn’t now indicate that auto-renewal has been cancelled – it just has “Status: active”.
-
If the admin clicks “cancel” at /admin/plugins/discourse-subscriptions/subscriptions
the prompt again is “Are you sure you want to cancel this subscription?” (it also asks about whether to refund).
Choosing Yes triggers the customer.subscription.deleted
webhook.
The response includes "status": "canceled"
. The subscription is deleted everywhere and the user is removed from the subscribed group.