Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Lemon Squeezy

Scalekit connector
Open markdown

The Lemon Squeezy connector lets your AI agent act in each user's Lemon Squeezy account. Each user connects their own Lemon Squeezy access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 28 tools.

Tools
28
What they doRead · write · destructive
20 · 6 · 220 read6 write2 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Lemon Squeezy connection

    In AgentKit > Connections, create a Lemon Squeezy connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'lemonsqueezy'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Lemon Squeezy:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'lemonsqueezy_checkouts_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Lemon Squeezy credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • lemonsqueezy_checkout_getGet one checkout by its ID.Read-only

    Get Checkout

    Get one checkout by its ID. Returns the checkout's store and variant, custom price, product options, checkout options, prefilled data, expires_at and checkout URL. Use it for one known checkout. Use lemonsqueezy_checkouts_list to browse checkouts.

    Inputs

    checkout_idstringrequired
    The ID of the checkout (a UUID). Use lemonsqueezy_checkouts_list to find IDs. Example: ac470bd4-7c41-474d-b6cd-0f296f5be02a.
    includestring
    Comma-separated related resources to return in the response's included array, so you need fewer calls. Allowed values: store, variant. Example: variant.
  • lemonsqueezy_checkouts_listList checkouts created through the API, optionally filtered by store or variant, one page at a time.Read-only

    List Checkouts

    List checkouts created through the API, optionally filtered by store or variant, one page at a time. Returns each checkout's id, store_id, variant_id, custom price, product, checkout and prefill options, expires_at and checkout URL. Use it to find checkout links you created. Use lemonsqueezy_checkout_get when you have the checkout ID.

    Inputs

    page_numberinteger
    Page of results to return, starting at 1. Read meta.page.lastPage in the response to see how many pages exist. Example: 2.
    page_sizeinteger
    Number of results per page, from 1 to 100. Lemon Squeezy returns 10 when this is left empty. Example: 50.
    store_idstring
    Only return checkouts of the store with this ID, from lemonsqueezy_stores_list. Example: 12345.
    variant_idstring
    Only return checkouts for the variant with this ID, from lemonsqueezy_variants_list. Example: 67890.
  • lemonsqueezy_customer_getGet one customer by its ID.Read-only

    Get Customer

    Get one customer by its ID. Returns the customer's name, email, marketing status, city, region, country, total revenue, MRR and customer portal URL. Use it for one known customer. Use lemonsqueezy_customers_list to find a customer by email.

    Inputs

    customer_idstringrequired
    The ID of the customer. Use lemonsqueezy_customers_list to find IDs. Example: 112233.
    includestring
    Comma-separated related resources to return in the response's included array, so you need fewer calls. Allowed values: store, affiliates, orders, subscriptions, license-keys. Example: orders,subscriptions.
  • lemonsqueezy_customers_listList customers, optionally filtered by store or exact email, one page at a time.Read-only

    List Customers

    List customers, optionally filtered by store or exact email, one page at a time. Returns each customer's id, store_id, name, email, marketing status, location, total revenue, MRR and customer portal URL. Use it to browse customers or find one by email. Use lemonsqueezy_customer_get when you have the customer ID.

    Inputs

    emailstring
    Only return customers with exactly this email address. Example: jane@example.com.
    page_numberinteger
    Page of results to return, starting at 1. Read meta.page.lastPage in the response to see how many pages exist. Example: 2.
    page_sizeinteger
    Number of results per page, from 1 to 100. Lemon Squeezy returns 10 when this is left empty. Example: 50.
    store_idstring
    Only return customers of the store with this ID, from lemonsqueezy_stores_list. Example: 12345.
  • lemonsqueezy_discount_getGet one discount by its ID.Read-only

    Get Discount

    Get one discount by its ID. Returns the discount's name, code, amount, amount_type, product limits, redemption limits, duration, start and expiry dates and status. Use it for one known discount; add include=discount-redemptions to see who used it. Use lemonsqueezy_discounts_list to browse.

    Inputs

    discount_idstringrequired
    The ID of the discount. Use lemonsqueezy_discounts_list to find IDs. Example: 556677.
    includestring
    Comma-separated related resources to return in the response's included array, so you need fewer calls. Allowed values: store, variants, discount-redemptions. Example: discount-redemptions.
  • lemonsqueezy_discounts_listList discount codes, optionally only those in one store, one page at a time.Read-only

    List Discounts

    List discount codes, optionally only those in one store, one page at a time. Returns each discount's id, store_id, name, code, amount, amount_type, redemption limits, duration, starts_at, expires_at and status. Use it to browse discount codes. Use lemonsqueezy_discount_get when you have the discount ID.

    Inputs

    page_numberinteger
    Page of results to return, starting at 1. Read meta.page.lastPage in the response to see how many pages exist. Example: 2.
    page_sizeinteger
    Number of results per page, from 1 to 100. Lemon Squeezy returns 10 when this is left empty. Example: 50.
    store_idstring
    Only return discounts of the store with this ID, from lemonsqueezy_stores_list. Example: 12345.
  • lemonsqueezy_license_key_getGet one license key by its ID.Read-only

    Get License Key

    Get one license key by its ID. Returns the key, its customer, order and product IDs, activation limit, instances used, status, disabled flag and expires_at. Use it for one known license key; add include=license-key-instances to see where it is activated. Use lemonsqueezy_license_keys_list to search keys.

    Inputs

    license_key_idstringrequired
    The ID of the license key (the numeric object ID, not the key string). Use lemonsqueezy_license_keys_list to find IDs. Example: 334455.
    includestring
    Comma-separated related resources to return in the response's included array, so you need fewer calls. Allowed values: store, customer, order, order-item, product, license-key-instances. Example: license-key-instances.
  • lemonsqueezy_license_keys_listList license keys, filtered by store, order, order item, product or status, one page at a time.Read-only

    List License Keys

    List license keys, filtered by store, order, order item, product or status, one page at a time. Returns each key's id, customer, order and product IDs, a short key preview, activation limit and usage, status and expires_at. Use it to find the keys a customer bought. Use lemonsqueezy_license_key_get when you have the license key ID.

    Inputs

    order_idstring
    Only return license keys from the order with this ID, from lemonsqueezy_orders_list. Example: 998877.
    order_item_idstring
    Only return license keys from the order item with this ID. Example: 445566.
    page_numberinteger
    Page of results to return, starting at 1. Read meta.page.lastPage in the response to see how many pages exist. Example: 2.
    page_sizeinteger
    Number of results per page, from 1 to 100. Lemon Squeezy returns 10 when this is left empty. Example: 50.
    product_idstring
    Only return license keys for the product with this ID, from lemonsqueezy_products_list. Example: 54321.
    statusstring
    Only return license keys with this status. Allowed values: inactive, active, expired, disabled. Example: active.one of inactiveactiveexpireddisabled
    store_idstring
    Only return license keys of the store with this ID, from lemonsqueezy_stores_list. Example: 12345.