Integrations

16 subscription events that can be sent to 3rd party analytics and webhook. These events will help you to better understand the behavior of your subscribers

After installing Adapty SDK and connecting Subscription Status URL for iOS and Real-time developer notifications (RTDN) for Android, Adapty receives info about your customer behavior and converts it into 16 human-readable events.

Events

Event Name

Description

subscription_initial_purchase

A user has activated a subscription without a trial period i.e. he was billed instantly

subscription_renewed

A subscription was renewed and the user was charged. For both trial and non-trial subscriptions, this event is sent starting from the second billing

subscription_cancelled

A user has cancelled a subscription

trial_started

A user has activated a trial subscription

trial_converted

A trial period has ended and the user was billed, i.e. first purchase was made

trial_cancelled

A user cancelled subscription during the trial period

non_subscription_purchase

Any non-subscription purchase e.g. lifetime access or consumable product such as coins

billing_issue_detected

An attempt to charge the user was made, but a billing issue happened. Usually, it means the user doesn't have enough card balance

entered_grace_period

The payment was not successful and the user entered into a grace period. The user still has access to the premium features of your app until the grace period finished

auto_renew_off

A user turned off subscription auto-renewal during the trial. A user still has access to premium features of your app until the end of the trial perod

auto_renew_on

A user turned on subscription auto-renewal during the trial period

auto_renew_off_subscription

A user turned off subscription auto-renewal. A user still has access to the premium features of your app until the end of subscription period

auto_renew_on_subscription

A user turned on subscription auto-renewal

subscription_refunded

A subscription was refunded (e.g. by Apple support)

non_subscription_purchase_refunded

Non-subscription purchase was refunded

subscription_paused

User activated subscription pause (Android only)

SUBSCRIPTION_CANCELLED event means that the subscription completely finished and the user has no longer access to the premium features of the app. When the user unsubscribes, AUTO_RENEW_OFF or AUTO_RENEW_OFF_SUBSCRIPTION is sent. The same logic applied to TRIAL_CANCELLED.

The events above fully cover the users' state in terms of purchases. Let's look at some examples.

Example 1

The user activated a monthly subscription on April 1st with 7 days trial. On the 4th day, he unsubscribed.

In that case following events will be sent:

  1. trial_started on April 1st

  2. auto_renew_off on 4th April

  3. trial_cancelled on 7th April

Example 2

The user activated a monthly subscription on April 1st with 7 days trial. On the 10th day, he unsubscribed.

In that case following events will be sent:

  1. trial_started on April 1st

  2. trial_converted on April 7th

  3. auto_renew_off_subscription on April 10th

  4. subscription_cancelled on May 1st

Properties

Property

Type

Description

price_usd

float

Product price before Apple/Google cut. Revenue.

proceeds_usd

float

Product price after Apple/Google cut. Net revenue.

transaction_id

str

A unique identifier for a transaction such as a purchase or renewal.

original_transaction_id

str

The transaction identifier of the original purchase.

purchase_date

ISO 8601 date

The date and time of product purchase.

original_purchase_date

ISO 8601 date

The date and time of the original purchase.

environment

str

Could be Sandbox or Production.

vendor_product_id

str

Product id in Apple/Google store.

event_datetime

ISO 8601 date

The date and time of the event.

store

str

Could be app_store or play_store.

trial_duration

str

Duration of a trial period in days. Sent in a format "{} days" , for example, "7 days".

cancellation_reason

str

A reason why the user canceled a subscription.

Can be iOS & Android voluntarily_cancelled, billing_error, refund iOS price_increase, product_was_not_available, unknown Android new_subscription_replace, cancelled_by_developer

subscription_expires_at

ISO 8601 date

The Expiration date of subscription. Usually in the future.

consecutive_payments

int

The number of periods, that a user is subscribed without interruptions. Includes the current period.

rate_after_first_year

bool

Boolean indicates that a vendor reduces cuts to 15%. Apple and Google have 30% first-year cut and 15% after it.

Each event has the following properties:

transaction_id, original_transaction_id, purchase_date, original_purchase_date, environment, vendor_product_id, event_datetime, store

In addition. some events have additional properties.

Event Name

Properties

subscription_initial_purchase

price_usd, proceeds_usd, subscription_expires_at, consecutive_payments, rate_after_first_year, trial_duration

subscription_renewed

price_usd, proceeds_usd, subscription_expires_at, consecutive_payments, rate_after_first_year, trial_duration

subscription_cancelled

cancellation_reason, trial_duration

trial_started

subscription_expires_at, trial_duration

trial_converted

price_usd, proceeds_usd, subscription_expires_at, consecutive_payments, rate_after_first_year, trial_duration

trial_cancelled

cancellation_reason, trial_duration

non_subscription_purchase

price_usd, proceeds_usd

billing_issue_detected

subscription_expires_at, trial_duration

entered_grace_period

subscription_expires_at, trial_duration

Event example

{
"price_usd": 9.99,
"proceeds_usd": 6.99,
"transaction_id": "1000000628581600",
"original_transaction_id": "1000000628581600",
"purchase_date": "2020-02-18T18:40:22.000000+0000",
"original_purchase_date": "2020-02-18T18:40:22.000000+0000",
"environment": "Sandbox",
"vendor_product_id": "premium",
"event_datetime": "2020-02-18T18:40:22.000000+0000",
"store": "app_store"
}

Adapty send events to your server and 3rd party analytical systems.