#anubhav-webhook
1 messages ยท Page 1 of 1 (latest)
hello @livid hawk, can you share your account id so that I can take a closer look at your setup? You can find your account id by logging in to https://dashboard.stripe.com/settings/account. It'll be in the upper right hand corner and looks like acct_123
Sure. acct_1KEw7YSHtMEHlTkI
let me test this out, i'm not certain you can listen for production events using the Stripe CLI
no no, I think you understood it the wrong way.
I was only using stripe CLI for testing locally, but for production I have added the URL in the Stripe's webhook dashboard : https://dashboard.stripe.com/test/webhooks
I have added the new URL and the events which I want the webhook to listen to
Yes, my web app will be deployed using test mode only because it's a personal educational project
(so only test payments are processed)
ah okay, onesec
looking at your account, you haven't done any payments since 9 Jan right?
yes. I have just used the Stripe CLI to test webhooks locally, where it worked completely fine
but yesterday, when I deployed the web app, the webhook isn't working
(I updated the new url in dashboard, updated the secret key as well)
btw, i'd like to apologize, but i accidentally created a customer on your account, sorry about that
i've deleted it already, but just so you're not alarmed
ohk no problem ! ๐
lets take a step back, when you say your webhook is not working, can you share what you're expecting to happen, but isn't occurring?
the webhook mainly looks for checkout.session.completed event.
If it's successful (i.e. payment is successful ) then it notifies my web app about the same
but, I get no information about the completed payment in deployed version
I was able to listen to the events locally with Stripe CLI
but not in deployed version
alright, i think i may know what's the issue. So i see that you're also making use of Connect and the Checkout Sessions are created on the Connected accounts - is this right?
Yes
any payment made goes to that corresponding connected account
When you add a webhook endpoint, you need to select the Listen to events on connected accounts
If you don't select that checkbox, your endpoint will only listen for events occurring on your own account
Ohk, I'm not sure if I selected that. I'll add a new endpoint and see if it works
@livid hawk I'll take over this thread, give me a sec to catch up
This worked !
Thanks a lot for sticking around with my problem and helping me !!!!! ๐
just wanted to add on before i step away, if you select Listen to events on connected accounts - then it will only listen for events on the connected account
if you need to listen for both events on your connected accounts and your own account, you need to setup two webhook endpoints
Alright thanks a lot for the information!
Stripe devs rock ๐ฏ ๐
you're welcome, feel free to reach out again if you have any questions!