Lemon Squeezy
List products and create checkout links with Lemon Squeezy.
On this page
Connect
Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("lemon-squeezy", action, input) resolves with the provider's answer and rejects when Lemon Squeezy isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "lemon-squeezy"} says whether yours can call it.
// workflows/notify.ts: call Lemon Squeezy when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellLemonsqueezy = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when Lemon Squeezy isn't connected.
const output = await step.run("Lemon Squeezy", () =>
step.ctx.integrations.invoke("lemon-squeezy", "create_checkout", {
"storeId": "<storeId>",
"variantId": "<variantId>"
}),
);
step.ctx.log("Lemon Squeezy answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "lemon-squeezy",
"piece_action": "create_checkout",
"input": {
"storeId": "<storeId>",
"variantId": "<variantId>"
},
"env": "dev"
}
}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_checkout
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- Runs
- Through the integration runner