A complete template for creating sales pages with embedded Stripe payment forms, designed specifically for non-technical users working with bolt.new AI-generated webapps.
This template is perfect for:
- Non-technical entrepreneurs who want to create sales pages quickly
- bolt.new AI users looking for a reliable payment integration template
- Anyone who needs a simple, secure payment solution without complex setup
- ✅ Embedded Stripe Checkout - Secure payment processing without redirects
- ✅ Mobile-responsive design - Works perfectly on all devices
- ✅ TypeScript support - Better code reliability and development experience
- ✅ Modern UI with Tailwind CSS - Beautiful, customizable styling
- ✅ Server-side security - Stripe keys handled securely on the backend
- ✅ Return page handling - Proper post-payment user experience
- Go to stripe.com and create a free account
- Complete the account verification process
- Navigate to your Stripe Dashboard
- In your Stripe Dashboard, go to Products → Add Product
- Fill in your product details:
- Product name
- Description
- Price
- Currency
- Copy the Price ID (it looks like
price_1234567890
)
- In Stripe Dashboard, go to Developers → API Keys
- Copy your Publishable Key (starts with
pk_
) - Copy your Secret Key (starts with
sk_
)
Create a .env.local
file in your project root:
# Stripe Configuration
STRIPE_SECRET_KEY=sk_test_your_secret_key_here
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_your_publishable_key_here
PRICE_ID=price_your_price_id_here
npm install
npm run dev
Open http://localhost:3000 to see your payment form in action!
- Edit
src/app/page.tsx
to customize your sales page content - Update
src/app/globals.css
for styling changes - Replace images in the
public/
folder
- Edit
src/components/checkout.tsx
to modify the payment form appearance - Update
src/action/stripe.ts
to change payment settings (currency, mode, etc.)
- Edit
src/app/return/page.tsx
to change the support email fromorders@example.com
to your actual support email address
This template is optimized for bolt.new AI generation:
- Fork or download this repository
- Upload to bolt.new as your starting template
- Prompt the AI to modify the sales page content:
- "Make this a landing page for selling online courses"
- "Create a product showcase for digital downloads"
- "Add testimonials and feature sections"
- Keep the payment integration - it's already configured!
- Never expose your Stripe Secret Key in client-side code
- This template properly handles all sensitive operations on the server
- The
.env.local
file is ignored by Git for security
- Stripe Documentation - Complete integration guide
- Stripe Embedded Checkout - Specific documentation for this implementation
- Stripe Testing - Test card numbers and scenarios
- Next.js Documentation - Framework features and API
- Next.js Learn - Interactive tutorials
- Next.js GitHub - Source code and issues
- bolt.new Documentation - AI webapp generation guide
- Push your code to GitHub
- Connect your GitHub repo to Vercel
- Add your environment variables in Vercel dashboard
- Deploy with one click!
- Connect your GitHub repo to Netlify
- Set build command:
npm run build
- Set publish directory:
out
- Add environment variables in Netlify dashboard
- Ensure your
.env.local
file is in the project root - Check that your environment variable names match exactly
- Restart your development server after adding environment variables
- Verify your Stripe Publishable Key is correct
- Check browser console for JavaScript errors
- Ensure your Price ID exists in your Stripe account
- Use Stripe's test card numbers:
4242 4242 4242 4242
- Make sure you're using test keys (not live keys) during development
- Check that your webhook endpoints are properly configured
Found this template helpful? Give it a ⭐ on GitHub!
Need help? Check the Issues section or create a new issue.