Summary:
Manually setting up a new Stripe webhook and selecting each event is is rather tedious. This makes it a lot easier.
Description:
There's no way to copy/paste all the required webhook events into Stripe and enable them in one go. I have made a feature request to Stripe, but in the mean time we can use this trick instead.
When creating a new webhook, I noticed Stripe automatically updates the URL to include each selected event. So I thought: why not provide the full list of events we need and see if those are automatically added when the page is loaded. And guess what, they are!
So we can link to https://dashboard.stripe.com/webhooks/create?events=comma,separated,list,of,events and those events will be be pre-selected. Comma's need to URL encoded. (%2C). Clicking this link does nothing to the user's Stripe account. Nothing is automatically saved. It simply pre-selects each event as shown in the screenshot.
Testing:
I tried clicking the link and it works for me. See screenshot.
Screenshots (if applicable):
Checklist:
[x] Code follows the project's coding standards
[x] Tests have been added or updated to cover the changes
[x] Documentation has been updated (if applicable)
Pull Request
Summary: Manually setting up a new Stripe webhook and selecting each event is is rather tedious. This makes it a lot easier.
Description: There's no way to copy/paste all the required webhook events into Stripe and enable them in one go. I have made a feature request to Stripe, but in the mean time we can use this trick instead.
When creating a new webhook, I noticed Stripe automatically updates the URL to include each selected event. So I thought: why not provide the full list of events we need and see if those are automatically added when the page is loaded. And guess what, they are!
So we can link to
https://dashboard.stripe.com/webhooks/create?events=comma,separated,list,of,events
and those events will be be pre-selected. Comma's need to URL encoded. (%2C
). Clicking this link does nothing to the user's Stripe account. Nothing is automatically saved. It simply pre-selects each event as shown in the screenshot.Testing:
I tried clicking the link and it works for me. See screenshot.
Screenshots (if applicable):
Checklist:
Additional Notes: Feel free to change the text.