> ## 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`. `X-Idempotency` is optional but recommended; replays within the window are de-duplicated.



## OpenAPI

````yaml /pt/openapi/v3-current/indirect-pix.yaml post /v1/recurrences/payer/authorizations/{id}/cancel
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: >-
    API for Pix Indirect via BTG. It covers DICT keys and claims; MED infraction
    reports, fraud markers, refund requests, and funds recoveries; DICT
    statistics and reconciliation; Pix transfers, refunds, and schedules; static
    QR codes and QR code decoding; immediate and due-date collections; Pix
    Automático for the payer; transaction reports and TemposTransacoes
    statistics; and inbound and outbound webhook records.
  license:
    name: Lerian Studio General License
  title: Pix BTG API
  version: 1.14.0
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security:
  - BearerAuth: []
paths:
  /v1/recurrences/payer/authorizations/{id}/cancel:
    post:
      tags:
        - Pix Automático
      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`. `X-Idempotency` is optional but recommended;
        replays within the window are de-duplicated.
      operationId: recurring-cancel-authorization
      parameters:
        - description: Authorization ID (UUID format)
          in: path
          name: id
          required: true
          schema:
            description: Authorization ID (UUID format)
            format: uuid
            type: string
        - description: Account ID (UUID format)
          in: header
          name: X-Account-Id
          required: true
          schema:
            description: Account ID (UUID format)
            format: uuid
            type: string
        - description: >-
            Idempotency key (optional; replays within the window are
            de-duplicated).
          in: header
          name: X-Idempotency
          schema:
            description: >-
              Idempotency key (optional; replays within the window are
              de-duplicated).
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelAuthorizationInput'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelAuthorizationOutput'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Bad Request
        '413':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Request Entity Too Large
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Internal Server Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Error
components:
  schemas:
    CancelAuthorizationInput:
      additionalProperties: false
      properties:
        cancelledBy:
          examples:
            - agent-4417
          maxLength: 255
          type: string
        evidenceReference:
          examples:
            - FRAUD-CASE-2026-0042
          maxLength: 200
          type: string
        reasonKind:
          enum:
            - PAYER
            - FRAUD
          examples:
            - PAYER
          minLength: 1
          type: string
        reasonText:
          examples:
            - Customer reported unauthorized charge
          maxLength: 500
          type: string
      required:
        - reasonKind
      type: object
    CancelAuthorizationOutput:
      additionalProperties: false
      properties:
        authorization:
          $ref: '#/components/schemas/CancelledAuthorizationView'
      required:
        - authorization
      type: object
    LegacyErrorBody:
      additionalProperties: false
      properties:
        code:
          type: string
        fields:
          additionalProperties:
            type: string
          type: object
        headers:
          additionalProperties:
            type: string
          type: object
        message:
          type: string
        paths:
          additionalProperties:
            type: string
          type: object
        queryParams:
          additionalProperties:
            type: string
          type: object
        raw:
          type: string
        title:
          type: string
      required:
        - code
        - title
        - message
      type: object
    CancelledAuthorizationView:
      additionalProperties: false
      properties:
        cancellationReasonKind:
          enum:
            - PAYER
            - FRAUD
          examples:
            - PAYER
          type: string
        cancelledAt:
          examples:
            - '2026-05-05T22:30:00Z'
          format: date-time
          type: string
        effectiveFrom:
          examples:
            - '2026-05-06'
          format: date
          type: string
        id:
          examples:
            - 019cf6ef-e418-7ced-80c0-7b9816faa798
          type: string
        status:
          enum:
            - CANCELLED
          examples:
            - CANCELLED
          type: string
      required:
        - id
        - status
        - cancellationReasonKind
        - cancelledAt
        - effectiveFrom
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.