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

# Pagar y confirmar una recurrencia de Pix Automático escaneada

> Jornada J3 de BACEN: en una única operación atómica, procesa el cashout de cobro inmediato pre-creado (`initiationId`) y confirma la recurrencia escaneada (`idRec`). Devuelve 200 cuando el cashout se liquida de inmediato (la solicitud de autorización queda en APPROVING); devuelve 202 cuando el cashout aún se está procesando (la solicitud de autorización permanece en INITIATED hasta que el webhook de liquidación la haga avanzar). La cuenta del pagador es el `X-Account-Id` autenticado; el monto del débito se toma de la iniciación referenciada y nunca lo proporciona el cliente. `X-Idempotency` es obligatorio.



## OpenAPI

````yaml es/openapi/v3-current/indirect-pix.yaml POST /v1/recurrences/payer/qr/pay-and-confirm
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/recurrences/payer/qr/pay-and-confirm:
    post:
      tags:
        - Pix Automático API
      summary: Pagar y confirmar una recurrencia de Pix Automático escaneada
      description: >-
        Jornada J3 de BACEN: en una única operación atómica, procesa el cashout
        de cobro inmediato pre-creado (`initiationId`) y confirma la recurrencia
        escaneada (`idRec`). Devuelve 200 cuando el cashout se liquida de
        inmediato (la solicitud de autorización queda en APPROVING); devuelve
        202 cuando el cashout aún se está procesando (la solicitud de
        autorización permanece en INITIATED hasta que el webhook de liquidación
        la haga avanzar). La cuenta del pagador es el `X-Account-Id`
        autenticado; el monto del débito se toma de la iniciación referenciada y
        nunca lo proporciona el cliente. `X-Idempotency` es obligatorio.
      parameters:
        - $ref: '#/components/parameters/XAccountId'
        - name: X-Idempotency
          in: header
          description: Clave de idempotencia
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayAndConfirmFromQRInput'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayAndConfirmFromQROutput'
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayAndConfirmFromQROutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
        '504':
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
      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
  schemas:
    PayAndConfirmFromQRInput:
      properties:
        amount:
          description: >-
            Amount es el monto del débito en BRL (formato 0.00). Obligatorio. El
            formato y que sea positivo (y, para iniciaciones QR_CODE, la
            coincidencia con el monto fijo del QR) se validan cuando se procesa
            el pago.
          example: '29.90'
          type: string
        description:
          description: >-
            Description es la remesa de transferencia opcional (≤140 caracteres;
            sin HTML). Las reglas de contenido se aplican cuando se procesa el
            pago.
          example: Payment for services
          type: string
        idRec:
          example: RR0000000000000000001
          maxLength: 64
          type: string
        initiationId:
          example: 550e8400-e29b-41d4-a716-446655440010
          type: string
        receiverMaxAmount:
          example: '500.00'
          type: string
      required:
        - amount
        - idRec
        - initiationId
      type: object
    PayAndConfirmFromQROutput:
      properties:
        authorizationRequest:
          $ref: '#/components/schemas/AuthorizationRequestOutput'
        cashoutId:
          example: 550e8400-e29b-41d4-a716-446655440010
          type: string
        cashoutStatus:
          enum:
            - CREATED
            - PENDING
            - PROCESSING
            - COMPLETED
          example: PROCESSING
          type: string
      type: object
    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.
    AuthorizationRequestOutput:
      properties:
        acceptedMaxAmount:
          example: '500.00'
          type: string
        accountId:
          example: 019cf6ef-e418-7ced-80c0-7b9816faa798
          type: string
        amount:
          $ref: '#/components/schemas/AuthorizationRequestAmountProfile'
        approvingAt:
          format: date-time
          type: string
        cancellationCode:
          example: ACCL
          type: string
        cancellationRequester:
          example: PSP_PAYEE
          type: string
        cancelledAt:
          format: date-time
          type: string
        confirmedAt:
          format: date-time
          type: string
        createdAt:
          format: date-time
          type: string
        description:
          example: Streaming subscription
          type: string
        destination:
          $ref: '#/components/schemas/AuthorizationRequestDestination'
        expiredAt:
          format: date-time
          type: string
        externalRequestId:
          example: RREC-2026-04-001
          type: string
        firstChargeId:
          example: 019cf6ef-e418-7ced-80c0-7b9816faa798
          type: string
        id:
          example: 019cf6ef-e418-7ced-80c0-7b9816faa798
          type: string
        journey:
          example: J1
          type: string
        payeeRejectionCode:
          example: MD20
          type: string
        payeeRejectionDescription:
          type: string
        periodicity:
          $ref: '#/components/schemas/AuthorizationRequestPeriodicity'
        rejectedAt:
          format: date-time
          type: string
        replyFailedAt:
          format: date-time
          type: string
        replyFailureReason:
          type: string
        retryPolicy:
          example: RETRY_3X_7D
          type: string
        status:
          enum:
            - PENDING
            - INITIATED
            - APPROVING
            - CONFIRMED
            - REJECTED
            - PAYMENT_FAILED
            - REPLY_FAILED
            - CANCELLED
            - EXPIRED
          example: PENDING
          type: string
        updatedAt:
          format: date-time
          type: string
        validUntil:
          example: '2026-06-30T23:59:59Z'
          format: date-time
          type: string
      type: object
    AuthorizationRequestAmountProfile:
      properties:
        fixed:
          example: '29.90'
          type: string
        max:
          example: '500.00'
          type: string
        min:
          example: '10.00'
          type: string
      type: object
    AuthorizationRequestDestination:
      properties:
        account:
          example: '123456'
          type: string
        accountType:
          enum:
            - CACC
            - SVGS
            - TRAN
            - OTHR
          example: CACC
          type: string
        bank:
          example: '30306294'
          type: string
        branch:
          example: '0001'
          type: string
        document:
          example: '12345678000199'
          type: string
        key:
          example: contato@streaming.co
          type: string
        name:
          example: Streaming Co
          type: string
        personType:
          enum:
            - NATURAL_PERSON
            - LEGAL_PERSON
          example: LEGAL_PERSON
          type: string
      type: object
    AuthorizationRequestPeriodicity:
      properties:
        customDays:
          example: 30
          type: integer
        type:
          enum:
            - WEEKLY
            - MONTHLY
            - QUARTERLY
            - SEMIANNUAL
            - ANNUAL
            - CUSTOM
          example: MONTHLY
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````