Webhooks - Subscriber Events

Subscriber Event Object

idstrIdentifier of the event“mmmm4444nnnn3333pppp”
typestrThe type of event that occurredSee below for full list of event types
createdintUnix timestampe when the event occurred1622589211
dataobjectTypeSee JSON below
data.object.typestrResource type of event"Subscription"
data.object.merchantstrIdentifier of merchant"aaaa1111bbbb2222cccc"
data.object.merchant_user_idstrID of consumer from merchant system."dddjjjjkk3343"
data.object.subscriptionstrID of corresponding subscription that triggered the subscriber event. Is empty if event can have more than one subscription"ssss3333llll2222bbbb"
data.object.subscriptionsarrayList of the ids of the corresponding subscriptions that triggered the event. Is empty if event can only have one subscription.["ssss3333llll2222bbbb", "ssss3333llll2222aaaa"]
data.object.session_idstrSession ID, obtained from og_session_id cookie"aaaa1111bbbb2222cccc.450125.1299622365"
data.object.first_namestrCustomer first name"John"
data.object.last_namestrCustomer last name"Smith"
data.object.emailstrCustomer email"[email protected]"
data.object.phone_numberstrCustomer phone number"555-555-5555"
data.object.phone_typeintPhone type enum.

Options: 0, 1, 2, 3
data.object.phone_type_displaystrReadable version of phone type enum.

Options: "invalid", "landline", "mobile", "voip"
data.object.liveboolCustomer status. "true" if they have any subscriptions active; false if no subscriptions are active.true
data.object.createdintUnix timestamp when the customer was created1298407706
data.object.last_updatedintUnix timestamp when the customer was last updated1301323663
data.object.extra_dataobjectKey/value store for any extra information about the customer{"some": "extra", "fields": "here"}
data.object.localeintLocale enum.

Options: 1 - 46
data.object.locale_displaystrReadable version of locale enum."en-us"
  • Example data:
  "id": "mmmm4444nnnn3333pppp",
  "type": "subscriber.create",
  "created": 1622589211,
  "data": {
    "object": {
      "type": "subscriber",
      "merchant": "aaaa1111bbbb2222cccc",
      "merchant_user_id": "dddjjjjkk3343",
      "subscription": "ssss3333llll2222bbbb",
      "subscriptions": ["ssss3333llll2222aaaa", "ssss3333llll2222cccc"],
      "session_id": "aaaa1111bbbb2222cccc.450125.1299622365",
      "first_name": "John",
      "last_name": "Smith",
      "email": "[email protected]",
      "phone_number": "555-555-5555",
      "phone_type": 2,
      "phone_type_display": "mobile",
      "live": true,
      "created": 1298407706,
      "last_updated": 1301323663,
      "extra_data": {},
      "locale": 1,
      "locale_display": "en-us",

Subscriber Event Types

  • subscriber.create

  • Triggered when a customer has created their first subscription. Contains the public id of the first subscription created in the "subscription" property. Has an empty "subscriptions" property. This event can only ever occur once for a customer.
  • subscriber.cancel

  • Triggered when a customer has cancelled their last active subscription and thus will no longer be generating any recurring revenue. Contains the public id of the last subscription canceled in the "subscription" property. Has an empty "subscriptions" property. This event can be triggered multiple times for a customer. For example: I cancel my last subscription, reactivate it, and then cancel it again. This event will be triggered twice.
  • subscriber.subscriptions_created

  • Triggered when a subscriber creates one or more subscriptions. Contain the public ids of the subscriptions that were created in the "subscriptions" property. Has an empty "subscription" property.