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

# Refund Pix

> Refund a collecting document



## OpenAPI

````yaml api-reference/banking-api/openapi.json POST /banking/cashin/documents/{id}/refund
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/documents/{id}/refund:
    post:
      tags:
        - cashin
      summary: Refund a collecting document
      description: Refund a collecting document
      operationId: TrioFoundationWeb.Banking.Cashin.DocumentController.refund
      parameters:
        - description: Collecting Document
          in: path
          name: id
          required: true
          schema:
            $ref: '#/components/schemas/UUID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Refund_creation_body_params'
        description: Refund creation attributes
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refund_within_a_collecting_document'
          description: Document
        '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:
    UUID:
      description: Unique identifier
      format: uuid
      title: UUID
      type: string
    Refund_creation_body_params:
      description: Refund creation body params
      example:
        amount: 10
        description: Refund description
      properties:
        amount:
          description: Amount in cents
          type: integer
        description:
          description: Description of refund
          type: string
      required:
        - amount
        - description
      title: Refund creation body params
      type: object
    Refund_within_a_collecting_document:
      description: Refund within a collecting document
      example:
        data:
          amount:
            amount: 10
            currency: BRL
          description: Refund description
          end_to_end_id: E44444444202405211946Dwg1pjxgehP
          id: 018f9cb0-8d37-031e-8b99-bac2919a5033
          receipt_url: >-
            https://receipts.trio.com.br/document_receipts/018f9cb0-8d11-72dd-bb14-f82554e80999/refund/018f9cb0-8d37-031e-8b99-bac2919a5033
          reconciliation_id: 018f9cb0-8d37-031e-8b99-bac2919a5033
          status: settled
          timestamp: '2024-05-21T19:46:07.285344Z'
          transaction_date: '2024-05-21T19:46:07.285344Z'
      properties:
        data:
          $ref: '#/components/schemas/Refund_within_a_collecting_document'
      title: Refund within a collecting document
      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

````