stripe-cli icon indicating copy to clipboard operation
stripe-cli copied to clipboard

INFO Warning: You're attempting to listen for "*", which isn't a valid thin event or preview event

Open itsjoeconway opened this issue 4 months ago • 4 comments

Issue

Listening for all thin events triggers warning, does not forward thin events.

Expected Behavior

Following the documentation in both https://docs.stripe.com/cli/listen and Stripe Dashboard Workbench/Webhooks/Overview/Set up local listener/Advanced Options suggest using '*' as an argument to --thin-events, e.g. stripe listen --thin-events '*' --forward-thin-to localhost:4242/webhook

I expect that I receive thin event webhooks to that address and I don't receive a warning. However, I do receive a warning and I do not receive webhooks. The same address works using --forward-to argument.

Steps to reproduce

Enter the command as shown in the documentation.

Traceback

stripe version
stripe version 1.29.0

stripe listen --thin-events '*' --forward-thin-to localhost:3000/stripe-webhook
[Fri, 22 Aug 2025 08:39:32 PDT]  INFO Warning: You're attempting to listen for "*", which isn't a valid thin event or preview event

> Ready! You are using Stripe API Version [2025-07-30.basil]. Your webhook signing secret is ----.

2025-08-22 08:36:07   --> customer.updated [evt_1Ryx0dGfwWrHI2ZUh60SvFQb]
2025-08-22 08:36:07   --> test_helpers.test_clock.created [evt_1Ryx0dGfwWrHI2ZUaylJS8iK]
2025-08-22 08:36:11   --> invoice.upcoming [evt_1Ryx0gGfwWrHI2ZUFwVRIQwW]
2025-08-22 08:36:11   --> customer.subscription.trial_will_end [evt_1Ryx0hGfwWrHI2ZUlPzVkWUA]
2025-08-22 08:36:13   --> invoice.created [evt_1Ryx0jGfwWrHI2ZUPLrNb1U0]
2025-08-22 08:36:13   --> customer.subscription.updated [evt_1Ryx0jGfwWrHI2ZULq1b0V49]
2025-08-22 08:36:18   --> test_helpers.test_clock.ready [evt_1Ryx0oGfwWrHI2ZUfhplcDwB]

Note that webhooks are not printing a status code to indicate they received a response.

Environment

macOS. Note use of 2025-07-30.basil and cli 1.29.0.

itsjoeconway avatar Aug 22 '25 15:08 itsjoeconway

Hey @itsjoeconway! I think that warning can be safely ignored (for context, * is technically a valid time for snapshot events but we have a similar pattern to simplify testing for thin events)

What events are you trying to generate? I just did a quick test locally and saw things working:

➜ stripe listen --thin-events "*" --forward-thin-to https://localhost:3000
[Fri, 22 Aug 2025 08:50:57 PDT]  INFO Warning: You're attempting to listen for "*", which isn't a valid thin event or preview event

> Ready! You are using Stripe API Version [2022-11-15]. Your webhook signing secret is --- (^C to quit)
2025-08-22 08:51:03   --> billing.meter.created [evt_1RyxF5QtYsBuPA41WPOFt33f]
2025-08-22 08:51:13   --> v1.billing.meter.error_report_triggered [evt_test_65T8LCbppgzZfNyldz016PUUSqGsSQsRAhW8UVYO4K04LY]

Could you also share the account id? Thin events only work in sandboxes (not test mode) so I wonder if that might also be at play here.

edit: I'm also on macOS using 1.29.0 + 2025-07-30.basil

tomer-stripe avatar Aug 22 '25 15:08 tomer-stripe

Thanks for fast response @tomer-stripe. I am using sandbox on account acct_1RYZ7mK2z9BKXIon. My assumption is that all events will be sent as thin events, is that inaccurate? Some of the events I am anticipating reacting to are anything in the customer.subscription.* and invoice.* namespace. I do see them in the console, but I am not seeing them forwarded to my listener on localhost:3000. Before attempting to use thin events, I was able to receive events to my listener on localhost:3000 using --forward-to.

itsjoeconway avatar Aug 22 '25 16:08 itsjoeconway

Ah no, sorry for the confusion there! Only some events exist as thin events right now. So the customer.* events you were listening to in your original message only exist as snapshot events, not thin events (the v1.billing.meter.error_report_triggered on my message is a thin event).

There's a second note here that the CLI always listens for snapshot events (the non-thin ones) even if you only request thin events, that I'm planning to clean up, but thin events currently do not exist for customer.*.

tomer-stripe avatar Aug 22 '25 20:08 tomer-stripe

I think all of the current list of thin events is here: https://docs.stripe.com/api/v2/core/events/event-types?api-version=2025-07-30.preview&rds=1

tomer-stripe avatar Aug 22 '25 20:08 tomer-stripe