Skip to content
Branko Conjic edited this page Sep 5, 2024 · 7 revisions

👋 Hey there,

This wiki page provides detailed information on function usage, including parameters, return values, and examples.

For the complete Lemon Squeezy API docs, please read the API introduction page to understand how the API works.


  • Only three functions (activateLicense,validateLicense, deactivateLicense) operate without requiring an API key. To use other functions, you must use lemonSqueezySetup to configure the apiKey before utilization.

  • For functions starting with get (getXXX functions), the parameters include a required id parameter and an optional params object parameter. The params object parameter includes an optional include property (an array of strings) to specify the related resources to include in the response.

  • For functions starting with list (listXXXs functions), the parameters include an optional params object parameter, which includes the optional filter, include, and page properties. For more information on how these three attributes are used, see the functions usage notes below.

  • For functions starting with create and update (createXXX and updateXXX functions), the parameters include a required id parameter and an information object for creating or updating.

  • For functions starting with cancel and delete (cancelXXX and deleteXXX methods), the parameter includes a required id parameter.

  • The function return value is an object containing three attributes: statusCode, error, and data. statusCode is the status code of the request, error may be a request error, response error, or null, and data is the response data from the Lemon Squeezy API.

Caution

Be sure to keep your API keys secure! Do not share your API keys in publicly accessible areas such as GitHub, client-side code, and so forth.


Functions Usage

Setup

Users

Stores

Customers

Products

Variants

Prices

Files

Orders

Order Items

Subscriptions

Subscription Invoices

Subscription Items

Usage Records

Discounts

Discount Redemptions

License Keys

License Key Instances

Checkouts

Webhooks

License API

The following three functions do not require the use of an api key.