Setting Up Your Stripe Account
Chapter 1: Setting Up Your Stripe Account
Step 1 - Create a Stripe Account
Sign Up: Visit Stripe 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.
Step 2 - Obtain API Keys
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.
Step 3 - Set Up Webhook Secret
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.
Last updated