#Att89-webhook
1 messages · Page 1 of 1 (latest)
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.
Yes I confirm I see "Failed to connect to remote host". Do you have some firewall that could prevent Stripe from reaching your server?
But shouldn't this also triggered locally?
what do you mean?
The server under the address does not running at the time. I must test this somehow running the server locally and trigger the event with the CLI via stripe listen
I thought, the events would be also sent via the stripe CLI listen
account.updated for example have worked
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.
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.
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
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
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 havestripe listenrunning, and you see an event being triggered in your dashboard but it doesn't appear in the CLI?
Yes, that's the problem
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?
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
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?
Can you share the Event ID that the CLI generated?
evt_3LD39n2Y94LZIFzF151EYVGn
This event was only a test event triggered via stripe trigger payment_intent.succeeded --stripe-account acct_xxxx
What is it you're actually trying to test?
What is the actual account ID in this context?
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.
Do you mean our platform account ID or the certain connect account ID the payment intent is for?
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 isacct_1JNcllFHLvSMgLRW, then that sounds wrong
exactly
What listen command are you using?
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.
Well, you should consolidate them to a single stripe listen command tbh (I don't think that's the issue though)
Is it possible to connect both? I mean command both in one command?
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
Aah, ok thank you, i will try it
Did that help?