This PR introduces stripe cancellation feature, with 2 UI pages: /subscribe - if you are new and yet to subscribe, /subscription/manage for when you are subscribed and want to check your usage, edit payment method, cancel subscription, and review your subscribed plan.
Note to dev: In addition to this, the price ID is being updated in the backend env variables and secrets. Now the price (in test, yet to be changed in prod) is 5$ flat fee + 0.01$ overage. Only 2 tiers, as opposed to the current payment method set in prod (with 3 tiers). This will be updated in prod as well.
/subscribe page:
/subscription/manage page:
Scenario 1: when you are subscribed and the plan is set to auto renew:
Scenario 2: when you have canceled your plan:
Menu:
Related Tickets & Documents
Reference as needed.
Steps to Test
Good to note/test:
the subtext under your plan, renewal information and the buttons in the billing & payment box change dynamically between subscribed (set to auto renew) and canceled states.
the menu shows 'Subscribe' vs 'Manage Subscription' based on the subscription status.
if you navigate manually to the /subscribe page when you are a subscriber, it redirects to the /subscription/manage page and vice versa.
After checkout, landing page is now /subscription/manage page instead of /checkout/success.
You will now be redirected from the experiment submission page to the /subscribe page, instead of direct stripe checkout. This also means you can subscribe at any point manually by navigating to /subscribe, not necessarily only when you hit the threshold and are redirected from the experiment submission.
What type of PR is this?
Description
This PR introduces stripe cancellation feature, with 2 UI pages: /subscribe - if you are new and yet to subscribe, /subscription/manage for when you are subscribed and want to check your usage, edit payment method, cancel subscription, and review your subscribed plan.
Note to dev: In addition to this, the price ID is being updated in the backend env variables and secrets. Now the price (in test, yet to be changed in prod) is 5$ flat fee + 0.01$ overage. Only 2 tiers, as opposed to the current payment method set in prod (with 3 tiers). This will be updated in prod as well.
/subscribe page:
/subscription/manage page:
Scenario 1: when you are subscribed and the plan is set to auto renew:
Scenario 2: when you have canceled your plan:
Menu:
Related Tickets & Documents
Reference as needed.
Steps to Test
Good to note/test: