#ashura1015_webhooks

1 messages ¡ Page 1 of 1 (latest)

regal forgeBOT
#

👋 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.

honest cloud
#

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.

crimson skiff
#

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 is checkout.session.completed and something else?

#

so you'll right some code to handle each event differently.

honest cloud
#

what if i have the same event checkout.session.completed for these two webhooks

crimson skiff
#

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?

honest cloud
#

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).

regal forgeBOT
crimson skiff
#

no webhook endpoint is also two.
if you have two webhook endpoints, and both listen to checkout.session.completed, then it's expected that you receive each event twice.

#

why do you need two webhook endpoint listening to the same event?

honest cloud
#

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.

crimson skiff
#

and (checkout session)another one api for the renewal
What do you mean by using Checkout Session for renewal?

honest cloud
#

i'm using the one time payment mode for these that's why.

fading rain
#

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