Repository navigation
Home
👋 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 uselemonSqueezySetupto configure theapiKeybefore utilization. -
For functions starting with
get(getXXXfunctions), the parameters include a requiredidparameter and an optionalparamsobject parameter. Theparamsobject parameter includes an optionalincludeproperty (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 optionalparamsobject parameter, which includes the optionalfilter,include, andpageproperties. For more information on how these three attributes are used, see the functions usage notes below. -
For functions starting with
createandupdate(createXXX and updateXXX functions), the parameters include a requiredidparameter and an information object for creating or updating. -
For functions starting with
cancelanddelete(cancelXXX and deleteXXX methods), the parameter includes a requiredidparameter. -
The function return value is an object containing three attributes:
statusCode,error, anddata.statusCodeis the status code of the request,errormay be a request error, response error, or null, anddatais 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.
-
lemonSqueezySetup- initialization configuration
-
getAuthenticatedUser- retrieve the authenticated user
-
getStore- retrieve a store -
listStores- list all stores
-
createCustomer- create a customer -
updateCustomer- update a customer -
archiveCustomer- archive a customer -
getCustomer- retrieve a customer -
listCustomers- list all customers
-
getProduct- retrieve a product -
listProducts- list all products
-
getVariant- retrieve a variant -
listVariants- list all variants
-
getPrice- retrieve a price -
listPrices- list all prices
-
getOrder- retrieve an order -
listOrders- list all orders -
generateOrderInvoice- generate order invoice -
issueOrderRefund- issue order refund
-
getOrderItem- retrieve an order item -
listOrderItems- list all order items
-
updateSubscription- update a subscription -
cancelSubscription- cancel a Subscription -
getSubscription- retrieve a subscription -
listSubscriptions- list all subscriptions
-
getSubscriptionInvoice- retrieve a subscription invoice -
listSubscriptionInvoices- list all subscription invoices
-
updateSubscriptionItem- update a subscription item -
getSubscriptionItem- retrieve a subscription item -
getSubscriptionItemCurrentUsage- retrieve a subscription item's current usage -
listSubscriptionItems- list all subscription items
-
createUsageRecord- create a usage record -
getUsageRecord- retrieve a usage record -
listUsageRecords- list all usage records
-
createDiscount- create a discount -
deleteDiscount- delete a discount -
getDiscount- retrieve a discount -
listDiscounts- list all discounts
-
getDiscountRedemption- retrieve a discount redemption -
listDiscountRedemptions- list all discount redemptions
-
updateLicenseKey- update a license key -
getLicenseKey- retrieve a license key -
listLicenseKeys- list all license keys
-
getLicenseKeyInstance- retrieve a license key instance -
listLicenseKeyInstances- list all license key instances
-
createCheckout- create a checkout -
getCheckout- retrieve a checkout -
listCheckouts- list all checkouts
-
createWebhook- create a webhook -
updateWebhook- update a webhook -
deleteWebhook- delete a webhook -
getWebhook- retrieve a webhook -
listWebhooks- list all webhooks
The following three functions do not require the use of an api key.
-
ActivateLicense- activate a license key -
ValidateLicense- validate a license key -
DeactivateLicense- deactivate a license key