Events

After installing Adapty SDK and connecting Subscription Status URL, Adapty receives info about your customers behaviour via receipts 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

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

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

Example 1

User subscribed on April 1st with 7days trial. On 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. subscription_cancelled on 7th April

Example 2

User subscribed on April 1st with 7days trial. On 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 cut. Revenue

proceeds_usd

float

Product price after Apple cut. Net revenue

transaction_id

str

A unique identifier for a transaction such as a purchase, restore, or renewal

original_transaction_id

str

The transaction identifier of the original purchase

purchase_date

ISO 8601 date

The datetime of a product purchase

original_purchase_date

ISO 8601 date

The datetime of an original purchase

environment

str

Could be Sandbox or Production

vendor_product_id

str

Product id in a vendor store

event_datetime

ISO 8601 date

The datetime of event

store

str

Could be app_store or play_store

trial_duration

str

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

cancellation_reason

str

A reason why user cancelled 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

Expiration date of subscription. Usually in the future

consecutive_payments

int

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

rate_after_first_year

bool

Boolean indicates that a vendor reduces cuts to 15%. Apple has 30% first year tax 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 proxy events to your Webhook and 3rd party analytical systems learn more

Refunds

Refund is done by vendor either Apple or Google. Neither developers nor Adapty control this process. When user requested refund and vendor does it, Adapty generates subscription_cancelled with negative revenue.