#changpet_best-practices
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/1286039045708845187
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
Yep this is fine as long as you stay under our rate limits: https://docs.stripe.com/billing/subscriptions/usage-based-legacy/recording-usage#best-practices-for-recording-usage
The usage reporting endpoint is rate-limited, and the Stripe API has a rate limit of 100 calls per second per account. We can increase this to 200 calls per second per account, on request. If you have a service that you expect to exceed this limit, consider “bundling” your product into amounts. For example, if you charge per 1000 requests, consider basing your product on “per 1000 transactions” and send 1 usage record per 1000.
Mostly the recommendation, as stated there, is to batch in this case
Okay, we shouldn't run into rate limiting issues, because if a large amount of messages are ever sent at once, the usage call is batched together to increment by X number of messages. My only concern was that the usage history, wasn't sure if there was a limit to the number of usage records or something
Nope