Purchasely
4.4
4.4
  • Welcome page
  • General
    • Presentation
    • Release notes
  • Quick start
    • Console Configuration
    • SDK Implementation
    • Testing
    • Sample
  • Basic configuration
    • Console Configuration
      • Creating a new application
      • Creating your Products
        • App Store
        • Play Store
        • Huawei App Gallery
        • Amazon App Store
        • Products & Plans
      • Design your Paywalls
      • Design your Paywalls-Latest
        • Carousel
        • Carousel Flow
        • Features List
        • Features List & Plan Picker with 2 & 3 columns
        • Feature list overlay
        • Plan picker horizontal
        • Plan picker with 2 and 3 Column
    • SDK installation
      • iOS SDK
      • Android SDK
      • React Native SDK
      • Cordova SDK
      • Flutter SDK
      • Unity SDK
    • SDK configurations
      • Paywall observer mode
      • Full mode
      • StoreKit 2
      • Appendices
        • Start the SDK
        • Set User Id
        • Notify when the app is ready
        • Present paywalls
        • Unlock content / service
        • Close SDK (Android only)
    • Stripe
    • Purchasely with RevenueCat
  • S2S notifications
    • Server-to-server notifications ?
    • Apple App Store
    • Google Play Store
    • Huawei App Gallery
  • Analytics
    • Dashboards
      • Introduction
      • Live
      • Subscriptions
      • Cohorts
      • Trials
      • Events
    • Events
      • Webhook events
        • Subscription events
        • Subscription events attributes
      • SDK events
        • UI events
        • UI attributes
  • Integrations
    • Webhook
      • Receiving and understanding messages
      • Managing entitlements
      • Detailed sequence diagrams
    • Airship
    • Amplitude
    • AppsFlyer
    • Adjust
    • Piano analytics(ex AT Internet)
    • Batch
    • Branch
    • Braze
    • Clevertap
    • Customer.io
    • Firebase
    • Iterable
    • Mixpanel
    • MoEngage
    • OneSignal
    • Segment
    • Brevo(ex Sendinblue)
  • Advanced Features
    • Asynchronous paywalls
    • NEW: Promotional offers
    • Anonymous user
    • Associating content
    • Audiences
    • Customising UI
      • Errors & alerts
      • Controllers (iOS) / Fragments (Android)
    • Deeplinks automations
    • Disable placements
    • Displaying users subscriptions
    • Localization
    • Lottie animations
    • Non-subscription products
    • Paywall action interceptor
    • Promoting your products
      • Self-promotion
      • Promoting In-App Purchases
    • Purchase manually
    • Subscription status
    • Use your own paywall
  • Others
    • Frequently Asked Questions
    • Migration guides
      • Migrate to Purchasely
      • Webhook
        • Migrate to Webhook v3.0
      • SDK
        • Migrate to SDK v3.0
          • v2.2.0
          • v2.1.3
        • Migrate to SDK v3.1
        • Migrate to SDK v3.2
        • Migrate to SDK v4.0.0
  • TESTING
    • Testing Cycle Durations
Powered by GitBook

© Purchasely 2020-2023

On this page
  • Attributes
  • JSON Samples

Was this helpful?

Edit on GitHub
  1. Analytics
  2. Events
  3. Webhook events

Subscription events attributes

Attributes

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

string

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

string

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

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.

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.

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

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

  • STRIPE

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

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

No

JSON Samples

{
  "plan": "<plan vendorID defined in the Purchasely console>",
  "store": "APPLE_APP_STORE",
  "product": "<product vendorID define in the Purchasely console>",
  "user_id": "<user id you provided through the sdk>",
  "event_name": "SUBSCRIPTION_STARTED",
  "offer_type": "NONE",
  "api_version": 3,
  "environment": "SANDBOX",
  "purchased_at": "2021-11-07T17:41:17.000Z",
  "store_country": "FR",
  "next_renewal_at": "2021-11-07T17:44:17.000Z",
  "purchased_at_ms": 1636306877000,
  "event_created_at": "2021-11-07T17:41:34.188Z",
  "is_family_shared": false,
  "store_product_id": "<store product id defined in the store console>",
  "next_renewal_at_ms": 1636307057000,
  "event_created_at_ms": 1636306894188,
  "store_app_bundle_id": "<app bundle id defined in the store console>",
  "subscription_status": "AUTO_RENEWING",
  "store_transaction_id": "100000099999999",
  "original_purchased_at": "2021-11-07T17:41:18.000Z",
  "original_purchased_at_ms": 1636306878000,
  "effective_next_renewal_at": "2021-11-07T17:44:17.000Z",
  "purchasely_subscription_id": "subs_XFJFJEBFFU757FUJH",
  "effective_next_renewal_at_ms": 1636307057000,
  "store_original_transaction_id": "10000009999999"
}
{
  "plan": "<plan vendorID defined in the Purchasely console>",
  "store": "APPLE_APP_STORE",
  "product": "<product vendorID define in the Purchasely console>",
  "user_id": "<user id you provided through the sdk>",
  "event_name": "SUBSCRIPTION_RENEWED",
  "offer_type": "NONE",
  "api_version": 3,
  "environment": "SANDBOX",
  "purchased_at": "2021-11-07T17:44:17.000Z",
  "store_country": "FR",
  "next_renewal_at": "2021-11-07T17:47:17.000Z",
  "purchased_at_ms": 1636307057000,
  "event_created_at": "2021-11-07T17:43:35.225Z",
  "is_family_shared": false,
  "store_product_id": "<store product id defined in the store console>",
  "next_renewal_at_ms": 1636307237000,
  "event_created_at_ms": 1636307015225,
  "previous_offer_type": "NONE",
  "store_app_bundle_id": "<app bundle id defined in the store console>",
  "subscription_status": "AUTO_RENEWING",
  "store_transaction_id": "100000099999999",
  "original_purchased_at": "2021-11-07T17:41:18.000Z",
  "original_purchased_at_ms": 1636306878000,
  "effective_next_renewal_at": "2021-11-07T17:47:17.000Z",
  "purchasely_subscription_id": "subs_XFJFJEBFFU757FUJH",
  "effective_next_renewal_at_ms": 1636307237000,
  "store_original_transaction_id": "10000009999999"
}
{
  "plan": "<plan vendorID defined in the Purchasely console>",
  "store": "APPLE_APP_STORE",
  "product": "<product vendorID define in the Purchasely console>",
  "user_id": "<user id you provided through the sdk>",
  "event_name": "RENEWAL_DISABLED",
  "offer_type": "NONE",
  "api_version": 3,
  "environment": "SANDBOX",
  "purchased_at": "2021-11-07T18:22:46.000Z",
  "store_country": "FR",
  "next_renewal_at": "2021-11-07T18:27:46.000Z",
  "purchased_at_ms": 1636309366000,
  "event_created_at": "2021-11-07T18:27:10.018Z",
  "is_family_shared": false,
  "store_product_id": "<store product id defined in the store console>",
  "next_renewal_at_ms": 1636309666000,
  "event_created_at_ms": 1636309630018,
  "previous_offer_type": "NONE",
  "store_app_bundle_id": "<app bundle id defined in the store console>",
  "subscription_status": "AUTO_RENEWING_CANCELED",
  "store_transaction_id": "10000009999999",
  "original_purchased_at": "2021-11-07T17:41:18.000Z",
  "original_purchased_at_ms": 1636306878000,
  "effective_next_renewal_at": "2021-11-07T18:27:46.000Z",
  "purchasely_subscription_id": "subs_XFJFJEBFFU757FUJH",
  "effective_next_renewal_at_ms": 1636309666000,
  "store_original_transaction_id": "10000009999999"
}

PreviousSubscription eventsNextSDK events

Last updated 1 year ago

Was this helpful?

Contains the name of the event.

Contains the content_id you may have set on the SDK to display the paywall.

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 code of the currency and will be replaced accrodingly to the selected currency in the settings.

This amount can also be negative in case of a refund or an plan upgrade with a partial refund. xxx is the code of the currency and will be replaced accordingly to the selected currency in the settings.

This amount can also be negative in case of a refund or an plan upgrade with a partial refund. xxx is the code of the currency and will be replaced accordingly to the selected currency in the settings.

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 code of the currency and will be replaced accordingly to the selected currency in the settings.

string Contains the id of the placement from where the subscription was bought.

string Contains the id of the audience the user matched within the associated placement when the initial purchase was made.

learn more
learn more
ISO 4217
ISO 4217
ISO 4217
ISO 4217
learn more
learn more