NextBase
Search
⌃K

Deployment

Deployment with Vercel

  1. 1.
    https://vercel.com/guides/deploying-nextjs-with-vercel Follow this guide to setup Next.js deployment with Vercel.
  2. 2.
    In the environment variables add your variables from .env.local one by one into them. Add all except Stripe. Because you are going live and are ready to accept payments, you need the live keys instead of development keys. Read the next section below on Stripe.
  3. 3.
    Deploy the app and assign it your domain. 🎉

Stripe

Setup environment variables

  1. 1.
    Enter live mode in stripe
  2. 2.
    Grab the environment variables and ensure that you are entering the correct Stripe environment variables for in your hosting provider.

Setup Stripe webhooks

  • In the Stripe webhooks section setup a stripe webhook listener at https://yourapp.com/api/stripe/webhooks.
  • Click on Add an endpoint.
  • In the Listen to Stripe Events section add `http://localhost:3000/api/stripe/webhooks` as the endpoint.
  • Description is optional
  • Select `Events on your account`.
  • Click on + Select events and select all events. Click on Add Events .
  • Click on `Add Endpoint`. This will now sync Stripe to your product deployment.
Arni Creative Private Limited @2023