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

# Get payment terms

## Field support per integration

<AccordionGroup>
  <Accordion title="DATEV Rechnungswesen" icon="https://mintcdn.com/maesn/NQwZPkomn6wLid0x/logo/datev.svg?fit=max&auto=format&n=NQwZPkomn6wLid0x&q=85&s=5589154dcfa064e1d967a067e488896a" width="24" height="24" data-path="logo/datev.svg">
    <Note>
      This endpoint is only available when using the `datev-rewe-export` target system for DATEV Rechnungswesen. For more details, refer to the [Data Retrieval section](/integrations/datev-rechnungswesen#data-retrieval).
    </Note>

    <Note>
      The query parameter `fiscalYearStartDate` is required and must be a valid date.
    </Note>

    <Note>
      If you're not using the [Interactive Authentication Flow](/authentication#interactive-authentication-flow), make sure the query parameter `companyId` is correctly populated.
    </Note>

    Supported filters:
    `none`

    Support pagination: `true`

    Support rawData: `true`

    <br />

    Supported Response Fields:

    <ResponseField name="id" type="string" />

    <ResponseField name="description" type="string" />

    <ResponseField name="discountDays" type="number">
      Number of days to pay within to receive the `discountPercentage`. Used when `dueType` is `DUE_IN_DAYS`.
    </ResponseField>

    <ResponseField name="discountDays2" type="number">
      Number of days to pay within to receive the `discountPercentage2`. Used when `dueType` is `DUE_IN_DAYS`.
    </ResponseField>

    <ResponseField name="discountPercentage" type="number" />

    <ResponseField name="discountPercentage2" type="number" />

    <ResponseField name="discountPeriods" type="DiscountPeriod[]">
      Array of discount periods. Used when `dueType` is `DUE_AS_PERIOD`.

      <Expandable title="properties">
        <ResponseField name="invoiceRange" type="string">
          Range of days up to a target day of the month within which an invoice can be issued in order for the corresponding discount and payment deadlines to apply.
        </ResponseField>

        <ResponseField name="discountDeadline" type="string">
          The date by which payment must be made to receive the `discountPercentage`.
        </ResponseField>

        <ResponseField name="discountDeadline2" type="string">
          The date by which payment must be made to receive the `discountPercentage2`.
        </ResponseField>

        <ResponseField name="paymentDeadline" type="string" />
      </Expandable>
    </ResponseField>

    <ResponseField name="dueType" type="enum">
      Available options:
      `DUE_IN_DAYS`, `DUE_AS_PERIOD`
    </ResponseField>

    <ResponseField name="paymentDays" type="number" />
  </Accordion>

  <Accordion title="Exact Online" icon="https://mintcdn.com/maesn/gCd41Ws3USFubam4/logo/exact.svg?fit=max&auto=format&n=gCd41Ws3USFubam4&q=85&s=afa1af7a261b22f843ac73ee60896ede" width="24" height="24" data-path="logo/exact.svg">
    <Note>
      If you're not using the [Interactive Authentication Flow](/authentication#interactive-authentication-flow), make sure the query parameter `companyId` is correctly populated.
      You can obtain this value by using the `GET Companies` endpoint available under the Authentication section.
    </Note>

    Supported filters:

    * `lastModifiedAt`

    Support pagination: `true`

    Support rawData: `true`

    <br />

    Supported Response Fields:

    <ResponseField name="id" type="string" />

    <ResponseField name="code" type="string" />

    <ResponseField name="createdDate" type="string" />

    <ResponseField name="description" type="string" />

    <ResponseField name="discountDays" type="number" />

    <ResponseField name="discountPercentage" type="number" />

    <ResponseField name="dueType" type="enum">
      Available options:
      `DUE_IN_DAYS`
    </ResponseField>

    <ResponseField name="paymentDays" type="number" />

    <ResponseField name="paymentMethod" type="enum">
      Available options:
      `CASH`, `BANK_TRANSFER`, `PAYMENT_SERVICE_PROVIDER`, `AUTOMATIC_BANK_WITHDRAWAL`
    </ResponseField>

    <ResponseField name="updatedDate" type="string" />
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml get /accounting/paymentTerms
openapi: 3.0.0
info:
  title: Maesn unified API
  description: The Maesn unified API description
  version: '1.0'
  contact: {}
servers:
  - url: https://api.maesn.dev
security: []
tags:
  - name: maesn
    description: ''
paths:
  /accounting/paymentTerms:
    get:
      tags:
        - accounting
      operationId: getPaymentTerms
      parameters:
        - name: page
          required: false
          in: query
          schema:
            type: number
        - name: limit
          required: false
          in: query
          schema:
            enum:
              - 5
              - 10
              - 20
              - 50
              - 100
            type: number
        - name: companyId
          required: false
          in: query
          schema:
            type: string
        - name: environmentName
          in: query
          schema:
            type: string
          required: false
        - name: fiscalYearStartDate
          required: false
          in: query
          schema:
            type: string
        - name: lastModifiedAt
          required: false
          in: query
          schema:
            type: number
        - name: rawData
          required: false
          in: query
          schema:
            type: boolean
        - name: X-API-KEY
          description: API key
          in: header
          schema:
            type: string
            example: example value
          required: true
        - name: X-ACCOUNT-KEY
          description: Account key
          in: header
          schema:
            type: string
            example: example value
          required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/PaymentTermResponseDto'
components:
  schemas:
    BaseResponseDto:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/MetaResponse'
        data:
          oneOf:
            - type: object
            - type: array
    PaymentTermResponseDto:
      type: object
      properties:
        id:
          type: string
          example: 08d52c49-b90c-4328-b1ec-623df74f904a
        code:
          type: string
          example: '1'
        createdDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        description:
          type: string
          example: 31 dagen
        discountDays:
          type: number
          example: 10
        discountDays2:
          type: number
          example: 14
        discountPercentage:
          type: number
          example: 5
        discountPercentage2:
          type: number
          example: 3
        discountPeriods:
          type: array
          items:
            $ref: '#/components/schemas/DiscountPeriod'
        dueType:
          type: string
          enum:
            - DUE_IN_DAYS
            - DUE_AS_PERIOD
        name:
          type: string
          example: 31 DAYS
        paymentDays:
          type: number
          example: 31
        paymentMethod:
          type: string
          enum:
            - CASH
            - BANK_TRANSFER
            - PAYMENT_SERVICE_PROVIDER
            - AUTOMATIC_BANK_WITHDRAWAL
          example: BANK_TRANSFER
        updatedDate:
          type: string
          example: '2021-01-01T00:00:00Z'
    MetaResponse:
      type: object
      properties:
        warnings:
          type: array
          items:
            type: string
            example: Field not used by target system
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
    DiscountPeriod:
      type: object
      properties:
        invoiceRange:
          type: string
          example: Invoice issuance range up to day 5 of the month
        discountDeadline:
          type: string
          example: Day 15 of the current month
        discountDeadline2:
          type: string
          example: Day 25 of the current month
        paymentDeadline:
          type: string
          example: Day 30 of the current month
    PaginationResponse:
      type: object
      properties:
        total:
          type: number
          example: 125
        perPage:
          type: number
          example: 50
        currentPage:
          type: number
          example: 1
        totalPages:
          type: number
          example: 3

````