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

# Get Subscription Refund Details

> Use this API to fetch the status of the refund of a Subscription. Only one of paymentId or merchantRefundId should be passed as query parameter. If both are passed then the request will be rejected.



## OpenAPI

````yaml get /api/v2/subscriptions/refund-details
openapi: 3.0.0
info:
  title: Cashfree Subscription API
  description: >-
    Create and manage subscriptions and collect recurring payments from
    customers easily with Cashfree Subscriptions.
  version: v2
servers:
  - url: https://sandbox.cashfree.com
    description: Sandbox server
  - url: https://api.cashfree.com
    description: Production server
security: []
externalDocs:
  url: https://docs.cashfree.com/reference/postman-collection-1
  description: This url will have the information of all the APIs.
paths:
  /api/v2/subscriptions/refund-details:
    get:
      tags:
        - Subscription Refund
      summary: Get Subscription Refund Details
      description: >-
        Use this API to fetch the status of the refund of a Subscription. Only
        one of paymentId or merchantRefundId should be passed as query
        parameter. If both are passed then the request will be rejected.
      operationId: getSubscriptionRefundDetails
      parameters:
        - name: X-Client-Id
          in: header
          required: true
          schema:
            type: string
            description: Client ID provided by Cashfree.
            example: asdf1234
        - name: X-Client-Secret
          in: header
          required: true
          schema:
            type: string
            description: Client Secret provided by Cashfree.
            example: qwer9876
        - name: paymentId
          in: query
          required: false
          schema:
            type: string
            description: Payment ID for which refund details are to be fetched.
            example: '12344'
        - name: merchantRefundId
          in: query
          required: false
          schema:
            type: string
            description: Merchant Refund ID for which refund details are to be fetched.
            example: test-refund
      responses:
        '200':
          description: Successful retrieval of refund details.
          content:
            application/json:
              examples:
                Get Refund:
                  value:
                    refundId: 12
                    subReferenceId: 123
                    paymentId: 12344
                    subRefundId: SUB_john194d4
                    refundAmount: 1
                    refundNote: ''
                    refundType: AUTH
                    refundStatus: PENDING
                    addedOn: '2023-10-16 16:24:57'
        '400':
          description: >-
            Bad request due to invalid parameters or both paymentId and
            merchantRefundId being provided or absent.
          content:
            application/json:
              examples:
                Both PaymentId and MerchantRefundId Present:
                  value:
                    title: REQUEST_INVALID
                    detail: >-
                      Both paymentId and merchantRefundId are present, Please
                      provide any one of them
                    status: ERROR
                    subCode: '400'
                    message: >-
                      Both paymentId and merchantRefundId are present, Please
                      provide any one of them
                Both PaymentId and MerchantRefundId Absent:
                  value:
                    title: REQUEST_INVALID
                    detail: Either one of paymentId or merchantRefundId is mandatory
                    status: ERROR
                    subCode: '400'
                    message: Either one of paymentId or merchantRefundId is mandatory
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the API call.
                    example: ERROR
                  message:
                    type: string
                    description: Error message.
                    example: Server encountered an unexpected condition.

````