I'm running stripe cli for webhooks:
PS C:\Users\<redacted>> stripe listen --forward-to https://dusty-condor-338.convex.cloud/stripe
A newer version of the Stripe CLI is available, please update to: v1.27.0
> Ready! You are using Stripe API Version [2025-03-31.basil]. Your webhook signing secret is <redacted> (^C to quit)
2025-06-10 17:17:38 --> charge.succeeded [<redacted>]
2025-06-10 17:17:38 --> payment_method.attached [<redacted>]
2025-06-10 17:17:39 --> payment_intent.succeeded [<redacted>]
2025-06-10 17:17:39 --> customer.subscription.created [<redacted>]
2025-06-10 17:17:39 --> payment_intent.created [evt_3RYTve4bpizVBtho1FT22zWT]
2025-06-10 17:17:39 <-- [404] POST https://dusty-condor--06-10 17:17:39 <-- [404] POST https://dusty-condor-338.convex.cloud/stripe [<redacted>]
...
But, it keeps returning 404 errors.
This is my http.ts:
...
import Stripe from "stripe";
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
apiVersion: "2025-05-28.basil",
});
const http = httpRouter();
...
const handleStripeWebhook = httpAction(async (ctx, request) => {
const signature = request.headers.get("stripe-signature")!;
const webhookSecret = process.env.STRIPE_WEBHOOK_SECRET;
if (!webhookSecret) {
....
}
try {
const event = stripe.webhooks.constructEvent(
await request.text(), // Raw request body
signature,
webhookSecret,
);
await ctx.runAction(internal.stripe.handleEvent, { event });
// Acknowledge receipt of the event
return new Response(null, { status: 200 });
} catch (err: unknown) {
....
}
});
http.route({
path: "/stripe",
method: "POST",
handler: handleStripeWebhook,
});
Why is it returning not found errors?