> ## 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.

# Get Payment Term

> Retrieve a specific payment term by ID

## 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
</ParamField>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl 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}`,
    {
      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.get(
      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 request was successful
</ResponseField>

<ResponseField name="data" type="object">
  The payment term object

  <Expandable title="Payment Term Object">
    <ResponseField name="id" type="string">
      Unique identifier (UUID)
    </ResponseField>

    <ResponseField name="name" type="string">
      Payment term name
    </ResponseField>

    <ResponseField name="api_name" type="string">
      API identifier
    </ResponseField>

    <ResponseField name="reference" type="string">
      Internal reference
    </ResponseField>

    <ResponseField name="is_active" type="boolean">
      Active status
    </ResponseField>

    <ResponseField name="id_crm" type="string">
      External CRM ID
    </ResponseField>

    <ResponseField name="id_erp" type="string">
      External ERP ID
    </ResponseField>

    <ResponseField name="id_accounting" type="string">
      External accounting ID
    </ResponseField>

    <ResponseField name="installments" type="array">
      Array of installment objects with id, name, percentage, term, custom\_text, and order\_number
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      ISO 8601 timestamp
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "success": true,
    "data": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Net 30 Days",
      "api_name": "net_30_days",
      "reference": "PT001",
      "is_active": true,
      "id_crm": "crm_123",
      "id_erp": "erp_456",
      "id_accounting": "acc_789",
      "installments": [
        {
          "id": "660e8400-e29b-41d4-a716-446655440001",
          "name": "Full Payment",
          "percentage": 100,
          "term": "net30",
          "custom_text": null,
          "order_number": 1
        }
      ],
      "created_at": "2024-12-21T10:30:00Z",
      "updated_at": "2024-12-21T10:30:00Z"
    }
  }
  ```
</ResponseExample>

## Error Responses

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

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

  ```json Invalid ID Format theme={null}
  {
    "success": false,
    "error": "Invalid payment term ID format"
  }
  ```
</ResponseExample>
