> ## 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 a Transfer

> Use this endpoint to retrieve the current status and details of a transfer, including its type, status history, sender and recipient details, amounts, and timestamps. Only returns transfers belonging to the same organization.



## OpenAPI

````yaml /pt/openapi/v3-current/ted.yaml get /v1/transfers/{transferId}
openapi: 3.0.3
info:
  title: Bank Transfer (TED) Plugin API
  description: >-
    Complete API for Brazilian bank transfers (TED OUT, TED IN, P2P) through the
    Lerian platform, including transfer initiation, processing, status tracking,
    cancellation, and returns.
  version: 3.4.0
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security:
  - BearerAuth: []
  - OAuth2ClientCredentials:
      - api
  - OAuth2Password:
      - api
tags:
  - name: Transfers API
    description: >-
      Endpoints for initiating, processing, tracking, cancelling, and returning
      transfers.
  - name: Webhooks
    description: >-
      Endpoints for registering and managing tenant-scoped webhook subscriptions
      for transfer events.
  - name: Webhook DLQ
    description: Endpoints for inspecting and retrying webhook dead-letter queue messages.
paths:
  /v1/transfers/{transferId}:
    get:
      tags:
        - Transfers API
      summary: Get a Transfer
      description: >-
        Use this endpoint to retrieve the current status and details of a
        transfer, including its type, status history, sender and recipient
        details, amounts, and timestamps. Only returns transfers belonging to
        the same organization.
      operationId: getTransferStatus
      parameters:
        - $ref: '#/components/parameters/XOrganizationId'
        - name: transferId
          in: path
          required: true
          description: The unique identifier of the transfer.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Indicates that the transfer was found and its details are returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transfer'
              examples:
                tedOutCompleted:
                  summary: TED OUT completed
                  value:
                    transferId: 019c96a0-ab10-7cde-f1a2-0e1f2a3b4c5d
                    type: TED_OUT
                    status: COMPLETED
                    organizationId: 019c96a0-0a98-7287-9a31-786e0809c769
                    ledgerId: 019c96a0-0b10-7c2d-8e3f-4a5b6c7d8e9f
                    senderAccountId: 019c96a0-0c0c-7221-8cf3-13313fb60081
                    recipient:
                      ispb: '00000000'
                      branch: '0001'
                      account: '1234567890'
                      accountType: CACC
                      holderName: Maria Santos
                      holderDocument: '98765432100'
                    amount: 1000.5
                    feeAmount: 1.5
                    totalAmount: 1002
                    confirmationNumber: '20260201001'
                    controlNumber: '202602010001'
                    createdAt: '2026-02-01T18:30:00Z'
                    updatedAt: '2026-02-01T18:35:00Z'
                    completedAt: '2026-02-01T18:35:00Z'
                    statusHistory:
                      - status: CREATED
                        timestamp: '2026-02-01T18:30:00Z'
                      - previousStatus: CREATED
                        status: PENDING
                        timestamp: '2026-02-01T18:30:05Z'
                      - previousStatus: PENDING
                        status: PROCESSING
                        timestamp: '2026-02-01T18:30:10Z'
                      - previousStatus: PROCESSING
                        status: COMPLETED
                        timestamp: '2026-02-01T18:35:00Z'
                    reconciliationAttempts: 0
                tedInReceived:
                  summary: TED IN received
                  value:
                    transferId: 019c96a0-ab20-7def-a1b2-1f2a3b4c5d6e
                    type: TED_IN
                    status: COMPLETED
                    organizationId: 019c96a0-0a98-7287-9a31-786e0809c769
                    ledgerId: 019c96a0-0b10-7c2d-8e3f-4a5b6c7d8e9f
                    senderAccountId: 019c96a0-7e5a-7b3c-9d8e-2f1a0b3c4d5e
                    recipient:
                      ispb: '12345678'
                      branch: '0001'
                      account: '9876543210'
                      accountType: CACC
                      holderName: João Silva
                      holderDocument: '12345678901'
                    amount: 500
                    feeAmount: 0
                    totalAmount: 500
                    confirmationNumber: '20260201002'
                    controlNumber: '202602010002'
                    createdAt: '2026-02-01T19:00:00Z'
                    updatedAt: '2026-02-01T19:00:05Z'
                    completedAt: '2026-02-01T19:00:05Z'
                    statusHistory:
                      - status: RECEIVED
                        timestamp: '2026-02-01T19:00:00Z'
                      - previousStatus: RECEIVED
                        status: COMPLETED
                        timestamp: '2026-02-01T19:00:05Z'
                    reconciliationAttempts: 0
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/TransferNotFound'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  parameters:
    XOrganizationId:
      name: X-Organization-Id
      in: header
      required: true
      description: >-
        Midaz organization scope for the request, used for downstream CRM, Fees,
        and Midaz calls. Required on org-scoped transfer routes in every
        deployment mode; a missing or non-UUID value returns 400. This is not
        the tenant identifier — tenantId is derived from the bearer JWT or
        authenticated context, never from this header. Background workers (TED
        IN poller, reconciliation) have no request header and, in single-tenant
        mode, fall back to the deployment's `ORGANIZATION_ID` env.
      schema:
        type: string
        format: uuid
      example: 019c96a0-0a98-7287-9a31-786e0809c769
  schemas:
    Transfer:
      type: object
      required:
        - transferId
        - type
        - status
        - organizationId
        - ledgerId
        - senderAccountId
        - recipient
        - amount
        - feeAmount
        - totalAmount
        - createdAt
        - updatedAt
        - statusHistory
        - reconciliationAttempts
      properties:
        transferId:
          type: string
          format: uuid
          description: The unique identifier of the transfer.
          example: 019c96a0-ab10-7cde-f1a2-0e1f2a3b4c5d
        type:
          $ref: '#/components/schemas/TransferType'
        status:
          $ref: '#/components/schemas/TransferStatus'
        organizationId:
          type: string
          format: uuid
          description: >-
            The Midaz organization that the transfer is filed under. It equals
            the `X-Organization-Id` of the request.
          example: 019c96a0-0a98-7287-9a31-786e0809c769
        ledgerId:
          type: string
          format: uuid
          description: >-
            The Midaz ledger that the transfer is filed under. On a P2P between
            two ledgers, the payer's ledger. Always present. The all-zeroes UUID
            means that the scope is unrepaired. See Repair Transfer Ledger
            Scope.
          example: 019c96a0-0b10-7c2d-8e3f-4a5b6c7d8e9f
        recipientLedgerId:
          type: string
          format: uuid
          description: >-
            The recipient's Midaz ledger on a P2P between two ledgers of one
            organization. Absent on a P2P inside one ledger and on every TED.
          example: 0190a0e2-7b1c-7d3e-9f40-5a6b7c8d9e03
        ledgerGroupId:
          type: string
          format: uuid
          description: >-
            The Midaz ledger group that a P2P between two ledgers posted as.
            Absent before the posting, when the expiry recovery completed the
            transfer, and on a P2P return.
          example: 0190a0e2-7b1c-7d3e-9f40-5a6b7c8d9e10
        originalTransferId:
          type: string
          format: uuid
          nullable: true
          description: >-
            On a return, the transfer that it returns. A `TED_IN` devolution
            refund names the TED OUT that it compensates, a `TED_OUT` voluntary
            return names the TED IN that it sends back, and a `P2P` return names
            the P2P that it reverses. On a TED IN return and a P2P return,
            `recipient` carries only the ISPB. Read the counterparty from the
            original transfer.
          example: 019c96a0-ab10-7cde-f1a2-0e1f2a3b4c5d
        devolutionCode:
          type: string
          nullable: true
          description: >-
            BACEN devolution reason code, present only when the transfer is a
            devolution.
          example: '18'
        feeContext:
          type: string
          description: >-
            The fee label that the initiation carried. Absent when it carried
            none.
          example: ted_salario
        senderAccountId:
          type: string
          format: uuid
          description: >-
            UUID of the sender account. Always present. For TED IN, where the
            sender is an external bank with no local account, this is a
            synthetic identifier deterministically derived from the sender's
            document.
          example: 019c96a0-0c0c-7221-8cf3-13313fb60081
        recipientAccountId:
          type: string
          format: uuid
          nullable: true
          description: >-
            UUID of the recipient account, when the recipient is represented as
            a Midaz account.
          example: 019c96a0-ac10-7efa-b1c2-2a3b4c5d6e7f
        recipient:
          $ref: '#/components/schemas/RecipientDetails'
        amount:
          type: number
          format: decimal
          description: The transfer amount without the fee.
          example: 1000.5
        feeAmount:
          type: number
          format: decimal
          description: The fee charged for this transfer.
          example: 1.5
        totalAmount:
          type: number
          format: decimal
          description: >-
            The amount debited from the sender's account: the transfer amount
            plus any fee charged on top. For TED IN, the gross amount received.
          example: 1002
        confirmationNumber:
          type: string
          nullable: true
          maxLength: 20
          description: The human-readable confirmation code, if available.
          example: '20260201001'
        controlNumber:
          type: string
          nullable: true
          maxLength: 20
          description: The JD SPB control number, present for TED OUT and TED IN transfers.
          example: '202602010001'
        midazTransactionId:
          type: string
          format: uuid
          nullable: true
          description: The corresponding Midaz ledger transaction ID.
          example: 019c96a0-ac10-7efa-b1c2-2a3b4c5d6e7f
        description:
          type: string
          nullable: true
          maxLength: 140
          description: The purpose or description of the transfer.
          example: Payment for services
        metadata:
          type: object
          additionalProperties: true
          description: >-
            Metadata that this service records on the transfer, as key-value
            pairs. On a return, it also carries `returnReasonCode` (on a TED IN
            return) and `reversalTransactionId`, the ledger transaction that
            reverses the original, once they are recorded. The metadata that you
            sent on Initiate Transfer is in `clientMetadata`.
        clientMetadata:
          type: object
          additionalProperties: true
          description: >-
            The metadata that you sent on Initiate Transfer, as key-value pairs.
            Absent when the transfer carries none. A TED IN transfer carries
            none.
          example:
            invoiceId: INV-2024-001
        createdAt:
          type: string
          format: date-time
          description: The timestamp when the transfer was created.
          example: '2026-02-01T18:30:00Z'
        updatedAt:
          type: string
          format: date-time
          description: The timestamp of the last status update.
          example: '2026-02-01T18:35:00Z'
        completedAt:
          type: string
          format: date-time
          nullable: true
          description: >-
            The timestamp when the transfer was completed. Null if not yet
            completed.
          example: '2026-02-01T18:35:00Z'
        statusHistory:
          type: array
          description: The history of status transitions for this transfer.
          items:
            $ref: '#/components/schemas/StatusHistoryEntry'
        reconciliationStatus:
          type: string
          enum:
            - AWAITING
            - RESOLVED
            - REVERSING
            - REVERTED
            - EXHAUSTED
            - MANUAL_REVIEW
          description: >-
            The reconciliation state of the transfer, as stored. `EXHAUSTED` has
            the same meaning as `MANUAL_REVIEW`. Absent on a transfer that never
            entered reconciliation.
          example: MANUAL_REVIEW
        reconciliationAttempts:
          type: integer
          description: >-
            The number of settlement queries already sent for this transfer.
            Always present, zero included.
          example: 0
        lastReconciliationAttemptAt:
          type: string
          format: date-time
          description: The time of the most recent settlement query, when one was sent.
          example: '2026-02-01T15:40:00Z'
        reconciliationReasonCode:
          type: string
          description: >-
            Why the transfer entered reconciliation, in the vocabulary of the
            system that decided it. Absent when no reason is recorded.
          example: JD_UNAVAILABLE
        reconciliationReasonClass:
          type: string
          description: >-
            The class of `reconciliationReasonCode`. Absent when no reason is
            recorded.
          example: transient
        settlementRejectionCode:
          type: string
          description: >-
            The rejection code of the clearing house, verbatim, for example
            `AAC90` or `ALN01`. Absent when there is none.
          example: ALN01
    TransferType:
      type: string
      enum:
        - TED_OUT
        - TED_IN
        - TED_IN_STR0005
        - TED_IN_STR0007
        - TED_IN_STR0029
        - TED_IN_STR0034
        - TED_IN_STR0037
        - TED_IN_STR0041
        - TED_IN_STR0051
        - P2P
        - CROSS_CORE
        - CROSS_CORE_IN
      description: >-
        The type of transfer. TED_OUT is an outgoing transfer to an external
        bank via JD SPB; the voluntary return of a TED IN is also a TED_OUT.
        TED_IN is an incoming transfer from an external bank. Each TED_IN_STR
        type is an incoming customer credit received as that STR message, for
        example TED_IN_STR0041 for an INSS payroll loan received as STR0041R2.
        P2P is a peer-to-peer transfer within the same institution (same ISPB).
        CROSS_CORE is a TED to an account that the other core of your
        institution holds, sent through the JD Courier. CROSS_CORE_IN is a
        cross-core credit, or the return of a cross-core TED, received from the
        other core.
      example: TED_OUT
    TransferStatus:
      type: string
      enum:
        - CREATED
        - PENDING
        - PROCESSING
        - COMPLETED
        - REJECTED
        - FAILED
        - CANCELLED
        - RECEIVED
      description: >-
        The current status of the transfer. For TED OUT: CREATED → PENDING →
        PROCESSING → COMPLETED, REJECTED, or FAILED. For P2P: CREATED →
        PROCESSING → COMPLETED or FAILED (PENDING is an SPB-specific state and
        does not apply to P2P). Transfers can be CANCELLED while in CREATED or
        PENDING status. For TED IN: RECEIVED → PROCESSING → COMPLETED or FAILED.
        A COMPLETED TED IN can also transition to FAILED in the event of a
        chargeback.
      example: COMPLETED
    RecipientDetails:
      type: object
      required:
        - ispb
        - account
        - holderDocument
      properties:
        ispb:
          type: string
          pattern: ^[0-9]{8}$
          description: The 8-digit ISPB code identifying the recipient's bank.
          example: '00000000'
        branch:
          type: string
          pattern: ^[0-9]{4}$
          description: The 4-digit branch code (agência).
          example: '0001'
        account:
          type: string
          pattern: ^[0-9]{1,20}$
          description: The account number, from 1 to 20 digits.
          example: '1234567890'
        accountType:
          $ref: '#/components/schemas/AccountType'
        holderName:
          type: string
          minLength: 1
          maxLength: 200
          description: The full name of the account holder.
          example: Maria Santos
        holderDocument:
          type: string
          pattern: ^[0-9]{11}$|^[0-9]{14}$
          description: >-
            The holder's document number. CPF (11 digits) for individuals or
            CNPJ (14 digits) for companies.
          example: '12345678901'
    StatusHistoryEntry:
      type: object
      required:
        - status
        - timestamp
      properties:
        previousStatus:
          allOf:
            - $ref: '#/components/schemas/TransferStatus'
          description: >-
            The status that the transfer left on this transition. Absent on the
            first transition.
        status:
          $ref: '#/components/schemas/TransferStatus'
        timestamp:
          type: string
          format: date-time
          example: '2026-02-01T18:30:00Z'
        reason:
          type: string
          nullable: true
          maxLength: 500
          description: The reason for the status change, if applicable.
          example: JD timeout after 3 retries
    ProblemDocument:
      type: object
      description: >-
        The RFC 9457 problem document that the service answers every error with,
        on `application/problem+json`. Route-specific members (for example
        `refusalCode`, `transactionId`, `ledgerStatus`, `systemplaneKey`) appear
        flat at the top level beside these.
      additionalProperties: true
      required:
        - type
        - title
        - status
        - detail
        - code
        - requestId
        - service
        - category
      properties:
        type:
          type: string
          description: >-
            A URI that names the error code:
            `https://errors.lerian.studio/v1/<code>`.
          example: https://errors.lerian.studio/v1/BTF-0200
        title:
          type: string
          description: The HTTP status text.
          example: Not Found
        status:
          type: integer
          description: The HTTP status code.
          example: 404
        detail:
          type: string
          description: A human-readable explanation of this occurrence.
          example: transfer not found
        instance:
          type: string
          description: The trace ID of this request, when one was recorded.
          example: 4bf92f3577b34da6a3ce929d0e0e4736
        errors:
          type: array
          description: Each rejected field. Present on field validation errors only.
          items:
            type: object
            properties:
              message:
                type: string
                description: Why the value was rejected.
                example: transferId must be a valid UUID
              location:
                type: string
                description: 'Where the value sits: `body.<field>` or `query.<field>`.'
                example: body.senderAccountId
        code:
          type: string
          description: The stable BTF error code.
          example: BTF-0200
        upstream:
          type: object
          description: >-
            The error that an upstream provider (JD SPB, Midaz) reported. Absent
            unless surfaced.
          properties:
            code:
              type: string
              description: The provider's own error code, verbatim.
              example: AAC90
            message:
              type: string
              description: The provider's own error message, bounded.
              example: Assinatura invalida
        requestId:
          type: string
          description: The request correlation ID. Present even when empty.
          example: 6d3e2a68-1f2b-4c3d-9e4f-5a6b7c8d9e0f
        service:
          type: string
          description: The system that produced the error.
          example: plugin
        category:
          type: string
          description: The machine-readable error category.
          example: deterministic
    AccountType:
      type: string
      description: >-
        The account type following ISO 20022 codes. Known values include: CACC
        is a current account (Conta Corrente), SLRY is a salary account (Conta
        Salário), SVGS is a savings account (Conta Poupança), TRAN is a
        transactional account (Conta de Pagamento), and OTHR is any other
        account type.
      example: CACC
  responses:
    BadRequest:
      description: Indicates that the request contains invalid input.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDocument'
          examples:
            invalidInput:
              summary: Validation error
              value:
                type: https://errors.lerian.studio/v1/BTF-0001
                title: Bad Request
                status: 400
                detail: invalid request body
                code: BTF-0001
                category: deterministic
                requestId: 6d3e2a68-1f2b-4c3d-9e4f-5a6b7c8d9e0f
                service: plugin
    Unauthorized:
      description: Indicates that the request is missing a valid authentication token.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDocument'
          examples:
            unauthorized:
              summary: Missing authorization
              value:
                type: https://errors.lerian.studio/v1/BTF-0401
                title: Unauthorized
                status: 401
                detail: Missing Token
                code: BTF-0401
                category: plugin
                requestId: 6d3e2a68-1f2b-4c3d-9e4f-5a6b7c8d9e0f
                service: plugin
    Forbidden:
      description: >-
        Indicates that the caller is authenticated but lacks permission for this
        operation.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDocument'
          examples:
            permissionDenied:
              summary: Caller lacks permission
              value:
                type: https://errors.lerian.studio/v1/BTF-0405
                title: Forbidden
                status: 403
                detail: >-
                  the credential is not allowed to perform transfers:create on
                  this request
                code: BTF-0405
                category: plugin
                requestId: 6d3e2a68-1f2b-4c3d-9e4f-5a6b7c8d9e0f
                service: plugin
    TransferNotFound:
      description: >-
        BTF-0200: the transfer was not found or belongs to a different
        organization.


        BTF-0404: `X-Organization-Id` names an organization that this tenant
        does not operate.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDocument'
          examples:
            transferNotFound:
              summary: Transfer ID invalid
              value:
                type: https://errors.lerian.studio/v1/BTF-0200
                title: Not Found
                status: 404
                detail: transfer not found
                code: BTF-0200
                category: deterministic
                requestId: 6d3e2a68-1f2b-4c3d-9e4f-5a6b7c8d9e0f
                service: plugin
                transferId: 019c96a0-ab10-7cde-f1a2-0e1f2a3b4c5d
    RateLimitExceeded:
      description: >-
        Indicates that the rate limit has been exceeded. Retry after the number
        of seconds specified in the Retry-After header.
      headers:
        Retry-After:
          description: Seconds until rate limit resets
          schema:
            type: integer
            example: 60
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDocument'
          examples:
            rateLimitExceeded:
              summary: Too many requests
              value:
                type: https://errors.lerian.studio/v1/BTF-0429
                title: Too Many Requests
                status: 429
                detail: Rate limit exceeded
                code: BTF-0429
                category: rate_limit
                requestId: 6d3e2a68-1f2b-4c3d-9e4f-5a6b7c8d9e0f
                service: plugin
              description: >
                Rate-limit responses use the dedicated `BTF-0429` code with the
                `rate_limit` category. Clients should back off using the HTTP
                status `429` and the `Retry-After` header.
    InternalServerError:
      description: Indicates that an unexpected internal error occurred.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDocument'
          examples:
            internalError:
              summary: Internal error
              value:
                type: https://errors.lerian.studio/v1/BTF-9000
                title: Internal Server Error
                status: 500
                detail: Internal server error
                code: BTF-9000
                category: plugin
                requestId: 6d3e2a68-1f2b-4c3d-9e4f-5a6b7c8d9e0f
                service: plugin
    ServiceUnavailable:
      description: >-
        Indicates that a dependency of this service is unavailable or is not
        configured in this deployment.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDocument'
          examples:
            repositoryUnavailable:
              summary: Repository unavailable
              value:
                type: https://errors.lerian.studio/v1/BTF-9008
                title: Service Unavailable
                status: 503
                detail: transfer repository unavailable
                code: BTF-9008
                category: transient
                requestId: 6d3e2a68-1f2b-4c3d-9e4f-5a6b7c8d9e0f
                service: plugin
            dlqInspectorUnavailable:
              summary: DLQ inspector not configured
              value:
                type: https://errors.lerian.studio/v1/BTF-9005
                title: Service Unavailable
                status: 503
                detail: DLQ inspector is not configured
                code: BTF-9005
                category: deterministic
                requestId: 6d3e2a68-1f2b-4c3d-9e4f-5a6b7c8d9e0f
                service: plugin
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Bearer token authentication. The tenantId is derived from the bearer
        token or authenticated request context and is not supplied through
        X-Organization-Id.
    OAuth2ClientCredentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /v1/login/oauth/access_token
          scopes:
            api: TED transfer API access
    OAuth2Password:
      type: oauth2
      flows:
        password:
          tokenUrl: /v1/login/oauth/access_token
          scopes:
            api: TED transfer API access

````

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