Integrate in-app subscription events from RevenueCat with CleverTap


The CleverTap integration is available on the Pro plan.

RevenueCat can automatically send subscription events into CleverTap. This is useful for seeing all events and revenue that occur for your app even if it's not active for a period of time.


The CleverTap integration tracks the following events:

Initial PurchaseThe first purchase of an auto-renewing subscription product that does not contain a free trial.
Trial StartedThe start of an auto-renewing subscription product free trial.
Trial ConvertedWhen an auto-renewing subscription product converts from a free trial to normal paid period.
Trial CancelledWhen a user turns off renewals for an auto-renewing subscription product during a free trial period.
RenewalWhen an auto-renewing subscription product renews OR a user repurchases the auto-renewing subscription product after a lapse in their subscription.
CancellationWhen a user turns off renewals for an auto-renewing subscription product during the normal paid period.
UncancellationWhen a user re-enables the auto-renew status for a subscription.
Non Subscription PurchaseThe purchase of any product that's not an auto-renewing subscription.
ExpirationA subscription has expired and access should be removed.
Billing IssuesThere has been a problem trying to charge the subscriber.

This does not mean the subscription has expired (in the case of a grace period enabled).

For events that have revenue, such as trial conversions and renewals, RevenueCat will automatically record this amount along with the event in CleverTap.


1. Send CleverTap Identity to RevenueCat

The CleverTap integration can send the CleverTap ID to CleverTap as the user identity. To do that, you will need to update the following Subscriber Attribute for the user.

$clevertapIdThe CleverTap ID for the user.

This property can be set manually, like any other Subscriber Attribute. If you do not set this property, the App User ID will be sent as the user identity to CleverTap.

// Configure Purchases SDK
Purchases.configure(withAPIKey: "public_sdk_key", appUserID: "my_app_user_id")

// Configure CleverTap SDK

// ...

if let cleverTapId = CleverTap.sharedInstance()?.profileGetCleverTapID() {
    Purchases.shared.setAttributes(["$clevertapId" : clevertapId])
// Configure Purchases SDK
[RCPurchases configureWithAPIKey:@"public_sdk_key" appUserID:@"my_app_user_id"];

// Configure CleverTap SDK
[CleverTap autoIntegrate];


NSString *cleverTapId = [[CleverTap sharedInstance] profileGetCleverTapID];
if (cleverTapId != nil) {
  [[RCPurchases sharedPurchases] setAttributes:@{@"$cleverTapId": cleverTapId}];
// Configure Purchases SDK
Purchases.configure(this, "public_sdk_key", "my_app_user_id")

// Configure CleverTap SDK
cleverTapDefaultInstance = CleverTapAPI.getDefaultInstance(this)

val cleverTapId = cleverTapDefaultInstance?.cleverTapID?.also {
   Purchases.sharedInstance.setAttributes(mapOf("$cleverTapId" to it))
// Configure Purchases SDK
Purchases.configure(this, "public_sdk_key", "my_app_user_id");

// Configure CleverTap SDK
CleverTapAPI clevertapDefaultInstance = CleverTapAPI.getDefaultInstance(this);

String cleverTapId = cleverTapDefaultInstance.getCleverTapId();
if (cleverTapId != null) {
  Map<String, String> attributes = new HashMap<String, String>();
    attributes.put("$cleverTapId", cleverTapId);


2. Send RevenueCat Events to CleverTap

After you've set up the Purchases SDK and CleverTap SDK to have the same user identity, you can "turn on" the integration and configure the event names from the RevenueCat dashboard.

  1. Navigate to your project in the RevenueCat dashboard and find the Integrations card in the left menu. Select + New
  1. Choose CleverTap from the Integrations menu
  2. Add your CleverTap Account ID and Passcode.
  3. If you want to test in sandbox, also add your Passcode from your testing account.
  4. Enter the event names that RevenueCat will send or choose the default event names
  5. Select whether you want RevenueCat to report proceeds (after app store cut) or revenue (gross sales)

CleverTap configuration page


By default, RevenueCat sends data through CleverTap's EU data center. For CleverTap customers who have a regional data center configured, you can change your region in the dropdown selector under 'CleverTap Region'.

Sample Event

Below is sample JSON that is delivered to CleverTap for an initial purchase event.

    'd': [
            'type': 'event',
            'evtName': 'initial_purchase',
            'evtData': {
                'amount': 9.99,
                'currency': 'USD',
            'ts': 1580602110000,
            'objectId': 'yourCustomClevertapId',