#kevinx9999-_webhooks
1 messages ¡ Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- kevin_connect-webhooks, 40 minutes ago, 118 messages
đ 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/1249875567826960404
đ Have more to share? Add details, code, screenshots, videos, etc. below.
Hello there
We have three different webhooks and two different checkout pages (for different line_items)
I'm just trying to figure out how the events from different checkout pages are sent to these webhooks
I have read the docs and haven't found the clear answer yet
Hi there, so you want to know more about the checkout.session.completed event?
not only this event, but all other events that we are listening to from different webhooks, some are overlap, some are not
I'm just trying to figure out how the events from different checkout pages are sent to these webhooks
Do you have some examples?
ok, here are three webhooks we have
when a checkout page sends an event like account.updated or charges.successeed, how is this event being sent to the webhook, which webhook?
Ok so you are talking about webhook endpoints.
It really depends on the endpoint configuration (i.e., what event is the endpoint is listening to)
For example the endpoint https://www.zykles.com/api/listingWebhook is only listening to charge.succeeded. charge.dispute.created and charge.dispute.updated
https://www.zkyles.com/api/connectWebhookOwners , this endpoint listens to the same events
https://www.zkyles.com/api/connectWebhook is listening to checkout.session.completed, but the event delivery wasn't successful. Example: https://dashboard.stripe.com/events/evt_1PPnSpF9VtVx6MBBWDADYHVJ
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
ok, why?
actually all three endpoints are listending to some same events with the same event names
that's where my question comes in, how Stripe sends events to different endpoints
You can open the link that I sent earlier to go to your Dashboard and see why the event wasn't delivered successfully
It says Failed to connect to remote host
https://www.zkyles.com/api/connectWebhookOwners is a connect webhook endpoint and it will only listen to events from your connected accounts. Are you using Connect?
yes, I am
ok, I should ask this way,
OK. And I can see that both of your account webhook endpoints (https://www.zykles.com/api/listingWebhook and https://www.zkyles.com/api/connectWebhook) are listening to some commoen events, i.e., charge.succeeded event, which means they will both get notified when a charge.succeeded happens.
However, I noticed that you reused https://www.zkyles.com/api/connectWebhook to listen to events from your account and also connected accounts, this is not something I'd recommend.
what do you mean reused here
is there any config that points a checkout session to a webhook endpoint?
Ah sorry, my mistake, they are using two different URLs.
"points a checkout session to a webhook endpoint?' -> can you elaborate more?
ok, let's say I have two different checkout pages for two different line_items
and I want to have webhook endpoint A listen to checkout session A only
and webhook endpoint B listens to checkout session B only
Not possible
and why it is failed to connect to the remote host
You might want to check with your hosting provider and make sure your endpoint is always accessible.
ok, so if an event is generated, it just blasts to all webhook endpoints? of course, seperate between accout and connect
Yes you are right
ok, to further confirm, if all of my endpoints listen to charge.successeed, once this event is generated from ANY checkout pages, all three endpoints will receive the event?
If the charge.successeed is genereated from your account,
https://www.zykles.com/api/listingWebhook and https://www.zkyles.com/api/connectWebhook will be notified.
If the charge.successeed is genereated from one of your connected account, https://www.zkyles.com/api/connectWebhookOwners will be notified.
great
I actually set up the listingWebhook and connectWebhook for two different items, as there are two different group of actions following up
if the same event are sent to both webhooks, how should I config to determine which items was sold
You can listen to checkout.session.completed event, and expand (https://docs.stripe.com/api/expanding_objects) the checkout session object to get its line_items
https://docs.stripe.com/payments/checkout/fulfill-orders#fulfill you can find an example here
ok, so if this is the case, I don't actually need two endpoints at all for ACCOUNT
since all the same events are delivered everywhere indiscriminately
just one endpoint for account and another for connect, is this the right approach?
I know why it is failed, because my host has a rate limit to prevent DDOS I guess, if Stripe blasts the same events mutiple times in a short time to different webhook endpoints, the second would fail
Hello, you there?
What's the question?
ok, so if this is the case, I don't actually need two endpoints at all for ACCOUNT
since all the same events are delivered everywhere indiscriminately
just one endpoint for account and another for connect, is this the right approach?
Yes, it looks good to me.
ok, thanks
is it a good practice, if we use different webhook endpoints listen different events for the same account?
It's not required, but you can do it if some events are happening too frequent and you need to setup a dedicated endpoint to take the load.