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

# Create a Refund Request

> Use this endpoint to open a refund request for a Pix transaction.

**Notes:**
- Refund requests must be associated with a valid Pix transaction.
- Requests can optionally be linked to an infraction report.
- The contested participant must respond within the specified timeframe.



## OpenAPI

````yaml /pt/openapi/v3-current/indirect-pix.yaml post /v1/dict/refund-requests
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: >-
    API for Pix Indirect via BTG. It covers DICT keys and claims; MED infraction
    reports, fraud markers, refund requests, and funds recoveries; DICT
    statistics and reconciliation; Pix transfers, refunds, and schedules; static
    QR codes and QR code decoding; immediate and due-date collections; Pix
    Automático for the payer; transaction reports and TemposTransacoes
    statistics; and inbound and outbound webhook records.
  license:
    name: Lerian Studio General License
  title: Pix BTG API
  version: 1.14.0
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security:
  - BearerAuth: []
paths:
  /v1/dict/refund-requests:
    post:
      tags:
        - Refund Requests
      summary: Create a Refund Request
      description: |-
        Use this endpoint to open a refund request for a Pix transaction.

        **Notes:**
        - Refund requests must be associated with a valid Pix transaction.
        - Requests can optionally be linked to an infraction report.
        - The contested participant must respond within the specified timeframe.
      operationId: dict-create-refund
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRefundInput'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundOutput'
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Bad Request
        '413':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Request Entity Too Large
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Internal Server Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Error
components:
  schemas:
    CreateRefundInput:
      additionalProperties: false
      properties:
        refundAmount:
          description: 'Amount in BRL with 2 decimal places (format: 0.00 to 9999999999.99)'
          examples:
            - '100.50'
          minLength: 1
          type: string
        refundDetails:
          description: Detailed justification (max 2000 characters)
          examples:
            - Customer reports unauthorized transaction. Card was stolen.
          maxLength: 2000
          minLength: 1
          type: string
        refundReason:
          description: Reason for refund request
          enum:
            - FRAUD
            - OPERATIONAL_FLAW
            - REFUND_CANCELLED
          examples:
            - FRAUD
          minLength: 1
          type: string
        transactionId:
          description: Pix End-to-End transaction ID (32 characters)
          examples:
            - E12345678202411241430ABCDEFGHIJK
          minLength: 1
          type: string
      required:
        - transactionId
        - refundReason
        - refundAmount
        - refundDetails
      type: object
    RefundOutput:
      additionalProperties: false
      properties:
        accountId:
          description: >-
            Account ID (UUID) of the contested Pix transfer when the request
            arrived through BTG; empty when it was opened through this API or
            the plugin could not resolve the contested transfer
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        analysisDetails:
          description: Analysis comments (max 2000 characters)
          examples:
            - Analysis confirms fraud. Refund approved.
          type: string
        analysisResult:
          description: Analysis result (if closed)
          enum:
            - TOTALLY_ACCEPTED
            - PARTIALLY_ACCEPTED
            - REJECTED
          examples:
            - TOTALLY_ACCEPTED
          type: string
        bacenFundsRecoveryId:
          description: >-
            BACEN/BTG funds-recovery identifier resolved via the associated
            infraction report (read-only, JOIN-derived)
          examples:
            - 91d65e98-97c0-4b0f-b577-73625da1f9fc
          type: string
        bacenRefundRequestId:
          description: BACEN/BTG refund request external identifier
          examples:
            - 3d48532f-a1b2-4422-81c3-b7dc852e262b
          type: string
        contestedParticipant:
          description: >-
            ISPB of the contested participant (8 uppercase alphanumeric
            characters)
          examples:
            - '12345678'
          type: string
        createdAt:
          description: Creation timestamp (ISO 8601 UTC)
          examples:
            - '2024-01-15T10:30:00Z'
          format: date-time
          type: string
        effectiveRefundedAmount:
          description: Amount effectively refunded in BRL
          examples:
            - '100.00'
          type: string
        id:
          description: Unique identifier of the refund request (UUID)
          examples:
            - 550e8400-e29b-41d4-a716-44665544r001
          type: string
        infractionReportId:
          description: Related infraction report ID (UUID)
          examples:
            - 550e8400-e29b-41d4-a716-44665544f001
          type: string
        monitorAccount:
          description: BACEN flag for account monitoring
          examples:
            - true
          type: boolean
        refundAccount:
          $ref: '#/components/schemas/RefundAccountOutput'
          description: Refund destination account details
        refundAmount:
          description: 'Refund amount in BRL (format: 0.00)'
          examples:
            - '100.50'
          type: string
        refundDetails:
          description: Detailed justification (max 2000 characters)
          examples:
            - Customer reports unauthorized transaction
          type: string
        refundReason:
          description: Reason for the refund
          enum:
            - FRAUD
            - OPERATIONAL_FLAW
            - REFUND_CANCELLED
          examples:
            - FRAUD
          type: string
        refundRejectionReason:
          description: Rejection reason (if rejected)
          enum:
            - NO_BALANCE
            - ACCOUNT_CLOSURE
            - INVALID_REQUEST
            - OTHER
          examples:
            - NO_BALANCE
          type: string
        refundTransactionId:
          description: Refund transaction ID (if accepted, 32 characters)
          examples:
            - E98765432202411241500REFUNDTRANS
          type: string
        requestingParticipant:
          description: >-
            ISPB of the requesting participant (8 uppercase alphanumeric
            characters)
          examples:
            - '30306294'
          type: string
        status:
          description: Current status of the refund request
          enum:
            - OPEN
            - CLOSED
            - CANCELLED
          examples:
            - OPEN
          type: string
        transactionId:
          description: Pix End-to-End transaction ID (32 characters)
          examples:
            - E12345678202411241430ABCDEFGHIJK
          type: string
        updatedAt:
          description: Last update timestamp (ISO 8601 UTC)
          examples:
            - '2024-01-15T10:30:00Z'
          format: date-time
          type: string
      required:
        - id
        - bacenRefundRequestId
        - accountId
        - transactionId
        - requestingParticipant
        - contestedParticipant
        - refundReason
        - refundAmount
        - status
        - createdAt
        - updatedAt
      type: object
    LegacyErrorBody:
      additionalProperties: false
      properties:
        code:
          type: string
        fields:
          additionalProperties:
            type: string
          type: object
        headers:
          additionalProperties:
            type: string
          type: object
        message:
          type: string
        paths:
          additionalProperties:
            type: string
          type: object
        queryParams:
          additionalProperties:
            type: string
          type: object
        raw:
          type: string
        title:
          type: string
      required:
        - code
        - title
        - message
      type: object
    RefundAccountOutput:
      additionalProperties: false
      properties:
        accountNumber:
          description: Account number
          examples:
            - '123456'
          type: string
        accountType:
          description: Account type (CACC, SVGS, TRAN)
          examples:
            - CACC
          type: string
        branch:
          description: Branch number
          examples:
            - '0001'
          type: string
        document:
          description: CPF or CNPJ of the account holder
          examples:
            - '12345678909'
          type: string
        participant:
          description: ISPB code of the participant institution
          examples:
            - '99999011'
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

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