Lemon Squeezy + Transactional

Automate digital product delivery and subscription emails with Lemon Squeezy and Transactional. Send beautifully branded purchase confirmations, license keys, receipt emails, and subscription lifecycle notifications through your own email infrastructure.

Transactional
LS

OVERVIEW

Automate digital product delivery and subscription emails with Lemon Squeezy and Transactional. Send beautifully branded purchase confirmations, license keys, receipt emails, and subscription lifecycle notifications through your own email infrastructure.

HOW IT WORKS

Integration Workflow

A step-by-step look at how data flows between your tools and Transactional.

1

Purchase or Event

A customer buys a product, subscribes, or a subscription event fires.

2

Webhook Received

Lemon Squeezy sends event data to your Transactional webhook.

3

Email Composed

Transactional renders a branded email with purchase and product details.

4

Delivered Reliably

The customer receives a professional email with download links or license keys.

KEY FEATURES

What You Get

Everything you need to integrate Lemon Squeezy with Transactional.

Product Delivery

Send digital product download links and license keys in beautifully branded confirmation emails.

Receipt Emails

Send detailed receipts with line items, discounts, and tax information for every purchase.

Subscription Management

Notify customers about subscription renewals, upgrades, and cancellations automatically.

Affiliate Notifications

Notify affiliates about successful referral sales with commission details.

QUICK START

Get Started in Minutes

Here is a code example showing how to connect Lemon Squeezy with Transactional.

Lemon Squeezy Integration
typescript
// Lemon Squeezy Webhook Handler
import Transactional from "@transactional/sdk";
import crypto from "crypto";

const client = new Transactional({ apiKey: "txl_your_api_key" });

app.post("/webhooks/lemonsqueezy", async (req, res) => {
  // Verify webhook signature
  const signature = crypto
    .createHmac("sha256", process.env.LS_WEBHOOK_SECRET!)
    .update(JSON.stringify(req.body))
    .digest("hex");

  if (signature !== req.headers["x-signature"]) {
    return res.status(401).send("Invalid signature");
  }

  const { meta, data } = req.body;

  if (meta.event_name === "order_created") {
    await client.email.send({
      from: "hello@yourproduct.com",
      to: data.attributes.user_email,
      subject: `Your purchase: ${data.attributes.first_order_item.product_name}`,
      tag: "lemonsqueezy-purchase",
      templateId: "tmpl_digital_delivery",
      templateData: {
        productName: data.attributes.first_order_item.product_name,
        price: data.attributes.total_formatted,
        licenseKey: data.attributes.first_order_item.license_key,
        receiptUrl: data.attributes.urls.receipt,
      },
    });
  }

  res.status(200).send("OK");
});

YOUR AGENTS DESERVE
REAL INFRASTRUCTURE.

START BUILDING AGENTS THAT DO REAL WORK.

Deploy Your First Agent