We've moved discussions to Discord

What happens once a subscription expires or is cancelled?

Sean Drumm
Is there functionality built in to prevent account users continuing to use the application, or do we need to build this?

I am extending the global trial functionality which would require the same behaviour, so wondering if I need to intercept requests and check if the subscription has expired and send them both to the same error page.
Jake Smith
Not sure, but can you set yourself up with a really short subscription period and just test it that way?
John Chambers
I added my own code to check if the current_account is in a trial or has a paid subscription.

If they don't I display a paywall with subscription link.


<% if current_account&.subscription.active? || current_account&.subscription.on_trial? || (current_account.trial_ends_at && current_account.trial_ends_at > Time.current) %>
    <%= yield %>
<% else %>
    <%= render "dashboard/expired_subscription" %>
<% end %>

I have generic a trial and a credit card trial so that's why there are 2 references to trials above. 

Not sure if this is exactly what you were asking.

Notifications
You’re not receiving notifications from this thread.