#brian_code

1 messages ยท Page 1 of 1 (latest)

visual spadeBOT
#

๐Ÿ‘‹ 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/1344396453501472798

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

royal summitBOT
stable dome
#

Hi there ๐Ÿ‘‹ I think it either approach is fine if you can get it working consistently. I'm pretty sure you can use the transform_quantity.divide_by property on the price to tell us that quantity should be divided by 1000 so you can report usage for each event.
https://docs.stripe.com/api/prices/object#price_object-transform_quantity

thorny lynx
# stable dome Hi there ๐Ÿ‘‹ I think it either approach is fine if you can get it working consist...

makes sense! Do you have any other possible recommendations, our specific use-case is something along the lines of:

every time the user consumes our /api/v1/events endpoint, every invocation we want to track said usage and bill the user accordingly, offering X amount of requests "for free" as part of your subscription plan, then bill for overage;

would you recommend invoking the meter on the api itself, or storing their event history in our database with a background task that runs every x minutes to report the data