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

# Get a Refund

> Use this endpoint to retrieve a refund by its unique identifier.



## OpenAPI

````yaml /pt/openapi/v3-current/indirect-pix.yaml get /v1/refunds/{refund_id}
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/refunds/{refund_id}:
    get:
      tags:
        - Refunds
      summary: Get a Refund
      description: Use this endpoint to retrieve a refund by its unique identifier.
      operationId: payment-get-refund
      parameters:
        - description: Refund ID (UUID format)
          in: path
          name: refund_id
          required: true
          schema:
            description: Refund ID (UUID format)
            type: string
        - description: Unique identifier of the Midaz Ledger Account (UUID format)
          in: header
          name: X-Account-Id
          required: true
          schema:
            description: Unique identifier of the Midaz Ledger Account (UUID format)
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundCashoutOutput'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Bad Request
        '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:
    RefundCashoutOutput:
      additionalProperties: false
      properties:
        accountId:
          examples:
            - 01989f9e-6508-79f8-9540-835be49fbd0d
          type: string
        amount:
          examples:
            - '100.50'
          type: string
        createdAt:
          examples:
            - '2024-01-15T10:30:00Z'
          type: string
        deletedAt:
          type: string
        description:
          examples:
            - Customer reported unauthorized transaction
          type: string
        id:
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        ledger:
          $ref: '#/components/schemas/LedgerInfo'
        metadata:
          additionalProperties: {}
          type: object
        originalEndToEndId:
          examples:
            - E12345678202411241430ABCDEFGHIJK
          type: string
        returnEndToEndId:
          examples:
            - D3030629420200808185300887639654
          type: string
        status:
          enum:
            - CREATED
            - PENDING
            - PROCESSING
            - COMPLETED
            - REJECTED
            - FAILED
            - CANCELLED
          examples:
            - PENDING
          type: string
        type:
          enum:
            - CASHOUT
            - CASHIN
          examples:
            - CASHOUT
          type: string
        updatedAt:
          examples:
            - '2024-01-15T10:30:00Z'
          type: string
      required:
        - id
        - originalEndToEndId
        - returnEndToEndId
        - amount
        - status
        - type
        - accountId
        - 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
    LedgerInfo:
      additionalProperties: false
      properties:
        destinationOperationId:
          examples:
            - 550e8400-e29b-41d4-a716-446655440013
          type: string
        revert:
          $ref: '#/components/schemas/LedgerRevertInfo'
        sourceOperationId:
          examples:
            - 550e8400-e29b-41d4-a716-446655440012
          type: string
        transactionId:
          examples:
            - 550e8400-e29b-41d4-a716-446655440011
          type: string
      type: object
    LedgerRevertInfo:
      additionalProperties: false
      properties:
        destinationOperationId:
          examples:
            - 550e8400-e29b-41d4-a716-446655440016
          type: string
        sourceOperationId:
          examples:
            - 550e8400-e29b-41d4-a716-446655440015
          type: string
        transactionId:
          examples:
            - 550e8400-e29b-41d4-a716-446655440014
          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.