#kevin_connect-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/1249838550699085844
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Hi there
Hello
What do you mean exactly by "doesn't fire up"?
first, I can't find those events in the log
second, the functions didn't get triggered in the code after case "charge.succeeded" as well as case "checkout.session.completed"
even though, the payments went through and I can see them in the log
btw, it worked when we did testing by forwarding the request to local host
Okay, the event you shared is application_fee.created. I don't see any webhook that is listening for this event type, so this event wasn't sent to any endpoints
Which charge.succeeded or checkout.session.completed events were you expecting to receive?
Ah, I think I found them
Okay, I see a charge.succeeded event was delivered successfully to the endpoint .../api/listingWebhook but delivery attempts to .../api/connectWebhook failed
ok, these payments are supposed to go through the connectWebhook only, because it's not related to listings
do you know why delivery attempts fialed at the connectWebhook? it works well when we did testings
both listingWebhook and connectWebhook were configured to listen for charge.succeeded events, which is why we're sending to both
ok, but we build different payment pages for each of these two, one is for listing, and another is for connect
The error I see on my end implies connectivity issues. In other words, when Stripe attempts to make a POST request to https://www.zkyles.com/api/connectWebhook, we cannot connect.
I'm using the same authentication on both webhooks, so one is working and the other isn't
There seems to be some DNS issue. Using a tool like https://mxtoolbox.com/DNSLookup.aspx, https://www.zkyles.com won't resolve
Hm, authentication. In order for events to be delivered, your endpoint should be publicly accessible
You can also allow list these IP addresses: https://docs.stripe.com/ips#webhook-notifications
thanks, I will look into the accessiblilty, but why can't I see these events in the log, even if they are failed
You're referring to logs in the Dashboard or something else?
and how can I send these events separately for each webhooks, there are two kind of charges
Are these the logs you're referring to? https://dashboard.stripe.com/events/evt_3PPnSiF9VtVx6MBB2G9BE4GK
Not exactly. Any account webhook configured to receive charge.succeeded events will receive all charge.succeeded events generated on your account. Any event processing will need to be done in your handler code directly
It just stuck at loading on my end, but here is what I see on the log
here is what I see on my end
Ah, okay, you're using Workbench
yeah, how can I get out of Workbench
You can toggle it off under https://dashboard.stripe.com/settings/early_access
I don't think I have time to learn it yet
thanks
ok, for this point, event if we have two different charges, all the webhooks will receive the charge.succeeded events on any type of the charges went through?
I don't think that's the case when we did tests on localhost
What do you mean by "two different charges" exactly?
we have two different checkout pages built from Stripe checkout, for two different purpose
As in there are two different Prices used for those Checkout Sessions?
two different checkout URLs, different prices, different line_items
Got it. That won't matter since the events triggered by those actions will be the same: charge.succeeded, checkout.session.completed. It'll be up to your webhook handler code/logic to parse the checkout.session.completed event to look at the line_items for that particular event
also, seems one is successfully delivered, and another failed, even though these two are next to each other
ok, I will look into that too
why can't I see these events in the log though?
doesn't matter if it's successfully delivered or failed
Now that you've turned off Workbench, type evt_3PPnSiF9VtVx6MBB2G9BE4GK into your search bar in the Dashboard and select "Jump to event..."
ok, I'm talking about this event evt_1PQF4xF9VtVx6MBBZENOMrHP
the event you referred actually sent to the right webhook and successed
Stripe didn't deliver evt_1PQF4xF9VtVx6MBBZENOMrHP to any webhooks because none of the enabled, live mode webhooks on your account are configured to receive application_fee.created events
give me a second, let me check the enabled webhook events for this webhook which generated this application_fee
the webhook listens to these 6 events, which generated this application_fee
now, the application_fee is successed, but the webhook events never triggered and logged
that's where I'm confused
application_fee.created events are another Event type, like account.updated and the other five in the screenshot above. Since application_fee.created isn't in the list above, we never send events of this type to this endpoint. Does that make sense?
yes, but without charge.succeeded and check.session.completed, there won't be any applicaiton_fee.created
the application fee is part of the charge occured
and it worked as expected during our testings in localhost
That's likely because you have a test mode webhook that's listening for application_fee.created events in addition to other event types: https://dashboard.stripe.com/test/webhooks/we_1Nik6zF9VtVx6MBBrmxWRuxT
these are from the same checkout page
Okay, let's pause to make sure we're on the same page.
Can you restate your question in 1-2 sentences and let me know where you're blocked/what's unclear?
ok, let me clarify as much as I can
we are working with connect standard accounts and use a checkout page from Stripe to process payments for these connect accounts,
once a customer is charged, means, charge.succeeded and checkout.session.completed, we take part of the charge as application_fee
now, in the log, we only see application_fee, but don't see charge.succeeded and checkout.session.ompleted
and our webhook for these transactions never received the feedback for these charges regarding charge.succeeded and checkout.session.completed
so our functions to further process these payments never got triggered
And things are not working as expected in live mode, correct?
yes
I think the issue here is that there are no live mode Connect webhooks.
There are two types of webhook endpoints :
- Account webhooks: these are used to listen for events that happen on your platform account
- Connect webhooks: these are used to listen for events that happen on your connected accounts
Your platform has a single Connect webhook configured but it's for test mode events only and it's currently disabled.
Right, and both are "Type: Account"
Yep!
I recommend reviewing this: https://docs.stripe.com/connect/webhooks
Connect type webhooks will receive event payloads that include an account property. This will let you determine which standard account that particular action was triggered on
ok, where did you find this?
oh, I found it
If you toggle "test mode" in your Dashboard
one question, can I change the webhook type from account to connect then?
or do I have to setup a new one
No, you'll need to create a new endpoint on Stripe (via the API or Dashboard) but you could use the same URL for it.
If you go this route, it could get messy if you don't disable the old account webhook on Stripe first or if your webhook handler logic isn't ready to receive the Connect-type payloads
Got you, thank you so much! let me dig into it, I will probably process differnet events on these two types of webhooks, but thank you! you are obviously a pro ๐
Have a great day there!
You too! Glad to help ๐
kevin_connect-webhooks
ok, when using dashboard to create a webhook, I don't see anywhere where I can choose Type, either for Account or Connect
how to set the type to Connect when setting up a new webhook?
what do you see when you click on "Add endpoint"?
it's right there in the middle with the Listen to option
those are events that needs to be listened to
no?
in the middle of your picture on the left there's literally a radio button asking if you want Events on your own account or connected accounts
ah, see it now, haha, sorry
All good, this is not the best UX. I have given that feedback before ๐
I don't know how I missed that
If you ask me it should be a multi-screens flow and the first one would be that question
Thank you very much, all good, it's my bad lol
Happy to help. Genuinely I explain this once a month minimum and I'm just one person on this server. Such a weird UI we picked here ๐ฆ
Thanks man, you guys are truely helpful here
thank you ๐