#tateb_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/1339335009269448704
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there ๐ I don't know how specifically to do this for a discord bot, but the general answer is that you use a webhook endpoint to listen for Events being emitted by your Stripe account, and then you log the relevant details for your flows in your database:
https://docs.stripe.com/billing/subscriptions/event-destinations
So like,
user purchases --> webhook endpoint --> logs in db?
Yes. You would create a server with an endpoint that we can send Events to. Then you'd add code to that endpoint for processing the Events and logging the data you need from them in the appropriate place for your flows.
Amazing, I will try that. Okay if we keep the thread open for a bit?
Yup. I'll close it out after 15-20 minutes of inactivity, but if that happens and another question comes up, you can just open a new thread for that and we'll still be happy to help.