Skip to navigation

Update Payment Term

View as Markdown

Updates a payment term. Fields left out are unchanged. instalments replaces the existing instalments, and an empty array turns the term back into a single due date. Send clear_discount to remove the early-payment discount. Set is_active to false to retire a term.

Documents keep the schedule they were given when the term was applied, so editing or deactivating a term does not change existing invoices or bills.

Requires the can_modify_payment_term permission on the key owner’s role. Available when the Invoices or Bills service is enabled for the workspace.

Keys: secret key only.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

identitystring
The identity for the active workspace.

Path parameters

idstringRequired
Payment term ID.

Request

This endpoint expects an object.
namestringOptional<=50 characters
net_daysintegerOptional0-365
is_defaultbooleanOptional
is_activebooleanOptional
Deactivating a term also removes it as the workspace default.
instalmentslist of objectsOptional
Replaces the instalments. Send an empty array to turn the term back into a single due date, or omit the field to keep the existing ones.
discountobjectOptional

Replaces the early-payment discount.

is_layawaybooleanOptional

Layaway: the customer pays the instalments before the goods are released. Needs at least two instalments and no discount. Used on draft orders and order requests, not on invoices. Send false to turn layaway off.

release_instalmentintegerOptional1-24

Layaway only: the instalment after which the goods are released and the order is invoiced (1 = after the first). Defaults to the last instalment.

clear_discountbooleanOptional

Send true to remove the early-payment discount.

Response

OK
dataobject
statusboolean
messagestring

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error