Connect Lemon Squeezy

Updated Oct 25, 2026 · 3 min read · Pro, Business and Agency plans

This article shows you how to send your Lemon Squeezy orders, renewals and refunds to PlayerMagick, so each sale is matched to the play that sold it.

Available on: Pro, Business and Agency plans.

How it works

Lemon Squeezy sends PlayerMagick a webhook for each order, subscription payment, refund and cancellation, signed with a secret you choose. PlayerMagick checks the signature, so nobody else can send you fake sales.

PlayerMagick adds checkout[custom][pm]=… to your buttons' Lemon Squeezy checkout links. Lemon Squeezy keeps it with the order and sends it back, so the match is exact. Renewals and refunds are matched to their order.

Lemon Squeezy handles disputes itself as the seller of record and doesn't send them.

Step 1: Connect Lemon Squeezy in PlayerMagick

  1. Go to Settings → Sales platforms and click Connect a platform.
  2. Next to Lemon Squeezy, click Connect. Keep the suggested Signing secret (or type your own, 16 to 40 characters) and click Connect.
  3. The setup page shows your receiver address. Copy it now: PlayerMagick shows it only once.

Step 2: Add the webhook in Lemon Squeezy

  1. In Lemon Squeezy, open Settings → Webhooks and add a webhook.
  2. Paste the receiver address as the callback URL.
  3. Enter the same signing secret as in PlayerMagick.
  4. Select these events: order_created, order_refunded, subscription_payment_success, subscription_payment_refunded and subscription_cancelled, then save.

Step 3: Check it works

  • Click Send a test sale on the setup page. The result says what a real sale would be matched to. Test sales never count.
  • Orders in Lemon Squeezy's test mode show as tests and never count.

Point the player's buttons at your Lemon Squeezy checkout links (https://….lemonsqueezy.com/checkout/…). PlayerMagick adds checkout[custom][pm]=… when the viewer clicks. If your link already has its own checkout[custom][pm], PlayerMagick leaves it alone.

If you create checkouts with Lemon Squeezy's API, pass the code your page receives as checkout_data.custom.pm.

Notifications that never arrived

Lemon Squeezy tries a webhook only 3 more times, within a few minutes. If your address was down then, the order is lost.

Add the optional API key on the setup page and PlayerMagick checks Lemon Squeezy's API every few hours for anything whose notification never reached it. What it finds is counted like any other sale (once: an order PlayerMagick already has is never counted again) and shows in Recent notifications as "Recovered". The line above the list says when PlayerMagick last checked.

  • PlayerMagick looks at orders of the last 3 days that are at least an hour old, and at refunds of those orders.
  • Lemon Squeezy's API doesn't keep the code on your checkout link, so a recovered order is matched by the buyer's email.
  • If your API key sees more than one store, also fill in Store ID with the number of the store this webhook belongs to.

Troubleshooting

  • Refused: the signature didn't match the saved secret. The signing secret in Lemon Squeezy and in PlayerMagick differ. Enter the same one in both.
  • Ignored: order pending. The order isn't paid yet. Lemon Squeezy sends the paid order separately.
  • Ignored: payment initial. A subscription's first payment is counted with its order.
  • Notifications stop after a few failures. Lemon Squeezy retries only three times. Check the setup page for refusals, fix them, and resend the failed deliveries from Lemon Squeezy's webhook log.

Was this article helpful?