Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Lemon Squeezy Developer Agent

    1

    Developer reference for Lemon Squeezy e-commerce: checkout overlays, HMAC-SHA256 webhooks, subscription lifecycles, and software license key validation.

    Free

    Security scanned
    Lemon Squeezy Developer Agent

    Lemon Squeezy Developer Agent

    Example session with this skill installed

    How do I verify a Lemon Squeezy webhook in a Next.js Route Handler and what events should I listen for to handle new subscriptions?

    • Read your context and instructions
    • Compiled the lemon squeezy developer

    To verify webhooks in Next.js, you must access the raw request body. Using the parsed JSON will cause HMAC verification to fail due to whitespace differences. For subscription management, you should primarily listen for subscription_created and subscription_updated.

    Webhook Implementation Logic

    TaskImplementation Detail
    Signature HeaderX-Signature
    AlgorithmHMAC-SHA256
    ComparisonUse crypto.timingSafeEqual
    Primary Eventssubscription_created, subscription_updated, subscription_cancelled
    Currency FormatCents (Integer)
    import crypto from 'crypto';
    
    export async function POST(req: Request) {
      const rawBody = await req.text();
      const hmac = crypto.createHmac('sha256', process.env.LEMON_SQUEEZY_WEBHOOK_SECRET!);
      const digest = Buffer.from(hmac.update(rawBody).digest('hex'), 'utf8');
      const signature = Buffer.from(req.headers.get('x-signature') || '', 'utf8');
    
      if (signature.length !== digest.length || !crypto.timingSafeEqual(digest, signature)) {
        return new Response('Invalid signature', { status: 401 });
      }
    
      const payload = JSON.parse(rawBody);
      const eventName = payload.meta.event_name;
    
      switch (eventName) {
        case 'subscription_created':
          // Logic for new subscription
          break;
        case 'subscription_updated':
          // Logic for renewals or plan changes
          break;
      }
    
      return new Response('OK', { status: 200 });
    }
    

    Next steps

    • Set your LEMON_SQUEEZY_WEBHOOK_SECRET in your .env file.
    • Configure the Webhook URL in your Lemon Squeezy Dashboard under Settings > Webhooks.
    • Test the integration using the "Send Test" button in the dashboard to verify the HMAC logic.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Integrating payments often leads to broken webhook signatures and lost subscription states. This skill provides the architectural technical reference and implementation logic for Lemon Squeezy, ensuring your billing system handles webhooks, licensing, and checkouts without common security or state-machine errors.

    What it does

    • Secure Webhooks provides logic for HMAC-SHA256 signature verification and event handling for order and subscription updates.
    • Checkout Management generates dynamic checkout URLs and configures Lemon.js overlays for embedded modals.
    • Subscription Lifecycles manages plan upgrades, downgrades, pauses, and grace period logic for cancellations.
    • License Validation handles software license activation, deactivation, and instance tracking via public endpoints.
    • API Architecture implements JSON:API specifications including relationships, filtering, and pagination.

    How it works

    1. Identify Scope by determining if the task involves webhooks, checkouts, subscriptions, licensing, or raw API queries.
    2. Consult Reference by retrieving specific implementation details from the included developer guides and security manuals.
    3. Apply Security by implementing timing-safe signature checks and raw body processing for incoming events.
    4. Validate State by checking subscription attributes like ends_at to ensure customers retain access during grace periods.

    Frameworks & tools

    Works with any stack including Next.js, Node.js, Laravel, Python, WordPress, and mobile or desktop apps. Utilizes Lemon.js and the Lemon Squeezy JSON:API.

    Why this beats prompting it yourself

    Standard LLMs often hallucinate Lemon Squeezy's specific JSON:API structure or fail to warn about raw body requirements for webhook verification. This skill forces strict adherence to timing-safe equality checks and correct integer-based currency handling.

    Use cases

    • Building a SaaS billing dashboard with subscription lifecycle management.
    • Implementing secure license key activation for desktop software or plugins.
    • Setting up a conversion-optimized checkout overlay with custom metadata.
    • Automating internal workflows triggered by secure order_created webhooks.

    Known limitations

    Requires a Lemon Squeezy account and API credentials. Does not provide a UI component library; focuses on logic and architectural integration.

    Pair with Fastr MCP Suite

    For live signature verification tools and remote license validation endpoints, connect our companion MCP server on MCPize: 👉 Fastr MCP Suite on MCPize

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for E-commerce.

    Requires Lemon Squeezy account credentials. Does not include pre-built UI components. Webhook verification requires access to the raw request body before JSON parsing.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 19 days ago

    • Free with an Agensi account

    Permissions

    Network Access
    Read Files
    Environment Variables
    Listed19 days ago

    What's inside

    Frequently Asked Questions

    This skill provides the specific architectural logic and security protocols required to handle Lemon Squeezy's JSON:API, such as HMAC signature verification for webhooks and subscription state machine transitions that standard LLMs often hallucinate.

    The skill includes implementation logic for generating dynamic checkout URLs, managing subscription lifecycles (upgrades, downgrades, and grace periods), secure webhook handling, and license key validation.

    Yes, it is designed to work across any backend or frontend stack, including Next.js, Node.js, Laravel, and Python, by adhering to Lemon Squeezy's core API specifications and Lemon.js requirements.

    You will receive a specialized technical reference and implementation framework that guides your AI agent through complex tasks like timing-safe equality checks and raw body processing for secure event handling.

    This skill focuses on the backend logic, security, and API architecture; it does not provide pre-built UI components or a Lemon Squeezy account, which you must set up separately.

    The skill is built to follow the current Lemon Squeezy JSON:API standards; updates are released periodically to reflect major changes in their documentation or security best practices.

    New in E-commerce

    Free