Billing Webhook Events
This topic describes the billing events sent by Megaport’s webhooks.
billing.contract.expiring
billing.contract.expiring is sent when a billing contract is about to expire.
The payload of this event has the following structure:
company_uid(string, UUID)metadata(object)environment(string)
schema_version(string)timestamp(string, date-time)type(string)data(object)billing_market(string)contract_expiry_date(string, date-time)is_auto_renew(boolean)monthly_rate(number, double)renewal_available_date(string, date-time)service_name(string)service_owner_company_uid(string, UUID)service_type(string)service_uid(string, UUID)term_months(integer, int32)
For example:
{
"company_uid": "681ef39b-436b-40dd-a914-26391db2689c",
"metadata": {
"environment": "production"
},
"schema_version": "1",
"timestamp": "2026-04-23T10:29:12Z",
"type": "billing.contract.expiring",
"data": {
"billing_market": "US",
"contract_expiry_date": "2027-05-12T03:00:00Z",
"is_auto_renew": true,
"monthly_rate": 500,
"renewal_available_date": "2027-04-12T03:00:00Z",
"service_name": "My VXC",
"service_owner_company_uid": "123e4567-e89b-12d3-a456-426614174000",
"service_type": "VXC",
"service_uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"term_months": 12
}
}
billing.invoice.generated
billing.invoice.generated is sent when a billing invoice has been generated.
The payload of this event has the following structure:
company_uid(string, UUID)metadata(object)environment(string)
schema_version(string)timestamp(string, date-time)type(string)data(object)billing_market(string)currency(string)invoice_amount(number, double)invoice_id(string)invoice_url(string, uri)
For example:
{
"company_uid": "681ef39b-436b-40dd-a914-26391db2689c",
"metadata": {
"environment": "production"
},
"schema_version": "1",
"timestamp": "2026-04-23T10:29:12Z",
"type": "billing.invoice.generated",
"data": {
"billing_market": "US",
"currency": "USD",
"invoice_amount": 1500,
"invoice_id": "INV001234",
"invoice_url": "https://portal.megaport.com/settings/company/markets/market/123/invoice/INV001234"
}
}
billing.service.retermed
billing.service.retermed is sent when a billing service has been re-termed.
The payload of this event has the following structure:
company_uid(string, UUID)metadata(object)environment(string)
schema_version(string)timestamp(string, date-time)type(string)data(object)billing_market(string)contract_expiry_date(string, date-time)is_auto_renew(boolean)monthly_rate(number, double)service_name(string)service_owner_company_uid(string, UUID)service_type(string)service_uid(string, UUID)term_months(integer, int32)
For example:
{
"company_uid": "681ef39b-436b-40dd-a914-26391db2689c",
"metadata": {
"environment": "production"
},
"schema_version": "1",
"timestamp": "2026-04-23T10:29:12Z",
"type": "billing.service.retermed",
"data": {
"billing_market": "US",
"contract_expiry_date": "2026-05-12T03:00:00Z",
"is_auto_renew": true,
"monthly_rate": 500,
"service_name": "My VXC",
"service_owner_company_uid": "123e4567-e89b-12d3-a456-426614174000",
"service_type": "VXC",
"service_uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"term_months": 12
}
}
billing.service.started
billing.service.started is sent when a service has started billing.
The payload of this event has the following structure:
company_uid(string, UUID)metadata(object)environment(string)
schema_version(string)timestamp(string, date-time)type(string)data(object)billing_market(string)contract_expiry_date(string, date-time)is_auto_renew(boolean)monthly_rate(number, double)service_name(string)service_owner_company_uid(string, UUID)service_type(string)service_uid(string, UUID)term_months(integer, int32)
For example:
{
"company_uid": "681ef39b-436b-40dd-a914-26391db2689c",
"metadata": {
"environment": "production"
},
"schema_version": "1",
"timestamp": "2026-04-23T10:29:12Z",
"type": "billing.service.started",
"data": {
"billing_market": "US",
"contract_expiry_date": "2026-05-12T03:00:00Z",
"is_auto_renew": true,
"monthly_rate": 500,
"service_name": "My VXC",
"service_owner_company_uid": "123e4567-e89b-12d3-a456-426614174000",
"service_type": "VXC",
"service_uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"term_months": 12
}
}