Lemon Squeezy
Connect Lemon Squeezy as a payment provider in PayGlue.
Lemon Squeezy is a fully supported payment provider in PayGlue. A purchase triggers automatic Ghost membership creation with labels and a welcome email.
Prerequisites
- A Lemon Squeezy account at lemonsqueezy.com
- At least one product or variant created in your Lemon Squeezy store
- A Ghost blog connected in PayGlue (Connect Ghost)
Steps
1. Create an API key
In Lemon Squeezy, go to Settings > API and create a new API key. Copy it.
2. Select your store in PayGlue
In your PayGlue dashboard, go to Connection > Lemon Squeezy and paste your API key. After saving, a Store dropdown appears. Select the store that contains the products you want to use.
Note: Placeholder: PayGlue Dashboard, Connection > Lemon Squeezy, API key and store selector
Warning: You must select a store before products will appear in the Buy Button, Paywall, and Pricing Table editors. If no products show up, check that a store is selected.
3. Copy your webhook URL
On the same Lemon Squeezy connection page, copy the Webhook URL. It looks like this:
https://api.payglue.io/webhooks/lemonsqueezy?tenant=your-org-slug4. Create a webhook in Lemon Squeezy
In Lemon Squeezy, go to Settings > Webhooks and click Add webhook.
- URL: paste the webhook URL from the previous step
- Secret: create a random string (e.g. 32 random characters) to use as your signing secret
Events: enable at minimum
order_created. For subscriptions also enable:subscription_createdsubscription_updatedsubscription_cancelledsubscription_expired
Save the webhook.
Note: Placeholder: Lemon Squeezy, Settings > Webhooks, webhook creation form with URL and events
5. Add the signing secret to PayGlue
Back in PayGlue > Connection > Lemon Squeezy, paste the same signing secret into the Webhook Secret field and save.
Note: PayGlue uses this secret to verify the
X-Signatureheader on every incoming webhook. Both sides must have the exact same value.
6. Create a mapping
Go to Buy Button, Paywall, or Pricing Table in your PayGlue dashboard and select your Lemon Squeezy product from the dropdown. Configure which Ghost newsletter to subscribe to and which welcome email to send, then save.
7. Test your setup
Make a test purchase using a Lemon Squeezy test mode product. Check Analytics > Webhook Events in your PayGlue dashboard. The event should appear with status Processed and the buyer's email should appear as a new member in Ghost Admin.
Test mode vs. live mode
Lemon Squeezy does not have a separate sandbox environment. Test mode is toggled per API key:
- API keys created in the Test section of Lemon Squeezy settings only see test store products
- The webhook URL is the same for test and live
- Test purchases trigger real Ghost member creation
Remove test members from Ghost Admin before going live.
Supported events
Lemon Squeezy event | PayGlue action |
|---|---|
| Create Ghost member (one-time purchase) |
| Create Ghost member (subscription) |
| Follows the status it reports: active or on trial keeps access, expired ends it, anything else changes nothing |
| Restore Ghost member access |
| Restore Ghost member access |
| Nothing yet: access runs until the end of the paid period. A cancellation with immediate effect ends access right away |
| Revoke Ghost member access |
| Revoke access for a pause without access, keep it for a free pause |
| Ignored, the subscription events carry the state |
When access ends after a cancellation
A reader who cancels has paid until the end of the current billing period, so they keep access until then. Lemon Squeezy sends subscription_expired when that period is over, and that is when PayGlue takes the access back. If you cancel a subscription with immediate effect, Lemon Squeezy reports it as ended straight away and the access goes at once.
Make sure subscription_expired is enabled on your webhook. Without it a cancelled reader keeps access.
Troubleshooting
Products do not appear in the dropdown
Make sure you have selected a store in Connection > Lemon Squeezy. Without a store selected, PayGlue cannot filter which products belong to your account.
Webhook shows as Failed in Analytics
Open the event in Analytics > Webhook Events and check the error message. Common causes:
- Signature mismatch: the signing secret in PayGlue does not match the one in Lemon Squeezy
- Wrong webhook URL: the URL must end in
?tenant=your-org-slugwith the correct slug for your organization
Ghost member is not created
Confirm there is an active mapping for the purchased product in the Buy Button, Paywall, or Pricing Table editor. Without a mapping, PayGlue receives the event but takes no action.
Was this helpful?
Your feedback shapes what we write next.
