#withapain

1 messages ยท Page 1 of 1 (latest)

summer shoreBOT
worldly otter
#

So rather than creating multiple usage records, you just want a single usage record that you increment. Is that right?

#

Because you can't change the interval of the usage record, if that makes sense. They just accumulate throughout the billing period

sage apex
#

I just want to make sure I am always reporting total monthly value

#

reporting daily has a drawback of missing a day and making whole retry system around it

#

instead, I want to always report my Total for the month and replace Total for the month in stripe

worldly otter
#

Ok, then what you need to do is create a new Usage Record, using action: 'set' but pass the same timestamp each time and it will override the existing record with that timestamp (assuming it exists)

#

That will there'll just be a single Usage Record for the billing cycle, but the quantity will change to reflect the actual usage each day

sage apex
#

There is a note that if we have a billing_threshold , it will not work. Why is that?

worldly otter
#

Can you share where you see that note?

sage apex
worldly otter
#

I'm not sure why, I guess that's just how it works unfortunately

sage apex
#

got it, thx

#

one more question

#

Or, actually, nvm, figured it out. ๐Ÿ˜„

summer shoreBOT