Update Payment Term
curl --request PATCH \
--url https://qwoty.app/api/payment-terms/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"reference": "<string>",
"is_active": true,
"identifiers": {
"identifiers.crm": "<string>",
"identifiers.erp": "<string>",
"identifiers.accounting": "<string>"
},
"installments": [
{
"name": "<string>",
"percentage": 123,
"term": {},
"custom_text": "<string>",
"order_number": 123,
"is_date_required": true
}
]
}
'import requests
url = "https://qwoty.app/api/payment-terms/{id}"
payload = {
"name": "<string>",
"reference": "<string>",
"is_active": True,
"identifiers": {
"identifiers.crm": "<string>",
"identifiers.erp": "<string>",
"identifiers.accounting": "<string>"
},
"installments": [
{
"name": "<string>",
"percentage": 123,
"term": {},
"custom_text": "<string>",
"order_number": 123,
"is_date_required": True
}
]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
reference: '<string>',
is_active: true,
identifiers: {
'identifiers.crm': '<string>',
'identifiers.erp': '<string>',
'identifiers.accounting': '<string>'
},
installments: [
{
name: '<string>',
percentage: 123,
term: {},
custom_text: '<string>',
order_number: 123,
is_date_required: true
}
]
})
};
fetch('https://qwoty.app/api/payment-terms/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qwoty.app/api/payment-terms/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'reference' => '<string>',
'is_active' => true,
'identifiers' => [
'identifiers.crm' => '<string>',
'identifiers.erp' => '<string>',
'identifiers.accounting' => '<string>'
],
'installments' => [
[
'name' => '<string>',
'percentage' => 123,
'term' => [
],
'custom_text' => '<string>',
'order_number' => 123,
'is_date_required' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://qwoty.app/api/payment-terms/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"is_active\": true,\n \"identifiers\": {\n \"identifiers.crm\": \"<string>\",\n \"identifiers.erp\": \"<string>\",\n \"identifiers.accounting\": \"<string>\"\n },\n \"installments\": [\n {\n \"name\": \"<string>\",\n \"percentage\": 123,\n \"term\": {},\n \"custom_text\": \"<string>\",\n \"order_number\": 123,\n \"is_date_required\": true\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://qwoty.app/api/payment-terms/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"is_active\": true,\n \"identifiers\": {\n \"identifiers.crm\": \"<string>\",\n \"identifiers.erp\": \"<string>\",\n \"identifiers.accounting\": \"<string>\"\n },\n \"installments\": [\n {\n \"name\": \"<string>\",\n \"percentage\": 123,\n \"term\": {},\n \"custom_text\": \"<string>\",\n \"order_number\": 123,\n \"is_date_required\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qwoty.app/api/payment-terms/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"is_active\": true,\n \"identifiers\": {\n \"identifiers.crm\": \"<string>\",\n \"identifiers.erp\": \"<string>\",\n \"identifiers.accounting\": \"<string>\"\n },\n \"installments\": [\n {\n \"name\": \"<string>\",\n \"percentage\": 123,\n \"term\": {},\n \"custom_text\": \"<string>\",\n \"order_number\": 123,\n \"is_date_required\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Net 30 Days (Updated)",
"api_name": "net_30_days",
"reference": "PT001",
"is_active": true,
"identifiers": {
"crm": "crm_123",
"erp": "erp_456",
"accounting": "acc_789"
},
"installments": [
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Full Payment",
"percentage": 100,
"term": "net30",
"custom_text": null,
"order_number": 1,
"is_date_required": false
}
],
"created_at": "2024-12-21T10:30:00Z",
"updated_at": "2024-12-21T14:45:00Z",
"deleted_at": null,
"deleted_by": null
}
}
Payment Terms
Update Payment Term
Update an existing payment term
PATCH
/
api
/
payment-terms
/
{id}
Update Payment Term
curl --request PATCH \
--url https://qwoty.app/api/payment-terms/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"reference": "<string>",
"is_active": true,
"identifiers": {
"identifiers.crm": "<string>",
"identifiers.erp": "<string>",
"identifiers.accounting": "<string>"
},
"installments": [
{
"name": "<string>",
"percentage": 123,
"term": {},
"custom_text": "<string>",
"order_number": 123,
"is_date_required": true
}
]
}
'import requests
url = "https://qwoty.app/api/payment-terms/{id}"
payload = {
"name": "<string>",
"reference": "<string>",
"is_active": True,
"identifiers": {
"identifiers.crm": "<string>",
"identifiers.erp": "<string>",
"identifiers.accounting": "<string>"
},
"installments": [
{
"name": "<string>",
"percentage": 123,
"term": {},
"custom_text": "<string>",
"order_number": 123,
"is_date_required": True
}
]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
reference: '<string>',
is_active: true,
identifiers: {
'identifiers.crm': '<string>',
'identifiers.erp': '<string>',
'identifiers.accounting': '<string>'
},
installments: [
{
name: '<string>',
percentage: 123,
term: {},
custom_text: '<string>',
order_number: 123,
is_date_required: true
}
]
})
};
fetch('https://qwoty.app/api/payment-terms/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qwoty.app/api/payment-terms/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'reference' => '<string>',
'is_active' => true,
'identifiers' => [
'identifiers.crm' => '<string>',
'identifiers.erp' => '<string>',
'identifiers.accounting' => '<string>'
],
'installments' => [
[
'name' => '<string>',
'percentage' => 123,
'term' => [
],
'custom_text' => '<string>',
'order_number' => 123,
'is_date_required' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://qwoty.app/api/payment-terms/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"is_active\": true,\n \"identifiers\": {\n \"identifiers.crm\": \"<string>\",\n \"identifiers.erp\": \"<string>\",\n \"identifiers.accounting\": \"<string>\"\n },\n \"installments\": [\n {\n \"name\": \"<string>\",\n \"percentage\": 123,\n \"term\": {},\n \"custom_text\": \"<string>\",\n \"order_number\": 123,\n \"is_date_required\": true\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://qwoty.app/api/payment-terms/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"is_active\": true,\n \"identifiers\": {\n \"identifiers.crm\": \"<string>\",\n \"identifiers.erp\": \"<string>\",\n \"identifiers.accounting\": \"<string>\"\n },\n \"installments\": [\n {\n \"name\": \"<string>\",\n \"percentage\": 123,\n \"term\": {},\n \"custom_text\": \"<string>\",\n \"order_number\": 123,\n \"is_date_required\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qwoty.app/api/payment-terms/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"reference\": \"<string>\",\n \"is_active\": true,\n \"identifiers\": {\n \"identifiers.crm\": \"<string>\",\n \"identifiers.erp\": \"<string>\",\n \"identifiers.accounting\": \"<string>\"\n },\n \"installments\": [\n {\n \"name\": \"<string>\",\n \"percentage\": 123,\n \"term\": {},\n \"custom_text\": \"<string>\",\n \"order_number\": 123,\n \"is_date_required\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Net 30 Days (Updated)",
"api_name": "net_30_days",
"reference": "PT001",
"is_active": true,
"identifiers": {
"crm": "crm_123",
"erp": "erp_456",
"accounting": "acc_789"
},
"installments": [
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Full Payment",
"percentage": 100,
"term": "net30",
"custom_text": null,
"order_number": 1,
"is_date_required": false
}
],
"created_at": "2024-12-21T10:30:00Z",
"updated_at": "2024-12-21T14:45:00Z",
"deleted_at": null,
"deleted_by": null
}
}
Authorization
string
required
Bearer token for authentication. Format:
Bearer qwoty_your_tokenPath Parameters
string
required
UUID of the payment term to update
Request Body
string
Name of the payment term (max 50 characters)
string
Internal reference code (max 50 characters)
boolean
Whether the payment term is active
object
array
Array of payment installments. If provided, replaces all existing installments.
Show Installment Object
Show Installment Object
string
Name of the installment
number
required
Percentage of total amount (0-100)
enum
required
Payment term type. Options:
due_now, due_on_receipt, net15, net30, net45, net60, net90, net120, eom30, eom45, eom60, po_received, customstring
Custom text (required if term is
custom)number
required
Display order (1, 2, 3…)
boolean
default:"false"
Whether a due date must be entered on the quote for this installment. Only
applies to
custom and po_received terms; ignored (stored as false) for
other terms.You can update individual fields or the entire payment term. Omitted fields
remain unchanged.
If updating installments, the sum of all percentages must equal 100%.
api_name is immutable after creation and cannot be changed with this endpoint.Examples
curl -X PATCH https://qwoty.app/api/payment-terms/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer qwoty_your_token" \
-H "Content-Type: application/json" \
-d '{
"name": "Net 30 Days (Updated)"
}'
curl -X PATCH https://qwoty.app/api/payment-terms/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer qwoty_your_token" \
-H "Content-Type: application/json" \
-d '{
"is_active": false
}'
curl -X PATCH https://qwoty.app/api/payment-terms/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer qwoty_your_token" \
-H "Content-Type: application/json" \
-d '{
"name": "50% Deposit + 50% Net 30",
"installments": [
{
"name": "Deposit",
"percentage": 50,
"term": "due_now",
"order_number": 1,
"is_date_required": false
},
{
"name": "Balance",
"percentage": 50,
"term": "net30",
"order_number": 2,
"is_date_required": false
}
]
}'
const paymentTermId = '550e8400-e29b-41d4-a716-446655440000'
const response = await fetch(
`https://qwoty.app/api/payment-terms/${paymentTermId}`,
{
method: 'PATCH',
headers: {
Authorization: 'Bearer qwoty_your_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'Net 30 Days (Updated)',
is_active: true,
}),
},
)
const data = await response.json()
import requests
payment_term_id = '550e8400-e29b-41d4-a716-446655440000'
response = requests.patch(
f'https://qwoty.app/api/payment-terms/{payment_term_id}',
headers={
'Authorization': 'Bearer qwoty_your_token',
'Content-Type': 'application/json'
},
json={
'name': 'Net 30 Days (Updated)',
'is_active': True
}
)
data = response.json()
Response
boolean
Indicates if the request was successful
object
The updated payment term object with all fields
{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Net 30 Days (Updated)",
"api_name": "net_30_days",
"reference": "PT001",
"is_active": true,
"identifiers": {
"crm": "crm_123",
"erp": "erp_456",
"accounting": "acc_789"
},
"installments": [
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Full Payment",
"percentage": 100,
"term": "net30",
"custom_text": null,
"order_number": 1,
"is_date_required": false
}
],
"created_at": "2024-12-21T10:30:00Z",
"updated_at": "2024-12-21T14:45:00Z",
"deleted_at": null,
"deleted_by": null
}
}
Error Responses
{
"error": "Payment term not found"
}
{
"error": "Validation error",
"details": ["Total percentage must equal 100"]
}
{
"error": "Invalid or expired token"
}
Last modified on October 28, 2026
Was this page helpful?

