Good write-up, especially committing before sending the email. One thing I'd check on the re-trial guard: because the timestamps live on the team, they only stop that team. The same owner can create a second team and get another 14 days, and if a team is deleted the record goes with it. It's worth keeping a separate "has trialed" record keyed on the owner's normalised email (lowercased, plus tags stripped, dots removed for Gmail) and checking that when a trial starts. Same with clearing the timestamps on conversion: if a team pays, cancels and lapses, nothing stops a fresh trial unless something else remembers the first one.
One small side effect of the daily 04:00 UTC run: a trial whose end time is 04:01 keeps access until the next day's run, so the real length is anywhere from 14 to almost 15 days. That's totally fine, but the in-app countdown should read from trialEndTime and not from "days left" rounding, otherwise people see "0 days left" for most of a day and still have access, which is how you get confused support emails. Did you end up making the expiry email say the exact time, or just the date?
We're a place where coders share, stay up-to-date and grow their careers.
Top comments (2)
Good write-up, especially committing before sending the email. One thing I'd check on the re-trial guard: because the timestamps live on the team, they only stop that team. The same owner can create a second team and get another 14 days, and if a team is deleted the record goes with it. It's worth keeping a separate "has trialed" record keyed on the owner's normalised email (lowercased, plus tags stripped, dots removed for Gmail) and checking that when a trial starts. Same with clearing the timestamps on conversion: if a team pays, cancels and lapses, nothing stops a fresh trial unless something else remembers the first one.
One small side effect of the daily 04:00 UTC run: a trial whose end time is 04:01 keeps access until the next day's run, so the real length is anywhere from 14 to almost 15 days. That's totally fine, but the in-app countdown should read from trialEndTime and not from "days left" rounding, otherwise people see "0 days left" for most of a day and still have access, which is how you get confused support emails. Did you end up making the expiry email say the exact time, or just the date?