#andrew.cai-billing
1 messages · Page 1 of 1 (latest)
Sorry for the confusion. The time on Dashboard is based on your account timezone. The time on object you receive via API is UTC + 0
twhat day will the data with the timestamp of 1661961600 appear on the bill
For "bill" do you mean Invoice or receipt?
but my timezone is UTC + 8👀
Fee is deduct on UTC time. The time on your Dashboard is just for viewing purpose I believe
Every calculation is done on UTC time
It means that the data of timestamp 1661961600 will be deducted on September 2 of UTC + 0, right?
That Unixtimestampt should be Wednesday, August 31, 2022 4:00:00 PM, no? Just used some converter
oh! timestamp 1661990400 - 1664582399 will be deducted on September 2 of UTC + 0 right?
Yes. It's the next billing cycle to bill
thanks! another question, at the end of a cycle, what time point of the day will the fee be deducted
It's almost right after the cycle change
If you use sum for aggregate_usage, Stripe will wait for an additional 5 minutes
else we will split right on the cycle
Calculation is done by that timing. Invoice sending could have a bit delay tho
If the cycle ends at 5: 15 PM., will the fee be deducted at 5: 16 PM?
and usage after 5:15 PM will be included in the second cycle, right?
Yes
thanks! how can i clear the usage record
Well I would say fee deducted at 5:15 PM
sure
how to clear these records
Not sure if that's possible. Let me look around ...
Ok we don't have a direct API for that, but there is a workaround
You can overwrite/correct an existing Usage Record by creating a new one with the same timestamp, the desired quantity, and action:set
You can specify quantity = 0 to "delete" it
ok 🤣
In the end, we calculate on timestamp based, with whichever is latest