Sandboxes and local webhook forwarding

Hi all, I can’t set up webhook forwarding with sandboxes. I followed the official guide to test webhooks: Receive Stripe events in your webhook endpoint | Stripe Documentation

stripe login
stripe listen --forward-to localhost:4242/stripe_webhooks

Local webhook triggering with “stripe trigger” works, but real API actions don’t trigger any webhooks. The same works well with legacy test environment.

Did anyone managed to set up webhooks with sandboxes?
Thanks

@tibor this doesn’t work for sandboxes yet, but it’s in the team’s plans.

In the meantime, you can run this command:
stripe listen --api-key <sandbox api key>

It works, but you have to prefix the command with preview (see my post):

stripe preview listen --forward-to http://localhost:4242/stripe_webhooks