> ## 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 e confirmar uma recorrência do Pix Automático lida por QR Code

> Jornada J3 do BACEN: em uma única operação atômica, processa o cashout de cobrança imediata pré-criado (`initiationId`) e confirma a recorrência lida (`idRec`). Retorna 200 quando o cashout é liquidado imediatamente (a solicitação de autorização fica em APPROVING); retorna 202 quando o cashout ainda está em processamento (a solicitação de autorização permanece em INITIATED até que o webhook de liquidação a avance). A conta do pagador é o `X-Account-Id` autenticado; o valor do débito é obtido da initiation referenciada e nunca é informado pelo cliente. `X-Idempotency` é obrigatório.



## OpenAPI

````yaml pt/openapi/v3-current/indirect-pix.yaml POST /v1/recurrences/payer/qr/pay-and-confirm
openapi: 3.0.3
info:
  title: Plugin BR Pix Indireto - API Completa
  description: |
    API completa para o sistema brasileiro de pagamentos instantâneos Pix,
    incluindo operações de dicionário de chaves Pix, geração/decodificação de
    QR Code, transações e limites de transações.
  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 e confirmar uma recorrência do Pix Automático lida por QR Code
      description: >-
        Jornada J3 do BACEN: em uma única operação atômica, processa o cashout
        de cobrança imediata pré-criado (`initiationId`) e confirma a
        recorrência lida (`idRec`). Retorna 200 quando o cashout é liquidado
        imediatamente (a solicitação de autorização fica em APPROVING); retorna
        202 quando o cashout ainda está em processamento (a solicitação de
        autorização permanece em INITIATED até que o webhook de liquidação a
        avance). A conta do pagador é o `X-Account-Id` autenticado; o valor do
        débito é obtido da initiation referenciada e nunca é informado pelo
        cliente. `X-Idempotency` é obrigatório.
      parameters:
        - $ref: '#/components/parameters/XAccountId'
        - name: X-Idempotency
          in: header
          description: Chave de idempotência
          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 da Conta do Ledger Midaz (formato UUID).
      required: true
      example: 019c96a0-0a98-7287-9a31-786e0809c769
      schema:
        type: string
  schemas:
    PayAndConfirmFromQRInput:
      properties:
        amount:
          description: >-
            Amount é o valor do débito em BRL (formato 0.00). Obrigatório. O
            formato e a positividade — e, para initiations QR_CODE, a
            correspondência com o valor fixo do QR — são validados quando o
            pagamento é processado.
          example: '29.90'
          type: string
        description:
          description: >-
            Description é a mensagem opcional da transferência (≤140 caracteres;
            sem HTML). As regras de conteúdo são aplicadas quando o pagamento é
            processado.
          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: A mensagem de erro da resposta.
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: Um identificador único e estável para o erro.
        title:
          type: string
          description: Um breve resumo do problema.
        message:
          type: string
          description: Orientação detalhada para resolver o erro.
    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

````