Skip to navigation

Update contract obligation

View as Markdown

Returns 202 once the change is saved. Invoices are regenerated asynchronously: poll statusEndpoint until the job completes. jobId is null when the change named no billing terms, so no regeneration was queued; statusEndpoint then points at the customer’s invoice-generation status.

Authentication

Authorizationstring
API Key authentication via header

Path parameters

idstringRequired
Contract Id
obligationIdstringRequired
Obligation Id

Request

This endpoint expects an object.
namestringOptional
Billing term name
descriptionstringOptional
Billing term description
itemIdstringOptional
Item Id
productIdstring or nullOptional

Product ID from /v3/products that links this billing term to an entry in the merchant’s product catalog. Omit to leave unchanged, provide a UUID to link, or null to unlink. To ensure revenue reporting accuracy, associate the billing term with a product whenever applicable.

classIdstringOptional
Class Id
categoryIdstringOptional
Category Id
eventTypeIdstringOptional
Event Type Id
pricestringOptional
Price
invoiceDateStrategyenumOptional

Strategy for determining when to send invoices. FIRST_OF_PERIOD (invoice at start of billing period), LAST_OF_PERIOD (invoice at end of billing period), ARREARS (invoice after service delivery), ADVANCED_DUE_START (invoice date at start of billing period minus netPaymentTerms days, due start of service), OFFSET_FROM_PERIOD_START / OFFSET_FROM_PERIOD_END (invoice date at period start/end plus invoiceDateOffsetDays).

invoiceDateOffsetDaysdoubleOptional-365-365

Days to offset the invoice date from the period start (OFFSET_FROM_PERIOD_START) or period end (OFFSET_FROM_PERIOD_END). Required for those strategies and not allowed for FIRST_OF_PERIOD, LAST_OF_PERIOD, ARREARS, or ADVANCED_DUE_START. Integer from -365 to 365.

netPaymentTermsdoubleOptional
Net Payment Terms
includeInArrbooleanOptional

Whether this billing term contributes to ARR (Annual Recurring Revenue)

billingStartDatestringOptional
Billing Start Date
billingFrequencydoubleOptional
Billing Frequency
billingFrequencyUnitenumOptional
Billing Frequency Unit.
totalNumberOfInvoicesdoubleOptional
Total Number of Invoices
revenueStartDatestringOptional
Revenue Start Date
revenueEndDatestringOptional
Revenue End Date
discountobjectOptional

Discount configuration. Pass empty object {} to remove existing discount, omit field to leave discount untouched, or provide values to update discount. Examples: { type: ‘FIXED’, amount: ‘5.00’ } for a $5.00 fixed discount, { type: ‘PERCENTAGE’, amount: ‘0.10’ } for a 10% percentage discount, or {} to remove discount

regenerateInvoicesbooleanOptional
Regenerate Invoices

Response

The obligation, and the invoice regeneration job
payloadobject
Response payload, will be empty when success is false
successboolean

Boolean with true=success, false=failure

messagestring

Plain-text description of the result

errorobjectOptional
json element with any error messages or warnings

Errors

404
Not Found Error