> ## 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 una autorización de Pix Automático

> Cancela una autorización activa. `reasonKind=PAYER` cancela el mandato propio de quien llama; `reasonKind=FRAUD` registra a quien llama como operador y requiere `reasonText`. La fecha efectiva ante BACEN es D+1 (D+2 después de las 22:00 BRT) para PAYER e inmediata para FRAUD. `X-Idempotency` es obligatorio; una llamada repetida reproduce la misma respuesta con `X-Idempotency-Replayed: true`.



## OpenAPI

````yaml es/openapi/v3-current/indirect-pix.yaml POST /v1/recurrences/payer/authorizations/{id}/cancel
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/authorizations/{id}/cancel:
    post:
      tags:
        - Pix Automático API
      summary: Cancelar una autorización de Pix Automático
      description: >-
        Cancela una autorización activa. `reasonKind=PAYER` cancela el mandato
        propio de quien llama; `reasonKind=FRAUD` registra a quien llama como
        operador y requiere `reasonText`. La fecha efectiva ante BACEN es D+1
        (D+2 después de las 22:00 BRT) para PAYER e inmediata para FRAUD.
        `X-Idempotency` es obligatorio; una llamada repetida reproduce la misma
        respuesta con `X-Idempotency-Replayed: true`.
      parameters:
        - $ref: '#/components/parameters/XAccountId'
        - name: X-Idempotency
          in: header
          description: Clave de idempotencia
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: ID de la autorización (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 de la cuenta del Ledger de 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: 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.
    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

````