Look, you built something. It works. People are using it. Congrats—you're further than 90% of people who talk about building apps.
But now you need the grown-up features: a way to actually make money (payments), a way to communicate with users (email), and a way to know what the hell is happening in your app (analytics).
The good news? AI tools make these integrations way easier than they used to be. The bad news? You still need to know what to ask for and how to set things up correctly.
Let's walk through the big three integrations that turn hobby projects into real businesses.
Part 1: Taking Money (Payment Integration)
If you're not taking payments, you don't have a business. You have an expensive hobby. Let's fix that.
Your Payment Processing Options
Stripe (Best for most apps):
Fees: 2.9% + 30¢ per transaction
Best for: One-time payments, subscriptions, complex pricing
Takes: 2-3 days to set up properly
Why it's worth it: Industry standard, excellent documentation, works everywhere
PayPal (Easiest to start):
Fees: 2.9% + 30¢ per transaction
Best for: Simple one-time payments
Takes: 30 minutes to set up
Why people use it: Everyone has a PayPal account already
Lemon Squeezy (Good for digital products):
Fees: 5% + 50¢ per transaction
Best for: Selling digital products, courses, ebooks
Takes: 1 hour to set up
Why it's appealing: They handle tax compliance globally (huge)
For most people reading this: Start with Stripe. It's the standard for a reason.
The Stripe Integration Prompt
Here's how to ask your AI builder to add Stripe payments. This works in Lovable, Bolt, or Replit:
For One-Time Payments:
"Add Stripe payment integration to the checkout page. When a user clicks 'Buy Now', redirect them to a Stripe Checkout session for a one-time payment of $[amount]. After successful payment, redirect them to /success page and send confirmation email. Store the payment status and transaction ID in the database. Use Stripe test mode for now."
For Subscriptions:
"Add Stripe subscription integration with three tiers: Basic ($10/month), Pro ($25/month), Premium ($50/month). Create a pricing page with cards for each tier. When user selects a plan, create a Stripe Checkout session for that subscription. After successful payment, update user record with subscription_tier and subscription_status. Include webhook endpoint to handle subscription updates and cancellations."
What Happens Next:
The AI will create Stripe integration code
You'll need to sign up at stripe.com and get API keys
Add those keys to your app's environment variables
Test with Stripe's test card: 4242 4242 4242 4242
When ready, switch to live mode with real keys
Critical: Always test payments thoroughly before going live. Use test mode until you're 100% confident.
Part 2: Talking to Users (Email Integration)
You need to email your users. Welcome emails. Password resets. Notifications. Receipts. All of it.
Your Email Service Options
Resend (Best for transactional emails):
Free tier: 3,000 emails/month
Super easy API integration
Built specifically for developers
Takes 20 minutes to set up
SendGrid (Industry standard):
Free tier: 100 emails/day
More complex but more powerful
Better for marketing emails
Takes 1-2 hours to set up properly
Mailgun (Developer-friendly):
Free tier: 5,000 emails/month for 3 months
Great documentation
Reliable delivery
My recommendation: Start with Resend. It's the easiest and has generous free limits.
The Email Integration Prompt
Here's how to add email functionality:
For Welcome Emails:
"Add Resend email integration. When a new user signs up, send them a welcome email with subject 'Welcome to [App Name]!' Include their name, a brief explanation of what to do next, and a link to the getting started guide. Create an email template with our brand colors. Store Resend API key in environment variables."
For Transactional Emails:
"Set up email notifications for: 1) Password reset requests with secure token link, 2) Purchase confirmations with order details, 3) Weekly digest of user activity. Each email should use our brand template and include unsubscribe link. Use Resend API to send these emails. Log all sent emails in the database for debugging."
Pro Tips for Email:
Always include an unsubscribe link (it's the law)
Use your own domain for sending (not gmail.com)
Keep initial emails simple - fancy designs break in email clients
Test emails by sending to yourself first
Check spam folder to make sure they're not getting flagged
Part 3: Understanding Your Users (Analytics Integration)
If you're not tracking what users do, you're flying blind. You need to know: Who's using your app? What pages do they visit? Where do they drop off? What features do they actually use?
Your Analytics Options
Plausible (Best for privacy-focused):
Cost: $9/month for 10K monthly visitors
No cookies, GDPR compliant
Simple, clean interface
Takes 5 minutes to set up
Posthog (Best for product analytics):
Free tier: 1 million events/month
Feature flags, A/B testing, session recordings
More powerful but more complex
Takes 30 minutes to set up
Google Analytics (Most comprehensive):
Free for most use cases
Industry standard, tons of features
Overkill for most MVPs
Privacy concerns in some regions
My recommendation: Use Plausible if you want simple. Use Posthog if you want to track specific user actions.
The Analytics Integration Prompt
For Basic Page Tracking (Plausible):
"Add Plausible analytics to track page views across the entire app. Include the Plausible script in the document head. Set up custom events for: button clicks on pricing page, sign up completions, checkout initiations. Track these events with descriptive names. Store the Plausible domain in environment variables."
For Product Analytics (Posthog):
"Integrate Posthog to track user behavior. Initialize Posthog on app load with project API key. Track these events: user_signup, feature_used (with feature name), purchase_completed, user_invited_friend. Include user properties like account_type and signup_date. Add Posthog session recording to see how users interact with key pages. Store API key in environment variables."
What to Track (And What Not To)
✅ Track These:
Sign ups (daily/weekly)
Page views on key pages
Button clicks on important CTAs
Feature usage (which features get used most)
Checkout abandonment (where people drop off)
Time spent in app
User flow through onboarding
❌ Don't Track These (Privacy/Complexity):
Exact mouse movements (creepy and overkill)
Personal data beyond what's necessary
Every single click (too much noise)
Form inputs character-by-character
Bringing It All Together: The Integration Workflow
Here's the order to integrate these features:
Week 1: Analytics First
Add basic analytics so you can track everything else you're about to add. Start measuring before you make changes.
Week 2: Email Next
Set up email so you can communicate with users. Test with welcome emails and password resets.
Week 3: Payments Last
Add payment processing when everything else works. Test extensively in test mode before going live.
Common Integration Mistakes
Hardcoding API keys in your code (NEVER DO THIS - use environment variables)
Not testing payments in test mode first
Forgetting to handle failed payments
Not including unsubscribe links in emails
Tracking too much data and drowning in metrics
Not checking that emails actually deliver
Using production API keys during development
Quick Reference: Essential Environment Variables
Your app needs these secret keys (never commit these to GitHub!):
STRIPE_SECRET_KEY - From your Stripe dashboard
STRIPE_PUBLISHABLE_KEY - Also from Stripe
RESEND_API_KEY - From resend.com
PLAUSIBLE_DOMAIN - Your app's domain
POSTHOG_API_KEY - From posthog.com (if using)
DATABASE_URL - Your database connection string
Store these in your platform's environment variables settings. Every platform has this feature—Lovable, Bolt, Replit, Vercel, Netlify, all of them.
Resources:
Stripe docs: stripe.com/docs
Resend: resend.com
Plausible: plausible.io
Posthog: posthog.com
SendGrid: sendgrid.com
Lemon Squeezy: lemonsqueezy.com
The Bottom Line
You can't run a real business without these three integrations. The good news? With AI-powered development tools, you can add all three in under a week. The even better news? Once they're set up, they mostly run themselves.
Don't overthink it. Pick your tools, write clear prompts, test everything twice, and ship it.
Your MVP just became a real product. Now go make some money.


