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

Can't update enabled_events for webook_endpoints

Open roldengarm opened this issue 1 year ago • 1 comments

The more information we have the easier it is for us to help. Feel free to remove any sections that might not apply

Issue

I'm trying to update the enabled_events property on a webhook_endpoint. I'm getting this error: unknown flag: --enabled_events

Documentation is here

wh_id=<webhook_id>
stripe webhook_endpoints update $wh_id --enabled_events='["account.updated", "customer.subscription.deleted", "customer.subscription.updated", "customer.updated", "invoice.payment_failed"]'

I've also tried --enabled_events="['*']"

Expected Behavior

Enabled events is updated to the events I pass in.

Steps to reproduce

Run script above.

Environment

Select one of: macOS, Linux, Windows, Other

Windows, version 1.18 of the CLI

roldengarm avatar Nov 19 '23 20:11 roldengarm

After trying a bit more and checking the help, found out it's a documentation error. The parameter is enabled-events. Also had to trial & error to pass in multiple events as an array did not work. In the end landed with this:

stripe webhook_endpoints update $wh_id --enabled-events='account.updated' --enabled-events='customer.subscription.deleted'  --enabled-events='customer.subscription.updated' --enabled-events='customer.updated' --enabled-events='invoice.payment_failed'

roldengarm avatar Nov 19 '23 20:11 roldengarm

Ah yea, sorry about that! The API reference only lists the fields for the API request/response itself, it doesn't change based on the CLI or API ref. Will pass this feedback on to the team

tomer-stripe avatar Apr 17 '24 16:04 tomer-stripe