#Att89-webhook

1 messages · Page 1 of 1 (latest)

fresh moss
#

Hi there!

#

Can you share an event ID (evt_xxx) that failed?

dusky jay
#

Hello 🙂
my account ID is acct_1JNcllFHLvSMgLRW and the event ID is evt_3LD2qr2UvIT7LPpE0a85ycZX

#

The real server does not running at the time, so the "Failed to connect to remote host" is because of this.

fresh moss
#

Yes I confirm I see "Failed to connect to remote host". Do you have some firewall that could prevent Stripe from reaching your server?

dusky jay
#

But shouldn't this also triggered locally?

fresh moss
#

what do you mean?

dusky jay
#

I thought, the events would be also sent via the stripe CLI listen

#

account.updated for example have worked

fresh moss
#

I'm not sure I follow. What where you expecting to see?
If your server is not running, it's expected that the webhook endpoint shows "Failed to connect to remote host". Whether or not you are using stripe listen --forward-connect-to ... doesn't change that.

dusky jay
#

I understand, but is there a way to trigger that event via the cli, so I can proof my implementation first in debug mode locally?

#

I mean even if the real webhook event fails, because the real server is unavailable.

fresh moss
#

In your first message you said this works, no?

I'm forwarding the webhook events with the Stripe CLI with
stripe listen --forward-connect-to localhost:PORT/stripe/connect-webhook
If I trigger a test event with
stripe trigger payment_intent.succeeded --stripe-account acct_xxx
it works and my server program logs the event

dusky jay
#

Yes, this works, but I don't get that certain payment_intent.succeeded event if triggered.

#

I thought, when the CLI listen is running, my PC is connected locally to the stripe API, so that if an event gets triggered there, it will be alse forwarded to my local test environment

fresh moss
#

I thought, when the CLI listen is running, my PC is connected locally to the stripe API, so that if an event gets triggered there, it will be alse forwarded to my local test environment
Yes that's true. So you have stripe listen running, and you see an event being triggered in your dashboard but it doesn't appear in the CLI?

dusky jay
#

Yes, that's the problem

fresh moss
#

can you share the ID of an event that you do see on the CLI, and the ID of an event you don't see?

maiden sapphire
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

dusky jay
#

Hello! Thank you, I think, I have found the problem:
stripe trigger payment_intent.succeeded --stripe-account acct_xxx
only triggers somehow the platform webhook and not as expected the connect-webhook. Is this normal? The payment intent which was succeeded, is on a connect account and not on our platform. I thought in this case the connect-webhook is the one, which should be triggered. I'm a little confused, to be honest.

#

Is this only because using stripe CLI, or must I implement the same behaviour also on the platform webhook, to be sure?

maiden sapphire
#

Can you share the Event ID that the CLI generated?

dusky jay
#

evt_3LD39n2Y94LZIFzF151EYVGn

#

This event was only a test event triggered via stripe trigger payment_intent.succeeded --stripe-account acct_xxxx

maiden sapphire
#

What is it you're actually trying to test?

#

What is the actual account ID in this context?

dusky jay
#

I have a payment_intent on a connect account. If this succeeds, I try to catch the event on the connect webhook, to do some afterwork in our database and mark the payment also there as succeeded. The problem is, there is no event coming in.

dusky jay
maiden sapphire
#

Well, both. All I see is acct_1LD3542Y94LZIFzF which the PI was created for, which is connected to acct_1JNcllFHLvSMgLRW

#

only triggers somehow the platform webhook and not as expected the connect-webhook
If the platform in this instance is acct_1JNcllFHLvSMgLRW, then that sounds wrong

dusky jay
#

exactly

maiden sapphire
#

What listen command are you using?

dusky jay
#

stripe listen --forward-to localhost:5972/stripe/webhook and
stripe listen --forward-connect-to localhost:5972/stripe/connect-webhook

#

First one for the normal webhook and the second one for the connect webhook

#

And I would expecting, that if the payment_intent for the connect account succeeds, the connect-webhook should be triggered.

maiden sapphire
#

Well, you should consolidate them to a single stripe listen command tbh (I don't think that's the issue though)

dusky jay
#

Is it possible to connect both? I mean command both in one command?

maiden sapphire
#

Yeah, they're just flags: stripe listen --forward-to localhost:5972/stripe/webhook --forward-connect-to localhost:5972/stripe/connect-webhook

#

Maybe that helps. Let me know

dusky jay
#

Aah, ok thank you, i will try it

maiden sapphire
#

Did that help?