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

# Cancelar uma autorização do Pix Automático

> Cancela uma autorização ativa. `reasonKind=PAYER` cancela o próprio mandato de quem faz a chamada; `reasonKind=FRAUD` registra o chamador como operador e exige `reasonText`. A data efetiva no BACEN é D+1 (D+2 após as 22:00 BRT) para PAYER e imediata para FRAUD. `X-Idempotency` é obrigatório; uma chamada repetida repete a mesma resposta com `X-Idempotency-Replayed: true`.



## OpenAPI

````yaml pt/openapi/v3-current/indirect-pix.yaml POST /v1/recurrences/payer/authorizations/{id}/cancel
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/authorizations/{id}/cancel:
    post:
      tags:
        - Pix Automático API
      summary: Cancelar uma autorização do Pix Automático
      description: >-
        Cancela uma autorização ativa. `reasonKind=PAYER` cancela o próprio
        mandato de quem faz a chamada; `reasonKind=FRAUD` registra o chamador
        como operador e exige `reasonText`. A data efetiva no BACEN é D+1 (D+2
        após as 22:00 BRT) para PAYER e imediata para FRAUD. `X-Idempotency` é
        obrigatório; uma chamada repetida repete a mesma resposta com
        `X-Idempotency-Replayed: true`.
      parameters:
        - $ref: '#/components/parameters/XAccountId'
        - name: X-Idempotency
          in: header
          description: Chave de idempotência
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: ID da autorização (formato UUID)
          required: true
          schema:
            type: string
          example: 019cf6ef-e418-7ced-80c0-7b9816faa798
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelAuthorizationInput'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelAuthorizationOutput'
        '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'
      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:
    CancelAuthorizationInput:
      properties:
        cancelledBy:
          example: agent-4417
          maxLength: 255
          type: string
        evidenceReference:
          example: FRAUD-CASE-2026-0042
          maxLength: 200
          type: string
        reasonKind:
          enum:
            - PAYER
            - FRAUD
          example: PAYER
          type: string
        reasonText:
          example: Customer reported unauthorized charge
          maxLength: 500
          type: string
      required:
        - reasonKind
      type: object
    CancelAuthorizationOutput:
      properties:
        authorization:
          $ref: '#/components/schemas/CancelledAuthorizationView'
      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.
    CancelledAuthorizationView:
      properties:
        cancellationReasonKind:
          enum:
            - PAYER
            - FRAUD
          example: PAYER
          type: string
        cancelledAt:
          example: '2026-05-05T22:30:00Z'
          format: date-time
          type: string
        effectiveFrom:
          example: '2026-05-06'
          format: date
          type: string
        id:
          example: 019cf6ef-e418-7ced-80c0-7b9816faa798
          type: string
        status:
          enum:
            - CANCELLED
          example: CANCELLED
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````