Integration · Lemon Squeezy

Lemon Squeezy revenue, attributed across the checkout boundary.

Lemon Squeezy's checkout lives on a different domain (or in an iframe). Cookies don't cross. TrackRev solves it by piping your first-party visitor id into Lemon Squeezy's `custom_data` at checkout open — and reading it back when the order webhook fires.

Revenue · last 10 days
Cross-domain attribution

The visitor id bridges your site and Lemon Squeezy.

Lemon Squeezy's overlay loads in an iframe; the hosted page redirects to a different origin. Either way, the third-party cookie story is fragile. So the TrackRev pixel hands the first-party visitor id to your Lemon Squeezy checkout JS at the moment of the open call — and Lemon Squeezy carries it through to the webhook.

  • Visitor id is a first-party cookie on your apex domain (survives ITP, ad-blockers)
  • Passed via Lemon Squeezy's checkout custom_data — preserved on order + subscription
  • Webhook delivers the visitor id back, joined to the click in seconds
Top channels · 30 days
Newsletter4,212$8,420
Facebook3,108$5,140
YouTube1,927$3,860
Direct1,512$1,910
Taxes, sorted

Tax-exclusive subtotal. Your channels reflect real revenue.

Lemon Squeezy is a merchant of record — they handle VAT, US sales tax, the lot. TrackRev reads the order subtotal (tax-exclusive) so a $19 product that the buyer pays $22.61 for after VAT shows up as $19 against the channel that drove it. Your books match Stripe's revenue recognition, not the checkout total.

  • Revenue = Lemon Squeezy's subtotal (pre-tax, pre-discount)
  • Multi-currency: native currency stored, USD at daily ECB rate for totals
  • Refunds via order_refunded reverse revenue + commissions
Revenue · last 10 days
Subscription lifecycle

Every renewal stays bound to its original click.

Lemon Squeezy stamps the subscription with the initial order's custom_data. Every `subscription_payment_success` event carries it forward, so a Newsletter signup that becomes a $39 monthly subscription credits Newsletter on month 1 — and month 12. Cancellations and refunds reverse the credit; resumptions restore it.

  • Full webhook coverage: created, updated, payment_success, cancelled, resumed
  • Recurring multiplier configurable per program (one-time, N months, lifetime)
  • Plan changes update attributed MRR without losing channel history
Top channels · 30 days
Newsletter4,212$8,420
Facebook3,108$5,140
YouTube1,927$3,860
Direct1,512$1,910
Setup

Lemon Squeezy + TrackRev in 3 steps.

Drop the pixel, pipe the visitor id into checkout, point a webhook at us. Works for overlay and hosted.

1

Drop the first-party pixel

Sets a first-party cookie on your apex domain. Exposeswindow.trackrev.visitorId()for your checkout JS to read.

Your site (once)
<script async
  src="https://trackrev.io/p.js"
  data-workspace="ws_..."
  data-cookie-domain=".yoursite.com"></script>
2

Pass the visitor id into Lemon Squeezy checkout

For overlay checkouts (Lemon.js), setcheckoutData.custombefore opening. For hosted checkouts, append it as a query parameter on the buy URL.

Overlay (Lemon.js)
// Overlay checkout (Lemon.js) — drop the visitor id into custom_data.
LemonSqueezy.Url.Open({
  productPermalink: "https://yourstore.lemonsqueezy.com/checkout/buy/...",
  checkoutData: {
    email: user.email,
    custom: {
      trackrev_visitor_id: window.trackrev?.visitorId() ?? null,
    },
  },
});
Hosted checkout (query param)
// Hosted checkout — append the visitor id as a query param.
const visitorId = window.trackrev?.visitorId();
const url = new URL("https://yourstore.lemonsqueezy.com/checkout/buy/PRODUCT");
if (visitorId) {
  url.searchParams.set("checkout[custom][trackrev_visitor_id]", visitorId);
}
window.location.href = url.toString();
3

Point a Lemon Squeezy webhook at TrackRev

Signed with your Lemon Squeezy signing secret, idempotent on event id. Replays and out-of-order deliveries are safe.

Lemon Squeezy → Settings → Webhooks
# Lemon Squeezy Dashboard → Settings → Webhooks → + button:

https://api.trackrev.io/webhooks/lemon-squeezy/ws_xxxx

# Events:
order_created
order_refunded
subscription_created
subscription_updated
subscription_payment_success
subscription_cancelled
What TrackRev tracks from Lemon Squeezy

The Lemon Squeezy data we listen for.

Orders

Subtotal (tax-exclusive), native currency, custom_data — joined to a click on every order_created event.

Subscriptions

Full lifecycle: created, updated, payment_success, cancelled, resumed — renewals inherit the original click.

Overlay + hosted

Same flow whether your customer checks out in the Lemon.js overlay or on a hosted Lemon Squeezy URL.

Refunds

order_refunded reverses revenue and pending affiliate commissions on the next sync tick.

Multi-currency

Native currency stored per order, USD via daily ECB rate for cross-currency channel totals.

Merchant of record

Tax-exclusive subtotal is the revenue figure — VAT and sales tax don't inflate your channel math.

Lemon Squeezy + affiliate program

Run an affiliate program on Lemon Squeezy. Pay on tax-exclusive revenue.

Pro-tier workspaces flow Lemon Squeezy orders through the same commission ledger as Stripe, Paddle, and Polar. A partner's tagged TrackRev link drops the visitor id into Lemon Squeezy's custom_data; the order webhook closes the loop; commissions accrue on the tax-exclusive subtotal — not on the inflated checkout total.

  • Commissions accrue from real Lemon Squeezy orders, not raw clicks
  • Subscription renewals carry the original commission forward
  • order_refunded reverses pending payouts automatically
  • Monthly payouts via Stripe invoice, PayPal Payouts, or manual CSV
Top channels · 30 days
Newsletter4,212$8,420
Facebook3,108$5,140
YouTube1,927$3,860
Direct1,512$1,910

Lemon Squeezy integration FAQ

Lemon Squeezy is a merchant of record — they collect and remit VAT and US sales tax for you. TrackRev reads the order's `subtotal` (the tax-exclusive amount), so per-channel revenue reflects what you actually earned, not what the customer paid at checkout including tax.

Connect Lemon Squeezy. Find out which channel earned each order.

Works with overlay and hosted checkouts. Free tier covers 1,000 events / month. No card to start.