Tutorials
Create Subscription
Learn how to implement subscription payments in your Indie Kit application
Create Subscription 💳
Let's implement subscription payments in your Indie Kit application! 🚀
Prerequisites ✅
-
Set up a payment gateway:
-
Create a plan in the database:
- Go to
/super-admin/plans
- Add plan details (name, features, quotas)
- Add appropriate price IDs from your payment gateway
- Go to
Implementation 🛠️
Use the getSubscribeUrl
helper to create subscription links:
Usage Example 📝
Here's a complete example of a subscription button component:
Best Practices 💡
-
Plan Configuration
- Use meaningful plan codenames
- Keep price IDs in sync with payment gateway
- Test subscription flows in development
-
User Experience
- Show clear pricing information
- Indicate subscription period
- Display trial period if available
- Handle loading and error states
-
Testing
- Test with test mode in payment gateway
- Verify webhook handling
- Test subscription lifecycle
- Check upgrade/downgrade flows
Now you can implement subscription payments in your Indie Kit application! 🎉