Open
Description
import { headers } from "next/headers";
import Stripe from "stripe";
import { ConvexHttpClient } from "convex/browser";
import { stripe } from "@/lib/stripe";
import { env } from "process";
import { api } from "../../../../../convex/_generated/api";
const convex = new ConvexHttpClient(process.env.NEXT_PUBLIC_CONVEX_URL!);
export async function POST(req: Request) {
const body = await req.text();
const signature = headers().get("Stripe-Signature") as string;
if (!env.STRIPE_WEBHOOK_SECRET) {
return new Response("Missing STRIPE_WEBHOOK_SECRET", { status: 500 });
}
let event: Stripe.Event;
throws
Call Stack
eval
node_modules\.pnpm\[email protected]_@[email protected][email protected][email protected][email protected]__react-do_a6pe3624vgfhu2tivlhxgo7czi\node_modules\convex\dist\esm\browser\simple_client-node.js (12:1)
../common/temp/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/ws/lib/stream.js
node_modules\.pnpm\[email protected]_@[email protected][email protected][email protected][email protected]__react-do_a6pe3624vgfhu2tivlhxgo7czi\node_modules\convex\dist\esm\browser\simple_client-node.js (38:20)