Subscriber Events

Subscriber event types, what triggers each one, and the fields its payload carries
View as Markdown

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

EventDescription
subscriber.createTriggered 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.cancelTriggered 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

NameTypeDescriptionExample
idstrIdentifier of the event”mmmm4444nnnn3333pppp”
typestrThe type of event that occurredSee below for full list of event types
createdintTime since epoch when the event occurred1622589211
datajsonEvent data objectSee JSON below
data.object.typestrResource type of event”Subscription”
data.object.merchantstrIdentifier of merchant”aaaa1111bbbb2222cccc”
data.merchant_user_idstrID of consumer from merchant system”dddjjjjkk3343”
data.object.subscriptionstrID of corresponding subscription that triggered the subscriber event”ssss3333llll2222bbbb”
data.object.session_idstrSession ID obtained from og_session_id cookie if present”aaaa1111bbbb2222cccc.450125.1299622365”
data.object.first_namestrCustomer first name”John”
data.object.last_namestrCustomer last name”Smith”
data.object.emailstrCustomer email”john.smith@email.com”
data.object.phone_numberstrCustomer phone number”555-555-5555”
data.object.phone_typeintPhone type enum2
data.object.phone_type_displaystrReadable version of phone type enum. Options: “invalid”, “landline”, “mobile”, “voip""mobile”
data.object.liveboolCustomer status. true if they have any active subscription, false if none are activetrue
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–461
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",
"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"
}
}
}