Skip to content
Lemon Squeezy logo

Connectors / Finance · HTTP Connector

Lemon Squeezy integration and API

Generate an order invoice, update a subscription and create a customer in Lemon Squeezy, and start a workflow when Lemon Squeezy sends “Order created”.

What can you do with Lemon Squeezy on Tray.ai?

Lemon Squeezy is a merchant of record for selling software and digital products, handling checkout, subscriptions, license keys, global sales tax and payouts for the seller. Tray.ai connects to Lemon Squeezy through the HTTP Connector, so your workflows can call the Lemon Squeezy API alongside the rest of your stack.

  • When Lemon Squeezy sends “Order created”, record the sale in your accounting system.
  • When Lemon Squeezy sends “Subscription payment failed”, open a task for customer success in your CRM.
  • When Lemon Squeezy sends “Subscription cancelled”, update the customer's status in your CRM.
  • Issue a refund in Lemon Squeezy when a refund request is approved in your help desk.
Connects through
HTTP Connector
Authentication
A bearer token
Base URL
https://api.lemonsqueezy.com/v1

Set it up

Connect Lemon Squeezy to Tray.ai

Each step uses Lemon Squeezy's own API details, from its documentation.

Save Lemon Squeezy's API token

Save the token Lemon Squeezy issues as a Tray.ai authentication. The HTTP Client sends it as a bearer token on every call. The token stays out of the workflow and out of the logs.

Point the HTTP Client at the API

Add an HTTP Client step and use https://api.lemonsqueezy.com/v1 as the base URL. Or paste a cURL example from Lemon Squeezy's API docs, and Tray.ai fills in the method, URL, and headers.

Start with “List orders”

It's one of 22 documented actions, under Orders. The response comes back as data the next step can map into your other apps.

Start workflows from Lemon Squeezy events

Give Lemon Squeezy the URL of a Tray.ai webhook trigger. “Order created” can then start a workflow, and so can 8 other events.

Workflows to build with Lemon Squeezy

Connect Lemon Squeezy with HubSpot, Slack and Xero

Each one uses actions and events from Lemon Squeezy's own API documentation.

Add new Lemon Squeezy customers to HubSpot

When

Order created

Then

  1. Retrieve a customer in Lemon Squeezy
  2. Create or update the contact in HubSpot with the product bought

With HubSpot

Alert the team in Slack when a Lemon Squeezy payment fails

When

Subscription payment failed

Then

  1. Retrieve a subscription in Lemon Squeezy
  2. Post a message to the revenue channel in Slack

With Slack

Record Lemon Squeezy orders in Xero

When

Order created

Then

  1. Retrieve an order in Lemon Squeezy
  2. Create a paid invoice for the sale in Xero

With Xero

Give your AI agents Lemon Squeezy tools

Build an MCP server on Lemon Squeezy in Agent Gateway and choose which actions your agents can call. Every call runs with access control and an audit trail. How Agent Gateway works

  • List orders
  • List subscriptions
  • List customers
  • Create a checkout
  • List discounts
  • List license keys
  • Retrieve an order
  • Generate an order invoice

What the Lemon Squeezy API covers

6 resources and 22 documented actions, each one a call the HTTP Connector can make from a Tray.ai workflow. Connecting it takes a few clicks: here's how.

Orders

  • List orders
  • Retrieve an order
  • Generate an order invoice
  • Issue a refund

Subscriptions

  • List subscriptions
  • Retrieve a subscription
  • Update a subscription
  • Cancel a subscription

Customers

  • List customers
  • Retrieve a customer
  • Create a customer
  • Update a customer

Checkouts

  • Create a checkout
  • Retrieve a checkout
  • List checkouts

Discounts

  • List discounts
  • Create a discount
  • Delete a discount

License keys

  • List license keys
  • Update a license key
  • Activate a license key
  • Validate a license key

Events Lemon Squeezy can send to a Tray.ai webhook trigger

  • Order created
  • Order refunded
  • Subscription created
  • Subscription updated
  • Subscription cancelled
  • Subscription payment succeeded
  • Subscription payment failed
  • License key created
  • Customer updated

Checked against Lemon Squeezy's own documentation on 2026-10-22

docs.lemonsqueezy.com/api

Frequently asked questions

What can a Tray.ai workflow do in Lemon Squeezy?

The Lemon Squeezy API documents 22 actions across 6 resources (Orders, Subscriptions, Customers, Checkouts, Discounts, License keys). For example: List orders; List subscriptions; List customers. A workflow can make any documented call through the HTTP Connector.

How does Tray.ai authenticate with Lemon Squeezy?

The Lemon Squeezy API uses a bearer token. You save it once as a Tray.ai authentication, and the HTTP Connector adds it to every request.

Which Lemon Squeezy events can start a Tray.ai workflow?

Lemon Squeezy sends 9 events to a webhook URL, for example: Order created; Order refunded; Subscription created; Subscription updated; Subscription cancelled; Subscription payment succeeded; Subscription payment failed; License key created. A Tray.ai webhook trigger receives them and starts a workflow.

See Lemon Squeezy working against your stack.

We'll walk through a tailored demo with your systems plugged in.

Great, a couple more details

This helps us connect you with the right person. Optional, and you can skip it.