How to Connect Lemon Squeezy to Chartsy
To connect Lemon Squeezy to Chartsy, you create one API key in Lemon Squeezy, paste it into Chartsy and check the fee rate. Chartsy then imports each store's products, customers, subscriptions and payments, adds a webhook so new payments show up as they happen, and turns it all into MRR, churn, LTV and net revenue - across subscriptions and one-time sales.
One API key sees every store on your Lemon Squeezy account, and each store is connected as its own data source with its own name. All Accounts adds them up - together with any Stripe, Paddle, Freemius, Polar or Creem accounts you have connected.
Before You Start
- A Lemon Squeezy account with at least one live store
- Your Lemon Squeezy fee rate, if you agreed one other than the standard 5% + $0.50
- A Chartsy account (sign up free)
Match Lemon Squeezy Revenue to Marketing Channels
If you track your website with Chartsy, set the site's Revenue account to your Lemon Squeezy store under Settings → domains. Then pick whichever fits how you sell:
Checkout links - no code
In Lemon Squeezy, open each product and set the Button Link of both the Confirmation Modal and the Email Receipt to a page on your site that has the Chartsy tag, ending in ?order_id=[order_id]&order_identifier=[order_identifier] - for example https://yoursite.com/thank-you?order_id=[order_id]&order_identifier=[order_identifier]. Lemon Squeezy fills both in. When the buyer lands, Chartsy looks up the order and credits it to the visit that brought them, even if they never signed up. Keep order_identifier: it proves the link came from the purchase.
Checkouts created from your server
Add the visitor's chartsy_visitor_id cookie to the checkout's custom data:
// Lemon Squeezy hands checkout custom data to Chartsy's webhook
import { createCheckout } from '@lemonsqueezy/lemonsqueezy.js';
await createCheckout(storeId, variantId, {
// ...your existing options
checkoutData: { custom: { chartsy_visitor_id: req.cookies.chartsy_visitor_id || '' } },
});Lemon Squeezy passes custom data only to webhooks, so this works for purchases made after you connect. Both methods match by visitor id, so they keep working with GDPR Mode on. Buyers are also matched by email to people who signed up, unless GDPR Mode is on. Limits and details are in the revenue attribution guide.
Troubleshooting
- "Lemon Squeezy rejected this API key" - create a new key in Lemon Squeezy → Settings → API and paste it in full. Keys expire after a year.
- "That's a test-mode key" - switch Lemon Squeezy out of test mode, then create a new key.
- "This API key can't see any store" - create the key while signed in to the account that owns your store.
- "This API key can't see a store …" - the Store ID doesn't match one of the key's stores. The message lists the ones it can see.
- "… already connected" - each store can be connected once, even with a new key, so its numbers are never doubled.
- Net revenue looks off - check the fee rate on the store's card against a payment in Lemon Squeezy.
- New payments stopped showing up - the webhook may have been removed, or the API key expired. Click Sync now to restore the webhook and catch up.
What's Next?
- See what Chartsy tracks for Lemon Squeezy on the Lemon Squeezy analytics page
- Check exactly what is synced in Lemon Squeezy data models
- Learn how data sources combine under All Accounts
- Ask questions with the Chartsy AI chatbot


