LemonSqueezy Integration
Connect your LemonSqueezy account to Windback via the custom webhook endpoint to detect subscription cancellations, failed payments, and successful recoveries.LemonSqueezy does not have a native Windback integration. This guide uses a lightweight Node.js relay function that receives LemonSqueezy webhooks and forwards them to Windback’s custom webhook endpoint.
Webhook URL
Your Windback custom webhook URL is:pub_ and is found in Settings > API Keys.
Setup
1
Deploy the Relay Function
Deploy the Node.js relay function below to your server or a serverless platform (Vercel, AWS Lambda, etc.). This function receives LemonSqueezy webhooks, maps the payload, and forwards it to Windback.
2
Add the Webhook in LemonSqueezy
- Go to LemonSqueezy Dashboard > Settings > Webhooks
- Click Add Webhook (or the + button)
- Paste the URL of your deployed relay function
- Enter a signing secret and store it securely
- Select the events listed below
- Click Save
3
Select Webhook Events
Enable the following events in LemonSqueezy:
4
Verify the Connection
- Create a test subscription in LemonSqueezy’s test mode
- Cancel the subscription to trigger a
subscription_cancelledevent - Check your Windback dashboard for the new churn event
Data Mapping
LemonSqueezy webhooks use a nesteddata.attributes format. The relay function maps these fields to Windback’s custom webhook format:
Relay Function
Webhook Resilience
Windback’s custom webhook endpoint always returns HTTP 200 regardless of internal processing status. Your relay function should also always return 200 to LemonSqueezy to prevent webhook retries and eventual deactivation.
LemonSqueezy signs webhook payloads using an HMAC signature in the
X-Signature header. We strongly recommend verifying this signature in your relay function before forwarding to Windback. See LemonSqueezy’s webhook docs for details.