Tie Lemon Squeezy sales to the channel that earned them.
Vero verifies every Lemon Squeezy webhook and records the order with the visit that brought it: the tracker adds the session to your checkout links.
The visit travels with the payment.
The visit’s session travels with the payment and comes back in the signed webhook.
- 1The visit
The tracker gives each visit a session id, with no cookies.
window.vero.session() - 2The Lemon Squeezy checkout
The checkout module adds the session to the checkout link at the click.
checkout[custom][vero] - 3The signed webhook
Lemon Squeezy posts the sale to Vero, signed with your site’s secret.
x-signature - 4Revenue by source
Vero joins the sale to its visit: source, campaign, referrer, channel and entry page, without tax and less refunds.
POST /api/revenue/lemonsqueezy?s=SITE_TOKEN
Three steps, no code.
- 1Add a Lemon Squeezy webhook pointing to Vero with
order_created,order_refunded,subscription_payment_successandsubscription_payment_refunded; the signature is verified on every event. - 2Turn on the tracker’s checkout module: a click on a checkout link adds checkout[custom][vero] with the session, and Vero reads it back from the webhook’s custom data.
- 3Orders and renewals are stored without tax, and a renewal keeps the source of the customer’s first attributed payment. Revenue rolls up by source, campaign, referrer, channel and entry page.
https://[your-vero-host]/api/revenue/lemonsqueezy?s=YOUR_SITE_TOKEN
order_created order_refunded subscription_payment_success subscription_payment_refunded
What you get
- HMAC signature verification on every webhook
- Orders, renewals and refunds recorded, duplicates ignored
- Attribution by source from the checkout link itself
- Cookie-free, no IP stored
One sale, from first payment to dispute.
- 1The first sale
In the fictional public demo, a visit from news.ycombinator.com ends in a €99 purchase. The click on the checkout link carries the visit, order_created brings it back in meta.custom_data.vero, and Vero stores the order without tax under that source. For a subscription, this order is the first payment: the subscription_payment_success with billing_reason initial is skipped, so it counts once.
- 2A renewal
If that customer renews, subscription_payment_success arrives. When it carries no visit, Vero matches the Lemon Squeezy customer id and credits the renewal to the source of their first attributed payment.
- 3A refund
If that customer is refunded, order_refunded or subscription_payment_refunded arrives. Lemon Squeezy reports the refunded amount as a running total, so Vero subtracts only what is new. It comes off the sale’s source, without tax, in the sale’s own proportion.
- 4A dispute
Vero subtracts refunds only. A dispute or a chargeback is not deducted, so a disputed order stays in its source’s revenue. Each event counts once, and if Vero fails while processing one it answers with a 5xx, so Lemon Squeezy retries instead of the sale being lost.
When the numbers do not add up.
The card says “Last attempt rejected: invalid signature”
Lemon Squeezy signs every webhook in X-Signature, an HMAC-SHA256 of the raw body made with the webhook’s signing secret. Vero checks it with the secret saved in Vero, so both must be the same string. Set the secret again in the webhook, paste the same value in Vero and send a test order.
An order counts in the total but has no source
The order came back without meta.custom_data.vero. The checkout module adds checkout[custom][vero] when a visitor clicks a checkout link, so a checkout opened any other way, or with the module off, carries no visit. The order still counts, and takes the source of the customer’s earlier attributed payment when there is one.
A test order adds nothing to revenue
An order with test_mode set is acknowledged with a 200 and not counted, and the card shows “Last attempt ignored: test mode”. That proves the URL and the secret work. If nothing shows at all, check the URL: a wrong site token after ?s= gets a 404, and a missing one a 400.
How is the webhook verified?
Vero verifies the Lemon Squeezy HMAC signature against a per-site secret, stored encrypted, and rejects unsigned or mismatched events.
Which Lemon Squeezy events does Vero accept?
order_created, order_refunded, subscription_payment_success and subscription_payment_refunded. The first payment of a subscription counts once, from its order. Every other event is ignored.
Any cookies involved?
None. The session travels in the checkout link and comes back in the signed webhook.
Keep reading
- Revenue webhooksEvents, signatures, refunds and test mode, provider by provider.
- Install the trackerAttribution starts at the visit: one tag on your site, no cookies.
- Connect your payment provider and pass the visit idPaste one webhook URL into Stripe, Lemon Squeezy or Paddle and pass the visit id at checkout. Each sale arrives with its source.
- How to attribute revenue without cookiesAttribution does not need a persistent identifier. It needs to connect a payment back to the visit that caused it, and that works server-side, at the moment of payment.
- Ship one script. See what makes money.Cookie-free analytics for indie hackers: revenue attribution, a script from 1.2 KB, an MCP server for Claude and Cursor, and a Hobby plan at €0.