Connect Lemon Squeezy to Fondoo
If you sell through Lemon Squeezy, this connection lets Fondoo see your orders, refunds and subscriptions. Your AI agent can then report revenue, credit sales to the visits that led to them, and give paying customers the right plan in your app. Fondoo only reads. It cannot refund, cancel or change anything in your store.
What Fondoo can do with it
The connector has six read-only actions (used through connector_action):
transactions.pull: a page of orders and refunds, including subscription invoices.subscriptions.pull: a page of subscription status changes (active, past due, cancelled).customers.list: a page of customers, ID and email only.webhooks.verifyandwebhooks.parse: check and read webhook deliveries from Lemon Squeezy.dashboard.link: a link into your Lemon Squeezy dashboard for a person to open.
When you bind the connection to a site with connect_revenue_source, Fondoo also:
- imports sales as orders and analytics conversions;
- turns subscriptions into entitlements, which can update a customer's plan in your app's database;
- keeps everything up to date through webhooks and
sync_revenue_source.
What needs your approval: binding a source in live mode (connect_revenue_source) and changing its product map (set_revenue_product_map) need the owner's approval when an agent does them. Reading never needs approval. There is no refund, charge or payout action. Do refunds in Lemon Squeezy.
Before you start
- A Lemon Squeezy store. API access is included. There is no extra API fee. See Lemon Squeezy pricing for sales fees.
- Test vs live. Keys made in test mode only see test data. Make a live-mode key for real sales (test mode).
- Live mode in Fondoo needs a paid Fondoo plan. Test mode works on any plan.
- Product status note. Lemon Squeezy is still running. Its January 2026 update says the team is building toward Stripe Managed Payments and will offer a way to migrate. No date is set (Lemon Squeezy 2026 update).
Step by step: get your credentials
- Sign in at app.lemonsqueezy.com.
- Switch test mode on or off to match the data you want (test or live).
- Go to Settings → API (app.lemonsqueezy.com/settings/api) and create a new API key. Give it a name such as
Fondoo. - Copy the key right away. Lemon Squeezy shows it only once (developer guide). Keys are valid for one year.
- Optional: find your Store ID under Settings → Stores. Add it if you have more than one store and want Fondoo to read only one.
Lemon Squeezy keys have no permission settings. A key can see everything in the account. Fondoo limits itself to reads.
What goes where in Fondoo:
| Fondoo field | What to paste |
|---|---|
API key (apiKey) | the key from step 4 |
Store ID (optional filter) (storeId) | the number from step 5, or leave empty |
Webhook signing secret (webhookSecret) | leave empty for now. You add it in the Webhooks step |
Connect it in Fondoo
In the dashboard
- Open Connections.
- Under Available, find Lemon Squeezy (in the Payments group) and click Use a key.
- Click Open secure key entry. The page works once and expires after 15 minutes.
- Paste the API key (and the Store ID if you have one) and save.
- On the new card under Connected, click Check connection.
By asking your agent
Example prompt:
Connect my Lemon Squeezy store to my site and import my sales. Send me a secure link for the key.
The agent runs these steps:
add_connection_key({ provider: "lemonsqueezy", siteId: "<site id>" }) // returns a secure paste link
test_connection({ connectionId: "<id>" })
connect_revenue_source({ siteId: "<site id>", connectionId: "<id>", mode: "live",
productMap: { "<Lemon Squeezy product ID>": "pro" } }) // returns webhookUrl
sync_revenue_source({ sourceId: "<source id>" })productMap links a Lemon Squeezy product ID to a Fondoo plan name. Products you don't map are still recorded as revenue. They just don't grant a plan.
For a help link only, connect_service({provider:"lemonsqueezy", siteId}) returns signed instructions valid for 15 minutes.
Over REST, each step is POST https://api.getfondoo.com/v1/ops/<operation> with Authorization: Bearer <your Fondoo API key> and the same JSON body, for example POST /v1/ops/add_connection_key with {"provider":"lemonsqueezy","siteId":"<site id>"}.
Webhooks
Webhooks let Fondoo record a sale within seconds instead of waiting for the next sync.
- Get the URL from
connect_revenue_source(orget_revenue_sources). It looks likehttps://<Fondoo API host>/webhooks/revenue/<connectionId>. - In Lemon Squeezy go to Settings → Webhooks and add a webhook (webhooks help).
- Paste the URL as the callback URL.
- Enter a Signing secret (6 to 40 characters). Make up a long random one and keep a copy.
- Tick these events:
order_created,order_refunded, allsubscription_*events (created, updated, cancelled, resumed, expired, paused, unpaused) and allsubscription_payment_*events (success, failed, recovered, refunded). - Save.
- In Fondoo, run
rotate_connection_key({connectionId})and open the secure page. Paste your API key again plus the signing secret in Webhook signing secret. The secure page replaces all fields at once, so include the API key.
Lemon Squeezy signs each delivery with an X-Signature header: an HMAC-SHA256 hex digest of the raw body made with your signing secret (signing requests). Fondoo checks it before recording anything.
To credit a sale to a visit, Fondoo checkouts pass checkout[custom][visit_id] and checkout[custom][external_user_id]. Lemon Squeezy returns these only in webhook meta.custom_data, so attribution needs the webhook.
Test that it works
- Run
test_connection. A pass means the key can read orders. Subscriptions, invoices and customers are listed as "unknown" until Fondoo first reads them. That is normal. - Run
sync_revenue_source({sourceId}). Then checkget_revenue_sources({siteId})for a recentlastSyncAtand nolastError. - In test mode, buy a product with a Lemon Squeezy test card. With the webhook set up, the order should appear in Fondoo shortly after the purchase.
Troubleshooting
- 401 or "unauthorized". The key is wrong, expired (keys last one year) or from the other mode. Create a new key and use
rotate_connection_key. - Test passes but no sales appear. A test-mode key sees only test orders. Use a live-mode key for real sales. Also check the Store ID filter.
- "This site and mode already has a source for this provider". A site can have one Lemon Squeezy source per mode. Use
get_revenue_sourcesto find it. - Webhook deliveries fail. Make sure the signing secret in Lemon Squeezy and in Fondoo match exactly. Check the URL ends with the right connection ID.
- Sales have no visit attribution. Attribution comes only through the webhook. Older sales are imported as orders but not back-dated into analytics.
- 429 Too Many Requests. Lemon Squeezy allows 300 calls per minute per key. Fondoo stays under 120 per minute. Wait and retry.
Limits, data and security
- Rate limits: 300 API calls per minute (API docs). Fondoo budgets 120 per minute.
- What Fondoo stores: the API key and signing secret, encrypted, never shown again. From your data it keeps order and refund amounts, subscription status, and the buyer's ID and email. Nothing else about the buyer.
- Rotate: create a new key in Lemon Squeezy, then
rotate_connection_key({connectionId}). Set a reminder: keys expire after a year. - Disconnect:
disconnect_revenue_source({sourceId})stops feeding the site (imported orders stay).delete_connection({connectionId})removes the stored key. Then delete the key and webhook in Lemon Squeezy, because Fondoo cannot revoke them for you. - Dashboard deep links are based on observed Lemon Squeezy routes, not documented ones. A link may open the dashboard home instead of the exact order.
Official links
- API overview and rate limits: https://docs.lemonsqueezy.com/api
- Getting started (API keys): https://docs.lemonsqueezy.com/guides/developer-guide/getting-started
- Requests and key expiry: https://docs.lemonsqueezy.com/api/getting-started/requests
- Webhooks: https://docs.lemonsqueezy.com/help/webhooks
- Webhook events: https://docs.lemonsqueezy.com/help/webhooks/event-types
- Signing requests: https://docs.lemonsqueezy.com/help/webhooks/signing-requests
- Test mode: https://docs.lemonsqueezy.com/help/getting-started/test-mode
