Open dan-massey opened 1 month ago
Makes sense and is very much less than ideal. Are there any other settings beyond webhooks that you're looking to test between versions?
Thanks for taking a look @benhodes-stripe
One other possible improvement to the webhook flow:
stripe listen --forward-to localhost:/webhook
to forward my webhook to my local dev server and stripe trigger {{EVENT_NAME}}
with some flags to trigger a Connected Account event (even though everything is happening on one account), that would also solve the problem I think.The only other related challenge is then testing frontend development, when the frontend is displaying values that have been generated by my backend in response to the webhooks. Because these events are related to the test account where I have run my external test, I can't run stripe apps start
in that account as I'm making changes. So that also means that for each iteration I need to upload a new version and set it as being used for the external test (rather than hot reloading).
Is your feature request related to a problem? Please describe. As far as I can figure out, it isn't possible to develop and test webhook endpoints locally which need to receive connected account events.
For example, if I have a Stripe App that has a backend hosted elsewhere, to develop views locally I can run
stripe apps start --manifest stripe-app.dev.json
. Requests can be sent to a server running on localhost and it's easy to do iterative development because both my server and the Stripe App hot reload as I'm working.For my webhook endpoint, running on localhost, I can send events using the Stripe CLI, but these are not Connect Webhooks but they are missing the
account
field that would be present in a deployed app.So, instead, to test my webhook endpoint the steps I have to follow are:
"distribution_type": "public"
stripe login
to it through the CLIstripe apps upload
) and wait for the upload to be processed (this is usually very quick!)Then for every iteration I need to redeploy my backend and re-upload the Stripe App, generate a new installation link, reinstall the app, etc.
Describe the solution you'd like
stripe apps start --manifest stripe-app.dev.json
it would be great if the app was installed and ran in a different (test) account to the account where the app is uploaded (perhaps one I could specify), so that events generated in the test account could be received by a Webhook Endpoint in the Platform accountstripe apps upload
with a CSP that allows calls to localhost would be great, because that would at least mean I didn't have to redeploy my backend to the cloud.Describe alternatives you've considered