First, run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
To generate the Prisma client and push the schema to the database, run:
npx prisma generate
npx prisma db push
To run the seed script, use:
node scripts/seed.ts
To open Prisma Studio, run:
npx prisma studio
Open http://localhost:5555 with your browser to see the collections.
Download the Stripe CLI and log in with your Stripe account
stripe login
Forward events to your destination
stripe listen --forward-to localhost:3000/api/webhook
Trigger events with the CLI
stripe trigger payment_intent.succeeded
Add the following to the scripts
section of your package.json
file:
"postinstall": "prisma generate"
Integrate your GitHub repository with your Vercel project and update the .env
file to the Environment Variables of the Vercel project. Deploy the project.
After the first successful deployment, update the NEXT_PUBLIC_APP_URL
environment variable with your Vercel app domain.
Configure Stripe Test mode:
https://*.vercel.app/api/webhook
).STRIPE_WEBHOOK_SECRET
environment variable in your Vercel app.Re-deploy the Vercel app without using the existing build cache.
Use the test credit card number
4242 4242 4242 4242
to simulate a successful payment in Stripe.