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

# Cancel a Pix Automático Authorization

> Cancel an active authorization. `reasonKind=PAYER` cancels the caller's own mandate; `reasonKind=FRAUD` records the caller as the operator and requires `reasonText`. The BACEN-effective date is D+1 (D+2 after 22:00 BRT) for PAYER and immediate for FRAUD. `X-Idempotency` is required; a repeat call replays the same response with `X-Idempotency-Replayed: true`.



## OpenAPI

````yaml en/openapi/v3-current/indirect-pix.yaml POST /v1/recurrences/payer/authorizations/{id}/cancel
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/authorizations/{id}/cancel:
    post:
      tags:
        - Pix Automático API
      summary: Cancel a Pix Automático Authorization
      description: >-
        Cancel an active authorization. `reasonKind=PAYER` cancels the caller's
        own mandate; `reasonKind=FRAUD` records the caller as the operator and
        requires `reasonText`. The BACEN-effective date is D+1 (D+2 after 22:00
        BRT) for PAYER and immediate for FRAUD. `X-Idempotency` is required; a
        repeat call replays the same response with `X-Idempotency-Replayed:
        true`.
      parameters:
        - $ref: '#/components/parameters/XAccountId'
        - name: X-Idempotency
          in: header
          description: Idempotency key
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Authorization ID (UUID format)
          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: Unique identifier of the Midaz Ledger Account (UUID format).
      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: 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.
    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

````