Theme

Start for free

Integrations ยท Payment providers

Lemon Squeezy orders and renewals, linked to their visits.

Connect a Lemon Squeezy store with an API key. Tally reads orders and subscription invoices with their refunds, and links each sale to the visitor whose id came through the checkout's custom data, or by the buyer's email.

Start for free

14 days free, no card needed.

01What Tally reads

  • Orders as new sales, and subscription invoices as renewals or plan changes; a subscription's first payment is counted once, as its order.
  • Refunds, full or partial, from the running refunded total Lemon Squeezy keeps, so each new total adds only what changed.
  • Test-mode and live stores alike: the key's own mode decides.
  • Amounts without tax, in US cents at the day's reference rate.

02How a sale finds its visit

  • Checkout link custom dataAdd checkout[custom][tally_visitor_id] to a checkout link, or set it in checkout_data.custom when your server creates the checkout.
  • EmailThe buyer's email, hashed, matches a tally('identify') call. It's the only link for orders made before you connected.
  • Renewals and refundsA subscription invoice takes the link of its first order; a refund counts against the order or invoice it belongs to.

03What it can't read

  • Lemon Squeezy reports no chargebacks: it refunds a disputed order itself, and that arrives as a refund.
  • Its API doesn't return custom data, so orders from before you connected can link by email only.
  • The snippet doesn't tag Lemon Squeezy checkout links on its own; the Coverage page gives the few lines that do.
  • API keys have no scopes, so the least access is a key made only for Tally, which nothing else uses.

04Connecting it

  1. In Lemon Squeezy, open Settings, API, and create a key just for Tally.
  2. Paste it on your site's Integrations page. A key sees every store of its account, so name the store when there's more than one.
  3. Tally creates a webhook for that store with a secret of its own and imports the past 365 days.
  4. Add the visitor's id to your checkout links or checkout_data, as the Coverage page shows.

What the API key needs

Tally asks for a API key that can do only this, and checks each permission with a real call when you paste it, so a missing one is named:

PermissionAccessWhy
OrdersReadEvery sale: its amount, tax and refunds, and the customer's email (hashed at once, never stored).
Subscription invoicesReadRenewals and plan changes.
WebhooksWriteTally adds its own webhook to the store, so payments arrive within seconds.

Where to make it: Lemon Squeezy, Settings, API.

05Questions

  • Can I connect more than one Lemon Squeezy store?

    Each store feeds one site. A key that sees several stores asks which one you mean, by id, slug, domain or name, and a store already feeding another site is refused.

  • How are partial refunds counted?

    Lemon Squeezy keeps a running refunded amount instead of separate refunds, so Tally stores each new total as what it adds. Seen in any order, the webhook and the import end at the same sum, with tax refunded in proportion.

  • Why don't old orders have a source?

    Lemon Squeezy's API doesn't return the custom data a checkout carried, so orders from before you connected can only link by the buyer's email. Orders from then on carry the visitor's id.