#bill92_webhooks

1 messages ¡ Page 1 of 1 (latest)

polar leafBOT
#

👋 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/1305739694809681923

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

ornate bison
#

hello! idempotency keys are meant for API requests made to Stripe. For webhook events, you should use the event id like what our doc mentions

chilly frigate
#

thank you so much

#

how long do you recommend storing the key? 24 hours?

ornate bison
#

I'm not too sure I understand, are you referring to idempotency keys?

chilly frigate
ornate bison
#

i think 24 hours should be more than sufficient. However, maybe a different question here is what do you really need to do with the event data? If you just want to ensure your DB has the latest information of the object, you can make a request to retrieve the object upon receipt of the event. In this case, you wouldn't even need to store the event id anyway

chilly frigate
#

for this case, I'm keeping track of the trial_will_end event, so I would not want to send more than one email, It might be confusing to the end user

ornate bison
#

ah i see, but logically you can update in your own DB if you've already sent the email right?

chilly frigate
#

hmm not sure I'm following..

emails will be automatically sent when the trial_will_end is triggered via a webhook, I just want to make sure its sent once

ornate bison
#

sorry, to clarify, what i had in mind is that your application will update your DB to note that an email has been sent

#

so in your DB, you would have a column maybe saying email_sent

#

i'm assuming your application is sending your own email for this