---
title: Set Up Subscription Revenue Measurement
description: "How to set up subscription tracking in Tenjin: add your store credentials, integrate the SDK (or connect RevenueCat), check your reports, and turn on callbacks."
url: "https://tenjin.com/ja/docs/subscription-revenue/"
updated: "2026-11-04"
category: Revenue Measurement / Subscription Revenue Measurement
---

# Set Up Subscription Revenue Measurement

This guide walks you through setting up [Subscription Revenue Measurement](/docs/subscription-revenue-overview/) for your iOS and Android apps. New to the feature? Read the [overview](/docs/subscription-revenue-overview/) first.

### Before you start

Setup has four steps. Only one of them needs a developer:

| Step | Who does it | Time |
| --- | --- | --- |
| 1. Add your store credentials in Tenjin | You (no coding) | 5–15 min |
| 2. Add the subscription method to the Tenjin SDK | Your developer | Varies |
| 3. Check your Subscriptions report | You | 1 min |
| 4. Turn on subscription callbacks | You (no coding) | 1 min per channel |

**Using RevenueCat?** You can skip the SDK work in Step 2. Follow the RevenueCat option in Step 2 instead.

---

### Step 1: Add your store credentials in Tenjin

Your store credentials let Tenjin read subscription details (price, trial status, renewals, cancellations) directly from the App Store and Google Play.

1. Go to [Configure → Apps](https://dashboard.tenjin.com/dashboard/apps) in the Tenjin dashboard.
2. Select your app.
3. Find the **Subscriptions Tracking** section and fill it in:
   - **iOS apps:** Key ID, Issuer ID, and your In-App Purchase key (.p8 file)
   - **Android apps:** upload your Google Play service account private key (.json file).
4. Click **Save** in that section. Tenjin checks your credentials when you save. If something is wrong, you'll see an error. If they work, the section shows **Configured**. On the Apps page, the **Subscriptions** column shows each app's status: connected, not connected, or invalid (with a message explaining what to fix). Tenjin re-checks your credentials daily, so you'll know if access is revoked.

   ![Subscriptions Tracking section for an iOS app, with Key ID, Issuer ID and In-App Purchase Key fields](https://tenjin.com/wp-content/uploads/2026/10/subscriptions-tracking-ios.webp)　　

   　iOS app: Key ID, Issuer ID and In-App Purchase Key

   ![Subscriptions Tracking section for an Android app, with the Upload JSON file button](https://tenjin.com/wp-content/uploads/2026/10/subscriptions-tracking-android.webp)

   　Android app: Service Account Private Key (JSON file)

**Don't have these credentials yet?** Open the guide for your store below.

---

#### How to generate App Store Connect credentials (iOS)

When you're done, you'll have three things to add in Tenjin: your **Issuer ID**, **Key ID**, and **In-App Purchase key file** (.p8). This takes about 5 minutes. You'll need the Account Holder or Admin role in App Store Connect.

#### 1. Sign in to App Store Connect

Go to [appstoreconnect.apple.com](https://appstoreconnect.apple.com) and sign in.

#### 2. Open the In-App Purchase keys page

1. Click **Users and Access** in the top navigation.
2. Select the **Integrations** tab.
3. Click **In-App Purchase** in the left sidebar.

**Important:** Use **In-App Purchase**, not the "App Store Connect API" section. The App Store Connect API key is a different key and won't work for subscription tracking. This is the most common setup mistake.

#### 3. Copy your Issuer ID

At the top of the page you'll see your **Issuer ID**. It looks like this: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`. Copy it and save it. It's the same for every key in your team.

![App Store Connect In-App Purchase page showing the Issuer ID](https://tenjin.com/wp-content/uploads/2026/02/image-58-1024x515.png)

#### 4. Generate a new In-App Purchase key

1. Click the **+** button next to Active.
2. Give the key a name you'll recognize, for example `Tenjin Subscription Tracking`.
3. Click **Generate**.

![Generate In-App Purchase Key dialog in App Store Connect](https://tenjin.com/wp-content/uploads/2026/02/image-59.png)

#### 5. Download the key file (.p8)

Click **Download API Key**. The file will be named `SubscriptionKey_XXXXXXXXXX.p8`.

**You can only download this file once.** Save it somewhere safe and don't share it over email or chat. If you lose it, revoke the key and generate a new one.

#### 6. Copy your Key ID

In the keys list, the **Key ID** column shows a 10-character code (for example `AB12CD34EF`). It's also part of the file name: `SubscriptionKey_<KEY_ID>.p8`.

You now have everything you need. Add the Issuer ID, Key ID and .p8 file in the Subscriptions Tracking section above.

---

#### How to generate Google Play credentials (Android)

When you're done, you'll have one thing to add in Tenjin: a **service account key file** (.json). This takes about 10–15 minutes. You'll need access to Google Cloud and Admin access in Google Play Console.

**Plan ahead:** Google can take **24–36 hours** to activate new Play Console permissions. It's normal for things not to work right away.

#### 1. Create a Google Cloud project

1. Open [Google Cloud: Create project](https://console.cloud.google.com/projectcreate). You can also reuse an existing project.
2. Enter a **Project name**, choose your organization, and click **Create**.
3. Make sure the new project is selected in the project picker at the top of the page.

![Google Cloud New Project screen](https://tenjin.com/wp-content/uploads/2026/09/subs-gp-1-new-project.png)

#### 2. Turn on the Google Play Android Developer API

Open the [Google Play Android Developer API](https://console.cloud.google.com/apis/library/androidpublisher.googleapis.com) page and click **Enable**.

![Google Play Android Developer API page with the Enable button](https://tenjin.com/wp-content/uploads/2026/09/subs-gp-2-enable-api.png)

#### 3. Create a service account

1. Go to [IAM & Admin → Service Accounts → Create service account](https://console.cloud.google.com/iam-admin/serviceaccounts/create).
2. Enter a name. The ID fills in automatically.
3. **Copy the email address** that ends in `.iam.gserviceaccount.com`. You'll need it in step 5.
4. Click **Create and close**. You don't need to add any Google Cloud roles.

![Create service account form in Google Cloud](https://tenjin.com/wp-content/uploads/2026/09/subs-gp-3-service-account.png)

#### 4. Create the JSON key

1. Open the service account you just created and go to the **Keys** tab.
2. Click **Add key → Create new key**.
3. Select **JSON** and click **Create**. The key file downloads to your computer.

![Service account Keys tab with the Add key menu](https://tenjin.com/wp-content/uploads/2026/09/subs-gp-4a-add-key.png)

![Create private key dialog with JSON selected](https://tenjin.com/wp-content/uploads/2026/09/subs-gp-4b-json-key.png)

**Keep this file safe.** It can't be downloaded again, so don't share it over email or chat. If **Add key** is greyed out, your organization blocks key creation. Ask your Google Cloud admin to allow it for this project.

#### 5. Give the service account access in Google Play Console

1. In [Google Play Console](https://play.google.com/console), go to **Users and permissions**. This is at the account level, not inside an app (click **Home** first if you don't see it).
2. Click **Invite new users** and paste the service account email from step 3.
3. Under **App permissions**, click **Add app**, select your app(s), and click **Apply**.

![Invite user screen in Google Play Console](https://tenjin.com/wp-content/uploads/2026/09/subs-gp-5a-invite-user.jpg)

![Add app dialog with an app selected](https://tenjin.com/wp-content/uploads/2026/09/subs-gp-5b-add-app.png)

1. Turn on only the permissions below, then click **Apply → Invite user → Send invite**.

| Permission | Setting | Why |
| --- | --- | --- |
| View app information (read-only) | ✅ On | On by default. Basic access. |
| Financial data → View financial data | ✅ On | Lets Tenjin read subscription purchases. |
| Everything else (including Manage orders and subscriptions) | ❌ Off | Not needed. |

![App permissions with View financial data turned on](https://tenjin.com/wp-content/uploads/2026/09/subs-gp-5c-permissions.png)

When you're done, the service account shows as **Active – Never expires**.

![Users and permissions list showing the service account as Active](https://tenjin.com/wp-content/uploads/2026/09/subs-gp-5d-active.jpg)

Now upload the JSON file in the Subscriptions Tracking section above. Remember, Google can take up to 36 hours to activate the permissions.

**To replace the key later:** create a new key in the Keys tab, upload it in Tenjin, then delete the old one. **To remove access:** remove the service account from Play Console, or delete it in Google Cloud.

---

### Step 2: Add the subscription method to the Tenjin SDK

The SDK connects each subscription to the install and the ad campaign that brought the user in. Share the guide for your platform with your developer:

- [iOS](https://github.com/tenjin/tenjin-ios-sdk/blob/master/SUBSCRIPTIONS_TRACKING.md)
- [Android](https://github.com/tenjin/tenjin-android-sdk/blob/master/SUBSCRIPTIONS_TRACKING.md)
- [Unity](https://github.com/tenjin/tenjin-unity-sdk/blob/master/SUBSCRIPTIONS_TRACKING.md)
- [React Native](https://github.com/tenjin/tenjin-react-native-sdk/blob/master/SUBSCRIPTIONS_TRACKING.md)
- [Flutter](https://github.com/tenjin/flutter-sdk/blob/main/SUBSCRIPTIONS_TRACKING.md)

#### Integrate using AI

Using an AI coding assistant like Claude Code, Cursor or Copilot? Give it this prompt and it will find the right guide for your platform and add subscription tracking for you:

 JavaScript

```
Add Tenjin SDK subscriptions tracking to my app using:

https://raw.githubusercontent.com/tenjin/sdk-llm-guides/main/guides/llm-guide.md
```

#### Using RevenueCat instead? Connect RevenueCat (no SDK work)

If you already use RevenueCat, you don't need the SDK subscription method. Keep your store credentials from Step 1 and add the Tenjin integration in RevenueCat:

1. In the RevenueCat dashboard, open your **Project settings → Integrations**.
2. Select **Tenjin** and add your Tenjin SDK key(s).

RevenueCat will start sending your subscription events to Tenjin. Tenjin automatically removes duplicates between RevenueCat and your App Store or Google Play data, so each trial and renewal is counted only once. See [Third Party Purchase Integration](/docs/third-party-purchase-integration/) for more on RevenueCat.

---

### Step 3: Check your Subscriptions report

Once data starts coming in, open the [Subscriptions report](https://dashboard.tenjin.com/dashboard/subscriptions). If you see trials, subscriptions and revenue here, your setup is working. Use **Breakdowns** to split the numbers by subscription plan (product_id) and channel.

![Tenjin Subscriptions report showing New Trials, New Subscriptions Revenue, Renewals, Renewals Revenue and All Subscriptions Revenue by plan and channel](https://tenjin.com/wp-content/uploads/2026/09/subs-report.png)

Want to know what each metric means? See [Subscription Revenue Tracking](/docs/subscription-revenue-overview/).

---

### Step 4: Turn on subscription callbacks

Callbacks send your subscription events to your ad networks so they can optimize your campaigns. There are two built-in events, and you don't need to create any custom events:

- **Trial Start**: helps networks find users who start trials.
- **Subscription Revenue**: helps networks find users who pay and keep renewing.

1. Go to [Configure → Apps](https://dashboard.tenjin.com/dashboard/apps), select your app, and open the **Callbacks** tab.
2. Choose your channel (for example, Meta).
3. Turn on the **Trial Start** and/or **Subscription Revenue** callback.

**Using a third-party purchase integration?** With RevenueCat, duplicates are removed automatically, so you can turn on both the Subscription Revenue and In-App Purchase callbacks. For other third-party purchase integrations, turn on either the Subscription Revenue or the In-App Purchase callback for a network, not both, to avoid sending duplicate events.

Don't see a subscription callback for the network you want, or have questions? Email us at [support@tenjin.com](mailto:support@tenjin.com).

---
