#nn87-usagerecord-set
1 messages · Page 1 of 1 (latest)
@regal garden if you pass set to simply create a new usage record for that specific timestamp. So if you set 1 then 2 then 3, it's not 3, it's a total of 6 since each happened at a different timestamp
does it mean I need to use set with the previous timestamp to update it?
correct
Is there a way to retrive previous usage_records so that I can retrive the timestamp?
no, you have to keep track of them yourself
if you only want to set a quantity, you should use https://stripe.com/docs/api/prices/create#create_price-recurring-aggregate_usage and set aggregate_usage: 'last_during_period'
that way, each month, we charge the most recent quantity