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

# Procesar una transferencia Pix

> Usa este endpoint para procesar un cash-out Pix iniciado previamente y
mover fondos entre cuentas.



## OpenAPI

````yaml es/openapi/v3-current/indirect-pix.yaml POST /v1/transfers/cashout/process
openapi: 3.0.3
info:
  title: Plugin BR Pix Indirect - API completa
  description: |
    API completa para el sistema de pagos instantáneos Pix de Brasil, que
    incluye operaciones del diccionario de claves Pix, generación/decodificación
    de códigos QR, transacciones y límites transaccionales.
  version: 1.7.6
servers:
  - url: https://plugin-pix-indirect.api.lerian.net
security:
  - bearerAuth: []
paths:
  /v1/transfers/cashout/process:
    post:
      tags:
        - Transactions API
      summary: Procesar una transferencia Pix
      description: |-
        Usa este endpoint para procesar un cash-out Pix iniciado previamente y
        mover fondos entre cuentas.
      parameters:
        - $ref: '#/components/parameters/XAccountId'
        - $ref: '#/components/parameters/XPurpose'
        - $ref: '#/components/parameters/XIdempotency'
        - $ref: '#/components/parameters/XTTL'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProcessTransferInput'
            example:
              initiationId: 019c96a0-0c82-7c3d-8dcc-c180868b45c4
              amount: '100.50'
      responses:
        '201':
          description: >-
            Transferencia Pix procesada correctamente.


            La respuesta incluye el encabezado `X-Idempotency-Replayed`.


            Si el valor es false, la transacción se acaba de procesar. Si el
            valor es true, la respuesta es una repetición de una solicitud
            procesada anteriormente.


            Consulta [Reintentos e
            idempotencia](/en/reference/retries-idempotency) para obtener más
            detalles.
          headers:
            X-Idempotency-Replayed:
              $ref: '#/components/headers/XIdempotencyReplayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferObject'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0001:
                  $ref: '#/components/examples/ErrorPIX0001'
                ErrorPIX0003:
                  $ref: '#/components/examples/ErrorPIX0003'
                ErrorPIX0004:
                  $ref: '#/components/examples/ErrorPIX0004'
                ErrorPIX0404:
                  $ref: '#/components/examples/ErrorPIX0404'
                ErrorPIX0422:
                  $ref: '#/components/examples/ErrorPIX0422'
                ErrorPIX0424:
                  $ref: '#/components/examples/ErrorPIX0424'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0431:
                  $ref: '#/components/examples/ErrorPIX0431'
                ErrorPIX0601:
                  $ref: '#/components/examples/ErrorPIX0601'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0410:
                  $ref: '#/components/examples/ErrorPIX0410'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0412:
                  $ref: '#/components/examples/ErrorPIX0412'
                ErrorPIX0423:
                  $ref: '#/components/examples/ErrorPIX0423'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0411:
                  $ref: '#/components/examples/ErrorPIX0411'
                ErrorPIX0413:
                  $ref: '#/components/examples/ErrorPIX0413'
                ErrorPIX0421:
                  $ref: '#/components/examples/ErrorPIX0421'
                ErrorPIX0470:
                  $ref: '#/components/examples/ErrorPIX0470'
                ErrorPIX0471:
                  $ref: '#/components/examples/ErrorPIX0471'
                ErrorPIX0600:
                  $ref: '#/components/examples/ErrorPIX0600'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0000:
                  $ref: '#/components/examples/ErrorPIX0000'
                ErrorPIX0602:
                  $ref: '#/components/examples/ErrorPIX0602'
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX1000:
                  $ref: '#/components/examples/ErrorPIX1000'
                ErrorPIX1007:
                  $ref: '#/components/examples/ErrorPIX1007'
                ErrorPIX1099:
                  $ref: '#/components/examples/ErrorPIX1099'
      deprecated: false
      security:
        - bearerAuth: []
components:
  parameters:
    XAccountId:
      name: X-Account-Id
      in: header
      description: Identificador único de la cuenta del Ledger de Midaz (formato UUID).
      required: true
      example: 019c96a0-0a98-7287-9a31-786e0809c769
      schema:
        type: string
    XPurpose:
      name: X-Purpose
      in: header
      description: >-
        Propósito de la transacción para el cash-out. Su valor predeterminado es
        TRANSFER cuando se omite.
      required: false
      example: TRANSFER
      schema:
        type: string
        default: TRANSFER
        enum:
          - TRANSFER
          - CHANGE
          - WITHDRAWAL
          - REFUND_AUTOMATIC_PIX
          - INSTANT_PAYMENT_REFUND
          - INSTALLMENT_PIX
    XIdempotency:
      name: X-Idempotency
      in: header
      description: >-
        Clave de idempotencia opcional para reintentos seguros. Reutiliza el
        mismo valor solo cuando reintentas la misma operación tras un resultado
        desconocido.


        Consulta [Reintentos e idempotencia](/en/reference/retries-idempotency)
        para más detalles.
      required: false
      schema:
        type: string
    XTTL:
      name: X-TTL
      in: header
      description: >-
        Tiempo de vida en segundos para la caché de la clave de idempotencia.
        Define cuánto tiempo el sistema recuerda una solicitud procesada.


        Consulta [Reintentos e idempotencia](/en/reference/retries-idempotency)
        para más detalles.
      required: false
      schema:
        type: integer
  schemas:
    ProcessTransferInput:
      type: object
      required:
        - initiationId
        - amount
      properties:
        initiationId:
          type: string
          description: ID de inicio obtenido en el paso de inicio.
          example: 019c96a0-0c82-7c3d-8dcc-c180868b45c4
        amount:
          type: string
          description: >-
            Monto de la transferencia en BRL (formato `0.00`). Para códigos QR
            con

            un monto fijo, este debe coincidir con el monto codificado en el
            código QR.
          example: '100.50'
        description:
          type: string
          maxLength: 140
          description: Descripción o mensaje opcional.
          example: Payment for services
        metadata:
          type: object
          additionalProperties: true
          description: >-
            Atributos personalizados de clave-valor para esta transferencia.
            Máximo 50 claves,

            clave de máximo 100 caracteres, valor de máximo 2000 caracteres.
    TransferObject:
      type: object
      properties:
        id:
          type: string
          description: Identificador único de la transferencia.
          example: 019c96a0-0c21-71f9-a487-66a1258278a1
        endToEndId:
          type: string
          description: Identificador de extremo a extremo.
          example: E123456789BR1234567890123456789
        amount:
          type: string
          description: Monto de la transferencia en BRL (formato `0.00`).
          example: '100.00'
        status:
          type: string
          description: Estado de la transferencia.
          enum:
            - CREATED
            - PENDING
            - PROCESSING
            - COMPLETED
            - FAILED
            - REVERSED
          example: COMPLETED
        type:
          type: string
          description: Tipo de transferencia.
          enum:
            - CASHOUT
            - CASHIN
          example: CASHOUT
        description:
          type: string
          maxLength: 140
          description: Descripción o mensaje opcional.
          example: Pix Cashout Transfer
        source:
          $ref: '#/components/schemas/TransferPartyObject'
        destination:
          $ref: '#/components/schemas/TransferPartyObject'
        paymentType:
          type: string
          description: Tipo de pago.
          enum:
            - IMMEDIATE
            - SCHEDULED
          example: IMMEDIATE
        initiationType:
          type: string
          description: Tipo de iniciación.
          enum:
            - MANUAL
            - KEY
            - QR_CODE
          example: KEY
        urgency:
          type: string
          description: Urgencia de la transferencia.
          enum:
            - HIGH
            - NORMAL
          example: HIGH
        purpose:
          type: string
          description: >-
            Tipo de finalidad de la transacción. El valor predeterminado es
            TRANSFER.
          enum:
            - TRANSFER
            - INSTANT_PAYMENT_REFUND
          example: TRANSFER
        accountId:
          type: string
          description: Identificador de la cuenta (UUID).
          example: 01989f9e-6508-79f8-9540-835be49fbd0d
        aliasId:
          type: string
          description: Identificador del alias (UUID).
          example: 01989f9e-6508-79f8-9540-835be49fbd0e
        initiatedAt:
          type: string
          format: date-time
          description: Marca de tiempo de la iniciación (ISO 8601 UTC).
          example: '2024-01-15T10:30:00Z'
        createdAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
        updatedAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
        ledger:
          $ref: '#/components/schemas/LedgerInfoObject'
        metadata:
          type: object
          additionalProperties: true
          description: >-
            Atributos personalizados de clave-valor asociados con esta
            transferencia.

            Máximo 50 claves, clave de máximo 100 caracteres, valor de máximo
            2000 caracteres.
        feeCharge:
          $ref: '#/components/schemas/FeeChargeObject'
    ErrorFormat:
      type: object
      description: El mensaje de error de la respuesta.
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: Un identificador único y estable para el error.
        title:
          type: string
          description: Un breve resumen del problema.
        message:
          type: string
          description: Orientación detallada para resolver el error.
    TransferPartyObject:
      type: object
      description: Información de la parte de la cuenta (origen o destino).
      properties:
        key:
          type: string
          description: Clave Pix (si corresponde).
          example: john.doe@example.com
        account:
          type: object
          description: Detalles de la cuenta.
          properties:
            branch:
              type: string
              description: Código de la agencia bancaria.
              example: '0001'
            number:
              type: string
              description: Número de cuenta.
              example: '123456789'
            participant:
              type: string
              description: ISPB de la institución participante (8 dígitos).
              example: '12345678'
            type:
              type: string
              description: Tipo de cuenta.
              enum:
                - CACC
                - SVGS
                - TRAN
                - OTHR
              example: CACC
        owner:
          type: object
          description: Detalles del titular.
          properties:
            document:
              type: string
              description: Documento de identificación (CPF 11 dígitos o CNPJ 14 dígitos).
              example: '12345678901'
            name:
              type: string
              description: Nombre completo o razón social.
              example: John Doe
            tradeName:
              type: string
              description: Nombre comercial (opcional).
              example: John's Business
            type:
              type: string
              enum:
                - NATURAL_PERSON
                - LEGAL_PERSON
              description: Tipo de titular.
              example: NATURAL_PERSON
    LedgerInfoObject:
      type: object
      description: Identificadores de transacción y operación del ledger de Midaz.
      properties:
        transactionId:
          type: string
          description: Identificador de la transacción de Midaz (UUID).
          example: 550e8400-e29b-41d4-a716-446655440011
        sourceOperationId:
          type: string
          description: Identificador de la operación de origen (DEBIT) de Midaz (UUID).
          example: 550e8400-e29b-41d4-a716-446655440012
        destinationOperationId:
          type: string
          description: Identificador de la operación de destino (CREDIT) de Midaz (UUID).
          example: 550e8400-e29b-41d4-a716-446655440013
        revert:
          type: object
          description: >-
            Detalles de la transacción de reversión (presente solo cuando se
            rechaza y se revierte).
          properties:
            transactionId:
              type: string
              description: Identificador de la transacción de reversión de Midaz (UUID).
              example: 550e8400-e29b-41d4-a716-446655440014
            sourceOperationId:
              type: string
              description: >-
                Identificador de la operación de origen de reversión (DEBIT) de
                Midaz (UUID).
              example: 550e8400-e29b-41d4-a716-446655440015
            destinationOperationId:
              type: string
              description: >-
                Identificador de la operación de destino de reversión (CREDIT)
                de Midaz (UUID).
              example: 550e8400-e29b-41d4-a716-446655440016
    FeeChargeObject:
      type: object
      description: Detalles del cálculo de tarifas (si corresponde).
      properties:
        applied:
          type: boolean
          description: Indica si se aplicaron tarifas.
          example: true
        calculationType:
          type: string
          description: Tipo de cálculo de la tarifa.
          example: segment
        totalAmount:
          type: string
          description: Monto total de la tarifa.
          example: '2.50'
        netAmount:
          type: string
          description: Monto neto después de las tarifas.
          example: '97.50'
        fees:
          type: array
          description: Lista de tarifas individuales aplicadas.
          items:
            type: object
            properties:
              feeLabel:
                type: string
                description: Etiqueta/nombre de la tarifa.
                example: PIX_FEE
              amount:
                type: string
                description: Monto de la tarifa.
                example: '1.50'
              creditAccount:
                type: string
                description: Cuenta que recibe la tarifa.
                example: 01989f9e-6508-79f8-9540-835be49fbd0d
              calculationType:
                type: string
                description: Cómo se calculó la tarifa.
                example: PERCENTAGE
              calculationValue:
                type: string
                description: El parámetro de cálculo (porcentaje o valor fijo).
                example: '1.5'
  headers:
    XIdempotencyReplayed:
      description: >-
        Este encabezado solo está presente cuando la respuesta es una repetición
        en caché de una solicitud procesada anteriormente. Si el encabezado está
        ausente, la solicitud se procesó como nueva. Verifica siempre la
        presencia de este encabezado para evitar procesar la misma operación dos
        veces por tu lado.


        Consulta [Reintentos e idempotencia](/en/reference/retries-idempotency)
        para más detalles.
      schema:
        type: boolean
      example: false
  examples:
    ErrorPIX0001:
      summary: Missing Headers in Request
      value:
        code: PIX-0001
        title: Missing Headers in Request
        message: >-
          Your request is missing one or more required header params. Please
          refer to the documentation to ensure all necessary header params are
          included in your request.
    ErrorPIX0003:
      summary: Missing Fields in Request
      value:
        code: PIX-0003
        title: Missing Fields in Request
        message: >-
          Your request is missing one or more required fields. Please refer to
          the documentation to ensure all necessary fields are included in your
          request.
    ErrorPIX0004:
      summary: Invalid Field Values in Request
      value:
        code: PIX-0004
        title: Invalid Field Values in Request
        message: >-
          Your request contains one or more fields with invalid values. Please
          refer to the documentation to verify that all fields have the correct
          values.
    ErrorPIX0404:
      summary: Invalid UUID Format
      value:
        code: PIX-0404
        title: Invalid UUID Format
        message: The UUID format is invalid.
    ErrorPIX0422:
      summary: Amount Mismatch
      value:
        code: PIX-0422
        title: Amount Mismatch
        message: The amount does not match the fixed amount from QR code.
    ErrorPIX0424:
      summary: Invalid Amount Value
      value:
        code: PIX-0424
        title: Invalid Amount Value
        message: The amount must be greater than zero.
    ErrorPIX0431:
      summary: Account Blocked
      value:
        code: PIX-0431
        title: Account Blocked
        message: The account is blocked and cannot perform transactions.
    ErrorPIX0601:
      summary: Midaz Account Blocked
      value:
        code: PIX-0601
        title: Midaz Account Blocked
        message: The account is blocked and cannot perform transactions.
    ErrorPIX0410:
      summary: Initiation Not Found
      value:
        code: PIX-0410
        title: Initiation Not Found
        message: The payment initiation was not found.
    ErrorPIX0412:
      summary: Initiation Already Used
      value:
        code: PIX-0412
        title: Initiation Already Used
        message: The payment initiation has already been processed.
    ErrorPIX0423:
      summary: Duplicate End-to-End ID
      value:
        code: PIX-0423
        title: Duplicate End-to-End ID
        message: A transaction with this end-to-end ID already exists.
    ErrorPIX0411:
      summary: Initiation Expired
      value:
        code: PIX-0411
        title: Initiation Expired
        message: The payment initiation has expired.
    ErrorPIX0413:
      summary: Initiation Invalid State
      value:
        code: PIX-0413
        title: Initiation Invalid State
        message: The payment initiation is in an invalid state.
    ErrorPIX0421:
      summary: Insufficient Balance
      value:
        code: PIX-0421
        title: Insufficient Balance
        message: Insufficient balance to complete the transaction.
    ErrorPIX0470:
      summary: Invalid Status Transition
      value:
        code: PIX-0470
        title: Invalid Status Transition
        message: The status transition is invalid.
    ErrorPIX0471:
      summary: Transfer Already Terminal
      value:
        code: PIX-0471
        title: Transfer Already Terminal
        message: The transaction is already in a terminal state.
    ErrorPIX0600:
      summary: Midaz Insufficient Funds
      value:
        code: PIX-0600
        title: Midaz Insufficient Funds
        message: Insufficient funds in the source account.
    ErrorPIX0000:
      summary: Internal Server Error
      value:
        code: PIX-0000
        title: Internal Server Error
        message: The server encountered an unexpected error. Please try again later.
    ErrorPIX0602:
      summary: Midaz Connection Error
      value:
        code: PIX-0602
        title: Midaz Connection Error
        message: Failed to connect to Midaz.
    ErrorPIX1000:
      summary: Provider Connection Error
      value:
        code: PIX-1000
        title: Provider Connection Error
        message: Failed to connect to provider.
    ErrorPIX1007:
      summary: Provider Internal Error
      value:
        code: PIX-1007
        title: Provider Internal Error
        message: Provider returned an internal error.
    ErrorPIX1099:
      summary: Provider Unmapped Error
      value:
        code: PIX-1099
        title: Provider Unmapped Error
        message: Provider returned an unmapped error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````