Supported LemonSqueezy methods
- LemonSqueezy Checkout - Hosted checkout pages
- Payment Links - Shareable payment links
- Other LemonSqueezy methods - Any LemonSqueezy payment method
Setup
Step 1: Get your webhook URL
Your webhook URL is:Step 2: Configure LemonSqueezy webhook
- Go to your LemonSqueezy Dashboard
- Click “Create webhook”
- Enter your webhook URL:
https://your-domain.com/api/webhooks/lemonsqueezy - Select events to listen for:
order_createdorder_updatedsubscription_createdsubscription_updated
- Copy the Signing secret (you’ll need this for verification)
Step 3: Add webhook secret to environment
Add your LemonSqueezy webhook secret to your environment variables:LemonSqueezy Checkout
Include website ID in product options
When creating a checkout, include the website ID in product options:Redirect to checkout
Payment Links
For Payment Links, include the website ID in the product options when creating the link:- Go to your LemonSqueezy Dashboard
- Create a Payment Link
- In the product options, add:
websiteId: 'your-website-id'
- Enable user identification in PostMetric
- Identify users before they purchase
- Payments will be linked via email matching
View revenue data
Once payments are linked, you can view:- Revenue by source/channel
- Revenue by campaign
- Conversion rates
- Average order value
Subscriptions
Subscription events are tracked separately. When a subscription is created or updated, it’s recorded in PostMetric. You can track recurring revenue separately from one-time payments.Troubleshooting
Payments not appearing
- Check that the webhook is configured correctly
- Verify the
websiteIdis included in product options or metadata - Check webhook logs in LemonSqueezy Dashboard
- Verify the webhook secret is set correctly
Payments not linked to visitors
- Ensure visitor/session IDs are included in product options
- Enable user identification for email matching fallback
- Check that the visitor was tracked before the payment
Next steps
Revenue attribution guide
Learn more about revenue attribution