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

# Excluir uma Cobrança Imediata

> Use este endpoint para excluir (cancelar) uma cobrança imediata.

**Notas:**
- Esta operação cancela a cobrança e altera o seu status
- Cobranças com status CONCLUDED não podem ser excluídas
- O motivo da exclusão é obrigatório



## OpenAPI

````yaml pt/openapi/v3-current/indirect-pix.yaml DELETE /v1/collections/immediate/{collection_id}
openapi: 3.0.3
info:
  title: Plugin BR Pix Indireto - API Completa
  description: |
    API completa para o sistema brasileiro de pagamentos instantâneos Pix,
    incluindo operações de dicionário de chaves Pix, geração/decodificação de
    QR Code, transações e limites de transações.
  version: 1.0.0
servers:
  - url: https://plugin-pix-indirect.api.lerian.net
security:
  - bearerAuth: []
paths:
  /v1/collections/immediate/{collection_id}:
    delete:
      tags:
        - Collections API
      summary: Excluir uma Cobrança Imediata
      description: |-
        Use este endpoint para excluir (cancelar) uma cobrança imediata.

        **Notas:**
        - Esta operação cancela a cobrança e altera o seu status
        - Cobranças com status CONCLUDED não podem ser excluídas
        - O motivo da exclusão é obrigatório
      parameters:
        - name: collection_id
          in: path
          description: Identificador da cobrança imediata
          required: true
          schema:
            type: string
        - name: X-Account-Id
          in: header
          description: ID da Conta (formato UUID)
          required: true
          schema:
            type: string
        - name: reason
          in: header
          description: Motivo da exclusão (DELETED_BY_USER ou DELETED_BY_PSP)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
      deprecated: false
      security:
        - bearerAuth: []
components:
  schemas:
    ErrorFormat:
      type: object
      description: A mensagem de erro da resposta.
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: Um identificador único e estável para o erro.
        title:
          type: string
          description: Um breve resumo do problema.
        message:
          type: string
          description: Orientação detalhada para resolver o erro.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````