Instructions for setting up Stripe to handle secure payments.
Learn How to Generate Stripe API Key Important If you haven't gone through setting up installation process yet, get that done, and then come back here when you're ready to continue.
Head over to this link to get startedStripe Dashboard
Step 1
Stripe Secret Key Setup Once you've created your Stripe account, you'll be prompted to complete your business profile. You can do this now, or skip it for later during the deployment. Once you're in the dashboard click on Developers and select the option API Keys . Grab the Secret key . Head over to your Convex Dashoard and choose your project. Click on the Settings and select the option Environment Variables . Create a new variable [STRIPE_API_KEY ] and paste in the Secret key . Step 2
Stripe Publishable Key Setup Head back to your Stripe dashboard and grab the Publishable key . Head back over to your Convex Dashoard and choose your project. Click on the Settings and select the option Environment Variables . Create a new variable [STRIPE_KEY ] and paste in the Publishable key . Step 3
Stripe Webhooks Secret Setup Head back to your project now. Click your .env file and copy the URL from the STRIPE_URL_ENDPOINT make sure to replace the [name-name-123 ]. Then head over to package.json and go look for the stripe:listen script, replace the [$STRIPE_URL_ENDPOINT ]. Then in your terminal run the following command to get your Webhooks secret : After running that command you'll see an output like the following: Your webhook signing secret is whsec_81... -> copy this whsec_81...
Head back over to your Convex Dashoard and choose your project. Click on the Settings and select the option Environment Variables . Create a new variable [STRIPE_WEBHOOKS_SECRET ] and paste in the Webhooks secret . Congratulation!🥳 You've completed all the necessary setup! You can now start using the tools we just installed, if you want me to walk you through how to use them head over to the next section. See you on the next one!