Integrations
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.
Setup
1. Configure the integration
Via MCP:
Via Admin API:
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.
3. Webhook events
Amba processes these RevenueCat webhook events:
| Event | Action |
|---|---|
INITIAL_PURCHASE | Creates/updates user entitlement |
RENEWAL | Extends entitlement expiry |
CANCELLATION | Marks entitlement for expiry at period end |
EXPIRATION | Deactivates entitlement |
BILLING_ISSUE | Flags billing issue on entitlement |
Webhook payloads are verified using HMAC with the shared secret.
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 |
Checking entitlements in the SDK
Database tables
| Table | Purpose |
|---|---|
project_integrations | Integration config (encrypted) |
user_entitlements | Entitlement records with status and expiry |