#tryhardeng_webhooks
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1451637561213718738
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
with the value --forward-to for the correct webhook, only 1 webhook works
I mean, I can run twice:
We have 2 "webhooks", endpoints.
Which one only handle connection events, the other one only handle the payments.
In dev env works well. Last time here you and the other guy helped me
And works correctly. But I have been some issues with some events in local that doesn't come
It's seems like only one works in local, the first one I run
The second one runs well in local, but it doesn't send events to my local endpoint
And in webhooks section in my sandbox, you can only see 1 webhook to local
That is the first command I run
Not the second
So you're using two local listeners?
So what I do is:
- If I will connect some stripe account in my system, I stop the 2 local listeners, and onyl run one.
- When I finish my connection I stop that listener and run the other one
Yeah exactly
I thought the other day that is possible
In the terminal I don't get any warning message
But this is tired
So that's why I'm back to your discord haha
To know if I'm missing something?
I supposed that my 2 listeners should be here:
But only the first listener I run is showed up there
So last week I had problems with some events in local, and I realiazed this stuff. I stopped my first listener, run the other one, make the same process again
And worked
So is weird
testing somethign really quick
sure, thanks bro.
So this should be doable with just one instance of stripe cli local listener
sure? because I remember you told that but didn't work. And other guy told me that I need --forward-to exactly the endpoint
And that worked
So I started use 2 listeners, but the 2nd listener not works
I need stop one, start other, and viceversa
i'm currently getting a working result with just one.
but how?
Example, my api is running in:
localhost:8000
My 2 endpoints are:
/api/webhook/stripe/connected-accounts
/api/webhook/stripe/subscription-processing
How your listener is configured to forward to the exactly endpoint?
That's my question
is similar to this post
I'm not
My Local listener is running this exactly
stripe listen --forward-to localhost:4242
I have my standard endoint at /webhook and my connect is at /connect-webhook.
And i'm able to receive events for both endpoints
really? I mean, how? because if I do that exactly as you
I didn't receive anything, until define the forward to
Let me test again, 1s
1s sorry
I'm checking some stuff before test the single listener
Sorry , 10m max
no worries we'll be here ๐
I'm so sorry, I just realized I had a tunnel running as a background service on my machine that might have been conflating my results.
I'm still testing but that might be the case. Let me struggle with this for a minute before I have you commit to putting that effort.
Thanks, anyway I tested and didn't work:/
So is pretty sure that we can't have 2 terminal instances running stripe listen at the same time because stripe only take the first listener:/
yeah, I was playing with some additional arguements, it seems it will forward both connect events and platform events to whatever listener is run first
yes .. u.u
I def think this would be something worth filing some product feedback for.
Is probably that the stripe listen function was coded when you only allowed 1 webhook/destination?
And when the dev team added the 1-N webhook/destinations feature
They forgot modifty this CLI function?
modify*
Yeah i'd have to ask around for some of the historic context.
My apologizes again, I think I may have set a tunnel to launch as a background process on boot for testing other things and it slipped my mind.
Nah no problem. So for now to don't waste my time configuring some tunnel, I'm gonna still stopping one listener, then run the other one, etc
At the moment this works for me, to don't configure some endpoint in my local api that forward to the correct endpoint, or configure some tunnel, etc.
I did find one thing stripe listen --forward-connect-to will only listen to connect events and won't forward platform events
but the stripe listen --foward-to will forward both platform and connect
I read something like that here
But I haven't tested, the OP says that doesn't work
ok I found it
In my case I need the --forward-to, because while I'm developing in dev, sometimes I connect some stripe accounts to some local accounts
stripe listen --load-from-webhooks-api --forward-to localhost:8000
and in other proccess I just buy a subscription of some user in local, etc
ok, let me listen it
check it
just run one listener, don't specify the endpoint and that flag will route them to the endpoints accordingly
ok let me test, if this works
bro, I'm the dumbest guy
Because the docs has that explicit
XDD
1s, testing.
nah, I'm just now learning that flag myself. Don't be hard on yourself : p
when testing though both will be using the same signing secret so keep that in mind.
yeah, I'm testing right now
it seems like works @terse basin
I'm receiving events to the 2 webhooks without problems
Thank you man, I promise you, next time I will read EVERY PARAGRAPH of each documentation HAHA
it can't be possible, why I didn't see that lol
Thank you agian!
again*
No worries! I totally passed over that one myself, i guess the flag's name didn't jump out at me. Glad we could help!