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

# List client payment schedules

> List the client payment schedules, with their invoices, credit notes and due dates.



## OpenAPI

````yaml https://public.leanpay.fr/openapi/leanpay_api_documentation.swagger.yaml get /client-payment-schedules
openapi: 3.1.1
info:
  version: 1.0.0
  title: LeanPay Api documentation
  description: >
    ## Authentication


    Send the API key in the `Authorization` header of every request, as it is,
    without a `Bearer` prefix:


    ```

    Authorization: <API key>

    ```


    A user of the LeanPay app with the required permission creates the key in
    the app. The app shows the key only once, when it creates it: store it.


    ## Errors


    | Status | Cause |

    | --- | --- |

    | `400` | The request is invalid: body, path parameter or query parameter. |

    | `401` | The API key is missing, unknown or inactive. |

    | `404` | The id in the path matches no item, unless the route documents
    another behaviour. |

    | `429` | The rate limit is reached. |

    | `500` | Server error. |


    The body of an error is JSON and holds a human-readable explanation. Use it
    to debug, but do not parse it: rely on the status code.


    **Rate limit.** Each LeanPay account can send 150 requests per minute, all
    its API keys and all routes together. The response to a request with a valid
    API key carries these headers, except a `429`:


    | Header | Value |

    | --- | --- |

    | `X-RateLimit-Limit` | The number of requests allowed per minute. |

    | `X-RateLimit-Remaining` | The number of requests left in the current
    minute. |

    | `X-RateLimit-Reset` | The number of seconds before the count starts again.
    |


    Above the limit, the API returns `429` with only a `Retry-After` header:
    wait this number of seconds before the next request.


    ## Filtering


    Filter a list with the `s` query parameter: a JSON condition, URL-encoded.


    ```

    ?s={"field":{"$operator":value}}

    ```


    - `{"field": value}` is the same as `{"field": {"$eq": value}}`.

    - An item matches an object of several fields only if it matches all of
    them.

    - Combine conditions with `$and` and `$or`, each followed by an array of
    conditions: `{"$or":[{"name":{"$starts":"A"}},{"externalId":"EXT-1"}]}`.

    - An object that holds a non-empty `$and` takes no other key: put every
    condition inside the `$and` array. A field or an `$or` next to it returns
    `400`.

    - An item must also match a field next to `$or`.

    - `$and` and `$or` cannot be nested: a `$and` or an `$or` inside the array
    of another one returns `400`.

    - An `$or` inside a field (`{"field":{"$or":…}}`) takes one plain operator.
    Several operators, a list or a nested `$or` return `400`: use a top-level
    `$or` instead.


    | Operator | Meaning | Operand |

    | --- | --- | --- |

    | `$eq` | Equal to | A value |

    | `$ne` | Not equal to | A value |

    | `$gt` `$gte` | Greater than, greater than or equal to | A value |

    | `$lt` `$lte` | Less than, less than or equal to | A value |

    | `$between` | Between two values, both included | `[min, max]` |

    | `$cont` | Contains the text | A text |

    | `$starts` | Starts with the text | A text |

    | `$ends` | Ends with the text | A text |

    | `$in` | Equal to one of the values | A list |

    | `$notin` | Equal to none of the values | A list |

    | `$isnull` | Is null | `true` |

    | `$notnull` | Is not null | `true` |


    Add `L` to a text operator to ignore the case: `$contL`, `$startsL`,
    `$endsL`.


    | Field type | Format of the value |

    | --- | --- |

    | Date | `YYYY-MM-DD` or a full ISO 8601 date-time:
    `2026-06-01T00:00:00.000Z`. |

    | UUID | The hyphenated form the API returns: `8-4-4-4-12`. |

    | Boolean | `true` or `false`. |

    | Enumeration | One of the values the route lists. |


    A UUID, boolean or enumeration field accepts only `$eq`, `$ne`, `$in`,
    `$notin`, `$isnull` and `$notnull`, alone or inside a field-level `$or`. On
    these fields, only `$in` and `$notin` accept a list, and never a nested
    list.


    Each list route gives the fields it filters on and their operators. A field
    outside this list returns `400`. On a UUID, boolean or enumeration field, an
    operator or a value outside these lists also returns `400`. On the other
    fields, use only the operators the route gives.


    ## Pagination


    A list route returns one page of items.


    | Parameter | Default | Values |

    | --- | --- | --- |

    | `page` | `1` | The number of the page, from `1`. |

    | `limit` | `200` | The number of items per page, from `1` to `200`. |


    The response wraps the page in an envelope:


    ```

    { "data": [ … ], "count": 200, "total": 412, "page": 1, "pageCount": 3 }

    ```


    | Property | Value |

    | --- | --- |

    | `data` | The items of the page. |

    | `count` | The number of items in `data`. |

    | `total` | The number of items that match the filter, on all pages. |

    | `page` | The number of the page. |

    | `pageCount` | The number of pages. |


    A page after the last one is not an error: `data` is empty and `count` is
    `0`.


    ## Sorting


    Sort a list with `sort=field,ASC` or `sort=field,DESC`. Repeat the parameter
    to sort on several fields, in the order given:
    `?sort=updatedAt,ASC&sort=id,ASC`. Each list route gives the fields it sorts
    on and its default sort. A field outside this list returns `400`.


    Items with the same values on all the sort fields come back in no fixed
    order, and can change pages between two requests: add `sort=id,ASC` as the
    last sort field to keep their order stable. An item created, updated or
    deleted while the pages are read can still move the items of the next pages.


    ## Amounts


    All amounts are integers, in hundredths of the currency unit, whatever the
    currency: `1250` is 12.50 EUR, and `500000` is 5,000 JPY. An amount is in
    the `currency` of its item, except `defaultCurrencyAmount`, which is in the
    default currency of the account.
  contact:
    email: integration@leanpay.fr
servers:
  - url: https://api.leanpay.fr/v1/public
security: []
tags:
  - name: clients
  - name: invoices
  - name: credit-notes
  - name: misc-operations
  - name: contacts
  - name: addresses
  - name: payments
  - name: portal-payments
  - name: paybacks
  - name: links
  - name: comments
  - name: deleted-elements
  - name: reminders
  - name: client-groups
  - name: client-properties
  - name: client-payment-schedules
paths:
  /client-payment-schedules:
    get:
      tags:
        - client-payment-schedules
      summary: List client payment schedules
      description: >-
        List the client payment schedules, with their invoices, credit notes and
        due dates.
      operationId: listClientPaymentSchedules
      parameters:
        - name: s
          in: query
          description: >
            JSON filter, as described in the Filtering section.


            | Field | Type | Operators |

            | --- | --- | --- |

            | `clientId` | uuid | `$eq` `$ne` `$in` `$notin` |

            | `externalId` | string | `$eq` `$in` `$isnull` `$notnull` |

            | `updatedAt` | date-time | `$gt` `$gte` `$lt` `$lte` `$between` |


            - One schedule by its external id: `{"externalId":"NOR-PLAN-0042"}`

            - Updated since October 1: `{"updatedAt":{"$gte":"2026-10-01"}}`

            - Schedules of one client with an `externalId`:
            `{"clientId":"e59d1c19-3382-4aab-90d8-1c4e1d80aaa9","externalId":{"$notnull":true}}`
          required: false
          schema:
            type: string
            examples:
              - '{"externalId":"NOR-PLAN-0042"}'
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/Limit'
        - name: sort
          in: query
          description: >-
            Sort keys: `id` · `createdAt` · `updatedAt`. Default:
            `updatedAt,DESC`.
          required: false
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              pattern: ^(id|createdAt|updatedAt),(ASC|DESC)$
          example:
            - updatedAt,ASC
            - id,ASC
      responses:
        '200':
          description: One page of client payment schedules.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListClientPaymentSchedulesResponse'
              example:
                data:
                  - id: 69d7d4d7-85f0-4611-a0dc-1cd2dc7e0f34
                    externalId: NOR-PLAN-0042
                    clientId: e59d1c19-3382-4aab-90d8-1c4e1d80aaa9
                    name: Acme 2026 plan
                    currency: EUR
                    amount: 300000
                    remainingAmount: 200000
                    invoices:
                      - id: 048079ef-5bd6-4302-a4ff-e779bf420fa4
                        externalId: INV-2026-0187
                        reference: F2026-0187
                    creditNotes:
                      - id: 8467ac72-fd93-41fb-a6f3-ad2c27c7ac11
                        externalId: null
                        reference: AV2026-0012
                    dueDates:
                      - date: '2026-11-15T00:00:00.000Z'
                        amount: 300000
                        remainingAmount: 200000
                        status: due
                    createdAt: '2026-09-15T08:12:44.000Z'
                    updatedAt: '2026-10-15T14:03:10.000Z'
                count: 1
                total: 1
                page: 1
                pageCount: 1
      security:
        - authorization: []
components:
  parameters:
    Page:
      name: page
      in: query
      description: Number of the page, from 1.
      required: false
      schema:
        type: integer
        default: 1
        minimum: 1
    Limit:
      name: limit
      in: query
      description: Number of items per page, from 1 to 200.
      required: false
      schema:
        type: integer
        default: 200
        maximum: 200
        minimum: 1
  schemas:
    ListClientPaymentSchedulesResponse:
      allOf:
        - $ref: '#/components/schemas/Pagination'
        - type: object
          required:
            - data
          properties:
            data:
              description: The client payment schedules of the page.
              type: array
              items:
                $ref: '#/components/schemas/ClientPaymentSchedule'
    Pagination:
      type: object
      properties:
        count:
          description: Number of items in `data`.
          type: integer
        total:
          description: Number of items that match the filter, on all pages.
          type: integer
        page:
          description: Number of the page.
          type: integer
        pageCount:
          description: Number of pages.
          type: integer
      required:
        - count
        - total
        - page
        - pageCount
    ClientPaymentSchedule:
      type: object
      properties:
        id:
          description: Id of the client payment schedule.
          type: string
          format: uuid
        externalId:
          description: >-
            Id of the schedule outside LeanPay, chosen by the integrator. `null`
            for a schedule created in the LeanPay app.
          type:
            - string
            - 'null'
        clientId:
          description: Id of the client.
          type: string
          format: uuid
        name:
          description: Name of the schedule.
          type: string
        currency:
          description: >-
            ISO 4217 code of the currency of the schedule, the currency of its
            documents.
          type: string
        amount:
          description: Total of the due dates.
          type: integer
        remainingAmount:
          description: Amount still to pay on the due dates.
          type: integer
        invoices:
          description: Invoices of the schedule.
          type: array
          items:
            $ref: '#/components/schemas/ClientPaymentScheduleDocument'
        creditNotes:
          description: Credit notes of the schedule.
          type: array
          items:
            $ref: '#/components/schemas/ClientPaymentScheduleDocument'
        dueDates:
          description: Due dates of the schedule, sorted by ascending date.
          type: array
          items:
            $ref: '#/components/schemas/ClientPaymentScheduleDueDate'
        createdAt:
          description: Date the schedule was created.
          type: string
          format: date-time
        updatedAt:
          description: >-
            Date the schedule was last changed, a recalculation of its due dates
            after a payment included.
          type: string
          format: date-time
      required:
        - id
        - externalId
        - clientId
        - name
        - currency
        - amount
        - remainingAmount
        - invoices
        - creditNotes
        - dueDates
        - createdAt
        - updatedAt
    ClientPaymentScheduleDocument:
      type: object
      properties:
        id:
          description: Id of the invoice or credit note.
          type: string
          format: uuid
        externalId:
          description: >-
            Id of the invoice or credit note outside LeanPay. `null` for a
            document without one.
          type:
            - string
            - 'null'
        reference:
          description: Number of the invoice or credit note.
          type: string
      required:
        - id
        - externalId
        - reference
    ClientPaymentScheduleDueDate:
      type: object
      properties:
        date:
          description: Day the due date falls on.
          type: string
          format: date
        amount:
          description: Amount of the due date.
          type: integer
        remainingAmount:
          description: Amount still to pay on the due date.
          type: integer
        status:
          description: Payment status of the due date, computed at read time.
          type: string
          enum:
            - paid
            - due
            - overdue
      required:
        - date
        - amount
        - remainingAmount
        - status
  securitySchemes:
    authorization:
      type: apiKey
      name: Authorization
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.