#anubhav-webhook

1 messages ยท Page 1 of 1 (latest)

dreamy iris
#

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

livid hawk
#

Sure. acct_1KEw7YSHtMEHlTkI

dreamy iris
#

let me test this out, i'm not certain you can listen for production events using the Stripe CLI

livid hawk
#

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

dreamy iris
#

that's the test page though

#

you can see that the url contains test

livid hawk
#

I have added the new URL and the events which I want the webhook to listen to

livid hawk
dreamy iris
#

ah okay, onesec

#

looking at your account, you haven't done any payments since 9 Jan right?

livid hawk
#

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)

dreamy iris
#

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

livid hawk
dreamy iris
#

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?

livid hawk
#

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

dreamy iris
#

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?

livid hawk
#

any payment made goes to that corresponding connected account

dreamy iris
#

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

livid hawk
#

Ohk, I'm not sure if I selected that. I'll add a new endpoint and see if it works

dreamy iris
#

the Type will say Direct if you didn't select that checkbox

pliant niche
#

@livid hawk I'll take over this thread, give me a sec to catch up

livid hawk
dreamy iris
#

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

livid hawk
dreamy iris
#

you're welcome, feel free to reach out again if you have any questions!