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 and billed unused prepaid commitments are settled with offsetting negative revenue transactions. Not supported for evergreen contracts.

credit_unused_revenue
boolean | null

When true with reverse_remaining_revenue, unused billed subscription and prepaid amounts get a credit memo. Omit to credit whenever reverse_remaining_revenue is true. Send false to reverse without refunding. Unused prepaid is not recognized as breakage.

successor_contract_id
integer | null

Successor contract that receives the usage-relative recognition-basis adjustment.

successor_target_kind

Successor target kind for the signed recognition-basis adjustment.

  • prepaid_commit - prepaid_commit
Available options:
prepaid_commit
successor_target_id
integer | null

Successor prepaid commit or relative subscription that receives the adjustment.

credit_memo_date
string<date> | null

Date the termination credit memo posts on, or the first open date after it when books are closed. Defaults to the termination date and cannot be earlier than it. Only reversals of periods that have already elapsed move to this date; future scheduled reversals keep their dates. The termination date is the service cutoff, while invoices dated up to the date the credit memo posts are included in what is credited. Requires reverse_remaining_revenue=true.

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.

successor_credit_memo_id
integer | null

ID of the successor contract's credit memo when a negative successor adjustment was credited.

reversal_transaction_count
integer
default:0

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

reversal_transaction_ids
integer[]

Revenue transaction IDs written to cancel the remaining subscription and prepaid balances.