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

# List payments

> Lists payments with optional status, type, creation-date and due-date filters, paginated.



## OpenAPI

````yaml /en/openapi/v3-current/payments.yaml get /v1/payments
openapi: 3.1.0
info:
  description: >-
    API for the Lerian Payments interface via BTG. It covers boleto issuance,
    cancellation, installments, and queries; bill payments (bankslip, utilities,
    and DARF), cancellation, and queries; aggregated boleto and payment
    dashboards; provider connection and outbound webhook configuration; and the
    provider webhook receiver for settlement events.


    ERROR BODIES. A failed request arrives in one of three shapes, and which one
    you get depends on where the service catches the failure, not on which
    endpoint you called. The authentication and authorization layer runs ahead
    of everything else and answers plain text with a bare reason and no error
    code. A failure that the request pipeline catches next, before the API layer
    sees it, answers a flat JSON body on application/json; the idempotency check
    is the pipeline rule you meet most often. Everything the API layer catches
    answers an RFC 9457 problem document on application/problem+json. Read the
    media type to tell the two JSON bodies apart. The code member holds the same
    PBP-NNNN value in both, so branch on it, and handle 401 and 403 by status
    because a refusal from the authentication layer carries no code. One
    pipeline refusal is not listed on the operations below: while a first
    request under the same idempotency key is still in flight, a retry is
    answered 409 with code PBP-0007 and the flat body.
  title: Payments — via BTG API
  version: 1.0.0
servers:
  - url: https://payments.sandbox.lerian.net
security: []
tags:
  - description: >-
      Tenant-level setup: connecting the banking provider and configuring where
      status notifications are delivered.
    name: Admin
  - description: >-
      Issuing, querying and cancelling boletos, including installment series and
      the rendered PDF.
    name: Boletos
  - description: >-
      Aggregated counts, amounts and breakdowns over a period, for boletos and
      for payments.
    name: Dashboards
  - description: >-
      Paying bankslips, utility bills and DARF tax slips, and querying or
      cancelling those payments.
    name: Payments
  - description: >-
      The webhook the payment provider posts settlement events to. Authenticated
      with a credential agreed with the provider, not with the platform identity
      used by the rest of this API.
    name: Settlement
paths:
  /v1/payments:
    get:
      tags:
        - Payments
      summary: List payments
      description: >-
        Lists payments with optional status, type, creation-date and due-date
        filters, paginated.
      operationId: listPayments
      parameters:
        - description: >-
            Tenant organization ID. Accepted but ignored: the tenant is
            determined by the credentials you authenticate with, so sending this
            header, or sending a different value in it, changes nothing.
          in: header
          name: X-Organization-Id
          schema:
            description: >-
              Tenant organization ID. Accepted but ignored: the tenant is
              determined by the credentials you authenticate with, so sending
              this header, or sending a different value in it, changes nothing.
            type: string
        - description: Status filter.
          explode: false
          in: query
          name: status
          schema:
            description: Status filter.
            enum:
              - CREATED
              - SCHEDULED
              - PENDING_APPROVAL
              - APPROVED
              - EXECUTED
              - SETTLED
              - REJECTED
              - FAILED
              - CANCELED
            examples:
              - CREATED
            type: string
        - description: Payment type filter.
          explode: false
          in: query
          name: type
          schema:
            description: Payment type filter.
            enum:
              - BANKSLIP
              - UTILITIES
              - DARF
            examples:
              - BANKSLIP
            type: string
        - description: Created-from date, inclusive.
          explode: false
          in: query
          name: from
          schema:
            description: Created-from date, inclusive.
            examples:
              - '2026-01-01'
            format: date
            type: string
        - description: Created-to date, inclusive.
          explode: false
          in: query
          name: to
          schema:
            description: Created-to date, inclusive.
            examples:
              - '2026-12-31'
            format: date
            type: string
        - description: Due-date lower bound, inclusive.
          explode: false
          in: query
          name: dueDateFrom
          schema:
            description: Due-date lower bound, inclusive.
            examples:
              - '2026-02-01'
            format: date
            type: string
        - description: Due-date upper bound, inclusive.
          explode: false
          in: query
          name: dueDateTo
          schema:
            description: Due-date upper bound, inclusive.
            examples:
              - '2026-11-30'
            format: date
            type: string
        - description: Page number, one-based.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: Page number, one-based.
            examples:
              - 1
            format: int64
            minimum: 1
            type: integer
        - description: Items per page.
          explode: false
          in: query
          name: limit
          schema:
            default: 20
            description: Items per page.
            examples:
              - 20
            format: int64
            maximum: 100
            minimum: 1
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPaymentsResponse'
          description: OK
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Bad Request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
            text/plain:
              schema:
                type: string
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineError'
          description: >-
            Authentication failed. Two shapes are possible and a client must
            accept both: the authentication middleware answers `text/plain` with
            a bare reason (for example `Missing Token`) and carries no error
            code, while a refusal raised inside the service answers
            `application/problem+json` with code `PBP-0003`.
        '403':
          content:
            text/plain:
              schema:
                type: string
          description: >-
            The authenticated principal is not permitted to perform this action.
            Answered as `text/plain` by the authorization middleware, with no
            error code.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineError'
          description: Internal Server Error
      security:
        - BearerAuth: []
components:
  schemas:
    ListPaymentsResponse:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/GetPaymentResponse'
          type:
            - array
            - 'null'
        limit:
          format: int64
          type: integer
        page:
          format: int64
          type: integer
        total:
          format: int64
          type: integer
      required:
        - items
        - page
        - limit
        - total
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      type: object
    PipelineError:
      additionalProperties: false
      description: >-
        The flat error body. A failure caught before the API layer sees the
        request answers this shape on the application/json media type, instead
        of the RFC 9457 problem document. Read the media type to tell the two
        apart. The idempotency check is the rule that answers this way most
        often.
      properties:
        code:
          description: >-
            Stable, machine-readable error code, in the form PBP-NNNN. Branch on
            this value. It carries the same meaning as the code member of the
            problem document.
          examples:
            - PBP-0013
          type: string
        details:
          additionalProperties: true
          description: Optional object carrying further facts about this occurrence.
          type:
            - object
            - 'null'
        message:
          description: A human-readable explanation specific to this occurrence.
          examples:
            - >-
              The request body does not match the original request for this
              idempotency key.
          type: string
        title:
          description: Short label for the condition.
          examples:
            - Idempotency Key Conflict
          type: string
      required:
        - code
        - title
        - message
      type: object
    GetPaymentResponse:
      additionalProperties: false
      properties:
        amount:
          type: string
        canceledAt:
          type: string
        cancellationReason:
          type: string
        createdAt:
          type: string
        darf:
          $ref: '#/components/schemas/DARFResponse'
        description:
          type: string
        digitableLine:
          type: string
        dueDate:
          type: string
        errorMessage:
          type: string
        failedAt:
          type: string
        id:
          type: string
        midazOperationId:
          type: string
        payee:
          $ref: '#/components/schemas/PayeeResponse'
        providerId:
          type: string
        rejectedAt:
          type: string
        rejectionReason:
          type: string
        settledAmount:
          type: string
        settledAt:
          type: string
        status:
          type: string
        type:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - type
        - status
        - amount
        - createdAt
        - updatedAt
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
    DARFResponse:
      additionalProperties: false
      properties:
        fineAmount:
          type: string
        interestAmount:
          type: string
        mainAmount:
          type: string
        name:
          type: string
        personType:
          type: string
        referenceDate:
          type: string
        taxId:
          type: string
        treasuryRevenueCode:
          type: string
        type:
          type: string
      required:
        - personType
        - taxId
        - name
        - referenceDate
        - treasuryRevenueCode
        - type
        - mainAmount
        - interestAmount
        - fineAmount
      type: object
    PayeeResponse:
      additionalProperties: false
      properties:
        name:
          type: string
        taxId:
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````