#karsh-cli

1 messages · Page 1 of 1 (latest)

soft shard
frozen hill
#

When I leave out the --stripe-account flag I see the webhook under Developers → Events

soft shard
#

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

frozen hill
#

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?

soft shard
#

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

frozen hill
#

Thanks, I've seen it before but will read it thoroughly again now first

soft shard
#

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

frozen hill
#

ahhh it's starting to make sense to me now...

#

sorry, still a bit confused.

  1. I am now using stripe listen --forward-to localhost:8100/webhooks/stripe/
  2. 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:

  1. This payment intent is being created on the connected account **4X0 as I can see in this screenshot (I am viewing through the connected account's dashboard)
    The id of the event is: pi_3KK0Ys4EUUkwe4X01jy7cpQq

  2. It sends an event to our platform account, which I can see on the same page still (screenshot 2)

  3. But I can't see the even in the dashbaord of the platform account (screenshot 3)

soft shard
#
  1. 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.

frozen hill
#

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?

soft shard
frozen hill
#

But that doesn't work for the CLI does it? I can't click on the local listener there

soft shard
#

true

#

but stripe listen has its own logs(and your server might have some too)

frozen hill
#

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...