Booking System Setup Instructions
Quick Start Guide
1. Environment Variables (Required)
Add these to your Netlify dashboard under Site Settings → Environment Variables:
# Resend (Required for emails)
RESEND_API_KEY=re_xxxxx... # Get from Resend dashboard
OWNER_EMAIL=your-email@gmail.com # Where you receive bookings
FROM_EMAIL=your-email@gmail.com # Must be verified in Resend
# Stripe (Required)
STRIPE_PUBLIC_KEY=pk_test_... # Use test keys first!
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_... # Set up after creating webhook
# Site URL
URL=https://your-site.netlify.app
2. Resend Setup
- Create Account: Sign up at resend.com (free - 100 emails/day forever)
- Verify Domain (or use their test domain):
- For testing: Use
onboarding@resend.dev as FROM_EMAIL
- For production: Add your domain and verify DNS records
- Get API Key:
- Dashboard → API Keys → Create API Key
- Name: "Festool Bookings"
- Copy the key (starts with
re_)
3. Stripe Setup
- Create Account: Sign up at stripe.com
- Get API Keys: Developers → API Keys
- Use test keys first (start with
pk_test_ and sk_test_)
- Set Up Webhook:
- Developers → Webhooks → Add Endpoint
- Endpoint URL:
https://your-site.netlify.app/.netlify/functions/stripe-webhook
- Events: Select
checkout.session.completed
- Copy the signing secret (starts with
whsec_)
4. Install Dependencies
# In the netlify/functions directory
cd netlify/functions
npm install
5. Deploy to Netlify
git add .
git commit -m "Add booking system"
git push
Netlify will automatically:
- Deploy your site
- Install function dependencies
- Make functions available at
/.netlify/functions/[name]
6. Test the System
Test with Test Data:
- Go to your Domino hire page
- Fill in the booking form
- Check Netlify Forms dashboard for submission
- Check your email for approval request
- Click approve → Customer gets payment link
- Use Stripe test card:
4242 4242 4242 4242
- Check for confirmation emails
Stripe Test Cards:
- Success:
4242 4242 4242 4242
- Decline:
4000 0000 0000 0002
- Requires auth:
4000 0025 0000 3155
7. Go Live
When ready for real payments:
- Switch to Stripe live keys (start with
pk_live_ and sk_live_)
- Update webhook with live endpoint
- Update all environment variables in Netlify
- Test with a small real payment
Monitoring
Check for Bookings:
- Netlify Forms: Dashboard → Forms (always saves submissions)
- SendGrid: Activity Feed shows all emails
- Stripe: Payments dashboard shows all transactions
- Function Logs: Netlify → Functions → View logs
Daily Checklist:
- [ ] Check Netlify Forms for new submissions
- [ ] Check SendGrid Activity for email delivery
- [ ] Check Stripe for payments
- [ ] Respond to any pending bookings
Troubleshooting
Not receiving emails?
- Check Netlify Forms (submission always saved there)
- Check Resend dashboard → Emails for delivery status
- Verify FROM_EMAIL is correct (use
onboarding@resend.dev for testing)
- Check spam folder
- Check environment variables are set
Payment not working?
- Verify Stripe keys are correct
- Check webhook is configured
- Look at Stripe Dashboard → Developers → Logs
- Check Netlify Function logs
Function errors?
- Check logs: Netlify → Functions → [function-name]
- Verify all environment variables are set
- Make sure dependencies are installed
Important URLs
- Your Booking Page:
/festool-domino-hire
- Booking Function:
/.netlify/functions/booking-inquiry
- Confirm Function:
/.netlify/functions/confirm-booking
- Webhook:
/.netlify/functions/stripe-webhook
- Success Page:
/success/
Support
- Netlify: answers.netlify.com
- Resend: resend.com/docs
- Stripe: support.stripe.com
Next Steps
- Set up all environment variables ✓
- Test with test payments ✓
- Switch to live keys when ready
- Consider adding:
- SMS notifications (Twilio)
- Calendar integration
- Availability checking
- Admin dashboard