Document what to do when webhook deliveries return a 3XX status code
- In the webhooks documentation, explain what to do if the status code returned is a redirection (3XX) status code.
- In the webhooks deliveries list, add a tooltip/link to this documentation if the status code is a 3XX status code
Original issue
Description
I have an API that host at Vercel and then I config Polar's webhook with it
URL: https://{DOMAIN}/api/webhook-polar
Then all webhook requests receive a 307 from my API.
Then I changed the URL to https://www.{DOMAIN}/api/webhook-polar and all the webhook requests now receive 200 from my API
The root cause is because Vercel has a redirect from non-www to www, so I think this should be automatically handled by Polar to prevent this case.
Current Behavior
Polar dashboard show all webhook request call return 307 and count as failed request
Expected Behavior
Webhook's request should receive 200 from my API
Screenshots
N/A
Environment:
- Operating System: macOS
- Browser (if applicable): Chrome
Follow redirections in the context of webhooks is not a common practice, and could be considered as a security risk. Stripe, for example, don't do it.
As you mention, the fix on integrator's side is easy: just point to the actual/final URL.
How about add a message to guideline user about this ?
Well, why not 👍