Lemon Squeezy — Merchant of Record for SaaS
You are an expert in Lemon Squeezy, the all-in-one payments platform that acts as your Merchant of Record. You help developers sell software, subscriptions, and digital products with automatic global tax handling (VAT, sales tax), invoicing, license keys, customer portal, and fraud protection — without needing to register for tax IDs or handle payment compliance yourself.
Best use case
Lemon Squeezy — Merchant of Record for SaaS is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
You are an expert in Lemon Squeezy, the all-in-one payments platform that acts as your Merchant of Record. You help developers sell software, subscriptions, and digital products with automatic global tax handling (VAT, sales tax), invoicing, license keys, customer portal, and fraud protection — without needing to register for tax IDs or handle payment compliance yourself.
Teams using Lemon Squeezy — Merchant of Record for SaaS should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/lemon-squeezy/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Lemon Squeezy — Merchant of Record for SaaS Compares
| Feature / Agent | Lemon Squeezy — Merchant of Record for SaaS | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
You are an expert in Lemon Squeezy, the all-in-one payments platform that acts as your Merchant of Record. You help developers sell software, subscriptions, and digital products with automatic global tax handling (VAT, sales tax), invoicing, license keys, customer portal, and fraud protection — without needing to register for tax IDs or handle payment compliance yourself.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agent for SaaS Idea Validation
Use AI agent skills for SaaS idea validation, market research, customer discovery, competitor analysis, and documenting startup hypotheses.
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
SKILL.md Source
# Lemon Squeezy — Merchant of Record for SaaS
You are an expert in Lemon Squeezy, the all-in-one payments platform that acts as your Merchant of Record. You help developers sell software, subscriptions, and digital products with automatic global tax handling (VAT, sales tax), invoicing, license keys, customer portal, and fraud protection — without needing to register for tax IDs or handle payment compliance yourself.
## Core Capabilities
### Checkout and Products
```typescript
import { lemonSqueezySetup, createCheckout, getProduct, listProducts } from "@lemonsqueezy/lemonsqueezy.js";
lemonSqueezySetup({ apiKey: process.env.LEMON_SQUEEZY_API_KEY! });
// Create checkout session
async function createProCheckout(userId: string, email: string) {
const checkout = await createCheckout(process.env.LEMON_SQUEEZY_STORE_ID!, {
variantId: process.env.PRO_VARIANT_ID!,
checkoutData: {
email,
custom: { user_id: userId }, // Your metadata
},
checkoutOptions: {
dark: true,
successUrl: "https://myapp.com/billing/success",
},
productOptions: {
enabledVariants: [process.env.PRO_VARIANT_ID!],
},
});
return checkout.data.attributes.url; // Redirect user here
}
// List products
const products = await listProducts({ filter: { storeId: process.env.STORE_ID! } });
products.data.forEach(p => {
console.log(`${p.attributes.name}: $${p.attributes.price / 100}`);
});
```
### Webhooks
```typescript
import crypto from "crypto";
app.post("/api/webhooks/lemonsqueezy", async (req, res) => {
// Verify signature
const signature = req.headers["x-signature"] as string;
const hash = crypto.createHmac("sha256", process.env.LEMON_SQUEEZY_WEBHOOK_SECRET!)
.update(JSON.stringify(req.body)).digest("hex");
if (signature !== hash) return res.status(401).json({ error: "Invalid signature" });
const { event_name, data } = req.body.meta;
switch (event_name) {
case "subscription_created": {
const { customer_id, variant_id, status } = data.attributes;
const userId = data.attributes.custom_data?.user_id;
await db.users.update(userId, {
plan: "pro",
lemonCustomerId: customer_id,
lemonSubscriptionId: data.id,
subscriptionStatus: status,
});
break;
}
case "subscription_updated": {
const userId = data.attributes.custom_data?.user_id;
await db.users.update(userId, { subscriptionStatus: data.attributes.status });
break;
}
case "subscription_cancelled": {
const userId = data.attributes.custom_data?.user_id;
await db.users.update(userId, {
subscriptionStatus: "cancelled",
cancelAt: data.attributes.ends_at,
});
break;
}
case "license_key_created": {
await db.licenses.create({
key: data.attributes.key,
userId: data.attributes.custom_data?.user_id,
activationLimit: data.attributes.activation_limit,
});
break;
}
}
res.json({ received: true });
});
```
### License Key Validation
```typescript
import { validateLicense, activateLicense } from "@lemonsqueezy/lemonsqueezy.js";
// In your desktop app / CLI
async function checkLicense(licenseKey: string) {
const validation = await validateLicense(licenseKey);
if (validation.data.attributes.valid) {
console.log("License valid!");
console.log(`Customer: ${validation.data.attributes.customer_name}`);
console.log(`Activations: ${validation.data.attributes.activation_usage}/${validation.data.attributes.activation_limit}`);
return true;
}
return false;
}
// Activate on this device
async function activate(licenseKey: string) {
const activation = await activateLicense(licenseKey, `${os.hostname()}-${os.platform()}`);
return activation.data.attributes.activated;
}
```
## Installation
```bash
npm install @lemonsqueezy/lemonsqueezy.js
```
## Best Practices
1. **Merchant of Record** — Lemon Squeezy handles VAT, sales tax, invoicing globally; you're not the seller of record
2. **No tax IDs needed** — They collect and remit taxes in 100+ countries; you just receive payouts
3. **Webhooks for state** — Don't rely on checkout redirect; use webhooks for subscription lifecycle
4. **Custom data** — Pass `user_id` in `custom` field; link Lemon Squeezy customers to your users
5. **License keys** — Enable for desktop apps, CLI tools, self-hosted software; activation limits prevent sharing
6. **Customer portal** — Hosted portal for subscription management; customers update payment, cancel, view invoices
7. **Variant-based pricing** — Create price variants (monthly/yearly, tiers); one product, multiple pricing options
8. **Test mode** — Use test mode API key for development; test the full flow without real chargesRelated Skills
route53-record-manager
Route53 Record Manager - Auto-activating skill for AWS Skills. Triggers on: route53 record manager, route53 record manager Part of the AWS Skills skill category.
create-architectural-decision-record
Create an Architectural Decision Record (ADR) document for AI-optimized decision documentation.
saas-scaffolder
Generates complete, production-ready SaaS project boilerplate including authentication, database schemas, billing integration, API routes, and a working dashboard using Next.js 14+ App Router, TypeScript, Tailwind CSS, shadcn/ui, Drizzle ORM, and Stripe. Use when the user wants to create a new SaaS app, start a subscription-based web project, scaffold a Next.js application, or mentions terms like starter template, boilerplate, new project, or wiring up auth and payments.
saas-metrics-coach
SaaS financial health advisor. Use when a user shares revenue or customer numbers, or mentions ARR, MRR, churn, LTV, CAC, NRR, or asks how their SaaS business is doing.
technical-decision-record
Use when making technical decisions, choosing technologies, or documenting architectural choices. Creates ADRs (Architecture Decision Records).
pytest-recording
Work with pytest-recording (VCR.py) for recording and replaying HTTP interactions in tests. Use when writing VCR tests, managing cassettes, configuring VCR options, filtering sensitive data, or debugging recorded HTTP responses.
architecture-decision-record
Use this skill when documenting significant architectural decisions. Provides ADR templates following the Nygard format with sections for context, decision, consequences, and alternatives. Helps teams maintain architectural memory and rationale for backend systems, API designs, database choices, and infrastructure decisions.
architecture-decision-records
在Claude Code会话期间,将做出的架构决策捕获为结构化的架构决策记录(ADR)。自动检测决策时刻,记录上下文、考虑的替代方案和理由。维护一个ADR日志,以便未来的开发人员理解代码库为何以当前方式构建。
Stripe Billing — SaaS Subscription & Usage-Based Billing
You are an expert in Stripe Billing, the complete billing platform for SaaS businesses. You help developers implement subscription management, usage-based billing, metered pricing, free trials, proration, invoicing, customer portal, and webhook-driven lifecycle management — building everything from simple monthly plans to complex per-seat + usage hybrid pricing.
SaaS Architecture Advisor
## Overview
Marketing Ideas for SaaS
## Overview
Lemon Squeezy Automation
Automate Lemon Squeezy tasks via Rube MCP (Composio): products, orders, subscriptions, checkouts, and digital sales. Always search tools first for current schemas.