Stripe Production Setup

Steps to set up Stripe for production with Convex.

Video Tutorial Coming Soon!

Update API Keys for Production

  1. Head over to your Stripe Dasboard.
  2. First, toggle off the test mode.
  3. Copy the Publishable Key.
  4. Open your Convex Dashboard.
  5. Click your project, navigate to settings, and find the environment variables.
  6. Change the value of [STRIPE_KEY] to the publishable key you copied.
  7. Repeat this for the secret key by pasting it under [STRIPE_API_KEY].

Set Up Webhooks

  1. Go to your Stripe Dasboard, click on Developers, then select Webhooks and create a new endpoint.
  2. Check this boxes
    • checkout.session.completed
    • invoice.payment_succeeded
    • invoice.payment_failed
    • customer.subscription.updated
    • customer.subscription.deleted
  3. After selecting the required events, click Continue. You'll then be prompted to enter the [Endpoint URL].
  4. To get this, go back to your Convex Dashboard. Copy your production URL and paste it to the [Endpoint URL].
  5. // The URL should look like this:
    https://your-project-123.convex.site/stripe

Congratulation! You're done with the toughest part. The last thing you have to do is to deploy your app. In the next section, I'm going to show you how to deploy it in Vercel. See you on the next one!

For more details before going live with Stripe, visit their complete documentation:Stripe Before Going Live