#tonyball333-webhooks

1 messages · Page 1 of 1 (latest)

craggy thorn
#

hi, reading

#

In the 2nd window I start up StripeCLI , login with the connect Test API key, and issue the call stripe trigger payment_intent.succeeded

that's not really the right way to do this

#

just stay logged in as your platform and do stripe trigger <event> --stripe_account=acct_xxx

#

doing it the way you say by logging in to the connected account directly(or using their deprecated access token API key) probably breaks things, that's not the recommended way to do this set up.

calm echo
#

I get the following when I try that

#

but I do understand the logic of what you are saying

craggy thorn
#

stripe-account I think then

calm echo
#

Trigger succeeds now but not seeing the webhook appear in the first window. Can you confirm that the Listen commend in the first window needs to be stripe listen --forward-connect-to localhost:44398/StripeWebHooks and not stripe listen --forward-to localhost:44398/StripeWebHooks because my triggers are coming from a connected account?

craggy thorn
#

yep

#

what's the event ID evt_xxx that was generated by the way so I can look at logs in case I see anything?

calm echo
#

The last one that I generated (i.e. after applying the changes you recommended was evt_3KyaO9Cu7suvALiy1404FazM)

#

So I have a situation where my 2nd window is logged into the platform and the trigger commands are getting picked up in my test connected account. I am just not seeing any activity in the 1st window that is logged into the platform account and using the command stripe listen --forward-connect-to localhost:44398/StripeWebHooks

craggy thorn
#

ah right it's because this is a 7 year old account and test/live mode weirdness

#

basically it's because you don't technically have a test mode connection to that connected account,. You're able to make test mode API requests because that's how this works for legacy reasons but your platform doesn't actually receive webhook events from test mode, only live mode

#

the easiest solution is to test on a different account you create today using test mode or using OAuth with the test mode client ID, instead of doing tests using the test mode of this production account. If you have to do it on this account, you'd have to go through https://stripe.com/docs/connect/oauth-standard-accounts with the account holder, using the test mode client ID, to set up a test mode connection

calm echo
#

Is the issue with the test connected account or the platform account? They are the same age i.e. 7 years old

#

The connected account is purely for our development and testing.

#

i.e. to mimic one of our customers

#

Are you recommending that I create a new test connected account?

craggy thorn
#

like have a connected account you just use for testing

craggy thorn
# calm echo Is the issue with the test connected account or the platform account? They are t...

it's basically because back when you set it up, OAuth was the default and it has legacy quirks like giving you test mode API access when you connect in live mode but without a distinct testmode 'connection'(which is an internal object in our systems), and sending you test mode events to live mode webhook endpoints. stripe-cli came along a few years ago and doesn't really handle that legacy set up well so it doesn't forward events in that case

calm echo
#

Can I create a test mode only Stripe connected account for this? i.e. that I don't have to go through all the authorisation and connection to a real bank account

craggy thorn
calm echo
#

Ok Thanks. I presume that this issue is just related to StripeCLi i.e. I could create a test webhook on the platform that would fire events coming from my current (7 year old) connected account running in test mode?

craggy thorn