Update API Keys for Production
- Head over to your Stripe Dasboard.
- First, toggle off the test mode.
- Copy the Publishable Key.
- Open your Convex Dashboard.
- Click your project, navigate to settings, and find the environment variables.
- Change the value of [STRIPE_KEY] to the publishable key you copied.
- Repeat this for the secret key by pasting it under [STRIPE_API_KEY].
Set Up Webhooks
- Go to your Stripe Dasboard, click on Developers, then select Webhooks and create a new endpoint.
- Check this boxes
- checkout.session.completed
- invoice.payment_succeeded
- invoice.payment_failed
- customer.subscription.updated
- customer.subscription.deleted
- After selecting the required events, click Continue. You'll then be prompted to enter the [Endpoint URL].
- To get this, go back to your Convex Dashboard. Copy your production URL and paste it to the [Endpoint URL].
// 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!
Next Steps
Learn about how to deploy your app in Vercel.
Vercel Deployment
A guide to deploying your application on Vercel for optimal performance.
For more details before going live with Stripe, visit their complete documentation:Stripe Before Going Live