Before you end a Contract
- Retrieve the live Contract, save its
contract_codeand check itsstatusand dates. - Decide between a scheduled end and an immediate end. They are not interchangeable:
- A scheduled end is the Contract’s
ended_at. It must be after the start and not already in the past. - An immediate end is
DELETE /contracts/{external_id}.
- A scheduled end is the Contract’s
- Check the open period in current usage if the Contract is active.
End the Contract immediately
DELETE /contracts/{external_id} ends the Contract lifecycle. It does not delete the record.
Your API key needs
contract write permission. Pass the saved contract_code to select the Contract, especially when its external_id has been reused.
status.
Check final billing
After the Contract ends, check its status and review any fees and invoices for the closing billing period. The amounts depend on the billing configuration and the period being closed.- Retrieve the ended Contract with
GET /contracts/{external_id}?contract_code={contract_code}, using the code you saved. Check that its status isterminatedorcanceled. This selects the same Contract even if itsexternal_idhas since been reused. - List the customer’s invoices and inspect their fees and service periods.
Retrieve the terminated contract
Contract lifecycle
Statuses and transitions.
Invoices
Check what was billed.
Delete a Contract (API)
DELETE /contracts/{external_id}Retrieve a Contract (API)
GET /contracts/{external_id}