Server Events Attributes
This section provides details on Server Events attributes
Attributes available
Attribute | Mandatory | Description |
|---|---|---|
| Yes | int Contains the webhook API version |
| Yes | string Contains the name of the event |
| Yes | string Contains the unique identifier of the event generated by Purchasely |
| Yes | string |
| Yes | int in milliseconds since the Epoch |
| No | string Contains the That attribute will be filled with a Purchasely generated |
| No | string Contains the That attribute will be filled with the |
| No | string Contains the name of the Store through which the purchase was made. Possible values: |
| Yes | string Contains the type of In-App Purchase Possible values: |
| Yes | string Contains the Product id (=subscription group id) that carries the plan that was bought. |
| No | string Contains the Plan id that was bought. |
| No | string Contains the content_id you may have set on the SDK to display the paywall |
| No | string *inISO 4217 * Contains the customer's store currency. |
| No | float Contains the price plan in the current period of its subscription (so 0 during a free trial) using the
|
| No | float Contains the price paid by a customer in its own currency ( |
| No | float ⚠️ Only available for the event Contains the amount of the transaction associated with the event This amount can also be negative in case of a refund or an plan upgrade with a partial refund.
|
| No | string ⚠️ Only available for the event 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. |
| No | string ⚠️ Only available for the event Contains the name of the subscription event which was associated with the event |
| No | float Contains the cumulated revenues for the associated user in the currency defined in Purchasely's App Settings. This amount is VAT included.
|
| No | string Contains the Plan vendor id the customer used to have before changing plan. Used with for the following events: |
| No | string Contains the device id associated with the purchase. This attribute is analogous to the |
| No | string Contains the device type associated with the purchase. Possible values: |
| Yes | string
Can be |
| No | string Contains the Purchasely internal unique identifier of the subscription. Used with events that regards a subscription. |
| No | string Used with events that regards a subscription. Contains the Purchasely internal unique identifier of the subscription Used with for the following events: |
| No | string Contains the Purchasely internal unique identifier of the one time purchase. Used with all events that regards a one time purchase. |
| Yes | string Contains the |
| Yes | string Contains the |
| Yes | string in ISO 8601 Contains the date of the last transaction (original purchase or renewal). |
| Yes | int in milliseconds since the Epoch Contains the date of the last transaction (original purchase or renewal). |
| Yes | string Contains the store_transaction_id of the first transaction. |
| Yes | string in ISO 8601 Contains the date of the first transaction. |
| Yes | int in milliseconds since the Epoch Contains the date of the first transaction. |
| No | string Contains the That attribute is filled for the following event: |
| No | string Contains the That attribute is filled for the following event: |
| No | string Contains the That attribute is filled for the following event : |
| No | string Contains the That attribute is filled for the following event: |
| Yes | string Contains the environment from where the purchase was made. Possible values: |
| No | bool Contains true or false depending on if the user has access to the subscription thanks to family sharing. |
| 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 Possible values:
|
| Yes | string Contains the current offer the subscription is under. Possible values: |
| No | string Contains the current status of the subscription. Filled for events that regards a subscription. Possible Values : |
| No | string
Contains the date when the grace period will end. |
| 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 |
| 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. |
| 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 |
| No | string in ISO 8601 Filled for events that regards a subscription. Contains the theoretical next automatic renewal date. See |
| No | int in milliseconds since the Epoch Filled for events that regards a subscription. Contains the theoretical next automatic renewal date. See |
| No | string in ISO 8601 Filled for events that regards a subscription. Contains the date when the free time offered will be ending. |
| 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. |
| 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. |
| 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. |
| No | string Contains the id of the associated presentation when the initial purchase was made. |
| No | string Contains the id of the placement from where the subscription was bought. |
| No | string Contains the id of the running AB test when the initial purchase was made. |
| No | string Contains the id of the AB test variant in which the user was when the initial purchase was made. |
| No | string Contains the id of the audience the user matched within the associated placement when the initial purchase was made. |
| 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 |
| 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 : |
| 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 : |
| 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 : |
| Yes | string Contains 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,
"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_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
}Updated about 20 hours ago