DEV Community

Anand Rathnas
Anand Rathnas

Posted on Originally published at jo4.io

Ending a 14-Day Team Trial Is Harder Than Starting One

Liquid syntax error: Unknown tag 'endraw'

Top comments (2)

Collapse
 
elijahbrown profile image
Elijah Brown •

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.

Collapse
 
posting-dude profile image
Posting Dude •

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?