> ## 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 stuck in PROCESSING

> Resolves ONE outbound transfer that is stuck in `PROCESSING`. Pix Lerian asks the SPI for the outcome of the payment and applies it. The request has no field to state what happened.

The transfer must have been in `PROCESSING` for at least 90 minutes. If the SPI reports the payment as completed, the transfer becomes `COMPLETED`. If the SPI reports it as rejected or failed, the transfer becomes `REJECTED` and Pix Lerian reverses the debit. If the SPI has no final outcome yet, the call is refused with `PIX-0556`: retry later. If Pix Lerian cannot get the status from the SPI, the call answers `502` (`PIX-0557`) and Pix Lerian changes nothing.

A transfer that is already in a final status is refused with `PIX-0554`. A transfer in any other status is refused with `PIX-0551`.

The caller needs the transfers permission with the post action, the same permission that initiates and processes a transfer.

The response is the transfer as [Get transfer](/pt/reference/interfaces/pix-lerian/spi/get-transfer) returns it.



## OpenAPI

````yaml /pt/openapi/v3-current/pix-lerian-spi.yaml post /transfers/{id}/unblock
openapi: 3.1.0
info:
  contact:
    name: Lerian Studio
    url: https://lerian.studio
  description: Public API for outbound Pix transfers, refunds, and scheduled payments.
  license:
    name: Lerian Studio General License
  title: Pix Lerian — Payments
  version: 1.2.0
servers:
  - url: https://api.example.com/spi/v1
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security:
  - BearerAuth: []
tags:
  - description: Create, list, and retrieve Pix refunds.
    name: Refunds
  - name: Scheduled Payments
    description: Register, list, retrieve, and cancel scheduled Pix payments.
  - description: Initiate, process, list, and retrieve outbound Pix transfers.
    name: Transfers
  - description: >-
      Register, list, retrieve, and cancel recurring series of scheduled Pix
      payments.
    name: Scheduled Payment Recurrences
  - description: >-
      Hold the funds of a received Pix in a cautionary block (MED 2.0), return
      them to the payer, or give them back to the account holder.
    name: Balance Locks
paths:
  /transfers/{id}/unblock:
    post:
      tags:
        - Transfers
      summary: Unblock a Pix transfer stuck in PROCESSING
      description: >-
        Resolves ONE outbound transfer that is stuck in `PROCESSING`. Pix Lerian
        asks the SPI for the outcome of the payment and applies it. The request
        has no field to state what happened.


        The transfer must have been in `PROCESSING` for at least 90 minutes. If
        the SPI reports the payment as completed, the transfer becomes
        `COMPLETED`. If the SPI reports it as rejected or failed, the transfer
        becomes `REJECTED` and Pix Lerian reverses the debit. If the SPI has no
        final outcome yet, the call is refused with `PIX-0556`: retry later. If
        Pix Lerian cannot get the status from the SPI, the call answers `502`
        (`PIX-0557`) and Pix Lerian changes nothing.


        A transfer that is already in a final status is refused with `PIX-0554`.
        A transfer in any other status is refused with `PIX-0551`.


        The caller needs the transfers permission with the post action, the same
        permission that initiates and processes a transfer.


        The response is the transfer as [Get
        transfer](/pt/reference/interfaces/pix-lerian/spi/get-transfer) returns
        it.
      operationId: unblockTransfer
      parameters:
        - description: >-
            REQUIRED. Client-supplied replay key, at most 64 bytes. A request
            without it is refused with PIX-0030 @ 400 before the handler runs.
            An identical resend within 1 hour returns the original response,
            status included, with X-Idempotency-Replayed: true. Reusing the key
            with a different URL, X-Account-Id, X-Actor-Id, X-Override-Reason or
            X-Override-Ticket is PIX-0031 @ 412.
          in: header
          name: X-Idempotency
          required: true
          schema:
            maxLength: 64
            minLength: 1
            type: string
        - description: Transfer UUID
          in: path
          name: id
          required: true
          schema:
            description: Transfer UUID
            examples:
              - 0196070b-1234-7890-abcd-ef0123456789
            type: string
        - description: >-
            Source account UUID. A transfer that exists under a different
            account is answered 404.
          in: header
          name: X-Account-Id
          required: true
          schema:
            description: >-
              Source account UUID. A transfer that exists under a different
              account is answered 404.
            examples:
              - 019606a1-3b4c-7d8e-9f01-234567890abc
            type: string
        - description: >-
            Optional. Identifies the person in your back office who asked for
            the check. Pix Lerian does not use it to decide the outcome.
          in: header
          name: X-Actor-Id
          schema:
            maxLength: 255
            description: >-
              Optional. Identifies the person in your back office who asked for
              the check. Pix Lerian does not use it to decide the outcome.
            examples:
              - ops-maria
            type: string
        - description: >-
            Optional. Reason for the check. Pix Lerian does not use it to decide
            the outcome.
          in: header
          name: X-Override-Reason
          schema:
            maxLength: 512
            description: >-
              Optional. Reason for the check. Pix Lerian does not use it to
              decide the outcome.
            examples:
              - outcome never arrived
            type: string
        - description: >-
            Optional. Ticket reference in your own back office. Pix Lerian does
            not use it to decide the outcome.
          in: header
          name: X-Override-Ticket
          schema:
            maxLength: 255
            description: >-
              Optional. Ticket reference in your own back office. Pix Lerian
              does not use it to decide the outcome.
            examples:
              - OPS-4711
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferResponse'
          description: OK
        '400':
          content:
            application/json:
              example:
                code: PIX-0030
                title: Idempotency Key Required
                message: >-
                  The X-Idempotency header is required for this operation and
                  must be within the accepted length.
              schema:
                $ref: '#/components/schemas/LegacyErrorEnvelope'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            Two shapes share this status, one per media type.
            application/problem+json: X-Account-Id or the transfer UUID is
            missing or malformed (PIX-0001, PIX-0015, PIX-0017), or an
            attribution header exceeds its maximum length (PIX-0706).
            application/json is the legacy {code,title,message} envelope, from
            the idempotency gate: X-Idempotency absent or longer than 64 bytes
            (PIX-0030).
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            No outbound transfer exists for the supplied UUID in the calling
            account scope (PIX-0340).
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            The transfer cannot be unblocked now. PIX-0554: it is already in a
            final status. PIX-0555: it has been in PROCESSING for less than 90
            minutes, so retry later. PIX-0551: it is not in PROCESSING.
            PIX-0556: the SPI has no final outcome yet, so retry later.
            PIX-0327: the transfer changed during the request, so read it again
            and retry.
        '412':
          content:
            application/json:
              example:
                code: PIX-0031
                title: Idempotency Key Conflict
                message: >-
                  The X-Idempotency header is held by a request still running or
                  whose receipt could not be stored, or was already used with a
                  different request.
              schema:
                $ref: '#/components/schemas/LegacyErrorEnvelope'
          description: >-
            The first request under this X-Idempotency is still running (with
            Retry-After: 1), or the key was replayed with a divergent request --
            a different URL (including the path parameter), X-Account-Id,
            X-Actor-Id, X-Override-Reason or X-Override-Ticket (PIX-0031).
            Legacy {code,title,message} envelope, NOT problem+json.
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unexpected server error (PIX-0000).
        '502':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            The call could not conclude. PIX-0557: Pix Lerian could not get the
            status from the SPI, and it changed nothing. PIX-0553: the debit
            reversal did not complete.
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
components:
  schemas:
    TransferResponse:
      additionalProperties: false
      properties:
        accountId:
          examples:
            - 019606a0-1a2b-7c3d-8e4f-567890123abc
          type: string
        aliasId:
          type: string
        alreadyRefundedAmount:
          description: >-
            Cross-mechanism settled and reserved refund amount. Returned only
            for INBOUND transfers.
          examples:
            - '60.00'
          type: string
        amount:
          examples:
            - '100.00'
          type: string
        createdAt:
          examples:
            - '2026-05-06T10:30:00Z'
          format: date-time
          type: string
        currency:
          examples:
            - BRL
          type: string
        deletedAt:
          format: date-time
          type: string
        description:
          examples:
            - Pagamento de aluguel
          type: string
        destination:
          $ref: '#/components/schemas/SourceDestination'
        endToEndId:
          examples:
            - E12345678202605061030abcdef12345
          type: string
        feeCharge:
          $ref: '#/components/schemas/FeeChargeResponse'
          description: >-
            Fee the ledger reported on the transfer. Absent when the ledger's
            fee answer was not recorded for this transfer (an error logged at
            the time, or a transfer created before fees were read back);
            {"applied": false} when the ledger reported that no fee was charged;
            the full object when it charged one.
        id:
          examples:
            - 019606a2-4c5d-7e8f-90a1-345678901bcd
          type: string
        initiatedAt:
          examples:
            - '2026-05-06T10:30:00Z'
          format: date-time
          type: string
        initiationType:
          examples:
            - DICT
          type: string
        ledger:
          $ref: '#/components/schemas/LedgerInfo'
        metadata:
          additionalProperties: {}
          type: object
        paymentType:
          examples:
            - PIX
          type: string
        purpose:
          examples:
            - IACT
          type: string
        remainingRefundableAmount:
          description: >-
            Amount minus alreadyRefundedAmount. Returned only for INBOUND
            transfers and can be negative.
          examples:
            - '40.00'
          type: string
        source:
          $ref: '#/components/schemas/SourceDestination'
        status:
          examples:
            - COMPLETED
          type: string
        type:
          examples:
            - OUTBOUND
          type: string
        updatedAt:
          examples:
            - '2026-05-06T10:30:05Z'
          format: date-time
          type: string
        urgency:
          examples:
            - HIGH
          type: string
      required:
        - id
        - endToEndId
        - status
        - type
        - amount
        - createdAt
        - updatedAt
      type: object
    LegacyErrorEnvelope:
      additionalProperties: false
      properties:
        code:
          description: PIX-XXXX error code
          type: string
        message:
          description: Human-readable error message
          type: string
        title:
          description: Short error title
          type: string
        fields:
          additionalProperties:
            type: string
          description: Per-field detail, keyed by the field or header the refusal names
          type: object
        headers:
          additionalProperties:
            type: string
          description: Per-header detail, keyed by the request header the refusal names
          type: object
      required:
        - code
        - title
        - message
      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
    SourceDestination:
      additionalProperties: false
      properties:
        account:
          $ref: '#/components/schemas/AccountDetails'
        key:
          examples:
            - '+5511999998888'
          type: string
        owner:
          $ref: '#/components/schemas/OwnerDetails'
      type: object
    FeeChargeResponse:
      additionalProperties: false
      properties:
        applied:
          examples:
            - true
          type: boolean
          description: >-
            Whether the ledger charged a fee on the create that moved the
            operation's money. When false, no other field is present. applied
            reports what the create did and the object is kept as its record.
            Where the operation carries ledger.revert (transfers only: REJECTED,
            or FAILED after the debit was reverted), the revert inverted the fee
            legs with the amount, so the fee was returned; on a transfer without
            ledger.revert, feeCharge says nothing about the fee's final
            position.
        calculationType:
          examples:
            - LEDGER
          type: string
          description: >-
            How the total fee was calculated. LEDGER when the ledger's fee
            package computed it.
        fees:
          items:
            $ref: '#/components/schemas/FeeEntryResponse'
          type:
            - array
            - 'null'
          description: >-
            Individual fee entries that make up the total, one per ledger fee
            leg.
        netAmount:
          examples:
            - '100.00'
          type: string
          description: >-
            Amount that reached the destination: on an outbound operation what
            the ledger moved to the rail, on an inbound one what it credited to
            the receiving account (the operation's amount when the ledger
            reported no such leg; on an outbound operation a deductible fee
            package, a misconfiguration on a Pix ledger, makes it lower than the
            amount).
        totalAmount:
          examples:
            - '1.50'
          type: string
          description: Sum of every fee entry the ledger charged on the operation.
      required:
        - applied
      type: object
    LedgerInfo:
      additionalProperties: false
      properties:
        destinationOperationId:
          examples:
            - 019606a5-7f80-7182-3c4d-56789012cdf1
          type: string
        revert:
          $ref: '#/components/schemas/LedgerRevertInfo'
        sourceOperationId:
          examples:
            - 019606a5-7f80-7182-3c4d-56789012cdf0
          type: string
        transactionId:
          examples:
            - 019606a5-7f80-7182-3c4d-56789012cdef
          type: string
      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
    AccountDetails:
      additionalProperties: false
      properties:
        branch:
          examples:
            - '0001'
          type: string
        number:
          examples:
            - '0007654321'
          type: string
        participant:
          examples:
            - '87654321'
          type: string
        type:
          examples:
            - CACC
          type: string
      required:
        - branch
        - number
        - participant
        - type
      type: object
    OwnerDetails:
      additionalProperties: false
      properties:
        document:
          examples:
            - '12345678901'
          type: string
        name:
          examples:
            - João da Silva
          type: string
        tradeName:
          examples:
            - Empresa Exemplo LTDA
          type: string
        type:
          examples:
            - NATURAL_PERSON
          type: string
      required:
        - document
        - name
      type: object
    FeeEntryResponse:
      additionalProperties: false
      properties:
        amount:
          examples:
            - '1.50'
          type: string
          description: Amount of this fee entry.
        calculationType:
          examples:
            - LEDGER
          type: string
          description: >-
            How this entry was calculated. LEDGER when the ledger's fee package
            computed it.
        calculationValue:
          type: string
          description: >-
            Raw value the calculation was parameterised with. Absent when
            calculationType is LEDGER.
        creditAccount:
          examples:
            - '@fees-pix'
          type: string
          description: Ledger account credited with this fee entry.
        feeLabel:
          examples:
            - LEDGER_FEE
          type: string
          description: >-
            Label of this fee entry. LEDGER_FEE on every entry the ledger
            reported: its answer names no fee, so creditAccount is what
            distinguishes one entry from another.
      required:
        - feeLabel
        - amount
      type: object
    LedgerRevertInfo:
      additionalProperties: false
      properties:
        destinationOperationId:
          examples:
            - 019606a5-7f80-7182-3c4d-56789012cdf1
          type: string
        sourceOperationId:
          examples:
            - 019606a5-7f80-7182-3c4d-56789012cdf0
          type: string
        transactionId:
          examples:
            - 019606a5-7f80-7182-3c4d-56789012cdef
          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.