#estafette-billing-usagerecord

1 messages ยท Page 1 of 1 (latest)

obsidian lintelBOT
static dock
#

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?

eternal scroll
#

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.

static dock
#

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)

eternal scroll
#

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?

static dock
#

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?

eternal scroll
#

We do know the subscription ID and quantity

static dock
#

sure I can try and look at that if you share that

eternal scroll
#

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 !