#tusharvaswani_api

1 messages ¡ Page 1 of 1 (latest)

echo drumBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1324854916208136312

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

plain echo
#

Hello, can you send me a request ID from when you get this error? Also can you tell me more about how the extra usage makes it difficult to find the cycle length?

timid spoke
#

Sure let me get it

#

request id - req_kKlAZ2lZN7aJrL

timid spoke
#

Sorry I could have been more clear

plain echo
timid spoke
#

yes i was using that only

#

let me try again

#

didnt work got this error @plain echo :
StripeInvalidRequestError: start_time 1735941318 should be aligned with daily boundaries (expected 1735862400) because the value_grouping_window is day.

plain echo
#

Ah gotcha, so it looks like we are expecting you to pass a timestamp that is at UTC midnight for the days you want to look at. If you pass in UTC midnight for your start and end dates, this call should work

timid spoke
#

yeah but that then just creates the problem where I cant get total usage

plain echo
#

I think I see what you are saying. If the subscription is cycling in the middle of the day, you are trying to see the usage before and after 12:00 UTC on that specific day?

timid spoke
#

no I am trying to see usage between start and end of billing cycle

#

like stripe also calculates it right?

plain echo
#

Trying to figure out, but that may not be how it works when you set your meter to aggregate by the day

#

That is from the billing meter creation page. It looks like we only count one value for each day if you set the event time window setting to aggregate daily

timid spoke
#

No I had set it to raw

plain echo
#

Oh I see the error mentions that value_grouping_window was set to day, which is a setting on the list call but not the meter itself. Are you passing that parameter? If so, do things change when you remove it?
https://docs.stripe.com/api/billing/meter-event-summary/list#list_billing_meter_event_summaries-value_grouping_window

timid spoke
#

let me try

#

that worked thanks a lot @plain echo you saved my day!

plain echo
#

Nice! Glad I could help

timid spoke
#

i was on this from hrs lol

#

thanks

plain echo
#

Sorry to hear, happy we could figure it out now at least