Payments Integration
Accept payments and manage subscriptions with PreLaunch
Payments Feature Overview
PreLaunch comes with comprehensive payment capabilities, allowing you to monetize your product even during the pre-launch phase. The template includes integration with Paddle, giving you a powerful system to handle transactions.
Key Features
- Payment Processing: Support for both one-time purchases and recurring subscriptions
- Customizable Pricing Plans: Create and display different pricing tiers
- Checkout Flow: Streamlined checkout experience for customers
- Customer Management: View and manage customer information and subscriptions
- Webhook Integration: Automatically handle payment events
- Mobile-Responsive Design: Payment flows work on all devices
Paddle Integration
PreLaunch includes a comprehensive integration with Paddle, which is particularly well-suited for SaaS businesses:
- Advantages:
- Handles VAT/tax calculations and compliance automatically
- Built-in subscription management
- Supports multiple currencies
- Lower setup complexity
Learn more about Paddle integration
Implementing a Pricing Page
PreLaunch includes a ready-to-use pricing component that you can easily customize:
Configuring Pricing Plans
All pricing plans are configured in the config.ts
file. You can easily modify or add new plans:
Checkout Components
PreLaunch provides pre-built checkout buttons for Paddle:
Paddle Checkout Button
Customer Portal
PreLaunch includes components for customer account management, allowing users to view and manage their subscriptions:
Environment Configuration
To use the payment features, you need to set up your environment variables in the .env.local
file:
For Paddle:
Best Practices for Payment Implementation
- Test Thoroughly: Always test the checkout flow in sandbox/test mode before going live
- Set Clear Expectations: Clearly communicate what users are paying for
- Secure Environment Variables: Never expose your payment API keys in client-side code
- Implement Proper Error Handling: Provide clear feedback when payment issues occur
- Monitor Webhooks: Set up monitoring for payment webhooks to catch any issues
Troubleshooting Common Issues
Checkout button not working
Checkout button not working
Webhooks not receiving events
Webhooks not receiving events
Verify that your webhook URLs are correctly configured in your Paddle dashboard and that your webhook secrets match what’s in your environment variables.
Customer portal not loading
Customer portal not loading
Check that the user is authenticated and has an active subscription. Verify that the correct customer ID is being passed to the portal component.