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

# Cancel Collection

> Cancel recurrence collection



## OpenAPI

````yaml api-reference/banking-api/openapi.json POST /banking/cashin/pix/recurrences/collections/{id}/cancel
openapi: 3.0.0
info:
  title: Banking API
  version: 1.0.0
servers:
  - url: https://api.sandbox.trio.com.br
    variables: {}
  - url: https://api.qa.trio.com.br
    variables: {}
  - url: https://api.trio.com.br
    variables: {}
security: []
tags: []
paths:
  /banking/cashin/pix/recurrences/collections/{id}/cancel:
    post:
      tags:
        - Recurrences
      summary: Cancel collection
      description: Cancel collection by ID
      operationId: TrioFoundationWeb.Banking.Cashin.Recurrence.CollectionController.cancel
      parameters:
        - description: Collection ID
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelCollectionParams'
        description: The collection cancel attributes
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecurrenceCollectionResponse'
          description: Collection
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonErrorResponse'
          description: Unprocessable Entity
      callbacks: {}
components:
  schemas:
    CancelCollectionParams:
      description: Cancel collection params with ID
      example:
        entity_id: 019f2433-fe38-d041-b91b-51f5592fcf49
        requester_tax_number: '14633666800'
      properties:
        entity_id:
          description: Entity ID
          format: uuid
          type: string
        requester_tax_number:
          description: Requester Tax Number
          type: string
      required:
        - requester_tax_number
      title: CancelCollectionParams
      type: object
    RecurrenceCollectionResponse:
      description: Recurrence collection response with stages and attempts
      example:
        data:
          aditional_info: ''
          amount:
            amount: 0
            currency: ''
          attempts:
            - collection_id: 019f2433-fc72-3f85-4243-ee8a04846235
              collection_timestamp: '2026-07-02T19:00:14.578179Z'
              due_date: '2026-07-02T19:00:14.578180Z'
              end_to_end_id: E123123124120510240124BJJHBVGHBJGHBJHKNJ
              external_id: external id 1
              id: 019f2433-fc72-50b3-c501-9c1409a26115
              inserted_at: '2026-07-02T19:00:14.578180Z'
              status: created
              timestamp: '2026-07-02T19:00:14.578173Z'
              transaction_date: '2026-07-02T19:00:14.578179Z'
              txid: 1276T31G7T623GTYU123GJTY123JGTY
              type: type
              updated_at: '2026-07-02T19:00:14.578180Z'
          bank_account_id: 02ef9c5f-29e6-48fc-9ec3-7ed57ed351f6
          company_id: 02ef9c5f-29e6-48fc-9ec3-7ed57ed351f6
          counterparty_info_id: 02ef9c5f-29e6-48fc-9ec3-7ed57ed351f6
          entity_id: 02ef9c5f-29e6-48fc-9ec3-7ed57ed351f6
          final_date: ''
          id: 02ef9c5f-29e6-48fc-9ec3-7ed57ed351f6
          inserted_at: ''
          next_working_day: ''
          org_id: 02ef9c5f-29e6-48fc-9ec3-7ed57ed351f6
          recurrence_id: 02ef9c5f-29e6-48fc-9ec3-7ed57ed351f6
          recurrence_timestamp: 02ef9c5f-29e6-48fc-9ec3-7ed57ed351f6
          stages:
            - amount:
                amount: 1000
                currency: BRL
              bank_account_id: 019f2433-fda5-88a0-278d-ead80d2187ab
              cancelation_code: cancelation code
              cancelation_description: Cancelation description
              cancelation_origin: cancelation origin
              collection_id: 019f2433-fda5-a631-5f5e-3f9268f49965
              collection_timestamp: '2026-07-02T19:00:14.885672Z'
              id: 019f2433-fda5-1afd-707b-c8f8501fc9e9
              inserted_at: '2026-07-02T19:00:14.885674Z'
              next_working_day: true
              rejection_code: rejection code
              rejection_description: Rejection description
              requester_tax_number: '12345678901'
              status: created
              timestamp: '2026-07-02T19:00:14.885662Z'
              transaction_date: '2026-07-02T19:00:14.885673Z'
              updated_at: '2026-07-02T19:00:14.885680Z'
              virtual_account_id: 019f2433-fda5-8683-b056-f7cb2696a08f
          status: created
          timestamp: 02ef9c5f-29e6-48fc-9ec3-7ed57ed351f6
          transaction_date: ''
          txid: 02ef9c5f-29e6-48fc-9ec3-7ed57ed351f6
          updated_at: ''
          virtual_account_id: 02ef9c5f-29e6-48fc-9ec3-7ed57ed351f6
      properties:
        data:
          $ref: '#/components/schemas/RecurrenceCollectionDataWithStages'
      title: RecurrenceCollectionResponse
      type: object
    JsonErrorResponse:
      properties:
        errors:
          items:
            properties:
              detail:
                example: null value where string expected
                type: string
              source:
                properties:
                  pointer:
                    example: /data/attributes/petName
                    type: string
                required:
                  - pointer
                type: object
              title:
                example: Invalid value
                type: string
            required:
              - title
              - source
              - detail
            type: object
          type: array
      required:
        - errors
      title: JsonErrorResponse
      type: object
    RecurrenceCollectionDataWithStages:
      description: A recurrence collection with stages
      properties:
        aditional_info:
          description: Aditional info
          type: string
        amount:
          properties:
            amount:
              description: Amount int in cents
              type: integer
            currency:
              description: Amount currency
              type: string
          type: object
        attempts:
          items:
            $ref: '#/components/schemas/RecurrenceCollectionAttemptData'
          type: array
        bank_account_id:
          description: Bank Account ID
          format: uuid
          type: string
        company_id:
          description: Company ID
          format: uuid
          type: string
        counterparty_info_id:
          description: Counterparty Info ID
          format: uuid
          type: string
        entity_id:
          description: Entity ID
          format: uuid
          type: string
        final_date:
          description: Final date
          format: date-time
          type: string
        id:
          description: ID
          format: uuid
          type: string
        inserted_at:
          description: Inserted at
          format: date-time
          type: string
        next_working_day:
          description: Next working day
          format: date-time
          type: string
        org_id:
          description: Org ID
          format: uuid
          type: string
        recurrence_id:
          description: Recurrence ID
          format: uuid
          type: string
        recurrence_timestamp:
          description: Recurrence Timestamp
          format: uuid
          type: string
        stages:
          items:
            $ref: '#/components/schemas/RecurrenceCollectionStageData'
          type: array
        status:
          $ref: '#/components/schemas/RecurrenceStatus'
        timestamp:
          description: Timestamp
          format: uuid
          type: string
        transaction_date:
          description: Transaction date
          format: date-time
          type: string
        txid:
          description: TXID
          format: uuid
          type: string
        updated_at:
          description: Updated at
          format: date-time
          type: string
        virtual_account_id:
          description: Virtual account ID
          format: uuid
          type: string
      title: RecurrenceCollectionDataWithStages
      type: object
    RecurrenceCollectionAttemptData:
      description: A recurrence collection attempt
      example:
        collection_id: 019f2433-fc72-3f85-4243-ee8a04846235
        collection_timestamp: '2026-07-02T19:00:14.578179Z'
        due_date: '2026-07-02T19:00:14.578180Z'
        end_to_end_id: E123123124120510240124BJJHBVGHBJGHBJHKNJ
        external_id: external id 1
        id: 019f2433-fc72-50b3-c501-9c1409a26115
        inserted_at: '2026-07-02T19:00:14.578180Z'
        status: created
        timestamp: '2026-07-02T19:00:14.578173Z'
        transaction_date: '2026-07-02T19:00:14.578179Z'
        txid: 1276T31G7T623GTYU123GJTY123JGTY
        type: type
        updated_at: '2026-07-02T19:00:14.578180Z'
      properties:
        collection_id:
          description: Collection ID
          format: uuid
          type: string
        collection_timestamp:
          description: Collection Timestamp
          format: uuid
          type: string
        due_date:
          description: Due date
          format: date-time
          type: string
        end_to_end_id:
          description: End To End ID
          type: string
        external_id:
          description: External ID
          type: string
        id:
          description: ID
          format: uuid
          type: string
        inserted_at:
          description: Inserted at
          format: date-time
          type: string
        status:
          $ref: '#/components/schemas/RecurrenceCollectionAttemptStatus'
        timestamp:
          description: Timestamp
          format: uuid
          type: string
        transaction_date:
          description: Transaction date
          format: date-time
          type: string
        txid:
          description: TXID
          type: string
        type:
          description: Attempt type
          type: string
        updated_at:
          description: Updated at
          format: date-time
          type: string
      title: RecurrenceCollectionAttemptData
      type: object
    RecurrenceCollectionStageData:
      description: A recurrence collection stage
      example:
        amount:
          amount: 1000
          currency: BRL
        bank_account_id: 019f2437-4ee0-d137-3008-6ab506b3666f
        cancelation_code: cancelation code
        cancelation_description: Cancelation description
        cancelation_origin: cancelation origin
        collection_id: 019f2437-4ee0-ead1-a0bb-c1d911891d50
        collection_timestamp: '2026-07-02T19:03:52.288945Z'
        id: 019f2437-4ee0-4396-0a38-66208c7d89a3
        inserted_at: '2026-07-02T19:03:52.288947Z'
        next_working_day: true
        rejection_code: rejection code
        rejection_description: Rejection description
        requester_tax_number: '12345678901'
        status: created
        timestamp: '2026-07-02T19:03:52.288938Z'
        transaction_date: '2026-07-02T19:03:52.288946Z'
        updated_at: '2026-07-02T19:03:52.288948Z'
        virtual_account_id: 019f2437-4ee0-b0e7-3354-de35692a843c
      properties:
        amount:
          properties:
            amount:
              description: Amount int in cents
              type: integer
            currency:
              description: Amount currency
              type: string
          type: object
        bank_account_id:
          description: Bank Account ID
          format: uuid
          type: string
        cancelation_code:
          description: Cancelation code
          type: string
        cancelation_description:
          description: Cancelation description
          type: string
        cancelation_origin:
          description: Cancelation origin
          type: string
        collection_id:
          description: Collection ID
          format: uuid
          type: string
        collection_timestamp:
          description: Collection Timestamp
          format: uuid
          type: string
        id:
          description: ID
          format: uuid
          type: string
        inserted_at:
          description: Inserted at
          format: date-time
          type: string
        next_working_day:
          description: Next working day
          type: boolean
        rejection_code:
          description: Rejection code
          type: string
        rejection_description:
          description: Rejection description
          type: string
        requester_tax_number:
          description: Requester tax number
          type: string
        status:
          $ref: '#/components/schemas/RecurrenceCollectionAttemptStatus'
        timestamp:
          description: Timestamp
          format: uuid
          type: string
        transaction_date:
          description: Transaction date
          format: date-time
          type: string
        updated_at:
          description: Updated at
          format: date-time
          type: string
        virtual_account_id:
          description: Virtual account ID
          format: uuid
          type: string
      title: RecurrenceCollectionStageData
      type: object
    RecurrenceStatus:
      description: Types of recurrence status
      enum:
        - created
        - approved
        - rejected
        - expired
        - cancelled
      title: RecurrenceStatus
      type: string
    RecurrenceCollectionAttemptStatus:
      description: Types of recurrence collection attempt statuses
      enum:
        - requested
        - scheduled
        - settled
        - cancelled
        - rejected
        - expired
        - failed
      title: RecurrenceCollectionAttemptStatus
      type: string

````