qfieldcloud icon indicating copy to clipboard operation
qfieldcloud copied to clipboard

[WIP] Use trial period on regular plan instead of trial plan

Open tdrivas opened this issue 9 months ago • 1 comments
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 plan and a default number of trial 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_ *)

tdrivas avatar Feb 19 '25 12:02 tdrivas