Complete step-by-step guide to integrating Lemon Squeezy payments into your WooCommerce store
You're about to set up the WooCommerce Lemon Squeezy Payment Gateway developed by Devtonic Studios. This plugin bridges your WooCommerce store with Lemon Squeezy's powerful payment processing API.
This guide will walk you through every step - from prerequisites to going live. Let's get started!
Devtonic Studios built this plugin to connect WooCommerce with Lemon Squeezy. We are not affiliated with Lemon Squeezy. We simply built the bridge between the two platforms.
Customer shops and checks out
Routes payment to Lemon Squeezy
Processes the payment
| Requirement | Minimum | Recommended |
|---|---|---|
| WordPress | 5.8+ | Latest version |
| WooCommerce | 6.0+ | Latest version |
| PHP | 7.4+ | 8.0 or higher |
| SSL Certificate | Required (HTTPS) | |
Lemon Squeezy requires HTTPS for webhook communication. Your site MUST have a valid SSL certificate installed before proceeding.
Screenshot: Lemon Squeezy Dashboard - Store Settings ( Store ID )
API Key Format: lmsq_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Screenshot: Generate Your API Key
Keep your API key confidential. Never share it publicly or commit it to version control.
wc-lemon-squeezy.zip
Screenshot: Lemon Squeezy Plugin Successfully Activated
After activation, check:
Screenshot: WooCommerce Payments Tab
Configure these essential fields:
| Setting | What to Enter | Example |
|---|---|---|
| Enable/Disable | Check to enable | ✓ Enabled |
| Title | Name shown to customers | "Credit Card" |
| Description | Checkout description | "Secure payment processing" |
| API Key | From Prerequisites Step 2 | lmsq_xxxxx... |
| Store ID | From Prerequisites Step 1 | 12345 |
Screenshot: Basic Settings Configuration
For safe testing without real transactions:
Never skip test mode. Test with Lemon Squeezy's test card numbers before processing real payments.
Screenshot: WooCommerce → Lemon Squeezy - Quick Actions Section
✓ Connection Successful!
Store ID: 12345
Store Name: Your Store Name
API Status: Active
Double-check your API Key and Store ID for typos. Ensure no extra spaces. Verify SSL certificate is valid.
Webhooks notify your store instantly when payments are processed, refunds occur, subscription events happen, or license keys are generated. They're essential for real-time order updates.
The easiest way to set up your webhook - one click and the plugin does everything for you.
Screenshot: Click "Register Webhook on Lemon Squeezy" - one click sets up everything
Auto-registration handles everything. No need to copy URLs or secrets between dashboards. You can skip to the Product Mapping section.
If auto-registration doesn't work or you prefer manual control, follow these steps instead.
https://yoursite.com/wp-json/wc-lemon-squeezy/v1/webhookhttps://yoursite.com/wp-json/wc-lemon-squeezy/v1/webhook
Screenshot: Get Your Webhook URL from WordPress Site
Only check the events that match the type of products you're selling. Don't select subscription events if you only sell one-time purchases, and vice versa.
Screenshot: Lemon Squeezy Webhook Configuration
The webhook secret validates that requests are genuinely from Lemon Squeezy. Every incoming webhook is verified using HMAC signatures. Never skip this step!
Each WooCommerce product must be linked to a Lemon Squeezy product variant. This tells the plugin which Lemon Squeezy product to charge for each item.
The fastest way to connect your products - the plugin pulls everything from Lemon Squeezy automatically.
Screenshot: Click "Sync Now" to pull all products from Lemon Squeezy
After syncing, the plugin replaces the manual Variant ID text field with a dropdown on every product.
Screenshot: Select your Lemon Squeezy variant from the dropdown on the General tab
Screenshot: Each variation has its own "LS Variant" dropdown
No dropdown? Sync your products first. Go to WooCommerce → Lemon Squeezy and click Sync Now.
Fallback logic: If a variation doesn't have its own variant set, the plugin uses the parent product's variant from the General tab.
If you prefer to map products manually, follow these steps.
Screenshot: Lemon Squeezy Product Creation and Product Variant ID
Screenshot: Paste Your Variant ID in the Product Data Section
Variable products? Each variation has its own Variant ID field. Edit variations individually and paste the matching ID. If a variation has no ID, the plugin falls back to the parent product's ID.
The plugin supports two checkout modes. You can switch between them anytime in settings.
Checkout opens as a popup directly on your site. Customers never leave your page - they pay inside the overlay, it closes, and they're back on your store.
Lemon.js script to open the checkout popupCustomers are sent to Lemon Squeezy's hosted checkout page. They pay there and get redirected back to your store when they're done.
Screenshot: Checkout Mode setting - choose Overlay or Redirect
The plugin has three toggle settings that control how the Lemon Squeezy checkout page looks. These settings work with both overlay and redirect mode.
| Setting | What It Does | Default |
|---|---|---|
| Dark Mode Checkout | Switches the checkout to a dark theme | Off |
| Show Store Logo | Displays your store logo on the checkout page | On |
| Show Product Image | Displays the product image during checkout | On |
All three settings are simple checkboxes found in the plugin settings under WooCommerce → Settings → Payments → Lemon Squeezy → Manage.
If your Lemon Squeezy products generate license keys, the plugin captures them automatically via webhook and stores them on the WooCommerce order.
When Lemon Squeezy generates a license key for a sale, the plugin stores the following on the WooCommerce order:
Make sure you have license_key_created and license_key_updated webhook events enabled (the auto-register option handles this for you). When a key is updated on Lemon Squeezy's side, the plugin updates the stored data on the WooCommerce order automatically.
The plugin handles the full subscription lifecycle. All subscription events from Lemon Squeezy sync automatically to your WooCommerce orders.
The plugin handles all of these subscription events via webhooks:
When a subscription is created or updated, the plugin stores the following on the WooCommerce order: subscription ID, status, product/plan name, renewal date, end date, trial end date, payment method (card brand + last 4 digits), and pause details if applicable.
Customers can manage their subscriptions directly from their WooCommerce My Account page:
You don't need WooCommerce Subscriptions or any other subscription plugin. This plugin handles subscription lifecycle events directly via Lemon Squeezy webhooks.
You can set a Lemon Squeezy discount code in the plugin settings to apply automatically to every checkout.
The discount code will now be applied to every checkout session automatically. Customers will see the discounted price on the Lemon Squeezy checkout page.
This field is optional. Leave it empty if you don't want a default discount. You can always change or remove it later.
Always test thoroughly before processing real customer payments. This prevents payment issues and customer frustration.
Card: 4242 4242 4242 4242
Expiry: Any future date
CVC: Any 3 digits
ZIP: Any 5 digits
If you plan to use overlay mode, test it separately. Try switching between overlay and redirect mode to make sure both work correctly with your theme.
If webhooks fail, verify your webhook secret is correct and your SSL certificate is valid. If you used auto-registration, try re-registering the webhook.
Ensure your API key and webhook secret are for LIVE mode, not test mode. Check Lemon Squeezy dashboard to confirm.
Congratulations! Your WooCommerce store is now accepting payments through Lemon Squeezy. Monitor your orders and reach out if you need any support.
HMAC signature validation on all webhooks, encrypted API communication, and PCI-compliant payment handling.
Instant order updates via webhooks. Orders, subscriptions, and license keys all update automatically.
Process full and partial refunds directly from WooCommerce admin with automatic sync to Lemon Squeezy.
Safe testing environment with visual indicators. Test entire payment flow without real transactions.
Comprehensive logging tracks all API calls, webhook events, and errors for easy troubleshooting.
Full support for both WooCommerce Block-based checkout and classic checkout for maximum compatibility.
The plugin handles the refund on both WooCommerce and Lemon Squeezy. You don't need to process it separately in the LS dashboard.
Refunds are processed immediately through the API. Customer sees refund in 5-10 business days depending on their bank.
The plugin provides action hooks and filter hooks for developers who need to run custom code when events happen or modify plugin behavior.
These fire after the plugin processes a webhook event. Use them to run custom code - like syncing data to a CRM, sending custom notifications, or updating external systems.
wcls_order_created
wcls_order_refunded
wcls_subscription_created
wcls_subscription_updated
wcls_subscription_cancelled
wcls_subscription_paused
wcls_subscription_unpaused
wcls_subscription_resumed
wcls_subscription_expired
wcls_subscription_payment_success
wcls_subscription_payment_failed
wcls_subscription_payment_recovered
wcls_license_key_created
wcls_license_key_updated
All action hooks receive three parameters: $order (WooCommerce order object), $event_data (Lemon Squeezy event data), and $full_payload (complete webhook payload). The license key hooks receive $order, $license_key (or $event_data), and $event_data.
Use these to customize plugin behavior without editing plugin files.
| Filter | What It Does | Default |
|---|---|---|
wcls_button_color |
Change the checkout button color | #7C3AED |
wcls_is_available |
Control when the payment gateway shows up | true (when enabled) |
wcls_icon |
Swap the gateway icon shown at checkout | Credit card icons |
wcls_checkout_expiry_seconds |
How long checkout URLs stay valid | 1800 (30 minutes) |
wcls_default_variant_id |
Set a fallback variant ID when none is configured | Empty string |
Problem: Connection test returns an error
Solutions:
Problem: Order stays pending after checkout
Solutions:
Problem: Orders not updating automatically
Solutions:
Problem: Popup doesn't appear in overlay mode
Solutions:
lemonsqueezy.com scriptsProblem: License key not showing on order
Solutions:
license_key_created webhook event is enabledProblem: Error about product not found
Solutions:
Problem: Cannot process refund
Solutions:
Enable debug logging, reproduce the issue, and check logs at WooCommerce → Status → Logs. Then contact support with log excerpts.
Devtonic Studios
For plugin issues, configuration help, product mapping, or technical problems:
Email Plugin SupportLemon Squeezy
For Lemon Squeezy account issues, fees, payouts, or their platform:
Lemon Squeezy HelpPlease enable debug logging, reproduce the issue, and check logs at WooCommerce → Status → Logs. Include relevant log excerpts when contacting support.