All docs

Lemon Squeezy

Connect

  1. In Lemon Squeezy, create an API key under Settings → API.
  2. Paste it into Setup → Payments → Lemon Squeezy. If the key can see several stores, add the store id too.

DataPenny creates the webhook and never stores the key.

By hand

Add a webhook under Settings → Webhooks and choose your own signing secret. Point it at https://YOUR-DATAPENNY-URL/api/webhooks/lemonsqueezy/YOUR_SITE_ID, subscribe to order_created, subscription_created, subscription_payment_success, order_refunded and subscription_payment_refunded, then paste the secret under Connect by hand.

Checkouts

Checkout links (….lemonsqueezy.com/buy/…) are tagged by the script.

Checkouts you create with the API need the visitor id in custom data:

checkout_data: { custom: { datapenny_visitor_id: visitorId } }

Import past sales

Use an API key from Settings → API. It’s used while the import runs and isn’t stored. Lemon Squeezy’s API doesn’t return checkout custom data, so past sales are matched to visits by customer and email only.