> ## Documentation Index
> Fetch the complete documentation index at: https://bmpdocs.moneyp.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# 6 - Cancel Installment Charges

This endpoint offers the possibility of canceling charges that were previously registered, either from PIX Cobrança or Boletos (common or hybrid).

It ensures that the charges associated with installments can be canceled and reissued, allowing for more precise control over the flow of payments.

The cancellation process is asynchronous, that is, the operation is performed in the background, and a callback is triggered to the partner as soon as the cancellation of the billing registration is complete, informing them that the ancellation was successful.

This process includes:

* Cancellation of Boleto;
* Cancellation of Hybrid Boleto;
* Cancellation of PIX Collection.

This endpoint provides flexibility in managing collections, allowing the partner to simply cancel registrations and maintain proper control of their financial operations.

<Warning>Use the value generated by the Settlement ID field, returned in the response from endpoints 4 - Generate a Charge and 5 - Generate Multiple Installment Charges, to cancel a collection negotiation.</Warning>


## OpenAPI

````yaml post /AgendaRecebivel/CancelarCobrancas
openapi: 3.0.1
info:
  title: BMPDigitalCore.ApiExterna.AgendaRecebivel.API
  version: '1.0'
servers:
  - url: https://api.bmpdigital.moneyp.dev.br/
    description: Localhost
security:
  - Bearer: []
paths:
  /AgendaRecebivel/CancelarCobrancas:
    post:
      tags:
        - AgendaRecebivel
      parameters:
        - name: IdempotencyKey
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgendaRecebivelCancelarCobrancasCommand'
          text/json:
            schema:
              $ref: '#/components/schemas/AgendaRecebivelCancelarCobrancasCommand'
          application/*+json:
            schema:
              $ref: '#/components/schemas/AgendaRecebivelCancelarCobrancasCommand'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ActionResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ResponseBase'
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBase'
            text/json:
              schema:
                $ref: '#/components/schemas/ResponseBase'
components:
  schemas:
    AgendaRecebivelCancelarCobrancasCommand:
      type: object
      properties:
        dto:
          $ref: '#/components/schemas/FindAgendaRecebivelDTO'
        dtoCancelarCobrancas:
          $ref: '#/components/schemas/AgendaRecebivelCancelarCobrancasDTO'
      additionalProperties: false
    ActionResponse:
      type: object
      properties:
        msg:
          type: string
          nullable: true
        result:
          type: boolean
          writeOnly: true
        hasError:
          type: boolean
        messages:
          type: array
          items:
            $ref: '#/components/schemas/Message'
          nullable: true
        parametros:
          type: array
          items:
            $ref: '#/components/schemas/ParametroDTO'
          nullable: true
      additionalProperties: false
    ResponseBase:
      type: object
      properties:
        msg:
          type: string
          nullable: true
        result:
          type: boolean
          writeOnly: true
        hasError:
          type: boolean
        messages:
          type: array
          items:
            $ref: '#/components/schemas/Message'
          nullable: true
      additionalProperties: false
    FindAgendaRecebivelDTO:
      type: object
      properties:
        codigoProposta:
          type: string
          description: Código identificador da proposta na BMP.
          format: uuid
          nullable: true
        codigoOperacao:
          maxLength: 50
          minLength: 0
          type: string
          description: Código identificador da proposta (valor exclusivo do integrador).
          nullable: true
      additionalProperties: false
    AgendaRecebivelCancelarCobrancasDTO:
      type: object
      properties:
        codigosLiquidacoes:
          type: array
          items:
            type: string
            format: uuid
          nullable: true
      additionalProperties: false
    Message:
      type: object
      properties:
        messageType:
          $ref: '#/components/schemas/ErrorType'
        code:
          type: string
          nullable: true
        context:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        field:
          type: string
          nullable: true
      additionalProperties: false
    ParametroDTO:
      required:
        - nome
        - valor
      type: object
      properties:
        nome:
          type: string
          nullable: true
        valor:
          type: string
          nullable: true
      additionalProperties: false
    ErrorType:
      enum:
        - 1
        - 2
        - 3
      type: integer
      format: int32
  securitySchemes:
    Bearer:
      type: apiKey
      description: Informe o token
      name: Authorization
      in: header

````