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

# Get installment series

> Returns an installment series and all its installments, in `installmentNumber` order.

<Info>**Providers:** Lerian (PCR) and BTG.</Info>

<Warning>**Lerian (PCR): under development.** The Lerian provider can change before it is released. BTG is available.</Warning>

**How it works**

- `status` is the emission outcome of the series, derived from its installments on every read.
- `CREATED`: some installment has no emission outcome yet. `COMPLETED`: all have one and none is `FAILED`. `PARTIAL_FAILURE`: some, not all, are `FAILED`. `FAILED`: all are.
- A `FAILED` installment says why in `errorMessage`.
- The outcome is not final. An installment the provider accepted can still end `FAILED`, so `COMPLETED` can become `PARTIAL_FAILURE` or `FAILED`.
- `closed` is true when every installment is `SETTLED`, `CANCELED`, `INACTIVATED`, `REVERSED` or `FAILED`. It can return to false when the provider reverts a cancellation. Wait for `closed` true for the final outcome.
- A series of another organization returns `404`, the same as one that does not exist.



## OpenAPI

````yaml /es/openapi/v3-current/payments-pcr.yaml get /v1/boletos/installments/{series_id}
openapi: 3.1.0
info:
  title: Payments PCR preview
  version: 2026-11-23-preview
  description: >-
    Preview of Payments with boleto collections through Lerian (PCR), CNAB 240,
    electronic payers (DDA), bill payments, and shared administration. This
    reference includes current behavior and planned changes. Read each
    operation's provider information: some operations support BTG only today.
    The preview is under development and can change before release. Confirm
    availability with Lerian before integration.


    The webhooks section describes notices Payments sends to your callback URL.
    Verify the signature and timestamp before processing a notice. Use the
    eventId and X-Webhook-Id described by each notice to detect repeated
    delivery. Do not assume delivery order.
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
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, and retrieving the rendered PDF.
    name: Boletos
  - name: CNAB Agreements
    description: >-
      CNAB agreements: the link between a Lerian-provider collections agreement
      and the CNAB 240 Lerian files of one account, with its remittance and
      return sequence numbers (NSA) and its return cut times. Every operation of
      this section answers 422 PBP-0900 to a tenant without CNAB 240 enabled.
  - name: CNAB Remittances
    description: >-
      CNAB remittances: the CNAB 240 Lerian remittance files of an organization,
      each received whole, validated and stored encrypted, its title lines
      executed afterwards. A file already received is answered with its stored
      receipt; a new one answers 422 PBP-0900 to a tenant without CNAB 240
      enabled.
  - name: CNAB Returns
    description: >-
      CNAB 240 Lerian return files, one per agreement and cut, built from the
      journal of what happened to the titles that entered by remittance, and
      their download. Every operation of this section answers 422 PBP-0900 to a
      tenant without CNAB 240 enabled.
  - description: >-
      Boleto collections agreements and their reconciliation with the
      beneficiary base of the PCR: the consumption of each beneficiary inventory
      the PCR publishes and the divergences it raises, which carry only
      agreement and situation attributes, never a document or a name. Every
      operation of this section answers 422 PBP-0830 to a tenant without
      collections enabled.
    name: Collections Agreements
  - description: >-
      Boleto collections audit trail: every operation and configuration action,
      append-only, with its author, instant, reason, evidence and the module's
      fields before and after it. Every operation of this section answers 422
      PBP-0830 to a tenant without collections enabled.
    name: Collections Audit
  - description: >-
      Boleto collections beneficiaries: the enablement of the tenant's accounts
      for collections, in batches of up to 5,000 accounts, and the progress and
      per-item outcome of the enablement and bulk adoption batches. Every
      operation of this section answers 422 PBP-0830 to a tenant without
      collections enabled.
    name: Collections Beneficiaries
  - name: Collections Credit Entries
    description: >-
      Boleto collections credit entries: what the credit of each write-off moves
      in the ledger, one entry per write-off and phase, the RELEASE to the
      available balance of the title's account and the CHARGEBACK of a write-off
      cancelled after its release, with where each entry stands with the ledger
      and, when it is not posted, why, as a closed code and never the ledger's
      own text. Every operation of this section answers 422 PBP-0830 to a tenant
      without collections enabled.
  - description: >-
      Boleto collections operation queues: each case that waits for an operator
      and already has its state in collections, with its reason, since when it
      waits and the operations that act on it, read over the states collections
      keeps rather than from a list of its own. Each queue counts the items
      whose age reached its age limit, a per-tenant operational parameter. Every
      operation of this section answers 422 PBP-0830 to a tenant without
      collections enabled.
    name: Collections Operation Queues
  - description: >-
      Boleto collections commands to the PCR: each registration, change and
      write-off sent to the PCR of the institution, with the idempotency key it
      keeps across attempts, its attempts, its next attempt and the last answer
      that did not accept it, never the body sent. Every operation of this
      section answers 422 PBP-0830 to a tenant without collections enabled.
    name: Collections PCR Commands
  - description: >-
      Boleto collections notice subscription of the tenant's connection to the
      PCR: its synchronization with the PCR, the rotation of the secret the PCR
      signs the notices with, the deliveries of notices the PCR recorded for it,
      and the redelivery of a notice whose delivery failed. Every operation of
      this section answers 422 PBP-0830 to a tenant without collections enabled.
    name: Collections PCR Connection
  - description: >-
      Boleto collections notices received from the PCR: each event the PCR of
      the institution delivered to collections, stored once per connection and
      event, with where its processing stands and what it was matched with,
      never the body received. Every operation of this section answers 422
      PBP-0830 to a tenant without collections enabled.
    name: Collections PCR Notices
  - description: >-
      Boleto collections pooled accounts: the links of accounts that issue under
      the agreement of a pooled account, whose holder stays the beneficiary
      while the account's holder is the final one. A link registers nothing at
      Núclea. Every operation of this section answers 422 PBP-0830 to a tenant
      without collections enabled.
    name: Collections Pooled Accounts
  - description: >-
      Boleto collections setup: the tenant's business settings, with the default
      agreement template, the automatic enablement and the retention periods,
      and the tenant's connection to the PCR of its institution. Every operation
      of this section answers 422 PBP-0830 to a tenant without collections
      enabled.
    name: Collections Settings
  - description: >-
      Boleto collections titles: each boleto collections issues at the PCR of
      the institution, with its four state axes (registration, situation at the
      base, credit and block), never the data of a payer or of a beneficiary.
      The barcode and the digitable line are answered only while the title is
      REGISTERED. Every operation of this section answers 422 PBP-0830 to a
      tenant without collections enabled.
    name: Collections Titles
  - name: Collections Write-offs
    description: >-
      Boleto collections write-offs: each write-off of a collections title the
      PCR of the institution notified, with its route, its settlement, the state
      of its credit, its hold and its cancellation deadline, never the data of a
      payer. Every operation of this section answers 422 PBP-0830 to a tenant
      without collections enabled.
  - description: >-
      Aggregated counts, amounts and breakdowns over a period, for boletos and
      for payments.
    name: Dashboards
  - name: Electronic payers
    description: >-
      Electronic payer (DDA): adhesion of the institution's customer to
      electronic presentment of boletos, its accounts and aggregates, and the
      outcome of each request. Under development: can change before it is
      released.
  - description: >-
      The notices Payments posts to the tenant's callback URL, one per type
      enabled in enabledEvents, each signed with the configuration's secret.
      Each item describes the body, the delivery headers, when the notice is
      sent and which providers send it. The webhook is the channel of the first
      delivery: delivery will later move to Lerian's Streaming Hub, which will
      then be the only channel, with a change of subscription and a migration
      plan communicated to the client.
    name: Notices
  - description: >-
      Paying bankslips, utility bills and DARF tax slips, and querying those
      payments.
    name: Payments
  - name: Presented boletos
    description: >-
      Boletos of other institutions presented to the electronic payer: list,
      detail, acceptance and authorized third parties. Under development: can
      change before it is released.
paths:
  /v1/boletos/installments/{series_id}:
    get:
      tags:
        - Boletos
      summary: Get installment series
      description: >-
        Returns an installment series and all its installments, in
        `installmentNumber` order.


        <Info>**Providers:** Lerian (PCR) and BTG.</Info>


        <Warning>**Lerian (PCR): under development.** The Lerian provider can
        change before it is released. BTG is available.</Warning>


        **How it works**


        - `status` is the emission outcome of the series, derived from its
        installments on every read.

        - `CREATED`: some installment has no emission outcome yet. `COMPLETED`:
        all have one and none is `FAILED`. `PARTIAL_FAILURE`: some, not all, are
        `FAILED`. `FAILED`: all are.

        - A `FAILED` installment says why in `errorMessage`.

        - The outcome is not final. An installment the provider accepted can
        still end `FAILED`, so `COMPLETED` can become `PARTIAL_FAILURE` or
        `FAILED`.

        - `closed` is true when every installment is `SETTLED`, `CANCELED`,
        `INACTIVATED`, `REVERSED` or `FAILED`. It can return to false when the
        provider reverts a cancellation. Wait for `closed` true for the final
        outcome.

        - A series of another organization returns `404`, the same as one that
        does not exist.
      operationId: getInstallmentSeries
      parameters:
        - description: >-
            Midaz organization the installments were written with. Required: a
            request without it, or with a value that is not a canonical UUID, is
            refused with 400 PBP-0025. A series of another organization is
            answered 404, as a missing one.
          in: header
          name: X-Organization-Id
          schema:
            description: >-
              Midaz organization the installments were written with. Required: a
              request without it, or with a value that is not a canonical UUID,
              is refused with 400 PBP-0025. A series of another organization is
              answered 404, as a missing one.
            type: string
        - description: Installment series identifier (UUID).
          in: path
          name: series_id
          required: true
          schema:
            description: Installment series identifier (UUID).
            examples:
              - 123e4567-e89b-12d3-a456-426614174000
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetInstallmentsResponse'
          description: OK. The series and its installments.
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                PBP-0001:
                  summary: 'PBP-0001: Request does not match the schema'
                  value:
                    type: https://errors.lerian.studio/v1/PBP-0001
                    title: Bad Request
                    status: 400
                    detail: validation failed
                    code: PBP-0001
                    errors:
                      - message: expected string to be RFC 4122 uuid
                        location: path.series_id
                PBP-0025:
                  summary: 'PBP-0025: Organization header missing'
                  value:
                    type: https://errors.lerian.studio/v1/PBP-0025
                    title: Bad Request
                    status: 400
                    detail: X-Organization-Id header is required and must be a UUID
                    code: PBP-0025
          description: >-
            Bad Request.


            - `PBP-0001`: `series_id` is not a UUID.

            - `PBP-0025`: `X-Organization-Id` is missing or is not a UUID.


            See the [error
            list](/es/reference/interfaces/payments-btg/payments-error-list) for
            every code.
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                PBP-0003:
                  summary: 'PBP-0003: Invalid credential'
                  value:
                    type: https://errors.lerian.studio/v1/PBP-0003
                    title: Unauthorized
                    status: 401
                    detail: authentication required
                    code: PBP-0003
          description: >-
            Unauthorized.


            - `PBP-0003`: the credential is missing or invalid, or does not
            identify a tenant. Get a valid bearer token.
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                PBP-0004:
                  summary: 'PBP-0004: No permission'
                  value:
                    type: https://errors.lerian.studio/v1/PBP-0004
                    title: Forbidden
                    status: 403
                    detail: permission denied
                    code: PBP-0004
          description: >-
            Forbidden.


            - `PBP-0004`: the credential does not have permission for this
            operation.
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                PBP-0005:
                  summary: 'PBP-0005: Series not found'
                  value:
                    type: https://errors.lerian.studio/v1/PBP-0005
                    title: Not Found
                    status: 404
                    detail: installment series not found
                    code: PBP-0005
          description: >-
            Not Found.


            - `PBP-0005`: the series does not exist, or its installments belong
            to another organization.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity.
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                PBP-0002:
                  summary: 'PBP-0002: Unexpected failure'
                  value:
                    type: https://errors.lerian.studio/v1/PBP-0002
                    title: Internal Server Error
                    status: 500
                    detail: internal error
                    code: PBP-0002
          description: |-
            Internal Server Error. The `detail` is a fixed text.

            - `PBP-0002`: an unexpected failure. Contact support.
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                PBP-0008:
                  summary: 'PBP-0008: Dependency unavailable'
                  value:
                    type: https://errors.lerian.studio/v1/PBP-0008
                    title: Service Unavailable
                    status: 503
                    detail: internal error
                    code: PBP-0008
          description: >-
            Service Unavailable. Nothing was processed. Retry the request. The
            `detail` is a fixed text.


            - `PBP-0008`: a dependency (authentication or storage) is
            unavailable.
      security:
        - BearerAuth: []
components:
  schemas:
    GetInstallmentsResponse:
      additionalProperties: false
      properties:
        boletos:
          items:
            $ref: '#/components/schemas/InstallmentBoletoResponse'
          type:
            - array
            - 'null'
        closed:
          description: >-
            Whether no installment of the series can still be paid: true when
            every installment is SETTLED, CANCELED, INACTIVATED, REVERSED or
            FAILED. Always present. It can return to false when the provider
            reverts the cancellation of an installment.
          type: boolean
        installmentsCount:
          format: int64
          type: integer
        ledgerId:
          description: Midaz ledger the installments were written with. Always present.
          type: string
        organizationId:
          description: >-
            Midaz organization the installments were written with. Always
            present, and always the organization of the X-Organization-Id
            header.
          type: string
        seriesId:
          type: string
        status:
          description: >-
            Emission outcome of the series, derived from its installments on
            every read. CREATED: some installment has no emission outcome yet.
            COMPLETED: every installment has an outcome and none is FAILED.
            PARTIAL_FAILURE: every installment has an outcome and some, not all,
            are FAILED; those carry errorMessage. FAILED: every installment is
            FAILED. It does not depend on payment, cancellation or write-off,
            and it can move from COMPLETED to PARTIAL_FAILURE or FAILED when the
            provider later refuses an accepted installment: a client waiting for
            the final outcome reads closed.
          enum:
            - CREATED
            - COMPLETED
            - PARTIAL_FAILURE
            - FAILED
          type: string
        totalAmount:
          type: string
      required:
        - seriesId
        - organizationId
        - ledgerId
        - status
        - closed
        - totalAmount
        - installmentsCount
        - boletos
      type: object
    Detail:
      additionalProperties: true
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          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
    InstallmentBoletoResponse:
      additionalProperties: false
      properties:
        amount:
          type: string
        dueDate:
          type: string
        errorMessage:
          type: string
        id:
          type: string
        installmentLabel:
          type: string
        installmentNumber:
          format: int64
          type: integer
        ourNumber:
          description: >-
            Bank-side identification of the boleto (nosso numero), as assigned
            by the provider, with leading zeros, at the width of the provider
            the boleto was issued at. How it becomes known depends on that
            provider: either it is read from the barcode, in the instrument's
            form, and is absent while the provider has not produced a valid
            barcode; or the provider returns it in its answer to the issuance,
            and it is present while the boleto has no barcode or digitable line
            yet. When the payee supplied ourNumber on issuance, this field still
            reports the provider's value and not the value supplied: if the two
            differ, the value here is the one the provider issued, and the
            divergence is recorded by the service. Optional: absent for boletos
            issued before this field existed, and absent while the provider has
            not made it known. Absence means not yet known; the periodic
            reconciliation fills it in once the provider makes it known, with no
            action needed from the client; it is never sent as an empty string.
          examples:
            - 29
          type: string
        ourNumberDigit:
          description: >-
            Check digit of ourNumber, computed by the bank and never accepted in
            a request. Optional: absent whenever the provider the boleto was
            issued at did not return it, in which case ourNumber is presented
            alone, with no trailing hyphen. It is absent in particular when the
            payee supplied ourNumber: a provider returns the digit only for
            numbers it assigned itself, and some providers never return it. When
            present, the canonical presentation is {ourNumber}-{ourNumberDigit}.
          examples:
            - '3'
          type: string
        providerReason:
          description: >-
            Only on a FAILED installment of a series that its provider refused
            from its own refusal catalog: the stable reason of the rule the
            request broke, which tells apart the rules one code covers (for
            example PAYMENT_DEADLINE_BEFORE_DUE with PBP-0832). That
            installment's BOLETO_FAILED carries the code as errorCode and this
            reason as providerReason. Absent on every other boleto, a single
            boleto included: the emission request is answered with its refusal.
          examples:
            - PAYMENT_DEADLINE_BEFORE_DUE
          pattern: ^[A-Z][A-Z0-9_]{0,63}$
          type: string
        status:
          description: >-
            Status of the installment's boleto, the same GET /v1/boletos/{id}
            answers. REVERSED: the payment was returned to the payer; the boleto
            will not be paid.
          enum:
            - PENDING
            - CREATED
            - SETTLED
            - CANCELED
            - INACTIVATED
            - FAILED
            - REVERSED
          type: string
      required:
        - id
        - installmentNumber
        - installmentLabel
        - amount
        - dueDate
        - status
      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: 'Never returned: the service drops the rejected value.'
      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
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

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