Connect RevenueCat to Fondoo

Live5 min readUpdated

If your app sells subscriptions or in-app purchases through RevenueCat, this connection lets Fondoo see those customers, subscriptions and purchases. Your AI agent can include app revenue in your reports and match app users to your site's users. It can also give the right plan to people who subscribed in the app. Fondoo only reads. It cannot grant, refund or cancel anything.

What Fondoo can do with it

Six read-only actions, used through connector_action:

  • transactions.pull: purchases and renewals. Amounts are gross, in US dollars.
  • subscriptions.pull: subscription status (active, past due, cancelled) and the entitlements each one grants.
  • customers.list: RevenueCat customer IDs.
  • webhooks.verify and webhooks.parse: check and read RevenueCat webhook events.
  • dashboard.link: a link to your RevenueCat customer list for a person to open.

After you bind the connection with connect_revenue_source, Fondoo records purchases as orders and turns active subscriptions into entitlements. Those can switch a user's plan in your web app too. Fondoo uses the RevenueCat app user ID as the external user ID. Log users in with the same ID your site uses, so web and app accounts match.

What needs your approval: an agent binding a live source or changing its product map needs the owner's approval. Reads never do.

Before you start

  • A RevenueCat project with your apps set up. You must be a project Admin to create secret keys (authentication).
  • Webhooks need RevenueCat's Pro plan (webhooks, pricing). Without webhooks Fondoo still reads through the API. But per-renewal revenue for stores other than the App Store and Google Play is only available through webhooks.
  • Live mode in Fondoo needs a paid Fondoo plan. Test mode works on any plan.

Step by step: get your credentials

  1. Sign in to the RevenueCat dashboard and open your project.
  2. Go to Project settings → API keys.
  3. Click + New secret API key (API v2).
  4. Name it Fondoo and choose V2 as the version.
  5. Set permissions to read-only for customer information. Fondoo needs exactly these:
    • customer_information:customers:read
    • customer_information:subscriptions:read
    • customer_information:purchases:read RevenueCat's screen groups permissions by area. Choose read for customers, subscriptions and purchases under customer information, and leave everything else off.
  6. Click Generate and copy the key. It starts with sk_.
  7. Find your Project ID under Project settings → General settings (projects overview).

What goes where:

Fondoo fieldWhat to paste
RevenueCat secret API key (v2) (apiKey)the sk_... key
RevenueCat project ID (projectId)the Project ID
Webhook Authorization header value (webhookSecret)leave empty for now. See Webhooks
Webhook HMAC signing secret (webhookSigningSecret)leave empty for now. See Webhooks

Connect it in Fondoo

In the dashboard

  1. Open Connections.
  2. Under Available, find RevenueCat (in Payments) and click Use a key.
  3. Click Open secure key entry (single use, expires after 15 minutes). Paste the key and project ID, then save.
  4. Click Check connection on the new card.

By asking your agent

Example prompt:

Connect RevenueCat so my app subscribers get the Pro plan on my website too. Send me a secure link for the key.

The agent runs:

add_connection_key({ provider: "revenuecat", siteId: "<site id>" })
test_connection({ connectionId: "<id>" })
connect_revenue_source({ siteId: "<site id>", connectionId: "<id>", mode: "live",
  productMap: { "pro": "pro" } })     // RevenueCat entitlement identifier → Fondoo plan
sync_revenue_source({ sourceId: "<source id>" })

Map entitlement identifiers rather than product IDs. The API reports RevenueCat product IDs (prod...), but webhooks report store product IDs. Entitlements are the same in both.

For a help link only: connect_service({provider:"revenuecat", siteId}) (signed, valid 15 minutes).

Over REST: POST https://api.getfondoo.com/v1/ops/<operation> with Authorization: Bearer <your Fondoo API key> and the same JSON, for example POST /v1/ops/add_connection_key with {"provider":"revenuecat","siteId":"<site id>"}.

Webhooks

  1. Copy the webhookUrl from connect_revenue_source (or get_revenue_sources). It looks like https://<Fondoo API host>/webhooks/revenue/<connectionId>.
  2. In RevenueCat, open Integrations in the left menu, then Webhooks, and click Add new configuration.
  3. Paste the URL.
  4. Set an Authorization header value. Make up a long random string and keep a copy.
  5. Choose whether to send production events, sandbox events or both.
  6. Optional but recommended: turn on HMAC webhook signing and copy the signing secret. RevenueCat shows it only once.
  7. Save.
  8. In Fondoo run rotate_connection_key({connectionId}). On the secure page, paste the API key and project ID again, the Authorization value in Webhook Authorization header value, and the signing secret if you made one. The page replaces all fields together.

How Fondoo checks deliveries: the Authorization header must equal your value exactly (Bearer <value> is also accepted). If you added a signing secret, the X-RevenueCat-Webhook-Signature header (t=<time>,v1=<hex>, HMAC-SHA256) must match too. Sandbox events are marked as sandbox in Fondoo.

Test that it works

  1. Run test_connection. It reads one customer. Subscriptions and purchases show as "unknown" until the first pull. That's normal.
  2. Run sync_revenue_source({sourceId}) and check get_revenue_sources({siteId}) for lastSyncAt and no lastError.
  3. Make a sandbox purchase in your app (with sandbox events turned on). Check that RevenueCat shows a successful delivery and the purchase appears in Fondoo.

Troubleshooting

  • 401 or 403 on reads. The key is a v1 key, belongs to another project, or lacks a permission. Make a new V2 secret key with the three read permissions.
  • 404 or errors on every read. The project ID is probably wrong. Copy it again from General settings.
  • Webhook rejected (401). The Authorization value in RevenueCat and Fondoo must match exactly. If you rotated the HMAC secret in RevenueCat, the old one stops working at once. Paste the new one in Fondoo.
  • Plans not granted. Check productMap uses entitlement identifiers, and that the app user ID matches the user ID on your site.
  • Refund amounts look odd. RevenueCat's API marks a refunded one-time purchase without the refund date or amount. Fondoo records a full refund dated at the purchase time. This may differ from what you see in RevenueCat.
  • 429 Too Many Requests. RevenueCat allows 480 customer-information requests per minute per key. Fondoo stays at 10 pull pages per minute, because each page makes several calls.

Limits, data and security

  • What Fondoo stores: the secret key, Authorization value and signing secret, encrypted, never shown again. The project ID is stored as a plain identifier. From RevenueCat it keeps purchase amounts, subscription status, entitlements and app user IDs.
  • Rotate: create a new secret key in RevenueCat, run rotate_connection_key({connectionId}), then delete the old key.
  • Disconnect: disconnect_revenue_source({sourceId}) stops the feed (imported data stays). delete_connection({connectionId}) removes stored secrets. Then delete the key and the webhook configuration in RevenueCat.
  • Store transaction IDs used to match API and webhook records are not documented as identical by RevenueCat. Dashboard links open your customer list, because RevenueCat documents no per-customer link.