Payment Due Terms
Part of the Accounts API. Base URL https://your-domain.com/admin/api/v1 — replace the host with your own installation and the token placeholder with a real Bearer token (see Authentication).
List payment due terms
GET/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-termsRetrieve a paginated list of payment due terms for a specific payment term
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
payment_term_id | integer | Yes | The payment term ID |
Query parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
include | string | No | Comma-separated list of relationships to include. Available options: paymentTerm, creator | paymentTerm |
filter[id] | string | No | Comma-separated list of IDs to filter by | |
filter[value] | string | No | Filter by value type | |
filter[delay_type] | string | No | Filter by delay type | |
sort | string | Yes | Sort field | created_at |
page | integer | Yes | Page number | 1 |
curl -X GET "https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms?include=paymentTerm&sort=created_at&page=1" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"const response = await fetch("https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms?include=paymentTerm&sort=created_at&page=1", {
method: "GET",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms?include=paymentTerm&sort=created_at&page=1', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms?include=paymentTerm&sort=created_at&page=1"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers)
data = response.json()
print(data)Example response 200
{
"data": [
{
"id": 1,
"value": "percent",
"value_amount": "100.0000",
"delay_type": "days_after",
"nb_days": 0,
"days_next_month": "10",
"payment_id": 1,
"creator_id": 1,
"created_at": "2026-10-09T09:50:40.000000Z",
"updated_at": "2026-10-09T09:50:40.000000Z"
},
{
"id": 1,
"value": "percent",
"value_amount": "100.0000",
"delay_type": "days_after",
"nb_days": 0,
"days_next_month": "10",
"payment_id": 1,
"creator_id": 1,
"created_at": "2026-10-09T09:50:40.000000Z",
"updated_at": "2026-10-09T09:50:40.000000Z"
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Next »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}Error response — 401
{
"message": "Unauthenticated."
}Create payment due term
POST/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-termsCreate a new payment due term for a specific payment term
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
payment_term_id | integer | Yes | The payment term ID |
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
value | string | Yes | Due term value type. |
value_amount | number | Yes | Value amount (percentage or fixed amount). Must be at least 0. Must not be greater than 100. |
delay_type | string | Yes | Delay type. |
nb_days | integer | Yes | Number of days. Must be at least 0. |
days_next_month | integer | No | Day of next month (1-31). Must be at least 1. Must not be greater than 31. |
curl -X POST "https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"value": "percent",
"value_amount": 100,
"delay_type": "days_after",
"nb_days": 30,
"days_next_month": 15
}'const response = await fetch("https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms", {
method: "POST",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"value": "percent",
"value_amount": 100,
"delay_type": "days_after",
"nb_days": 30,
"days_next_month": 15
}),
});
const data = await response.json();
console.log(data);<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'value' => 'percent',
'value_amount' => 100,
'delay_type' => 'days_after',
'nb_days' => 30,
'days_next_month' => 15,
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
payload = {
"value": "percent",
"value_amount": 100,
"delay_type": "days_after",
"nb_days": 30,
"days_next_month": 15,
}
response = requests.post(url, headers=headers, json=payload)
data = response.json()
print(data)Example response 201
{
"data": {
"id": 1,
"value": "percent",
"value_amount": "100.0000",
"delay_type": "days_after",
"nb_days": 0,
"days_next_month": "10",
"payment_id": 1,
"creator_id": 1,
"created_at": "2026-10-09T09:50:40.000000Z",
"updated_at": "2026-10-09T09:50:40.000000Z"
},
"message": "Payment due term created successfully."
}Error response — 401
{
"message": "Unauthenticated."
}Show payment due term
GET/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms/{id}Retrieve a specific payment due term by its ID
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
payment_term_id | integer | Yes | The payment term ID |
id | integer | Yes | The payment due term ID |
Query parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
include | string | No | Comma-separated list of relationships to include. Available options: paymentTerm, creator | paymentTerm |
curl -X GET "https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms/{id}?include=paymentTerm" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"const response = await fetch("https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms/{id}?include=paymentTerm", {
method: "GET",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms/{id}?include=paymentTerm', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms/{id}?include=paymentTerm"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers)
data = response.json()
print(data)Example response 200
{
"data": {
"id": 1,
"value": "percent",
"value_amount": "100.0000",
"delay_type": "days_after",
"nb_days": 0,
"days_next_month": "10",
"payment_id": 1,
"creator_id": 1,
"created_at": "2026-10-09T09:50:40.000000Z",
"updated_at": "2026-10-09T09:50:40.000000Z"
}
}Error response — 401
{
"message": "Unauthenticated."
}Update payment due term
PUT/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms/{id}Update an existing payment due term
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
payment_term_id | integer | Yes | The payment term ID |
id | integer | Yes | The payment due term ID |
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
value | string | No | Due term value type. |
value_amount | number | No | Value amount (percentage or fixed amount). Must be at least 0. Must not be greater than 100. |
delay_type | string | No | Delay type. |
nb_days | integer | No | Number of days. Must be at least 0. |
days_next_month | integer | No | Day of next month (1-31). Must be at least 1. Must not be greater than 31. |
curl -X PUT "https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms/{id}" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"value": "percent",
"value_amount": 100,
"delay_type": "days_after",
"nb_days": 30,
"days_next_month": 15
}'const response = await fetch("https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms/{id}", {
method: "PUT",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"value": "percent",
"value_amount": 100,
"delay_type": "days_after",
"nb_days": 30,
"days_next_month": 15
}),
});
const data = await response.json();
console.log(data);<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('PUT', 'https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms/{id}', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'value' => 'percent',
'value_amount' => 100,
'delay_type' => 'days_after',
'nb_days' => 30,
'days_next_month' => 15,
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms/{id}"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
payload = {
"value": "percent",
"value_amount": 100,
"delay_type": "days_after",
"nb_days": 30,
"days_next_month": 15,
}
response = requests.put(url, headers=headers, json=payload)
data = response.json()
print(data)Example response 200
{
"data": {
"id": 1,
"value": "percent",
"value_amount": "100.0000",
"delay_type": "days_after",
"nb_days": 0,
"days_next_month": "10",
"payment_id": 1,
"creator_id": 1,
"created_at": "2026-10-09T09:50:40.000000Z",
"updated_at": "2026-10-09T09:50:40.000000Z"
},
"message": "Payment due term updated successfully."
}Error response — 401
{
"message": "Unauthenticated."
}Delete payment due term
DELETE/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms/{id}Delete a payment due term
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
payment_term_id | integer | Yes | The payment term ID |
id | integer | Yes | The payment due term ID |
curl -X DELETE "https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms/{id}" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"const response = await fetch("https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms/{id}", {
method: "DELETE",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('DELETE', 'https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms/{id}', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/accounts/payment-terms/{payment_term_id}/due-terms/{id}"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
response = requests.delete(url, headers=headers)
data = response.json()
print(data)Example response 200
{
"message": "Payment due term deleted successfully."
}Error response — 401
{
"message": "Unauthenticated."
}