This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* v0 by Vercel. | |
* @see https://v0.dev/t/Dtm1B7M2eEP | |
*/ | |
// for this to work in your app you need shadcn component library initialized | |
// using the command here: https://ui.shadcn.com/docs/installation/next#run-the-cli | |
import { Button } from "@/components/ui/button"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// file path: app/api/stripe/webhook/route.ts | |
import { prisma } from "@/lib/prisma"; | |
import { NextResponse } from "next/server"; | |
import Stripe from "stripe"; | |
export async function POST(request: Request) { | |
const body = await request.text(); | |
const sig = request.headers.get("Stripe-Signature"); |