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

# Process a Pix Transfer

> Use this endpoint to process a previously initiated Pix cash-out and
move funds between accounts.



## OpenAPI

````yaml /en/openapi/v3-current/indirect-pix.yaml post /v1/transfers/cashout/process
openapi: 3.0.3
info:
  title: Plugin BR Pix Indirect - Complete API
  description: |
    Complete API for Brazilian Pix instant payment system including
    Pix key dictionary operations, QR code generation/decoding, transactions and
    transaction limits.
  version: 1.0.0
servers:
  - url: https://plugin-pix-indirect.api.lerian.net
security:
  - bearerAuth: []
paths:
  /v1/transfers/cashout/process:
    post:
      tags:
        - Transactions API
      summary: Process a Pix Transfer
      description: |-
        Use this endpoint to process a previously initiated Pix cash-out and
        move funds between accounts.
      parameters:
        - $ref: '#/components/parameters/XAccountId'
        - $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
      responses:
        '201':
          description: >-
            Pix transfer processed successfully.


            The response includes the `X-Idempotency-Replayed` header.


            If the value is false, the transaction was just processed. If the
            value is true, the response is a replay of a previously processed
            request.


            See [Retries and idempotency](/en/reference/retries-idempotency) for
            more details.
          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: Unique identifier of the Midaz Ledger Account (UUID format).
      required: true
      example: 019c96a0-0a98-7287-9a31-786e0809c769
      schema:
        type: string
    XIdempotency:
      name: X-Idempotency
      in: header
      description: >-
        Optional idempotency key for safe retries. Reuse the same value only
        when retrying the same operation after an unknown outcome.


        See [Retries and idempotency](/en/reference/retries-idempotency) for
        details.
      required: false
      schema:
        type: string
    XTTL:
      name: X-TTL
      in: header
      description: >-
        Time-to-live in seconds for the idempotency key cache. Defines how long
        the system remembers a processed request.


        See [Retries and idempotency](/en/reference/retries-idempotency) for
        details.
      required: false
      schema:
        type: integer
  schemas:
    ProcessTransferInput:
      type: object
      required:
        - initiationId
      properties:
        initiationId:
          type: string
          description: Initiation ID from the initiate step.
          example: 019c96a0-0c82-7c3d-8dcc-c180868b45c4
    TransferObject:
      type: object
      properties:
        id:
          type: string
          description: Transfer unique identifier.
          example: 019c96a0-0c21-71f9-a487-66a1258278a1
        endToEndId:
          type: string
          description: End-to-end identifier.
          example: E123456789BR1234567890123456789
        amount:
          type: string
          description: Transfer amount.
          example: '100.00'
        status:
          type: string
          description: Transfer status.
          enum:
            - PENDING
            - PROCESSING
            - COMPLETED
            - FAILED
            - CANCELLED
          example: COMPLETED
        type:
          type: string
          description: Transfer type.
          enum:
            - CASHOUT
            - CASHIN
          example: CASHOUT
        createdAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
        updatedAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
    ErrorFormat:
      type: object
      description: The response message error.
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error.
        title:
          type: string
          description: A brief summary of the issue.
        message:
          type: string
          description: Detailed guidance for resolving the error.
  headers:
    XIdempotencyReplayed:
      description: >-
        This header is only present when the response is a cached replay of a
        previously processed request. If the header is absent, the request was
        processed as new. Always check for the presence of this header to avoid
        processing the same operation twice on your side.


        See [Retries and idempotency](/en/reference/retries-idempotency) for
        details.
      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

````