#karsh-cli
1 messages · Page 1 of 1 (latest)
When I leave out the --stripe-account flag I see the webhook under Developers → Events
you need to listen to Connect events, since all the events live on the connected account, not your platform
if you use CLI it's stripe trigger --forward-connect-to
So just by putting that flag, without a value - it should send the event to the main account? And then I DO need to inclue the --stripe-account flag as well?
no, it needs a value, the URL to send the events to.
I'd suggest reading my first link as it's crucial to understand how events and webhooks work with Connect
Thanks, I've seen it before but will read it thoroughly again now first
And then I DO need to inclue the --stripe-account flag as well?
yes, that's how you create objects on the connected account
interacting with those objects then generates events, which live on the connected account
so an endpoint on your account doesn't get those events. Which is why you need a seperate endpoint that listens to events happening on connected accounts, those events are forwarded to that
ahhh it's starting to make sense to me now...
sorry, still a bit confused.
- I am now using
stripe listen --forward-to localhost:8100/webhooks/stripe/ - I'm sending this trigger (so it includes the stripe account:
stripe trigger payment_intent.succeeded --stripe-account=acct_1K**4X0 --add payment_intent:metadata[products]=22
So this is what I am expecting:
-
This payment intent is being created on the connected account
**4X0as I can see in this screenshot (I am viewing through the connected account's dashboard)
The id of the event is:pi_3KK0Ys4EUUkwe4X01jy7cpQq -
It sends an event to our platform account, which I can see on the same page still (screenshot 2)
-
But I can't see the even in the dashbaord of the platform account (screenshot 3)
- But I can't see the even in the dashbaord of the platform account (screenshot 3)
yep that's entirely normal
you never will. The event is not on your platform account, it's on the connected account, it's in their dashboard.Your platform can set up an endpoint to receive a webhook fo the event, but it's not an object on your account so it doesn't show on your own dashboard.
fair enough, thanks for clearing that up!!
So the proper way to find out what my server has send in response to this event is by checking the dashboard of the connecteda ccount? Because that's the only place I can find it right now. Or is it also somewhere in the platform account?
if you go to https://dashboard.stripe.com/test/webhooks on your platform and click and endpoint it shows a history of events too
But that doesn't work for the CLI does it? I can't click on the local listener there
Ah good point, I should make sure I'm logging this as well.
Thanks, appreciate the help!
Last question, what's the difference between these two? They seem identical in my use case...