#Kamon
1 messages ยท Page 1 of 1 (latest)
It seems like the stripe trigger {{EVENT_NAME}} command only works for non-connected account events
๐ Checking it now
Thanks!
https://stripe.com/docs/connect/webhooks#test-webhooks-locally
For Connect webhooks, use --forward-connect-to with stripe listen and --stripe-account with stripe trigger.
Correct, that's what I'm doing, but it doesn't specify how to trigger connected account events
There are two steps here:
- Set up forwarding connect event to localhost with
--forward-connect-to - Trigger event on connected account with
--stripe-accountthat includes connected account ID
Could you share which commands that didn't work for you?
No problem! Happy to help ๐
Hrm, having an issue still.
When running stripe trigger --stripe-account {{ACCOUNT_ID}} account.updated I get the following error:
Connect platforms cannot create new accounts on behalf of their connected accounts.
The account id that I'm using is valid and has onboarded
After checking triggering account.updated event will create new connected account ID and perform update. It can't be triggered on existing connected account ID
That's weird. That only happens with the CLI, correct?
I'm looking to test webhook events to check when the payouts_enabled field changes on a connected account
If it creates an entirely new account each time....that's kind of weird, don't you think?
Not sure how I'd even test that functionality
Yup! trigger in CLI is simply for testing purpose when you don't have any integration setting up.
If you wish to test account.updated on the existing connected account ID, it can perform via API such as completing onboarding process
Gotcha!
Is there a way to disabled/enabled payouts for a connected account so I can test that functionality?
One quick way is to test through Dashboard. The steps will be:
- Go to https://dashboard.stripe.com/test/connect/accounts/overview
- Select the target connected account
- On the top right corner with
..., selectPause payouts
This will only work for connected account that has payout enabled
Perfect, you rock!
Now, one last thing:
Does the stripe listen --forward-to method when you're forwarding to your localhost, forward actual events happening for live/test accounts?
or is it only for events triggered via the CLI?
I need to head out, but please still respond if you can.
Thanks in advance for all of your help!
Have a good night ๐
Thanks for waiting!
Does the stripe listen --forward-to method when you're forwarding to your localhost, forward actual events happening for live/test accounts?
If you have--forward-tosetup, the event will be forwarded to the localhost. By default, it only forwards test mode events unless--liveis specified: https://stripe.com/docs/cli/listen#listen-live
or is it only for events triggered via the CLI?
listencommand will listen events on your account regardless whether it's triggered by CLI or API