Skip to main content
POST
Terminate Contract

Path Parameters

id
integer
required

Body

termination_date
string<date>
required
void_invoice_ids
integer[]

List of invoice IDs to void atomically when terminating the contract.

void_date
string<date>

Date to use when voiding invoices. Required when void_invoice_ids is provided.

reverse_remaining_revenue
boolean
default:false

When true, the remaining subscription schedule after the termination date is cancelled with offsetting negative revenue transactions instead of being deleted, and a credit memo is created if the contract carries deferred revenue. Not supported for evergreen contracts.

Response

200 - application/json

Response serializer for contract termination with hints about drafted operations.

contract_terminated
boolean
required

Whether the contract was terminated directly (True) or drafted (False).

contract_draft_id
integer | null

Draft queue ID if contract termination was drafted instead of executed.

voided_invoice_ids
integer[]

List of invoice IDs that were voided directly.

drafted_invoice_ids
integer[]

List of invoice IDs that were drafted for voiding (user lacks void permission).

credit_memo_id
integer | null

ID of the credit memo created for deferred revenue when remaining revenue was reversed.

reversal_transaction_count
integer
default:0

Number of negative revenue transactions written to cancel the remaining schedule.