LemonSqueezy
Integrating LemonSqueezy with RefRef for payment processing and referral tracking
RefRef offers a seamless integration with LemonSqueezy to track purchases, manage subscriptions, and automate referral rewards for your digital products and services.
Overview
The LemonSqueezy integration enables you to:
- Track product purchases as qualifying events for referrals
- Monitor subscription sign-ups and renewals
- Automatically issue rewards based on purchase activity
- Sync customer data between platforms
- Leverage LemonSqueezy's affiliate system alongside RefRef
Prerequisites
Before setting up the LemonSqueezy integration, you'll need:
- An active LemonSqueezy account
- API keys from your LemonSqueezy dashboard
- Administrator access to your RefRef account
- Products or subscriptions set up in LemonSqueezy
Setting Up the Integration
Step 1: Connect Your LemonSqueezy Account
- Navigate to Integrations in your RefRef dashboard
- Select LemonSqueezy from the available integrations
- Click Connect with LemonSqueezy
- Enter your LemonSqueezy API key
- Authorize the connection between platforms
Step 2: Configure Webhook Events
RefRef needs to listen for specific events from LemonSqueezy:
- In the LemonSqueezy integration settings, review the webhook configuration
- Ensure the following events are enabled:
order_created
subscription_created
subscription_updated
subscription_cancelled
subscription_resumed
- Save your webhook configuration
Step 3: Map LemonSqueezy Products to Qualifying Events
Connect your LemonSqueezy products and subscriptions to RefRef qualifying events:
- Go to Qualifying Events in your program settings
- Select Add LemonSqueezy Event
- Choose the products or subscriptions that should trigger referral conversions
- Configure conversion rules and reward values
- Set attribution windows and validation criteria
Tracking Referrals with LemonSqueezy
One-time Purchases
For tracking one-time product purchases:
- Add the referral identifier to the checkout URL or custom data
- RefRef will automatically attribute the purchase to the referrer
- Configure reward rules based on product or purchase amount
Example of adding referral data to a LemonSqueezy checkout URL:
Subscription Tracking
For subscription-based products:
- Configure which subscription events trigger conversions
- Set rules for initial subscription vs. recurring payments
- Define reward structures for different subscription tiers
- Establish rules for subscription upgrades or downgrades
Processing Rewards
RefRef can automatically process rewards based on LemonSqueezy transactions:
Cash Rewards
For monetary rewards to referrers:
- Configure payout methods in RefRef
- Set up automatic or manual approval workflows
- Define payout schedules and thresholds
- Configure notification templates for reward issuance
Product Rewards
For product-based rewards:
- Configure discount codes or free product access
- Set up automatic license key generation if applicable
- Define product access rules and durations
- Establish delivery methods for digital product rewards
Advanced Configuration
Custom Data Mapping
Map custom fields between LemonSqueezy and RefRef:
- Navigate to Data Mapping in your integration settings
- Define how customer data should sync between platforms
- Configure custom field mappings for enhanced tracking
- Set up data transformation rules if needed
Multi-product Campaigns
For businesses with multiple products:
- Create product-specific referral campaigns
- Configure different reward structures by product
- Set up targeted promotional materials for each product
- Track performance metrics by product category
Webhooks and API
RefRef to LemonSqueezy
RefRef can send data to LemonSqueezy for:
- Creating discount codes
- Updating customer information
- Generating license keys
- Modifying subscription features
LemonSqueezy to RefRef
LemonSqueezy sends webhook events to RefRef for:
- Order confirmation
- Subscription status changes
- Refund processing
- Customer updates
Troubleshooting
Common issues and solutions:
- Missing Webhooks: Verify webhook configuration in LemonSqueezy
- Attribution Errors: Check referral parameter passing in checkout URLs
- Duplicate Events: Check webhook configuration for duplicate notifications
- Data Syncing Issues: Verify API permissions and field mappings
Best Practices
- Test the integration thoroughly in LemonSqueezy's test mode before going live
- Use consistent naming conventions for custom fields
- Implement proper error handling for webhook processing
- Regularly audit referral attributions and rewards
- Monitor webhook delivery and processing in both systems
Use Case: Digital Product Creator
Learn how DesignAssets Pro increased their digital product sales by 47% by implementing a referral program through the RefRef-LemonSqueezy integration, offering a 30% commission to referrers and a 15% discount to referred customers.