#estafette-billing-usagerecord
1 messages ยท Page 1 of 1 (latest)
estafette-billing-usagerecord
Hey @eternal scroll ! To "overwrite" a UsageRecord you have to know its exact timestamp. The idea is that if you create a record at say X, Y and Z and now you realize you want to correct Y you have to create a new one with the same Y timestamp, the new value and pass action: 'set'
@eternal scroll does that make sense?
but I'm not seeing a timestamp on the usage record response.
I'm not entirely sure what that could mean as https://stripe.com/docs/api/usage_records/object#usage_record_object-timestamp exists
I'm able to log into the Strip Dashboard and view the Logs to find the POST event that includes the timestamp, but when I make the list_usage_record_summaries call from my app, there is no timestamp included.
yeah that's normal. You aren't listing UsageRecords. You are getting a "Summary" of the ones you created, like some aggregation of it (since there could be millions)
Fair enough. Thank you for the help! Just to make sure I'm understanding fully, the best course of action for us right now is to manually find the POST event in the Stripe logs, grab the timestamp from there, and then manually do a set action via the API?
unfortunately yes ๐ฆ
I can maybe help if you know what you are looking for, like which si_123 and what "quantity" you set at the time?
We do know the subscription ID and quantity
sure I can try and look at that if you share that
I think we can figure it out from here - just wasn't sure if I was missing an aspect of the API to make this simpler ๐ thanks @static dock !