Setting Up Your Stripe Account
Chapter 1: Setting Up Your Stripe Account
Last updated
Chapter 1: Setting Up Your Stripe Account
Last updated
Sign Up: Visit and sign up for an account if you don't already have one.
Dashboard Access: After setting up your account, log in to access the Stripe Dashboard.
Navigate to API Keys: In the Stripe Dashboard, go to Developers > API keys.
Copy Keys:
Publishable Key: Copy your Publishable Key.
Secret Key: Copy your Secret Key.
Add to Environment Variables: In your project's .env
file, add the following:
Replace your_secret_key, and your_webhook_secret with your actual keys.
Navigate to Webhooks: In the Stripe Dashboard, go to Developers > Webhooks.
Add Endpoint:
Click on Add endpoint.
Enter your webhook endpoint URL (e.g., https://yourdomain.com/api/webhook).
Select Events:
Choose checkout.session.completed and any other events you want to handle.
Retrieve Webhook Secret:
After creating the endpoint, click to reveal the Signing Secret.
Add this to your .env file as STRIPE_WEBHOOK_SECRET.