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

# Get refund

> Use to inspect a single refund: its destination, settled amount and failure reason.



## OpenAPI

````yaml /api-reference/openapi.json get /refunds/{id}
openapi: 3.0.1
info:
  title: Flexprice API
  description: Flexprice API Service
  contact:
    name: API Support
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1.0'
servers:
  - url: https://us.api.flexprice.io/v1
    description: US Region
  - url: https://api.cloud.flexprice.io/v1
    description: India Region
security: []
paths:
  /refunds/{id}:
    get:
      tags:
        - Refunds
      summary: Get refund
      description: >-
        Use to inspect a single refund: its destination, settled amount and
        failure reason.
      operationId: getRefund
      parameters:
        - name: id
          in: path
          description: Refund ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    RefundResponse:
      type: object
      properties:
        amount:
          type: string
        attempt:
          type: integer
        cancelled_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        credit_note_id:
          type: string
        currency:
          type: string
        environment_id:
          type: string
        failed_at:
          type: string
          format: date-time
        failure_reason:
          type: string
        gateway_idempotency_token:
          type: string
        gateway_metadata:
          type: object
          additionalProperties: true
        gateway_refund_id:
          type: string
        gateway_tracking_id:
          type: string
        id:
          type: string
        idempotency_key:
          type: string
        initiated_at:
          type: string
          format: date-time
        invoice_id:
          type: string
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        payment_gateway:
          type: string
        payment_id:
          type: string
        refund_destination:
          $ref: '#/components/schemas/types.RefundDestination'
        refund_destination_id:
          type: string
        refund_reason:
          $ref: '#/components/schemas/types.RefundReason'
        refund_status:
          $ref: '#/components/schemas/types.RefundStatus'
        settled_amount:
          type: string
        status:
          $ref: '#/components/schemas/types.Status'
        succeeded_at:
          type: string
          format: date-time
        tenant_id:
          type: string
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
    errors.ErrorResponse:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/errors.ErrorCode'
        http_status_code:
          type: integer
        message:
          type: string
      x-speakeasy-name-override: ErrorResponse
    types.Metadata:
      type: object
      additionalProperties:
        type: string
      x-speakeasy-name-override: Metadata
    types.RefundDestination:
      type: string
      enum:
        - GATEWAY
        - WALLET
        - OUT_OF_BAND
      x-enum-varnames:
        - RefundDestinationGateway
        - RefundDestinationWallet
        - RefundDestinationOutOfBand
      x-speakeasy-name-override: RefundDestination
    types.RefundReason:
      type: string
      enum:
        - DUPLICATE
        - FRAUDULENT
        - REQUESTED_BY_CUSTOMER
        - ORDER_CHANGE
        - SERVICE_ISSUE
        - OTHER
      x-enum-varnames:
        - RefundReasonDuplicate
        - RefundReasonFraudulent
        - RefundReasonRequestedByCustomer
        - RefundReasonOrderChange
        - RefundReasonServiceIssue
        - RefundReasonOther
      x-speakeasy-name-override: RefundReason
    types.RefundStatus:
      type: string
      enum:
        - PENDING
        - PROCESSING
        - SUCCEEDED
        - FAILED
        - CANCELLED
      x-enum-varnames:
        - RefundStatusPending
        - RefundStatusProcessing
        - RefundStatusSucceeded
        - RefundStatusFailed
        - RefundStatusCancelled
      x-speakeasy-name-override: RefundStatus
    types.Status:
      type: string
      enum:
        - published
        - deleted
        - archived
      x-enum-varnames:
        - StatusPublished
        - StatusDeleted
        - StatusArchived
      x-speakeasy-name-override: Status
    errors.ErrorCode:
      type: string
      enum:
        - http_client_error
        - system_error
        - internal_error
        - not_found
        - already_exists
        - version_conflict
        - validation_error
        - invalid_operation
        - permission_denied
        - database_error
        - service_unavailable
        - too_many_requests
        - not_implemented
      x-enum-varnames:
        - ErrCodeHTTPClient
        - ErrCodeSystemError
        - ErrCodeInternalError
        - ErrCodeNotFound
        - ErrCodeAlreadyExists
        - ErrCodeVersionConflict
        - ErrCodeValidation
        - ErrCodeInvalidOperation
        - ErrCodePermissionDenied
        - ErrCodeDatabase
        - ErrCodeServiceUnavailable
        - ErrCodeTooManyRequests
        - ErrCodeNotImplemented
      x-speakeasy-name-override: ErrorCode
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: Enter your API key in the format *x-api-key &lt;api-key&gt;**
      name: x-api-key
      in: header

````