Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.
Caven edited this page Jan 31, 2024 · 23 revisions

Welcome to the @heybrostudio/lemonsqueezy.js wiki!


🟠 Note that this is not the official API documentation, just the function usage of the library.

  • Only three functions (activateLicense,validateLicense, deactivateLicense) operate without requiring an API key. To use other functions, you must employ 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.

🟠 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. See more


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.