Subscription events attributes
Last updated
Last updated
© Purchasely 2020-2023
All our subscription events are broadcast with attributes, you will find here the full list of those attributes and their specifics. We encourage you to use those attributes to take decision (for exemple whether you will make a special offer to your customer or not) and to tailor your communications.
Attribute | Description | Mandatory |
---|---|---|
api_version
int
Contains the webhook API version.
Yes
event_name
Yes
event_created_at
string
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.
Yes
event_created_at_ms
int
in 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.
Yes
product
string
Contains the Product id that carries the plan that was bought. Reference to the Product vendor id you created in the Purchasely console.
Yes
offer_identifier
string Contains the promo code used at the time of the purchase.
No
content_id
No
plan
string
Contains the Plan id that was bought. Reference to the Plan vendor id you created in the Purchasely console.
No
plan_price_in_xxx
float
Contains the price 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.
xxx
is the ISO 4217 code of the currency and will be replaced accrodingly to the selected currency in the settings.
plan_price_in_customer_currency
float
Contains 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).
No
customer_currency
string Contains the customers's store currency.
No
amount_in_xxx
float
⚠️ Only available for TRANSACTION_PROCESSED
event
Contains the amount of the transaction associated with the event TRANSACTION_PROCESSED
using the currency defined in Purchasely's App Settings. This amount is the price paid by the customer VAT included.
This amount can also be negative in case of a refund or an plan upgrade with a partial refund.
xxx
is the ISO 4217 code of the currency and will be replaced accordingly to the selected currency in the settings.
No
amount_in_customer_currency
float
⚠️ Only available for TRANSACTION_PROCESSED
event
Contains the amount of the transaction associated with the event TRANSACTION_PROCESSED
using the customer's currency (customer_currency
). This amount is the price paid by the customer VAT included.
This amount can also be negative in case of a refund or an plan upgrade with a partial refund.
xxx
is the ISO 4217 code of the currency and will be replaced accordingly to the selected currency in the settings.
No
source_event_name
string
⚠️ Only available for TRANSACTION_PROCESSED
event
Contains the name of the subscription event which was associated with the TRANSACTION_PROCESSED
event
No
cumulated_revenues_in_xxx
float
Contains 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.
No
previous_plan
string
Contains the Plan vendor id the customer used to have before changing plan.
Used with for the following events:
SUBSCRIPTION_CROSSGRADED
SUBSCRIPTION_DOWNGRADED
SUBSCRIPTION_UPGRADED
No
device_type
string Contains the device type associated with the purchase. Possible values:
COMPUTER
PAD
PHONE
TV
No
store
string
Contains the name of the Store through which the purchase was made.
Possible values:
APPLE_APP_STORE
GOOGLE_PLAY_STORE
AMAZON_APPSTORE
HUAWEI_APPGALLERY
Yes
store_country
string
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.
Yes
purchasely_subscription_id
string
Contains the Purchasely internal unique idendifier of the subscription.
Used with events that regards a subscription.
No
purchasely_one_time_purchase_id
string
Contains the Purchasely internal unique idendifier of the one time purchase.
Used with all events that regards a one time purchase.
No
store_product_id
string
Contains the product_id you created in the store console.
Yes
store_transaction_id
string
Contains the transaction_id given by the store.
Yes
purchased_at
string
in ISO 8601
Contains the date of the last transaction (original purchase or renewal).
Yes
purchased_at_ms
int
in milliseconds since the Epoch
Contains the date of the last transaction (original purchase or renewal).
Yes
store_original_transaction_id
string
Contains the store_transaction_id of the first transaction.
Yes
original_purchased_at
string
in ISO 8601
Contains the date of the first transaction.
Yes
original_purchased_at_ms
int
in milliseconds since the Epoch
Contains the date of the first transaction.
Yes
anonymous_user_id
string
Contains the anonymous_user_id that holds the purchase.
That attribute will be filled with a Purchasely generated anonymous_id if your app doesn't require the user to be logged in and/or you didn't specified to us a user_id.
No
user_id
string
Contains the user_id that holds the purchase.
That attribute will be filled with the user_id you provided us through the SDK.
No
transferred_from_anonymous_user_id
string
Contains the anonymous_user_id the subscription was transferred from.
That attribute is filled for the following event:
SUBSCRIPTION_RECEIVED
No
transferred_to_anonymous_user_id
string
Contains the anonymous_user_id the subscription was transferred to.
That attribute is filled for the following event:
SUBSCRIPTION_TRANSFERRED
No
transferred_from_user_id
string
Contains the user_id the subscription was transferred from.
That attribute is filled for the following event :
SUBSCRIPTION_RECEIVED
No
transferred_to_user_id
string
Contains the user_id the subscription was transferred to.
That attribute is filled for the following event:
SUBSCRIPTION_TRANSFERRED
No
environment
string
Contains the environment from where the purchase was made.
Possible values:
SANDBOX
PRODUCTION
Yes
is_family_shared
bool
Contains true or false depending on if the user has access to the subscription thanks to family sharing.
No
previous_offer_type
string
Contains 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
No
offer_type
string
Contains 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
Yes
subscription_status
string
Contains 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
No
grace_period_expires_at
string
in ISO 8601
Filled for events that regards a subscription which is in grace period.
Contains the date when the grace period will end.
No
grace_period_expires_at_ms
int
Filled for events that regards a subscription which is in grace period.
Contains the date when the grace period will end in milliseconds since the Epoch.
No
effective_next_renewal_at
string
in ISO 8601
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.
No
effective_next_renewal_at_ms
int
in 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.
No
next_renewal_at
string
in ISO 8601
Filled for events that regards a subscription.
Contains the theoretical next automatic renewal date.
See effective_newt_renewal_at.
No
next_renewal_at_ms
int
in milliseconds since the Epoch
Filled for events that regards a subscription.
Contains the theoretical next automatic renewal date.
See effective_next_renewal_at.
No
defer_end_at
string
in ISO 8601
Filled for events that regards a subscription.
Contains the date when the free time offered will be ending.
No
defer_end_at_ms
int
in milliseconds since the Epoch
Filled for events that regards a subscription.
Contains the date when the free time offered will be ending.
No
auto_resume_at
string
in ISO 8601
Filled for events that regards a subscription.
Contains the date when the pause will be ending and the subscription will resume.
No
auto_resume_at_ms
int
in 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.
No
presentation
string Contains the id of the associated presentation when the initial purchase was made.
No
placement
string Contains the id of the placement from where the subscription was bought. learn more
No
ab_test
string Contains the id of the running AB test when the initial purchase was made.
No
ab_test_variant
string Contains the id of the AB test variant in which the user was when the initial purchase was made.
No
audience
string Contains the id of the audience the user matched within the associated placement when the initial purchase was made. learn more
No