#ashura1015_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1253684069741625414
đ Have more to share? Add details, code, screenshots, videos, etc. below.
I have been working on some unique ecommerce in which for now we will go with the one time payment mode using stripe but we have subscription model using these one time payment mode in which i have create (checkout session)one api for the buying and (checkout session)another one api for the renewal with separate webhook we try to handle that. But can i handle that using one webhook Or the two webhooks will not collide so i can have them separate. I need your assistance in this.
hi there!
so If I create the webhook for these two does it will have conficts
why would there be a conflict? each Checkout Session will have a different object ID
one api for the buying and (checkout session)another one api for the renewal with separate webhook we try to handle that
so it looks like you would be listening to two separate events? one ischeckout.session.completedand something else?
so you'll right some code to handle each event differently.
you can see how to do this with our guide here: https://docs.stripe.com/webhooks/quickstart
what if i have the same event checkout.session.completed for these two webhooks
you mean you have two webhook endpoint, both listening to the checkout.session.completed event?
or you have a single endpoint, but you receive two checkout.session.completed event for two different Checkout Session?
no webhook endpoint is also two. And so when i make the payment (buying) it have to come for the payment_webhook and if i make the payment(for renewal) it have to come for the renewal_webhook. Both will listen for the same checkout.session.completed. the webhooks in here is different. My doubt here is for create this stripe checkout session i'm using the same secret key so does it will affect the webhook like - sending the event to these two webhooks parallely (cause the endpoint is different but the event they listenting is the same).
no webhook endpoint is also two.
if you have two webhook endpoints, and both listen tocheckout.session.completed, then it's expected that you receive each event twice.
why do you need two webhook endpoint listening to the same event?
I have been working on some unique ecommerce in which for now we will go with the one time payment mode using stripe but we have subscription model using these one time payment mode in which i have create (checkout session)one api for the buying and (checkout session)another one api for the renewal with separate webhook we try to handle that. But can i handle that using one webhook Or the two webhooks will not collide so i can have them separate. I need your assistance in this.
and (checkout session)another one api for the renewal
What do you mean by using Checkout Session for renewal?
i'm using the one time payment mode for these that's why.
Yeah using two webhook endpoints for this isn't advised
Just use 1
Since it's the same event
You can add some metadata on the session to differentiate the two
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.