Events

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 13 human-readable events.

Event Name

Description

subscription_initial_purchase

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

subscription_renewed

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

subscription_cancelled

User has cancelled a subscription

trial_started

User has activated a trial subscription

trial_converted

Trial period has ended and user was billed i.e. first purchase was made

trial_cancelled

User cancelled subscription during trial period

non_subscription_purchase

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

billing_issue_detected

User was tried to charge, but billing issue happened. Usually it means user doesn't have enough card balance

entered_grace_period

Payment was not successful and user entered into a grace period. User still has access to premium function of your app until grace period finished

auto_renew_off

User turned off subscription auto renew during trial. User still has access to premium function of your app until TRIAL_CANCELLED

auto_renew_on

User turned on subscription auto renew during trial period

auto_renew_off_subscription

User turned off subscription auto renew. User still has access to premium function of your app until SUBSCRIPTION_CANCELLED

auto_renew_on_subscription

User turned on subscription auto renew

ab_test_variation_assigned

Adapty assigned variation of A/B test to user

Note: this event is sent only to Amplitude, Mixpanel, and Custom Webhook integrations

subscription_refunded

Subscription was refunded (e.g. by Apple support)

non_subscription_purchase_refunded

Non-subscription purchase was refunded

SUBSCRIPTION_CANCELLED event means that the subscription completely finished and the user has no longer access to the premium features of the app. When 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 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.