#tyler_webhooks

1 messages ยท Page 1 of 1 (latest)

modest canyonBOT
#

๐Ÿ‘‹ 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/1230157318201544734

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

low jasperBOT
livid rock
#

Can you share more about why you don't think these events should've been sent?

One event was sent for when invoice in_0P6Yhd3MFIk84T3nF8aotL6e finalized and was paid
The other event was sent for when an invoice item was added to in_0P6YoF3MFIk84T3nPFbm56Tp when you made this request: https://dashboard.stripe.com/test/logs/req_LburXkcamJor3I

#

@nova fox you're in the wrong thread

low jasperBOT
civic sage
#

hi @livid rock

#

when you look at each of the events you see two webhooks were processed though

livid rock
#

Are you running stripe listen in multiple console sessions by any chance?

civic sage
#

that was my initial thought but I'm not

#

tylerpuleo@TylerPuleoMBP ~ % ps aux |grep stripe
tylerpuleo 75864 0.0 0.0 407966144 400 s007 R+ 9:57AM 0:00.00 grep stripe
tylerpuleo 68616 0.0 0.1 409475856 33904 s006 S+ 9:44AM 0:00.45 stripe listen --forward-to localhost:8080/status/stripe-webhook

honest burrow
#

In our logs I am seeing the event get sent to a non-CLI endpoint and then a couple of CLI endpoints. I can check in to them but they are all responding individually.

civic sage
#

Are there multiple CLI endpoints that are TylerPuleoMBP

#

It looks like every event is being sent twice. I just got this in the Stripe CLI terminal:
2024-04-17 10:28:08 --> customer.created [evt_0P6ZT23MFIk84T3nOrYm7DD9]
2024-04-17 10:28:08 --> connect customer.created [evt_0P6ZT23MFIk84T3nOrYm7DD9]
2024-04-17 10:28:08 <-- [200] POST http://localhost:8080/status/stripe-webhook [evt_0P6ZT23MFIk84T3nOrYm7DD9]
2024-04-17 10:28:08 <-- [200] POST http://localhost:8080/status/stripe-webhook [evt_0P6ZT23MFIk84T3nOrYm7DD9]

#

And when I go to that event I see my PC responding to the webhook twice

honest burrow
#

Checking those out

#

It looks like some of these are connect endpoints from the CLI

#

A lot of them were created around the same time

#

I will consult a colleague on this and get back to you

civic sage
#

thank you

river lance
#

๐Ÿ‘‹ what version of the CLI are you using?

civic sage
#

1.19.4

river lance
#

Thanks, give me a few mins to look

civic sage
#

thanks

river lance
#

Yeah not able to reproduce what you are seeing

#

Continuing to look, but very strange

river lance
#

AH

#

I believe I did figure it out

civic sage
#

๐Ÿฅณ

river lance
#

I think in the past you actually connected your account to... itself

#

Nearly positive that is the case as I can see that you are connected to your own account

#

Let me see if you can see this in the Dashboard...

civic sage
#

my account as in my stripe account or my webhook listener?

river lance
#

Your Stripe account

#

So you are a platform for yourself

#

Which is why you are seeing both connect and direct Events forwarded at the same time

#

This was likely an accident

#

We don't actually prevent this but there is no real benefit

#

Let me test on my own account and I can make sure this is the reason

civic sage
#

interesting

river lance
#

Hmm actually it seems we do prevent this in the OAuth flow (at least now) as I get the form disabled with:

#

But I do see yours was connected to itself back in January of this year

civic sage
#

Got it. And we're probably not seeing any issues with this currently because our webhooks are only account webhooks?

#

because they're not receiving the connect webhooks

#

but with the cli listen command you receive both connect and account webhooks?

river lance
#

Yes that's correct. The CLI does set up forwarding for both connect and account webhooks

civic sage
#

is there a way to limit the cli to just account webhooks?

river lance
#

No don't believe so...

#

Let me see if there is any workaround

low jasperBOT
river lance
#

Yeah not seeing that be possible at the moment. It does look like it will automatically listen for both and you can't prevent that -- you would essentially have to just filter within your Webhook handler at the moment. I'll file a ticket internally as I do believe we should be limiting the forwarding to just direct webhooks unless you use the --forward-connect-to flag.

civic sage
#

ya if you could create that ticket that would be great. Is it possible to add my email to the ticket so I'm notified when it gets completed?

river lance
#

You would need to write into our Support team (via https://support.stripe.com/contact/login) to get updates on that. And I can't guarantee any sort of timeline.

Overall I'm not positive the behavior will change here... the whole point of the CLI forwarding is to make testing locally easier and you wouldn't really run into the issue you are having if your account wasn't connected to itself.

#

But I'll still file as feedback

#

And perhaps we will either change or add a new flag to allow for only Direct webhook forwarding