Skip to main content

Add a Payment Term

Creates a new payment term.

HTTP Request​

  • URL: /paymentTerms
  • Method: POST
  • Headers:
    • accessToken: Required. Your API access token.
    • Content-Type: application/json
  • Required scope: READ_ORDER or READ_WRITE_ORDER

Request Body​

The request body is a JSON object with the following fields:

FieldTypeRequiredDescription
nameStringYesName of the payment term. Must be unique.
statusBooleanNoWhether the payment term is active. Default is true.
dueTypeStringNonet or fulfillment. Default is net.
paymentDueDaysNumberNoNumber of days until payment is due. Required when dueType is net. Default is 0.

cURL Example​

curl --location '<BASE_URL>/paymentTerms' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Net 60",
"status": true,
"dueType": "net",
"paymentDueDays": 60
}'

Response​

  • 200 OK: The payment term was created successfully.
  • 400 Bad Request: The access token is missing or invalid, a field is missing or not valid, or a payment term with the same name already exists.

Sample JSON Response​

{
"success": true,
"data": {
"id": "67a46366869ddc960b432623",
"name": "Net 60",
"status": true,
"dueType": "net",
"paymentDueDays": 60,
"createdAt": "2025-02-06T07:23:18.394Z",
"updatedAt": "2025-02-06T07:23:18.394Z"
}
}

Response Details​

FieldTypeDescription
successBooleanWhether the request was successful.
dataObjectThe new payment term. See Payment Term Data.

Notes​

  • If the name is already used, the response message is Payment term name already exists.