Server Events Attributes
This section provides details on Server Events attributes
Attributes available
| Attribute | Mandatory | Description |
|---|---|---|
api_version | Yes | int Contains the webhook API version |
event_name | Yes | string Contains the name of the event |
event_id | Yes | string Contains the unique identifier of the event generated by Purchasely |
event_created_at | Yes | 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. |
event_created_at_ms | Yes | 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. |
anonymous_user_id | No | string Contains 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_id | No | string Contains the user_id that holds the purchase.That attribute will be filled with the user_id you provided to the SDK. |
store | No | string Contains the name of the Store through which the purchase was made. Possible values: APPLE_APP_STOREGOOGLE_PLAY_STOREAMAZON_APPSTOREHUAWEI_APPGALLERYSTRIPE |
purchase_type | Yes | string Contains the type of In-App Purchase Possible values: CONSUMABLE NON_CONSUMABLENON_RENEWING_SUBSCRIPTION RENEWING_SUBSCRIPTION |
product | Yes | string Contains the Product id (=subscription group id) that carries the plan that was bought. |
plan | No | string Contains the Plan id that was bought. |
content_id | No | string Contains the content_id you may have set on the SDK to display the paywall |
customer_currency | No | string inISO 4217 Contains the customer's store currency. |
plan_price_in_xxx | No | float Contains 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_currency | No | 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). |
full_plan_price_in_xxx | No | float ⚠️ 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_currency | No | float ⚠️ 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_usd | No | float ⚠️ 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_xxx | No | float ⚠️ 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 USD Contains 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_currency | No | string ⚠️ 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_name | No | string Contains the name of the subscription event which was associated with the event. This is useful for events such as: ACTIVATEDEACTIVATETRANSACTION_PROCESSED |
cumulated_revenues_in_xxx | No | 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. |
previous_plan | No | string Contains the Plan vendor id the customer used to have before changing plan. Used with for the following events: SUBSCRIPTION_CROSSGRADEDSUBSCRIPTION_DOWNGRADEDSUBSCRIPTION_UPGRADED |
previous_store_product_id | No | string Contains the store product_id the customer used to have before changing plan.Used with for the following events: SUBSCRIPTION_CROSSGRADEDSUBSCRIPTION_DOWNGRADEDSUBSCRIPTION_UPGRADED |
device_id | No | string Contains 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_type | No | string Contains the device type associated with the purchase. Possible values: COMPUTERPADPHONETV |
store_country | Yes | 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. |
purchasely_subscription_id | No | string Contains the Purchasely internal unique identifier of the subscription. Used with events that regards a subscription. |
from_purchasely_subscription_id | No | string Used with events that regards a subscription. Contains the Purchasely internal unique identifier of the previous subscription that the current subscription ( purchasely_subscription_id) replaces.This field is present whenever the subscription is a new record chained to a previous one: • on plan changes: SUBSCRIPTION_CROSSGRADED, SUBSCRIPTION_DOWNGRADED, SUBSCRIPTION_UPGRADED• on reactivations: when a purchase or renewal transaction is processed after the previous subscription had already been marked as expired, a new subscription is created and linked to the previous one. In that case the field can appear on other events, such as SUBSCRIPTION_RENEWED (frequent in sandbox where periods are compressed).Every subsequent event of a chained subscription carries it. |
purchasely_one_time_purchase_id | No | string Contains the Purchasely internal unique identifier of the one time purchase. Used with all events that regards a one time purchase. |
store_product_id | Yes | string Contains the product_id you created in the store (Apple App Store, Google Play Console...) |
store_transaction_id | Yes | string Contains the transaction_id given by the store. |
purchased_at | Yes | string in ISO 8601 Contains the date of the last transaction (original purchase or renewal). |
purchased_at_ms | Yes | int in milliseconds since the Epoch Contains the date of the last transaction (original purchase or renewal). |
store_original_transaction_id | Yes | string Contains the store_transaction_id of the first transaction. |
original_purchased_at | Yes | string in ISO 8601 Contains the date of the first transaction. |
original_purchased_at_ms | Yes | int in milliseconds since the Epoch Contains the date of the first transaction. |
transferred_from_anonymous_user_id | No | string Contains the anonymous_user_id the subscription was transferred from.That attribute is filled for the following event: SUBSCRIPTION_RECEIVED |
transferred_to_anonymous_user_id | No | string Contains the anonymous_user_id the subscription was transferred to.That attribute is filled for the following event: SUBSCRIPTION_TRANSFERRED |
transferred_from_user_id | No | string Contains the user_id the subscription was transferred from.That attribute is filled for the following event : SUBSCRIPTION_RECEIVED |
transferred_to_user_id | No | string Contains the user_id the subscription was transferred to.That attribute is filled for the following event: SUBSCRIPTION_TRANSFERRED |
environment | Yes | string Contains the environment from where the purchase was made. Possible values: SANDBOXPRODUCTION |
is_family_shared | No | bool Contains true or false depending on if the user has access to the subscription thanks to family sharing. |
previous_offer_type | No | 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 associatedFREE_TRIALINTRO_OFFERPROMO_CODEPROMOTIONAL_OFFER |
offer_type | Yes | string Contains the current offer the subscription is under. Possible values: NONE: the user is paying the normal price, no offer associatedFREE_TRIALINTRO_OFFERPROMO_CODEPROMOTIONAL_OFFER |
subscription_status | No | string Contains the current status of the subscription. Filled for events that regards a subscription. Possible Values : AUTO_RENEWINGON_HOLDIN_GRACE_PERIODAUTO_RENEWING_CANCELEDDEACTIVATEDREVOKEDPAUSEDUNPAID |
grace_period_expires_at | No | 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. |
grace_period_expires_at_ms | No | int in milliseconds since the Epoch Filled for events that regards a subscription which is in grace period. Contains the date when the grace period will end |
effective_next_renewal_at | No | 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. |
effective_next_renewal_at_ms | No | 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. |
next_renewal_at | No | string in ISO 8601 Filled for events that regards a subscription. Contains the theoretical next automatic renewal date. See effective_newt_renewal_at. |
next_renewal_at_ms | No | 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. |
defer_end_at | No | string in ISO 8601 Filled for events that regards a subscription. Contains the date when the free time offered will be ending. |
defer_end_at_ms | No | int in milliseconds since the Epoch Filled for events that regards a subscription. Contains the date when the free time offered will be ending. |
auto_resume_at | No | 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. |
auto_resume_at_ms | No | 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. |
presentation | No | string Contains the id of the associated presentation when the initial purchase was made. |
placement | No | string Contains the id of the placement from where the subscription was bought. |
ab_test | No | string Contains the id of the running AB test when the initial purchase was made. |
ab_test_variant | No | string Contains the id of the AB test variant in which the user was when the initial purchase was made. |
audience | No | string Contains the id of the audience the user matched within the associated placement when the initial purchase was made. |
purchase_token | No | string Filled for events that regards Google Play Store transaction & subscription events Contains 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_name | No | string Filled 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_STARTEDPROMO_CODE_CONVERTEDPROMO_CODE_NOT_CONVERTED |
offer_identifier | No | string Filled 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_STARTEDPROMO_CODE_CONVERTEDPROMO_CODE_NOT_CONVERTEDPROMOTIONAL_OFFER_STARTEDPROMOTIONAL_OFFER_CONVERTEDPROMOTIONAL_OFFER_NOT_CONVERTED |
promotional_offer_id | No | string Filled 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_STARTEDPROMOTIONAL_OFFER_CONVERTEDPROMOTIONAL_OFFER_NOT_CONVERTED |
store_app_bundle_id | Yes | string Contains the store bundle ID of the app in which the purchase was made. |
commitment_billing_type | No | string Billing mode of the subscription. Only present for App Store monthly subscriptions with a 12-month commitment, where it is set to monthly. Absent for standard subscriptions.When present, the other commitment_* attributes below are also filled. |
billing_period_number | No | int Position of the current installment within the 12-month commitment (e.g. 5 for the 5th monthly charge).Only present for 12-month commitment subscriptions. |
total_billing_periods | No | int Total number of installments in the commitment term ( 12).Only present for 12-month commitment subscriptions. |
commitment_expires_at | No | string in ISO 8601 Date at which the current 12-month commitment term ends. Only present for 12-month commitment subscriptions. |
commitment_expires_at_ms | No | int in milliseconds since the Epoch Same as commitment_expires_at, expressed in milliseconds.Only present for 12-month commitment subscriptions. |
commitment_will_auto_renew | No | boolean Whether the commitment will renew for a new 12-month term when the current one ends. This is distinct from the monthly billing of installments within the term. Only present for 12-month commitment subscriptions. |
Sample JSON Payloads
{
"api_version": 3,
"cumulated_revenues_in_eur": 69.9,
"customer_currency": "EUR",
"device_id": "1234567890abcdef",
"device_type": "PHONE",
"effective_next_renewal_at": "2023-12-12T14:23:11.777Z",
"effective_next_renewal_at_ms": 1702390991777,
"environment": "SANDBOX",
"event_created_at": "2023-12-12T14:19:26.120Z",
"event_created_at_ms": 1702390766120,
"event_id": "5e45109f-7fac-45f8-a7e4-464892d5d35d",
"event_name": "ACTIVATE",
"is_family_shared": false,
"next_renewal_at": "2023-12-12T14:23:11.777Z",
"next_renewal_at_ms": 1702390991777,
"offer_type": "NONE",
"original_purchased_at": "2023-12-12T13:48:16.233Z",
"original_purchased_at_ms": 1702388896233,
"plan": "monthly",
"plan_price_in_customer_currency": 9.99,
"plan_price_in_eur": 9.99,
"previous_offer_type": "NONE",
"product": "PURCHASELY_PLUS",
"purchase_type": "RENEWING_SUBSCRIPTION",
"purchased_at": "2023-12-12T14:13:11.777Z",
"purchased_at_ms": 1702390391777,
"purchasely_subscription_id": "subs_D7GnVQbUxvY6YxoeK6nhyPDkmyCVcfe",
"source_event_name": "SUBSCRIPTION_RENEWED",
"store": "GOOGLE_PLAY_STORE",
"store_app_bundle_id": "com.purchasely.demo",
"store_country": "FR",
"store_original_transaction_id": "GPA.3355-5688-7970-28037",
"store_product_id": "com.purchasely.plus.monthly",
"store_transaction_id": "GPA.3355-5688-7970-28037..5",
"subscription_status": "AUTO_RENEWING",
"user_id": "toto"
}{
"amount_in_customer_currency": 9.99,
"amount_in_eur": 9.99,
"api_version": 3,
"cumulated_revenues_in_eur": 69.9,
"customer_currency": "EUR",
"device_id": "1234567890abcdef",
"device_type": "PHONE",
"effective_next_renewal_at": "2023-12-12T14:23:11.777Z",
"effective_next_renewal_at_ms": 1702390991777,
"environment": "SANDBOX",
"event_created_at": "2023-12-12T14:19:26.120Z",
"event_created_at_ms": 1702390766120,
"event_id": "a2430cab-b56f-45d6-9268-8f9f35e20b59",
"event_name": "TRANSACTION_PROCESSED",
"is_family_shared": false,
"next_renewal_at": "2023-12-12T14:23:11.777Z",
"next_renewal_at_ms": 1702390991777,
"offer_type": "NONE",
"original_purchased_at": "2023-12-12T13:48:16.233Z",
"original_purchased_at_ms": 1702388896233,
"plan": "monthly",
"plan_price_in_customer_currency": 9.99,
"plan_price_in_eur": 9.99,
"previous_offer_type": "NONE",
"product": "PURCHASELY_PLUS",
"purchase_type": "RENEWING_SUBSCRIPTION",
"purchased_at": "2023-12-12T14:13:11.777Z",
"purchased_at_ms": 1702390391777,
"purchasely_subscription_id": "subs_D7GnVQbUxvY6YxoeK6nhyPDkmyCVcfe",
"source_event_name": "SUBSCRIPTION_RENEWED",
"store": "GOOGLE_PLAY_STORE",
"store_app_bundle_id": "com.purchasely.demo",
"store_country": "FR",
"store_original_transaction_id": "GPA.3355-5688-7970-28037",
"store_product_id": "com.purchasely.plus.monthly",
"store_transaction_id": "GPA.3355-5688-7970-28037..5",
"subscription_status": "AUTO_RENEWING",
"user_id": "toto"
}{
"anonymous_user_id": "5ca811b6-46e9-4847-9381-3911bd5fcd7b",
"api_version": 3,
"cumulated_revenues_in_eur": 9.99,
"customer_currency": "EUR",
"device_type": "PHONE",
"effective_next_renewal_at": "2023-12-12T13:53:11.777Z",
"effective_next_renewal_at_ms": 1702389191777,
"environment": "SANDBOX",
"event_created_at": "2023-12-12T13:51:04.953Z",
"event_created_at_ms": 1702389064953,
"event_id": "1a03612c-4960-40be-bc69-eeab14f9c6e9",
"event_name": "SUBSCRIPTION_STARTED",
"is_family_shared": false,
"next_renewal_at": "2023-12-12T13:53:11.777Z",
"next_renewal_at_ms": 1702389191777,
"offer_type": "NONE",
"original_purchased_at": "2023-12-12T13:48:16.233Z",
"original_purchased_at_ms": 1702388896233,
"plan": "monthly",
"plan_price_in_customer_currency": 9.99,
"plan_price_in_eur": 9.99,
"product": "PURCHASELY_PLUS",
"purchase_type": "RENEWING_SUBSCRIPTION",
"purchased_at": "2023-12-12T13:48:16.233Z",
"purchased_at_ms": 1702388896233,
"purchasely_subscription_id": "subs_D7GnVQbUxvY6YxoeK6nhyPDkmyCVcfe",
"store": "GOOGLE_PLAY_STORE",
"store_app_bundle_id": "com.purchasely.demo",
"store_country": "FR",
"store_original_transaction_id": "GPA.3355-5688-7970-28037",
"store_product_id": "com.purchasely.plus.monthly",
"store_transaction_id": "GPA.3355-5688-7970-28037",
"subscription_status": "AUTO_RENEWING"
}{
"api_version": 3,
"cumulated_revenues_in_eur": 69.9,
"customer_currency": "EUR",
"device_type": "PHONE",
"effective_next_renewal_at": "2023-12-12T14:23:11.777Z",
"effective_next_renewal_at_ms": 1702390991777,
"environment": "SANDBOX",
"event_created_at": "2023-12-12T14:19:26.120Z",
"event_created_at_ms": 1702390766120,
"event_id": "112d1a2d-b847-43a7-b6a1-c4a6819b7e54",
"event_name": "SUBSCRIPTION_RENEWED",
"is_family_shared": false,
"next_renewal_at": "2023-12-12T14:23:11.777Z",
"next_renewal_at_ms": 1702390991777,
"offer_type": "NONE",
"original_purchased_at": "2023-12-12T13:48:16.233Z",
"original_purchased_at_ms": 1702388896233,
"plan": "monthly",
"plan_price_in_customer_currency": 9.99,
"plan_price_in_eur": 9.99,
"previous_offer_type": "NONE",
"product": "PURCHASELY_PLUS",
"purchase_type": "RENEWING_SUBSCRIPTION",
"purchased_at": "2023-12-12T14:13:11.777Z",
"purchased_at_ms": 1702390391777,
"purchasely_subscription_id": "subs_D7GnVQbUxvY6YxoeK6nhyPDkmyCVcfe",
"store": "GOOGLE_PLAY_STORE",
"store_app_bundle_id": "com.purchasely.demo",
"store_country": "FR",
"store_original_transaction_id": "GPA.3355-5688-7970-28037",
"store_product_id": "com.purchasely.plus.monthly",
"store_transaction_id": "GPA.3355-5688-7970-28037..5",
"subscription_status": "AUTO_RENEWING",
"user_id": "toto"
}{
"api_version": 3,
"cumulated_revenues_in_eur": 69.9,
"customer_currency": "EUR",
"device_type": "PHONE",
"effective_next_renewal_at": "2023-12-12T14:23:11.777Z",
"effective_next_renewal_at_ms": 1702390991777,
"environment": "SANDBOX",
"event_created_at": "2023-12-12T14:24:09.412Z",
"event_created_at_ms": 1702391049412,
"event_id": "e6ac15d9-4dda-4559-bee3-ccb5dad49240",
"event_name": "SUBSCRIPTION_TERMINATED",
"is_family_shared": false,
"next_renewal_at": "2023-12-12T14:23:11.777Z",
"next_renewal_at_ms": 1702390991777,
"offer_type": "NONE",
"original_purchased_at": "2023-12-12T13:48:16.233Z",
"original_purchased_at_ms": 1702388896233,
"plan": "monthly",
"plan_price_in_customer_currency": 9.99,
"plan_price_in_eur": 9.99,
"previous_offer_type": "NONE",
"product": "PURCHASELY_PLUS",
"purchase_type": "RENEWING_SUBSCRIPTION",
"purchased_at": "2023-12-12T14:18:11.777Z",
"purchased_at_ms": 1702390691777,
"purchasely_subscription_id": "subs_D7GnVQbUxvY6YxoeK6nhyPDkmyCVcfe",
"store": "GOOGLE_PLAY_STORE",
"store_app_bundle_id": "com.purchasely.demo",
"store_country": "FR",
"store_original_transaction_id": "GPA.3355-5688-7970-28037",
"store_product_id": "com.purchasely.plus.monthly",
"store_transaction_id": "GPA.3355-5688-7970-28037..5",
"subscription_status": "UNPAID",
"user_id": "toto"
}{
"api_version": 3,
"billing_period_number": 5,
"commitment_billing_type": "monthly",
"commitment_expires_at": "2027-02-15T10:00:00.000Z",
"commitment_expires_at_ms": 1802685600000,
"commitment_will_auto_renew": true,
"cumulated_revenues_in_eur": 49.95,
"customer_currency": "EUR",
"device_type": "PHONE",
"effective_next_renewal_at": "2026-07-15T10:00:00.000Z",
"effective_next_renewal_at_ms": 1784109600000,
"environment": "SANDBOX",
"event_created_at": "2026-06-15T10:00:04.120Z",
"event_created_at_ms": 1781517604120,
"event_id": "f0b9c1d2-3e4f-4a5b-9c6d-7e8f9a0b1c2d",
"event_name": "INSTALLMENT_PAID",
"is_family_shared": false,
"next_renewal_at": "2026-07-15T10:00:00.000Z",
"next_renewal_at_ms": 1784109600000,
"offer_type": "NONE",
"original_purchased_at": "2026-02-15T10:00:00.000Z",
"original_purchased_at_ms": 1771149600000,
"plan": "yearly",
"plan_price_in_customer_currency": 9.99,
"plan_price_in_eur": 9.99,
"previous_offer_type": "NONE",
"product": "PURCHASELY_PLUS",
"purchase_type": "RENEWING_SUBSCRIPTION",
"purchased_at": "2026-06-15T10:00:00.000Z",
"purchased_at_ms": 1781517600000,
"purchasely_subscription_id": "subs_D7GnVQbUxvY6YxoeK6nhyPDkmyCVcfe",
"store": "APPLE_APP_STORE",
"store_app_bundle_id": "com.purchasely.demo",
"store_country": "FR",
"store_original_transaction_id": "2000000111111111",
"store_product_id": "com.purchasely.plus.yearly",
"store_transaction_id": "2000000123456789",
"subscription_status": "AUTO_RENEWING",
"total_billing_periods": 12,
"user_id": "toto"
}Updated 3 days ago
Did this page help you?

