> ## 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 immediate collections or retrieve one by txId

> Returns a page-based list envelope of immediate collections. When a `txId` query parameter is supplied the endpoint switches to a by-txId lookup and returns a single bare collection entity instead — the two 200 shapes are documented as a oneOf.



## OpenAPI

````yaml en/openapi/v3-current/pix-lerian-cob.yaml GET /collections/immediate
openapi: 3.1.0
info:
  contact:
    name: Lerian Studio
    url: https://lerian.studio
  description: Public API for Pix BR Codes and immediate and due-date collections.
  license:
    name: Elastic License 2.0
    url: https://www.elastic.co/licensing/elastic-license
  title: Pix Lerian — Collections
  version: release-candidate
servers:
  - url: https://api.example.com/cob-hub/v1
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security:
  - BearerAuth: []
tags:
  - description: Create, retrieve, list, and decode static Pix BR Codes.
    name: BR Codes
  - description: Create, retrieve, list, and cancel immediate Pix collections.
    name: Immediate Collections
  - description: Create, retrieve, list, and cancel due-date Pix collections.
    name: Due-Date Collections
paths:
  /collections/immediate:
    get:
      tags:
        - Immediate Collections
      summary: List immediate collections or retrieve one by txId
      description: >-
        Returns a page-based list envelope of immediate collections. When a
        `txId` query parameter is supplied the endpoint switches to a by-txId
        lookup and returns a single bare collection entity instead — the two 200
        shapes are documented as a oneOf.
      operationId: listImmediateCollections
      parameters:
        - description: UUID of the account associated with the operation.
          in: header
          name: X-Account-Id
          required: true
          schema:
            description: UUID of the account associated with the operation.
            examples:
              - 019606a1-3b4c-7d8e-9f01-234567890abc
            type: string
          example: 019606a1-3b4c-7d8e-9f01-234567890abc
        - description: BCB transaction ID — routes to by-txId lookup
          explode: false
          in: query
          name: txId
          schema:
            description: BCB transaction ID — routes to by-txId lookup
            examples:
              - T1234567890123456789012345A
            type: string
          example: T1234567890123456789012345A
        - description: Page number (1-based, default 1)
          explode: false
          in: query
          name: page
          schema:
            description: Page number (1-based, default 1)
            examples:
              - '1'
            type: string
          example: '1'
        - description: Rows per page (default 20, max 100)
          explode: false
          in: query
          name: limit
          schema:
            description: Rows per page (default 20, max 100)
            examples:
              - '20'
            type: string
          example: '20'
        - description: Filter by status
          explode: false
          in: query
          name: status
          schema:
            description: Filter by status
            examples:
              - ACTIVE
            type: string
          example: ACTIVE
        - description: Filter by Pix key value (exact match)
          explode: false
          in: query
          name: keyValue
          schema:
            description: Filter by Pix key value (exact match)
            type: string
          example: keyvalue-example
      responses:
        '200':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ListImmediateCollectionsOutput'
                  - $ref: '#/components/schemas/ImmediateCollectionOutput'
              examples:
                fictitiousExample:
                  summary: Fictitious example
                  value:
                    items:
                      - accountId: 0196a7b2-3e5f-7061-ac12-34567890abcd
                        additionalInfo:
                          - key: orderId
                            value: '12345'
                        amount: '100.50'
                        createdAt: '2026-05-06T10:30:00Z'
                        currency: BRL
                        debtor:
                          document: '39053344705'
                          name: João da Silva
                        description: Pagamento do pedido 12345
                        emvPayload: >-
                          00020101021226500014br.gov.bcb.pix2528pix.example.com/qr/v2/abc1235204000053039865802BR5910Loja
                          Teste6007Goiania62070503***63041206
                        expirationSeconds: 3600
                        expiresAt: '2026-05-06T11:30:00Z'
                        externalId: 0196a7b2-4f60-7172-bd23-4567890abcde
                        id: 0196a7b2-1c3d-7e4f-8a90-1234567890ab
                        keyType: EVP
                        keyValue: 123e4567-e12b-12d1-a456-426655440000
                        locationUrl: https://pix.example.com/qr/v2/abc123
                        merchantCity: Goiania
                        merchantDocument: '39053344705'
                        merchantName: Loja Teste
                        organizationId: 0196a7b2-2d4e-7f50-9b01-234567890abc
                        status: ACTIVE
                        txId: TX1234567890123456789012345
                        type: IMMEDIATE
                        updatedAt: '2026-05-06T10:30:00Z'
                    limit: 20
                    page: 1
                    total: 1
          description: >-
            List envelope in list mode, or a single ImmediateCollectionOutput
            when `txId` is supplied.
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      x-codeSamples:
        - lang: bash
          label: cURL with fictitious data
          source: |-
            curl --request GET \
              --url https://api.example.com/cob-hub/v1/collections/immediate \
              --header 'Authorization: Bearer demo-access-token' \
              --header 'X-Account-Id: 019606a1-3b4c-7d8e-9f01-234567890abc'
components:
  schemas:
    ListImmediateCollectionsOutput:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/ImmediateCollectionOutput'
          type:
            - array
            - 'null'
        limit:
          examples:
            - 20
          format: int64
          type: integer
        page:
          examples:
            - 1
          format: int64
          type: integer
        total:
          examples:
            - 1
          format: int64
          type: integer
      required:
        - items
        - total
        - page
        - limit
      type: object
    ImmediateCollectionOutput:
      additionalProperties: false
      properties:
        accountId:
          examples:
            - 0196a7b2-3e5f-7061-ac12-34567890abcd
          type: string
        additionalInfo:
          items:
            $ref: '#/components/schemas/KVDTO'
          type:
            - array
            - 'null'
        amount:
          examples:
            - '100.50'
          type: string
        cancelledAt:
          examples:
            - '2026-05-06T10:40:00Z'
          format: date-time
          type: string
        cancelledReason:
          examples:
            - Customer requested cancellation
          type: string
        createdAt:
          examples:
            - '2026-05-06T10:30:00Z'
          format: date-time
          type: string
        currency:
          enum:
            - BRL
          examples:
            - BRL
          type: string
        debtor:
          $ref: '#/components/schemas/DebtorDTO'
        description:
          examples:
            - Pagamento do pedido 12345
          type: string
        emvPayload:
          examples:
            - >-
              00020101021226500014br.gov.bcb.pix2528pix.example.com/qr/v2/abc1235204000053039865802BR5910Loja
              Teste6007Goiania62070503***63041206
          type: string
        expirationSeconds:
          examples:
            - 3600
          format: int64
          type: integer
        expiresAt:
          examples:
            - '2026-05-06T11:30:00Z'
          format: date-time
          type: string
        externalId:
          examples:
            - 0196a7b2-4f60-7172-bd23-4567890abcde
          type: string
        id:
          examples:
            - 0196a7b2-1c3d-7e4f-8a90-1234567890ab
          type: string
        keyType:
          enum:
            - CPF
            - CNPJ
            - PHONE
            - EMAIL
            - EVP
          examples:
            - EVP
          type: string
        keyValue:
          examples:
            - 123e4567-e12b-12d1-a456-426655440000
          type: string
        locationUrl:
          examples:
            - https://pix.example.com/qr/v2/abc123
          type: string
        merchantCity:
          examples:
            - Goiania
          type: string
        merchantDocument:
          examples:
            - '39053344705'
          type: string
        merchantName:
          examples:
            - Loja Teste
          type: string
        organizationId:
          examples:
            - 0196a7b2-2d4e-7f50-9b01-234567890abc
          type: string
        payment:
          $ref: '#/components/schemas/PaymentDTO'
        status:
          enum:
            - ACTIVE
            - COMPLETED
            - CANCELLED
          examples:
            - ACTIVE
          type: string
        txId:
          examples:
            - TX1234567890123456789012345
          type: string
        type:
          enum:
            - IMMEDIATE
            - DUE_DATE
          examples:
            - IMMEDIATE
          type: string
        updatedAt:
          examples:
            - '2026-05-06T10:30:00Z'
          format: date-time
          type: string
      required:
        - id
        - organizationId
        - accountId
        - merchantDocument
        - type
        - status
        - txId
        - keyType
        - keyValue
        - merchantName
        - merchantCity
        - amount
        - currency
        - expirationSeconds
        - externalId
        - locationUrl
        - emvPayload
        - expiresAt
        - createdAt
        - updatedAt
      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
    KVDTO:
      additionalProperties: false
      properties:
        key:
          examples:
            - orderId
          type: string
        value:
          examples:
            - '12345'
          type: string
      required:
        - key
        - value
      type: object
    DebtorDTO:
      additionalProperties: false
      properties:
        document:
          examples:
            - '39053344705'
          type: string
        name:
          examples:
            - João da Silva
          type: string
      type: object
    PaymentDTO:
      additionalProperties: false
      properties:
        amount:
          examples:
            - '100.50'
          type: string
        endToEndId:
          examples:
            - E12345678202605061030abcdef12345
          type: string
        paidAt:
          examples:
            - '2026-05-06T10:35:00Z'
          format: date-time
          type: string
        payer:
          $ref: '#/components/schemas/PayerDTO'
      required:
        - endToEndId
        - amount
        - paidAt
      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
    PayerDTO:
      additionalProperties: false
      properties:
        ispb:
          examples:
            - '12345678'
          type: string
        name:
          examples:
            - João da Silva
          type: string
        taxId:
          examples:
            - '39053344705'
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````