Terminate a contract with notice
To terminate a contract and have billwerk honor the notice period, you need to query a cancellation preview to derive the EndDate
based on the notice period defined in the plan variant currently booked. Then you need to end the contract accordingly.
Sample request
GET /Contracts/{contractId}/cancellationPreview
{
"NextPossibleCancellationDate": "2018-02-07T23:00:00Z",
"EndDate": "2018-02-08T23:00:00Z", //You'll want to post this EndDate later
"Invoice": {...},
"ContractAfter": {...}
}
The cancellation preview provides the EndDate
of a contract if it would be cancelled at the moment of the request, while honoring the notice period defined in the plan variant currently active in the contract.
NextPossibleCancellationDate
describes the point in time, until which the contract can be cancelled while honoring the notice period and still realizing the EndDate
provided in the preview. If you or the customer cancels the contract before the NextPossibleCancellationDate
, the EndDate
from the preview will be applied.
POST /Contracts/{contractId}/end
{
"EndDate": "2018-02-08T23:00:00Z"
}
Updated 9 months ago