Subscription Activated Webhook
POST
/subscription.activated
const url = 'https://webhooks.underline.com/subscription.activated';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"action":"subscription.activated","activated_at":"2023-01-12T19:23:27-08:00","subscription":{"id":"edc1ed35-59c9-43a4-bc96-563a72d7a045","total_price":22,"provider_id":"78147524-b49a-47a5-ba65-11d5c787441b","account":{"id":"35c94995-8b8e-42ab-94d8-bee0d2457a1b","type":"residential","user":{"id":"c0071dc2-4f88-4f4f-8700-e9fce46e3922","first_name":"Jane","last_name":"Doe","email":"jane@example.com","phone_number":"+15555550123"},"address":{"id":"d8258e34-41bf-46c9-9b57-5b2a50aca5cc","number":"123","street_name":"Example St","locality":"Colorado Springs","region":"CO","county":"El Paso","zip_code":"80909","country":"US","latitude":38.8339,"longitude":-104.8214}},"addons":[{"id":"de6d1b6e-968e-4e60-88e4-97930543f264","unit_price":15,"quantity":1,"addon":{"id":"86a8bdfb-d4ff-4d08-a3fc-ae69c11891bf","name":"Single Static IP","service_type":"data","addon_type":"staticIp","is_included_by_default":false}}],"assigned_resources":[{"type":"provider_handoff_circuit","value":"DEN-10"}]},"service":{"id":"a73ae436-142c-4b90-91f8-734934d59d59","type":"data","detail":{"data":{"download_speed_kbps":"500000","upload_speed_kbps":"500000"}}},"assigned_resources":[{"type":"provider_handoff_circuit","value":"DEN-10"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://webhooks.underline.com/subscription.activated \ --header 'Content-Type: application/json' \ --data '{ "action": "subscription.activated", "activated_at": "2023-01-12T19:23:27-08:00", "subscription": { "id": "edc1ed35-59c9-43a4-bc96-563a72d7a045", "total_price": 22, "provider_id": "78147524-b49a-47a5-ba65-11d5c787441b", "account": { "id": "35c94995-8b8e-42ab-94d8-bee0d2457a1b", "type": "residential", "user": { "id": "c0071dc2-4f88-4f4f-8700-e9fce46e3922", "first_name": "Jane", "last_name": "Doe", "email": "jane@example.com", "phone_number": "+15555550123" }, "address": { "id": "d8258e34-41bf-46c9-9b57-5b2a50aca5cc", "number": "123", "street_name": "Example St", "locality": "Colorado Springs", "region": "CO", "county": "El Paso", "zip_code": "80909", "country": "US", "latitude": 38.8339, "longitude": -104.8214 } }, "addons": [ { "id": "de6d1b6e-968e-4e60-88e4-97930543f264", "unit_price": 15, "quantity": 1, "addon": { "id": "86a8bdfb-d4ff-4d08-a3fc-ae69c11891bf", "name": "Single Static IP", "service_type": "data", "addon_type": "staticIp", "is_included_by_default": false } } ], "assigned_resources": [ { "type": "provider_handoff_circuit", "value": "DEN-10" } ] }, "service": { "id": "a73ae436-142c-4b90-91f8-734934d59d59", "type": "data", "detail": { "data": { "download_speed_kbps": "500000", "upload_speed_kbps": "500000" } } }, "assigned_resources": [ { "type": "provider_handoff_circuit", "value": "DEN-10" } ] }'This webhook is triggered when a subscription is activated.
Request Bodyrequired
Section titled “Request Bodyrequired”The payload that will be sent when a subscription is activated.
Media typeapplication/json
object
action
string
activated_at
string format: date-time
subscription
object
id
string
total_price
number
provider_id
string
account
object
id
string
type
string
user
object
id
string
first_name
string
last_name
string
email
string
phone_number
string
address
object
id
string
number
string
street_name
string
locality
string
region
string
county
string
zip_code
string
country
string
latitude
number
longitude
number
addons
Array<object>
object
id
string
unit_price
number
quantity
integer
addon
object
id
string
name
string
service_type
string
addon_type
string
is_included_by_default
boolean
assigned_resources
Array<object>
object
type
string
value
string
service
object
id
string
type
string
detail
object
data
object
download_speed_kbps
string
upload_speed_kbps
string
assigned_resources
Array<object>
object
type
string
value
string
Example
{ "action": "subscription.activated", "activated_at": "2023-01-12T19:23:27-08:00", "subscription": { "id": "edc1ed35-59c9-43a4-bc96-563a72d7a045", "total_price": 22, "provider_id": "78147524-b49a-47a5-ba65-11d5c787441b", "account": { "id": "35c94995-8b8e-42ab-94d8-bee0d2457a1b", "type": "residential", "user": { "id": "c0071dc2-4f88-4f4f-8700-e9fce46e3922", "first_name": "Jane", "last_name": "Doe", "email": "jane@example.com", "phone_number": "+15555550123" }, "address": { "id": "d8258e34-41bf-46c9-9b57-5b2a50aca5cc", "number": "123", "street_name": "Example St", "locality": "Colorado Springs", "region": "CO", "county": "El Paso", "zip_code": "80909", "country": "US", "latitude": 38.8339, "longitude": -104.8214 } }, "addons": [ { "id": "de6d1b6e-968e-4e60-88e4-97930543f264", "unit_price": 15, "quantity": 1, "addon": { "id": "86a8bdfb-d4ff-4d08-a3fc-ae69c11891bf", "name": "Single Static IP", "service_type": "data", "addon_type": "staticIp", "is_included_by_default": false } } ], "assigned_resources": [ { "type": "provider_handoff_circuit", "value": "DEN-10" } ] }, "service": { "id": "a73ae436-142c-4b90-91f8-734934d59d59", "type": "data", "detail": { "data": { "download_speed_kbps": "500000", "upload_speed_kbps": "500000" } } }, "assigned_resources": [ { "type": "provider_handoff_circuit", "value": "DEN-10" } ]}Responses
Section titled “Responses”Webhook received successfully
Bad request