Lemon Squeezy Context Guide for AI Coding (llms.txt + Rules + MCP)
Payments, tax compliance, and subscription management for software and digital product companies.
1. Lemon Squeezy Official llms.txt & Clean Markdown Documentation
Official Docs MapFeed this clean, token-efficient Markdown documentation directly to Antigravity, Cursor, or Claude Code to prevent hallucinations and outdated API syntax.
# Standard llms.txt Index Endpoint
https://docs.lemonsqueezy.com/llms.txt
# Comprehensive Documentation Bundle
https://docs.lemonsqueezy.com/llms-full.txt
2. Production-Ready Lemon Squeezy Cursor Rules (.cursorrules & .mdc)
Lemon Squeezy webhook verification, checkout overlay, and license key validation. Save this into .cursor/rules/lemonsqueezy.mdc in your project repository.
// Lemon Squeezy AI Rules
- Verify webhook signatures using crypto.createHmac('sha256', process.env.LEMONSQUEEZY_WEBHOOK_SECRET).
- Use the Lemon Squeezy JS SDK (@lemonsqueezy/lemonsqueezy.js) for authenticated API operations.
- Handle subscription_created, subscription_updated, and subscription_cancelled events idempotently.
- Use checkout custom data (custom[user_id]) to bind purchases back to internal database user records.
3. Lemon Squeezy Antigravity & Claude Code System Instructions
Add this concise instruction block to your workspace .gemini/rules or project system prompt.
// Context Anchor for Lemon Squeezy
When writing code for Lemon Squeezy, refer directly to the verified specifications at https://docs.lemonsqueezy.com/llms.txt.
Follow strict error-handling and avoid deprecated API calls.
5. Troubleshooting: Common Lemon Squeezy AI Coding Issues & Fixes
Frequently reported errors when LLMs generate Lemon Squeezy code without proper context:
6. Best Used With (Lemon Squeezy Architecture Combos)
Engineers building with Lemon Squeezy frequently combine these complementary developer frameworks: