E-commerce
Lemon Squeezy in your product and your AI agents, through one API
The Lemon Squeezy toolkit lists stores, products, variants, orders, customers, subscriptions and discounts, and creates customers, discount codes and checkout links. Through Connect, a product or AI agent sells and monitors sales in the customer's account without building the integration or storing its API key.
15 days to try it. No credit card.
POST https://connect.reportei.com/api/tools/lemon_squeezy_create_customer/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json
{
"customer_toolkit": "<connection UUID>",
"arguments": {
"data": {}
}
}How it works
From a connected customer to the first Lemon Squeezy call.
- 1
Your customer connects the account
Your system opens a Connect session for the toolkit and your customer connects their Lemon Squeezy account. You get the connection id.
- 2
Your product calls the tool
A POST to /api/tools/{tool}/execute with the connection id and arguments. On success, Connect preserves the app's response status and body.
- 3
Connect handles the rest
It stores the credential encrypted, renews tokens for OAuth connections that support renewal and records executions in an audit trail available through the API.
Use cases
What your product does with Lemon Squeezy.
Checkout links from your product
Create a checkout for a variant with prefilled buyer data and an optional discount code, and send the link from your app or an agent.
Sales monitoring for an agent
Let an AI agent list recent orders and subscriptions by status, such as past_due or cancelled, and summarize what needs attention.
Promo codes for campaigns
Create a discount code for a store, limited to chosen variants, when a campaign launches in your marketing tool.
Tools
12 Lemon Squeezy tools
- List storesGETLists the stores of the user by name, with domain, currency, total sales and revenue in cents. The id of a store goes in the store relationship of Create customer, Create discount and Create checkout. Only the first 10 come back.
- List productsGETLists the products of every store of the user by name, with status, price range, buy_now_url and store_id. Only the first 10 come back; meta.page.total has the count. List product variants returns the variants that checkouts and discounts use.
- List product variantsGETLists the variants of a product with price in cents, subscription interval, free trial and status. The id of a variant goes in Create checkout and in the variants of Create discount. Only the first 10 come back.
- List ordersGETLists the 10 newest orders of every store of the user, with order_number, buyer name and email, status, totals in cents, refunds and receipt URL. Older orders are only reachable by id in Get order; meta.page.total has the count.
- Get orderGETReturns an order: order_number, buyer, status, currency, subtotal, discount, tax, total and refunded amount in cents, the first order item and the receipt URL.
- List customersGETLists the 10 newest customers of every store of the user, with name, email, marketing status (subscribed, unsubscribed, archived, requires_verification, invalid_email or bounced), MRR and total revenue in cents. meta.page.total has the count.
- Create customerPOSTCreates a customer in a store and returns it. The fields go inside data, as JSON:API: type, attributes with name and email, and the store in relationships.
- Update customerPATCHChanges a customer and returns it. The fields go inside data, as JSON:API, with the same id as customer_id. Only the attributes sent change; status archived stops the marketing emails.
- List subscriptionsGETLists the 10 newest subscriptions of every store of the user, with product, variant, customer email, status (on_trial, active, paused, past_due, unpaid, cancelled or expired), renews_at, ends_at and order_id. meta.page.total has the count.
- List discountsGETLists the discount codes of every store of the user, oldest first, with code, amount, amount_type, redemption limit, dates and status. Only the first 10 come back; meta.page.total has the count.
API key
Your customer pastes the app's key on a Connect screen, or your system sends the key with POST /api/customer-toolkits, with no screen.
Questions about the Lemon Squeezy toolkit
Do I need to build against the Lemon Squeezy API?
No. Connect ships 12 Lemon Squeezy tools, described and ready. Your customer connects the account and your system calls every tool through the same endpoint, with the same request format.
How does my customer connect their Lemon Squeezy account?
With the mode the toolkit accepts: API key. Connect stores the credential encrypted and never returns it to your system.
Does it work with AI agents?
Yes. Each tool's input is described in JSON Schema, which your agent uses directly as a tool definition. The agent picks the tool and the arguments, and your system makes the call to Connect.
Does my customer need a Reportei account?
No. Your customer connects the account on a Connect screen, or your system sends the credential through the API, and they keep using only your product.
See Connect applied to your product.
Try it for 15 days with no card, or walk our team through your use case.
