Server Events Attributes

This section provides details on Server Events attributes

Attributes available

AttributeMandatoryDescription
api_versionYesintContains the webhook API version
event_nameYesstringContains the name of the event
event_idYesstringContains the unique identifier of the event generated by Purchasely
event_created_atYesstring
in ISO 8601
Contains the date which the event was sent the first time. In case of retry that attribute will still be set with the time at the first try.
event_created_at_msYesintin milliseconds since the Epoch
Contains the date which the event was sent the first time. In case of retry that attribute will still be set with the time at the first try.
anonymous_user_idNostringContains the anonymous_user_id that holds the purchase.That attribute will be filled with a Purchasely generated anonymous_user_id if your app doesn't require the user to be logged in and/or you didn't specified a user_id.
user_idNostringContains the user_id that holds the purchase.That attribute will be filled with the user_id you provided to the SDK.
storeNostringContains the name of the Store through which the purchase was made.Possible values:
APPLE_APP_STORE
GOOGLE_PLAY_STORE
AMAZON_APPSTORE
HUAWEI_APPGALLERY
STRIPE
purchase_typeYesstringContains the type of In-App PurchasePossible values:
CONSUMABLE
NON_CONSUMABLE
NON_RENEWING_SUBSCRIPTIONRENEWING_SUBSCRIPTION
productYesstringContains the Product id (=subscription group id) that carries the plan that was bought.
planNostringContains the Plan id that was bought.
content_idNostringContains the content_id you may have set on the SDK to display the paywall
customer_currencyNostringinISO 4217Contains the customer's store currency.
plan_price_in_xxxNofloatContains the price plan in the current period of its subscription (so 0 during a free trial) using the Default integration currency defined in the App Settings. This amount includes VAT..xxx is the ISO 4217 code of the currency and will be replaced accordingly to the selected currency in the settings.
plan_price_in_customer_currencyNofloatContains the price paid by a customer in its own currency (customer_currency) in the current period of its subscription (so 0 during a free trial).
full_plan_price_in_xxxNofloat⚠️ Only available for Google Play Store subscriptions.Contains the full regular plan price, ignoring any active intro offer, promotional offer, promo code or free trial (i.e. the price that will be charged once any offer phase ends), using the Default integration currency defined in the App Settings. This amount includes VAT.xxx is the ISO 4217 code of the currency and will be replaced accordingly to the selected currency in the settings.
full_plan_price_in_customer_currencyNofloat⚠️ Only available for Google Play Store subscriptions.Contains the full regular plan price in the customer's own currency (customer_currency), ignoring any active intro offer, promotional offer, promo code or free trial (i.e. the price that will be charged once any offer phase ends). This amount includes VAT.
amount_in_usdNofloat⚠️ Only available for the event TRANSACTION_PROCESSED.Contains the amount of the transaction associated with the event TRANSACTION_PROCESSED using the pivot currency which is USD. This amount includes VAT.This amount can also be negative in case of a refund or an plan upgrade with a partial refund.
amount_in_xxxNofloat⚠️ Only available for the event TRANSACTION_PROCESSED.xxx is the ISO 4217 code of the currency and will be replaced accordingly to the selected currency in the settings.⚠️ This field is only present if the selected currency in the settings is different from USDContains the amount of the transaction associated with the event TRANSACTION_PROCESSED using the Default integration currency defined in the App Settings. This amount includes VAT.This amount can also be negative in case of a refund or an plan upgrade with a partial refund.
amount_in_customer_currencyNostring⚠️ Only available for the event TRANSACTION_PROCESSED.Contains the amount paid by a customer in the current period of its subscription (so 0 during a free trial) using the currency defined in Purchasely's App Settings.
source_event_nameNostringContains the name of the subscription event which was associated with the event. This is useful for events such as:
ACTIVATE
DEACTIVATE
TRANSACTION_PROCESSED
cumulated_revenues_in_xxxNofloatContains the cumulated revenues for the associated user in the currency defined in Purchasely's App Settings. This amount is VAT included.xxx is the ISO 4217 code of the currency and will be replaced accordingly to the selected currency in the settings.
previous_planNostringContains the Plan vendor id the customer used to have before changing plan.Used with for the following events:
SUBSCRIPTION_CROSSGRADED
SUBSCRIPTION_DOWNGRADED
SUBSCRIPTION_UPGRADED
previous_store_product_idNostringContains the store product_id the customer used to have before changing plan.Used with for the following events:
SUBSCRIPTION_CROSSGRADED
SUBSCRIPTION_DOWNGRADED
SUBSCRIPTION_UPGRADED
device_idNostringContains the device id associated with the purchase.This attribute is analogous to the anonymous_user_id and is auto generated by the Purchasely SDK
device_typeNostringContains the device type associated with the purchase.Possible values:
COMPUTER
PAD
PHONE
TV
store_countryYesstring
  • in ISO 3166
  • Contains the store country where the purchase was made.
Can be NULL in case the subscription was purchased before Purchasely was implemented in your system.
purchasely_subscription_idNostringContains the Purchasely internal unique identifier of the subscription.Used with events that regards a subscription.
from_purchasely_subscription_idNostringUsed with events that regards a subscription.Contains the Purchasely internal unique identifier of the subscriptionUsed with for the following events:
SUBSCRIPTION_CROSSGRADED
SUBSCRIPTION_DOWNGRADED
SUBSCRIPTION_UPGRADED
purchasely_one_time_purchase_idNostringContains the Purchasely internal unique identifier of the one time purchase.Used with all events that regards a one time purchase.
store_product_idYesstringContains the product_id you created in the store (Apple App Store, Google Play Console...)
store_transaction_idYesstringContains the transaction_id given by the store.
purchased_atYesstringin ISO 8601Contains the date of the last transaction (original purchase or renewal).
purchased_at_msYesintin milliseconds since the EpochContains the date of the last transaction (original purchase or renewal).
store_original_transaction_idYesstringContains the store_transaction_id of the first transaction.
original_purchased_atYesstringin ISO 8601Contains the date of the first transaction.
original_purchased_at_msYesintin milliseconds since the EpochContains the date of the first transaction.
transferred_from_anonymous_user_idNostringContains the anonymous_user_id the subscription was transferred from.That attribute is filled for the following event:
SUBSCRIPTION_RECEIVED
transferred_to_anonymous_user_idNostringContains the anonymous_user_id the subscription was transferred to.That attribute is filled for the following event:
SUBSCRIPTION_TRANSFERRED
transferred_from_user_idNostringContains the user_id the subscription was transferred from.That attribute is filled for the following event :
SUBSCRIPTION_RECEIVED
transferred_to_user_idNostringContains the user_id the subscription was transferred to.That attribute is filled for the following event:
SUBSCRIPTION_TRANSFERRED
environmentYesstringContains the environment from where the purchase was made.Possible values:
SANDBOX
PRODUCTION
is_family_sharedNoboolContains true or false depending on if the user has access to the subscription thanks to family sharing.
previous_offer_typeNostringContains the previous offer the subscription was under.That attribute is always filled for events that regards subscriptions except for the very first ACTIVATE and SUBSCRIPTION_STARTED.Possible values:NONE: the user was paying the normal price, no offer associated
FREE_TRIAL
INTRO_OFFER
PROMO_CODE
PROMOTIONAL_OFFER
offer_typeYesstringContains the current offer the subscription is under.Possible values:
NONE: the user is paying the normal price, no offer associated
FREE_TRIAL
INTRO_OFFER
PROMO_CODE
PROMOTIONAL_OFFER
subscription_statusNostringContains the current status of the subscription.Filled for events that regards a subscription.Possible Values :
AUTO_RENEWING
ON_HOLD
IN_GRACE_PERIOD
AUTO_RENEWING_CANCELED
DEACTIVATED
REVOKED
PAUSED
UNPAID
grace_period_expires_atNostring
  • in ISO 8601
  • Filled for events that regards a subscription which is in grace period.
Contains the date when the grace period will end.
grace_period_expires_at_msNointin milliseconds since the EpochFilled for events that regards a subscription which is in grace period.Contains the date when the grace period will end
effective_next_renewal_atNostringin ISO 8601Filled for events that regards a subscription.Contains the effective next renewal date, taking any grace or defer periods into account. If the subscription isn’t in grace or deferring period the effective date is equal to next_renewal_at.
effective_next_renewal_at_msNointin milliseconds since the Epoch.Filled for events that regards a subscription.Contains the effective next renewal date, taking any grace or defer periods into account. If the subscription isn’t in grace or deferring period the effective date is equal to next_renewal_at.
next_renewal_atNostringin ISO 8601Filled for events that regards a subscription.Contains the theoretical next automatic renewal date.See effective_newt_renewal_at.
next_renewal_at_msNointin milliseconds since the EpochFilled for events that regards a subscription.Contains the theoretical next automatic renewal date.See effective_next_renewal_at.
defer_end_atNostringin ISO 8601Filled for events that regards a subscription.Contains the date when the free time offered will be ending.
defer_end_at_msNointin milliseconds since the EpochFilled for events that regards a subscription.Contains the date when the free time offered will be ending.
auto_resume_atNostringin ISO 8601Filled for events that regards a subscription.Contains the date when the pause will be ending and the subscription will resume.
auto_resume_at_msNointin milliseconds since the Epoch.Filled for events that regards a subscription.Contains the date when the pause will be ending and the subscription will resume.
presentationNostringContains the id of the associated presentation when the initial purchase was made.
placementNostringContains the id of the placement from where the subscription was bought.
ab_testNostringContains the id of the running AB test when the initial purchase was made.
ab_test_variantNostringContains the id of the AB test variant in which the user was when the initial purchase was made.
audienceNostringContains the id of the audience the user matched within the associated placement when the initial purchase was made.
purchase_tokenNostringFilled for events that regards Google Play Store transaction & subscription eventsContains the purchase token which is a unique identifier that represents the user and the store product ID for the in-app product they purchased
offer_code_ref_nameNostringFilled for events that regards a subscription.Contains the offer code ref name used when a customer successfully redeems an offer code.This attribute is filled for the following event :
PROMO_CODE_STARTED
PROMO_CODE_CONVERTED
PROMO_CODE_NOT_CONVERTED
offer_identifierNostringFilled for events that regards a subscription.Contains the offer identifier used when a customer successfully redeems an offer code or a promotional offer.This attribute is filled for the following event :
PROMO_CODE_STARTED
PROMO_CODE_CONVERTED
PROMO_CODE_NOT_CONVERTED
PROMOTIONAL_OFFER_STARTED
PROMOTIONAL_OFFER_CONVERTED
PROMOTIONAL_OFFER_NOT_CONVERTED
promotional_offer_idNostringFilled for events that regards a subscription.Contains the promotional offer identifier used when a customer successfully redeems a promotional offer.This attribute is filled for the following event :
PROMOTIONAL_OFFER_STARTED
PROMOTIONAL_OFFER_CONVERTED
PROMOTIONAL_OFFER_NOT_CONVERTED
store_app_bundle_idYesstringContains the store bundle ID of the app in which the purchase was made.

Sample JSON Payloads

{
  "plan": "monthly",
  "store": "GOOGLE_PLAY_STORE",
  "product": "PURCHASELY_PLUS",
  "user_id": "toto",
  "event_id": "5e45109f-7fac-45f8-a7e4-464892d5d35d",
  "event_name": "ACTIVATE",
  "offer_type": "NONE",
  "api_version": 3,
  "device_id": "1234567890abcdef",
  "device_type": "PHONE",
  "environment": "SANDBOX",
  "purchased_at": "2023-12-12T14:13:11.777Z",
  "purchase_type": "RENEWING_SUBSCRIPTION",
  "store_country": "FR",
  "next_renewal_at": "2023-12-12T14:23:11.777Z",
  "purchased_at_ms": 1702390391777,
  "event_created_at": "2023-12-12T14:19:26.120Z",
  "is_family_shared": false,
  "store_product_id": "com.purchasely.plus.monthly",
  "customer_currency": "EUR",
  "plan_price_in_eur": 9.99,
  "source_event_name": "SUBSCRIPTION_RENEWED",
  "next_renewal_at_ms": 1702390991777,
  "event_created_at_ms": 1702390766120,
  "previous_offer_type": "NONE",
  "store_app_bundle_id": "com.purchasely.demo",
  "subscription_status": "AUTO_RENEWING",
  "store_transaction_id": "GPA.3355-5688-7970-28037..5",
  "original_purchased_at": "2023-12-12T13:48:16.233Z",
  "original_purchased_at_ms": 1702388896233,
  "cumulated_revenues_in_eur": 69.9,
  "effective_next_renewal_at": "2023-12-12T14:23:11.777Z",
  "purchasely_subscription_id": "subs_D7GnVQbUxvY6YxoeK6nhyPDkmyCVcfe",
  "effective_next_renewal_at_ms": 1702390991777,
  "store_original_transaction_id": "GPA.3355-5688-7970-28037",
  "plan_price_in_customer_currency": 9.99
}
{
  "plan": "monthly",
  "store": "GOOGLE_PLAY_STORE",
  "product": "PURCHASELY_PLUS",
  "user_id": "toto",
  "event_id": "a2430cab-b56f-45d6-9268-8f9f35e20b59",
  "event_name": "TRANSACTION_PROCESSED",
  "offer_type": "NONE",
  "api_version": 3,
  "device_id": "1234567890abcdef",
  "device_type": "PHONE",
  "environment": "SANDBOX",
  "purchased_at": "2023-12-12T14:13:11.777Z",
  "amount_in_eur": 9.99,
  "purchase_type": "RENEWING_SUBSCRIPTION",
  "store_country": "FR",
  "next_renewal_at": "2023-12-12T14:23:11.777Z",
  "purchased_at_ms": 1702390391777,
  "event_created_at": "2023-12-12T14:19:26.120Z",
  "is_family_shared": false,
  "store_product_id": "com.purchasely.plus.monthly",
  "customer_currency": "EUR",
  "plan_price_in_eur": 9.99,
  "source_event_name": "SUBSCRIPTION_RENEWED",
  "next_renewal_at_ms": 1702390991777,
  "event_created_at_ms": 1702390766120,
  "previous_offer_type": "NONE",
  "store_app_bundle_id": "com.purchasely.demo",
  "subscription_status": "AUTO_RENEWING",
  "store_transaction_id": "GPA.3355-5688-7970-28037..5",
  "original_purchased_at": "2023-12-12T13:48:16.233Z",
  "original_purchased_at_ms": 1702388896233,
  "cumulated_revenues_in_eur": 69.9,
  "effective_next_renewal_at": "2023-12-12T14:23:11.777Z",
  "purchasely_subscription_id": "subs_D7GnVQbUxvY6YxoeK6nhyPDkmyCVcfe",
  "amount_in_customer_currency": 9.99,
  "effective_next_renewal_at_ms": 1702390991777,
  "store_original_transaction_id": "GPA.3355-5688-7970-28037",
  "plan_price_in_customer_currency": 9.99
}
{
  "plan": "monthly",
  "store": "GOOGLE_PLAY_STORE",
  "product": "PURCHASELY_PLUS",
  "event_id": "1a03612c-4960-40be-bc69-eeab14f9c6e9",
  "event_name": "SUBSCRIPTION_STARTED",
  "offer_type": "NONE",
  "api_version": 3,
  "device_type": "PHONE",
  "environment": "SANDBOX",
  "purchased_at": "2023-12-12T13:48:16.233Z",
  "purchase_type": "RENEWING_SUBSCRIPTION",
  "store_country": "FR",
  "next_renewal_at": "2023-12-12T13:53:11.777Z",
  "purchased_at_ms": 1702388896233,
  "event_created_at": "2023-12-12T13:51:04.953Z",
  "is_family_shared": false,
  "store_product_id": "com.purchasely.plus.monthly",
  "anonymous_user_id": "5ca811b6-46e9-4847-9381-3911bd5fcd7b",
  "customer_currency": "EUR",
  "plan_price_in_eur": 9.99,
  "next_renewal_at_ms": 1702389191777,
  "event_created_at_ms": 1702389064953,
  "store_app_bundle_id": "com.purchasely.demo",
  "subscription_status": "AUTO_RENEWING",
  "store_transaction_id": "GPA.3355-5688-7970-28037",
  "original_purchased_at": "2023-12-12T13:48:16.233Z",
  "original_purchased_at_ms": 1702388896233,
  "cumulated_revenues_in_eur": 9.99,
  "effective_next_renewal_at": "2023-12-12T13:53:11.777Z",
  "purchasely_subscription_id": "subs_D7GnVQbUxvY6YxoeK6nhyPDkmyCVcfe",
  "effective_next_renewal_at_ms": 1702389191777,
  "store_original_transaction_id": "GPA.3355-5688-7970-28037",
  "plan_price_in_customer_currency": 9.99
}
{
  "plan": "monthly",
  "store": "GOOGLE_PLAY_STORE",
  "product": "PURCHASELY_PLUS",
  "user_id": "toto",
  "event_id": "112d1a2d-b847-43a7-b6a1-c4a6819b7e54",
  "event_name": "SUBSCRIPTION_RENEWED",
  "offer_type": "NONE",
  "api_version": 3,
  "device_type": "PHONE",
  "environment": "SANDBOX",
  "purchased_at": "2023-12-12T14:13:11.777Z",
  "purchase_type": "RENEWING_SUBSCRIPTION",
  "store_country": "FR",
  "next_renewal_at": "2023-12-12T14:23:11.777Z",
  "purchased_at_ms": 1702390391777,
  "event_created_at": "2023-12-12T14:19:26.120Z",
  "is_family_shared": false,
  "store_product_id": "com.purchasely.plus.monthly",
  "customer_currency": "EUR",
  "plan_price_in_eur": 9.99,
  "next_renewal_at_ms": 1702390991777,
  "event_created_at_ms": 1702390766120,
  "previous_offer_type": "NONE",
  "store_app_bundle_id": "com.purchasely.demo",
  "subscription_status": "AUTO_RENEWING",
  "store_transaction_id": "GPA.3355-5688-7970-28037..5",
  "original_purchased_at": "2023-12-12T13:48:16.233Z",
  "original_purchased_at_ms": 1702388896233,
  "cumulated_revenues_in_eur": 69.9,
  "effective_next_renewal_at": "2023-12-12T14:23:11.777Z",
  "purchasely_subscription_id": "subs_D7GnVQbUxvY6YxoeK6nhyPDkmyCVcfe",
  "effective_next_renewal_at_ms": 1702390991777,
  "store_original_transaction_id": "GPA.3355-5688-7970-28037",
  "plan_price_in_customer_currency": 9.99
}
{
  "plan": "monthly",
  "store": "GOOGLE_PLAY_STORE",
  "product": "PURCHASELY_PLUS",
  "user_id": "toto",
  "event_id": "e6ac15d9-4dda-4559-bee3-ccb5dad49240",
  "event_name": "SUBSCRIPTION_TERMINATED",
  "offer_type": "NONE",
  "api_version": 3,
  "device_type": "PHONE",
  "environment": "SANDBOX",
  "purchased_at": "2023-12-12T14:18:11.777Z",
  "purchase_type": "RENEWING_SUBSCRIPTION",
  "store_country": "FR",
  "next_renewal_at": "2023-12-12T14:23:11.777Z",
  "purchased_at_ms": 1702390691777,
  "event_created_at": "2023-12-12T14:24:09.412Z",
  "is_family_shared": false,
  "store_product_id": "com.purchasely.plus.monthly",
  "customer_currency": "EUR",
  "plan_price_in_eur": 9.99,
  "next_renewal_at_ms": 1702390991777,
  "event_created_at_ms": 1702391049412,
  "previous_offer_type": "NONE",
  "store_app_bundle_id": "com.purchasely.demo",
  "subscription_status": "UNPAID",
  "store_transaction_id": "GPA.3355-5688-7970-28037..5",
  "original_purchased_at": "2023-12-12T13:48:16.233Z",
  "original_purchased_at_ms": 1702388896233,
  "cumulated_revenues_in_eur": 69.9,
  "effective_next_renewal_at": "2023-12-12T14:23:11.777Z",
  "purchasely_subscription_id": "subs_D7GnVQbUxvY6YxoeK6nhyPDkmyCVcfe",
  "effective_next_renewal_at_ms": 1702390991777,
  "store_original_transaction_id": "GPA.3355-5688-7970-28037",
  "plan_price_in_customer_currency": 9.99
}