WEBVTT

00:00.096 --> 00:01.225
A customer paid,

00:01.225 --> 00:02.824
but they still can't log in.

00:02.824 --> 00:04.314
Stripe shows the payment.

00:04.314 --> 00:05.588
Your app shows nothing.

00:05.588 --> 00:06.875
One common cause:

00:06.875 --> 00:09.372
your webhook URL redirects.

00:09.468 --> 00:11.126
Stripe does not follow redirects

00:11.126 --> 00:12.701
on webhook deliveries.

00:12.701 --> 00:14.648
Its docs treat redirect responses

00:14.648 --> 00:15.802
as failures.

00:15.802 --> 00:19.420
So a 301, 307 or 308

00:19.420 --> 00:21.528
means your handler never runs.

00:21.636 --> 00:23.258
Surprise redirects usually come

00:23.258 --> 00:24.701
from four places:

00:24.701 --> 00:27.657
http to https.

00:27.657 --> 00:30.085
Apex versus www.

00:30.085 --> 00:31.443
A trailing slash,

00:31.443 --> 00:34.003
which Next.js redirects by default.

00:34.003 --> 00:35.314
Or a broad redirect rule

00:35.314 --> 00:37.500
that catches your webhook path.

00:37.632 --> 00:40.540
Here's the free check at webhookproof.com.

00:40.540 --> 00:41.790
Paste the webhook URL

00:41.790 --> 00:43.161
from your Stripe dashboard,

00:43.161 --> 00:44.254
confirm you own it,

00:44.254 --> 00:45.408
and run the check.

00:45.408 --> 00:47.904
It sends three harmless requests.

00:48.000 --> 00:50.175
This plain http URL

00:50.175 --> 00:51.041
gets flagged as critical:

00:51.041 --> 00:52.711
Stripe requires HTTPS

00:52.711 --> 00:55.547
for live-mode endpoints.

00:55.644 --> 00:56.617
On a demo endpoint

00:56.617 --> 00:57.987
with a trailing slash,

00:57.987 --> 00:59.466
the check gets a 308

00:59.466 --> 01:01.233
instead of a success code,

01:01.233 --> 01:03.071
and flags the redirect.

01:03.180 --> 01:04.454
To confirm it yourself,

01:04.454 --> 01:06.305
POST to it with curl dash i.

01:06.305 --> 01:08.889
Any redirect response with a location header

01:08.889 --> 01:10.632
gives you the real URL.

01:10.632 --> 01:13.192
The fix: paste that exact final URL

01:13.192 --> 01:15.055
into your Stripe endpoint settings,

01:15.055 --> 01:17.903
scheme, host and slash included.

01:17.903 --> 01:19.370
Then resend the failed event

01:19.370 --> 01:20.596
from the Dashboard.

01:20.596 --> 01:22.356
Don't add more redirects.

01:22.452 --> 01:25.156
Run the free check at webhookproof.com.

01:25.156 --> 01:27.024
Not affiliated with Stripe.
