Usage Stats

bryananaya

Beginner
Nov 3, 2023
24
0
1
This is in regards to billing users based on usage.
I see in the database there is a table "user_email_limits" with a field of "sent_this_month"
How is that calculated? Is it calendar month or month as in 30 days? Another way to phrase that is it Dec 1-31 or is it is Nov 20-Dec 20, assuming they signed up on the 20th of the month?
I see the "updated_at" field is a 30 day difference so I assume it is based on date of signup and not calendar?
I would guess this is how the sending limits are imposed as well, based on date of signup and not calendar?

For context, I am trying to set up Stripe to bill recurring based on usage. The easiest way to integrate with them is to charge the monthly fee is by purchase date. Doing it by calendar requires some customization to enable that.

I would also assume that the "sent_this_month" field is reset to 0 on the updated_at time if it was a monthly update?