#tonyball333-webhooks
1 messages · Page 1 of 1 (latest)
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.
I get the following when I try that
but I do understand the logic of what you are saying
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?
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?
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
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
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?
that's easiest yes
like have a connected account you just use for testing
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
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
yep! if you use either of the guides at https://stripe.com/docs/connect/oauth-standard-accounts or https://stripe.com/docs/connect/standard-accounts that's what they set up
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?
yeah in real webhooks there's a quirk that sends test mode events to live mode endpoints (mentioned on https://stripe.com/docs/connect/webhooks#connect-webhooks) which can be relied on but doesn't apply to stripe-cli