Paiment system
Your app comes pre-configured to handle both one-time payments and subscription plans through Lemonsqueezy. Here's how it works:
Backend Integration
- The
lmsqz-actions
files contain all functions for Lemonsqueezy interactions - Webhooks are handled in
api/webhook/route.ts
to keep your app in sync with Lemonsqueezy - You can send test webhooks from your Lemonsqueezy dashboard
- Make sure to always have your ngrok tunnel running to receive webhooks updates from Lemonsqueezy, otherwise your Database can get out of sync.
Frontend Implementation
- A Lemonsqueezy script is injected to handle payment overlays
- Payment overlays are triggered with variant IDs
- Users can manage subscriptions (cancel/upgrade) from their profile
Note: Additional implementation details can be found in the template code