qfieldcloud
qfieldcloud copied to clipboard
[WIP] Use trial period on regular plan instead of trial plan
trafficstars
Current Approach Currently, we create two separate subscriptions:
- A Trial Subscription (is_trial=True) that lasts for TRIAL_PERIOD_DAYS.
- A Paid Subscription that is created after the trial expires.
Problems with this approach:
- Handling multiple subscriptions for one user
- Extra logic to fetch, cancel or update trial and regular subscriptions separately.
New Approach
- User asks for a trial subscription
- if the user has no remaining organization trials, no subscription is created
- Otherwise, a subscription object is being created including, among others, a
trial_plan,a regular planand a default number oftrial days. - The trial subscription becomes active until the end of the trial.
- When the trial ends and depending on the user input (payment method), the subscription update its status (ACTIVE_ * / INACTIVE_ *)