Skip to main content

Setup

Required env vars:

Supported Endpoints

LemonSqueezy’s API strictly follows JSON:API standards. Certain resources like stores, products, and standard checkouts are largely managed via their hosted dashboard. The PayKit provider implements the following operational endpoints:
  • customers.create
  • customers.retrieve
  • customers.update
  • checkouts.create
  • checkouts.retrieve
  • payments.retrieve (maps to LemonSqueezy orders)
  • refunds.create (maps to LemonSqueezy order refunds)
  • subscriptions.retrieve
  • subscriptions.update
  • subscriptions.cancel
  • subscriptions.delete
Note: Operations like checkouts.update and subscriptions.create are not natively supported by the LemonSqueezy API and will intentionally throw an “Unsupported” error.

How it works

To create a checkout session for LemonSqueezy, you must provide your LemonSqueezy store_id and the variant_id representing the product you are selling.

Webhooks

LemonSqueezy signs webhooks with HMAC-SHA256 via the x-signature header.

Raw LemonSqueezy events

All webhook events fired by the LemonSqueezy provider emit the raw event_name provided by LemonSqueezy (e.g. lemonsqueezy.order_created, lemonsqueezy.subscription_created). You can listen to any native LemonSqueezy event.
A subset of these events also emit a standard PayKit event:

provider_metadata

LemonSqueezy heavily relies on provider_metadata to pass required relationships like store_id and variant_id that are unique to their JSON:API architecture.

Refunds

LemonSqueezy refunds are issued directly against a specific payment (order). The endpoint will issue a full refund if no amount is provided, or a partial refund if an amount is specified in cents.