> ## 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 boleto by ID

> Returns one boleto by its ID, with full detail.

<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**

- A boleto of another organization returns `404`, the same as one that does not exist.
- A hybrid boleto (type `HYBRID`) is not shown.

**Planned changes**

- The response gains `settlement` and `baseSituation`. Status codes, parameters and the rest of the body do not change.



## OpenAPI

````yaml /en/openapi/v3-current/payments-pcr.yaml get /v1/boletos/{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/{id}:
    get:
      tags:
        - Boletos
      summary: Get boleto by ID
      description: >-
        Returns one boleto by its ID, with full detail.


        <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**


        - A boleto of another organization returns `404`, the same as one that
        does not exist.

        - A hybrid boleto (type `HYBRID`) is not shown.


        **Planned changes**


        - The response gains `settlement` and `baseSituation`. Status codes,
        parameters and the rest of the body do not change.
      operationId: getBoleto
      parameters:
        - description: >-
            Midaz organization the boleto belongs to. Required: a request
            without it, or with a value that is not a canonical UUID, is refused
            with 400 PBP-0025. A boleto of another organization is answered 404,
            exactly as one that does not exist.
          in: header
          name: X-Organization-Id
          schema:
            description: >-
              Midaz organization the boleto belongs to. Required: a request
              without it, or with a value that is not a canonical UUID, is
              refused with 400 PBP-0025. A boleto of another organization is
              answered 404, exactly as one that does not exist.
            type: string
        - description: Boleto identifier (UUID).
          in: path
          name: id
          required: true
          schema:
            description: Boleto identifier (UUID).
            examples:
              - 123e4567-e89b-12d3-a456-426614174000
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBoletoResponse'
          description: OK. The boleto.
        '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.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`: `id` is not a UUID.

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


            See the [error
            list](/en/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: Boleto not found'
                  value:
                    type: https://errors.lerian.studio/v1/PBP-0005
                    title: Not Found
                    status: 404
                    detail: boleto not found
                    code: PBP-0005
          description: >-
            Not Found.


            - `PBP-0005`: the boleto does not exist, or belongs 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.
        '501':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                PBP-0127:
                  summary: 'PBP-0127: Hybrid boleto'
                  value:
                    type: https://errors.lerian.studio/v1/PBP-0127
                    title: Hybrid Boleto Not Available
                    status: 501
                    detail: >-
                      Hybrid boletos (boleto with Pix) are not available on this
                      service.
                    code: PBP-0127
          description: >-
            Not Implemented.


            - `PBP-0127`: the boleto is a hybrid boleto (boleto with Pix), which
            is not available. The boleto is not shown. Do not retry.
        '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:
    GetBoletoResponse:
      additionalProperties: false
      properties:
        amount:
          type: string
        barcode:
          type: string
        batchId:
          description: >-
            Batch the boleto was created in, as one of its items. Present only
            on a boleto of kind BATCH, absent on every other kind.
          examples:
            - 0192a3b4-c5d6-7e8f-9a0b-1c2d3e4f5a6b
          format: uuid
          type: string
        batchPosition:
          description: >-
            Position of the boleto in its batch, zero-based: the position of its
            item in the batch request. Present only on a boleto of kind BATCH,
            absent on every other kind.
          examples:
            - 3
          format: int64
          maximum: 24
          minimum: 0
          type: integer
        cancelable:
          description: >-
            Whether cancelling this boleto would effect a cancellation at the
            provider. Always present. Derived from the boleto's state, not from
            any request field: true only for a CREATED boleto that carries a
            providerId. An already-canceled boleto reads false even though POST
            /v1/boletos/{id}/cancel answers it 200 as an idempotent replay.
          type: boolean
        canceledAt:
          type: string
        cancellationReason:
          type: string
        createdAt:
          type: string
        digitableLine:
          type: string
        discount:
          $ref: '#/components/schemas/DiscountResponse'
          description: >-
            The first discount band, whether it was sent as discount or first in
            discounts.
        discounts:
          description: >-
            Every discount band of the boleto, in the order they apply, the
            first included. Absent when the boleto grants no discount.
          items:
            $ref: '#/components/schemas/DiscountResponse'
          type:
            - array
            - 'null'
        documentNumber:
          description: >-
            Payee's own reference of the charge (seu numero), as recorded.
            Present only when informed at issuance; an installment of a series
            carries its own, from documentNumbers. Answered as the payee sent
            it, so it can hold quotes, &, =, +, - or @: encode it for the place
            it is written to, such as a spreadsheet cell or a web page.
          type: string
        dueDate:
          type: string
        errorMessage:
          type: string
        excessPayments:
          description: >-
            Payments a SETTLED hybrid boleto received after it was settled, by
            the leg that did not settle it. Hybrid boletos (boleto with Pix) are
            not available on this service and no read or list shows one, so this
            member is absent.
          items:
            $ref: '#/components/schemas/ExcessPaymentResponse'
          maxItems: 10
          type: array
        failedAt:
          type: string
        fine:
          $ref: '#/components/schemas/FineTermsResponse'
        guarantor:
          $ref: '#/components/schemas/GuarantorResponse'
          description: >-
            Final beneficiary (sacador avalista) of the boleto: the holder of
            the issuing account, read from that account's registration data at
            issuance. It is a snapshot: a later change to the registration does
            not change it. Absent on boletos issued before the final beneficiary
            was derived.
        id:
          type: string
        inactivatedAt:
          type: string
        installmentLabel:
          type: string
        instructions:
          type: string
        interest:
          $ref: '#/components/schemas/InterestTermsResponse'
        kind:
          description: >-
            Issuance form of the boleto: SINGLE for a standalone boleto,
            INSTALLMENT for an installment of a series, BATCH for an item of a
            batch, which carries batchId and batchPosition.
          type: string
        ledgerId:
          description: Midaz ledger the boleto was written with. Always present.
          type: string
        midazAccountId:
          description: >-
            Midaz account the boleto was issued for: the midazAccountId it was
            created with. The settlement credit of a settled boleto is posted to
            this account. Always present.
          type: string
        midazOperationId:
          type: string
        organizationId:
          description: >-
            Midaz organization the boleto was written with. Always present, and
            always the organization of the X-Organization-Id header.
          type: string
        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
        paidVia:
          description: >-
            Leg by which the boleto was paid: BOLETO for a payment of its
            barcode or digitable line. Present only on a SETTLED boleto, absent
            on every other status. PIX, a payment of a hybrid boleto's Pix QR
            code, is not served: hybrid boletos (boleto with Pix) are not
            available on this service, and no read or list shows one.
          enum:
            - BOLETO
            - PIX
          type: string
        payer:
          $ref: '#/components/schemas/PayerResponse'
        paymentDeadline:
          description: >-
            Last day the boleto can be paid, YYYY-MM-DD: the one informed at
            issuance or, without it, the due date plus the tenant's setting for
            the provider or, with no setting, the provider's own default, batch
            items included; on LERIAN, the due date plus the agreement's
            paymentDeadlineDays. Absent on boletos issued before the service
            recorded the deadline, when the provider registers no deadline, and
            while LERIAN has not answered the emission.
          examples:
            - '2030-01-31'
          format: date
          type: string
        pendingAmendment:
          $ref: '#/components/schemas/PendingAmendmentResponse'
          description: >-
            The amendment request awaiting the provider's outcome. The terms
            above stay the ones in force until the provider confirms it. Absent
            when there is none: only a CREATED boleto can have one.
        pendingCancellation:
          $ref: '#/components/schemas/PendingCancellationResponse'
          description: >-
            The cancellation attempt awaiting the provider's answer, including
            while a provider that answers at once is being called; the boleto
            stays CREATED until the answer. Absent when there is none.
        pixLocation:
          description: >-
            Location of the dynamic Pix QR code of a hybrid boleto, whose
            payload is qrCode. Hybrid boletos (boleto with Pix) are not
            available on this service, so this member is absent.
          examples:
            - pix.example.com/qr/v2/cobv/5d9a8e91c88c43db942d01a0ad92ffc3
          type: string
        pixTxId:
          description: >-
            Identifier of the due-date Pix charge of a hybrid boleto. Hybrid
            boletos (boleto with Pix) are not available on this service, so this
            member is absent.
          examples:
            - 35dabf21d3b941e8a937409b8749f281
          type: string
        providerId:
          description: >-
            Identifier the payment provider assigned to this boleto. Quote it
            when you contact the provider about this boleto.
          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
        qrCode:
          description: >-
            Pix copy-and-paste code of a hybrid boleto's Pix charge. Hybrid
            boletos (boleto with Pix) are not available on this service, so this
            member is absent.
          type: string
        reversedAt:
          description: >-
            When the boleto became REVERSED: the payment was returned to the
            payer; the boleto will not be paid. RFC 3339 in UTC. Present only on
            a REVERSED boleto, absent on every other status.
          examples:
            - '2026-11-10T17:00:00Z'
          type: string
        seriesId:
          type: string
        settledAmount:
          type: string
        settledAt:
          type: string
        status:
          type: string
        type:
          type: string
        updatedAt:
          type: string
        settlement:
          $ref: '#/components/schemas/BoletoSettlement'
          description: >-
            How the paid amount reaches the beneficiary's account. Present only
            when status is SETTLED, absent on every other status. status does
            not change with it: a paid boleto stays SETTLED at every stage,
            after a reversal or a chargeback included. Boletos settled before
            this member existed read mode DIRECT, state RELEASED and cycle 1.
          x-mint:
            post:
              - Under development
        baseSituation:
          $ref: '#/components/schemas/BaseSituation'
          description: >-
            Situation of the title at the base (CIP/Nuclea), alongside status,
            which keeps today's rules. Present on every boleto that reached the
            base; absent on PENDING and FAILED, which never did. It follows
            status (SETTLED as PAID, CANCELED as CANCELLED, INACTIVATED as
            LAPSED, every other status as OPEN, REVERSED included), with
            exceptions recorded by the collections module: a paid title reopened
            at the base reads OPEN while status stays SETTLED, which is
            terminal; if that reopened title is then canceled or lapses, it
            reads CANCELLED or LAPSED and status still stays SETTLED (and a
            canceled one that reopens again reads OPEN); a canceled title
            reopened at the base reads OPEN and status goes back from CANCELED
            to CREATED, the transition that already exists, so the boleto can be
            paid again. Boletos written before this member existed are filled
            from their status.
          x-mint:
            post:
              - Under development
      required:
        - id
        - organizationId
        - ledgerId
        - midazAccountId
        - type
        - kind
        - status
        - cancelable
        - amount
        - dueDate
        - payer
        - createdAt
        - updatedAt
      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
    DiscountResponse:
      additionalProperties: false
      properties:
        amount:
          type: string
        limitDate:
          type: string
        type:
          type: string
      required:
        - type
        - amount
        - limitDate
      type: object
    ExcessPaymentResponse:
      additionalProperties: false
      properties:
        amount:
          description: Amount received, as a decimal string with two decimal places.
          examples:
            - '10.00'
          type: string
        detectedAt:
          description: When the service recorded this payment as an excess payment.
          format: date-time
          type: string
        paidAt:
          description: >-
            When the payer made this payment, as the payment provider reports
            it. When the provider reports no instant, it is the moment the
            service observed the payment.
          format: date-time
          type: string
        paidVia:
          description: >-
            Leg this payment arrived by: always the leg that did not settle the
            boleto.
          enum:
            - BOLETO
            - PIX
          type: string
        providerReference:
          description: >-
            Reference of this payment at the payment provider: the end-to-end
            identifier of a Pix payment, or the authorization identifier of a
            boleto payment. Absent when the provider sent none.
          type: string
      required:
        - paidVia
        - amount
        - paidAt
        - detectedAt
      type: object
    FineTermsResponse:
      additionalProperties: false
      properties:
        amount:
          type: string
        startDate:
          description: >-
            First day the fine applies, `YYYY-MM-DD`. Present only when sent at
            issuance; absent, it applies from the day after the due date. On an
            installment, the installment's own day, shifted from the first
            installment's.
          type: string
        type:
          type: string
      required:
        - type
        - amount
      type: object
    GuarantorResponse:
      additionalProperties: false
      properties:
        address:
          $ref: '#/components/schemas/AddressResponse'
          description: >-
            Never filled for the final beneficiary: the issuing account's
            registration data carries no address for it. Kept so the shape of
            this component does not change.
        document:
          description: >-
            CPF or CNPJ of the final beneficiary, the issuing account's holder,
            as registered. Answered whole, never masked, wherever this component
            appears.
          type: string
        name:
          description: >-
            Name of the final beneficiary, the issuing account's holder, as
            registered and in full. The printed boleto may abbreviate it; this
            member never does.
          type: string
      required:
        - name
        - document
      type: object
    InterestTermsResponse:
      additionalProperties: false
      properties:
        amount:
          type: string
        startDate:
          description: >-
            First day interest accrues, `YYYY-MM-DD`. Present only when sent at
            issuance; absent, it accrues from the day after the due date. On an
            installment, the installment's own day, shifted from the first
            installment's.
          type: string
        type:
          type: string
      required:
        - type
        - amount
      type: object
    PayerResponse:
      additionalProperties: false
      properties:
        address:
          $ref: '#/components/schemas/AddressResponse'
        document:
          type: string
        name:
          type: string
      required:
        - name
        - document
      type: object
    PendingAmendmentResponse:
      additionalProperties: false
      properties:
        id:
          description: Amendment request identifier.
          format: uuid
          type: string
        requestedAt:
          description: When the request was recorded, in UTC.
          format: date-time
          type: string
        requestedChanges:
          $ref: '#/components/schemas/BoletoAmendmentTerms'
          description: >-
            The members the request changes, with their final values, in
            normalized form: null exempts a fine or interest, or removes the seu
            numero.
      required:
        - id
        - requestedAt
        - requestedChanges
      type: object
    PendingCancellationResponse:
      additionalProperties: false
      properties:
        cancellationId:
          description: >-
            Id of the recorded cancellation attempt; not the key sent to the
            provider.
          format: uuid
          type: string
        requestedAt:
          description: When the attempt was recorded, in UTC.
          format: date-time
          type: string
      required:
        - cancellationId
        - requestedAt
      type: object
    BoletoSettlement:
      type: object
      additionalProperties: false
      required:
        - mode
        - state
        - cycle
      description: >-
        Settlement of a SETTLED boleto. A DIRECT boleto is RELEASED from the
        moment it is settled, with releasedAt equal to settledAt. A HELD boleto
        starts PENDING_RELEASE and moves as the collections module records each
        stage; a stage recorded out of order is ignored. A title reopened at the
        base and paid again starts a new cycle, and the object shows only the
        current one, numbered by cycle. Each date is present only once its stage
        happened in the current cycle, and is never null.
      properties:
        mode:
          $ref: '#/components/schemas/SettlementMode'
        state:
          $ref: '#/components/schemas/SettlementState'
        cycle:
          type: integer
          minimum: 1
          maximum: 32767
          description: >-
            Payment cycle the object describes: 1 at the first payment;
            increased by 1 each time a title reopened at the base is paid again
            and the new settlement opens a new cycle (R-04). Always 1 in DIRECT
            mode. BOLETO_SETTLED, BOLETO_SETTLEMENT_REVERSED and
            BOLETO_SETTLEMENT_CHARGED_BACK are sent at most once per cycle: the
            identity of each of them is (boleto, cycle). Boletos settled before
            this member existed read 1. Fixed on 2026-11-18 (AV-02).
          examples:
            - 1
        releasedAt:
          type: string
          format: date-time
          description: >-
            When the credit became available in the account, RFC 3339 in UTC.
            Present from RELEASED on.
          examples:
            - '2026-11-14T12:00:00Z'
        reversedAt:
          type: string
          format: date-time
          description: >-
            When the held settlement was reversed before release, RFC 3339 in
            UTC. Present only on REVERSED.
          examples:
            - '2026-11-13T15:30:00Z'
        chargedBackAt:
          type: string
          format: date-time
          description: >-
            When the released credit was charged back, RFC 3339 in UTC. Present
            only on CHARGED_BACK.
          examples:
            - '2026-11-20T10:00:00Z'
      examples:
        - mode: HELD
          state: PENDING_RELEASE
          cycle: 1
        - mode: HELD
          state: RELEASED
          cycle: 1
          releasedAt: '2026-11-14T12:00:00Z'
        - mode: DIRECT
          state: RELEASED
          cycle: 1
          releasedAt: '2026-11-12T18:04:11Z'
        - mode: HELD
          state: RELEASED
          cycle: 2
          releasedAt: '2026-11-28T12:00:00Z'
    BaseSituation:
      type: string
      enum:
        - OPEN
        - PAID
        - CANCELLED
        - LAPSED
      description: >-
        Situation of the title at the base: OPEN (payable), PAID, CANCELLED,
        LAPSED (past its payment deadline). Spelled CANCELLED, as the
        collections module spells it, while status spells CANCELED. Treat the
        list as open: a value added later must not break a client.
      examples:
        - OPEN
    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
    AddressResponse:
      additionalProperties: false
      properties:
        city:
          type: string
        complement:
          type: string
        neighborhood:
          type: string
        number:
          type: string
        state:
          type: string
        street:
          type: string
        zipCode:
          type: string
      type: object
    BoletoAmendmentTerms:
      additionalProperties: false
      properties:
        amount:
          description: Amount as a decimal string, without trailing zeros.
          examples:
            - '150.5'
          type: string
        discounts:
          description: >-
            The discount bands, in the order they apply; an empty list is no
            band.
          items:
            $ref: '#/components/schemas/BoletoAmendmentDiscount'
          type: array
        documentNumber:
          description: The payee's reference of the charge (seu numero); null is none.
          examples:
            - INV-0042
          type:
            - string
            - 'null'
        dueDate:
          description: Due date, YYYY-MM-DD.
          examples:
            - '2030-01-20'
          format: date
          type: string
        fine:
          additionalProperties: false
          description: The fine; null is no fine.
          properties:
            amount:
              description: Clause amount as a decimal string.
              examples:
                - '2'
              type: string
            startDate:
              description: Day the clause starts; absent, the day after the due date.
              examples:
                - '2030-01-21'
              format: date
              type: string
            type:
              description: Clause type.
              examples:
                - PERCENTAGE
              type: string
          required:
            - type
            - amount
          type:
            - object
            - 'null'
        interest:
          additionalProperties: false
          description: The interest; null is no interest.
          properties:
            amount:
              description: Clause amount as a decimal string.
              examples:
                - '2'
              type: string
            startDate:
              description: Day the clause starts; absent, the day after the due date.
              examples:
                - '2030-01-21'
              format: date
              type: string
            type:
              description: Clause type.
              examples:
                - PERCENTAGE
              type: string
          required:
            - type
            - amount
          type:
            - object
            - 'null'
        paymentDeadline:
          description: >-
            Last day the boleto can be paid, YYYY-MM-DD; null when none is
            recorded.
          examples:
            - '2030-02-20'
          format: date
          type:
            - string
            - 'null'
      type: object
    SettlementMode:
      type: string
      enum:
        - DIRECT
        - HELD
      description: >-
        DIRECT: the provider credits the beneficiary's account when the boleto
        is paid. HELD: the paid amount is held and credited to the account only
        on release; until then it is not in the account balance. Fixed by the
        boleto's provider. Not to be confused with the HELD lock the collections
        module keeps internally.
      examples:
        - HELD
    SettlementState:
      type: string
      enum:
        - PENDING_RELEASE
        - RELEASED
        - REVERSED
        - CHARGEBACK_PENDING
        - CHARGED_BACK
      description: >-
        Stage of the settlement credit. PENDING_RELEASE: paid and held, not yet
        credited to the account. RELEASED: credited and available in the
        account. REVERSED: the held settlement was undone before release, so
        nothing was credited; this is not the REVERSED status, in which the
        payment was returned to the payer before settlement. CHARGEBACK_PENDING:
        the released credit must be charged back but the charge-back was refused
        (for example, the account lacked funds or was blocked); nothing was
        debited yet. CHARGED_BACK: the released credit was debited back. Order:
        PENDING_RELEASE to RELEASED or REVERSED; RELEASED to CHARGEBACK_PENDING
        or CHARGED_BACK; CHARGEBACK_PENDING to CHARGED_BACK. REVERSED and
        CHARGED_BACK end the payment cycle: if a title reopened at the base is
        paid again, the new payment starts a new cycle at PENDING_RELEASE,
        settlement.cycle increases by 1 and the dates of the previous cycle are
        cleared. The object always shows the current cycle. Treat the list as
        open: a value added later must not break a client.
      examples:
        - PENDING_RELEASE
    BoletoAmendmentDiscount:
      additionalProperties: false
      properties:
        amount:
          description: Discount amount as a decimal string.
          examples:
            - '5'
          type: string
        limitDate:
          description: Last day the discount applies, YYYY-MM-DD.
          examples:
            - '2030-01-10'
          format: date
          type: string
        type:
          description: Discount type.
          examples:
            - FIXED
          type: string
      required:
        - type
        - amount
        - limitDate
      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.