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

# Refund transaction

> Refunds in full a transaction in the `paid` status. Transactions paid by boleto cannot be refunded.



## OpenAPI

````yaml /openapi.yaml post /transactions/{transactionId}/refund
openapi: 3.0.3
info:
  title: Fincle API
  version: 1.0.0
  description: >-
    Fincle payments API: charges by Pix, credit card and boleto, subscriptions,
    transactions, refunds, infractions, notifications and transfers.
servers:
  - url: https://api.fincle.com.br
    description: Production server
security: []
tags:
  - name: Authentication
    description: Issuance of the access token from the API key.
  - name: Charges
    description: Creation of charges by Pix, credit card and boleto.
  - name: Subscriptions
    description: Recurring billing on credit card.
  - name: Transactions
    description: Retrieval and refund of transactions.
  - name: Refunds
    description: Refund requests submitted by payers.
  - name: Infractions and MED
    description: Pix infraction reports and the amounts blocked as a result.
  - name: Webhooks
    description: Registration of notification endpoints and tracking of deliveries.
  - name: Balance and transfers
    description: Balance, statement, fees and transfer of the amounts received.
paths:
  /transactions/{transactionId}/refund:
    post:
      tags:
        - Transactions
      summary: Refund transaction
      description: >-
        Refunds in full a transaction in the `paid` status. Transactions paid by
        boleto cannot be refunded.
      operationId: refundTransaction
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: transactionId
          required: true
          description: Transaction identifier.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  minLength: 3
                  maxLength: 500
                  description: Reason for the refund, recorded in the refund audit trail.
              additionalProperties: false
            example:
              reason: >-
                Right of withdrawal exercised by the payer within the statutory
                period.
      responses:
        '200':
          description: Refund requested.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Always `true` in a successful response.
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Identifier of the refunded transaction.
                      refunded:
                        type: boolean
                        description: >-
                          Always `true` when the refund was accepted by the
                          acquirer.
                      message:
                        type: string
                        description: Outcome of the request, as readable text.
                    required:
                      - id
                      - refunded
                      - message
                    additionalProperties: false
                required:
                  - success
                  - data
                additionalProperties: false
                description: Refund requested.
              example:
                success: true
                data:
                  id: cmtx9p2k40001hlg1u3ajbj6o
                  refunded: true
                  message: Transação cmtx9p2k40001hlg1u3ajbj6o reembolsada com sucesso.
        '400':
          description: The request is well formed, but a business rule rejected it.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Always `false` in an error response.
                  message:
                    type: string
                    description: Readable message explaining the failure.
                required:
                  - success
                  - message
                additionalProperties: false
                description: The request is well formed, but a business rule rejected it.
              example:
                success: false
                message: >-
                  Não foi possível concluir: uma regra de negócio recusou os
                  dados enviados.
        '401':
          description: Token missing, invalid, expired or belonging to a blocked account.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Always `false` in an error response.
                  message:
                    type: string
                    description: Readable message explaining the failure.
                required:
                  - success
                  - message
                additionalProperties: false
                description: >-
                  Token missing, invalid, expired or belonging to a blocked
                  account.
              example:
                success: false
                message: Token inválido ou expirado
        '404':
          description: >-
            The resource does not exist, was deleted or belongs to another
            account.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Always `false` in an error response.
                  message:
                    type: string
                    description: Readable message explaining the failure.
                required:
                  - success
                  - message
                additionalProperties: false
                description: >-
                  The resource does not exist, was deleted or belongs to another
                  account.
              example:
                success: false
                message: Recurso não encontrado
        '422':
          description: The request did not pass schema validation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Always `false` in an error response.
                  message:
                    type: string
                    description: Readable message explaining the failure.
                required:
                  - success
                  - message
                additionalProperties: false
                description: The request did not pass schema validation.
              example:
                success: false
                message: 'name: Nome é obrigatório'
        '429':
          description: >-
            Too many requests: the limit is 1000 requests per minute per source
            IP. Wait the number of seconds given in the `retry-after` header and
            retry with exponential backoff.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Always `false` in an error response.
                  message:
                    type: string
                    description: Readable message explaining the failure.
                required:
                  - success
                  - message
                additionalProperties: false
                description: >-
                  Too many requests: the limit is 1000 requests per minute per
                  source IP. Wait the number of seconds given in the
                  `retry-after` header and retry with exponential backoff.
              example:
                success: false
                message: Muitas requisições. Tente novamente em breve.
          headers:
            retry-after:
              $ref: '#/components/headers/retry-after'
            x-ratelimit-limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            x-ratelimit-remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            x-ratelimit-reset:
              $ref: '#/components/headers/x-ratelimit-reset'
        '500':
          description: >-
            Internal failure while processing the request. Retry; if it
            persists, open a support ticket stating the time and the route.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Always `false` in an error response.
                  message:
                    type: string
                    description: Readable message explaining the failure.
                required:
                  - success
                  - message
                additionalProperties: false
                description: >-
                  Internal failure while processing the request. Retry; if it
                  persists, open a support ticket stating the time and the
                  route.
              example:
                success: false
                message: Erro interno do servidor
      security:
        - bearerAuth: []
components:
  headers:
    retry-after:
      description: Seconds to wait before repeating the request.
      schema:
        type: integer
    x-ratelimit-limit:
      description: >-
        Maximum number of requests in the window (1000). Present in every
        response.
      schema:
        type: integer
    x-ratelimit-remaining:
      description: >-
        Number of requests still available in the current window. Present in
        every response.
      schema:
        type: integer
    x-ratelimit-reset:
      description: Seconds until the window counter resets. Present in every response.
      schema:
        type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.