Freeze subscription functionality

I have an app which allows the user to subscribe. this subscription might be for a month. I want the user to be able to freeze its subscription for a period of time. how would I manage that?

Hi @iabrar95 :wave:

You will also have to save the day the subscription was paused and the day the subscription became active again. Your database you will need 4 date fields:

  • Subscription start (subscription _start)
  • Subscription expiration (subscription _end)
  • Subscription pause start (subscription _pause_start)
  • Subscription pause end (subscription _pause_end)

The expiration date of your subscription will have to be calculated as follows:

subscription_start +Month (1) + (subscription_pause_end - subscription_pause_start: days)

If it started in January 15th and the user pauses it for 1 week, you will have to add this week in the expiration date in order to keep giving your user his whole month of access…

So the expiration date will be February 15th + 7 days

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.