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

# Iniciar una transferencia Pix (paso 1)

> Crea una iniciación de transferencia en estado PENDING y valida la cuenta de origen. El importe se proporciona durante el procesamiento.



## OpenAPI

````yaml es/openapi/v3-current/pix-lerian-spi.yaml POST /transfers/cashout/initiate
openapi: 3.1.0
info:
  contact:
    name: Lerian Studio
    url: https://lerian.studio
  description: API pública para transferencias Pix salientes y devoluciones.
  license:
    name: Elastic License 2.0
    url: https://www.elastic.co/licensing/elastic-license
  title: Pix Lerian — Pagos
  version: release-candidate
servers:
  - url: https://api.example.com/spi/v1
    description: >-
      El host de ejemplo debe reemplazarse por la URL proporcionada durante el
      onboarding del entorno.
security:
  - BearerAuth: []
tags:
  - description: Inicio, procesamiento, listado y consulta de transferencias Pix salientes.
    name: Transfers
  - description: Creación, listado y consulta de devoluciones Pix.
    name: Refunds
paths:
  /transfers/cashout/initiate:
    post:
      tags:
        - Transfers
      summary: Iniciar una transferencia Pix (paso 1)
      description: >-
        Crea una iniciación de transferencia en estado PENDING y valida la
        cuenta de origen. El importe se proporciona durante el procesamiento.
      operationId: initiateTransfer
      parameters:
        - description: >-
            Clave generada por el cliente para reintentar exactamente la misma
            solicitud de forma segura.
          in: header
          name: Idempotency-Key
          required: true
          schema:
            maxLength: 64
            minLength: 1
            type: string
            description: >-
              Clave generada por el cliente para reintentar exactamente la misma
              solicitud de forma segura.
          example: pix-demo-20260903-000001
        - description: UUID de la cuenta asociada a la operación.
          in: header
          name: X-Account-Id
          required: true
          schema:
            description: UUID de la cuenta asociada a la operación.
            examples:
              - 019606a1-3b4c-7d8e-9f01-234567890abc
            type: string
          example: 019606a1-3b4c-7d8e-9f01-234567890abc
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitiateTransferBody'
            examples:
              ejemploFicticio:
                summary: Ejemplo ficticio
                value:
                  description: Pagamento de aluguel
                  endToEndId: E12345678202605061030abcdef12345
                  initiationType: DICT
                  key: pix-demo@example.com
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitiateTransferOutput'
              examples:
                ejemploFicticio:
                  summary: Ejemplo ficticio
                  value:
                    amount: '10.00'
                    createdAt: '2026-05-06T10:30:00Z'
                    description: Pagamento de aluguel
                    destination:
                      account:
                        branch: '0001'
                        number: '0007654321'
                        participant: '87654321'
                        type: CACC
                      key: pix-demo@example.com
                      owner:
                        document: '12345678901'
                        name: João da Silva
                        tradeName: Empresa Exemplo LTDA
                        type: NATURAL_PERSON
                    endToEndId: E12345678202605061030abcdef12345
                    expiresAt: '2026-05-06T10:35:00Z'
                    id: 019606a1-3b4c-7d8e-9f01-234567890abc
                    initiationType: DICT
                    source:
                      account:
                        branch: '0001'
                        number: '0007654321'
                        participant: '87654321'
                        type: CACC
                      key: '+5511999998888'
                      owner:
                        document: '12345678901'
                        name: João da Silva
                        tradeName: Empresa Exemplo LTDA
                        type: NATURAL_PERSON
                    updatedAt: '2026-05-06T10:30:00Z'
          description: Created
        '400':
          content:
            application/json:
              example:
                code: PIX-0030
                title: Idempotency Key Required
                message: >-
                  The Idempotency-Key header is required for this operation and
                  must be within the accepted length.
              schema:
                $ref: '#/components/schemas/LegacyErrorEnvelope'
          description: >-
            Idempotency-Key absent or longer than 64 bytes (PIX-0030). Legacy
            {code,title,message} envelope, NOT problem+json.
        '412':
          content:
            application/json:
              example:
                code: PIX-0031
                title: Idempotency Key Conflict
                message: The Idempotency-Key was already used with a different request.
              schema:
                $ref: '#/components/schemas/LegacyErrorEnvelope'
          description: >-
            Idempotency-Key replayed with a divergent request -- a different
            method, URL (including the path parameter) or body (PIX-0031).
            Legacy {code,title,message} envelope, NOT problem+json.
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      x-codeSamples:
        - lang: bash
          label: cURL con datos ficticios
          source: |-
            curl --request POST \
              --url https://api.example.com/spi/v1/transfers/cashout/initiate \
              --header 'Authorization: Bearer demo-access-token' \
              --header 'Content-Type: application/json' \
              --header 'Idempotency-Key: pix-demo-20260903-000001' \
              --header 'X-Account-Id: 019606a1-3b4c-7d8e-9f01-234567890abc' \
              --data '{
              "description": "Pagamento de aluguel",
              "endToEndId": "E12345678202605061030abcdef12345",
              "initiationType": "DICT",
              "key": "pix-demo@example.com"
            }'
components:
  schemas:
    InitiateTransferBody:
      additionalProperties: false
      properties:
        description:
          description: Free-form payment description
          examples:
            - Pagamento de aluguel
          type: string
        destination:
          $ref: '#/components/schemas/DestinationReq'
          description: Manual destination (MANUAL initiation only)
        emv:
          description: EMV BR Code payload (QR_CODE initiation only)
          examples:
            - >-
              00020101021126360014br.gov.bcb.pix0114+5511999998888520400005303986540510.005802BR5913JOAO
              DA SILVA6008BRASILIA62070503***63045B56
          type: string
        endToEndId:
          description: Optional caller-supplied 32-char BCB endToEndId
          examples:
            - E12345678202605061030abcdef12345
          type: string
        initiationType:
          description: Resolution strategy for the destination
          examples:
            - DICT
          type: string
        key:
          description: DICT key (DICT initiation only)
          examples:
            - '+5511999998888'
          type: string
      required:
        - initiationType
      type: object
    InitiateTransferOutput:
      additionalProperties: false
      properties:
        amount:
          examples:
            - '10.00'
          type: string
        createdAt:
          examples:
            - '2026-05-06T10:30:00Z'
          format: date-time
          type: string
        description:
          examples:
            - Pagamento de aluguel
          type: string
        destination:
          $ref: '#/components/schemas/DestinationOutput'
        emv:
          examples:
            - >-
              00020101021126360014br.gov.bcb.pix0114+5511999998888520400005303986540510.005802BR5913JOAO
              DA SILVA6008BRASILIA62070503***63045B56
          type: string
        endToEndId:
          examples:
            - E12345678202605061030abcdef12345
          type: string
        expiresAt:
          examples:
            - '2026-05-06T10:35:00Z'
          format: date-time
          type: string
        id:
          examples:
            - 019606a1-3b4c-7d8e-9f01-234567890abc
          type: string
        initiationType:
          examples:
            - DICT
          type: string
        qrCodeDetails: {}
        source:
          $ref: '#/components/schemas/SourceDestination'
        updatedAt:
          examples:
            - '2026-05-06T10:30:00Z'
          format: date-time
          type: string
      required:
        - id
        - initiationType
        - expiresAt
        - 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
      required:
        - code
        - title
        - message
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          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
    DestinationReq:
      additionalProperties: false
      properties:
        account:
          $ref: '#/components/schemas/DestinationAccountReq'
        owner:
          $ref: '#/components/schemas/DestinationOwnerReq'
      required:
        - account
        - owner
      type: object
    DestinationOutput:
      additionalProperties: false
      properties:
        account:
          $ref: '#/components/schemas/DestinationAccountOutput'
        key:
          examples:
            - '+5511999998888'
          type: string
        owner:
          $ref: '#/components/schemas/DestinationOwnerOutput'
      required:
        - account
        - owner
      type: object
    SourceDestination:
      additionalProperties: false
      properties:
        account:
          $ref: '#/components/schemas/AccountDetails'
        key:
          examples:
            - '+5511999998888'
          type: string
        owner:
          $ref: '#/components/schemas/OwnerDetails'
      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
    DestinationAccountReq:
      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
    DestinationOwnerReq:
      additionalProperties: false
      properties:
        document:
          examples:
            - '12345678901'
          type: string
        name:
          examples:
            - João da Silva
          type: string
        tradeName:
          examples:
            - Empresa Exemplo LTDA
          type: string
      required:
        - document
        - name
      type: object
    DestinationAccountOutput:
      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
    DestinationOwnerOutput:
      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
    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
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````