Skip to content

Revenue attribution setup

Connect Lemon Squeezy for revenue attribution

Paste an API key and Thexly registers its own webhook and imports your recent orders automatically.

Unlike Stripe, Lemon Squeezy doesn't offer a read-only or permission-scoped key today. Every key it issues has full account access. The key you paste here could, in principle, do anything your Lemon Squeezy account can do. Thexly only ever makes read requests with it (plus registering its own webhook), but that's a promise about what Thexly's code does, not a restriction Lemon Squeezy enforces on the key itself.

What you'll need

A Lemon Squeezy account with dashboard access.

Steps

  1. 1
    In your Lemon Squeezy dashboard, go to Settings → API.
  2. 2
    Click to create a new API key.
  3. 3
    Give it a clear, identifiable name; Lemon Squeezy doesn't let you rename it later.
  4. 4
    Copy the key immediately; it's shown only once.
  5. 5
    Paste it into Thexly under Settings → Payments → Lemon Squeezy.

What Thexly does with this connection

Thexly reads your store's orders and subscriptions and matches them against sessions your tracking script captured; see how Thexly assigns revenue to a channel for the full mechanism. The only write call Thexly makes with this key is registering its own webhook endpoint on connect (and removing it if you disconnect). It never creates, modifies, or refunds an order.

Thexly's tracking script automatically appends the visitor's session to any Lemon Squeezy checkout link on your page before they click it, so most stores need no extra code. If you generate checkout URLs yourself (server-side), pass the session as checkout[custom][thexly_session_id]. Call window.thexly.getSessionId() from your checkout page to get it.

Troubleshooting

  • Key rejected on save: check for extra whitespace copied along with the key; Lemon Squeezy keys are long and easy to truncate when copying.
  • Lost your key: Lemon Squeezy can't show it to you again. Go back to Settings → API, remove the old one, and create a fresh key.

What's next

← Back to Docs