#brian_code
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/1344396453501472798
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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