opensource-developer
opensource-developer

Reputation: 3038

Stripe: How to provide access during grace period

I have a couple of monthly plans where user can cancel at any moment. Whats the recommended way to handle a grace period where a user still gets access to the application. For example. If the users signup on 1st July and cancels on 15th July, I would like the provide the user access till 30th July.

i am storing the following columns, current_period_start, current_period_end, canceled_at & ended_at.

should grace period check be something like

def grace_period?
   return status == 'canceled' && Time.zone.now < current_period_end
end

any clarification on this would be really helpful. thanks.

Upvotes: 1

Views: 778

Answers (1)

You should not "cancel" subscription. Just update with parameter "cancel_at_period_end: true"

Upvotes: 1

Related Questions