Skip to content

Instantly share code, notes, and snippets.

View SimRunBot's full-sized avatar

SimRunBot

View GitHub Profile
@SimRunBot
SimRunBot / page.tsx
Created October 23, 2023 14:14
Pricing Page Component Next.JS generated using v0.dev by vercel
/**
* 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";
@SimRunBot
SimRunBot / route.ts
Created July 10, 2023 19:00
Stripe Webhook Event Handler | Signature Verification with request body as string | Next.js 13.4 appDir
// 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");