#andrew.cai-billing

1 messages · Page 1 of 1 (latest)

fast apex
#

It's UTC+0

shut thicket
#

i set timestamp is 1661961600

fast apex
#

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

shut thicket
#

twhat day will the data with the timestamp of 1661961600 appear on the bill

fast apex
#

For "bill" do you mean Invoice or receipt?

shut thicket
#

Invoice

#

in other word which day will the fee be deducted

shut thicket
fast apex
#

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

shut thicket
#

It means that the data of timestamp 1661961600 will be deducted on September 2 of UTC + 0, right?

fast apex
#

That Unixtimestampt should be Wednesday, August 31, 2022 4:00:00 PM, no? Just used some converter

shut thicket
#

oh! timestamp 1661990400 - 1664582399 will be deducted on September 2 of UTC + 0 right?

fast apex
#

Yes. It's the next billing cycle to bill

shut thicket
#

thanks! another question, at the end of a cycle, what time point of the day will the fee be deducted

fast apex
#

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

shut thicket
#

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?

fast apex
#

Yes

shut thicket
#

thanks! how can i clear the usage record

fast apex
#

Well I would say fee deducted at 5:15 PM

shut thicket
#

how to clear these records

fast apex
#

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

shut thicket
#

ok 🤣

fast apex
#

In the end, we calculate on timestamp based, with whichever is latest