hcb icon indicating copy to clipboard operation
hcb copied to clipboard

[Receipt] Auto lock user from making card transactions after hitting a missing receipt threshold

Open garyhtou opened this issue 1 year ago • 2 comments

When a user hits a certain threshold of missing receipts, we will lock their user from making more card transactions. Under the hood, this will be implemented as freezing all their stripe cards and setting a "locked" boolean. The "locked" boolean will prevent the user from defrosting the card.

We still need to determine what this "missing receipt threshold" is. Maybe transactions.missing_receipts.where("date < ?", 3.weeks.ago).count > 20. This would give people a three-week period to upload receipts. We can send reminders starting at 2 weeks up until we actually lock their user from card transactions.

The goal is to encourage users to upload their receipts.

garyhtou avatar Dec 07 '24 05:12 garyhtou

I agree with the general goal of this and I'm glad we're doing weekly receipt reports by default.

However, I think we should have a level of human intervention here and I think a human should manually switch them into locked mode after having reached out personally.

Sending purely an automated email feels impersonal and overkill, as a user that would frustrate me and could leave me feeling sour. I also have a feeling this would block some fairly prominent user's cards.

And on a technical note, there are still some weird quirks about calculating how many receipts someone is missing and it can't be done in SQL yet (though tasks might help this?).

sampoder avatar Dec 07 '24 05:12 sampoder

I think the first step would be making ourselves clear with the deadline to upload receipts. As a user, it's not entirely obvious how long you have to upload a receipt because there's no feedback besides the act of uploading.

YodaLightsabr avatar Apr 29 '25 07:04 YodaLightsabr

We built this: https://github.com/hackclub/hcb/pull/10609

sampoder avatar Jul 26 '25 00:07 sampoder