LemonSqueezy Payments
Sell digital products and SaaS subscriptions with LemonSqueezy as a merchant of record for indie developers.
Overview
The platform provides a beautiful, customizable checkout overlay that handles payment collection, tax calculation, and receipt delivery. LemonSqueezy supports credit cards and PayPal, with automatic currency conversion for 30+ currencies. Built-in features include discount codes, affiliate programs, email marketing, and a customer portal for subscription management.
The @lemonsqueezy/lemonsqueezy.js SDK provides a typed API for managing products, variants, checkouts, subscriptions, and license keys. Webhooks deliver events for purchases, subscription changes, and license activations. License key validation enables software licensing with activation limits, expiration dates, and hardware fingerprinting. The platform is particularly popular with indie hackers, course creators, and desktop app developers.
Who Is This For?
- Sell software subscriptions with automatic tax handling
- Generate and validate license keys for desktop apps
- Create a checkout for digital downloads and courses
- Set up affiliate programs for product distribution
Installation
npm install @lemonsqueezy/lemonsqueezy.js Configuration
import { lemonSqueezySetup, createCheckout, getSubscription } from "@lemonsqueezy/lemonsqueezy.js"
lemonSqueezySetup({ apiKey: process.env.LEMON_SQUEEZY_API_KEY! })
// Create a checkout
const { data } = await createCheckout("store-id", "variant-id", {
checkoutData: {
email: "user@example.com",
custom: { userId: "123" },
},
})
// Get subscription
const sub = await getSubscription("sub-id") Explore AI Tools
Discover the best AI tools that complement your skills
Read AI & Design Articles
Tips and trends in the world of design and AI
Related Servers
Sentry Error Tracking
Monitor errors and performance issues in production with Sentry. AI agents can triage alerts and suggest fixes based on stack traces.
PostHog Product Analytics
Track product usage, manage feature flags, and analyze user behavior with PostHog, an open-source product analytics platform.
Database Query Builder
Generate and optimize SQL queries with AI assistance. Build complex queries, analyze execution plans, and improve database performance.