End a plan
End a customer's line on the date they agreed to stop, and what happens to billing and the end-user.
Ending a line stops a customer's service on the date they agreed to stop. It is final: to pause a line instead, stop its service and restore it later.
POST /v1/user-plans/{userId}/termination{
"terminationDate": "2027-03-01",
"deleteUser": false
}terminationDate is YYYY-MM-DD. Today is allowed; a past date is rejected.
The call returns 202 as soon as the termination is booked, not once the line is down:
{
"terminationDate": "2027-03-01",
"activeUntil": "2027-05-31T00:00:00.000Z",
"numberIds": ["8238c1b9-c2c0-4455-9b03-4bd787052709"]
}What happens, and when
- On
terminationDate, the line is suspended. - 14 days later, it is deactivated at the network.
Until then, GET /v1/user-plans/{userId} reports the date as terminationScheduledAt, and null when no termination is scheduled.
Billing is not prorated. The customer keeps the period they already bought: billing runs to activeUntil even when the line stops earlier, and the plan behind it does not renew.
The end-user
Send deleteUser: true to delete the end-user along with the line. Otherwise the user remains, and DELETE /v1/users/{userId} succeeds once the line is suspended; you do not have to wait out the 14 days.
Ending a line needs the orders:cancel permission on your key. There is no sandbox: a call from the playground ends a real line.