# App Store Subscriptions

{% hint style="danger" %}
This functionality is available only for projects with integrated devtodev SDK version 2.1.0 or higher for native applications and not lower than 3.1.0 for Unity!
{% endhint %}

{% hint style="info" %}
*Please note that the current section describes how to integrate **only one source** of subscription data* – *from the App Store. You’ll also need to integrate the* [***Subscription event via SDK***](https://docs.devtodev.com/integration/integration-of-sdk-v2/setting-up-events/basic-methods#subscriptions) *to get the subscription data in the devtodev reports (the documentation link is at the bottom of the page).*\
\&#xNAN;*When you integrate both data sources (App Store and SDK), you’ll be able to see the* [*Subscriptions report*](https://docs.devtodev.com/reports-and-functionality/project-related-reports-and-fuctionality/smart-view/monetization-reports#subscriptions) *and devtodev will connect that data with the users successfully. If one of the integrations is missing, the Subscriptions report won’t be working correctly.*
{% endhint %}

## Step 1. Settings on App Store Connect side

Go to [App Store Connect](https://appstoreconnect.apple.com/).

In **My Applications**, select the app for which you would like to start analyzing subscription data.

In the left menu column under **General**, navigate to the **App Information** section.

<figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2Fct7gvC0PKlnBQqrdjBmr%2Fimage.png?alt=media&#x26;token=4a6eff4d-f64a-47d2-9d02-c9d5130b72ea" alt=""><figcaption></figcaption></figure>

Go to [devtodev](https://analytics.devtodev.com/), select the same app, and open the app settings:

1. Navigate to **Settings → Payments integration → Subscriptions → Integrate**.&#x20;

<figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FktvNRQpZlRn6zQLJRyHp%2Fimage.png?alt=media&#x26;token=94e9384e-95a0-49c4-9b29-4f0b687e903d" alt=""><figcaption></figcaption></figure>

2. Copy the **Endpoint URL**.&#x20;

<figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FCvEBbHuuarSgB6oMaR1p%2Fimage.png?alt=media&#x26;token=0b6c0b33-9ca8-4caa-b47b-bf4198064a7d" alt=""><figcaption></figcaption></figure>

3. Return to [App Store Connect](https://appstoreconnect.apple.com/) and find the **App Store Server Notifications** section within **General App Information**. \
   Insert the copied **Endpoint URL** into both the **Production Server URL** and **Sandbox Server URL** fields.

<figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FcPIzJKuLsxIu7OWRz87t%2Fimage.png?alt=media&#x26;token=eb9b7ae1-e40c-46b8-9a2c-9a3046503faa" alt=""><figcaption></figcaption></figure>

4. Click `Save` to confirm your changes.

## Step 2. Settings on devtodev side

Go back to the [devtodev](https://analytics.devtodev.com/) **app settings**.

1. Specify your **application bundle** in the **iOS Bundle ID** field.&#x20;

<figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FkmMigntDwWtbqDBIMhGn%2Fimage.png?alt=media&#x26;token=c54aacee-d818-46e4-8291-ccd0747c697b" alt=""><figcaption></figcaption></figure>

2. Add all existing **subscriptions**, specifying:

* **SKU** (Subscription Key) – You can find it at [App Store Connect](https://appstoreconnect.apple.com/) → Manage Your Applications → Select the app.
* **Period** – e.g., 1 month, 1 year.
* **Name** – Custom name for the subscription.&#x20;

<figure><img src="https://2105883905-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LnGcP_ZeRJ1ipj9O8dF%2Fuploads%2FQUUHrTn8ON6i8aY4JPPP%2Fimage.png?alt=media&#x26;token=03148a0b-3b12-49c6-bfe0-17de1c09f790" alt=""><figcaption></figcaption></figure>

3. Click `Save` to finalize the setup.

## Final Step <a href="#final-step" id="final-step"></a>

Don’t forget to integrate the [subscription-specific SDK methods](https://docs.devtodev.com/integration/integration-of-sdk-v2/setting-up-events/basic-methods#subscriptions). This ensures proper subscription event tracking and accurate reporting within devtodev.
