#leksinteractive_usage-based-billing-test-clocks
1 messages ยท Page 1 of 1 (latest)
๐ 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/1346981248572199023
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there
Hi @kindred bison ๐
Do you mean that you want to do something like pass a pre-aggregated usage number to the Subscription itself?
sorry for any confusion - I know that we can only pass the pre-aggregated usage to the meter itself and Stripe works out the totals for the billing cycle at the end of that cycle.
I guess if I was to rephrase the question, is there any way to tell Stripe not to SUM the usage that we give it for a period?
for example, I know we can use the pre-aggregated daily option and only send events on the last day of the billing cycle, which would also work for us
just wondering if there was such an option as "pre aggregated for the billing period" if that makes sense
the idea being, we minimise the number of Stripe calls essentially, as we only need to send them at the end of the billing period
I think you could record the month's usage on the final day here, if you are okay with that
All the usage would be recorded on a single day
ok, that's the approach we were thinking of, just wanted to check if there's another more "best practice" way ๐
thank you @kindred bison
and to confirm, even if we send multiple events on that last day, Stripe will only use the latest event sent?
If you're using pre-aggregated event ingestion
If you're not aware, I highly recommend testing these sorts of things with our Test Clocks feature so you can see them play out
amazing, I wasn't aware of test clocks - thanks