Skip to main content
POST
https://app.qwoty.io
/
api
/
payment-terms
Create Payment Term
curl --request POST \
  --url https://app.qwoty.io/api/payment-terms \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "api_name": "<string>",
  "reference": "<string>",
  "is_active": true,
  "id_crm": "<string>",
  "id_erp": "<string>",
  "id_accounting": "<string>",
  "installments": [
    {
      "name": "<string>",
      "percentage": 123,
      "term": {},
      "custom_text": "<string>",
      "order_number": 123
    }
  ]
}
'
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Net 30 Days",
    "api_name": "net_30_days",
    "reference": "PT001",
    "is_active": true,
    "installments": [
      {
        "id": "660e8400-e29b-41d4-a716-446655440001",
        "name": "Full Payment",
        "percentage": 100,
        "term": "net30",
        "order_number": 1
      }
    ],
    "created_at": "2024-12-21T10:30:00Z"
  }
}

Request Body

name
string
required
Name of the payment term (max 50 characters)
api_name
string
required
Unique API identifier (slug format, e.g., net_30_days)
reference
string
Internal reference code (max 50 characters)
is_active
boolean
default:"true"
Whether the payment term is active
id_crm
string
External CRM identifier
id_erp
string
External ERP identifier
id_accounting
string
External accounting system identifier
installments
array
Array of payment installments. Total percentage must equal 100%.
The sum of all installment percentages must equal exactly 100%.

Examples

curl -X POST https://app.qwoty.io/api/payment-terms \
  -H "Authorization: Bearer qwoty_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Net 30 Days",
    "api_name": "net_30_days",
    "reference": "PT001",
    "is_active": true,
    "installments": [
      {
        "name": "Full Payment",
        "percentage": 100,
        "term": "net30",
        "order_number": 1
      }
    ]
  }'

Response

success
boolean
Indicates if the request was successful
data
object
The created payment term object
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Net 30 Days",
    "api_name": "net_30_days",
    "reference": "PT001",
    "is_active": true,
    "installments": [
      {
        "id": "660e8400-e29b-41d4-a716-446655440001",
        "name": "Full Payment",
        "percentage": 100,
        "term": "net30",
        "order_number": 1
      }
    ],
    "created_at": "2024-12-21T10:30:00Z"
  }
}

Error Responses

{
  "success": false,
  "error": "Installment percentages must sum to 100%"
}