Skip to main content

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.

How it connects

The visit travels with the payment.

The visit’s session travels with the payment and comes back in the signed webhook.

  1. 1The visit

    The tracker gives each visit a session id, with no cookies.

    window.vero.session()
  2. 2The Lemon Squeezy checkout

    The checkout module adds the session to the checkout link at the click.

    checkout[custom][vero]
  3. 3The signed webhook

    Lemon Squeezy posts the sale to Vero, signed with your site’s secret.

    x-signature
  4. 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
Set it up

Three steps, no code.

  1. 1Add a Lemon Squeezy webhook pointing to Vero with order_created, order_refunded, subscription_payment_success and subscription_payment_refunded; the signature is verified on every event.
  2. 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.
  3. 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.
URL for Lemon Squeezy
https://[your-vero-host]/api/revenue/lemonsqueezy?s=YOUR_SITE_TOKEN
Lemon Squeezy events
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
Lifecycle

One sale, from first payment to dispute.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

Help

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.

Attribute your Lemon Squeezy revenue

By joining you agree to receive launch updates and accept our Privacy Policy.

See the demo