# Lemon Squeezy

Manage Lemon Squeezy: products, variants, orders, subscriptions, license keys. Exposes **40 actions** covering the full API surface
the agent needs - read and write.

## What it can do

| Method | What it does |
| --- | --- |
| `lemonsqueezy_list_stores` | List your Lemon Squeezy stores - GET /stores. |
| `lemonsqueezy_get_store` | Get one store - GET /stores/&#123;id&#125;. |
| `lemonsqueezy_list_customers` | List customers in a store - GET /stores/&#123;store_id&#125;/customers. |
| `lemonsqueezy_get_customer` | Get one customer - GET /customers/&#123;id&#125;. |
| `lemonsqueezy_create_customer` | Create a customer - POST /customers. |
| `lemonsqueezy_update_customer` | Update a customer - PATCH /customers/&#123;id&#125;. |
| `lemonsqueezy_list_products` | List products in a store - GET /stores/&#123;store_id&#125;/products. |
| `lemonsqueezy_get_product` | Get one product - GET /products/&#123;id&#125;. |
| `lemonsqueezy_create_product` | Create a product - POST /products. |
| `lemonsqueezy_update_product` | Update a product - PATCH /products/&#123;id&#125;. |
| `lemonsqueezy_list_variants` | List variants of a product - GET /products/&#123;product_id&#125;/variants. |
| `lemonsqueezy_get_variant` | Get one variant - GET /variants/&#123;id&#125;. |
| `lemonsqueezy_create_variant` | Create a variant - POST /variants. |
| `lemonsqueezy_update_variant` | Update a variant - PATCH /variants/&#123;id&#125;. |
| `lemonsqueezy_list_orders` | List orders in a store - GET /stores/&#123;store_id&#125;/orders. |
| `lemonsqueezy_get_order` | Get one order - GET /orders/&#123;id&#125;. |
| `lemonsqueezy_create_order` | Create an order (one-time purchase) - POST /orders. |
| `lemonsqueezy_list_subscriptions` | List subscriptions in a store - GET /stores/&#123;store_id&#125;/subscriptions. |
| `lemonsqueezy_get_subscription` | Get one subscription - GET /subscriptions/&#123;id&#125;. |
| `lemonsqueezy_update_subscription` | Update a subscription (pause/resume or update card details) - PATCH /subscriptions/&#123;id&#125;. |
| `lemonsqueezy_cancel_subscription` | Cancel a subscription - DELETE /subscriptions/&#123;id&#125;. |
| `lemonsqueezy_list_invoices` | List invoices in a store - GET /stores/&#123;store_id&#125;/invoices. |
| `lemonsqueezy_get_invoice` | Get one invoice - GET /invoices/&#123;id&#125;. |
| `lemonsqueezy_list_discounts` | List discounts (coupons) in a store - GET /stores/&#123;store_id&#125;/discounts. |
| `lemonsqueezy_get_discount` | Get one discount - GET /discounts/&#123;id&#125;. |
| `lemonsqueezy_create_discount` | Create a discount/coupon - POST /discounts. |
| `lemonsqueezy_update_discount` | Update a discount - PATCH /discounts/&#123;id&#125;. |
| `lemonsqueezy_list_files` | List files for a variant - GET /variants/&#123;variant_id&#125;/files. |
| `lemonsqueezy_get_file` | Get one file - GET /files/&#123;id&#125;. |
| `lemonsqueezy_create_file` | Add a file to a variant - POST /files. |
| `lemonsqueezy_delete_file` | Delete a file - DELETE /files/&#123;id&#125;. |
| `lemonsqueezy_list_webhooks` | List webhooks for a store - GET /stores/&#123;store_id&#125;/webhooks. |
| `lemonsqueezy_get_webhook` | Get one webhook - GET /webhooks/&#123;id&#125;. |
| `lemonsqueezy_create_webhook` | Create a webhook - POST /webhooks. |
| `lemonsqueezy_update_webhook` | Update a webhook - PATCH /webhooks/&#123;id&#125;. |
| `lemonsqueezy_delete_webhook` | Delete a webhook - DELETE /webhooks/&#123;id&#125;. |
| `lemonsqueezy_list_license_keys` | List license keys in a store - GET /stores/&#123;store_id&#125;/license-keys. |
| `lemonsqueezy_get_license_key` | Get one license key - GET /license-keys/&#123;id&#125;. |
| `lemonsqueezy_list_license_key_instances` | List instances (activations) of a license key - GET /license-keys/&#123;license_key_id&#125;/instances. |
| `lemonsqueezy_get_license_key_instance` | Get one license key instance - GET /license-key-instances/&#123;id&#125;. |

## How to get credentials

This connector uses an **API key / token**. Create one in the provider
dashboard, then paste it into FlyMyAI:

- **`LEMONSQUEEZY_API_KEY`** - Lemon Squeezy - Settings - API. (https://app.lemonsqueezy.com/settings/api)

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `LEMONSQUEEZY_API_KEY` | Lemon Squeezy - Settings - API. |

## Troubleshooting

- **`401 Unauthorized` / `403 Forbidden`** - the token is wrong, expired, or missing a required scope - regenerate it.
- **`429 Too Many Requests`** - you hit the provider rate limit; retry after a short backoff.
- **Unexpected `4xx` on writes** - double-check required fields; the agent confirms before write actions.

## Links

- [Lemon Squeezy API documentation](https://docs.lemonsqueezy.com/api)
