Lemon Squeezy
List products and create checkout links with Lemon Squeezy.
On this page
Connect
Auth type: API key (secret_text). Paste the API key (or token) from the provider's settings into the connect dialog. It is encrypted at rest and only decrypted on the server when an action runs.
- In the editor: Backend panel, Integrations tab, then Connect. This connects it for the project.
- For every project in a workspace: Workspace settings, Integrations.
- Owners and admins choose which integrations members may connect in the admin panel (Integrations tab), and can attach their own OAuth app there.
Call it from a workflow
Pass the action name and its input. The call resolves with { success, output, error? }; a missing connection resolves with success false and the reason. See ctx.integrations.invoke and ctx.integrations.call.
// .workflow.js (native ctx)
export async function run(ctx) {
const res = await ctx.integrations.invoke("lemon-squeezy", "create_checkout", {
"storeId": "<storeId>",
"variantId": "<variantId>"
});
if (!res.success) throw new Error(res.error);
ctx.log.info("Lemon Squeezy answered", { output: res.output });
}// defineWorkflow module (@app/sdk ctx)
import { defineWorkflow } from "@app/sdk";
export default defineWorkflow({
id: "lemon-squeezy-create-checkout",
name: "Lemon Squeezy: Create Checkout",
description: "Calls Lemon Squeezy when a row is created.",
trigger: { type: "entity_event", entity: "tickets", event: "created" },
async run(ctx, event) {
const res = await ctx.integrations.call("lemon-squeezy", {
"action": "create_checkout",
"storeId": "<storeId>",
"variantId": "<variantId>"
}) as { success: boolean; error?: string };
if (!res.success) throw new Error(res.error);
},
});curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/lemon-squeezy/create_checkout" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"storeId":"<storeId>","variantId":"<variantId>"}}'Actions
create_checkoutin catalog
Create Checkout. Create a checkout URL for a specific Lemon Squeezy product variant.
| Input | Type | Description |
|---|---|---|
storeIdrequired | id (picked from your account) | The store the checkout belongs to. |
productIdoptional | id (picked from your account) | Select a product to filter the variant list below. |
variantIdrequired | id (picked from your account) | The product variant to create a checkout for. |
customerEmailoptional | text | Pre-fill the customer email address on the checkout page. |
customerNameoptional | text | Pre-fill the customer name on the checkout page. |
customPriceoptional | number | Override the product price in the smallest currency unit (e.g. 999 = $9.99). Only works if custom prices are enabled on the variant. |
discountCodeoptional | text | Pre-apply a discount code to the checkout. |
redirectUrloptional | text | URL to redirect the customer to after a successful purchase. |
expiresAtoptional | text | ISO 8601 datetime when this checkout URL expires (e.g. 2024-12-31T23:59:59Z). Leave empty for no expiry. |
customDataoptional | JSON | Key-value pairs of custom data to attach to the order (accessible via webhooks). |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
get_order
Get Order. Retrieve the details of a specific order by its ID.
| Input | Type | Description |
|---|---|---|
orderIdrequired | id (picked from your account) | Select the order to retrieve. |
list_customers
List Customers. Retrieve a paginated list of customers from your Lemon Squeezy store.
| Input | Type | Description |
|---|---|---|
storeIdoptional | id (picked from your account) | Filter customers by store. Leave empty to return customers from all stores. |
emailoptional | text | Filter customers by their email address. |
pageoptional | number | Page number for pagination (starts at 1). |
perPageoptional | number | Number of customers to return per page (1–100). Default is 10. |
list_orders
List Orders. Retrieve a paginated list of orders from your Lemon Squeezy store, with optional filters.
| Input | Type | Description |
|---|---|---|
storeIdoptional | id (picked from your account) | Filter orders by store. Leave empty to return orders from all stores. |
userEmailoptional | text | Filter orders by customer email address. |
statusoptional | one of "" | "pending" | "failed" | "paid" | "refunded" | "partial_refund" | "chargedback" | Filter orders by status. |
pageoptional | number | Page number for pagination (starts at 1). |
perPageoptional | number | Number of orders to return per page (1–100). Default is 10. |
list_products
List Products. Retrieve a paginated list of products from your Lemon Squeezy store.
| Input | Type | Description |
|---|---|---|
storeIdoptional | id (picked from your account) | Filter products by store. Leave empty to return products from all stores. |
pageoptional | number | Page number for pagination (starts at 1). |
perPageoptional | number | Number of products to return per page (1–100). Default is 10. |
list_subscriptions
List Subscriptions. Retrieve a paginated list of subscriptions from your Lemon Squeezy store.
| Input | Type | Description |
|---|---|---|
storeIdoptional | id (picked from your account) | Filter subscriptions by store. |
orderIdoptional | id (picked from your account) | Filter subscriptions by order. |
orderItemIdoptional | text | Filter subscriptions by a specific order item ID. |
productIdoptional | id (picked from your account) | Filter subscriptions by product. |
variantIdoptional | id (picked from your account) | Filter subscriptions by variant. |
userEmailoptional | text | Filter subscriptions by customer email address. |
statusoptional | one of "" | "on_trial" | "active" | "paused" | "past_due" | "unpaid" | "cancelled" | "expired" | Filter subscriptions by status. |
pageoptional | number | Page number for pagination (starts at 1). |
perPageoptional | number | Number of subscriptions to return per page (1–100). Default is 10. |
Details
- Id
lemon-squeezy- Category
- Finance and payments
- Tags
- payments, digital-products, subscriptions, checkout
- Package
@activepieces/piece-lemon-squeezy@0.1.5- Tier
- Community