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

# Decide on a Pix Automático Authorization Request

> Accept or reject a pending authorization request. The decision is confirmed with BTG synchronously before any local state changes, so the response reflects the final outcome. `X-Idempotency` is required.



## OpenAPI

````yaml en/openapi/v3-current/indirect-pix.yaml POST /v1/recurrences/payer/authorization-requests/{id}/decision
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.7.6
servers:
  - url: https://plugin-pix-indirect.api.lerian.net
security:
  - bearerAuth: []
paths:
  /v1/recurrences/payer/authorization-requests/{id}/decision:
    post:
      tags:
        - Pix Automático API
      summary: Decide on a Pix Automático Authorization Request
      description: >-
        Accept or reject a pending authorization request. The decision is
        confirmed with BTG synchronously before any local state changes, so the
        response reflects the final outcome. `X-Idempotency` is required.
      parameters:
        - $ref: '#/components/parameters/XAccountId'
        - name: X-Idempotency
          in: header
          description: Idempotency key
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Authorization Request ID (UUID format)
          required: true
          schema:
            type: string
          example: 019cf6ef-e418-7ced-80c0-7b9816faa798
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecideAuthorizationRequestInput'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecideAuthorizationRequestOutput'
        '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'
        '404':
          description: Not Found
          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'
      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
  schemas:
    DecideAuthorizationRequestInput:
      properties:
        decision:
          enum:
            - ACCEPTED
            - REJECTED
          example: ACCEPTED
          type: string
        receiverMaxAmount:
          example: '500.00'
          type: string
      required:
        - decision
      type: object
    DecideAuthorizationRequestOutput:
      properties:
        authorizationRequest:
          $ref: '#/components/schemas/AuthorizationRequestOutput'
      type: object
    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.
    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

````