RevenueCat
Integrate RevenueCat for subscription management and entitlements.
Connect RevenueCat to sync subscription status and entitlements with Amba. When a user subscribes via RevenueCat, their entitlements are automatically updated in Amba.
The same integration also powers the Monetization Control Plane — declare your entitlements, products, and offerings as code and plan / apply them to RevenueCat (quickstart).
RevenueCat handles App Store and Play Store subscriptions. For web checkout, follow RevenueCat's documented Stripe Billing path with the built-in Web Subscriptions integration — web purchases grant the same entitlements through the same cascade. For everything else — manual support grants, gift codes, ToS-violation revokes, migrations from legacy systems — use
POST /admin/projects/:projectId/users/:userId/entitlementsto grant the same entitlement directly. All paths produce the same entitlement and are read through the same client API.
Setup
1. Configure the integration
Via MCP:
Via Admin API:
secret_api_key is RevenueCat's secret REST API key (api_key is still
accepted on older rows). To use the
Monetization Control Plane's apply, also supply a
read-write key (project_configuration:*:read_write) as
secret_api_key_write — or use one full-access key for both. Keys are
resolved server-side and never returned to a client.
2. Set up the webhook
The API returns a webhook URL when you configure the integration:
Add this URL in your RevenueCat dashboard under Project Settings > Integrations > Webhooks, and set the webhook's Authorization header value to Bearer <webhook_secret> — the literal word Bearer, a space, then the same webhook_secret you configured above. Amba compares the full header value on every delivery (constant-time) and rejects deliveries that do not match.
3. Webhook events
Amba processes these RevenueCat webhook events:
| Event | Action |
|---|---|
INITIAL_PURCHASE | Grants entitlements; fires the reward cascade |
RENEWAL | Grants/extends entitlements; fires the reward cascade |
NON_RENEWING_PURCHASE | Grants entitlements; fires the reward cascade |
PRODUCT_CHANGE | Grants entitlements for the new product |
UNCANCELLATION | Re-grants entitlements |
CANCELLATION | Keeps access until the paid period ends (auto-renew off ≠ revoke) |
EXPIRATION | Deactivates entitlements |
REFUND | Deactivates entitlements |
SUBSCRIPTION_PAUSED | Deactivates entitlements |
Other event types that carry entitlement IDs are treated conservatively as
grants. Every fresh event also updates the neutral subscription_* user
properties (subscription_active, subscription_last_event,
subscription_product_id, subscription_store), dedupes on RevenueCat's
event ID, and carries an ordering watermark so a delayed EXPIRATION cannot
clobber a newer RENEWAL.
Deliveries are authenticated by comparing the Authorization header against
Bearer <webhook_secret> in constant time.
Admin API reference
| Method | Path | Description |
|---|---|---|
POST | /admin/integrations | Configure integration |
GET | /admin/integrations | List active integrations |
PATCH | /admin/integrations/revenuecat | Update config |
POST | /admin/integrations/revenuecat/test | Test connection |