Payment 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 terms
GET/admin/api/v1/accounts/payment-termsRetrieve a paginated list of payment terms with filtering and sorting
🔒 Requires a valid Bearer token.
Query parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
include | string | No | Comma-separated list of relationships to include. Available options: company, creator, dueTerms | dueTerms |
filter[id] | string | No | Comma-separated list of IDs to filter by | |
filter[name] | string | No | Filter by payment term name (partial match) | |
filter[company_id] | integer | No | Filter by company ID | |
filter[trashed] | string | No | Filter by trashed status. Options: with, only | |
sort | string | Yes | Sort field | name |
page | integer | Yes | Page number | 1 |
curl -X GET "https://your-domain.com/admin/api/v1/accounts/payment-terms?include=dueTerms&sort=name&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?include=dueTerms&sort=name&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?include=dueTerms&sort=name&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?include=dueTerms&sort=name&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,
"name": "Immediate Payment",
"note": "<p>Payment terms: Immediate Payment</p>",
"company_id": null,
"creator_id": 1,
"created_at": "2026-10-09T09:50:40.000000Z",
"updated_at": "2026-10-09T09:50:40.000000Z",
"deleted_at": null,
"due_terms": [
{
"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,
"name": "Immediate Payment",
"note": "<p>Payment terms: Immediate Payment</p>",
"company_id": null,
"creator_id": 1,
"created_at": "2026-10-09T09:50:40.000000Z",
"updated_at": "2026-10-09T09:50:40.000000Z",
"deleted_at": null,
"due_terms": [
{
"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 term
POST/admin/api/v1/accounts/payment-termsCreate a new payment term
🔒 Requires a valid Bearer token.
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Payment term name. Must not be greater than 255 characters. |
company_id | integer | No | Company ID. Must match an existing stored value. |
note | string | No | Payment term notes. |
curl -X POST "https://your-domain.com/admin/api/v1/accounts/payment-terms" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "30 Days",
"company_id": 1,
"note": "Payment due within 30 days"
}'const response = await fetch("https://your-domain.com/admin/api/v1/accounts/payment-terms", {
method: "POST",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "30 Days",
"company_id": 1,
"note": "Payment due within 30 days"
}),
});
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', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'name' => '30 Days',
'company_id' => 1,
'note' => 'Payment due within 30 days',
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/accounts/payment-terms"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
payload = {
"name": "30 Days",
"company_id": 1,
"note": "Payment due within 30 days",
}
response = requests.post(url, headers=headers, json=payload)
data = response.json()
print(data)Example response 201
{
"data": {
"id": 1,
"name": "Immediate Payment",
"note": "<p>Payment terms: Immediate Payment</p>",
"company_id": null,
"creator_id": 1,
"created_at": "2026-10-09T09:50:40.000000Z",
"updated_at": "2026-10-09T09:50:40.000000Z",
"deleted_at": null
},
"message": "Payment term created successfully."
}Error response — 401
{
"message": "Unauthenticated."
}Show payment term
GET/admin/api/v1/accounts/payment-terms/{id}Retrieve a specific payment term by its ID
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
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: company, creator, dueTerms | company |
curl -X GET "https://your-domain.com/admin/api/v1/accounts/payment-terms/{id}?include=company" \
-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/{id}?include=company", {
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/{id}?include=company', [
'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/{id}?include=company"
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,
"name": "Immediate Payment",
"note": "<p>Payment terms: Immediate Payment</p>",
"company_id": null,
"creator_id": 1,
"created_at": "2026-10-09T09:50:40.000000Z",
"updated_at": "2026-10-09T09:50:40.000000Z",
"deleted_at": null,
"due_terms": [
{
"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 term
PUT/admin/api/v1/accounts/payment-terms/{id}Update an existing payment term
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The payment term ID |
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Payment term name. Must not be greater than 255 characters. |
company_id | integer | No | Company ID. Must match an existing stored value. |
note | string | No | Payment term notes. |
curl -X PUT "https://your-domain.com/admin/api/v1/accounts/payment-terms/{id}" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "30 Days",
"company_id": 1,
"note": "Payment due within 30 days"
}'const response = await fetch("https://your-domain.com/admin/api/v1/accounts/payment-terms/{id}", {
method: "PUT",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "30 Days",
"company_id": 1,
"note": "Payment due within 30 days"
}),
});
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/{id}', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'name' => '30 Days',
'company_id' => 1,
'note' => 'Payment due within 30 days',
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/accounts/payment-terms/{id}"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
payload = {
"name": "30 Days",
"company_id": 1,
"note": "Payment due within 30 days",
}
response = requests.put(url, headers=headers, json=payload)
data = response.json()
print(data)Example response 200
{
"data": {
"id": 1,
"name": "Immediate Payment",
"note": "<p>Payment terms: Immediate Payment</p>",
"company_id": null,
"creator_id": 1,
"created_at": "2026-10-09T09:50:40.000000Z",
"updated_at": "2026-10-09T09:50:40.000000Z",
"deleted_at": null
},
"message": "Payment term updated successfully."
}Error response — 401
{
"message": "Unauthenticated."
}Delete payment term
DELETE/admin/api/v1/accounts/payment-terms/{id}Soft delete a payment term
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The payment term ID |
curl -X DELETE "https://your-domain.com/admin/api/v1/accounts/payment-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/{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/{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/{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 term deleted successfully."
}Error response — 401
{
"message": "Unauthenticated."
}Restore payment term
POST/admin/api/v1/accounts/payment-terms/{id}/restoreRestore a soft-deleted payment term
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The payment term ID |
curl -X POST "https://your-domain.com/admin/api/v1/accounts/payment-terms/{id}/restore" \
-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/{id}/restore", {
method: "POST",
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('POST', 'https://your-domain.com/admin/api/v1/accounts/payment-terms/{id}/restore', [
'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/{id}/restore"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
response = requests.post(url, headers=headers)
data = response.json()
print(data)Example response 200
{
"data": {
"id": 1,
"name": "Immediate Payment",
"note": "<p>Payment terms: Immediate Payment</p>",
"company_id": null,
"creator_id": 1,
"created_at": "2026-10-09T09:50:40.000000Z",
"updated_at": "2026-10-09T09:50:40.000000Z",
"deleted_at": null
},
"message": "Payment term restored successfully."
}Error response — 401
{
"message": "Unauthenticated."
}Force delete payment term
DELETE/admin/api/v1/accounts/payment-terms/{id}/forcePermanently delete a payment term
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The payment term ID |
curl -X DELETE "https://your-domain.com/admin/api/v1/accounts/payment-terms/{id}/force" \
-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/{id}/force", {
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/{id}/force', [
'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/{id}/force"
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 term permanently deleted."
}Error response — 401
{
"message": "Unauthenticated."
}