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

# Register an inbound Pix Automático cancellation

> Registers a recurring-payment cancellation outcome delivered by the upstream system. An accepted cancellation (stCancelamento=0) transitions the authorization to Cancelled and soft-deletes the row; a rejected cancellation (stCancelamento=1) is acknowledged with no state change. Returns the local settlement-gateway id.



## OpenAPI

````yaml en/openapi/v3-current/pix.yaml POST /v1/pix-automatico/authorizations/inbound/cancellation/register
openapi: 3.0.3
info:
  title: Plugin BR Pix Direct - 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.0.0
servers:
  - url: https://plugin-pix-direct.api.lerian.net
  - url: https://plugin-pix-direct-qrcode.api.lerian.net
security:
  - bearerAuth: []
paths:
  /v1/pix-automatico/authorizations/inbound/cancellation/register:
    post:
      tags:
        - Pix Automático API
      summary: Register an inbound Pix Automático cancellation
      description: >-
        Registers a recurring-payment cancellation outcome delivered by the
        upstream system. An accepted cancellation (stCancelamento=0) transitions
        the authorization to Cancelled and soft-deletes the row; a rejected
        cancellation (stCancelamento=1) is acknowledged with no state change.
        Returns the local settlement-gateway id.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterCancellationBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterCancellationResponse'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
components:
  schemas:
    RegisterCancellationBody:
      additionalProperties: false
      properties:
        codigoErro:
          description: Upstream error code (100-char; on a rejected cancellation).
          type: string
        cpfCnpjSolCancelamento:
          description: Requester CPF/CNPJ (a v5.5.0 string).
          type: string
        descCodigoErro:
          description: Upstream error description (1000-char).
          type: string
        descContrato:
          description: Free-text contract description (35-char).
          type: string
        devedor:
          $ref: '#/components/schemas/InboundDebtorBlock'
        dtFinalRecorrencia:
          description: Last payment date (aaaa-mm-dd).
          type: string
        dtHrCancelamento:
          description: Cancellation timestamp (UTC).
          type: string
        dtHrCriacaoRecorrencia:
          description: Recurrence creation timestamp (UTC).
          type: string
        dtInicialRecorrencia:
          description: First payment date (aaaa-mm-dd).
          type: string
        idCancelamento:
          description: Unique cancellation id (29-char, IC...).
          type: string
        idRecorrencia:
          description: Unique recurrence id (29-char, RR...).
          type: string
        motivoCancelamento:
          description: Cancellation reason (0..10).
          format: int64
          type: integer
        nrContrato:
          description: Contract/order identifier (35-char).
          type: string
        pagador:
          $ref: '#/components/schemas/InboundPayerBlock'
        recebedor:
          $ref: '#/components/schemas/InboundRecipientBlock'
        stCancelamento:
          description: Cancellation status (0=Aceito, 1=Rejeitado).
          format: int64
          type: integer
        tpFrequencia:
          description: Recurrence periodicity (0..4).
          format: int64
          type: integer
        tpPessoaSol:
          description: Requester person type (0=PF, 1=PJ).
          format: int64
          type: integer
        valor:
          description: Fixed payment amount in reais (a JSON number).
          format: double
          type: number
      required:
        - idRecorrencia
        - idCancelamento
        - stCancelamento
        - tpPessoaSol
        - cpfCnpjSolCancelamento
        - motivoCancelamento
        - tpFrequencia
        - dtInicialRecorrencia
        - recebedor
        - pagador
        - nrContrato
      type: object
    RegisterCancellationResponse:
      additionalProperties: false
      properties:
        dtHrSgct:
          description: settlement-gateway registration timestamp (UTC).
          type: string
        idSgct:
          description: Local settlement-gateway cancellation id (36-char GUID).
          type: string
      required:
        - idSgct
        - dtHrSgct
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          nullable: true
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          format: uri
          type: string
        status:
          description: HTTP status code
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          format: uri
          type: string
      type: object
    InboundDebtorBlock:
      additionalProperties: false
      properties:
        cpfCnpj:
          description: Debtor CPF or CNPJ (a v5.5.0 string).
          type: string
        nome:
          description: Debtor name/razao social.
          type: string
        tpPessoa:
          description: Person type (0=Pessoa Fisica, 1=Pessoa Juridica).
          format: int64
          type: integer
      required:
        - tpPessoa
        - cpfCnpj
        - nome
      type: object
    InboundPayerBlock:
      additionalProperties: false
      properties:
        codMunIbge:
          description: >-
            Payer municipality IBGE code (7 digits). Carried for
            wire-completeness; the spec marks it Sim on 5.2.4, but the service
            does not consume or persist payer municipality this wave (the domain
            has no municipality field).
          format: int64
          type: integer
        cpfCnpj:
          description: Payer CPF or CNPJ (a v5.5.0 string).
          type: string
        ispb:
          description: Payer participant ISPB (8 digits, a v5.5.0 string).
          type: string
        nrAgencia:
          description: Payer branch (nrAgencia, 4 digits, string; the branch source).
          type: string
        nrConta:
          description: Payer account number (nrConta, a string; NEVER the branch).
          type: string
        tpPessoa:
          description: Person type (0=Pessoa Fisica, 1=Pessoa Juridica).
          format: int64
          type: integer
      required:
        - ispb
        - tpPessoa
        - cpfCnpj
        - nrConta
      type: object
    InboundRecipientBlock:
      additionalProperties: false
      properties:
        cnpj:
          description: Recipient CNPJ (14 digits, a v5.5.0 string).
          type: string
        ispb:
          description: Recipient participant ISPB (8 digits, a v5.5.0 string).
          type: string
        nome:
          description: Recipient legal/trade name (razao social).
          type: string
      required:
        - ispb
        - cnpj
        - nome
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        JWT Bearer token authentication. Obtain token from
        `/v1/login/oauth/access_token` endpoint

        using client credentials (clientId and clientSecret).


        Include token in Authorization header:

        `Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...`


        Token expires after 3600 seconds (1 hour).

````