> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qwoty.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Payment Term

> Delete a payment term

## Authorization

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication. Format: `Bearer qwoty_your_token`
</ParamField>

## Path Parameters

<ParamField path="id" type="string" required>
  UUID of the payment term to delete
</ParamField>

<Info>
  You cannot delete a payment term that is currently in use by active quotes or
  contracts.
</Info>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE https://qwoty.app/api/payment-terms/550e8400-e29b-41d4-a716-446655440000 \
    -H "Authorization: Bearer qwoty_your_token"
  ```

  ```javascript JavaScript theme={null}
  const paymentTermId = '550e8400-e29b-41d4-a716-446655440000'

  const response = await fetch(
    `https://qwoty.app/api/payment-terms/${paymentTermId}`,
    {
      method: 'DELETE',
      headers: {
        Authorization: 'Bearer qwoty_your_token',
      },
    },
  )

  const data = await response.json()
  ```

  ```python Python theme={null}
  import requests

  payment_term_id = '550e8400-e29b-41d4-a716-446655440000'

  response = requests.delete(
      f'https://qwoty.app/api/payment-terms/{payment_term_id}',
      headers={
          'Authorization': 'Bearer qwoty_your_token'
      }
  )

  data = response.json()
  ```
</CodeGroup>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the deletion was successful
</ResponseField>

<ResponseField name="message" type="string">
  Confirmation message
</ResponseField>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "success": true,
    "message": "Payment term deleted successfully"
  }
  ```
</ResponseExample>

## Error Responses

<ResponseExample>
  ```json Not Found theme={null}
  {
    "success": false,
    "error": "Payment term not found"
  }
  ```

  ```json In Use theme={null}
  {
    "success": false,
    "error": "Cannot delete payment term: currently in use by 3 active quotes"
  }
  ```

  ```json Unauthorized theme={null}
  {
    "success": false,
    "error": "Invalid API token"
  }
  ```

  ```json Already Deleted theme={null}
  {
    "success": false,
    "error": "Payment term has already been deleted"
  }
  ```
</ResponseExample>

## Alternative: Deactivate Instead

If you want to stop using a payment term but preserve it for historical records, consider deactivating it instead:

```bash theme={null}
curl -X PUT 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
  }'
```

<Tip>
  Deactivating a payment term prevents it from being used in new quotes while
  preserving all historical data.
</Tip>
