Everything an AI agent can do with the Lemon Squeezy API.

A reference guide for building AI agents: every method, how to authenticate, and the permissions each one needs.

Endpoints35
API versionv1
Last updated23 June 2026
Orientation

How the Lemon Squeezy API works.

The Lemon Squeezy API is how an app or AI agent works with a store: reading orders and products, creating a hosted checkout, managing a customer's subscription, and issuing license keys for software. Access is granted through an API key sent as a bearer token, and the key carries full account access because Lemon Squeezy keys have no per-resource scopes. A state change emits an event that Lemon Squeezy can deliver to a registered endpoint, signed so the receiver can confirm it.

35Endpoints
9Capability groups
24Read
11Write
0Permissions
Authentication
Lemon Squeezy authenticates every call with an API key sent as a bearer token in the Authorization header. A key is created in account settings and belongs to one mode, either test or live, so a test key only sees test-mode store data. Requests must set both the Accept and Content-Type headers to application/vnd.api+json, the JSON:API media type.
Permissions
A Lemon Squeezy API key is account-level and carries no granular per-endpoint scopes. A key that can read can also write, across every resource the account owns, so the only built-in boundary is test mode versus live mode. There is no way to mint a key limited to, say, read-only or to a single store, which is why a governing layer in front of the key matters.
Data model
The API follows the JSON:API specification: resource-oriented paths under one major version, typed resource objects with attributes and relationships, and related records pulled in with the include parameter. Lists are page-based, filtered with filter[field]=value. A store ties together products, variants, prices, orders, subscriptions, customers, discounts, and license keys.
Versioning
Lemon Squeezy carries one major version in the path and does not mint dated version strings. New resources, endpoints, and fields are added in a backward-compatible way and recorded in the API changelog, so an integration pinned to the path version keeps working as the surface grows.
Connect & authenticate

Connection & authentication methods.

How an app or AI agent connects to Lemon Squeezy determines what it can reach. There is a route for making calls, authenticated by an API key, and a route for receiving events, where Lemon Squeezy posts signed notifications to a registered endpoint.

Ways to connect

REST API (JSON:API)

The store API is a JSON:API REST interface at https://api.lemonsqueezy.com/v1. Requests and responses use the application/vnd.api+json media type, set on both Accept and Content-Type. A call authenticates with an API key sent as a bearer token, lists are page-based, related records come in via the include parameter, and filters use filter[field]=value.

Best forConnecting an app or AI agent to Lemon Squeezy.
Governed byThe API key, which carries full account access with no per-resource scopes.
Docs ↗

Webhooks

Lemon Squeezy POSTs a JSON payload to a registered HTTPS endpoint when a subscribed event fires, like order_created or subscription_updated. Each request carries an X-Signature header, an HMAC-SHA256 hash of the raw body computed with the webhook's signing secret, which the receiver recomputes and compares to confirm the request came from Lemon Squeezy. Webhooks are managed in the dashboard or through the webhooks API.

Best forReceiving Lemon Squeezy events at an app or AI agent.
Governed byThe signing secret on the webhook.
Docs ↗
Authentication

API key (bearer)

A single API key, created in account settings, authenticates every store-API call as a bearer token in the Authorization header. The key is account-level with no granular scopes, so it can read and write across every resource the account owns. Each key belongs to one mode, test or live, which is the only native access boundary. A key is shown once at creation and should never be exposed in client code.

TokenBearer API key (account-level, test or live mode)
Best forServer-side calls to the store API.
Docs ↗
Capability map

What an AI agent can do in Lemon Squeezy.

The Lemon Squeezy API is split into areas an agent can act on, like stores, products, orders, subscriptions, customers, discounts, and license keys. Most methods read store data, and a smaller set writes, like creating a checkout, updating a subscription, or disabling a license key.

Endpoint reference

Every Lemon Squeezy API method.

Filter by method, access, or permission, or search any path. Select a row for version detail, rate limits, the related webhook event, and the source.

MethodEndpointWhat it doesAccessPermissionVersion

Stores

Methods for reading store configuration.2

Read-only. Lemon Squeezy API keys have no per-resource scopes, so any valid key can call this.

Acts onstore
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts onstore
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Products & Variants

Methods for reading the product catalog, its variants, and prices.5

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts onproduct
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts onproduct
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only. Often called to sync the catalog after products change.

Acts onvariant
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts onvariant
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts onprice
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Orders

Methods for reading orders and their line items.4

Read-only. Exposes sales records and customer purchase data.

Acts onorder
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts onorder
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts onorder-item
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts onorder-item
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Subscriptions

Methods for reading and changing subscriptions and their invoices.6

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts onsubscription
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts onsubscription
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Changes a customer's billing. No granular scope; any valid key can call this.

Acts onsubscription
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventsubscription_updated
Rate limitStandard limits apply

Ends recurring billing. No granular scope; any valid key can call this.

Acts onsubscription
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventsubscription_cancelled
Rate limitStandard limits apply

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts onsubscription-invoice
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts onsubscription-invoice
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Customers

Methods for reading and managing customer records.4

Read-only. Exposes customer names, emails, and revenue.

Acts oncustomer
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts oncustomer
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Requires a store relationship. No granular scope; any valid key can call this.

Acts oncustomer
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Changes real customer data. No granular scope; any valid key can call this.

Acts oncustomer
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Checkouts

Methods for reading and creating hosted checkout sessions.3

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts oncheckout
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts oncheckout
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Returns a payable checkout URL. No granular scope; any valid key can call this.

Acts oncheckout
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventorder_created
Rate limitStandard limits apply

Discounts

Methods for reading, creating, and removing discount codes.3

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts ondiscount
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Changes what customers can be charged. No granular scope; any valid key can call this.

Acts ondiscount
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Irreversible. No granular scope; any valid key can call this.

Acts ondiscount
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

License keys

Methods for reading and updating software license keys.3

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts onlicense-key
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts onlicense-key
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Setting disabled to true revokes a customer's software license. No granular scope; any valid key can call this.

Acts onlicense-key
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Webhooks

Methods for managing the event subscriptions an integration listens on.5

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts onwebhook
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Sets where store events are sent. No granular scope; any valid key can call this.

Acts onwebhook
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only. No per-endpoint scope exists on a Lemon Squeezy key.

Acts onwebhook
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Changes where store events are sent. No granular scope; any valid key can call this.

Acts onwebhook
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Stops event delivery. No granular scope; any valid key can call this.

Acts onwebhook
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply
No endpoints match those filters.
Webhooks

Webhook events.

Lemon Squeezy can notify an app when something happens in a store, like an order being placed or a subscription changing. It posts a JSON payload describing the event with a signature header, so an integration learns about activity without polling.

EventWhat it signalsTriggered by
order_createdA new order was placed in the store. An integration uses this to record the sale and fulfill the purchase./v1/checkouts
order_refundedAn order was refunded, fully or partially. An integration reverses access or entitlements granted by the order.In-app only
subscription_createdA new subscription was created for a customer./v1/checkouts
subscription_updatedA subscription changed, like a plan switch, a pause or resume, a status change, or a renewal date moving./v1/subscriptions/:id
subscription_cancelledA subscription was cancelled and will end at the close of the current billing period./v1/subscriptions/:id
/v1/subscriptions/:id
subscription_expiredA subscription has ended and the customer no longer has access.In-app only
subscription_payment_successA subscription invoice was paid successfully. An integration saves billing history on this event.In-app only
license_key_createdA license key was created for a purchase of a license-enabled product.In-app only
No events match that search.
Rate limits & pagination

Rate limits, pagination & request size.

Lemon Squeezy limits how fast an app can call the store API, measured as requests per minute against the API key, with a separate, lower limit on the license-key validation API.

Request rate

The store API allows 300 requests per minute against an API key. The separate license-key validation API, used to activate and validate license keys in deployed software, is limited to 60 requests per minute. Going over returns HTTP 429, so a client should pace calls and back off on a 429 before retrying.

Pagination

List endpoints are page-based following JSON:API: page[size] sets how many records a page returns (default 10, range 1 to 100) and page[number] selects the page. The response carries a meta.page object with the current page, page size, total record count (meta.page.total), and last page number (meta.page.lastPage), plus JSON:API links for first, last, next, and prev.

Request size

A list page returns at most 100 records, the maximum value of page[size]. The include parameter pulls related resources into the same response to cut round-trips, and filter[field]=value narrows a list. Requests and responses use the application/vnd.api+json media type.

Errors

Status codes & error handling.

The status codes an agent should handle, and what to do about each.

StatusCodeMeaningWhat to do
400bad_requestThe request was malformed, for example a JSON:API body that does not follow the expected structure or the wrong media type.Set Accept and Content-Type to application/vnd.api+json, fix the request body to the JSON:API shape, and resend.
401UnauthenticatedNo valid API key was provided. The error detail reads 'Unauthenticated.' with title 'Unauthorized'.Send a valid API key as a bearer token in the Authorization header, and confirm it is for the right mode (test or live).
404Not FoundThe requested resource does not exist, or is not visible to this key or mode.Check the resource id, and confirm the key and mode match where the resource lives.
422Unprocessable EntityThe request was well-formed but contained invalid data, for example a missing required relationship like a store or variant id. The errors array names the offending field.Read the detail and source pointer in each errors entry, correct the field, and resend.
429Too Many RequestsThe request rate exceeded the limit (300 per minute on the store API, 60 per minute on the license validation API).Pace requests under the limit and retry after a short backoff.
Versioning & freshness

Version history.

Lemon Squeezy carries one major version in the path and ships dated, backward-compatible additions through its API changelog rather than minting new version numbers.

Version history

What changed, and when

Latest versionv1
v1Current version
Current major version (JSON:API store API)

The store API carries one major version in the path and ships backward-compatible additions through the API changelog rather than dated version strings. Recent additions include customer create and update, full webhook CRUD, affiliates, subscription items, prices, and refund endpoints.

What changed
  • Customers: Create a Customer and Update a Customer endpoints added.
  • Webhooks: query, create, update, and delete webhooks via the API.
  • Affiliates, Subscription items, and Prices endpoints added.
  • Refunds: Issue an Order refund and Issue a Subscription Invoice refund endpoints added, with refunded_amount fields on order and invoice objects.
  • Checkouts: create-checkout gained a preview option returning checkout totals with discounts and tax.
2025-01-07Feature update
Webhook simulation and affiliate event

Merchants can manually simulate individual order webhooks from the test-mode dashboard, and a new affiliate_activated webhook event was added.

What changed
  • Simulate individual order webhooks from the test-mode dashboard.
  • New affiliate_activated webhook event.
2024-08-08Feature update
Partial refunds

Merchants can issue partial refunds, choosing exactly how much to refund on a given order.

What changed
  • Partial refunds on orders.
  • refunded_amount, refunded_amount_usd, and refunded_amount_formatted fields added to order and subscription invoice objects.

The path version is stable; new resources and fields arrive additively.

Lemon Squeezy API changelog ↗
Questions

Lemon Squeezy API, answered.

How does an app authenticate with the Lemon Squeezy API?+
Create an API key in the account settings, then send it as a bearer token in the Authorization header on every request. Each request must also set Accept and Content-Type to application/vnd.api+json. A key belongs to one mode: a test-mode key only ever touches test-mode store data, and a live key touches real data.
Can a Lemon Squeezy API key be scoped to read-only or to one store?+
No. A Lemon Squeezy API key is account-level and has no per-resource or per-endpoint scopes. Any valid key can both read and write across every resource the account owns, so the only native boundary is test mode versus live mode. To limit an agent to, for example, reading orders but not cancelling subscriptions, the limit has to be enforced in a layer in front of the key.
How does an integration receive events from Lemon Squeezy?+
Register a webhook, either in the dashboard or via the webhooks API, with a URL and a signing secret. Lemon Squeezy then posts a JSON payload to that URL whenever a subscribed event fires, like order_created or subscription_updated, and includes an X-Signature header. The receiver recomputes an HMAC-SHA256 hash of the raw body with the signing secret and compares it to confirm the request really came from Lemon Squeezy.
How does pagination work?+
List endpoints are page-based. Use page[size] to set how many records come back per page (1 to 100, default 10) and page[number] to pick the page. The response includes a meta.page object with the total record count and last page number, so a client knows when to stop. Related resources can be pulled in with the include parameter to avoid extra requests.
What is the difference between test mode and live mode?+
Lemon Squeezy has a full test mode for building an integration before going live. An API key created in test mode interacts only with test-mode store data, where no real money moves, while a live key processes real orders and payments. Data does not cross between the two modes.
How does API versioning work?+
The API carries one major version segment in the path. Lemon Squeezy adds new resources, endpoints, and fields in a backward-compatible way and records them in the API changelog rather than issuing dated version strings, so an integration keeps working as the surface expands without needing to pin a date.
Related

More e-commerce API guides for agents

What is Bollard AI?

Control what every AI agent can do in Lemon Squeezy.

Bollard AI sits between a team's AI agents and Lemon Squeezy. Grant each agent exactly the access it needs, read or write, resource by resource, and every call is checked and logged.

  • Set read, write, or full access per agent, never a shared Lemon Squeezy key.
  • Denied by default, so an agent reaches only what has been explicitly allowed.
  • Every call recorded in plain English: who, what, where, and the decision.
Lemon Squeezy
Billing Agent
View orders ResourceOffReadFull use
Cancel subscriptions ActionOffReadFull use
Create checkouts ActionOffReadFull use
License keys ResourceOffReadFull use
Per-agent access, set in Bollard AI, not in Lemon Squeezy