Skip to content

Subscription Service Amended Webhook

POST
/subscription.amend.service
curl --request POST \
--url https://webhooks.underline.com/subscription.amend.service \
--header 'Content-Type: application/json' \
--data '{ "action": "subscription.amend.service", "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" } } }, "previous_subscription": { "id": "edc1ed35-59c9-43a4-bc96-563a72d7a045", "total_price": 7, "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": [], "assigned_resources": [ { "type": "provider_handoff_circuit", "value": "DEN-10" } ] }, "previous_service": { "id": "a73ae436-142c-4b90-91f8-734934d59d59", "type": "data", "detail": { "data": { "download_speed_kbps": "500000", "upload_speed_kbps": "500000" } } } }'

This webhook is triggered when an existing subscription is amended, for example when its base service or price changes or an option is added, removed, or changed in quantity. It carries the amended subscription and service along with the previous ones so the merchant can see what changed. Once the change is applied on the merchant’s side, report it with the providerSetSubscriptionServiceStatus mutation using an actionType of amend.

The payload that will be sent when a subscription is amended.

Media typeapplication/json
object
action
string
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
previous_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
previous_service
object
id
string
type
string
detail
object
data
object
download_speed_kbps
string
upload_speed_kbps
string

Example

{
"action": "subscription.amend.service",
"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"
}
}
},
"previous_subscription": {
"id": "edc1ed35-59c9-43a4-bc96-563a72d7a045",
"total_price": 7,
"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": [],
"assigned_resources": [
{
"type": "provider_handoff_circuit",
"value": "DEN-10"
}
]
},
"previous_service": {
"id": "a73ae436-142c-4b90-91f8-734934d59d59",
"type": "data",
"detail": {
"data": {
"download_speed_kbps": "500000",
"upload_speed_kbps": "500000"
}
}
}
}

Webhook received successfully

Bad request