Subscriber Events
Subscriber event types, what triggers each one, and the fields its payload carries
These events fire on the subscriber object. To receive them, register the subscriber.* pattern — or any individual event below — against a webhook target. See Configure Webhooks via API for how to create a target and define filters.
Event types
| Event | Description |
|---|---|
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.* | Matches every event in this family. |
Payload
| Name | Type | Description | Example |
|---|---|---|---|
id | str | Identifier of the event | ”mmmm4444nnnn3333pppp” |
type | str | The type of event that occurred | See below for full list of event types |
created | int | Time since epoch when the event occurred | 1622589211 |
data | json | Event data object | See JSON below |
data.object.type | str | Resource type of event | ”Subscription” |
data.object.merchant | str | Identifier of merchant | ”aaaa1111bbbb2222cccc” |
data.merchant_user_id | str | ID of consumer from merchant system | ”dddjjjjkk3343” |
data.object.subscription | str | ID of corresponding subscription that triggered the subscriber event | ”ssss3333llll2222bbbb” |
data.object.session_id | str | Session ID obtained from og_session_id cookie if present | ”aaaa1111bbbb2222cccc.450125.1299622365” |
data.object.first_name | str | Customer first name | ”John” |
data.object.last_name | str | Customer last name | ”Smith” |
data.object.email | str | Customer email | ”john.smith@email.com” |
data.object.phone_number | str | Customer phone number | ”555-555-5555” |
data.object.phone_type | int | Phone type enum | 2 |
data.object.phone_type_display | str | Readable version of phone type enum. Options: “invalid”, “landline”, “mobile”, “voip" | "mobile” |
data.object.live | bool | Customer status. true if they have any active subscription, false if none are active | true |
data.object.created | int | Unix timestamp when the customer was created | 1298407706 |
data.object.last_updated | int | Unix timestamp when the customer was last updated | 1301323663 |
data.object.extra_data | object | Key/value store for any extra information about the customer | {"some":"extra","fields":"here"} |
data.object.locale | int | Locale enum. Options 1–46 | 1 |
data.object.locale_display | str | Readable 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","session_id": "aaaa1111bbbb2222cccc.450125.1299622365","first_name": "John","last_name": "Smith","email": "john.smith@email.com","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"}}}