Connect Lemon Squeezy
No API key needed. You add one webhook in Lemon Squeezy with a URL and a secret from your Checkout Sync settings.
- In your Checkout Sync settings, press Connect a checkout, then Lemon Squeezy, then Connect Lemon Squeezy. You'll see a URL and a signing secret.
- In Lemon Squeezy, open Settings → Webhooks and press the + button.
- Paste the URL into Callback URL and the secret into Signing secret.
- Tick these events:
order_created,order_refunded,subscription_created,subscription_updated,subscription_cancelled,subscription_expired,subscription_resumed,subscription_payment_success,subscription_payment_failed,subscription_payment_refunded. - Save the webhook.
To check it works, make a test-mode purchase in Lemon Squeezy. It shows up under Recent activity within a few seconds and doesn't count toward your plan.
Good to know
- Renewals update the buyer's fields but don't join groups again, so your welcome emails don't repeat every month. Lemon Squeezy sends the product name a moment after the payment, so a renewal can take a few seconds longer to show up.
- For failed payments,
{$checkout_update_payment_url}is the buyer's customer portal, where they sign in by email and update their card. Cancellations fill{$checkout_manage_url}with the same page. - A cancellation keeps the buyer's access until the period ends: that day goes in
{$checkout_ends_on}right away and they join Canceled (from Lite; on Free the fields are written but no group is joined), and{$checkout_status}turns to canceled when Lemon Squeezy says the subscription expired. - Groups and
{$checkout_product}use the product's name, like Budget Club. The variant (Yearly) goes in{$checkout_plan}, unless it's called Default, so every variant shares one Bought: group.
Import past customers
The webhook only sees new events. To bring in buyers from before:
- In Lemon Squeezy, open Settings → API and press the + button. Name the key Checkout Sync import and create it.
- In your Checkout Sync settings, under Import past customers, pick how far back to go, paste the key and press Import.
We use the key only for that import and delete it when the import ends (2 days at most). You can delete it in Lemon Squeezy afterwards too. Imported buyers get their fields filled in and join no groups unless you tick Also put them in my groups. Imports don't count toward your plan. MailerLite's anti-spam policy only lets you email buyers from the last 2 years without other permission, so if you tick the box, keep the range to a year or less ("Everything" is refused with it).