This commit is contained in:
Jun-te Kim 2026-02-21 13:11:00 +00:00
parent 98fc5c9bbc
commit d443c5d97a
2 changed files with 2 additions and 1 deletions

View file

@ -1,6 +1,6 @@
import { NextRequest, NextResponse } from "next/server";
import Stripe from "stripe";
import { eq } from "drizzle-orm";
import { randomUUID } from "crypto";
import { getStripe } from "@/lib/stripe/service";
import { getUserFromSession } from "@/lib/auth/get-user";
@ -15,6 +15,7 @@ const ORIGIN = process.env.NEXT_PUBLIC_APP_URL || "http://localhost:3000";
export async function POST(req: NextRequest) {
try {
console.log("💳 [SUBSCRIPTION CHECKOUT] Request received");
console.log("💳 [SUBSCRIPTION CHECKOUT] Using price ID:", SUBSCRIPTION_PRICE_ID);
// --------------------------------------------------
// 1⃣ Get authenticated user