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

# Unblock a Pix Transfer

> Use this endpoint to unblock a transaction that is stuck in PENDING or PROCESSING status. The endpoint fetches the current status from BTG and triggers the appropriate settlement flow if BTG shows the transaction has completed or failed. The optional request body field allowNotFoundUnblock (default false) gates ONLY the not-found (HTTP 404) branch. The request body is intentionally an opaque raw-bytes payload (no typed schema): unknown fields are ignored, and an empty body is valid.



## OpenAPI

````yaml /pt/openapi/v3-current/indirect-pix.yaml post /v1/transfers/{transfer_id}/unblock
openapi: 3.1.0
info:
  description: >-
    API for Pix Indirect via BTG. It covers DICT keys and claims; MED infraction
    reports, fraud markers, refund requests, and funds recoveries; DICT
    statistics and reconciliation; Pix transfers, refunds, and schedules; static
    QR codes and QR code decoding; immediate and due-date collections; Pix
    Automático for the payer; transaction reports and TemposTransacoes
    statistics; and inbound and outbound webhook records.
  title: Pix BTG API
  version: 1.12.0
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security:
  - BearerAuth: []
paths:
  /v1/transfers/{transfer_id}/unblock:
    post:
      tags:
        - Transfers
      summary: Unblock a Pix Transfer
      description: >-
        Use this endpoint to unblock a transaction that is stuck in PENDING or
        PROCESSING status. The endpoint fetches the current status from BTG and
        triggers the appropriate settlement flow if BTG shows the transaction
        has completed or failed. The optional request body field
        allowNotFoundUnblock (default false) gates ONLY the not-found (HTTP 404)
        branch. The request body is intentionally an opaque raw-bytes payload
        (no typed schema): unknown fields are ignored, and an empty body is
        valid.
      operationId: payment-unblock-transfer
      parameters:
        - description: Transfer ID (UUID format)
          in: path
          name: transfer_id
          required: true
          schema:
            description: Transfer ID (UUID format)
            type: string
        - description: Unique identifier of the Midaz Ledger Account (UUID format)
          in: header
          name: X-Account-Id
          required: true
          schema:
            description: Unique identifier of the Midaz Ledger Account (UUID format)
            type: string
      requestBody:
        content:
          application/octet-stream:
            schema:
              contentMediaType: application/octet-stream
              format: binary
              type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnblockTransferOutput'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Internal Server Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Error
components:
  schemas:
    UnblockTransferOutput:
      additionalProperties: false
      properties:
        btgStatus:
          type: string
        message:
          type: string
        transfer:
          $ref: '#/components/schemas/TransferResponse'
      required:
        - transfer
        - message
        - btgStatus
      type: object
    LegacyErrorBody:
      additionalProperties: false
      properties:
        fields:
          additionalProperties:
            type: string
          type: object
        headers:
          additionalProperties:
            type: string
          type: object
        message:
          type: string
        paths:
          additionalProperties:
            type: string
          type: object
        queryParams:
          additionalProperties:
            type: string
          type: object
        raw:
          type: string
        code:
          type: string
        title:
          type: string
      required:
        - code
        - title
        - message
      type: object
    TransferResponse:
      additionalProperties: false
      properties:
        accountId:
          examples:
            - 01989f9e-6508-79f8-9540-835be49fbd0d
          type: string
        aliasId:
          examples:
            - 01989f9e-6508-79f8-9540-835be49fbd0e
          type: string
        amount:
          examples:
            - '100.50'
          type: string
        createdAt:
          examples:
            - '2024-01-15T10:30:15Z'
          type: string
        deletedAt:
          type: string
        description:
          examples:
            - Pix Cashin Transfer
          type: string
        destination:
          $ref: '#/components/schemas/SourceDestination'
        endToEndId:
          examples:
            - E1234567820240101000001234567890
          type: string
        feeCharge:
          $ref: '#/components/schemas/FeeChargeResponse'
        id:
          examples:
            - 550e8400-e29b-41d4-a716-446655440010
          type: string
        initiatedAt:
          examples:
            - '2024-01-15T10:30:00Z'
          type: string
        initiationType:
          enum:
            - MANUAL
            - KEY
            - QR_CODE
          examples:
            - KEY
          type: string
        ledger:
          $ref: '#/components/schemas/LedgerInfo'
        metadata:
          additionalProperties: {}
          type: object
        paymentType:
          enum:
            - IMMEDIATE
            - SCHEDULED
          examples:
            - IMMEDIATE
          type: string
        purpose:
          enum:
            - TRANSFER
            - INSTANT_PAYMENT_REFUND
            - CHANGE
            - WITHDRAWAL
          examples:
            - TRANSFER
          type: string
        source:
          $ref: '#/components/schemas/SourceDestination'
        status:
          enum:
            - CREATED
            - PENDING
            - PROCESSING
            - COMPLETED
            - FAILED
            - REVERSED
          examples:
            - COMPLETED
          type: string
        type:
          enum:
            - CASHIN
            - CASHOUT
          examples:
            - CASHIN
          type: string
        updatedAt:
          examples:
            - '2024-01-15T10:35:00Z'
          type: string
        urgency:
          enum:
            - HIGH
            - NORMAL
          examples:
            - HIGH
          type: string
        withdrawal:
          $ref: '#/components/schemas/WithdrawalBreakdownResponse'
      required:
        - id
        - amount
        - endToEndId
        - status
        - type
        - paymentType
        - initiationType
        - urgency
        - purpose
        - accountId
        - createdAt
        - updatedAt
      type: object
    SourceDestination:
      additionalProperties: false
      properties:
        account:
          $ref: '#/components/schemas/AccountDetails'
        key:
          examples:
            - chave@pix.com
          type: string
        owner:
          $ref: '#/components/schemas/OwnerDetails'
      type: object
    FeeChargeResponse:
      additionalProperties: false
      properties:
        applied:
          examples:
            - true
          type: boolean
        calculationType:
          examples:
            - segment
          type: string
        fees:
          items:
            $ref: '#/components/schemas/FeeEntryResponse'
          type: array
        netAmount:
          examples:
            - '97.50'
          type: string
        totalAmount:
          examples:
            - '2.50'
          type: string
      required:
        - applied
        - calculationType
        - totalAmount
        - netAmount
        - fees
      type: object
    LedgerInfo:
      additionalProperties: false
      properties:
        destinationOperationId:
          examples:
            - 550e8400-e29b-41d4-a716-446655440013
          type: string
        revert:
          $ref: '#/components/schemas/LedgerRevertInfo'
        sourceOperationId:
          examples:
            - 550e8400-e29b-41d4-a716-446655440012
          type: string
        transactionId:
          examples:
            - 550e8400-e29b-41d4-a716-446655440011
          type: string
      type: object
    WithdrawalBreakdownResponse:
      additionalProperties: false
      properties:
        agentMode:
          enum:
            - AGTEC
            - AGTOT
            - AGPSS
          examples:
            - AGTEC
          type: string
        transactionAmount:
          examples:
            - '80.00'
          type: string
        withdrawalAmount:
          examples:
            - '50.00'
          type: string
        withdrawalServiceProvider:
          examples:
            - '12345678'
          type: string
      required:
        - withdrawalAmount
        - agentMode
        - withdrawalServiceProvider
      type: object
    AccountDetails:
      additionalProperties: false
      properties:
        branch:
          examples:
            - '0001'
          type: string
        number:
          examples:
            - '123456789'
          type: string
        participant:
          examples:
            - '12345678'
          type: string
        type:
          enum:
            - CACC
            - SVGS
            - TRAN
            - OTHR
          examples:
            - TRAN
          type: string
      required:
        - branch
        - number
        - participant
        - type
      type: object
    OwnerDetails:
      additionalProperties: false
      properties:
        document:
          examples:
            - 12ABC34501DE35
          type: string
        name:
          examples:
            - John Doe
          type: string
        tradeName:
          examples:
            - John's Business
          type: string
        type:
          enum:
            - NATURAL_PERSON
            - LEGAL_PERSON
          examples:
            - NATURAL_PERSON
          type: string
      required:
        - document
        - name
        - type
      type: object
    FeeEntryResponse:
      additionalProperties: false
      properties:
        amount:
          examples:
            - '1.50'
          type: string
        calculationType:
          examples:
            - PERCENTAGE
          type: string
        calculationValue:
          examples:
            - '1.5'
          type: string
        creditAccount:
          examples:
            - 01989f9e-6508-79f8-9540-835be49fbd0d
          type: string
        feeLabel:
          examples:
            - PIX_FEE
          type: string
      required:
        - feeLabel
        - amount
        - creditAccount
        - calculationType
        - calculationValue
      type: object
    LedgerRevertInfo:
      additionalProperties: false
      properties:
        destinationOperationId:
          examples:
            - 550e8400-e29b-41d4-a716-446655440016
          type: string
        sourceOperationId:
          examples:
            - 550e8400-e29b-41d4-a716-446655440015
          type: string
        transactionId:
          examples:
            - 550e8400-e29b-41d4-a716-446655440014
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

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